1 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
4 * Makefile (tests-static): Add tst-cancel21-static.
6 * tst-cancel21-static.c: New file.
8 2012-09-01 Joseph Myers <joseph@codesourcery.com>
10 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
11 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
12 [__NR_clock_getres]: Make code unconditional.
13 (pthread_getcpuclockid): Remove code left unreachable by removal
16 2012-08-31 Joseph Myers <joseph@codesourcery.com>
19 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
20 atomic_compare_and_exchange_bool_rel.
21 * tst-sem14.c: New file.
22 * Makefile (tests): Add tst-sem14.
24 2012-08-15 Roland McGrath <roland@hack.frob.com>
26 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
28 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
29 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
31 2012-08-16 Joseph Myers <joseph@codesourcery.com>
33 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
34 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
35 * pthread_condattr_setclock.c (pthread_condattr_setclock)
36 [!__ASSUME_POSIX_TIMERS]: Likewise.
37 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
38 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
39 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
40 [!__ASSUME_POSIX_TIMERS]: Likewise.
41 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
42 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
43 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
45 [!__NR-timer_create]: Remove conditional code.
46 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
47 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
49 [!__NR_timer_delete]: Remove conditional code.
50 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
51 * sysdeps/unix/sysv/linux/timer_getoverr.c
52 [__NR_timer_getoverrun]: Make code unconditional.
53 [!__NR_timer_getoverrun]: Remove conditional code.
54 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
55 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
56 Make code unconditional.
57 [!__NR_timer_gettime]: Remove conditional code.
58 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
59 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
60 Make code unconditional.
61 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
62 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
63 Make code unconditional.
64 [!__NR_timer_settime]: Remove conditional code.
65 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
66 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
67 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
70 2012-08-15 Tom de Vries <vries@codesourcery.com>
71 Maxim Kuvyrkov <maxim@codesourcery.com>
73 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
74 (__libc_lock_trylock): Allow pre-existing definitions.
76 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
78 * pthread_spin_lock.c: New file.
79 * pthread_spin_trylock.c: New file.
81 2012-08-08 Joseph Myers <joseph@codesourcery.com>
83 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
85 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
86 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
88 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
89 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
90 Make code unconditional.
91 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
92 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
93 __NR_tgkill]: Make code unconditional.
94 (raise) [__ASSUME_TGKILL]: Likewise.
95 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
96 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
97 [__ASSUME_TGKILL]: Make code unconditional.
98 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
99 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
100 __NR_tgkill]: Make code unconditional.
101 (raise) [__ASSUME_TGKILL]: Likewise.
102 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
104 2012-08-07 Joseph Myers <joseph@codesourcery.com>
106 * sysdeps/pthread/createthread.c (create_thread)
107 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
109 2012-08-03 Joseph Myers <joseph@codesourcery.com>
111 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
113 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
115 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
117 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
118 (pagesize): New static variable.
119 (allocate_and_test): Return MEM. Rename parameter to TARGET.
120 (check_stack_top): New local variables MEM and PAGEMASK. Cap
121 stack size to MAX_STACK_SIZE. Call allocate_and_test for
122 halfway up the stack top page. Verify that the top page was
124 (do_test): Get pagesize using sysconf.
126 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
128 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
130 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
131 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
134 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
136 * tst-pthread-getattr.c: Revert last change.
138 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
140 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
143 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
145 (check_stack_top): Read valued written into STACKADDR in
146 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
148 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
150 * nptl-init.c (sighandler_setxid): Fix the comment that
153 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
155 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
156 (__lll_robust_timedlock_wait): Simplify CFI directives.
158 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
161 * Makefile (tests): Add test case.
162 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
163 the __libc_stack_end page from stacksize. Truncate stacksize to
164 make it page aligned when it is computed from RLIMIT_STACK.
165 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
168 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
171 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
174 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
175 Jakub Jelinek <jakub@redhat.com>
178 * sysdeps/pthread/pthread.h
179 [!(defined __GNUC__ && defined __EXCEPTIONS)]
180 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
181 __libc_unlikely instead of __builtin_expect.
183 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
186 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
187 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
188 * sysdeps/unix/sysv/linux/i386/Implies: New file.
189 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
190 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
192 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
193 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
195 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
197 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
200 * nptl-init.c (pthread_functions): Remove use of INTUSE and
202 (__pthread_initialize_minimal_internal): Likewise.
203 * sem_open.c: Likewise.
204 * sem_unlink.c: Likewise.
205 * pthreadP.h: Replace _internal aliases by hidden_proto
207 * pthread_getspecific.c: Replace _internal alias by hidden_def.
208 * pthread_key_create.c: Likewise.
209 * pthread_mutex_destroy.c: Likewise.
210 * pthread_mutex_init.c: Likewise.
211 * pthread_mutex_lock.c: Likewise.
212 * pthread_mutex_unlock.c: Likewise.
213 * pthread_once.c: Likewise.
214 * pthread_rwlock_rdlock.c: Likewise.
215 * pthread_rwlock_unlock.c: Likewise.
216 * pthread_rwlock_wrlock.c: Likewise.
217 * pthread_setspecific.c: Likewise.
218 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
220 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
222 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
224 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
225 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
226 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
227 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
228 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
229 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
230 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
231 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
232 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
233 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
235 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
237 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
240 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
242 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
243 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
245 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
246 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
248 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
249 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
250 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
251 (pthread_barrier_wait): Likewise.
252 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
253 (__pthread_cond_broadcast): Likewise.
254 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
255 (__pthread_cond_signal): Likewise.
256 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
257 (__pthread_cond_timedwait): Likewise.
258 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
260 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
261 (__pthread_rwlock_rdlock): Likewise.
262 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
263 (pthread_rwlock_timedrdlock): Likewise.
264 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
265 (pthread_rwlock_timedwrlock): Likewise.
266 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
267 (__pthread_rwlock_unlock): Likewise.
268 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
269 (__pthread_rwlock_wrlock): Likewise.
270 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
271 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
272 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
274 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
276 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
279 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
280 __libc_stack_end rounded to the end of containing page as the
283 2012-05-25 Rayson Ho <rho@redhat.com>
285 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
287 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
288 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
289 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
290 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
291 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
292 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
293 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
294 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
296 2012-05-25 Rayson Ho <rho@redhat.com>
297 Roland McGrath <roland@hack.frob.com>
299 * DESIGN-systemtap-probes.txt: New file.
300 * pthread_cond_broadcast.c: SystemTap probes.
301 * pthread_cond_init.c: Likewise.
302 * pthread_cond_signal.c: Likewise.
303 * pthread_cond_wait.c: Likewise.
304 * pthread_cond_destroy.c: Likewise.
305 * pthread_create.c: Likewise.
306 * pthread_join.c: Likewise.
307 * pthread_mutex_destroy.c: Likewise.
308 * pthread_mutex_init.c: Likewise.
309 * pthread_mutex_lock.c: Likewise.
310 * pthread_mutex_timedlock.c: Likewise.
311 * pthread_mutex_unlock.c: Likewise.
312 * pthread_rwlock_destroy.c: Likewise.
313 * pthread_rwlock_rdlock.c: Likewise.
314 * pthread_rwlock_unlock.c: Likewise.
315 * pthread_rwlock_wrlock.c: Likewise.
316 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
317 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
318 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
319 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
320 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
321 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
322 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
323 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
325 2012-05-24 Roland McGrath <roland@hack.frob.com>
327 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
329 2012-05-17 Andreas Jaeger <aj@suse.de>
331 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
332 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
333 only for older kernels.
335 2012-05-15 Joseph Myers <joseph@codesourcery.com>
337 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
340 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
342 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
343 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
344 (lll_robust_lock): Likewise.
345 (lll_cond_lock): Likewise.
346 (lll_robust_cond_lock): Likewise.
347 (lll_timedlock): Likewise.
348 (lll_robust_timedlock): Likewise.
349 (lll_unlock): Likewise.
350 (lll_robust_unlock): Likewise.
352 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
354 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
355 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
357 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
359 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
361 (__gcc_personality_v0): Replace 8-byte data alignment with
362 LP_SIZE alignment and .quad with ASM_ADDR.
364 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
366 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
368 (__gcc_personality_v0): Replace 8-byte data alignment with
369 LP_SIZE alignment and .quad with ASM_ADDR.
371 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
373 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
374 NWAITERS, which is unsigned long int.
376 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
378 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
379 (__gcc_personality_v0): Replace 8-byte data alignment with
380 LP_SIZE alignment and .quad with ASM_ADDR.
382 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
384 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
385 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
386 __vdso_clock_gettime pointer into RAX_LP.
387 (__gcc_personality_v0): Replace 8-byte data alignment with
388 LP_SIZE alignment and .quad with ASM_ADDR.
390 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
392 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
393 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
394 __vdso_clock_gettime pointer into RAX_LP.
395 (__gcc_personality_v0): Replace 8-byte data alignment with
396 LP_SIZE alignment and .quad with ASM_ADDR.
398 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
400 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
401 LP_OP(cmp) and R8_LP on dep_mutex pointer.
403 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
405 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
406 to update pointer in memory. Load pointer into RDI_LP.
408 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
410 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
411 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
413 (LLL_STUB_UNWIND_INFO_END): Likewise.
414 (lll_timedlock): Load timeout pointer into RDX_LP.
415 (lll_robust_timedlock): Likewise.
417 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
418 Jakub Jelinek <jakub@redhat.com>
421 * Makefile (tests): Add test cases.
422 * descr.h (struct pthread): Add a comment describing multiple_threads.
423 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
425 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
426 before setting cancelstate of the thread.
427 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
428 (__libc_multiple_threads): Add explanatory comment.
429 * tst-cancel-self-cancelstate.c: New test case.
430 * tst-cancel-self-canceltype.c: Likewise.
431 * tst-cancel-self-cleanup.c: Supporting file for test cases.
432 * tst-cancel-self-testcancel.c: New test case.
433 * tst-cancel-self.c: Likewise.
434 * vars.c: Expand comment to include single-process case.
436 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
438 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
439 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
442 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
444 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
446 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
447 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
449 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
451 * shlib-versions: Move x86_64-.*-linux.* entry to ...
452 * sysdeps/x86_64/64/shlib-versions: Here. New file.
453 * sysdeps/x86_64/x32/shlib-versions: New file.
455 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
457 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
458 __SIZEOF_PTHREAD_XXX_T.
459 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
460 (pthread_mutex_t): Likewise.
461 (pthread_rwlock_t): Likewise.
462 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
465 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
467 * sysdeps/x86_64/x32/tls.h: New file.
469 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
471 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
473 (THREAD_SETMEM_NC): Likewise.
475 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
477 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
480 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
482 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
483 (__cleanup_fct_attribute): Check __x86_64__ instead of
486 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
488 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
489 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
490 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
491 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
492 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
494 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
496 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
497 instead of __WORDSIZE.
499 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
502 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
504 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
506 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
507 (__pthread_cond_timedwait): Use CFI directives.
508 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
509 (__pthread_cond_wait): Likewise.
510 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
511 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
513 2012-05-03 David S. Miller <davem@davemloft.net>
515 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
516 always have to return 0, especially for the pthread_spin_init
518 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
520 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
521 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
523 2012-05-02 David S. Miller <davem@davemloft.net>
525 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
526 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
527 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
528 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
529 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
530 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
531 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
532 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
533 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
534 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
535 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
536 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
537 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
538 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
539 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
540 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
541 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
542 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
544 2012-05-02 Allan McRae <allan@archlinux.org>
546 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
547 (LDFLAGS-tst-cancel24): Likewise.
549 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
551 * sysdeps/i386/pthread_spin_lock.S: New.
552 * sysdeps/i386/pthread_spin_lock.c: Delete.
553 * sysdeps/x86_64/pthread_spin_lock.S: New.
554 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
556 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
558 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
559 run when cross-compiling.
561 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
563 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
564 instead of libgcc_s.h.
566 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
568 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
570 2012-03-27 David S. Miller <davem@davemloft.net>
572 * tst-cond16.c (do_test): Use a thread stack size which is either
573 PTHREAD_STACK_MIN or the page size, whichever is larger.
574 * tst-cond18.c (do_test): Likewise.
576 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
578 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
579 register char * __asm__("rsp") to get stack frame.
581 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
583 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
586 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
588 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
591 2012-03-16 David S. Miller <davem@davemloft.net>
594 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
596 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
599 2012-03-15 David S. Miller <davem@davemloft.net>
602 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
604 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
607 * pt-crti.S: Replace FSF snail mail address with URL.
609 2012-03-09 Joseph Myers <joseph@codesourcery.com>
611 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
612 Do not define before including <time.h>.
614 2012-03-08 David S. Miller <davem@davemloft.net>
616 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
618 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
620 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
621 Check for timestamp before the Epoch.
623 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
626 * tst-sem13.c (do_test): Add another test case.
627 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
628 Fix updating nwaiters.
630 2012-03-07 Joseph Myers <joseph@codesourcery.com>
633 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
634 link test to a compile test.
635 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
637 * sysdeps/pthread/configure: Regenerated.
639 2012-03-07 Ulrich Drepper <drepper@gmail.com>
641 * Makefile (distribute): Remove variable.
643 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
645 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
646 superfluous assignment.
647 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
649 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
650 (sem_timedwait): Likewise.
652 2012-03-06 Ulrich Drepper <drepper@gmail.com>
654 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
655 installed headers to...
656 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
658 2012-03-06 David S. Miller <davem@davemloft.net>
660 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
661 atomic_increment and remove unused local variable.
662 (__old_sem_post): Likewise.
664 2012-02-27 David S. Miller <davem@davemloft.net>
666 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
667 non-existing __pthread_attr.
668 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
669 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
670 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
671 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
672 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
674 2012-02-26 Ulrich Drepper <drepper@gmail.com>
676 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
678 * sysdeps/pthread/pthread.h: Define __need_timespec before including
680 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
682 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
683 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
684 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
685 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
686 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
688 2012-02-21 Joseph Myers <joseph@codesourcery.com>
691 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
693 [crti.S not in sysdirs] (omit-deps): Do not append.
694 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
695 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
696 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
697 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
698 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
699 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
700 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
701 [crti.S in sysdirs] (extra-objs): Append unconditionally.
702 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
704 * sysdeps/pthread/pt-initfini.c: Remove file.
706 2012-02-16 Richard Henderson <rth@twiddle.net>
708 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
709 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
711 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
713 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
715 2012-02-16 David S. Miller <davem@davemloft.net>
717 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
719 2012-02-15 Marek Polacek <polacek@redhat.com>
721 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
723 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
725 Replace FSF snail mail address with URLs, as per GNU coding standards.
727 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
729 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
731 2012-02-08 Joseph Myers <joseph@codesourcery.com>
733 Support crti.S and crtn.S provided directly by architectures.
734 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
735 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
736 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
737 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
738 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
739 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
740 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
741 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
742 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
743 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
744 * pt-crti.S: New file.
745 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
747 2012-02-03 Joseph Myers <joseph@codesourcery.com>
749 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
750 macros for PIC register setup.
751 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
752 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
753 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
754 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
755 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
757 2012-01-11 Marek Polacek <polacek@redhat.com>
759 * forward.c (FORWARD_NORETURN): Define macro.
760 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
761 (__pthread_exit): Likewise.
763 2012-01-10 Ulrich Drepper <drepper@gmail.com>
765 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
767 * pthreadP.h: Add noreturn to __pthread_exit.
768 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
770 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
772 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
773 Call pthread_attr_setstacksize() with result of
774 __pthread_get_minstack() to account for application TLS usage.
776 2012-01-08 Marek Polacek <polacek@redhat.com>
778 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
780 2012-01-07 Ulrich Drepper <drepper@gmail.com>
783 * pthreadP.h: Use const instead of __const.
784 * semaphore.h: Likewise.
785 * sysdeps/pthread/bits/libc-lock.h: Likewise.
786 * sysdeps/pthread/bits/sigthread.h: Likewise.
787 * sysdeps/pthread/pthread.h: Likewise.
789 * Makefile: Remove elf=yes test, only ELF is supported.
791 * shlib-versions: Remove entries for ports architectures.
793 In case anyone cares, the IA-64 architecture could move to ports.
794 * sysdeps/ia64/*: Removed.
795 * sysdeps/unix/sysv/linux/ia64/*: Removed.
797 2011-12-22 Ulrich Drepper <drepper@gmail.com>
799 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
800 __pthread_get_minstack.
801 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
804 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
805 through __pthread_get_minstack.
806 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
807 directly from _rtld_global_ro.
808 (__pthread_get_minstack): New function.
809 * pthreadP.h: Declare __pthread_get_minstack.
810 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
812 2011-12-21 Ulrich Drepper <drepper@gmail.com>
815 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
816 Correct reading name from file.
818 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
820 * allocatestack.c (allocate_stack): Return errno on failure.
822 2011-12-14 Jeff Law <law@redhat.com>
825 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
827 2011-11-28 Andreas Schwab <schwab@redhat.com>
829 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
830 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
831 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
833 2011-11-15 Ulrich Drepper <drepper@gmail.com>
835 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
838 2011-10-29 Ulrich Drepper <drepper@gmail.com>
841 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
842 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
843 path for kernels with FUTEX_CLOCK_REALTIME.
844 Debugged by H.J. Lu <hjl.tools@gmail.com>.
846 2011-10-27 Andreas Schwab <schwab@redhat.com>
849 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
850 for memory synchronization functions.
851 * semaphore.h: Likewise.
853 2011-10-24 Ulrich Drepper <drepper@gmail.com>
855 * tst-cancel7.c: Avoid warning.
856 * tst-mutex6.c: Likewise.
857 * tst-mutex9.c: Likewise.
858 * tst-mutexpi6.c: Likewise.
860 2011-10-23 Ulrich Drepper <drepper@gmail.com>
862 * sysdeps/i386/tls.h: Remove #include <list.h>.
864 2011-10-15 Ulrich Drepper <drepper@gmail.com>
866 * pthread_create.c (start_thread): Call __ctype_init.
868 2011-09-15 Andreas Schwab <schwab@redhat.com>
870 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
872 (list_add): Add atomic_write_barrier.
873 * descr.h: Define __need_list_t before including <list.h>.
874 * nptl-init.c: Include <list.h>
875 * allocatestack.c: Likewise.
877 2011-09-11 Ulrich Drepper <drepper@gmail.com>
879 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
880 * sysdeps/ia64/tls.h: Likewise.
881 * sysdeps/powerpc/tls.h: Likewise.
882 * sysdeps/s390/tls.h: Likewise.
883 * sysdeps/sh/tls.h: Likewise.
884 * sysdeps/sparc/tls.h: Likewise.
885 * sysdeps/x86_64/tls.h: Likewise.
887 2011-09-10 Ulrich Drepper <drepper@gmail.com>
889 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
891 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
893 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
894 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
895 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
896 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
897 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
898 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
899 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
900 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
901 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
902 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
903 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
904 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
906 * tst-tls1.c: Support for __thread is now mandatory.
907 * tst-tls2.c: Likewise.
908 * tst-tls3.c: Likewise.
909 * tst-tls3mod.c: Likewise.
910 * tst-tls4.c: Likewise.
911 * tst-tls4moda.c: Likewise.
912 * tst-tls4modb.c: Likewise.
913 * tst-tls5.h: Likewise.
915 2011-09-08 Ulrich Drepper <drepper@gmail.com>
918 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
919 (pthread_rwlock_timedwrlock): Use correct macro in test.
920 Patch by H.J. Lu <hongjiu.lu@intel.com>.
922 2011-09-06 Ulrich Drepper <drepper@gmail.com>
924 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
925 use gettimeofday vsyscall, just call gettimeofday.
926 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
927 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
928 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
930 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
932 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
933 Simplify __vdso_clock_gettime use.
935 2011-09-05 David S. Miller <davem@davemloft.net>
937 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
939 (sem_timedwait): Call it to force an exception region around
940 the async cancel enable and the futex operation.
941 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
942 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
943 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
944 (__new_sem_wait): Call it to force an exception region around
945 the async cancel enable and the futex operation.
946 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
947 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
949 2011-08-31 Andreas Schwab <schwab@redhat.com>
951 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
954 2011-08-20 David S. Miller <davem@davemloft.net>
956 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
958 2011-08-14 Roland McGrath <roland@hack.frob.com>
960 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
961 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
963 2011-08-08 Andreas Schwab <schwab@redhat.com>
965 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
967 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
970 2011-07-22 Ulrich Drepper <drepper@gmail.com>
972 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
974 (__gcc_personality_v0): Likewise.
975 (_Unwind_ForcedUnwind): Likewise.
976 (_Unwind_GetCFA): Likewise.
978 2011-07-14 Roland McGrath <roland@hack.frob.com>
980 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
983 2011-06-30 Ulrich Drepper <drepper@gmail.com>
985 * nptl-init.c (__nptl_set_robust): New function.
986 (pthread_functions): Add reference.
987 * npthreadP.h: Declare __nptl_set_robust.
988 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
989 ptr_set_robust member.
990 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
991 child if threads are used.
993 2011-06-14 Andreas Jaeger <aj@suse.de>
995 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
997 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1000 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1002 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1005 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1007 Patch partly by Robert Rex <robert.rex@exasol.com>.
1009 2011-01-19 Roland McGrath <roland@redhat.com>
1011 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1012 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1013 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1014 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1015 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1016 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1018 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1020 * Makefile (test-extras): Add tst-cleanup4aux.
1022 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1025 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1026 (__SETXID_2): Likewise.
1027 (__SETXID_3): Likewise.
1029 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1032 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1033 * alloca_cutoff.c: Add libc_hidden_def.
1035 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1038 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1039 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1040 of "struct pthread".
1042 2010-09-21 Andreas Schwab <schwab@redhat.com>
1044 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1045 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1046 (pthread_cleanup_push_defer_np): Likewise.
1048 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1050 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1053 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1054 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1056 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1057 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1059 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1061 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1063 2010-05-01 Alan Modra <amodra@gmail.com>
1065 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1066 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1067 to save temps. Correct cfi for possible later frame manipulation.
1068 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1069 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1070 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1071 (DOCARGS_6, UNDOCARGS_6): Likewise.
1072 (CENABLE, CDISABLE): Add nops for non-shared calls.
1074 2010-07-06 Andreas Schwab <schwab@redhat.com>
1076 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1079 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1081 * tst-abstime.c (do_test): Some more cleanups
1083 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1085 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1087 2010-07-01 Andreas Schwab <schwab@redhat.com>
1088 Ulrich Drepper <drepper@redhat.com>
1090 * Makefile (tests): Add tst-abstime.
1091 * tst-abstime.c: New file.
1092 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1093 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1094 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1095 (__lll_timedlock_wait): Likewise.
1096 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1097 (__lll_robust_timedlock_wait): Likewise.
1098 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1099 (__pthread_cond_timedwait): Likewise.
1100 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1101 (pthread_rwlock_timedrdlock): Likewise.
1102 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1103 (pthread_rwlock_timedwrlock): Likewise.
1104 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1107 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1109 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1111 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1113 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1114 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1116 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1119 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1120 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1121 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1123 * Makefile (libpthread-routines): Add pthread_getname and
1125 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1127 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1129 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1130 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1131 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1132 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1134 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1136 * pthread_cond_timedwait.c: Add check for
1137 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1138 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1141 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1143 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1144 and the call fails wake eventually waiting setxid threads. Don't free
1145 stack here if we try starting a thread.
1146 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1147 if the clone call failed.
1149 2010-03-08 Andreas Schwab <schwab@redhat.com>
1151 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1152 * allocatestack.c (get_cached_stack): Set setxid_futex.
1153 (allocate_stack): Likewise.
1155 2010-03-05 Andreas Schwab <schwab@redhat.com>
1156 Ulrich Drepper <drepper@redhat.com>
1158 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1159 it is creating a thread or it is just being created.
1160 * pthread_create.c (start_thread): Wake setxid thread if it is
1162 (__pthread_create_2_1): Initialize setxid_futex.
1163 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1166 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1168 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1170 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1172 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1174 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1175 Fix pthread_cond_timedwait with requeue-PI.
1176 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1177 Fix pthread_cond_wait with requeue-PI.
1179 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1181 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1182 and pthread_mutexattr_setrobust for GLIBC_2.12.
1183 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1184 * pthread_mutexattr_getrobust.c: Define alias
1185 pthread_mutexattr_getrobust.
1186 * pthread_mutexattr_setrobust.c: Define alias
1187 pthread_mutexattr_setrobust.
1189 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1191 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1193 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1195 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1197 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1199 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1200 call __gmon_start__.
1201 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1203 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1205 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1208 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1210 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1211 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1212 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1213 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1214 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1215 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1216 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1217 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1219 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1221 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1222 Don't update nwaiters after invalid timeout is recognized.
1224 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1226 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1229 2009-11-27 Andreas Schwab <schwab@redhat.com>
1231 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1232 THREAD_SELF->cancelhandling after returning from futex call.
1234 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1236 * tst-sem13.c: New file.
1237 * Makefile (tests): Add tst-sem13.
1239 2009-11-22 Roland McGrath <roland@redhat.com>
1241 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1242 instead of recapitulating its contents.
1244 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1246 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1247 optimizations and cleanups.
1249 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1251 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1252 Remove redundant code. Fix cfi offsets.
1253 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1256 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1258 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1259 reduce size of unwind info.
1261 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1264 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1266 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1269 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1271 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1273 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1275 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1278 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1279 steps to avoid races with creation and terminations.
1280 * nptl-init.c (sighandler_setxid): Adjust.
1281 Patch by Daniel Jacobowitz.
1283 2009-09-07 Andreas Schwab <schwab@redhat.com>
1285 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1287 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1288 Joseph Myers <joseph@codesourcery.com>
1291 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1292 Initialize the sigev_notify field for newly created timer to make sure
1293 the timer gets deleted from the active timer's list upon timer_delete.
1295 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1297 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1298 Correct a logic error.
1300 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1302 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1303 of the field in local variables.
1304 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1305 variable and don't unconditionally clear it.
1307 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1309 * pthread_create.c (start_thread): Hint to the kernel that memory for
1310 the stack can be reused. We do not mark all the memory. The part
1311 still in use and some reserve are kept.
1313 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1315 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1317 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1319 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1322 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1324 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1326 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1328 2009-08-10 Andreas Schwab <schwab@redhat.com>
1330 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1331 (__pthread_cond_signal): Don't clobber register used for syscall
1334 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1336 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1337 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1339 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1340 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1343 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1345 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1346 enabled by the special *_asynccancel functions.
1347 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1350 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1352 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1354 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1355 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1356 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1357 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1358 since we can assume the special __*_{en,dis}able_asynccancel
1360 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1361 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1362 and PTHREAD_CANCELED.
1364 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1366 * descr.h: Better definition of *_BITMASK macros for cancellation.
1368 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1370 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1372 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1373 dynamic linker might have to save.
1374 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1375 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1378 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1380 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1382 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1384 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1385 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1386 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1387 requeue_pi for robust mutexes.
1388 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1389 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1390 Don't only skip __pthread_mutex_cond_lock. Call instead
1391 __pthread_mutex_cond_lock_adjust.
1392 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1394 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1395 optimization of PI mutex handling.
1397 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1400 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1401 instead of of _acq variants of cmpxchg.
1403 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1405 * sysdeps/x86_64/configure.in: New file.
1407 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1408 path when not using absolute timeout futex.
1410 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1412 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1413 optimizations of last changes.
1414 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1416 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1418 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1419 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1421 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1422 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1423 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1424 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1425 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1427 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1428 (__pthread_cond_timedwait): Make more robust.
1430 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1432 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1433 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1434 directly use absolute timeout.
1436 * tst-sem5.c (do_test): Add test for premature timeout.
1437 * Makefile: Linu tst-sem5 with librt.
1439 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1440 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1441 directly use absolute timeout.
1442 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1443 (pthread_rwlock_timedrdlock): Likewise.
1445 * tst-cond11.c (run_test): Add test to check that the timeout is
1448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1449 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1450 directly use absolute timeout.
1452 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1453 (__pthread_cond_wait): Convert to using exception handler instead of
1454 registered unwind buffer.
1455 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1456 (__pthread_cond_timedwait): Likewise.
1458 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1460 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1461 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1462 use absolute timeout.
1464 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1465 handling of uncontested semaphore.
1467 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1468 (__condvar_cleanup): Rewrite to use cfi directives instead of
1469 hand-coded unwind tables.
1470 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1472 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1473 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1476 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1478 * Makefile (libpthread-routines): Add pthread_sigqueue.
1479 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1480 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1481 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1483 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1486 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1487 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1489 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1491 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1493 * libc-cancellation.c: Move __libc_cleanup_routine to...
1494 * libc-cleanup.c: ...here. New file.
1495 * Makefile (routines): Add libc-cleanup.
1497 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1499 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1500 * sysdeps/pthread/librt-cancellation.c: Likewise.
1503 * nptl-init.c: Renamed from init.c.
1504 * Makefile: Change all occurences of init.c to nptl-init.c.
1506 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1508 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1509 to test when deciding on the delay.
1510 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1511 * pthread_cancel.c: Close race between deciding on sending a signal
1512 and setting the CANCELING_BIT bit.
1514 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1516 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1518 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1520 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1522 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1523 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1524 * sysdeps/i386/tls.h: Likewise.
1525 (tcbhead_t): Add __private_tm member.
1527 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1529 * sem_open.c (sem_open): Rewrite initialization of initsem to
1532 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1533 Avoid warning by using may_alias attribute on ptrhack.
1535 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1538 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1539 Check policy and priority for validity.
1540 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1542 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1544 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1545 (__pthread_cond_timedwait): Change to use cfi directives instead of
1546 hand-coded unwind sections.
1548 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1550 * init.c (nptl_freeres): Compile only for SHARED.
1552 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1554 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1555 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1556 FUTEX_BITSET_MATCH_ANY.
1558 2009-02-27 Roland McGrath <roland@redhat.com>
1560 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1561 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1563 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1565 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1566 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1567 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1570 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1572 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1575 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1577 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1578 Unify name of include protector macro.
1580 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1582 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1583 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1585 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1587 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1590 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1591 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1592 * init.c (nptl_freeres): New function.
1593 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1594 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1595 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1597 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1598 load DSO. Assign last.
1599 (__unwind_freeres): New function.
1601 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1602 for better debugging. No need to use stack_list_add here.
1604 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1606 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1607 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1608 instead of computing relative timeout.
1609 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1610 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1612 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1614 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1616 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1618 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1619 (list_add_tail): Removed.
1621 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1623 * (in_flight_stack): New variable.
1624 (stack_list_del): New function. Use instead of list_del.
1625 (stack_list_add): New function. Use instead of list_add when adding to
1626 stack_cache and stack_used lists.
1627 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1628 when the fork call interrupted another thread.
1630 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1632 * init.c (__pthread_initialize_minimal_internal): Optimize test
1633 FUTEX_CLOCK_REALTIME a bit.
1635 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1637 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1638 only passing five parameters to FUTEX_WAIT_BITSET call.
1640 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1641 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1642 instead of computing relative timeout.
1644 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1646 * init.c (__pthread_initialize_minimal_internal): Check for
1647 FUTEX_CLOCK_REALTIME flag.
1648 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1649 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1652 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1653 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1654 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1655 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1656 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1657 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1659 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1661 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1662 loop body instead of ; to avoid gcc warnings.
1663 (pthread_cleanup_pop_restore_np): Likewise.
1664 Patch by Caolán McNamara <caolanm@redhat.com>.
1666 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1668 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1669 fast path here, for robust/PI/PP mutexes call
1670 __pthread_mutex_lock_full. Don't use switch, instead use a series
1671 of ifs according to their probability.
1672 (__pthread_mutex_lock_full): New function.
1673 * pthread_mutex_unlock.c: Include assert.h.
1674 (__pthread_mutex_unlock_usercnt): Handle only the
1675 fast path here, for robust/PI/PP mutexes call
1676 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1677 of ifs according to their probability.
1678 (__pthread_mutex_unlock_full): New function.
1679 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1680 (__pthread_mutex_lock_full): Define.
1682 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1684 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1685 implementation. Add necessary padding and.
1686 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1689 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1691 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1692 and FUTEX_WAKE_BITSET.
1694 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1696 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1697 and FUTEX_WAKE_BITSET.
1698 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1699 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1700 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1701 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1703 2008-11-25 Roland McGrath <roland@redhat.com>
1705 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1706 Subdirectories moved to ports repository as
1707 sysdeps/.../nptl subdirectories.
1709 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1712 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1714 * pthread_cond_init.c (__pthread_cond_init): Fix
1715 cond->__data.__nwaiters initialization.
1716 * Makefile (tests): Add tst-cond23.
1717 * tst-cond23.c: New test.
1719 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1721 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1723 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1726 2008-11-01 Ulrich Drepper <drepper@redhat.com>
1729 * pthread_mutex_lock.c: Add support for private PI mutexes.
1730 * pthread_mutex_timedlock.c: Likewise.
1731 * pthread_mutex_trylock.c: Likewise.
1732 * pthread_mutex_unlock.c: Likewise.
1733 Patch mostly by Ben Jackson <ben@ben.com>.
1735 2008-10-31 Ulrich Drepper <drepper@redhat.com>
1738 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1739 Increase stack size for helper thread.
1741 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1743 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1744 assembly with a clobber list for access registers a0 and a1.
1746 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1748 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1749 to force runp->refcntr to be read from memory.
1751 2008-09-08 Richard Guenther <rguenther@suse.de>
1753 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1754 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1755 lll_timedlock, lll_robust_timedlock, lll_unlock,
1756 lll_robust_unlock): Promote private to int.
1758 2008-08-15 Ulrich Drepper <drepper@redhat.com>
1760 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1761 ARCH_RETRY_MMAP definitions.
1762 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1763 Define MAP_STACK when not defined.
1764 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1765 handling of ARCH_RETRY_MMAP.
1767 2008-07-30 Ulrich Drepper <drepper@redhat.com>
1769 * tst-align2.c (f): Print message that f is reached.
1771 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1774 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1775 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1777 2008-07-25 Ulrich Drepper <drepper@redhat.com>
1779 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1780 SOCK_CLOEXEC if possible.
1782 2008-05-29 Ulrich Drepper <drepper@redhat.com>
1784 * Makefile (tests): Add tst-rwlock2a.
1785 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1786 * tst-rwlock2a.c: New file.
1788 2008-06-12 Ulrich Drepper <drepper@redhat.com>
1790 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1792 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1794 * sysdeps/pthread/pthread.h: Fix typo in comment.
1796 2008-05-28 Ulrich Drepper <drepper@redhat.com>
1798 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1799 of CPU set to the kernel.
1801 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1803 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1805 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1806 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1807 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1808 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1809 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1810 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1812 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1814 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1816 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1818 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1820 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1823 2008-05-26 Ulrich Drepper <drepper@redhat.com>
1825 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1827 2008-05-20 Jakub Jelinek <jakub@redhat.com>
1829 David S. Miller <davem@davemloft.net>
1831 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1833 2008-05-10 Ulrich Drepper <drepper@redhat.com>
1835 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1836 __pshared correctly.
1837 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1839 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1841 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1843 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1845 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1847 2008-04-14 David S. Miller <davem@davemloft.net>
1849 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1850 (__old_sem_wait): Fix argument to lll_futex_wait().
1852 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1854 * pthread_create.c: Require pthread_mutex_trylock and
1855 pthread_key_delete for libgcc.
1857 2008-04-08 Jakub Jelinek <jakub@redhat.com>
1860 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1861 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1862 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1864 2008-03-27 Ulrich Drepper <drepper@redhat.com>
1866 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1867 <linux/limits.h> has defined it.
1868 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1869 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1870 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1871 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1873 2008-03-18 Jakub Jelinek <jakub@redhat.com>
1875 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1877 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1878 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1880 2008-03-14 Ulrich Drepper <drepper@redhat.com>
1882 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1883 HAVE_DL_DISCOVER_OSVERSION.
1884 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1885 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1887 2008-03-07 Ulrich Drepper <drepper@redhat.com>
1890 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1891 _POSIX_CHOWN_RESTRICTED value to zero.
1893 2008-01-31 Roland McGrath <roland@redhat.com>
1895 * Makefile (omit-deps): Variable removed.
1897 2008-01-30 Ulrich Drepper <drepper@redhat.com>
1899 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1900 unnecessary addr32 prefix.
1902 2008-01-29 Roland McGrath <roland@redhat.com>
1904 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1906 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1908 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1910 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1912 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1914 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1915 (__lll_lock_wait_private): Fix typo.
1916 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1917 (pthread_barrier_wait): Likewise. Adjust XADD use.
1918 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1920 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1921 (pthread_rwlock_timedrdlock): Return correct return value.
1922 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1923 (pthread_rwlock_timedwrlock): Likewise.
1925 2008-01-15 Ulrich Drepper <drepper@redhat.com>
1927 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1928 thread returns the program exits with an error code.
1930 2008-01-10 Ulrich Drepper <drepper@redhat.com>
1932 * pthread-errnos.sym: Add EOVERFLOW.
1933 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1934 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1935 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1936 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1938 2007-12-14 Ulrich Drepper <drepper@redhat.com>
1940 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1941 parameter. Passed it as permission to mmap.
1942 * allocatestack.c (allocate_stack): Pass prot as second parameter
1945 2007-12-12 Ulrich Drepper <drepper@redhat.com>
1947 * tst-basic7.c: Allocate memory for the stack.
1950 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1951 (__pthread_cond_timedwait): Don't use VDSO.
1952 Patch by Michal Januszewski.
1954 2007-12-07 Ulrich Drepper <drepper@redhat.com>
1957 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1958 Allow label before pthread_cleanup_pop.
1959 (pthread_cleanup_pop_restore_np): Likewise.
1961 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1963 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1964 Store 2 before returning ETIMEDOUT.
1966 2007-11-23 Ulrich Drepper <drepper@redhat.com>
1968 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1969 Store 2 before returning ETIMEDOUT.
1970 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1971 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1972 (__lll_lock_wait_private): Optimize.
1973 (__lll_lock_wait): Likewise.
1975 2007-11-20 Jakub Jelinek <jakub@redhat.com>
1977 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1978 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1979 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1981 2007-11-08 Ulrich Drepper <drepper@redhat.com>
1984 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1985 If we time out, try one last time to lock the futex to avoid
1986 losing a wakeup signal.
1987 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1988 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1991 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1994 2007-11-07 Ulrich Drepper <drepper@redhat.com>
1997 * allocatestack.c (allocate_stack): Change ENOMEM error in case
1998 mmap failed to EAGAIN.
1999 * Makefile (tests): Add tst-basic7.
2000 * tst-basic7.c: New file.
2002 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2004 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2005 Use __linkin_atfork.
2007 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2009 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2010 missing line continuations.
2011 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2012 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2014 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2017 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2018 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2019 (struct timer): Add next element.
2020 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2021 enqueue timer structure into __active_timer_sigev_thread list.
2022 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2023 remove timer struct from __active_timer_sigev_thread.
2024 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2025 Before using timer structure make sure it is still on the
2026 __active_timer_sigev_thread list. Keep lock until done.
2027 Define __active_timer_sigev_thread and
2028 __active_timer_sigev_thread_lock.
2030 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2032 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2033 Redefine thread_atfork for use of ATFORK_MEM.
2034 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2035 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2037 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2038 Use atomic operation when removing first element of list.
2040 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2042 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2043 routine instead of an alias to __new_sem_post.
2045 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2047 * init.c (__pthread_initialize_minimal): Initialize word to appease
2050 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2052 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2053 libc.so just clear NAME.
2054 (__libc_rwlock_fini): Nop inside of libc.so.
2055 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2058 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2060 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2061 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2063 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2065 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2068 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2069 reclaimed stack if necessary.
2070 * Makefile (tests): Add tst-tsd6.
2071 * tst-tsd6.c: New file.
2073 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2075 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2076 Add private argument.
2078 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2080 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2081 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2083 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2085 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2086 (__lll_robust_timedlock): Pass private as last argument to
2087 __lll_robust_timedlock_wait.
2088 (__lll_unlock): Fix a pasto.
2090 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2092 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2093 sparc_old_sem): New structs.
2094 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2095 (__sem_wait_cleanup): New function.
2096 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2097 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2098 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2100 (__old_sem_wait): New function.
2101 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2102 nptl/sysdeps/unix/sysv/linux/sparc version.
2103 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2105 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2106 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2107 (__new_sem_trywait): Use sparc_old_sem structure.
2108 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2109 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2110 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2111 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2112 lll_futex_timed_wait.
2113 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2114 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2115 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2117 (__old_sem_post): New function.
2118 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2119 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2120 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2121 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2122 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2123 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2125 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2127 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2128 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2129 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2130 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2131 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2132 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2133 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2135 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2136 kernel-features.h and tcb-offsets.h.
2137 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2138 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2140 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2142 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2143 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2145 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2146 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2147 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2148 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2149 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2150 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2151 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2153 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2155 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2156 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2157 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2158 lll_futex_timed_wait.
2160 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2161 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2162 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2163 __lll_robust_unlock, __lll_wait_tid): Likewise.
2165 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2167 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2169 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2170 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2171 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2172 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2173 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2174 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2175 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2176 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2178 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2179 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2180 process private. Switch DW_CFA_advance_loc1 and some
2181 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2183 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2184 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2185 process private. Switch DW_CFA_advance_loc{1,2} and some
2186 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2187 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2188 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2189 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2191 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2192 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2193 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2195 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2196 (__pthread_cond_broadcast): Compare %r8 instead of
2197 dep_mutex-cond_*(%rdi) with $-1.
2198 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2199 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2202 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2204 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2206 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2208 * allocatestack.c: Include kernel-features.h.
2209 * pthread_create.c: Likewise.
2210 * pthread_mutex_init.c: Likewise.
2212 * pthread_cond_timedwait.c: Likewise.
2213 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2214 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2215 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2216 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2217 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2218 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2219 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2221 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2223 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2224 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2225 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2226 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2228 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2230 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2231 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2232 byte elements. One of them is the new __shared element.
2233 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2234 adjust names of other padding elements.
2235 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2236 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2237 byte elements. One of them is the new __shared element.
2238 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2239 adjust names of other padding elements.
2240 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2241 Renamed __pad1 element to __shared, adjust names of other padding
2243 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2244 (pthread_rwlock_t): Likewise.
2245 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2248 2007-08-09 Anton Blanchard <anton@samba.org>
2250 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2252 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2254 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2255 <kernel-features.h>.
2256 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2258 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2260 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2261 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2262 dealing with robust mutexes.
2263 * pthread_mutex_timedlock.c: Likewise.
2264 * pthread_mutex_trylock.c: Likewise.
2265 * pthread_mutex_unlock.c: Likewise.
2266 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2268 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2270 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2271 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2272 (PTHREAD_MUTEX_PSHARED): Define.
2273 * pthread_mutex_init.c (__pthread_mutex_init): Set
2274 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2276 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2277 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2278 as second argument to lll_lock.
2279 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2280 instead of its __data.__lock field.
2281 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2282 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2284 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2285 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2286 instead of mutex->__data.__kind directly, pass
2287 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2288 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2289 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2290 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2291 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2292 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2293 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2294 of mutex->__data.__kind directly.
2295 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2296 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2297 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2298 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2299 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2300 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2302 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2303 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2304 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2306 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2307 Take mutex as argument instead of its __data.__lock field, pass
2308 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2309 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2310 __data.__lock field.
2311 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2312 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2313 to lll_robust_cond_lock.
2314 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2315 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2316 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2317 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2318 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2319 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2321 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2322 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2324 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2325 pshared variable, pass it to lll_lock, lll_unlock,
2326 lll_futex_timedwait and lll_futex_wake.
2327 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2328 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2330 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2331 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2333 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2334 lll_futex_wake_unlock): Likewise.
2335 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2337 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2338 lll_futex_wake_unlock): Likewise.
2339 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2341 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2342 lll_futex_wake_unlock): Likewise.
2343 (lll_futex_wake): Fix a typo.
2344 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2345 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2346 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2347 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2348 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2349 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2350 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2351 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2353 (__pthread_cond_timedwait): Likewise.
2354 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2355 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2357 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2359 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2360 Don't use CGOTSETUP and CGOTRESTORE macros.
2361 (CGOTSETUP, CGOTRESTORE): Remove.
2362 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2365 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2367 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2368 definitions for private futexes.
2369 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2370 kernel-features.h and lowlevellock.h. Use private futexes if
2372 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2373 (__lll_mutex_lock_wait): Rename to
2374 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2375 (__lll_mutex_timedlock_wait): Rename to ...
2376 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2377 Don't compile in for libc.so.
2378 (__lll_mutex_unlock_wake): Rename to ...
2379 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2380 (__lll_timedwait_tid): Use __NR_gettimeofday.
2381 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2382 the header from assembler. Renamed all lll_mutex_* resp.
2383 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2384 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2385 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2387 (__lll_lock_wait_private): Add prototype.
2388 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2389 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2390 __lll_unlock_wake): Likewise.
2391 (lll_lock): Add private argument. Call __lll_lock_wait_private
2392 if private is constant LLL_PRIVATE.
2393 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2394 lll_timedlock, lll_robust_timedlock): Add private argument.
2395 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2396 if private is constant LLL_PRIVATE.
2397 (lll_robust_unlock, lll_robust_dead): Add private argument.
2398 (lll_lock_t): Remove.
2399 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2400 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2401 lll_cond_wake, lll_cond_broadcast): Remove.
2402 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2403 kernel-features.h and lowlevellock.h.
2404 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2405 (LOAD_FUTEX_WAIT): Define.
2406 (__lll_robust_mutex_lock_wait): Rename to ...
2407 (__lll_robust_lock_wait): ... this. Add private argument.
2408 Use LOAD_FUTEX_WAIT macro.
2409 (__lll_robust_mutex_timedlock_wait): Rename to ...
2410 (__lll_robust_timedlock_wait): ... this. Add private argument.
2411 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2412 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2414 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2415 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2416 __lll_mutex_{lock,unlock}_*.
2417 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2418 lowlevellock.h and pthread-errnos.h.
2419 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2420 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2421 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2422 __lll_mutex_{lock,unlock}_*.
2423 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2424 lowlevellock.h and pthread-errnos.h.
2425 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2426 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2427 __lll_mutex_{lock,unlock}_*.
2428 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2430 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2431 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2432 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2433 (__condvar_tw_cleanup): Likewise.
2434 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2436 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2437 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2438 __lll_mutex_{lock,unlock}_*.
2439 ( __condvar_w_cleanup): Likewise.
2440 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2441 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2442 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2444 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2445 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2446 __lll_mutex_{lock,unlock}_*.
2447 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2449 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2450 FUTEX_PRIVATE_FLAG): Remove.
2451 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2452 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2453 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2455 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2456 FUTEX_PRIVATE_FLAG): Remove.
2457 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2458 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2459 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2461 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2462 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2463 __lll_mutex_{lock,unlock}_*.
2464 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2466 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2467 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2468 __lll_mutex_{lock,unlock}_*.
2469 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2470 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2471 (__new_sem_post): Use standard initial exec code sequences.
2472 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2474 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2475 FUTEX_PRIVATE_FLAG): Remove.
2476 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2477 exec code sequences.
2478 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2479 (__new_sem_trywait): Use standard initial exec code sequences.
2480 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2481 (__new_sem_wait): Use standard initial exec code sequences.
2483 2007-07-31 Anton Blanchard <anton@samba.org>
2485 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2486 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2487 atomic_full_barrier.
2489 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2491 * allocatestack.c (stack_cache_lock): Change type to int.
2492 (get_cached_stack, allocate_stack, __deallocate_stack,
2493 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2494 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2495 as second argument to lll_lock and lll_unlock macros on
2497 * pthread_create.c (__find_in_stack_list): Likewise.
2498 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2499 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2501 * descr.h (struct pthread): Change lock and setxid_futex field
2503 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2504 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2505 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2506 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2508 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2509 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2510 * pthreadP.h (__attr_list_lock): Change type to int.
2511 * pthread_attr_init.c (__attr_list_lock): Likewise.
2512 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2513 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2515 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2516 also for lll_futex_{wake,wait}.
2517 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2519 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2520 LLL_SHARED as second argument to lll_{,un}lock.
2521 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2522 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2523 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2524 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2526 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2527 as second argument to lll_{,un}lock macros on pd->lock.
2528 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2529 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2530 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2531 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2533 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2535 * pthread_once.c (once_lock): Change type to int.
2536 (__pthread_once): Pass LLL_PRIVATE as second argument to
2537 lll_{,un}lock macros on once_lock.
2538 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2539 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2540 rwlock->__data.__shared as second argument to them and similarly
2542 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2544 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2546 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2547 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2548 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2549 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2550 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2551 to lll_{,un}lock macros on __sem_mappings_lock.
2552 * sem_open.c (check_add_mapping): Likewise.
2553 (__sem_mappings_lock): Change type to int.
2554 * semaphoreP.h (__sem_mappings_lock): Likewise.
2555 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2556 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2557 instead of lll_*mutex_*, pass LLL_SHARED as last
2559 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2560 pass LLL_SHARED as last argument.
2561 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2562 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2563 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2564 pass LLL_SHARED as last argument.
2565 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2566 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2567 LLL_SHARED as last argument.
2568 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2569 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2571 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2572 __libc_lock_lock_recursive, __libc_lock_unlock,
2573 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2574 argument to lll_{,un}lock.
2575 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2576 _IO_lock_unlock): Likewise.
2577 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2579 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2580 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2582 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2583 free_mem): Likewise.
2584 (__fork_lock): Change type to int.
2585 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2586 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2587 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2589 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2590 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2591 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2593 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2594 pass it through to lll_futex_*wait, only compile in when
2596 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2597 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2598 argument and pass it through to lll_futex_*wait.
2599 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2600 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2601 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2602 inline functions to __lll_* resp. __lll_robust_*.
2603 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2604 (lll_mutex_dead): Add private argument.
2605 (__lll_lock_wait_private): New prototype.
2606 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2607 __lll_robust_lock_timedwait): Add private argument to prototypes.
2608 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2609 call __lll_lock_wait_private, otherwise pass private to
2611 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2612 __lll_robust_timedlock): Add private argument, pass it to
2613 __lll_*wait functions.
2614 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2615 call __lll_unlock_wake_private, otherwise pass private to
2617 (__lll_robust_unlock): Add private argument, pass it to
2618 __lll_robust_unlock_wake.
2619 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2620 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2621 argument, pass it through to __lll_* inline function.
2622 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2623 (lll_lock_t): Remove.
2624 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2625 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2626 lll_cond_wake, lll_cond_broadcast): Remove.
2627 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2628 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2629 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2630 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2631 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2632 the header from assembler. Renamed all lll_mutex_* resp.
2633 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2634 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2635 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2636 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2637 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2638 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2639 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2641 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2642 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2643 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2644 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2645 MULTIPLE_THREADS_OFFSET as another asm operand.
2646 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2647 MULTIPLE_THREADS_OFFSET as last asm operand, call
2648 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2649 otherwise pass private as another argument to __lll_lock_wait.
2650 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2651 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2652 private as another argument to __lll_*lock_wait call.
2653 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2654 MULTIPLE_THREADS_OFFSET as another asm operand, call
2655 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2656 otherwise pass private as another argument to __lll_unlock_wake.
2657 (lll_robust_unlock): Add private argument, pass private as another
2658 argument to __lll_unlock_wake.
2659 (lll_robust_dead): Add private argument, use __lll_private_flag
2661 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2662 LLL_MUTEX_LOCK_INITIALIZER.
2663 (lll_lock_t): Remove.
2664 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2665 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2666 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2667 lll_cond_wake, lll_cond_broadcast): Remove.
2668 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2669 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2670 2007-05-2{3,9} changes.
2671 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2672 kernel-features.h and lowlevellock.h.
2673 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2674 (LOAD_FUTEX_WAIT): Rewritten.
2675 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2677 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2678 (__lll_mutex_lock_wait): Rename to ...
2679 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2680 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2681 (__lll_mutex_timedlock_wait): Rename to ...
2682 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2683 contains private argument. Don't compile in for libc.so.
2684 (__lll_mutex_unlock_wake): Rename to ...
2685 (__lll_unlock_wake): ... this. %ecx contains private argument.
2686 Don't compile in for libc.so.
2687 (__lll_timedwait_tid): Use __NR_gettimeofday.
2688 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2689 kernel-features.h and lowlevellock.h.
2690 (LOAD_FUTEX_WAIT): Define.
2691 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2693 (__lll_robust_mutex_lock_wait): Rename to ...
2694 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2695 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2697 (__lll_robust_mutex_timedlock_wait): Rename to ...
2698 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2699 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2700 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2702 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2703 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2704 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2705 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2706 to __lll_lock_wait in %edx.
2707 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2708 Include lowlevellock.h and pthread-errnos.h.
2709 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2710 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2711 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2712 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2713 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2715 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2716 Include lowlevellock.h and pthread-errnos.h.
2717 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2718 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2719 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2720 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2721 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2723 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2724 Include lowlevellock.h.
2725 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2727 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2728 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2729 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2730 __lll_unlock_wake. Use __NR_gettimeofday.
2731 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2732 Include lowlevellock.h.
2733 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2734 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2735 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2736 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2737 and __lll_unlock_wake.
2738 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2739 Include lowlevellock.h.
2740 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2741 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2742 MUTEX(%ebx) address in %edx rather than %ecx to
2743 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2744 and __lll_unlock_wake. Move return value from %ecx to %edx
2746 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2747 Include lowlevellock.h.
2748 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2750 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2751 MUTEX(%ebp) address in %edx rather than %ecx to
2752 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2753 and __lll_unlock_wake. Move return value from %ecx to %edx
2754 register. Use __NR_gettimeofday.
2755 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2756 Include lowlevellock.h.
2757 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2759 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2760 MUTEX(%ebp) address in %edx rather than %ecx to
2761 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2762 and __lll_unlock_wake. Move return value from %ecx to %edx
2763 register. Use __NR_gettimeofday.
2764 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2765 Include lowlevellock.h.
2766 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2767 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2768 MUTEX(%edi) address in %edx rather than %ecx to
2769 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2770 and __lll_unlock_wake.
2771 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2772 Include lowlevellock.h.
2773 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2774 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2775 MUTEX(%ebx) address in %edx rather than %ecx to
2776 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2777 and __lll_unlock_wake. Move return value from %ecx to %edx
2779 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2781 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2783 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2784 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2785 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2787 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2788 (sem_timedwait): Use __NR_gettimeofday.
2789 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2791 (LOCK): Don't define.
2792 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2794 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2795 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2797 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2798 2007-05-2{3,9} changes.
2799 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2800 kernel-features.h and lowlevellock.h.
2801 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2802 (LOAD_FUTEX_WAIT): Rewritten.
2803 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2804 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2805 (__lll_mutex_lock_wait): Rename to ...
2806 (__lll_lock_wait): ... this. %esi is now private argument.
2807 Don't compile in for libc.so.
2808 (__lll_mutex_timedlock_wait): Rename to ...
2809 (__lll_timedlock_wait): ... this. %esi contains private argument.
2810 Don't compile in for libc.so.
2811 (__lll_mutex_unlock_wake): Rename to ...
2812 (__lll_unlock_wake): ... this. %esi contains private argument.
2813 Don't compile in for libc.so.
2814 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2815 kernel-features.h and lowlevellock.h.
2816 (LOAD_FUTEX_WAIT): Define.
2817 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2818 (__lll_robust_mutex_lock_wait): Rename to ...
2819 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2820 Use LOAD_FUTEX_WAIT macro.
2821 (__lll_robust_mutex_timedlock_wait): Rename to ...
2822 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2823 private, use LOAD_FUTEX_WAIT macro.
2824 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2826 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2827 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2828 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2829 __lll_lock_wait and __lll_unlock_wake.
2830 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2831 Include lowlevellock.h and pthread-errnos.h.
2832 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2833 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2834 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2835 pass LLL_SHARED in %esi to both __lll_lock_wait and
2837 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2838 Include lowlevellock.h and pthread-errnos.h.
2839 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2840 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2841 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2842 pass LLL_SHARED in %esi to both __lll_lock_wait and
2844 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2845 Include lowlevellock.h.
2846 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2847 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2848 pass LLL_SHARED in %esi to both __lll_lock_wait and
2850 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2851 Include lowlevellock.h.
2852 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2853 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2854 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2855 and __lll_unlock_wake.
2856 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2857 Include lowlevellock.h.
2858 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2860 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2861 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2862 and __lll_unlock_wake.
2863 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2864 Include lowlevellock.h.
2865 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2867 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2868 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2869 and __lll_unlock_wake.
2870 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2871 Include lowlevellock.h.
2872 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2874 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2875 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2876 and __lll_unlock_wake.
2877 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2878 Include lowlevellock.h.
2879 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2881 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2882 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2883 and __lll_unlock_wake.
2884 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2885 Include lowlevellock.h.
2886 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2888 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2889 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2890 and __lll_unlock_wake.
2891 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2893 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2895 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2896 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2897 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2899 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2900 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2902 (LOCK): Don't define.
2903 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2905 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2906 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2907 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2908 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2909 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2910 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2911 (__lll_lock_wait_private): New function.
2912 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2913 it to lll_futex_*wait. Don't compile in for libc.so.
2914 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2916 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2917 (struct sparc_pthread_barrier): Remove.
2918 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2919 struct sparc_pthread_barrier. Pass
2920 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2921 and lll_futex_wait macros.
2922 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2924 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2925 Include sparc pthread_barrier_wait.c instead of generic one.
2927 2007-07-30 Jakub Jelinek <jakub@redhat.com>
2929 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2931 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2932 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2934 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2935 (pthread_rwlock_timedwrlock): Likewise.
2936 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2937 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2939 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2941 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2943 2007-07-26 Jakub Jelinek <jakub@redhat.com>
2945 * tst-locale2.c (useless): Add return statement.
2947 2007-07-24 Jakub Jelinek <jakub@redhat.com>
2949 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2950 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2951 * pthread_create.c (start_thread): Likewise.
2952 * init.c (sighandler_setxid): Likewise.
2953 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2954 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2955 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2956 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2957 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2958 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2959 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2960 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2961 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2963 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2965 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2967 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2968 __rtld_notify): Likewise.
2969 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2970 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2971 __pthread_once): Likewise.
2972 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2973 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2974 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2975 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2976 (lll_futex_wait): Add private argument, define as wrapper around
2977 lll_futex_timed_wait.
2978 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2979 use __lll_private_flag macro.
2980 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2981 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2982 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2983 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2984 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2985 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2986 (lll_futex_wait): Add private argument, define as wrapper around
2987 lll_futex_timed_wait.
2988 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2989 use __lll_private_flag macro.
2990 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2991 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2992 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2994 (lll_futex_timed_wait, lll_futex_wake): Use it.
2995 (lll_private_futex_wait, lll_private_futex_timed_wait,
2996 lll_private_futex_wake): Removed.
2997 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2998 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2999 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3000 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3001 (lll_futex_wait): Add private argument, define as wrapper around
3002 lll_futex_timed_wait.
3003 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3004 use __lll_private_flag macro.
3005 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3006 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3008 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3009 (lll_private_futex_wait, lll_private_futex_timed_wait,
3010 lll_private_futex_wake): Removed.
3011 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3012 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3013 (lll_private_futex_wait, lll_private_futex_timed_wait,
3014 lll_private_futex_wake): Removed.
3015 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3016 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3017 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3018 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3019 (lll_futex_wait): Add private argument, define as wrapper around
3020 lll_futex_timed_wait.
3021 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3022 use __lll_private_flag macro.
3023 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3024 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3026 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3028 (lll_futex_timed_wait, lll_futex_wake): Use it.
3029 (lll_private_futex_wait, lll_private_futex_timed_wait,
3030 lll_private_futex_wake): Removed.
3032 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3034 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3035 of the structure for sparc32.
3037 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3039 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3041 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3043 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3044 code used when private futexes are assumed.
3045 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3048 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3050 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3051 (__lll_private_flag): Define.
3052 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3053 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3055 (lll_private_futex_wait, lll_private_futex_timedwait,
3056 lll_private_futex_wake): Define as wrapper around non-_private
3058 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3059 (__lll_private_flag): Define.
3060 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3061 (lll_private_futex_wait, lll_private_futex_timedwait,
3062 lll_private_futex_wake): Define as wrapper around non-_private
3065 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3067 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3068 parameter to lll_futex_wait call.
3069 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3071 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3072 Replace lll_futex_wait with lll_private_futex_wait.
3073 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3074 Add LLL_SHARED parameter to lll_futex_wake().
3076 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3077 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3078 lll_private_futex_wake.
3079 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3080 bit from private parm before syscall.
3081 (lll_futex_timed_wait): Likewise.
3082 (lll_futex_wake): Likewise.
3083 (lll_futex_wake_unlock): Likewise.
3084 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3085 (lll_robust_mutex_unlock): Likewise.
3086 (lll_mutex_unlock_force): Likewise.
3087 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3089 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3091 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3092 compilation when unconditionally using private futexes.
3093 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3094 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3096 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3097 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3099 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3101 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3104 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3106 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3109 2007-05-16 Roland McGrath <roland@redhat.com>
3111 * init.c (__nptl_initial_report_events): New variable.
3112 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3115 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3117 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3118 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3120 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3122 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3125 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3127 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3128 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3129 * pthread_mutex_timedlock.c: Likewise.
3130 * pthread_mutex_trylock.c: Likewise.
3131 * pthread_mutex_unlock.c: Likewise.
3133 2007-06-17 Andreas Schwab <schwab@suse.de>
3135 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3138 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3140 * allocatestack.c (allocate_stack): Make code compile if
3141 __ASSUME_PRIVATE_FUTEX is set.
3143 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3145 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3146 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3147 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3148 (__pthread_rwlock_wrlock): Likewise.
3149 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3150 (pthread_rwlock_timedrdlock): Likewise.
3151 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3152 (pthread_rwlock_timedwrlock): Likewise.
3153 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3154 (__pthread_rwlock_unlock): Likewise.
3156 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3158 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3159 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3160 Split __flags into __flags, __shared, __pad1 and __pad2.
3161 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3162 futexes if they are available.
3163 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3164 in libc-lowlevellock.S allow using private futexes.
3165 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3166 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3167 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3168 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3169 lll_private_futex_timed_wait and lll_private_futex_wake.
3170 (lll_robust_mutex_unlock): Fix typo.
3171 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3172 field in futex command setup.
3173 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3174 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3175 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3176 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3177 if they are available. Remove clear_once_control.
3178 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3179 futexes if they are available.
3180 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3181 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3182 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3183 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3184 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3185 Wake only when there are waiters.
3186 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3187 support. Indicate that there are waiters. Remove unnecessary
3188 extra cancellation test.
3189 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3190 left-over duplication of __sem_wait_cleanup.
3192 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3194 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3195 parameter to lll_futex_wait, lll_futex_timed_wait, and
3196 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3197 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3198 lll_private_futex_wake.
3199 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3200 * allocatestack.c: Adjust use of lll_futex_* macros.
3202 * lowlevellock.h: Likewise.
3203 * pthread_barrier_wait.c: Likewise.
3204 * pthread_cond_broadcast.c: Likewise.
3205 * pthread_cond_destroy.c: Likewise.
3206 * pthread_cond_signal.c: Likewise.
3207 * pthread_cond_timedwait.c: Likewise.
3208 * pthread_cond_wait.c: Likewise.
3209 * pthread_create.c: Likewise.
3210 * pthread_mutex_lock.c: Likewise.
3211 * pthread_mutex_setprioceiling.c: Likewise.
3212 * pthread_mutex_timedlock.c: Likewise.
3213 * pthread_mutex_unlock.c: Likewise.
3214 * pthread_rwlock_timedrdlock.c: Likewise.
3215 * pthread_rwlock_timedwrlock.c: Likewise.
3216 * pthread_rwlock_unlock.c: Likewise.
3217 * sysdeps/alpha/tls.h: Likewise.
3218 * sysdeps/i386/tls.h: Likewise.
3219 * sysdeps/ia64/tls.h: Likewise.
3220 * sysdeps/powerpc/tls.h: Likewise.
3221 * sysdeps/pthread/aio_misc.h: Likewise.
3222 * sysdeps/pthread/gai_misc.h: Likewise.
3223 * sysdeps/s390/tls.h: Likewise.
3224 * sysdeps/sh/tls.h: Likewise.
3225 * sysdeps/sparc/tls.h: Likewise.
3226 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3227 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3228 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3229 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3230 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3231 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3232 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3233 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3234 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3235 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3237 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3238 * sysdeps/x86_64/tls.h: Likewise.
3240 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3242 * pthread_getattr_np.c: No need to install a cancellation handler,
3243 this is no cancellation point.
3244 * pthread_getschedparam.c: Likewise.
3245 * pthread_setschedparam.c: Likewise.
3246 * pthread_setschedprio.c: Likewise.
3247 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3249 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3250 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3251 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3252 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3253 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3254 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3255 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3256 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3257 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3258 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3259 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3260 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3262 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3263 whether there are more than one thread makes no sense here since
3264 we only call the slow path if the locks are taken.
3265 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3267 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3268 COND_NWAITERS_SHIFT.
3269 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3271 * pthread_cond_init.c: Likewise.
3272 * pthread_cond_timedwait.c: Likewise.
3273 * pthread_cond_wait.c: Likewise.
3274 * pthread_condattr_getclock.c: Likewise.
3275 * pthread_condattr_setclock.c: Likewise.
3276 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3277 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3278 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3279 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3280 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3282 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3284 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3287 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3289 (THREAD_GSCOPE_GET_FLAG): Remove.
3290 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3291 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3293 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3294 (THREAD_GSCOPE_GET_FLAG): Remove.
3295 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3296 instead of THREAD_GSCOPE_GET_FLAG.
3297 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3299 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3300 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3301 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3302 THREAD_GSCOPE_WAIT): Define.
3303 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3304 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3305 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3306 THREAD_GSCOPE_WAIT): Define.
3307 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3308 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3309 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3310 THREAD_GSCOPE_WAIT): Define.
3311 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3312 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3313 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3314 THREAD_GSCOPE_WAIT): Define.
3316 2007-05-24 Richard Henderson <rth@redhat.com>
3318 * descr.h (struct pthread): Add header.gscope_flag.
3319 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3320 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3321 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3322 THREAD_GSCOPE_WAIT): Define.
3324 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3326 * init.c: Make it compile with older kernel headers.
3328 * tst-initializers1.c: Show through exit code which test failed.
3330 * pthread_rwlock_init.c: Also initialize __shared field.
3331 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3332 element in rwlock structure into four byte elements. One of them is
3333 the new __shared element.
3334 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3336 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3337 __shared, adjust names of other padding elements.
3338 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3339 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3340 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3341 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3343 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3344 futex to use private operations if possible.
3345 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3347 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3349 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3350 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3351 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3352 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3354 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3356 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3357 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3359 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3361 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3362 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3363 * pthread_rwlock_timedrdlock.c: Likewise.
3364 * pthread_rwlock_tryrdlock.c: Likewise.
3366 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3369 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3370 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3371 duplication of __sem_wait_cleanup.
3373 * allocatestack.c: Revert last change.
3375 * sysdeps/i386/tls.h: Likewise.
3376 * sysdeps/x86_64/tls.h: Likewise.
3377 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3379 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3381 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3383 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3384 * pthread_barrier_init.c: Set private flag if pshared and private
3385 futexes are supported.
3386 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3387 private field in futex command setup.
3388 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3390 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3392 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3394 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3395 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3396 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3397 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3398 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3400 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3401 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3402 fields in the structure.
3403 (__old_sem_init): New function.
3404 * sem_open.c: Initialize all fields of the structure.
3405 * sem_getvalue.c: Adjust for renamed element.
3406 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3407 (gen-as-const-headers): Add structsem.sym.
3408 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3409 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3410 struct new_sem. Add struct old_sem.
3411 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3412 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3413 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3414 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3415 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3416 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3417 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3418 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3419 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3420 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3421 * tst-sem10.c: New file.
3422 * tst-sem11.c: New file.
3423 * tst-sem12.c: New file.
3424 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3427 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3428 Jakub Jelinek <jakub@redhat.com>
3430 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3431 Move __pthread_enable_asynccancel right before futex syscall.
3432 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3435 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3437 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3438 THREAD_COPY_PRIVATE_FUTEX): Define.
3439 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3440 THREAD_COPY_PRIVATE_FUTEX): Define.
3441 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3442 * init.c (__pthread_initialize_minimal_internal): Use
3443 THREAD_SET_PRIVATE_FUTEX.
3445 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3446 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3447 THREAD_GSCOPE_FLAG_WAIT): Define.
3448 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3449 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3450 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3452 (THREAD_GSCOPE_GET_FLAG): Define.
3453 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3454 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3455 instead of ->header.gscope_flag directly.
3457 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3459 * init.c (__pthread_initialize_minimal_internal): Check whether
3460 private futexes are available.
3461 * allocatestack.c (allocate_stack): Copy private_futex field from
3462 current thread into the new stack.
3463 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3464 futexes if they are available.
3465 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3466 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3467 in libc-lowlevellock.S allow using private futexes.
3468 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3469 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3471 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3472 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3473 if they are available.
3474 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3475 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3476 * sysdeps/i386/tcb-offsets.sym: Likewise.
3477 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3478 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3480 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3482 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3483 Remove ptr_wait_lookup_done again.
3484 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3485 (__pthread_initialize_minimal_internal): Initialize
3486 _dl_wait_lookup_done pointer in _rtld_global directly.
3487 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3488 Remove code to code _dl_wait_lookup_done.
3489 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3492 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3494 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3495 pthread_mutex_init failed with ENOTSUP.
3497 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3499 * allocatestack.c (__wait_lookup_done): New function.
3500 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3501 Add ptr_wait_lookup_done.
3502 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3503 * pthreadP.h: Declare __wait_lookup_done.
3504 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3505 Define macros to implement reference handling of global scope.
3506 * sysdeps/x86_64/tls.h: Likewise.
3507 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3508 Initialize GL(dl_wait_lookup_done).
3510 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3513 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3515 * pthread_mutex_timedlock.c: Likewise.
3516 * pthread_mutex_trylock.c: Likewise.
3517 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3519 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3520 * tst-robust9.c: New file.
3521 * tst-robustpi9.c: New file.
3523 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3524 unnecessary extra cancellation test.
3526 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3528 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3529 extra cancellation test.
3530 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3532 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3534 * descr.h (struct pthread): Rearrange members to fill hole in
3537 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3538 (__pthread_setaffinity_new): If syscall was successful and
3539 RESET_VGETCPU_CACHE is defined, use it before returning.
3540 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3542 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3545 * tst-align2.c: Include stackinfo.h.
3546 * tst-getpid1.c: Likewise.
3548 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3551 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3552 * tst-getpid1.c (do_test): Likewise.
3555 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3556 (allocate_stack): Likewise.
3558 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3560 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3561 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3562 (__lll_robust_timedlock_wait): Likewise.
3563 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3565 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3568 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3569 * tst-cancel4.c (tf_fdatasync): New test.
3571 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3574 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3575 check mutexes like normal mutexes.
3578 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3579 Initialize the whole sigevent structure to appease valgrind.
3581 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3583 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3584 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3586 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3588 * tst-locale1.c: Avoid warnings.
3589 * tst-locale2.c: Likewise.
3591 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3593 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3594 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3596 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3598 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3599 __extern_always_inline where appropriate.
3600 * sysdeps/pthread/pthread.h: Likewise.
3602 2007-03-13 Richard Henderson <rth@redhat.com>
3604 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3605 separate cfi regions for the two subsections.
3607 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3609 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3610 new thread, don't just decrement it.
3611 Patch by Suzuki K P <suzuki@in.ibm.com>.
3613 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3615 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3616 PTHFCT_CALL definition.
3618 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3620 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3621 available, don't use it.
3623 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3625 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3626 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3627 call into the kernel to delay.
3629 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3631 * tst-initializers1.c: We want to test the initializers as seen
3632 outside of libc, so undefined _LIBC.
3634 * pthread_join.c (cleanup): Avoid warning.
3636 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3638 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3639 (__lll_timedwait_tid): Add unwind info.
3641 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3642 function table, mangle the pointers.
3643 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3644 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3645 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3646 demangle pointers before use.
3647 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3649 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3650 * sysdeps/pthread/setxid.h: Likewise.
3652 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3654 * tst-rwlock7.c: Show some more information in case of correct
3657 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3659 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3660 (lll_futex_timed_wait): Undo part of last change, don't negate
3663 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3665 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3666 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3668 2006-12-28 David S. Miller <davem@davemloft.net>
3670 * shlib-versions: Fix sparc64 linux target specification.
3672 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3674 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3675 Adjust include path for pthread_barrier_wait.c move.
3677 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3679 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3680 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3682 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3684 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3685 6 argument cancellable syscalls.
3686 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3687 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3688 6 argument cancellable syscalls.
3689 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3691 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3693 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3694 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3696 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3698 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3699 __sync_lock_release instead of __sync_lock_release_si.
3701 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3703 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3705 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3706 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3707 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3708 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3709 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3710 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3711 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3712 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3713 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3714 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3715 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3717 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3719 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3720 * pthread_barrier_wait.c: ...here.
3721 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3722 * pthread_cond_broadcast.c: ...here.
3723 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3724 * pthread_cond_signal.c: ...here.
3725 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3726 * pthread_cond_timedwait.c: ...here.
3727 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3728 * pthread_cond_wait.c: ...here.
3729 * sysdeps/pthread/pthread_once.c: Move to...
3730 * pthread_once.c: ...here.
3731 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3732 * pthread_rwlock_rdlock.c: ...here.
3733 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3734 * pthread_rwlock_timedrdlock.c: ...here.
3735 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3736 * pthread_rwlock_timedwrlock.c: ...here.
3737 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3738 * pthread_rwlock_unlock.c: ...here.
3739 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3740 * pthread_rwlock_wrlock.c: ...here.
3741 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3742 * pthread_spin_destroy.c: ...here.
3743 * sysdeps/pthread/pthread_spin_init.c: Move to...
3744 * pthread_spin_init.c: ...here.
3745 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3746 * pthread_spin_unlock.c: ...here.
3747 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3748 * pthread_getcpuclockid.c: ...here.
3750 * init.c: USE_TLS support is now always enabled.
3751 * tst-tls5.h: Likewise.
3752 * sysdeps/alpha/tls.h: Likewise.
3753 * sysdeps/i386/tls.h: Likewise.
3754 * sysdeps/ia64/tls.h: Likewise.
3755 * sysdeps/powerpc/tls.h: Likewise.
3756 * sysdeps/s390/tls.h: Likewise.
3757 * sysdeps/sh/tls.h: Likewise.
3758 * sysdeps/sparc/tls.h: Likewise.
3759 * sysdeps/x86_64/tls.h: Likewise.
3761 2006-10-27 Jakub Jelinek <jakub@redhat.com>
3763 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3764 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3767 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3768 Define to THREAD_SELF->header.multiple_threads.
3769 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3771 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3773 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3774 (SINGLE_THREAD_P): Likewise.
3775 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3776 (SINGLE_THREAD_P): Likewise.
3777 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3778 (SINGLE_THREAD_P): Likewise.
3779 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3780 (SINGLE_THREAD_P): Likewise.
3781 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3783 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3784 (SINGLE_THREAD_P): Likewise.
3785 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3786 (SINGLE_THREAD_P): Likewise.
3787 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3790 2006-10-26 Jakub Jelinek <jakub@redhat.com>
3792 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3793 by default rather than 2_3_3.
3795 2006-10-17 Jakub Jelinek <jakub@redhat.com>
3797 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3798 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3799 atomic_* instead of catomic_* macros.
3801 2006-10-12 Ulrich Drepper <drepper@redhat.com>
3804 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3805 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3806 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3807 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3808 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3809 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3810 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3811 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3812 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3813 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3814 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3815 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3816 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3818 2006-10-11 Ulrich Drepper <drepper@redhat.com>
3820 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3821 cancelable syscalls with six parameters.
3823 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3824 operations instead of atomic_*.
3826 2006-10-09 Ulrich Drepper <drepper@redhat.com>
3828 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3830 2006-10-07 Ulrich Drepper <drepper@redhat.com>
3832 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3833 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3834 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3836 * pthread_attr_setstack.c: Allow overwriting the version number of the
3838 * pthread_attr_setstacksize.c: Likewise.
3839 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3841 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3842 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3844 2006-09-24 Ulrich Drepper <drepper@redhat.com>
3847 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3848 Patch by Petr Baudis.
3850 2006-09-18 Jakub Jelinek <jakub@redhat.com>
3852 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3854 * tst-cancel2.c (tf): Loop as long as something was written.
3856 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3858 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3859 mutexes wake all mutexes.
3860 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3861 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3862 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3864 2006-09-12 Ulrich Drepper <drepper@redhat.com>
3866 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3867 to guarantee the thread is always canceled.
3869 2006-09-08 Jakub Jelinek <jakub@redhat.com>
3871 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3873 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3874 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3875 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3876 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3877 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3879 2006-09-08 Ulrich Drepper <drepper@redhat.com>
3882 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3883 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3884 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3885 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3886 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3887 * Makefile (tests): Add tst-cond22.
3888 * tst-cond22.c: New file.
3890 2006-09-05 Ulrich Drepper <drepper@redhat.com>
3893 * descr.h (struct pthread): Add parent_cancelhandling.
3894 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3895 cancelhandling value to child.
3896 * pthread_create.c (start_thread): If parent thread was canceled
3897 reset the SIGCANCEL mask.
3898 * Makefile (tests): Add tst-cancel25.
3899 * tst-cancel25.c: New file.
3901 2006-09-05 Jakub Jelinek <jakub@redhat.com>
3902 Ulrich Drepper <drepper@redhat.com>
3904 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3905 counterp if it is already zero.
3906 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3908 2006-03-04 Jakub Jelinek <jakub@redhat.com>
3909 Roland McGrath <roland@redhat.com>
3911 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3912 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3913 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3914 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3915 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3916 lll_robust_mutex_timedlock, lll_mutex_unlock,
3917 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3918 Add _L_*_ symbols around the subsection.
3919 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3920 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3922 2006-03-03 Jakub Jelinek <jakub@redhat.com>
3923 Roland McGrath <roland@redhat.com>
3925 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3926 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3927 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3928 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3929 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3930 lll_robust_mutex_timedlock, lll_mutex_unlock,
3931 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3932 Add _L_*_ symbols around the subsection.
3933 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3934 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3936 2006-08-31 Ulrich Drepper <drepper@redhat.com>
3938 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3939 change because it can disturb too much existing code. If real hard
3940 reader preference is needed we'll introduce another type.
3941 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3942 (pthread_rwlock_timedwrlock): Likewise.
3943 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3946 2006-08-30 Ulrich Drepper <drepper@redhat.com>
3948 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3950 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3951 (pthread_rwlock_timedwrlock): Likewise.
3952 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3955 2006-08-25 Jakub Jelinek <jakub@redhat.com>
3957 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3958 Only define ifdef SHARED.
3960 2006-08-23 Ulrich Drepper <drepper@redhat.com>
3962 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3963 (free_stacks): ...here.
3964 (__free_stack_cache): New function.
3965 * pthreadP.h: Declare __free_stack_cache.
3966 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3968 * init.c (pthread_functions): Initialize ptr_freeres.
3969 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3970 New freeres function.
3972 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3975 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3977 2006-08-20 Ulrich Drepper <drepper@redhat.com>
3979 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3980 _XOPEN_REALTIME_THREADS.
3982 2006-08-15 Jakub Jelinek <jakub@redhat.com>
3984 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3985 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3986 HAVE_CLOCK_GETTIME_VSYSCALL.
3987 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3989 2006-08-14 Jakub Jelinek <jakub@redhat.com>
3991 * sysdeps/unix/sysv/linux/bits/posix_opt.h
3992 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3993 * descr.h (struct priority_protection_data): New type.
3994 (struct pthread): Add tpp field.
3995 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3996 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3997 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3998 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4000 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4001 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4002 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4003 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4005 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4007 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4008 * pthread_mutexattr_getprioceiling.c
4009 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4010 in the SCHED_FIFO priority range.
4011 * pthread_mutexattr_setprioceiling.c
4012 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4013 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4014 if mutex is not TPP. Ceiling is now in __data.__lock.
4015 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4016 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4017 is now in __data.__lock. Add locking.
4018 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4019 * Makefile (libpthread-routines): Add tpp.
4020 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4021 * tst-tpp.h: New file.
4022 * tst-mutexpp1.c: New file.
4023 * tst-mutexpp6.c: New file.
4024 * tst-mutexpp10.c: New file.
4025 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4026 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4028 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4031 * pthread_join.c (pthread_join): Account for self being canceled
4032 when checking for deadlocks.
4033 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4034 (tf1): Don't print anything after pthread_join returns, this would be
4035 another cancellation point.
4037 * tst-join6.c: New file.
4038 * Makefile (tests): Add tst-join6.
4040 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4043 * pthread_setspecific.c (__pthread_setspecific): Check
4044 out-of-range index before checking for unused key.
4046 * sysdeps/pthread/gai_misc.h: New file.
4048 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4050 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4051 file. Don't use sysctl.
4052 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4053 overwrite the file if this is likely not true.
4055 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4057 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4058 * Makefile (tests): Add tst-getpid3.
4059 * tst-getpid3.c: New file.
4061 2006-07-30 Roland McGrath <roland@redhat.com>
4063 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4065 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4066 (pause_not_cancel): New macro.
4067 (nanosleep_not_cancel): New macro.
4068 (sigsuspend_not_cancel): New macro.
4069 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4070 nanosleep_not_cancel macro from <not-cancel.h>.
4071 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4072 macro from <not-cancel.h>.
4074 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4075 Jakub Jelinek <jakub@redhat.com>
4077 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4078 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4079 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4080 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4081 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4082 * pthread_mutex_lock.c: Likewise.
4083 * pthread_mutex_timedlock.c: Likewise.
4084 * pthread_mutex_trylock.c: Likewise.
4085 * pthread_mutex_unlock.c: Likewise.
4086 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4088 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4090 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4091 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4092 pthread-pi-defines.sym.
4093 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4094 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4095 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4096 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4097 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4098 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4099 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4100 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4101 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4102 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4103 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4104 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4105 * tst-mutex2.c: Likewise.
4106 * tst-mutex3.c: Likewise.
4107 * tst-mutex4.c: Likewise.
4108 * tst-mutex5.c: Likewise.
4109 * tst-mutex6.c: Likewise.
4110 * tst-mutex7.c: Likewise.
4111 * tst-mutex7a.c: Likewise.
4112 * tst-mutex8.c: Likewise.
4113 * tst-mutex9.c: Likewise.
4114 * tst-robust1.c: Likewise.
4115 * tst-robust7.c: Likewise.
4116 * tst-robust8.c: Likewise.
4117 * tst-mutexpi1.c: New file.
4118 * tst-mutexpi2.c: New file.
4119 * tst-mutexpi3.c: New file.
4120 * tst-mutexpi4.c: New file.
4121 * tst-mutexpi5.c: New file.
4122 * tst-mutexpi6.c: New file.
4123 * tst-mutexpi7.c: New file.
4124 * tst-mutexpi7a.c: New file.
4125 * tst-mutexpi8.c: New file.
4126 * tst-mutexpi9.c: New file.
4127 * tst-robust1.c: New file.
4128 * tst-robust2.c: New file.
4129 * tst-robust3.c: New file.
4130 * tst-robust4.c: New file.
4131 * tst-robust5.c: New file.
4132 * tst-robust6.c: New file.
4133 * tst-robust7.c: New file.
4134 * tst-robust8.c: New file.
4135 * Makefile (tests): Add the new tests.
4137 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4138 * pthread_mutex_destroy.c: Remove unneeded label.
4140 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4142 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4143 computations to compile time.
4145 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4147 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4149 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4151 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4153 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4155 * pthread_key_create.c (__pthread_key_create): Do away with
4156 __pthread_keys_lock.
4158 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4159 (__kernel_cpumask_size): Mark as hidden.
4160 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4162 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4163 * semaphoreP.h (__sem_mappings_lock): Likewise.
4165 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4167 * pthread_atfork.c: Mark __dso_handle as hidden.
4169 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4172 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4173 the reload problem. Change the one path in pthread_cancel_init
4174 which causes the problem. Force gcc to reload. Simplify callers.
4175 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4176 (_Unwind_GetBSP): Undo last patch.
4178 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4180 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4181 function pointer is reloaded after pthread_cancel_init calls.
4184 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4185 pointers are reloaded after pthread_cancel_init calls.
4187 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4189 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4192 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4194 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4195 Allocate new object which is passed to timer_sigev_thread so that
4196 the timer can be deleted before the new thread is scheduled.
4198 2006-04-26 Roland McGrath <roland@redhat.com>
4200 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4202 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4204 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4205 suffix for conditional jumps.
4206 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4207 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4208 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4209 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4210 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4211 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4213 * init.c (sigcancel_handler): Compare with correct PID even if the
4214 thread is in the middle of a fork call.
4215 (sighandler_setxid): Likewise.
4216 Reported by Suzuki K P <suzuki@in.ibm.com> .
4218 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4220 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4222 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4224 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4225 fails [Coverity CID 105].
4227 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4229 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4231 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4234 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4235 Define __lll_rel_instr using lwsync.
4237 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4239 * allocatestack.c (allocate_stack): Always initialize robust_head.
4240 * descr.h: Define struct robust_list_head.
4241 (struct pthread): Use robust_list_head in robust mutex list definition.
4242 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4243 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4244 (__pthread_initialize_minimal_internal): Register robust_list with
4246 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4247 Declare __set_robust_list_avail.
4248 * pthread_create.c (start_thread): Register robust_list of new thread.
4249 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4251 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4252 number of users, it's unreliable.
4253 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4254 set_robust_list syscall is available.
4255 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4256 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4257 Set robust_head.list_op_pending before trying to lock a robust mutex.
4258 * pthread_mutex_timedlock.c: Likewise.
4259 * pthread_mutex_trylock.c: Likewise.
4260 * pthread_mutex_unlock.c: Likewise for unlocking.
4261 * Makefile (tests): Add tst-robust8.
4262 * tst-robust8.c: New file.
4264 2006-03-08 Andreas Schwab <schwab@suse.de>
4266 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4267 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4269 2006-03-05 Roland McGrath <roland@redhat.com>
4271 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4272 and $config_os doesn't match *linux*.
4274 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4276 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4277 Use __syscall_error.
4278 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4279 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4280 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4281 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4282 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4283 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4285 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4287 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4289 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4291 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4292 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4294 (__lll_robust_timedlock_wait): Likewise.
4295 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4296 (__lll_robust_lock_wait): Likewise.
4297 (__lll_robust_timedlock_wait): Likewise.
4298 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4299 (__lll_robust_lock_wait): Likewise.
4300 (__lll_robust_timedlock_wait): Likewise.
4302 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4304 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4305 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4306 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4307 lll_robust_mutex_unlock): Define.
4308 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4310 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4312 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4313 instead of <clone.S>.
4315 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4317 * Makefile (libpthread-routines): Add
4318 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4319 and pthread_mutex_[sg]etprioceiling.
4320 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4321 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4322 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4323 pthread_mutex_setprioceiling.
4324 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4325 PTHREAD_PRIO_PROTECT): New enum values.
4326 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4327 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4328 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4330 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4331 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4332 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4334 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4335 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4336 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4337 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4338 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4339 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4340 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4342 * pthread_mutex_getprioceiling.c: New file.
4343 * pthread_mutex_setprioceiling.c: New file.
4344 * pthread_mutexattr_getprioceiling.c: New file.
4345 * pthread_mutexattr_setprioceiling.c: New file.
4346 * pthread_mutexattr_getprotocol.c: New file.
4347 * pthread_mutexattr_setprotocol.c: New file.
4349 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4351 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4353 2006-02-27 Roland McGrath <roland@redhat.com>
4355 * sysdeps/pthread/Subdirs: List nptl here too.
4356 * configure (libc_add_on_canonical): New variable.
4358 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4360 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4361 self to get main source tree's file.
4362 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4363 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4364 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4365 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4366 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4367 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4368 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4369 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4370 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4371 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4372 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4373 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4374 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4376 * Makefile: Use $(sysdirs) in vpath directive.
4378 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4379 (CPPFLAGS-timer_routines.c): Likewise.
4381 * Makeconfig (includes): Variable removed.
4383 2006-02-26 Roland McGrath <roland@redhat.com>
4385 * sysdeps/generic/pt-raise.c: Moved to ...
4386 * pt-raise.c: ... here.
4387 * sysdeps/generic/lowlevellock.h: Moved to ...
4388 * lowlevellock.h: ... here.
4390 2006-02-23 Roland McGrath <roland@redhat.com>
4392 * descr.h (struct pthread): Add final member `end_padding'.
4393 (PTHREAD_STRUCT_END_PADDING): Use it.
4395 2006-02-20 Roland McGrath <roland@redhat.com>
4397 * sysdeps/mips: Directory removed, saved in ports repository.
4398 * sysdeps/unix/sysv/linux/mips: Likewise.
4400 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4402 * tst-robust1.c: Add second mutex to check that the mutex list is
4405 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4407 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4408 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4409 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4410 lll_robust_mutex_unlock): New macros.
4411 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4412 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4413 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4414 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4415 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4417 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4419 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4421 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4423 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4425 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4426 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4427 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4428 (lll_robust_mutex_unlock): Likewise.
4430 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4432 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4433 Set robust_list.__next rather than robust_list.
4434 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4435 (__pthread_list_t): New typedef.
4436 (pthread_mutex_t): Replace __next and __prev fields with __list.
4437 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4438 (__pthread_list_t): New typedef.
4439 (pthread_mutex_t): Replace __next and __prev fields with __list.
4440 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4441 (__pthread_list_t, __pthread_slist_t): New typedefs.
4442 (pthread_mutex_t): Replace __next and __prev fields with __list.
4443 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4444 (__pthread_list_t, __pthread_slist_t): New typedefs.
4445 (pthread_mutex_t): Replace __next and __prev fields with __list.
4446 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4447 (__pthread_list_t, __pthread_slist_t): New typedefs.
4448 (pthread_mutex_t): Replace __next and __prev fields with __list.
4449 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4450 (__pthread_slist_t): New typedef.
4451 (pthread_mutex_t): Replace __next field with __list.
4453 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4455 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4456 PTHREAD_MUTEX_OWNERDEAD.
4457 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4458 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4459 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4460 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4461 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4462 to PTHREAD_MUTEX_INCONSISTENT.
4463 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4464 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4465 * pthread_mutex_trylock.c: Likewise.
4466 * pthread_mutex_timedlock.c: Likewise.
4467 * pthread_mutex_unlock.c: Likewise.
4468 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4469 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4470 lowlevelrobustlock.sym.
4471 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4472 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4474 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4475 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4476 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4477 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4478 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4480 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4482 * allocatestack.c (allocate_stack): Initialize robust_list.
4483 * init.c (__pthread_initialize_minimal_internal): Likewise.
4484 * descr.h (struct xid_command): Pretty printing.
4485 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4486 robust_list. Adjust macros.
4487 * pthread_create.c (start_thread): Adjust robust_list handling.
4488 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4489 but the owner for all robust mutex types.
4490 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4491 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4492 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4493 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4495 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4496 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4498 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4500 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4501 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4503 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4505 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4507 (lll_futex_timed_wait): Define.
4509 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4511 * tst-cancel4.c: Test ppoll.
4513 2006-01-18 Andreas Jaeger <aj@suse.de>
4516 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4517 (pthread_mutex_t): Follow changes for other archs. Based on patch
4518 by Jim Gifford <patches@jg555.com>.
4520 2006-01-13 Richard Henderson <rth@redhat.com>
4522 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4524 2006-01-10 Roland McGrath <roland@redhat.com>
4526 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4527 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4528 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4529 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4530 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4531 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4532 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4533 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4534 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4535 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4537 2006-01-09 Roland McGrath <roland@redhat.com>
4539 * tst-initializers1-c89.c: New file.
4540 * tst-initializers1-c99.c: New file.
4541 * tst-initializers1-gnu89.c: New file.
4542 * tst-initializers1-gnu99.c: New file.
4543 * Makefile (tests): Add them.
4544 (CFLAGS-tst-initializers1-c89.c): New variable.
4545 (CFLAGS-tst-initializers1-c99.c): New variable.
4546 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4547 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4549 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4550 Use __extension__ on anonymous union definition.
4551 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4552 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4553 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4554 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4555 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4557 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4559 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4560 Don't give the union a name because it changes the mangled name.
4561 Instead name the struct for __data.
4562 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4564 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4567 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4569 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4570 stack bias to mc_ftp field.
4572 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4574 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4575 being too clever and reloading the futex value where it shouldn't.
4577 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4579 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4582 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4584 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4587 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4589 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4590 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4591 rename in tcbhead_t.
4593 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4594 Don't give the union a name because it changes the mangled name.
4595 Instead name the struct for __data.
4596 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4597 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4598 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4599 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4600 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4601 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4603 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4605 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4607 (lll_futex_timed_wait): Define.
4608 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4609 * sysdeps/pthread/aio_misc.h: New file.
4611 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4613 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4615 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4617 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4618 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4619 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4621 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4623 * tst-cancel24.cc: Use C headers instead of C++ headers.
4625 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4627 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4628 sparc-linux configured glibc.
4629 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4630 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4631 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4632 atomic_compare_and_exchange_val_24_acq instead of
4633 atomic_compare_and_exchange_val_acq.
4634 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4635 instead of atomic_exchange_rel.
4636 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4637 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4639 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4641 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4642 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4643 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4644 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4645 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4646 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4648 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4650 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4651 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4652 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4654 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4656 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4658 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4660 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4663 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4665 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4666 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4667 THREAD_COPY_POINTER_GUARD): Define.
4668 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4669 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4671 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4673 * version.c: Update copyright year.
4675 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4677 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4678 .eh_frame section, use cfi_* directives.
4679 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4681 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4683 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4686 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4688 * sysdeps/pthread/sigaction.c: Removed.
4689 * sigaction.c: New file.
4690 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4692 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4694 * Makefile (tests): Add tst-signal7.
4695 * tst-signal7.c: New file.
4697 2005-12-27 Roland McGrath <roland@redhat.com>
4699 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4700 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4701 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4702 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4703 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4704 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4705 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4706 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4707 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4708 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4709 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4711 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4713 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4714 and __prev field to pthread_mutex_t.
4715 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4716 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4717 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4718 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4719 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4722 2005-12-26 Ulrich Drepper <drepper@redhat.com>
4724 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4725 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4726 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4727 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4728 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4729 and PTHREAD_MUTEXATTR_FLAG_BITS.
4730 * descr.h (struct pthread): Add robust_list field and define
4731 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4732 * pthread_mutexattr_getrobust.c: New file.
4733 * pthread_mutexattr_setrobust.c: New file.
4734 * pthread_mutex_consistent.c: New file.
4735 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4736 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4737 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4738 Adjust pthread_mutex_t initializers.
4739 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4740 field to pthread_mutex_t.
4741 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4742 and __prev field to pthread_mutex_t.
4743 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4744 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4745 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4746 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4747 * pthread_mutexattr_gettype.c: Likewise.
4748 * pthread_mutexattr_setpshared.c: Likewise.
4749 * pthread_mutexattr_settype.c: Likewise.
4750 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4751 Initialize mutex kind according to robust flag.
4752 * pthread_mutex_lock.c: Implement local robust mutex.
4753 * pthread_mutex_timedlock.c: Likewise.
4754 * pthread_mutex_trylock.c: Likewise.
4755 * pthread_mutex_unlock.c: Likewise.
4756 * pthread_create.c (start_thread): Mark robust mutexes which remained
4758 * tst-robust1.c: New file.
4759 * tst-robust2.c: New file.
4760 * tst-robust3.c: New file.
4761 * tst-robust4.c: New file.
4762 * tst-robust5.c: New file.
4763 * tst-robust6.c: New file.
4764 * tst-robust7.c: New file.
4765 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4766 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4767 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4768 tst-robust5, tst-robust6, and tst-robust7.
4770 * tst-typesizes.c: New file.
4771 * Makefile (tests): Add tst-typesizes.
4773 * tst-once3.c: More debug output.
4775 2005-12-24 Ulrich Drepper <drepper@redhat.com>
4777 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4778 missing after last change.
4780 * version.c: Update copyright year.
4782 2005-12-23 Ulrich Drepper <drepper@redhat.com>
4784 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4785 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4786 * pthread_mutex_trylock.c: Likewise.
4787 * pthread_mutex_timedlock.c: Likewise.
4788 * pthread_mutex_unlock.c: Likewise.
4790 2005-12-22 Roland McGrath <roland@redhat.com>
4792 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4793 so that #include_next's search location is not reset to the -I..
4794 directory where <nptl/...> can be found.
4796 2005-12-22 Ulrich Drepper <drepper@redhat.com>
4799 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4800 Fix unwind info. Remove useless branch prediction prefix.
4801 * tst-cancel24.cc: New file.
4802 * Makefile: Add rules to build and run tst-cancel24.
4804 2005-12-21 Roland McGrath <roland@redhat.com>
4806 * libc-cancellation.c: Use <> rather than "" #includes.
4807 * pt-cleanup.c: Likewise.
4808 * pthread_create.c: Likewise.
4809 * pthread_join.c: Likewise.
4810 * pthread_timedjoin.c: Likewise.
4811 * pthread_tryjoin.c: Likewise.
4812 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4813 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4814 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4815 * unwind.c: Likewise.
4817 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4819 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4820 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4821 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4822 THREAD_COPY_POINTER_GUARD): Define.
4824 2005-12-19 Jakub Jelinek <jakub@redhat.com>
4826 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4828 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4829 THREAD_COPY_POINTER_GUARD): Define.
4830 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4831 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4832 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4833 THREAD_COPY_POINTER_GUARD): Define.
4834 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4835 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4836 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4837 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4838 Use PTR_DEMANGLE for B0 if defined.
4840 2005-12-17 Ulrich Drepper <drepper@redhat.com>
4842 * pthread_create.c (__pthread_create_2_1): Use
4843 THREAD_COPY_POINTER_GUARD if available.
4844 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4845 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4846 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4847 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4848 * sysdeps/x86_64/tls.h: Likewise.
4850 2005-12-15 Roland McGrath <roland@redhat.com>
4852 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4854 2005-12-13 Ulrich Drepper <drepper@redhat.com>
4856 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4858 * errno-loc.c: New file.
4860 2005-12-12 Roland McGrath <roland@redhat.com>
4862 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4863 adjustments before choosing stack size. Update minimum stack size
4864 calculation to match allocate_stack change.
4866 2005-12-12 Ulrich Drepper <drepper@redhat.com>
4868 * allocatestack.c (allocate_stack): Don't demand that there is an
4869 additional full page available on the stack beside guard, TLS, the
4872 2005-11-24 Ulrich Drepper <drepper@redhat.com>
4874 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4875 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4877 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4878 compiling 32-bit code we must define __cleanup_fct_attribute.
4880 005-11-24 Jakub Jelinek <jakub@redhat.com>
4883 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4884 __attribute__ instead of __attribute.
4885 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4886 (__cleanup_fct_attribute): Likewise.
4888 2005-11-17 Jakub Jelinek <jakub@redhat.com>
4890 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4891 a write barrier before writing libgcc_s_getcfa.
4893 2005-11-06 Ulrich Drepper <drepper@redhat.com>
4895 * sysdeps/unix/sysv/linux/configure: Removed.
4897 2005-11-05 Ulrich Drepper <drepper@redhat.com>
4899 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4900 optional init_array/fini_array support.
4902 2005-10-24 Roland McGrath <roland@redhat.com>
4904 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4905 versioned_symbol use.
4907 2005-10-16 Roland McGrath <roland@redhat.com>
4909 * init.c (__pthread_initialize_minimal_internal): Even when using a
4910 compile-time default stack size, apply the minimum that allocate_stack
4911 will require, and round up to page size.
4913 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4915 * Makefile ($(test-modules)): Remove static pattern rule.
4917 2005-10-14 Jakub Jelinek <jakub@redhat.com>
4918 Ulrich Drepper <drepper@redhat.com>
4920 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4921 alignment in callback function.
4922 * Makefile: Add rules to build and run tst-align3.
4923 * tst-align3.c: New file.
4925 2005-10-03 Jakub Jelinek <jakub@redhat.com>
4927 * allocatestack.c (setxid_signal_thread): Add
4928 INTERNAL_SYSCALL_DECL (err).
4930 2005-10-02 Jakub Jelinek <jakub@redhat.com>
4932 * allocatestack.c (setxid_signal_thread): Need to use
4933 atomic_compare_and_exchange_bool_acq.
4935 2005-10-01 Ulrich Drepper <drepper@redhat.com>
4936 Jakub Jelinek <jakub@redhat.com>
4938 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4940 (struct pthread): Move specific_used field to avoid padding.
4941 Add setxid_futex field.
4942 * init.c (sighandler_setxid): Reset setxid flag and release the
4944 * allocatestack.c (setxid_signal_thread): New function. Broken
4945 out of the bodies of the two loops in __nptl_setxid. For undetached
4946 threads check whether they are exiting and if yes, don't send a signal.
4947 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4948 * pthread_create.c (start_thread): For undetached threads, check
4949 whether setxid bit is set. If yes, wait until signal has been
4952 * allocatestack.c (STACK_VARIABLES): Initialize them.
4953 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4955 2004-09-02 Jakub Jelinek <jakub@redhat.com>
4957 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4958 waiters, awake all waiters on the associated mutex.
4960 2005-09-22 Roland McGrath <roland@redhat.com>
4962 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4963 ../sysdeps/x86_64/hp-timing.h).
4965 2005-08-29 Jakub Jelinek <jakub@redhat.com>
4967 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4968 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4969 (lll_futex_wake_unlock): Define.
4970 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4971 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4972 (lll_futex_wake_unlock): Define.
4973 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4974 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4975 (lll_futex_wake_unlock): Define.
4976 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4977 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4978 (lll_futex_wake_unlock): Define.
4979 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4980 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4981 (lll_futex_wake_unlock): Define.
4982 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4983 lll_futex_wake_unlock.
4984 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4985 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4986 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4987 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4988 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4989 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4991 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4993 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4994 Fix typo in register name.
4996 2005-08-23 Ulrich Drepper <drepper@redhat.com>
4998 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4999 Use __sigfillset. Document that sigfillset does the right thing wrt
5002 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5005 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5006 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5007 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5008 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5009 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5010 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5012 * Makefile (tests): Add tst-initializers1.
5013 (CFLAGS-tst-initializers1.c): Set.
5014 * tst-initializers1.c: New test.
5016 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5018 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5019 Make sure __flags are located at offset 48 from the start of the
5022 2005-07-02 Roland McGrath <roland@redhat.com>
5024 * Makeconfig: Comment fix.
5026 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5028 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5029 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5030 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5031 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5032 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5033 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5034 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5035 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5036 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5037 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5039 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5041 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5042 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5043 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5045 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5046 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5047 field. Put in sysinfo field unconditionally.
5048 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5049 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5050 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5051 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5053 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5054 * pthread_create.c (__pthread_create_2_1): Use
5055 THREAD_COPY_STACK_GUARD macro.
5056 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5058 * tst-stackguard1.c: New file.
5059 * tst-stackguard1-static.c: New file.
5061 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5063 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5064 Invoke CGOTSETUP and CGOTRESTORE.
5065 (CGOTSETUP, CGOTRESTORE): Define.
5067 2005-05-29 Richard Henderson <rth@redhat.com>
5069 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5070 (tf_write, tf_writev): Use it.
5071 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5074 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5076 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5077 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5078 __librt_*_asynccancel@local.
5080 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5082 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5083 all occurrences of JUMPTARGET. Instead append @local to labels.
5085 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5087 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5088 size/alignment of struct pthread rather than tcbhead_t.
5089 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5091 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5093 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5096 2005-05-19 Richard Henderson <rth@redhat.com>
5098 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5099 __sync_val_compare_and_swap, not explicit _si variant.
5100 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5102 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5105 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5107 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5109 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5110 .eh_frame section, use cfi_* directives.
5112 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5114 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5117 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5120 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5123 2005-04-27 Roland McGrath <roland@redhat.com>
5125 * Makefile (tests): Remove tst-clock2.
5127 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5128 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5129 translating to the kernel clockid_t for our own process/thread clock.
5131 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5133 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5135 * old_pthread_cond_init.c: Include <errno.h>.
5136 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5137 process shared or uses clock other than CLOCK_REALTIME.
5138 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5140 2005-04-13 David S. Miller <davem@davemloft.net>
5142 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5143 * sysdeps/sparc/sparc64/clone.S: New file.
5145 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5148 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5149 __inline instead of inline.
5150 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5152 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5154 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5155 functionally equivalent, but shorter instructions.
5156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5157 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5158 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5160 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5161 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5162 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5163 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5165 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5166 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5168 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5169 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5170 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5171 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5172 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5174 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5176 * sysdeps/mips/Makefile: New file.
5177 * sysdeps/mips/nptl-sysdep.S: New file.
5178 * sysdeps/mips/tcb-offsets.sym: New file.
5179 * sysdeps/mips/pthread_spin_lock.S: New file.
5180 * sysdeps/mips/pthread_spin_trylock.S: New file.
5181 * sysdeps/mips/pthreaddef.h: New file.
5182 * sysdeps/mips/tls.h: New file.
5183 * sysdeps/mips/jmpbuf-unwind.h: New file.
5184 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5185 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5186 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5187 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5188 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5189 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5190 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5191 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5192 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5193 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5195 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5198 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5201 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5203 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5205 2005-02-25 Roland McGrath <roland@redhat.com>
5207 * alloca_cutoff.c: Correct license text.
5208 * tst-unload.c: Likewise.
5209 * sysdeps/pthread/allocalim.h: Likewise.
5210 * sysdeps/pthread/pt-initfini.c: Likewise.
5211 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5212 * sysdeps/pthread/bits/sigthread.h: Likewise.
5213 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5214 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5216 2005-02-16 Roland McGrath <roland@redhat.com>
5218 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5219 Use unsigned int * for ptr_nthreads.
5221 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5224 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5227 2005-02-07 Richard Henderson <rth@redhat.com>
5230 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5233 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5235 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5236 order of arguments in invocation of atomic_add_zero.
5238 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5241 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5242 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5243 at least gotntpoff relocation and addition.
5244 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5246 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5248 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5251 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5253 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5254 entry for static tls deallocation fix.
5255 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5256 also contains information whether the memory pointed to is static
5258 * sysdeps/i386/tls.h: Likewise.
5259 * sysdeps/ia64/tls.h: Likewise.
5260 * sysdeps/powerpc/tls.h: Likewise.
5261 * sysdeps/s390/tls.h: Likewise.
5262 * sysdeps/sh/tls.h: Likewise.
5263 * sysdeps/sparc/tls.h: Likewise.
5264 * sysdeps/x86_64/tls.h: Likewise.
5266 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5268 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5270 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5272 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5274 * Makefile (tests): Add tst-align2.
5275 * tst-align2.c: New test.
5276 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5277 -mpreferred-stack-boundary=4.
5279 2004-12-18 Roland McGrath <roland@redhat.com>
5281 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5282 New file removed withdrawn for the moment.
5284 2004-12-17 Richard Henderson <rth@redhat.com>
5286 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5287 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5289 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5291 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5292 Increased PTHREAD_STACK_MIN.
5294 * tst-context1.c (stacks): Use bigger stack size.
5296 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5298 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5299 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5301 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5303 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5304 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5305 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5307 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5309 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5311 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5313 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5314 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5316 * tst-getpid1.c: If child crashes, report this first. Print which
5319 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5321 * init.c (__pthread_initialize_minimal_internal): Also unblock
5324 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5326 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5327 _POSIX_THREAD_CPUTIME): Define to 0.
5328 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5329 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5330 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5331 __timer_signal_thread_tclk): Remove.
5332 (init_module): Remove their initialization.
5333 (thread_cleanup): Remove their cleanup assertions.
5334 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5335 __timer_signal_thread_tclk): Remove.
5336 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5337 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5338 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5340 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5342 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5343 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5345 * Makefile (tests): Add tst-getpid2.
5346 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5347 (do_test): Use it. Use __clone2 instead of clone on ia64.
5348 * tst-getpid2.c: New test.
5350 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5352 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5354 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5356 * Makefile (tests): Add tst-getpid1.
5357 * tst-getpid1.c: New file.
5358 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5359 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5361 2004-12-02 Roland McGrath <roland@redhat.com>
5363 * Makefile (libpthread-nonshared): Variable removed.
5364 ($(objpfx)libpthread_nonshared.a): Target removed.
5365 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5366 These are now handled by generic magic from
5367 libpthread-static-only-routines being set.
5369 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5371 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5372 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5373 _POSIX_THREAD_PRIO_PROTECT): Define.
5374 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5375 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5376 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5378 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5380 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5381 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5382 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5383 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5384 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5385 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5386 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5388 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5390 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5392 * Makefile (libpthread-routines): Add pthread_setschedprio.
5393 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5394 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5395 * pthread_setschedprio.c: New file.
5397 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5399 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5400 * pthread_cancel.c (pthread_create): Likewise.
5402 * Makefile (libpthread-routines): Add vars.
5403 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5404 * init.c (__default_stacksize, __is_smp): Remove.
5406 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5407 and define a wrapper macro.
5408 (PTHREAD_STATIC_FN_REQUIRE): Define.
5409 * allocatestack.c (__find_thread_by_id): Undefine.
5410 * pthread_create (__pthread_keys): Remove.
5411 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5412 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5413 PTHREAD_STATIC_FN_REQUIRE.
5415 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5417 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5418 parameter to REGISTER macro.
5420 2004-11-17 Roland McGrath <roland@redhat.com>
5422 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5423 Make sure SIGCANCEL is blocked as well.
5425 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5427 * sysdeps/pthread/setxid.h: New file.
5428 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5429 (struct xid_command): Add forward decl.
5430 (struct pthread_functions): Change return type of __nptl_setxid hook
5432 * pthreadP.h (__nptl_setxid): Change return type to int.
5433 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5434 calling thread, return its return value and set errno on failure.
5435 * descr.h (struct xid_command): Change id type to long array.
5437 * Makefile: Add rules to build and test tst-setuid1 and
5439 * tst-setuid1.c: New test.
5440 * tst-setuid1-static.c: New test.
5442 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5444 * Makefile (tests): Add tst-exit3.
5445 * tst-exit3.c: New test.
5447 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5449 * Makefile (tests): Add tst-exit2.
5450 * tst-exit2.c: New file.
5452 2004-11-09 Roland McGrath <roland@redhat.com>
5455 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5456 here, before calling clone.
5457 * pthread_create.c (start_thread): Don't do it here.
5459 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5461 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5463 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5465 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5466 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5469 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5471 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5472 if sched_priority is not between minprio and maxprio.
5474 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5476 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5477 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5479 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5480 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5482 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5484 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5485 not-cancelable I/O functions.
5487 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5489 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5490 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5491 make sure 2 is stored in the futex and we looked at the old value.
5492 Fix a few other problems to return the correct value.
5494 2004-10-14 Richard Henderson <rth@redhat.com>
5496 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5499 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5501 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5502 of pthread-functions.h and pthreaddef.h.
5503 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5505 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5506 Change __data.__nwaiters from int to unsigned int.
5508 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5509 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5511 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5514 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5515 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5517 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5519 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5520 test fails, remove message queue.
5521 (tf_msgsnd): Likewise.
5523 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5525 * tst-clock1.c: Change #ifdef to #if defined.
5526 * tst-clock2.c: Likewise.
5527 * tst-cond11.c: Likewise.
5529 * sysdeps/pthread/timer_create.c (timer_create): Use
5530 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5531 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5534 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5536 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5537 _POSIX_THREAD_CPUTIME): Define to 0.
5539 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5541 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5542 and _POSIX_THREAD_CPUTIME to zero.
5543 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5544 * tst-barrier2.c: Fix testing for POSIX feature.
5545 * tst-clock1.c: Likewise.
5546 * tst-clock2.c: Likewise.
5547 * tst-cond11.c: Likewise.
5548 * tst-cond4.c: Likewise.
5549 * tst-cond6.c: Likewise.
5550 * tst-flock2.c: Likewise.
5551 * tst-mutex4.c: Likewise.
5552 * tst-mutex9.c: Likewise.
5553 * tst-rwlock12.c: Likewise.
5554 * tst-rwlock4.c: Likewise.
5555 * tst-signal1.c: Likewise.
5556 * tst-spin2.c: Likewise.
5557 * sysdeps/pthread/posix-timer.h: Likewise.
5558 * sysdeps/pthread/timer_create.c: Likewise.
5559 * sysdeps/pthread/timer_routines.c: Likewise.
5561 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5563 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5564 (__lll_mutex_timedlock_wait): Address futex correctly.
5566 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5567 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5568 make sure 2 is stored in the futex and we looked at the old value.
5569 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5570 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5571 which might very well made the code not working at all before.
5574 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5576 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5577 allow SIGSETXID to be sent.
5578 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5579 for SIGSETXID to be defined.
5580 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5581 SIGSETXID cannot be blocked.
5583 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5584 Add __extension__ to long long types.
5585 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5586 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5587 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5588 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5589 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5590 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5591 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5593 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5595 * descr.h (struct pthread): Add stopped_start field.
5596 * sysdeps/pthread/createthread.c (create_thread): Set
5597 start_stopped flag in descriptor for new thread appropriately.
5598 * pthread_create.c (start_thread): Only take lock to be stopped on
5599 startup if stopped_start flag says so.
5601 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5603 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5604 is created detached and if yes, do not try to free the stack in case
5605 the thread creation failed.
5606 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5607 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5608 case there has been no error. [BZ #405]
5610 * pthread_create.c (start_thread): Don't wait for scheduler data
5611 etc to be set at the beginning of the function. The cancellation
5612 infrastructure must have been set up. And enable async
5613 cancellation before potentially going to sleep. [BZ #401]
5615 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5617 * Versions: Remove exports for pthread_set*id_np functions.
5618 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5620 * Makefile: Don't build pthread_set*id code for now.
5622 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5624 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5626 * allocatestack.c (__nptl_setxid): New function.
5627 * descr.h (struct xid_command): Define type.
5628 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5629 (sighandler_setxid): New function.
5630 (__pthread_initialize_minimal): Register sighandler_setxid for
5632 * pt-allocrtsig.c: Update comment.
5633 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5634 Declare __nptl_setxid.
5635 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5636 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5637 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5638 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5639 and pthread_setresuid_np.
5640 * pthread_setgid_np.c: New file.
5641 * pthread_setuid_np.c: New file.
5642 * pthread_setegid_np.c: New file.
5643 * pthread_seteuid_np.c: New file.
5644 * pthread_setregid_np.c: New file.
5645 * pthread_setreuid_np.c: New file.
5646 * pthread_setresgid_np.c: New file.
5647 * pthread_setresuid_np.c: New file.
5648 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5649 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5650 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5651 and pthread_setresuid_np.
5652 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5653 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5654 pthread_setregid, and pthread_setresgid.
5656 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5658 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5659 ENOMEM when out of memory.
5661 2004-09-10 Roland McGrath <roland@redhat.com>
5664 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5665 code, since we don't try to use the broken CLONE_STOPPED any more.
5666 * pthread_create.c (start_thread): Likewise.
5668 2004-09-15 Richard Henderson <rth@redhat.com>
5670 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5672 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5674 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5675 (__libc_unwind_longjmp): Delete macro and declare as function.
5676 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5677 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5679 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5680 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5681 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5683 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5685 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5687 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5688 types also for __USE_XOPEN2K.
5689 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5690 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5691 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5692 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5693 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5694 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5695 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5698 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5700 * sysdeps/pthread/pthread.h
5701 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5702 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5703 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5704 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5707 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5709 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5710 PSEUDO to be used with . prefix.
5712 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5713 Use atomic_increment instead of atomic_exchange_and_add.
5714 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5716 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5718 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5721 * allocatestack.c (allocate_stack): Use atomic_increment_val
5722 instead of atomic_exchange_and_add.
5723 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5724 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5726 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5729 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5730 the initialization function might throw.
5732 2005-09-05 Richard Henderson <rth@redhat.com>
5734 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5735 Move definition inside libpthread, libc, librt check. Provide
5736 definition for rtld.
5738 2004-09-02 Ulrich Drepper <drepper@redhat.com>
5740 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5741 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5742 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5743 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5744 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5745 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5746 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5747 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5750 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5751 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5752 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5754 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5755 Decrement __nwaiters. If pthread_cond_destroy has been called and
5756 this is the last waiter, signal pthread_cond_destroy caller and
5757 avoid using the pthread_cond_t structure after unlock.
5758 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5759 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5760 Read clock type from the least significant bits of __nwaiters instead
5762 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5763 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5765 2004-08-31 Jakub Jelinek <jakub@redhat.com>
5768 * Makefile (tests): Add tst-cond20 and tst-cond21.
5769 * tst-cond20.c: New test.
5770 * tst-cond21.c: New test.
5771 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5772 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5774 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5776 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5777 (pthread_cond_t): Likewise.
5778 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5780 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5782 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5784 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5785 (cond_nwaiters): New.
5787 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5788 if there are waiters not signalled yet.
5789 Wait until all already signalled waiters wake up.
5790 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5791 __nwaiters. If pthread_cond_destroy has been called and this is the
5792 last waiter, signal pthread_cond_destroy caller and avoid using
5793 the pthread_cond_t structure after unlock.
5794 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5795 decrement it when leaving. If pthread_cond_destroy has been called
5796 and this is the last waiter, signal pthread_cond_destroy caller.
5797 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5798 Likewise. Read clock type from the least significant bits of
5799 __nwaiters instead of __clock.
5800 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5801 whether clock ID can be encoded in COND_CLOCK_BITS bits.
5802 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5803 clock type just from the last COND_CLOCK_BITS bits of value.
5804 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5805 instead of __clock, just from second bit of condattr's value.
5807 2004-08-30 Jakub Jelinek <jakub@redhat.com>
5809 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5810 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
5812 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5814 2004-08-15 Roland McGrath <roland@frob.com>
5816 * pthread_atfork.c: Update copyright terms including special exception
5817 for these trivial files, which are statically linked into executables
5818 that use dynamic linking for the significant library code.
5820 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5822 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5823 pthread_rwlock_rdlock.
5824 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5825 Decrease __nr_readers_queued after reacquiring lock.
5826 * sysdeps/pthread/pthread_rwlock_timedrdlock
5827 (pthread_rwlock_timedrdlock): Likewise.
5828 Reported by Bob Cook <bobcook47@hotmail.com>.
5830 2004-08-11 Jakub Jelinek <jakub@redhat.com>
5832 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5833 before pthread_barrier_wait.
5835 2004-08-07 Ulrich Drepper <drepper@redhat.com>
5837 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5838 Remove unnecessary exception handling data.
5840 2004-07-23 Jakub Jelinek <jakub@redhat.com>
5843 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5844 instead of clockid_t.
5846 2004-07-21 Roland McGrath <roland@redhat.com>
5848 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5850 2004-07-19 Roland McGrath <roland@redhat.com>
5852 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5854 2004-07-02 Roland McGrath <roland@redhat.com>
5856 * configure: Don't exit.
5858 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5860 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5861 (__pthread_cond_timedwait): Check for invalid nanosecond in
5864 2004-07-07 Ulrich Drepper <drepper@redhat.com>
5866 * Makefile: Add rules to build and run tst-fini1.
5867 * tst-fini1.c: New file.
5868 * tst-fini1mod.c: New file.
5870 2004-07-05 Ulrich Drepper <drepper@redhat.com>
5872 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5873 if no cancellation support is needed.
5874 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5875 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5876 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5877 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5878 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5879 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5880 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5881 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5882 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5884 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5885 only if not already defined.
5887 2004-07-05 Jakub Jelinek <jakub@redhat.com>
5889 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5890 constraint "m" instead of "0" for futex.
5892 * shlib-versions: Add powerpc64-.*-linux.*.
5894 2004-07-04 Jakub Jelinek <jakub@redhat.com>
5896 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5897 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5899 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5900 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5903 2004-06-29 Roland McGrath <roland@redhat.com>
5905 * Banner: NPTL no longer has its own version number.
5906 * Makefile (nptl-version): Variable removed.
5907 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5908 using $(version), the glibc version number.
5910 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5912 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5913 Fix branch offset for a PLT entry.
5914 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5916 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5918 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5920 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5923 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5925 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5928 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5930 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5931 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5933 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5934 (pthread_rwlock_timedrdlock): Likewise.
5936 2004-06-22 Jakub Jelinek <jakub@redhat.com>
5938 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5939 Set __r7 to val, not mutex.
5941 2004-06-27 Ulrich Drepper <drepper@redhat.com>
5943 * Makefile: Add rules to build tst-rwlock14.
5944 * tst-rwlock14.c: New file.
5946 2004-06-24 Boris Hu <boris.hu@intel.com>
5948 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5950 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5952 2004-06-19 Andreas Jaeger <aj@suse.de>
5954 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5955 assembler in last patch.
5957 2004-06-17 Ulrich Drepper <drepper@redhat.com>
5959 * sysdeps/pthread/pthread_cond_timedwait.c
5960 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5961 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5962 (__pthread_cond_timedwait): Check for invalid nanosecond in
5964 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5965 * tst-cond19.c: New file.
5966 * Makefile: Add rules to build and run tst-cond19.
5968 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5970 * tst-context1.c (GUARD_PATTERN): Defined.
5971 (tst_context_t): Define struct containing ucontext_t & guard words.
5972 (ctx): Declare as an array of tst_context_t.
5973 (fct): Verify uc_link & guard words are still valid.
5974 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5976 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5978 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5979 Add __data.__futex field, reshuffle __data.__clock.
5980 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5981 (__pthread_cond_signal): Increment __futex at the same time as
5982 __wakeup_seq or __total_seq. Pass address of __futex instead of
5983 address of low 32-bits of __wakeup_seq to futex syscall.
5984 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5985 (__pthread_cond_wait): Likewise. Pass __futex value from before
5986 releasing internal lock to FUTEX_WAIT.
5987 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5988 (__pthread_cond_timedwait): Likewise.
5989 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5990 (FUTEX_CMP_REQUEUE): Define.
5991 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5992 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5993 Pass __futex value from before the unlock and __futex address instead
5994 of address of low 32-bits of __wakeup_seq to futex syscall.
5995 Fallback to FUTEX_WAKE all on any errors.
5997 2004-06-08 Jakub Jelinek <jakub@redhat.com>
5999 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6001 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6002 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6003 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6004 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6005 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6007 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6009 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6010 Add memory clobber to inline assembly.
6011 (__lll_mutex_trylock): Likewise.
6012 (__lll_mutex_cond_trylock): Likewise.
6014 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6016 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6017 Pass val argument as 6th system call argument in %r7.
6019 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6021 * Makefile (tests): Add tst-cond16.
6022 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6023 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6024 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6025 Add __data.__futex field, reshuffle __data.__clock.
6026 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6027 (__pthread_cond_signal): Increment __futex at the same time as
6028 __wakeup_seq or __total_seq. Pass address of __futex instead of
6029 address of low 32-bits of __wakeup_seq to futex syscall.
6030 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6031 (__pthread_cond_wait): Likewise. Pass __futex value from before
6032 releasing internal lock to FUTEX_WAIT.
6033 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6034 (__pthread_cond_timedwait): Likewise.
6035 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6036 (FUTEX_CMP_REQUEUE): Define.
6037 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6038 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6039 Pass __futex value from before the unlock and __futex address instead
6040 of address of low 32-bits of __wakeup_seq to futex syscall.
6041 Fallback to FUTEX_WAKE all on any errors.
6042 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6044 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6045 internally. Return non-zero if error, zero if success.
6046 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6047 Add __data.__futex field, reshuffle __data.__clock.
6048 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6050 (lll_futex_requeue): Add val argument, return 1 unconditionally
6052 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6053 Add __data.__futex field, reshuffle __data.__clock.
6054 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6056 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6057 internally. Return non-zero if error, zero if success.
6058 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6059 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6060 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6062 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6063 internally. Return non-zero if error, zero if success.
6064 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6065 Add __data.__futex field, reshuffle __data.__clock.
6066 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6068 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6069 internally. Return non-zero if error, zero if success.
6070 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6071 Add __data.__futex field, reshuffle __data.__clock.
6072 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6073 Add __data.__futex field, reshuffle __data.__clock.
6074 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6075 Increment __futex at the same time as __wakeup_seq or __total_seq.
6076 Pass address of __futex instead of address of low 32-bits of
6077 __wakeup_seq to futex syscall.
6078 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6079 Pass __futex value from before releasing internal lock
6081 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6082 Likewise. Avoid unnecessary shadowing of variables.
6083 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6084 Set __futex to 2 * __total_seq. Pass __futex value from before the
6085 unlock and __futex address instead of address of low 32-bits of
6086 __wakeup_seq to futex_requeue macro, adjust for new return value
6088 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6089 (__pthread_cond_signal): Increment __futex at the same time as
6090 __wakeup_seq or __total_seq. Pass address of __futex instead of
6091 address of low 32-bits of __wakeup_seq to futex syscall.
6092 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6093 (__pthread_cond_wait): Likewise. Pass __futex value from before
6094 releasing internal lock to FUTEX_WAIT.
6095 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6096 (__pthread_cond_timedwait): Likewise.
6097 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6098 (FUTEX_CMP_REQUEUE): Define.
6099 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6100 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6101 Pass __futex value from before the unlock and __futex address instead
6102 of address of low 32-bits of __wakeup_seq to futex syscall.
6103 Fallback to FUTEX_WAKE all on any errors.
6105 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6107 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6108 Add nop to align the end of critical section.
6109 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6111 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6113 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6114 Add __broadcast_seq field.
6115 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6116 all waiters as woken with woken_seq and bump broadcast counter.
6117 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6118 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6119 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6120 Comment typo fixes. Avoid returning -ETIMEDOUT.
6122 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6125 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6126 Reported by Kaz Kojima.
6128 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6130 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6132 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6134 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6135 __broadcast_seq with bc_seq after acquiring internal lock instead of
6138 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6140 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6142 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6143 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6144 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6145 (pthread_cond_t): Add __data.__broadcast_seq field.
6146 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6147 (FRAME_SIZE): Define.
6148 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6150 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6152 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6154 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6155 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6158 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6160 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6161 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6162 Add __broadcast_seq field.
6163 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6164 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6165 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6166 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6167 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6168 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6169 all waiters as woken with woken_seq and bump broadcast counter.
6170 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6171 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6172 __broadcast_seq field.
6173 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6174 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6175 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6176 * pthread_cond_init.c: Initialize __broadcast_seq field.
6177 * Makefile (tests): Add tst-cond17 and tst-cond18.
6178 Add .NOTPARALLEL goal.
6179 * tst-cond16.c: New file. From Jakub.
6180 * tst-cond17.c: New file. From Jakub.
6181 * tst-cond18.c: New file. From Jakub.
6183 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6185 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6188 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6189 Parametrize frame size. Correct some unwind info.
6190 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6192 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6194 * tst-stack3.c: Note testing functionality beyond POSIX.
6196 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6198 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6199 Change conditional from ifdef to if.
6201 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6203 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6204 SYSDEP_CANCEL_ERROR): Define.
6207 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6209 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6211 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6213 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6215 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6217 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6218 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6219 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6220 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6222 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6224 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6225 thread has all signals blocked.
6227 2004-04-18 Andreas Jaeger <aj@suse.de>
6229 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6230 (SEM_VALUE_MAX): Add missing brace.
6232 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6234 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6236 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6237 * sysdeps/pthread/tst-mqueue8x.c: New test.
6238 * tst-cancel4.c: Update comment about message queues.
6240 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6241 return it_value { 0, 0 }.
6242 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6244 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6245 assertion for SIGEV_NONE.
6246 (thread_attr_compare): Compare all attributes, not just a partial
6249 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6251 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6253 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6255 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6256 Just use a plain number.
6257 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6258 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6259 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6260 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6261 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6262 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6263 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6265 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6267 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6269 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6271 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6273 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6274 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6275 of calling sigwaitinfo.
6277 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6279 * allocatestack.c (allocate_stack): Set reported_guardsize
6281 * pthread_getattr_np.c (pthread_getattr_np): Use
6282 reported_guardsize instead of guardsize.
6283 * descr.h (struct pthread): Add reported_guardsize field.
6285 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6287 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6289 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6291 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6293 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6295 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6296 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6297 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6298 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6299 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6301 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6302 (_POSIX_MESSAGE_PASSING): Define.
6303 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6304 (_POSIX_MESSAGE_PASSING): Define.
6305 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6306 (_POSIX_MESSAGE_PASSING): Define.
6308 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6310 * tst-context1.c (fct): Check whether correct stack is used.
6312 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6314 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6315 matching constraints for asm mem parameters.
6317 * tst-clock2.c (tf): Don't define unless needed.
6319 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6321 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6324 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6326 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6327 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6328 * pthreadP.h: Declare __nptl_deallocate_tsd.
6329 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6332 * Makefile (tests): Add tst-tsd5.
6333 * tst-tsd5.c: New file.
6335 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6337 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6338 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6339 is SHLIB_COMPAT check.
6340 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6341 (__pthread_attr_getaffinity_old): Likewise.
6342 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6343 (__pthread_getaffinity_old): Likewise.
6344 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6345 (__pthread_setaffinity_old): Likewise.
6347 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6349 * allocatestack.c (_make_stacks_executable): Call
6350 _dl_make_stack_executable first.
6352 2004-03-24 Roland McGrath <roland@redhat.com>
6354 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6355 constraint instead of "0".
6357 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6359 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6360 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6362 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6363 code to avoid warning.
6365 2004-03-24 Andreas Jaeger <aj@suse.de>
6367 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6368 (__pthread_attr_setaffinity_old): Remove const.
6370 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6372 * sysdeps/unix/sysv/linux/smp.h: New file.
6373 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6374 * init.c: Define __is_smp.
6375 (__pthread_initialize_minimal_internal): Call is_smp_system to
6376 initialize __is_smp.
6377 * pthreadP.h: Declare __is_smp.
6378 Define MAX_ADAPTIVE_COUNT is necessary.
6379 * pthread_mutex_init.c: Add comment regarding __spins field.
6380 * pthread_mutex_lock.c: Implement adaptive mutex type.
6381 * pthread_mutex_timedlock.c: Likewise.
6382 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6383 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6385 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6386 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6387 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6388 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6389 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6390 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6391 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6392 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6393 lll_mutex_cond_trylock.
6394 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6395 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6396 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6397 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6398 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6399 Define BUSY_WAIT_NOP.
6400 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6401 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6403 * tst-mutex5.c: Add support for testing adaptive mutexes.
6404 * tst-mutex7.c: Likewise.
6405 * tst-mutex5a.c: New file.
6406 * tst-mutex7a.c: New file.
6407 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6409 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6410 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6411 vgettimeofday call might destroy the content.
6413 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6416 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6417 No need to restrict type of ret. Make it int. Add comment.
6419 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6420 Remove unnecessary setne instruction.
6422 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6424 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6425 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6426 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6427 If realloc fails, break out of the loop.
6429 2004-03-20 Andreas Jaeger <aj@suse.de>
6431 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6432 (__pthread_setaffinity_old): Fix interface.
6433 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6434 (__pthread_getaffinity_old): Likewise.
6436 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6437 (__pthread_setaffinity_new): Remove duplicate declaration.
6439 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6441 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6442 the return value to a safe register.
6443 (CDISABLE): Set the function argument correctly.
6445 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6447 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6448 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6449 Rewrite so that only one locked memory operation per round is needed.
6450 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6451 (pthread_barrier_wait): After wakeup, release lock only when the
6452 last thread stopped using the barrier object.
6453 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6454 (__pthread_cond_wait): Don't store mutex address if the current
6455 value is ~0l. Add correct cleanup support and unwind info.
6456 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6457 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6458 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6459 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6460 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6461 Add correct cleanup support and unwind info.
6462 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6463 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6464 information for syscall wrappers.
6466 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6468 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6469 cpusetsize field, remove next.
6470 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6471 parameter for size of the CPU set.
6472 (pthread_setaffinity_np): Likewise.
6473 (pthread_attr_getaffinity_np): Likewise.
6474 (pthread_attr_setaffinity_np): Likewise.
6475 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6476 interface change, keep compatibility code.
6477 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6478 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6479 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6480 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6481 __pthread_getaffinity_np.
6482 * Versions: Add version for changed interfaces.
6483 * tst-attr3.c: Adjust test for interface change.
6484 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6485 increasing buffer sizes.
6486 * pthread_attr_destroy.c: Remove unused list handling.
6487 * pthread_attr_init.c: Likewise.
6489 2004-03-17 Roland McGrath <roland@redhat.com>
6491 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6492 first argument to clock_getres so we ever enable kernel timers.
6494 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6496 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6498 2004-03-12 Richard Henderson <rth@redhat.com>
6500 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6501 oldvalue from CENABLE to CDISABLE.
6503 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6505 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6506 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6507 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6508 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6510 2004-03-11 Richard Henderson <rth@redhat.com>
6512 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6513 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6514 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6516 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6518 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6519 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6520 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6522 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6524 * forward.c (__pthread_cond_broadcast_2_0,
6525 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6526 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6527 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6529 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6531 * sysdeps/sh/tcb-offsets.sym: Add PID.
6532 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6533 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6535 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6537 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6538 include <sysdep-cancel.h>, vfork is no cancellation point.
6539 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6540 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6541 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6543 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6545 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6547 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6548 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6550 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6552 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6553 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6554 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6555 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6556 of DO_CALL_VIA_BREAK. Work around a gas problem.
6558 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6559 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6560 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6561 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6562 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6563 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6565 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6566 a local register for saving old PID. Negate PID in parent upon exit.
6568 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6570 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6571 before syscall, set to the old value in the parent afterwards.
6572 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6573 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6575 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6576 before syscall, set to the old value in the parent afterwards.
6577 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6578 * sysdeps/s390/tcb-offsets.sym: Add PID.
6580 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6581 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6582 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6583 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6584 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6585 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6587 2004-03-10 Andreas Schwab <schwab@suse.de>
6589 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6590 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6591 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6593 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6595 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6596 * tst-cancel21.c (do_one_test): Likewise.
6597 Reported by Gordon Jin <gordon.jin@intel.com>.
6599 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6601 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6602 if non-zero and set to INT_MIN if zero.
6603 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6604 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6605 (SAVE_PID, RESTORE_PID): Define.
6607 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6608 Use relative path to avoid including NPTL i386/vfork.S.
6609 (SAVE_PID, RESTORE_PID): Define.
6610 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6611 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6612 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6614 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6615 * tst-vfork1.c: New test.
6616 * tst-vfork2.c: New test.
6617 * tst-vfork1x.c: New test.
6618 * tst-vfork2x.c: New test.
6620 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6622 * sysdeps/i386/tcb-offsets.sym: Add PID.
6623 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6624 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6625 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6627 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6629 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6631 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6633 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6636 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6638 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6641 * tst-once4.c: Remove unnecessary macro definition.
6643 * tst-mutex7.c (do_test): Limit thread stack size.
6644 * tst-once2.c (do_test): Likewise.
6645 * tst-tls3.c (do_test): Likewise.
6646 * tst-tls1.c (do_test): Likewise.
6647 * tst-signal3.c (do_test): Likewise.
6648 * tst-kill6.c (do_test): Likewise.
6649 * tst-key4.c (do_test): Likewise.
6650 * tst-join4.c (do_test): Likewise.
6651 * tst-fork1.c (do_test): Likewise.
6652 * tst-context1.c (do_test): Likewise.
6653 * tst-cond2.c (do_test): Likewise.
6654 * tst-cond10.c (do_test): Likewise.
6655 * tst-clock2.c (do_test): Likewise.
6656 * tst-cancel10.c (do_test): Likewise.
6657 * tst-basic2.c (do_test): Likewise.
6658 * tst-barrier4.c (do_test): Likewise.
6660 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6662 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6664 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6666 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6667 (__pthread_cond_timedwait): Optimize wakeup test.
6668 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6669 (__pthread_cond_wait): Likewise.
6670 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6671 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6674 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6676 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6677 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6678 the atomic instruction needed.
6679 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6680 (__lll_mutex_lock_wait): Likewise.
6682 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6684 * Makefile (tests): Add tst-cond14 and tst-cond15.
6685 * tst-cond14.c: New file.
6686 * tst-cond15.c: New file.
6688 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6690 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6691 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6692 needs to be implemented differently to be useful.
6694 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6696 * pthread_attr_setschedparam.c: Don't test priority against limits
6697 here. Set ATTR_FLAG_SCHED_SET flag.
6698 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6699 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6700 from parent thread to child. If attribute is used and scheduling
6701 parameters are not inherited, copy parameters from attribute or
6702 compute them. Check priority value.
6703 * pthread_getschedparam.c: If the parameters aren't known yet get
6704 them from the kernel.
6705 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6706 ATTR_FLAG_POLICY_SET flag for thread.
6707 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6708 and ATTR_FLAG_POLICY_SET.
6710 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6712 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6713 fail if stack address hasn't been set. Just return 0.
6715 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6717 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6718 libpthread for the files in this list.
6719 (CFLAGS-tst-unload): Removed.
6720 * tst-unload.c (do_test): Don't use complete path for
6723 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6726 2004-02-22 Ulrich Drepper <drepper@redhat.com>
6728 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6729 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6730 operation per round is needed.
6731 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6732 (__lll_mutex_lock_wait): Likewise.
6734 2004-02-20 Ulrich Drepper <drepper@redhat.com>
6736 * tst-cancel9.c (cleanup): Don't print to stderr.
6738 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6740 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6742 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6744 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6745 (__syscall_error_handler2): Call CDISABLE.
6746 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6747 (__syscall_error_handler2): Call CDISABLE.
6749 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6750 Release lock before the loop, don't reacquire it.
6752 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6754 2004-02-19 Andreas Schwab <schwab@suse.de>
6756 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6759 2004-02-18 Ulrich Drepper <drepper@redhat.com>
6761 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6762 (pthread_barrier_wait): After wakeup, release lock only when the
6763 last thread stopped using the barrier object.
6764 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6765 (pthread_barrier_wait): Likewise.
6766 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6768 * Makefile (tests): Add tst-barrier4.
6769 * tst-barrier4.c: New file.
6771 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6772 (__pthread_cond_timedwait): Perform timeout test while holding
6773 internal lock to prevent wakeup race.
6774 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6775 * sysdeps/pthread/pthread_cond_timedwait.c
6776 (__pthread_cond_timedwait): Likewise.
6777 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6778 (__pthread_cond_timedwait): Likewise.
6780 2004-02-18 Jakub Jelinek <jakub@redhat.com>
6782 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6783 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6784 * Makefile (tests): Add tst-rwlock13.
6785 * tst-rwlock13.c: New test.
6787 2004-02-16 Ulrich Drepper <drepper@redhat.com>
6789 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6790 (__condvar_tw_cleanup): Little optimization.
6791 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6793 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6795 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6796 libpthread as "lib" parameter to SHLIB_COMPAT.
6797 (__novmx_siglongjmp): Fix typo in function name.
6798 (__novmx_longjmp): Fix typo in function name.
6800 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6802 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6805 * sysdeps/generic/pt-longjmp.c: Moved to...
6806 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
6808 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
6810 * Makefile (libpthread-routines): Add pt-cleanup.
6811 * pt-longjmp.c: Removed.
6812 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6813 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6814 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6815 Version longjmp, siglongjmp for GLIBC_2.3.4.
6816 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6818 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6820 * sysdeps/pthread/pthread_cond_timedwait.c
6821 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6822 Reuse code. Add __builtin_expects.
6824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6825 (__pthread_cond_timedwait): Get internal lock in case timeout has
6826 passed before the futex syscall.
6827 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6829 2004-01-20 Ulrich Drepper <drepper@redhat.com>
6831 * allocatestack.c: Pretty printing.
6833 * sysdeps/pthread/createthread.c (create_thread): Don't add
6834 CLONE_DETACHED bit if it is not necessary.
6836 2004-01-16 Ulrich Drepper <drepper@redhat.com>
6838 * pthread_getattr_np.c: Include ldsodefs.h.
6840 2004-01-16 Richard Henderson <rth@redhat.com>
6842 * allocatestack.c: Don't declare __libc_stack_end.
6843 * init.c (__pthread_initialize_minimal_internal): Likewise.
6844 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6846 2004-01-15 Richard Henderson <rth@redhat.com>
6848 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6849 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6850 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6851 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6852 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6853 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6854 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6855 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6857 2004-01-14 Ulrich Drepper <drepper@redhat.com>
6859 * init.c (pthread_functions): Make array const.
6861 2004-01-13 Ulrich Drepper <drepper@redhat.com>
6863 * allocatestack.c (__make_stacks_executable): Change interface.
6864 Check parameters. Pass parameter on to libc counterpart.
6865 * pthreadP.h: Change declaration.
6867 2004-01-13 Richard Henderson <rth@redhat.com>
6869 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6871 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6874 * sysdeps/alpha/Makefile: New file.
6875 * sysdeps/alpha/tcb-offsets.sym: New file.
6876 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6877 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6879 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6882 2004-01-08 Jakub Jelinek <jakub@redhat.com>
6884 * Makefile (tests): Add tst-backtrace1.
6885 * tst-backtrace1.c: New test.
6887 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6889 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6890 register as second parameter to the REGISTER macro.
6891 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6892 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6893 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6894 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6895 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6896 of thread register as second parameter to REGISTER macro in 64 case.
6898 2004-01-03 Ulrich Drepper <drepper@redhat.com>
6900 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6901 (CFLAGS-getpid.o): Defined.
6902 (CFLAGS-getpid.os): Defined.
6904 2003-12-31 Ulrich Drepper <drepper@redhat.com>
6906 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6907 returned for main thread does not overlap with any other VMA.
6908 Patch by Jakub Jelinek.
6910 2003-12-29 Jakub Jelinek <jakub@redhat.com>
6912 * tst-raise1.c: Include stdio.h.
6914 2003-12-23 Jakub Jelinek <jakub@redhat.com>
6916 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6917 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6918 If pid is 0, set it to selftid.
6919 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6920 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6921 != 0, return self->tid without doing a syscall.
6922 * descr.h (struct pthread): Move pid field after tid.
6924 * Makefile (tests): Add tst-raise1.
6925 * tst-raise1.c: New file.
6927 2003-12-23 Roland McGrath <roland@redhat.com>
6929 * tst-oddstacklimit.c: New file.
6930 * Makefile (tests): Add it.
6931 (tst-oddstacklimit-ENV): New variable.
6933 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6934 value up to page size for __default_stacksize.
6936 2003-12-21 Ulrich Drepper <drepper@redhat.com>
6938 * Makefile (tests): Add tst-eintr5.
6939 * tst-eintr5.c: New file.
6941 * eintr.c (eintr_source): Prevent sending signal to self.
6943 * tst-eintr2.c (tf1): Improve error message.
6945 2003-12-20 Ulrich Drepper <drepper@redhat.com>
6947 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6948 * sysdeps/unix/sysv/linux/getpid.c: New file.
6949 * pthread_cancel.c: Add comment explaining use of PID field.
6950 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6951 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6952 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6953 temporarily to signal the field must not be relied on and updated
6955 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6956 temporarily negative.
6957 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6959 2003-12-19 Ulrich Drepper <drepper@redhat.com>
6961 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6962 (eintr_source): If ARG != NULL, use pthread_kill.
6963 * tst-eintr1.c: Adjust for this change.
6964 * tst-eintr2.c: Likewise.
6965 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6966 * tst-eintr3.c: New file.
6967 * tst-eintr4.c: New file.
6969 2003-12-19 Jakub Jelinek <jakub@redhat.com>
6971 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6972 if CANCELSTATE_BITMASK is set.
6973 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6976 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6977 (tests-reverse): Add tst-cancel23.
6978 * tst-cancel22.c: New test.
6979 * tst-cancel23.c: New test.
6981 2003-12-18 Ulrich Drepper <drepper@redhat.com>
6983 * tst-eintr1.c: Better error messages.
6985 * Makefile (tests): Add tst-eintr2.
6986 * tst-eintr2.c: New file.
6988 2003-12-18 Jakub Jelinek <jakub@redhat.com>
6990 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6991 (CFLAGS-tst-cancelx21.c): Set.
6992 * tst-cancel21.c: New test.
6993 * tst-cancelx21.c: New test.
6995 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6997 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6998 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6999 * pt-longjmp.c: Include jmpbuf-unwind.h.
7000 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7001 _JMPBUF_UNWINDS. Adjust compared pointers.
7002 * init.c (__pthread_initialize_minimal_internal): Initialize
7003 pd->stackblock_size.
7004 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7005 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7006 * sysdeps/i386/jmpbuf-unwind.h: New file.
7007 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7008 * sysdeps/s390/jmpbuf-unwind.h: New file.
7009 * sysdeps/sh/jmpbuf-unwind.h: New file.
7010 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7011 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7012 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7013 (_JMPBUF_CFA_UNWINDS): Remove.
7014 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7016 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7018 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7019 (CFLAGS-tst-cancelx20.c): Set.
7020 * tst-cancel20.c: New test.
7021 * tst-cancelx20.c: New test.
7023 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7025 * init.c (__pthread_initialize_minimal_internal): Don't treat
7026 architectures with separate register stack special here when
7027 computing default stack size.
7029 2003-12-17 Roland McGrath <roland@redhat.com>
7031 * Makefile (tst-cancelx7-ARGS): New variable.
7032 Reportd by Greg Schafer <gschafer@zip.com.au>.
7034 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7036 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7037 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7038 (tst-stack3-ENV): Set.
7039 ($(objpfx)tst-stack3-mem): New.
7040 * tst-stack3.c: New test.
7042 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7044 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7045 Add unwind directives. Drop unused .regstk directive.
7046 (_fini_EPILOG_BEGINS): Add unwind directives.
7048 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7050 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7051 Assume parameter is a pointer.
7052 (lll_futex_wake): Likewise.
7053 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7055 (lll_futex_wake): Likewise.
7056 Reported by Boris Hu.
7057 * sysdeps/unix/sysv/linux/unregister-atfork.c
7058 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7060 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7062 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7064 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7065 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7066 __rtld_lock_initialize for ld.so lock.
7067 Patch in part by Adam Li <adam.li@intel.com>.
7069 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7071 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7072 in $(gnulib). Also, remove stale comment.
7074 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7076 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7077 advantage of new syscall stub and optimize accordingly.
7079 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7080 from SYS_futex, to match expectations of
7081 sysdep.h:DO_INLINE_SYSCALL.
7082 (lll_futex_clobbers): Remove.
7083 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7084 (lll_futex_wake): Likewise.
7085 (lll_futex_requeue): Likewise.
7086 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7087 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7089 (__lll_mutex_lock): Likewise.
7090 (__lll_mutex_cond_lock): Likewise.
7091 (__lll_mutex_timed_lock): Likewise.
7092 (__lll_mutex_unlock): Likewise.
7093 (__lll_mutex_unlock_force): Likewise.
7095 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7096 comes before the include of <sysdep.h>.
7097 (THREAD_SELF_SYSINFO): New macro.
7098 (THREAD_SYSINFO): Likewise.
7099 (INIT_SYSINFO): New macro.
7100 (TLS_INIT_TP): Call INIT_SYSINFO.
7102 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7104 * sysdeps/pthread/createthread.c (create_thread): Use
7105 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7106 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7107 THREAD_SELF_SYSINFO instead of open code.
7108 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7109 (THREAD_SYSINFO): Likewise.
7111 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7113 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7115 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7117 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7118 instead of .init. Patch by David Mosberger.
7120 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7122 * sysdeps/pthread/configure.in: Remove broken declaration in C
7123 cleanup handling check.
7125 2003-11-30 Andreas Jaeger <aj@suse.de>
7127 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7128 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7131 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7133 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7134 * pthread_attr_destroy.c: Include shlib-compat.h.
7135 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7136 is set in iattr->flags.
7137 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7139 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7141 * Makefile (distribute): Add tst-cleanup4aux.c.
7143 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7146 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7148 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7149 pthread_cond_signal.
7151 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7152 store mutex address if the current value is ~0l.
7153 * sysdeps/pthread/pthread_cond_timedwait.c
7154 (__pthread_cond_timedwait): Likewise.
7155 * sysdeps/pthread/pthread_cond_broadcast.c
7156 (__pthread_cond_broadcast): Don't use requeue for pshared
7159 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7160 (__pthread_cond_wait): Don't store mutex address if the current
7162 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7163 (__pthread_cond_timedwait): Likewise.
7164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7165 (__pthread_cond_broadcast): Don't use requeue for pshared
7168 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7169 element with ~0l for pshared condvars, with NULL otherwise.
7171 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7172 (__pthread_cond_wait): Don't store mutex address if the current
7174 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7175 (__pthread_cond_timedwait): Likewise.
7176 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7177 (__pthread_cond_broadcast): Don't use requeue for pshared
7180 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7181 * tst-cond12.c: New file.
7182 * tst-cond13.c: New file.
7184 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7186 * sysdeps/pthread/configure.in: Make missing forced unwind support
7189 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7191 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7193 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7195 * Makefile: Add magic to clean up correctly.
7197 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7199 * unwind.c (FRAME_LEFT): Define.
7200 (unwind_stop): Handle old style cleanups here.
7201 (__pthread_unwind): Handle old style cleanups only if
7202 !HAVE_FORCED_UNWIND.
7203 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7204 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7205 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7206 ($(objpfx)tst-cleanupx4): Likewise.
7207 * tst-cleanup4.c: New test.
7208 * tst-cleanup4aux.c: New.
7209 * tst-cleanupx4.c: New test.
7211 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7213 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7214 lll_mutex_*lock macros to skip atomic operations on some archs.
7216 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7218 * sysdeps/pthread/tst-timer.c (main): Initialize
7219 sigev2.sigev_value as well.
7221 2003-10-15 Roland McGrath <roland@redhat.com>
7223 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7225 * sysdeps/pthread/configure: Regenerated.
7227 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7229 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7230 locking macros. No distinction between normal and mutex locking
7232 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7233 Merge bits from lowlevelmutex.S we still need.
7234 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7235 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7236 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7237 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7238 new mutex implementation.
7239 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7240 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7241 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7242 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7243 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7244 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7245 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7246 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7247 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7248 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7249 symbol for entry point to avoid cancellation.
7251 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7253 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7255 (SAVE_OLDTYPE_0): Fix a typo.
7257 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7259 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7260 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7262 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7264 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7267 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7269 * Makefile (tests): Add tst-cancel19.
7270 * tst-cancel19.c: New test.
7272 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7274 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7275 restoring of the old cancellation type.
7277 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7279 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7281 2003-09-27 Wolfram Gloger <wg@malloc.de>
7283 * sysdeps/pthread/malloc-machine.h: New file
7285 2003-09-24 Roland McGrath <roland@redhat.com>
7287 * allocatestack.c (__make_stacks_executable): Don't ignore return
7288 value from _dl_make_stack_executable.
7290 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7292 * allocatestack.c (__make_stacks_executable): Also change
7293 permission of the currently unused stacks.
7295 * allocatestack.c (change_stack_perm): Split out from
7296 __make_stacks_executable.
7297 (allocate_stack): If the required permission changed between the time
7298 we started preparing the stack and queueing it, change the permission.
7299 (__make_stacks_executable): Call change_stack_perm.
7301 * Makefile: Build tst-execstack-mod locally.
7302 * tst-execstack-mod.c: New file.
7304 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7306 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7308 2003-09-23 Roland McGrath <roland@redhat.com>
7310 * tst-execstack.c: New file.
7311 * Makefile (tests): Add it.
7312 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7313 (LDFLAGS-tst-execstack): New variable.
7315 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7316 whether to use PROT_EXEC for stack mmap.
7317 (__make_stacks_executable): New function.
7318 * pthreadP.h: Declare it.
7319 * init.c (__pthread_initialize_minimal_internal): Set
7320 GL(dl_make_stack_executable_hook) to that.
7322 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7324 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7325 recommendation from AMD re avoidance of lock prefix.
7327 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7329 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7330 lll_futex_timed_wait instead of lll_futex_wait.
7331 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7332 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7333 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7334 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7335 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7336 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7337 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7338 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7339 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7340 Completely revamp the locking macros. No distinction between
7341 normal and mutex locking anymore.
7342 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7343 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7344 __lll_lock_timedwait): Fix prototypes.
7345 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7346 __lll_lock_timedwait): Likewise.
7347 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7348 macros, add __builtin_expect.
7349 (lll_mutex_timedlock): Likewise. Fix return value.
7350 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7351 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7352 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7353 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7354 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7355 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7356 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7357 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7359 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7361 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7362 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7363 operation if possible.
7365 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7366 like jumping over the lock prefix.
7368 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7370 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7371 locking macros. No distinction between normal and mutex locking
7373 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7374 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7375 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7376 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7377 locking. Merge bits from lowlevelmutex.S we still need.
7378 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7379 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7380 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7381 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7382 * Makefile (routines): Remove libc-lowlevelmutex.
7383 (libpthread-rountines): Remove lowlevelmutex.
7384 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7385 for new mutex implementation.
7386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7387 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7388 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7389 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7390 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7392 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7394 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7395 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7396 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7397 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7398 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7399 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7400 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7401 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7403 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7405 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7406 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7407 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7409 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7410 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7412 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7414 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7415 in parameters of asm with output parameters.
7417 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7418 type of DECR parameter to int.
7419 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7421 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7423 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7424 guardsize for each thread.
7426 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7428 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7429 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7430 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7432 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7433 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7435 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7436 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7437 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7438 (pthread_getaffinity_np): Add hidden_def.
7440 * Makefile (tests): Add tst-attr3.
7441 * tst-attr3.c: New test.
7443 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7445 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7447 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7448 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7450 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7452 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7453 * tst-align.c: Include tst-stack-align.h.
7454 (tf, do_test): Use TEST_STACK_ALIGN macro.
7456 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7458 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7461 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7463 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7464 stack-related values for the initial thread.
7466 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7468 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7470 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7472 * pthread_mutex_lock.c: Minor code rearrangements.
7474 2003-09-05 Roland McGrath <roland@redhat.com>
7476 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7477 Instead, include ../nptl_db/db_info.c to do its magic.
7478 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7479 (__pthread_pthread_key_2ndlevel_size): Likewise.
7480 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7481 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7482 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7483 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7484 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7485 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7486 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7487 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7488 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7489 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7490 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7491 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7492 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7493 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7494 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7495 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7496 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7498 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7500 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7501 of pthread_t to be compatible with LT.
7502 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7503 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7504 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7505 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7506 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7507 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7508 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7510 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7512 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7514 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7516 * unwind-forcedunwind.c: Move to...
7517 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7518 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7519 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7520 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7521 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7522 * unwind.c: Include jmpbuf-unwind.h.
7523 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7525 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7527 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7528 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7529 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7530 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7531 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7532 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7533 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7534 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7535 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7536 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7537 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7539 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7540 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7541 * Makefile (tests): Add tst-stack2.
7542 * tst-stack2.c: New test.
7543 * tst-stack1.c: Include limits.h and sys/param.h.
7544 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7546 * pthread_condattr_setpshared.c: Include errno.h.
7547 (pthread_condattr_setpshared): Return EINVAL if pshared
7548 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7550 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7551 defined symbol for entry point to avoid cancellation.
7552 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7554 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7556 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7558 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7560 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7562 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7563 __close_nocancel, __read_nocancel, __write_nocancel,
7564 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7565 libpthread.so or librt.so, define to corresponding function
7566 without _nocancel suffix.
7567 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7568 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7569 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7571 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7573 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7575 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7576 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7578 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7579 in subsections has a symbol associated with it.
7581 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7582 defined symbol for entry point to avoid cancellation.
7583 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7585 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7587 * Makefile (tests): Add tst-tls5.
7588 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7589 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7590 ($(objpfx)tst-tls5): New.
7591 ($(objpfx)tst-tls6.out): Likewise.
7592 (tests): Depend on $(objpfx)tst-tls6.out.
7593 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7594 (do_test): Check pthread_self () return value alignment.
7595 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7596 (tf): Check pthread_self () return value alignment.
7597 * tst-tls5.c: New test.
7599 * tst-tls5mod.c: New.
7600 * tst-tls5moda.c: New.
7601 * tst-tls5modb.c: New.
7602 * tst-tls5modc.c: New.
7603 * tst-tls5modd.c: New.
7604 * tst-tls5mode.c: New.
7605 * tst-tls5modf.c: New.
7606 * tst-tls6.sh: New test.
7608 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7609 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7610 * init.c (pthread_functions): Initialize them.
7611 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7612 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7613 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7614 pthread_cond_timedwait@@GLIBC_2.3.2.
7616 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7618 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7619 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7620 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7621 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7622 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7623 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7625 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7627 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7628 _POSIX_THREAD_PRIORITY_SCHEDULING.
7629 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7631 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7633 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7634 nested function, use static inline function from libio.h.
7635 Code by Richard Henderson.
7637 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7640 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7642 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7643 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7644 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7645 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7646 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7647 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7648 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7649 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7650 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7651 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7652 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7653 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7654 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7655 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7656 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7657 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7658 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7659 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7660 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7661 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7662 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7663 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7664 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7665 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7666 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7667 * sysdeps/sparc/tls.h: New file.
7668 * sysdeps/sparc/tcb-offsets.sym: New file.
7669 * sysdeps/sparc/Makefile: New file.
7670 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7671 * init.c [__sparc__] (__NR_set_tid_address): Define.
7673 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7675 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7676 _IO_release_lock): Define.
7678 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7680 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7681 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7683 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7685 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7686 (__pthread_cleanup_class): Add missing return types of member
7689 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7691 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7692 (lll_mutex_unlock_force): Add memory barrier between store and futex
7695 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7697 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7698 tempmsg in first loop.
7700 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7702 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7703 _POSIX_THREAD_PRIORITY_SCHEDULING.
7704 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7706 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7708 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7709 (__rtld_lock_default_lock_recursive,
7710 __rtld_lock_default_unlock_recursive): Define.
7711 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7712 __rtld_lock_unlock_recursive): Define using
7713 GL(_dl_rtld_*lock_recursive).
7714 * init.c (__pthread_initialize_minimal_internal): Initialize
7715 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7716 Lock GL(_dl_load_lock) the same number of times as
7717 GL(_dl_load_lock) using non-mt implementation was nested.
7719 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7720 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7722 2003-08-06 Jakub Jelinek <jakub@redhat.com>
7724 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7727 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7729 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7731 2003-08-03 Jakub Jelinek <jakub@redhat.com>
7733 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7734 to first syscall error check. Move syscall error check for tkill
7735 into __ASSUME_CLONE_STOPPED #ifdef.
7737 2003-08-02 Ulrich Drepper <drepper@redhat.com>
7739 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7740 is not defined, do explicit synchronization.
7741 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7742 is not defined also unlock pd->lock for non-debugging case in case
7744 * pthread_create.c (start_thread): Always get and release pd->lock
7745 if __ASSUME_CLONE_STOPPED is not defined.
7746 (start_thread_debug): Removed. Adjust users.
7747 * allocatestack.c (allocate_stack): Always initialize lock if
7748 __ASSUME_CLONE_STOPPED is not defined.
7749 * Makefile (tests): Add tst-sched1.
7750 * tst-sched1.c: New file.
7752 * sysdeps/pthread/createthread.c (do_clone): Only use
7753 sched_setschduler and pass correct parameters.
7755 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7757 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7758 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7759 PTHREAD_STACK_MIN in comments.
7761 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7763 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7764 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7766 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7767 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7768 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7769 (__pthread_cleanup_upto): Fix prototype.
7770 (_longjmp_unwind): Adjust caller.
7771 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7772 Change second argument to const struct pointer.
7773 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7774 * tst-sem9.c (main): Likewise.
7775 * unwind.c: Include string.h for strlen prototype.
7777 2003-07-31 Ulrich Drepper <drepper@redhat.com>
7779 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7780 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7781 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7783 Patch by Nicholas Miell <nmiell@attbi.com>.
7785 2003-07-30 Jakub Jelinek <jakub@redhat.com>
7787 * init.c (__pthread_initialize_minimal_internal): Initialize
7788 GL(dl_init_static_tls).
7789 * pthreadP.h (__pthread_init_static_tls): New prototype.
7790 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7792 * Makefile (tests): Add tst-tls4.
7793 (modules-names): Add tst-tls4moda and tst-tls4modb.
7794 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7795 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7797 * tst-tls4.c: New file.
7798 * tst-tls4moda.c: New file.
7799 * tst-tls4modb.c: New file.
7801 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
7803 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7804 before __timer_dealloc.
7805 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7806 Don't call list_unlink.
7808 2003-07-29 Roland McGrath <roland@redhat.com>
7810 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7812 2003-07-25 Jakub Jelinek <jakub@redhat.com>
7814 * tst-cancel17.c (do_test): Check if aio_cancel failed.
7815 Don't reuse struct aiocb A if it failed.
7816 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7817 not just one byte, as that does not block.
7819 2003-07-22 Jakub Jelinek <jakub@redhat.com>
7821 * sysdeps/pthread/unwind-resume.c: New file.
7822 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7823 unwind-resume in csu subdir.
7824 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7826 (librt-sysdep_routines, librt-shared-only-routines): Add
7828 * sysdeps/pthread/rt-unwind-resume.c: New file.
7829 * unwind-forcedunwind.c: New file.
7830 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7831 (libpthread-shared-only-routines): Likewise.
7832 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7833 * pthreadP.h (pthread_cancel_init): New prototype.
7834 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7836 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7837 attr argument const struct pthread_attr *.
7839 * res.c (__res_state): Return __resp.
7840 * descr.h: Include resolv.h.
7841 (struct pthread): Add res field.
7842 * pthread_create.c: Include resolv.h.
7843 (start_thread): Initialize __resp.
7844 * Makefile (tests): Add tst-_res1.
7845 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7846 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7847 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7849 * tst-_res1.c: New file.
7850 * tst-_res1mod1.c: New file.
7851 * tst-_res1mod2.c: New file.
7853 2003-07-21 Ulrich Drepper <drepper@redhat.com>
7855 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7857 * Makefile: Define various *-no-z-defs variables for test DSOs
7858 which has undefined symbols.
7860 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7862 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7863 Retry if the stwcx fails to store once_control.
7865 2003-07-20 Ulrich Drepper <drepper@redhat.com>
7867 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7868 pthread_attr_setaffinity.
7869 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7870 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7871 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7872 * pthread_attr_destroy.c: Free cpuset element if allocated.
7873 * pthread_create.c: Pass iattr as additional parameter to
7875 * sysdeps/pthread/createthread.c: If attribute is provided and
7876 a new thread is created with affinity set or scheduling parameters,
7877 start thread with CLONE_STOPPED.
7878 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7879 pthread_attr_setaffinity.
7880 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7883 2003-07-15 Ulrich Drepper <drepper@redhat.com>
7885 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7887 2003-07-14 Ulrich Drepper <drepper@redhat.com>
7889 * sysdeps/pthread/configure.in: Require CFI directives also for
7892 2003-07-15 Jakub Jelinek <jakub@redhat.com>
7894 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7897 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7899 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7901 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7902 registers as variables. Call __pthread_mutex_unlock_usercnt.
7903 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7904 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7905 not self pointer in __writer. Compare with TID to determine
7907 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7908 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7910 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7912 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7913 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7914 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7915 macros also when compiling librt.
7917 2003-07-11 Jakub Jelinek <jakub@redhat.com>
7919 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7920 -fasynchronous-unwind-tables.
7921 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7922 (PSEUDO): Add cfi directives.
7923 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7925 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7928 2003-07-08 Jakub Jelinek <jakub@redhat.com>
7930 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7931 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7932 * unwind.c (__pthread_unwind_next): Add hidden_def.
7933 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7935 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7936 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7937 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7939 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7940 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7942 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7943 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7944 __pthread_unregister_cancel and __pthread_unwind_next.
7946 2003-07-04 Jakub Jelinek <jakub@redhat.com>
7948 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7949 different symbol for the cancellation syscall wrapper and
7950 non-cancellation syscall wrapper.
7951 (PSEUDO_END): Define.
7953 2003-07-05 Richard Henderson <rth@redhat.com>
7955 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7956 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7957 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7958 return actual return value from the syscall, not 0.
7960 2003-07-07 Ulrich Drepper <drepper@redhat.com>
7962 * descr.h (struct pthread): Add pid field.
7963 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7964 (__reclaim_stacks): Likewise.
7965 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7966 also check for PID of the signal source.
7967 (__pthread_initialize_minimal_internal): Also initialize pid field
7968 of initial thread's descriptor.
7969 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7970 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7971 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7972 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7973 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7975 2003-07-05 Ulrich Drepper <drepper@redhat.com>
7977 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7978 Fix use of parameter.
7979 (__libc_cleanup_pop): Likewise.
7981 2003-07-04 Ulrich Drepper <drepper@redhat.com>
7983 * init.c (sigcancel_handler): Change parameters to match handler
7984 for SA_SIGACTION. Check signal number and code to recognize
7985 invalid invocations.
7987 2003-07-03 Roland McGrath <roland@redhat.com>
7989 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7990 Apply sizeof (struct pthread) bias to r13 value.
7992 2003-07-03 Ulrich Drepper <drepper@redhat.com>
7994 * sysdeps/pthread/configure.in: Require CFI directives.
7996 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7998 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7999 libpthread compilation.
8000 * unwind.c (__pthread_unwind): Add hidden_def.
8001 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8003 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8005 * libc-cancellation.c (__libc_cleanup_routine): Define.
8006 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8007 (__pthread_cleanup_pop): Define.
8009 2003-07-01 Richard Henderson <rth@redhat.com>
8011 * sysdeps/alpha/elf/pt-initfini.c: New file.
8012 * sysdeps/alpha/pthread_spin_lock.S: New file.
8013 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8014 * sysdeps/alpha/pthreaddef.h: New file.
8015 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8016 * sysdeps/alpha/tls.h: New file.
8017 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8018 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8019 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8020 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8021 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8022 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8023 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8024 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8025 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8026 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8028 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8030 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8031 cleanup support and unwind info.
8033 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8035 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8036 Use correct cleanup handler registration. Add unwind info.
8037 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8038 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8039 * tst-once3.c: Add cleanup handler and check it is called.
8040 * tst-once4.c: Likewise.
8041 * tst-oncex3.c: New file.
8042 * tst-oncex4.c: New file.
8043 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8045 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8047 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8049 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8051 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8052 (tf_msgsnd): Likewise.
8054 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8055 premature returns a bit more.
8057 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8059 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8060 definition to the front.
8062 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8063 the cleanup functions to make the names unique. Fix dwarf opcode
8065 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8066 functions to make the names unique. Fix CFA offset for two blocks.
8068 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8070 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8071 missing closing braces.
8072 Patch by Christophe Saout <christophe@saout.de>.
8074 2003-06-24 Roland McGrath <roland@redhat.com>
8076 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8078 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8080 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8081 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8083 * pthreadP.h: Declare __find_thread_by_id.
8084 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8085 * pthread_clock_gettime.c: Allow using other thread's clock.
8086 * pthread_clock_settime.c: Likewise.
8087 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8088 * Makefile: Add rules to build and run tst-clock2.
8089 * tst-clock2.c: New file.
8091 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8093 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8094 to use exception-based cleanup handler.
8095 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8097 * tst-cond8.c (ch): Announce that we are done.
8099 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8101 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8102 Also test aio_suspend with timeout value.
8104 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8106 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8107 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8110 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8111 (__pthread_mutex_lock_internal): Likewise.
8112 (__pthread_mutex_unlock_internal): Likewise.
8113 (__pthread_mutex_unlock_usercnt): Declare.
8114 * pthread_mutex_destroy.c: Always fail if used in any way.
8115 * pthread_mutex_init.c: Update comment.
8116 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8117 * pthread_mutex_timedlock.c: Adjust __nusers.
8118 * pthread_mutex_trylock.c: Adjust __nusers.
8119 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8120 and public interfaces are wrapper with pass additional parameter.
8121 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8123 * tst-mutex8.c: New file.
8124 * Makefile (tests): Add tst-mutex8.
8125 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8126 __pthread_mutex_unlock_usercnt.
8127 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8130 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8131 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8132 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8133 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8135 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8136 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8137 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8138 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8139 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8141 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8142 * pthread_mutex_timedlock.c: Likewise.
8143 * pthread_mutex_trylock.c: Adjust __nusers.
8144 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8145 * tst-mutex9.c: New file.
8146 * Makefile (tests): Add tst-mutex9.
8147 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8148 * sysdeps/ia64/tls.h: Likewise.
8149 * sysdeps/powerpc/tls.h: Likewise.
8150 * sysdeps/s390/tls.h: Likewise.
8151 * sysdeps/sh/tls.h: Likewise.
8152 * sysdeps/x86_64/tls.h: Likewise.
8153 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8154 Change type of __owner.
8155 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8156 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8157 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8158 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8159 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8161 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8163 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8164 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8166 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8167 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8168 instead of nr to lll_futex_wake. Only set errno and return -1
8171 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8172 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8173 return actual return value from the syscall, not 0.
8175 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8177 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8178 find a random value.
8179 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8182 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8183 compat_timer_settime.
8184 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8185 compat_timer_gettime.
8186 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8187 compat_timer_getoverrun.
8188 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8189 compat_timer_delete.
8191 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8192 error-checking mutex detect busy mutexes.
8194 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8196 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8197 Add ax to clobber list.
8198 (lll_mutex_cond_lock): Likewise.
8199 (lll_mutex_unlock): Likewise.
8200 (lll_lock): Likewise.
8201 (lll_unlock): Likewise.
8203 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8204 * tst-cancel18.c: New file.
8205 * tst-cancelx18.c: New file.
8207 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8210 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8211 * tst-cancel17.c: New file.
8212 * tst-cancelx17.c: New file.
8214 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8215 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8216 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8218 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8220 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8222 * sysdeps/pthread/createthread.c (create_thread): Set
8223 header.multiple_threads unconditionally.
8224 * allocatestack.c (allocate_stack): Likewise.
8225 * descr.h (struct pthread): Add header.multiple_threads
8227 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8228 Define for librt. #error if neither libpthread, libc nor librt.
8229 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8231 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8232 CDISABLE): Likewise.
8233 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8234 CDISABLE): Likewise.
8235 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8236 CDISABLE): Likewise.
8237 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8238 CDISABLE): Likewise. Access header.multiple_threads outside of
8239 libc and libpthread.
8240 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8242 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8243 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8245 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8247 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8248 Also test early cancellation before the thread reaches the cancellation
8251 * Makefile: Compile forward.c with exceptions.
8253 * sysdeps/unix/sysv/linux/sleep.c: New file.
8255 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8257 * Makefile: Add CFLAGS definition to compile function wrappers
8258 duplicated from libc with exceptions.
8259 * tst-cancel4.c: Also check cancellation handlers.
8261 * Makefile: Add rules to build and run tst-cancel16 and
8262 tst-cancelx16. Add missing CFLAGS definitions.
8263 * tst-cancel16.c: New file.
8264 * tst-cancelx16.c: New file.
8266 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8268 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8269 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8270 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8271 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8273 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8274 (LIBC_CANCEL_RESET): Likewise.
8275 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8276 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8278 (CFLAGS-libcrt-cancellation.c): Define.
8279 * sysdeps/pthread/librt-cancellation.c: New file.
8280 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8281 macros also when compiling librt.
8282 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8283 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8284 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8285 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8286 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8287 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8288 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8290 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8291 compat_timer_create.
8293 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8295 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8297 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8299 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8300 Add libc_hidden_def.
8302 2003-06-13 Roland McGrath <roland@redhat.com>
8304 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8305 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8307 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8309 * allocatestack.c (queue_stack): Always inline.
8310 * ptreadhP.h (__do_cancel): Likewise.
8312 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8314 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8317 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8319 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8320 (__pthread_cond_signal): Remove incorrect second addition for
8323 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8325 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8326 (__pthread_cond_signal): Use correct futex pointer in
8327 __lll_mutex_lock_wait call.
8329 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8330 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8332 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8334 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8336 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8339 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8340 hand-written CFI generation code. Since ENTRY/END also initiated
8341 CFI frames this caused two CFI sets to be generated.
8343 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8345 * cleanup_routine.c: New file.
8346 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8347 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8349 * Makefile (libpthread-routines): Add cleanup_routine.
8350 Add more CFLAGS variables to compile with exceptions. Add comments
8351 why which file needs unwind tables.
8352 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8354 * tst-cancelx1.c: New file.
8355 * tst-cancelx2.c: New file.
8356 * tst-cancelx3.c: New file.
8357 * tst-cancelx4.c: New file.
8358 * tst-cancelx5.c: New file.
8359 * tst-cancelx6.c: New file.
8360 * tst-cancelx7.c: New file.
8361 * tst-cancelx8.c: New file.
8362 * tst-cancelx9.c: New file.
8363 * tst-cancelx10.c: New file.
8364 * tst-cancelx11.c: New file.
8365 * tst-cancelx12.c: New file.
8366 * tst-cancelx13.c: New file.
8367 * tst-cancelx14.c: New file.
8368 * tst-cancelx15.c: New file.
8369 * tst-cleanupx0.c: New file.
8370 * tst-cleanupx0.expect: New file.
8371 * tst-cleanupx1.c: New file.
8372 * tst-cleanupx2.c: New file.
8373 * tst-cleanupx3.c: New file.
8375 * tst-cleanup0.c: Make standard compliant.
8376 * tst-cleanup1.c: Likewise.
8378 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8379 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8380 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8381 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8382 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8383 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8384 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8386 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8387 * tst-cancel12.c: New file.
8388 * tst-cancel13.c: New file.
8389 * tst-cancel14.c: New file.
8390 * tst-cancel15.c: New file.
8391 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8394 * tst-cancel1.c: Add some comments.
8396 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8399 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8401 * Makefile (CFLAGS-pthread_cancel.c): Define.
8403 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8405 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8406 Change type of __writer element to int.
8407 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8408 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8409 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8410 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8411 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8412 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8413 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8414 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8415 Compare with TID to determine deadlocks.
8416 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8417 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8418 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8419 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8420 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8421 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8423 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8425 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8426 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8427 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8429 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8431 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8432 * Makefile (tests): Add tst-rwlock12.
8433 * tst-rwlock12.c: New file.
8435 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8437 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8438 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8439 Remove bogus hidden_proto.
8440 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8442 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8443 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8444 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8445 ___lll_mutex_timedlock): Likewise.
8447 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8450 (__pthread_cond_signal): Add some code to eventually handle
8453 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8455 * Makefile (tests): Add tst-exec4.
8456 (tst-exec4-ARGS): Define.
8457 * tst-exec4.c: New file.
8459 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8461 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8462 Also fail if tv_nsec < 0.
8463 (__lll_timedwait_tid): Likewise.
8464 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8465 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8467 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8469 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8471 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8473 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8475 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8478 * Makefile (tests): Add tst-sem8 and tst-sem9.
8479 * tst-sem8.c: New file.
8480 * tst-sem9.c: New file.
8481 * sem_open.c: Fix creation of in_use record if the file exists but
8484 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8487 * sysdeps/pthread/timer_create.c (timer_create): In case
8488 evp==NULL, assign timer ID to sival_ptr.
8490 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8491 struct pthread_unwind_buf *.
8492 (struct pthread): Likewise for cleanup_jmp_buf element.
8494 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8495 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8496 * unwind.c (__pthread_unwind_next): Likewise.
8498 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8500 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8501 (lll_futex_timed_wait): Use int for futex value parameter.
8502 (lll_futex_wake): Likewise.
8503 (lll_futex_requeue): Likewise.
8505 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8506 Replace one memory operation with one register operation.
8508 * tst-join4.c (do_test): Fix error message.
8510 * tst-rwlock6.c (do_test): Use correct format specifier.
8512 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8513 (__lll_mutex_lock_wait): Replace one memory operation with one
8515 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8516 (__lll_mutex_lock_wait): Likewise.
8518 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8519 (__lll_mutex_cond_lock): Add one to value parameter of
8520 __lll_lock_wait to reflect reality in the futex syscall.
8521 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8522 (lll_mutex_cond_lock): Likewise.
8524 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8526 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8528 (lll_mutex_cond_lock): Define.
8530 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8532 * Makefile (tests): Add tst-signal6.
8533 * tst-signal6.c: New file.
8535 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8536 (__lll_mutex_unlock_force): New function
8537 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8539 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8540 (__lll_mutex_unlock_force): New function.
8541 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8543 * tst-rwlock7.c (do_test): Use correct format specifier.
8545 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8546 Find break parameter in correct asm argument.
8548 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8550 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8552 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8554 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8556 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8557 lll_futex_requeue, lll_mutex_unlock_force): Define.
8559 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8561 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8562 (pthread_cond_t): Add __mutex.
8563 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8564 lll_futex_requeue, lll_mutex_unlock_force): Define.
8566 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8568 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8569 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8571 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8573 (lll_futex_wait, lll_futex_wake): Define.
8574 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8575 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8576 FUTEX_REQUEUE instead of FUTEX_WAIT.
8577 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8578 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8579 mutex which was used in condvar structure. Call
8580 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8581 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8583 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8584 include tcb-offsets.h. Read wakeup value in locked region.
8585 Use the value of gbr register as THREAD_ID.
8586 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8587 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8588 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8590 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8593 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8595 * sysdeps/pthread/pthread_cond_broadcast.c
8596 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8598 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8600 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8601 typo in register name.
8602 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8603 correctly. Actually use requeue. Little optimization.
8604 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8605 mutex address early. Handle cancellation state as 32-bit value.
8606 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8607 Remove unnecessary label.
8609 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8611 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8612 instead of FUTEX_WAIT.
8613 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8614 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8615 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8616 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8617 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8618 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8619 used in condvar structure. Call __pthread_mutex_cond_lock instead
8620 of __pthread_mutex_lock_internal.
8621 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8622 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8623 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8624 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8625 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8626 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8627 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8628 Add pthread_mutex_cond_lock.
8629 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8630 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8631 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8632 lll_mutex_cond_lock.
8633 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8634 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8635 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8637 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8638 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8640 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8641 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8643 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8644 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8645 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8646 macro don't define aliases.
8648 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8649 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8650 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8651 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8652 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8653 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8654 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8655 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8656 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8658 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8660 * sem_open.c: Fix one endless loop. Implement correct semantics
8661 wrt opening the same semaphore more then once.
8662 * sem_close.c: Adjust for sem_open change.
8663 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8664 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8665 * Makefile (tests): Add tst-sem7.
8666 * tst-sem7.c: New file.
8668 2003-05-16 Roland McGrath <roland@redhat.com>
8670 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8671 uninitialized variable braino.
8673 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8675 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8676 test for syscall availability.
8678 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8679 __no_posix_timers to -1 if the syscalls don't exist.
8681 * pthread_join.c (pthread_join): Set tid field of the joined
8682 thread to -1. This isn't necessary but helps to recognize some
8683 error conditions with almost no cost.
8685 * allocatestack.c (FREE_P): Also negative values indicate an
8688 * unwind.c: Include <unistd.h>.
8690 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8692 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8694 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8696 * Makefile (crti-objs, crtn-objs): New variables.
8697 (omit-deps, extra-objs): Add crtn.
8698 ($(objpfx)libpthread.so): Depend on both crti and crtn
8699 and links to them in multidir.
8700 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8702 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8704 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8705 (lll_mutex_unlock): Use atomic_exchange_rel.
8707 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8709 * cond-perf.c (cons): Add missing locking around setting of alldone.
8711 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8713 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8715 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8717 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8719 * tst-sem6.c: New file.
8720 * Makefile (tests): Add tst-sem6.
8722 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8723 Use atomic_exchange_rel instead of atomic_exchange.
8724 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8727 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8728 code for lll_futex_wait and lll_futex_wake in static apps. Use
8729 vsyscall is possible.
8731 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8732 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8733 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8734 pthread_setaffinity_np.
8735 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8736 and pthread_setaffinity_np.
8737 * Makefile (libpthread-routines): Add pthread_getaffinity and
8738 pthread_setaffinity.
8740 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8741 use it in case mmap to allocate the stack fails.
8742 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8743 ARCH_MAP_FLAGS here.
8744 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8747 2003-05-08 Ulrich Drepper <drepper@redhat.com>
8749 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8750 handler implementation. It is now lockless in fork().
8751 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8752 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8753 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8754 declare the __fork_*_lists.
8755 (struct fork_handler): Include pointers to all three functions.
8756 Add next, refcntr and need_signal elements.
8757 (__fork_handlers): New declaration.
8758 (__register_atfork_malloc): Remove declaration.
8759 (HAVE_register_atfork_malloc): Remove definition.
8760 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8761 __pthread_child_handler variable.
8762 (__libc_pthread_init): Use __register_atfork instead of explicitly
8764 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8766 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8768 * unwind.c (unwind_cleanup): Print error message and then abort. This
8769 function must never be reached.
8771 * cond-perf.c: New file.
8773 2003-05-05 Ulrich Drepper <drepper@redhat.com>
8775 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8777 2003-05-04 Roland McGrath <roland@redhat.com>
8779 * Makefile ($(objpfx)../libc.so): New target.
8781 2003-05-02 Ulrich Drepper <drepper@redhat.com>
8783 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8784 (pthread_condattr_t): Size is only an int, don't use long for
8786 (pthread_mutexattr_t): Likewise.
8787 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8788 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8789 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8791 2003-05-01 Ulrich Drepper <drepper@redhat.com>
8793 * sysdeps/i386/tls.h: Define THREAD_ID.
8794 * sysdeps/ia64/tls.h: Likewise.
8795 * sysdeps/powerpc/tls.h: Likewise.
8796 * sysdeps/s390/tls.h: Likewise.
8797 * sysdeps/sh/tls.h: Likewise.
8798 * sysdeps/x86_64/tls.h: Likewise.
8799 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8801 * pthread_mutex_timedlock.c: Likewise.
8802 * pthread_mutex_trylock.c: Likewise.
8803 * pthread_mutex_unlock.c: Likewise.
8804 * pthread_rwlock_trywrlock.c: Likewise.
8805 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8806 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8807 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8808 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8810 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8813 2003-04-29 Jakub Jelinek <jakub@redhat.com>
8815 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8816 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8817 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8818 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8819 Make __align long long instead of long.
8820 (pthread_rwlock_t): Formatting.
8821 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8822 (pthread_rwlock_t): Formatting.
8823 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8824 (pthread_cond_t): Make __align long long instead of long.
8825 (pthread_rwlock_t): Move __flags field to the same position as in
8828 2003-04-30 Ulrich Drepper <drepper@redhat.com>
8830 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8831 * tst-rwlock7.c (do_test): Likewise.
8833 2003-04-26 Roland McGrath <roland@redhat.com>
8835 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8837 2003-04-22 Jakub Jelinek <jakub@redhat.com>
8839 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8840 sizeof (struct pthread).
8841 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8843 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8845 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8847 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8849 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8851 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8853 (NO_TLS_OFFSET): Define.
8854 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8855 add TLS_TCB_SIZE unnecessarily.
8857 2003-04-22 Roland McGrath <roland@redhat.com>
8859 * Makeconfig (shared-thread-library): Reverse link order to work
8862 2003-04-22 Ulrich Drepper <drepper@redhat.com>
8864 * semaphore.h: Fix typo in comment.
8866 2003-04-21 Ulrich Drepper <drepper@redhat.com>
8868 * sysdeps/pthread/sigfillset.c: New file.
8870 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8871 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8872 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8873 * sysdeps/pthread/sigaction.c: Likewise.
8874 * sysdeps/pthread/sigprocmask.c: New file.
8875 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8877 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8878 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8881 2003-04-19 Ulrich Drepper <drepper@redhat.com>
8883 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8884 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8886 * sysdeps/unix/sysv/linux/unregister-atfork.c
8887 (__unregister_atfork): Don't free memory not allocated dynamically.
8889 * semaphore.h: Remove __THROW marker from cancellation points.
8890 * nptl/sysdeps/pthread/pthread.h: Likewise.
8892 2003-04-18 Ulrich Drepper <drepper@redhat.com>
8894 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8895 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8898 2003-04-16 Jakub Jelinek <jakub@redhat.com>
8900 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8902 2003-04-15 Roland McGrath <roland@redhat.com>
8904 * forward.c (__pthread_unwind): Tweak to avoid warning.
8906 2003-04-15 Ulrich Drepper <drepper@redhat.com>
8908 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8910 2003-04-14 Ulrich Drepper <drepper@redhat.com>
8912 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8913 overflow CFA advance instructions.
8914 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8916 2003-04-14 Jakub Jelinek <jakub@redhat.com>
8918 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8919 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8920 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8923 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8924 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8925 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8926 DW_CFA_advance_loc for .Laddl-.Lsubl.
8928 2003-04-13 Ulrich Drepper <drepper@redhat.com>
8930 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8931 position-independent unwind data for static libraries.
8932 Add missing unwind info. Add comments.
8934 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8935 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8936 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8937 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8939 2003-04-12 Ulrich Drepper <drepper@redhat.com>
8941 * Makefile: Make sure all cancellation points are compiled with
8942 exception and asynchronous unwind tables.
8944 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8945 which mishandles loading of global object addresses in PIC.
8946 (THREAD_SETMEM_NC): Likewise.
8948 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8950 * pthread.h: Define new data structure for cleanup buffer. Declare
8951 new cleanup handler interfaces.
8952 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8953 (struct pthread): Add cleanup_jmp_buf pointer. Define
8954 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8955 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8956 it. Declare old cleanup handler installation functions.
8957 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8959 * cleanup_defer.c: Likewise.
8960 * cleanup_compat.c: New file. Old cleanup code.
8961 * cleanup_def_compat.c: New file. Old cleanup code.
8962 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8963 if own thread descriptor.
8964 * unwind.c: New file.
8965 * forward.c: Add __pthread_unwind.
8966 * init.c (pthread_functions): Add __pthread_unwind.
8967 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8968 Add ptr___pthread_unwind.
8969 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8970 and unwind function.
8971 * Makefile (libpthread-routines): Add cleanup_compat,
8972 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8973 table generation if necessary.
8974 * version.c: Record whether unwind support is compiled in.
8975 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8976 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8978 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8979 complication to generate unwind information for syscall wrappers.
8980 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8981 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8982 __cleanup_fct_attribute.
8984 * Makefile: Add rules to build and run tst-cleanup0.
8985 * tst-cleanup0.c: New file.
8986 * tst-cleanup0.expect: New file.
8988 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8989 caller. Optimize to avoid often unecessary local variable.
8991 2003-04-11 Roland McGrath <roland@redhat.com>
8993 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8994 sets variable `multidir'; include that.
8995 (generated): Add it.
8996 ($(objpfx)$(multidir)/crti.o): New target.
8997 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8999 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9001 * tst-attr2.c (do_test): Add cast to avoid warning.
9002 * tst-mutex4.c (do_test): Likewise.
9004 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9006 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9009 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9011 * Makefile (tests): Add tst-detach1.
9012 * tst-detach1.c: New file.
9014 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9016 * sysdeps/pthread/pthread.h: Remove duplicate
9017 pthread_cleanup_{push,pop} definitions.
9019 * tst-barrier2.c: Eliminate warnings.
9020 * tst-cancel4.c: Likewise.
9021 * tst-cond4.c: Likewise.
9022 * tst-cond6.c: Likewise.
9023 * tst-detach1.c: Likewise.
9024 * tst-rwlock4.c: Likewise.
9025 * tst-rwlock6.c: Likewise.
9026 * tst-rwlock7.c: Likewise.
9027 * tst-sem3.c: Likewise.
9028 * tst-spin2.c: Likewise.
9029 * tst-umask1.c: Likewise.
9031 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9033 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9035 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9037 * descr.h (struct pthread): Move cancelhandling member to the front.
9039 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9041 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9042 malloc_parent, and malloc_child statically.
9043 (__register_atfork_malloc): New function.
9044 (free_mem): Don't free any of the malloc_* variables on the list.
9045 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9046 Define HAVE_register_atfork_malloc.
9048 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9050 * sysdeps/pthread/createthread.c (create_thread): Add some more
9051 comments explaining when to set multiple_threads and when not.
9053 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9054 THREAD_ATOMIC_BIT_SET if not already defined.
9055 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9056 THREAD_ATOMIC_BIT_SET:
9057 * sysdeps/x86_64/tls.h: Likewise.
9058 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9059 THREAD_ATOMIC_CMPXCHG_VAL.
9060 (_pthread_cleanup_pop_restore): Likewise.
9061 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9062 (__pthread_enable_asynccancel_2): Likewise.
9063 (__pthread_disable_asynccancel): Likewise.
9064 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9065 (__libc_disable_asynccancel): Likewise.
9066 * init.c (sigcancel_handler): Likewise.
9067 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9068 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9070 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9072 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9073 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9074 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9075 * Makefile (tests): Add tst-cancel11.
9076 * tst-cancel11.c: New file.
9078 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9080 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9081 round, not the first. Use specific_used flag instead of local
9082 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9083 (__free_tcb): Don't call deallocate_tsd here.
9084 (start_thread): Call deallocate_tsd here.
9085 * pthread_setspecific.c: Set specific_used flag really only when
9087 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9088 * tst-tsd3.c: New file.
9089 * tst-tsd4.c: New file.
9091 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9093 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9094 Use atomic_exchange_and_add instead of __lll_add.
9095 (__lll_mutex_timedlock): Likewise.
9096 Patch by Ian Wienand.
9098 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9100 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9101 (SINGLE_THREAD_P): Fix typo.
9102 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9104 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9106 * Makefile (tests): Add tst-align.
9107 * tst-align.c: New file.
9108 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9110 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9113 * tst-tsd2.c: Add casts to avoid warnings.
9115 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9117 * descr.h (struct pthread): Move most often used elements to the front.
9119 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9121 * Makefile (libpthread-routines): Add pthread_atfork.
9122 (libpthread-static-only-routines): Add pthread_atfork.
9124 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9126 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9128 (INSTALL_DTV): Add parens.
9129 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9130 Use passed descr instead of THREAD_SELF.
9131 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9132 (__lll_mutex_timedlock_wait): Correct expected value after
9134 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9135 Release lock before waking up the waiters.
9136 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9137 criteria. Reorderstruct passed to cleanup handler. Fix
9138 handling of cancellation and failung pthread_mutex_unlock call.
9139 Use __pthread_enable_asynccancel_2 instead of
9140 __pthread_enable_asynccancel.
9141 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9142 Return result of lock re-get if it fails.
9143 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9144 for __pthread_cleanup_push.
9145 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9146 completely broken rwlock implementation.
9147 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9148 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9149 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9150 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9151 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9152 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9153 versioned_symbol macro.
9154 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9155 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9157 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9159 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9160 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9162 (struct timer): Remove th and bar field.
9163 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9164 debugging code. Create only one helper thread.
9165 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9167 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9168 Renamed. Define statically. Use thread info from siginfo.
9169 (__helper_once): New variable.
9170 (__helper_tid): New variable.
9171 (__reset_helper_control): New function.
9172 (__start_helper_thread): New function.
9174 * pthread_create.c (start_thread): Don't use setjmp inside
9175 __builtin_expect to work around gcc bug.
9177 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9178 timer_delete syscall fails, but not with ENOSYS, set
9181 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9182 (timer_settime): Fix typo.
9183 * sysdeps/unix/sysv/linux/timer_getoverr.c
9184 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9186 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9188 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9189 offset of cleanupbuf.__prev.
9191 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9193 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9196 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9198 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9199 NULL provide default definition to syscall.
9201 2003-03-25 Roland McGrath <roland@redhat.com>
9203 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9204 (timer_id2ptr): Fix typo.
9206 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9208 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9209 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9210 * sysdeps/ia64/pthreaddef.h: Likewise.
9211 * sysdeps/powerpc/pthreaddef.h: Likewise.
9212 * sysdeps/s390/pthreaddef.h: Likewise.
9213 * sysdeps/sh/pthreaddef.h: Likewise.
9214 * sysdeps/x86_64/pthreaddef.h: Likewise.
9215 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9216 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9218 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9219 SIGTIMER is not unblocked.
9220 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9222 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9224 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9225 pass pointer through as ID.
9226 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9227 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9228 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9229 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9230 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9231 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9232 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9233 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9234 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9235 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9236 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9237 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9238 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9239 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9240 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9241 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9242 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9243 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9244 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9245 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9246 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9247 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9248 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9249 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9250 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9251 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9252 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9253 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9254 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9255 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9256 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9257 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9258 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9260 * pthreadP.h: Remove FRAME_LEFT definition.
9261 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9262 already left frame. Programs which have this problem are not POSIX
9264 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9266 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9268 * sysdeps/pthread/tst-timer.c: Check return values of the
9271 2003-03-23 Roland McGrath <roland@redhat.com>
9273 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9274 * tst-tls3mod.c: Likewise.
9275 * tst-tls1.c: Likewise.
9276 * tst-tls2.c: Likewise.
9278 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9281 * tst-join5.c (tf1, tf2): Add a cast.
9283 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9285 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9286 Don't test anything.
9287 * tst-cond4.c: Likewise.
9288 * tst-cond6.c: Likewise.
9289 * tst-flock2.c: Likewise.
9290 * tst-mutex4.c: Likewise.
9291 * tst-rwlock4.c: Likewise.
9292 * tst-signal1.c: Likewise.
9293 * tst-spin2.c: Likewise.
9294 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9296 * tst-mutex4.c: Use test-skeleton.c.
9297 * tst-spin2.c: Likewise.
9298 * tst-sysconf.c: Likewise.
9299 * tst-barrier2.c: Likewise.
9300 * tst-cond4.c: Likewise.
9301 * tst-cond6.c: Likewise.
9302 * tst-rwlock4.c: Likewise.
9303 * tst-unload.c: Likewise.
9304 * tst-flock2.c (do_test): Use return instead of exit.
9306 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9308 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9310 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9312 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9313 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9314 instead of __lll_compare_and_swap.
9315 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9317 Removed definition if __lll_compare_and_swap.
9319 * cancellation.c: Adjust for new form of compare&exchange macros.
9320 * cleanup_defer.c: Likewise.
9322 * libc-cancellation.c: Likewise.
9323 * old_pthread_cond_broadcast.c: Likewise.
9324 * old_pthread_cond_signal.c: Likewise.
9325 * old_pthread_cond_timedwait.c: Likewise.
9326 * old_pthread_cond_wait.c: Likewise.
9327 * pthread_cancel.c: Likewise.
9328 * pthread_create.c: Likewise.
9329 * pthread_detach.c: Likewise.
9330 * pthread_join.c: Likewise.
9331 * pthread_key_delete.c: Likewise.
9332 * pthread_setcancelstate.c: Likewise.
9333 * pthread_setcanceltype.c: Likewise.
9334 * pthread_timedjoin.c: Likewise.
9335 * pthread_tryjoin.c: Likewise.
9336 * sysdeps/pthread/createthread.c: Likewise.
9338 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9340 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9341 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9342 definitions. Replace uses with calls to atomic_* functions.
9343 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9344 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9345 __lll_test_and_set calls with atomic_exchange_and_add and
9346 atomic_exchange calls respectively.
9347 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9348 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9349 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9350 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9351 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9352 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9353 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9355 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9356 returns the old value.
9358 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9360 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9361 int for variable OLDVAL and correct inline assembler contraint.
9362 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9363 type int for variable OLD.
9365 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9367 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9368 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9369 instead of multiple_threads field in the TCB.
9371 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9373 * sysdeps/i386/i686/bits/atomic.h: Removed.
9374 * sysdeps/i386/i586/bits/atomic.h: Removed.
9375 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9376 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9377 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9378 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9379 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9380 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9381 * atomic.h: Removed. Moved to glibc.
9383 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9384 support for clock selection.
9386 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9389 2003-03-18 Roland McGrath <roland@redhat.com>
9391 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9392 Add __lll_rel_instr first. Add memory clobber.
9393 (lll_mutex_unlock): Use __lll_test_and_set.
9394 From Paul Mackerras <paulus@samba.org>.
9396 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9398 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9399 (SINGLE_THREAD_P): Add `header.' prefix.
9400 From Paul Mackerras <paulus@samba.org>.
9402 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9403 pthread_timedjoin_np to ...
9404 (libpthread: GLIBC_2.3.3): ... here.
9405 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9407 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9408 Avoid shadowing VAL variable.
9410 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9413 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9415 * Makefile (tests): Add tst-cond11.
9416 * tst-cond11.c: New file.
9418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9419 struct passed to cleanup handler to eliminate one more
9421 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9423 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9424 (pthrad_cond_t): Replace __unused field with __clock.
9426 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9427 waken all waiters in cleanup handler.
9428 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9429 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9431 * pthread_condattr_getclock.c: New file.
9432 * pthread_condattr_setclock.c: New file.
9433 * sysdeps/pthread/pthread.h: Declare these new functions.
9434 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9435 * Makefile (libpthread-routines): Add the new functions.
9436 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9437 Renamed field to value. Document use of the bits.
9438 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9440 * pthread_condattr_setpshared.c: Likewise.
9441 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9442 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9443 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9445 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9446 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9447 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9448 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9450 Implement clock selection.
9451 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9452 * pthread-errnos.sym: Add ENOSYS.
9453 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9454 _POSIX_CLOCK_SELECTION.
9455 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9457 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9458 invalid .size directive.
9460 2003-03-17 Roland McGrath <roland@redhat.com>
9462 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9465 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9467 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9468 Use __lll_add instead of spelling it out. Use protected symbol names.
9469 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9471 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9472 Renamed from lll_compare_and_swap. Use new name where necessary.
9473 (__lll_add): Defined.
9474 (__lll_dec_if_positive): Defined.
9475 (__lll_test_and_set): Defined.
9476 * sysdeps/ia64/pthread_spin_init.c: Removed.
9477 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9478 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9479 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9480 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9481 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9482 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9483 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9484 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9485 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9486 __sync_lock_release_si.
9487 Patch by Jakub Jelinek.
9489 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9490 Fix timeout handling.
9491 (__lll_timedwait_tid): Likewise.
9492 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9493 Patch by Jakub Jelinek.
9495 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9497 2003-03-17 Roland McGrath <roland@redhat.com>
9499 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9500 * sysdeps/pthread/pthread_spin_init.c: New file.
9501 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9502 * sysdeps/powerpc/Makefile: New file.
9503 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9504 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9505 * sysdeps/powerpc/pthreaddef.h: New file.
9506 * sysdeps/powerpc/tcb-offsets.sym: New file.
9507 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9508 * sysdeps/powerpc/tls.h: New file.
9509 * sysdeps/powerpc/bits/atomic.h: New file.
9510 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9511 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9512 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9514 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9515 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9516 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9517 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9518 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9519 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9520 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9521 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9522 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9523 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9524 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9525 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9526 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9527 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9528 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9530 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9532 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9533 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9534 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9535 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9536 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9538 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9540 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9541 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9542 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9543 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9544 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9546 2003-03-16 Roland McGrath <roland@redhat.com>
9548 * tst-fork4.c: Include <string.h>.
9549 * tst-signal2.c: Likewise.
9550 * tst-mutex5.c (do_test): exit -> return.
9551 * tst-mutex2.c: Include <stdlib.h>.
9553 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9555 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9556 (__lll_mutex_timedlock_wait): Correct expected value after
9557 spurious wakeup. Otherwise we would never wait again.
9559 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9560 zone versus inline asm stupidity. Use correct instructions.
9562 * tst-rwlock6.c: Add some more status output.
9564 2003-03-15 Roland McGrath <roland@redhat.com>
9566 * sysdeps/pthread/configure.in: New file.
9567 * sysdeps/pthread/configure: New file (generated).
9569 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9571 * allocatestack.c (allocate_stack): Store the exact stack size of
9572 user allocated stacks.
9574 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9576 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9577 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9578 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9579 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9580 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9581 Use `header.' prefix.
9582 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9584 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9586 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9587 __builtin_frame_address, use stack pointer.
9589 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9590 instead of __builtin_frame_pointer.
9592 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9594 * tst-basic1.c (do_test): Add cast to avoid warning.
9595 * tst-basic2.c (do_test): Likewise.
9597 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9598 amount of stack correction.
9600 * tst-fork4.c: Use test-skeleton.c.
9602 2003-03-14 Roland McGrath <roland@redhat.com>
9604 * init.c: Fix typo "#eli" for "#else".
9606 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9608 * allocatestack.c (__stack_user): Use hidden_data_def.
9609 * pthread_create.c (__pthread_keys): Likewise.
9611 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9613 2003-03-14 Roland McGrath <roland@redhat.com>
9615 * tst-fork4.c: New file.
9616 * Makefile (tests): Add it.
9618 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9619 we always define the padding space.
9620 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9621 stopped supporting its own extensions fully.
9622 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9623 struct also called `header', so `header.multiple_threads' is the field
9624 name to use on all machines.
9625 * allocatestack.c (allocate_stack): Use `header.' prefix.
9626 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9627 * pthread_create.c (__pthread_create_2_1): Likewise.
9628 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9629 (THREAD_SELF): Likewise.
9630 * sysdeps/x86_64/tls.h: Likewise.
9631 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9632 (SINGLE_THREAD_P): Likewise.
9633 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9634 (SINGLE_THREAD_P): Likewise.
9635 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9636 (SINGLE_THREAD_P): Likewise.
9638 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9641 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9643 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9644 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9646 * pthread_create.c (start_thread): setjmp is expected to return 0.
9648 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9649 (THREAD_GETMEM_NC): Likewise.
9651 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9653 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9654 and the size of the stack which must be allocated is a multiple,
9655 allocate one more page.
9656 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9657 MULTI_PAGE_ALIASING.
9659 2003-03-13 Roland McGrath <roland@redhat.com>
9661 * pthread_create.c (start_thread): Set EXITING_BIT after the
9662 event-reporting (and destructors), not before.
9664 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9666 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9667 lll_futex_wake): Declare register variables as long int instead of
9668 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9669 Make syscall arguments clobbered by the syscall.
9670 (lll_futex_wait): Define using lll_futex_timed_wait.
9672 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9675 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9678 * allocatestack.c (nptl_ncreated): Only declare if
9679 COLORING_INCREMENT != 0.
9681 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9682 (__libc_enable_asynccancel_2): Remove prototype.
9684 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9685 ctid to match kernel.
9687 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9689 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9690 libc_multiple_threads.
9691 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9692 __libc_multiple_threads to...
9693 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9695 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9697 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9698 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9700 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9701 (__pthread_once_internal): Define.
9703 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9704 macros instead of .symver directly.
9705 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9706 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9708 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9709 * sysdeps/x86_64/tcb-offsets.sym: New file.
9710 * sysdeps/x86_64/Makefile: New file.
9712 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9713 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9714 to access own pthread_t in TCB.
9715 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9717 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9719 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9721 2003-03-12 Roland McGrath <roland@redhat.com>
9723 * pthread-errnos.sym: New file.
9724 * Makefile (gen-as-const-headers): New variable, list that file.
9725 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9726 header <pthread-errnos.h> instead of defining errno values here.
9727 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9728 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9729 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9730 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9731 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9733 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9735 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9736 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9737 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9738 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9739 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9740 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9741 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9742 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9743 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9744 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9745 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9746 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9747 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9748 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9749 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9750 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9751 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9752 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9753 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9754 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9755 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9756 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9757 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9758 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9759 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9760 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9761 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9763 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9764 CLONE_CHILD_SETTID worked.
9766 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9768 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9770 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9773 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9774 (pthread_cond_t): Add padding.
9776 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9777 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9778 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9780 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9781 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9782 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9783 (__pthread_rwlock_timedrdlock): Likewise.
9784 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9785 (__pthread_rwlock_wrlock): Likewise.
9786 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9787 (__pthread_rwlock_rdlock): Likewise.
9789 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9791 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9792 result of lock re-get if it fails.
9794 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9796 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9797 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9798 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9799 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9801 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9802 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9803 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9804 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9805 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9807 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9808 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9810 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9811 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9812 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9813 (create_thread): Likewise.
9814 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9815 * init.c (__pthread_initialize_minimal_internal): Initialize
9816 __libc_multiple_threads_ptr if necessary.
9817 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9818 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9819 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9820 __libc_multiple_threads.
9821 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9824 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9825 (THREAD_SETMEM_NC): Likewise.
9827 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9828 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9829 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9830 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9832 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9833 Eliminate one entire instruction.
9835 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9836 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9837 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9838 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9839 instead of __pthread_enable_asynccancel.
9840 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9841 (__pthread_cond_wait): Likewise.
9842 * sysdeps/pthread/pthread_cond_timedwait.c
9843 (__pthread_cond_timedwait): Likewise.
9844 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9846 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9847 (__condvar_cleanup): Wake up all waiters in case we got signaled
9848 after being woken up but before disabling asynchronous
9850 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9851 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9852 (__condvar_cleanup): Likewise.
9854 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9855 Make it an error if architecture has no #if case. Add x86-64.
9857 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9858 pt-initfini.s generation.
9860 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9861 (TLS_INIT_TP): Fix typo.
9863 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9865 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9866 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9868 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9869 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9870 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9871 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9872 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9873 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9874 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9875 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9877 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9879 * sysdeps/pthread/pthread_cond_timedwait.c
9880 (__pthread_cond_timedwait): Return the result of the final
9881 locking. If it succeeds, the regular function return value.
9883 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9884 Return result of the final locking.
9885 * version.c (__nptl_main): Work around problems with the strange
9886 INTERNAL_SYSCALL macro on ppc32.
9887 * init.c (__pthread_initialize_minimal_internal): Unblock
9888 SIGCANCEL in case the parent blocked it.
9889 Reported by Paul Mackerras <paulus@samba.org>.
9891 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9892 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9893 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9895 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9897 * sysdeps/pthread/pthread_cond_timedwait.c
9898 (__pthread_cond_timedwait): Unlock and fail if
9899 __pthread_mutex_unlock_internal failed.
9901 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9902 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9904 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9905 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9906 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9907 ALLOCATE_STACK): New macros.
9908 (TLS_TPADJ): New macro.
9909 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9910 (allocate_stack): Handle TLS_DTV_AT_TP and
9911 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9912 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9914 * init.c [__ia64__] (__NR_set_tid_address): Define.
9916 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9917 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9918 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9919 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9920 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9921 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9922 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9923 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9924 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9925 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9926 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9927 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9928 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9929 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9930 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9931 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9932 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9933 * sysdeps/ia64/bits/atomic.h: New file.
9934 * sysdeps/ia64/Makefile: New file.
9935 * sysdeps/ia64/pthread_spin_init.c: New file.
9936 * sysdeps/ia64/pthread_spin_lock.c: New file.
9937 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9938 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9939 * sysdeps/ia64/pthreaddef.h: New file.
9940 * sysdeps/ia64/tcb-offsets.sym: New file.
9941 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9942 * sysdeps/ia64/tls.h: New file.
9944 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9945 to syscall instead of no arguments.
9947 2003-03-10 Ulrich Drepper <drepper@redhat.com>
9949 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9950 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9951 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9952 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9954 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9957 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9959 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9960 lowlevelbarrier.sym.
9961 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9962 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9963 Include lowlevelbarrier.h and don't define offsets locally.
9964 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9966 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9967 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9968 (__lll_mutex_timedlock_wait): Likewise.
9969 (lll_mutex_lock): Adjust asm for that.
9970 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9971 (lll_lock): Adjust asm for operand order change.
9972 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9973 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9975 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9976 Reverse order of parameters.
9977 (__lll_timedwait_tid): Remove regparms attribute.
9978 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9979 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9981 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9982 (__lll_timedwait_tid): Remove one unnecessary instruction.
9984 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9985 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9986 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9989 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9990 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9992 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9995 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9996 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9998 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9999 define LOCK here (if UP is not defined). The actual code is in
10002 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10003 LOCK is already defined. Don't define lll_unlock_wake_cb and
10004 __lll_timedwait_tid for libc.so.
10005 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10006 define LOCK here (if UP is not defined). The actual code is in
10009 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10010 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10011 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10012 instead of lowlevelsem.h.
10013 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10014 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10015 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10017 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10018 lowlevelrwlock.sym.
10019 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10020 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10021 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10023 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10025 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10026 last changed. D'oh.
10028 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10030 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10031 of __libc_locking_needed.
10032 (lll_trylock): Initialize %eax to zero.
10034 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10035 pthread_cond_t definition.
10037 2003-03-10 Roland McGrath <roland@redhat.com>
10039 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10040 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10041 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10042 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10043 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10045 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10046 Instead of setting PD->multiple_threads, set globals
10047 __pthread_multiple_threads and __libc_multiple_threads.
10048 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10049 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10050 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10052 * descr.h (struct pthread): Conditionalize first member on
10053 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10054 containing an anonymous tcbhead_t. Move `list' member out.
10055 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10056 * allocatestack.c: Remove use of `header.data.' prefix.
10057 * pthread_create.c: Likewise.
10058 * init.c (__pthread_initialize_minimal_internal): Likewise.
10059 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10060 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10061 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10062 * sysdeps/x86_64/tls.h: Likewise.
10063 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10064 (SINGLE_THREAD_P): Likewise.
10065 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10066 (SINGLE_THREAD_P): Likewise.
10067 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10068 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10070 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10072 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10074 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10075 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10077 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10078 leftovers from the ia32 code.
10080 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10082 (clear_once_control): Don't load %esi.
10084 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10087 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10089 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10090 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10092 * Makefile (tests): Add tst-cond10.
10093 * tst-cond10.c: New file.
10095 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10097 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10098 * tst-signal3.c (do_test): Likewise.
10099 * tst-sem5.c (do_test): Likewise.
10100 * tst-kill6.c (do_test): Likewise.
10101 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10103 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10105 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10106 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10107 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10108 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10109 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10110 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10111 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10113 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10115 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10117 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10119 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10120 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10121 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10122 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10124 * allocatestack.c (allocate_stack): If mprotect() fails free the
10127 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10129 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10131 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10132 lll_wake_tid. This was used only to work around kernel limits in
10134 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10135 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10136 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10137 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10139 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10140 (__pthread_initialize_minimal_internal): Change initialization of
10141 __static_tls_align_m1 appropriately.
10142 * pthreadP.h (__static_tls_align_m1): Renamed from
10143 __static_tls_align.
10144 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10145 instead of __static_tls_align-1.
10147 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10149 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10151 * pthread_create.c: Define __pthread_keys using nocommon
10152 attribute, not by placing it explicitly in bss.
10153 Remove DEFINE_DEALLOC definition. Not needed anymore.
10155 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10156 Use it in mmap call to allocate stacks.
10158 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10160 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10161 result of the thread function.
10163 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10165 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10166 version is just fine.
10168 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10169 (__pthread_child_handler): Renamed from pthread_child_handler,
10170 exported, and marked hidden. Change all users.
10171 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10172 free __pthread_child_handler from child list.
10174 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10176 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10178 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10179 Fix handling of cancellation and failing pthread_mutex_unlock call.
10180 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10181 (__pthread_cond_wait): Likewise.
10183 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10184 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10185 lll_futex_timed_wait call.
10186 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10187 (pthread_rwlock_timedwrlock): Likewise.
10189 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10190 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10191 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10193 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10194 check of lll_futex_wake return value.
10196 2003-03-03 Roland McGrath <roland@redhat.com>
10198 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10200 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10201 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10202 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10204 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10206 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10207 error for CPU clocks.
10209 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10210 _POSIX_MONOTONIC_CLOCK.
10211 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10213 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10216 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10218 * descr.h (struct pthread): Move cleanup field to the front.
10220 2003-03-01 Roland McGrath <roland@redhat.com>
10222 * sem_open.c (sem_open): Braino fix.
10224 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10226 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10228 __pthread_cleanup_pop functionality.
10229 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10231 * descr.h (struct pthread): Move tid field to the front now that
10234 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10235 (__lll_mutex_timedlock_wait): Remove.
10236 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10237 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10238 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10239 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10240 (lll_unlock_wake_cb): Don't save and restore %esi.
10241 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10243 (__lll_timedwait_tid): Add alignment.
10244 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10245 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10247 (__lll_timedwait_tid): Removed.
10248 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10249 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10250 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10251 (pthread_barrier_wait): Don't save, load, and restore %esi for
10253 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10254 (__pthread_cond_signal): Don't save, load, and restore %esi.
10255 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10256 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10257 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10258 Don't save, load, and restore %esi.
10260 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10263 Release lock before waking up the waiters.
10265 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10267 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10268 (reader_thread): Likewise.
10270 * sysdeps/pthread/pthread_rwlock_unlock.c
10271 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10272 to wake up readers if there are none.
10274 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10275 Release internal lock before wake threads.
10277 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10279 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10280 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10282 * tst-rwlock9.c: Likewise.
10283 * tst-rwlock10.c: New file.
10284 * tst-rwlock11.c: New file.
10286 * Makefile (tests): Add tst-dlsym1.
10287 * tst-dlsym1.c: New file.
10289 * init.c (__pthread_initialize_minimal_internal): Set
10290 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10291 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10293 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10295 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10297 * tst-cond2.c: Fix sychronization with child.
10299 * tst-rwlock8.c (reader_thread): Remove unused variable.
10301 * Makefile: Add rules to build and run tst-tls3.
10302 * tst-tls3.c: New file.
10303 * tst-tls3mod.c: New file.
10305 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10306 * tst-rwlock8.c: New file.
10307 * tst-rwlock9.c: New file.
10308 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10309 complete broken rwlock implementation.
10310 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10312 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10314 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10315 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10316 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10317 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10318 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10319 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10320 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10322 2003-02-23 Roland McGrath <roland@redhat.com>
10324 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10326 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10328 * Makefile (tests): Add tst-context1.
10329 * tst-context1.c: New file.
10331 * Makefile (tests): Add tst-tls1 and tst-tls2.
10332 * tst-tls1.c: New file.
10333 * tst-tls2.c: New file.
10335 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10336 for failed cmpxchg.
10338 * pthread_create.c (start_thread): Set EXITING_BIT early.
10340 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10341 (THREAD_GETMEM_NC): Likewise.
10343 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10345 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10346 off 3 more bytes by using offset-less instructions when possible.
10348 * Makefile: Add dependency for $(objpfx)version.d.
10350 * eintr.c (eintr_source): Add unnecessary return but the compiler
10353 * tst-kill3.c: Include <unistd.h>.
10355 2003-02-21 Roland McGrath <roland@redhat.com>
10357 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10359 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10361 * Makefile (tests): Add tst-eintr1.
10362 (distribute): Add eintr.c.
10363 * tst-eintr1.c: New file.
10364 * eintr.c: New file.
10366 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10368 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10369 Disallow sending SIGCANCEL.
10371 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10372 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10373 * tst-kill1.c: New file.
10374 * tst-kill2.c: New file.
10375 * tst-kill3.c: New file.
10376 * tst-kill5.c: New file.
10377 * tst-kill6.c: New file.
10378 * tst-basic7.c: Renamed to...
10379 * tst-kill4.c: ...this.
10381 2003-02-21 Roland McGrath <roland@redhat.com>
10383 * Makefile (install-lib-ldscripts): New variable.
10385 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10387 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10388 * pthread_cancel.c: Use INVALID_TD_P.
10389 * pthread_detach.c: Likewise.
10390 * pthread_getschedparam.c: Likewise.
10391 * pthread_setschedparam.c: Likewise.
10392 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10393 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10394 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10395 * pthread_timedjoin.c: Likewise.
10397 * tst-basic7.c: Include <signal.h>.
10399 * pthread_join.c (pthread_join): Limited checking for invalid
10401 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10403 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10405 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10406 beginning of the loop. Clear the entire first block of TSD.
10407 * Makefile (tests): Add tst-key4.
10408 * tst-key4.c: New file.
10410 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10412 * Makefile (tests): Add tst-basic7.
10413 * tst-basic7.c: New file.
10415 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10416 Add some more __builtin_expect.
10418 * pthreadP.h: Define dummy version of DEBUGGING_P.
10420 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10422 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10423 _POSIX_THREAD_PRIORITY_SCHEDULING.
10424 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10425 _XOPEN_REALTIME_THREADS.
10426 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10428 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10429 kernel returns EINVAL for PID <= 0, work around it.
10431 * Makefile (tests): Add tst-signal5.
10432 * tst-signal5.c: New file.
10434 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10435 and LOGIN_NAME_MAX.
10437 * tst-cancel1.c (tf): Block all signals.
10439 * Makefile (tests): Add tst-basic6.
10440 * tst-basic6.c: New file.
10442 * tst-basic1.c: Add test for process ID.
10444 * Makefile (tests): Add tst-cancel10.
10445 * tst-cancel10.c: New file.
10447 * Makefile (tests): Add tst-signal4.
10448 * tst-signal4.c: New file.
10450 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10451 __sigismember instead of sigismember. Add __builtin_expect.
10453 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10455 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10456 pthread_setcancelstate, and pthread_rwlock_setpshared.
10458 * tst-cancel7.c (do_test): Make sure the pid file exists before
10459 canceling the thread.
10461 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10462 pthread_rwlock_timedrdlock tests.
10463 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10464 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10465 Check for invalid tv_nsec field.
10466 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10469 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10470 recursive mutex of overflow.
10472 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10474 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10475 going into an endless loop.
10476 * Makefile (tests): Add tst-cancel9.
10477 * tst-cancel9.c: New file.
10479 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10481 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10483 * tst-mutex5.c (do_test): Add more timedlock tests.
10485 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10486 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10488 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10489 use INLINE_SYSCALL. Error number is returned, not -1.
10491 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10492 and __deallocate_stack with internal_function.
10493 * pthread_create.c: Adjust definitions appropriately.
10494 * allocatestack.c: Likewise.
10496 * pthread_join.c: Add one more __builtin_expect.
10497 * pthread_timedjoin.c: Likewise.
10499 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10500 not data of sequence number does not match.
10501 Add one __builtin_expect.
10503 * Makefile (tests): Add tst-clock1.
10504 * tst-clock1.c: New file.
10506 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10507 negative arguments.
10508 * Makefile (tests): Add tst-basic5.
10509 * tst-basic5.c: New file.
10511 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10513 * Makefile (tests): Add tst-basic4.
10514 * tst-basic4.c: New file.
10516 * pthreadP.h: Add declaraction for __nptl_nthreads.
10517 * pthread_create.c: Define __nptl_nthreads
10518 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10519 after thread is done. If then zero, call exit(0).
10520 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10521 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10522 * init.c (pthread_functions): Initialize ptr_nthreads.
10523 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10524 (__reclaim_stacks): Decrement __nptl_nthreads.
10525 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10527 * Makefile (tests): Add tst-basic3.
10528 * tst-basic3.c: New file.
10530 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10531 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10532 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10533 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10534 if asynchronous canceling is enabled.
10535 * pthread_join.c (pthread_join): When recognizing circular joins,
10536 take into account the other thread might be already canceled.
10537 * Makefile (tests): Add tst-join5.
10538 * tst-join5.c: New file.
10540 * Makefile (tests): Add tst-join4.
10541 * tst-join4.c: New file.
10543 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10545 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10547 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10549 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10550 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10551 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10553 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10555 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10556 error if lll_futex_wake failed.
10558 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10560 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10561 handling of cancellation and failung pthread_mutex_unlock call.
10562 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10563 * Makefile (tests): Add tst-cond8 and tst-cond9.
10564 * tst-cond8.c: New file.
10565 * tst-cond9.c: New file.
10567 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10569 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10570 non-standard initializers with __USE_GNU.
10572 * Makefile (tests): Add tst-cleanup3.
10573 * tst-cleanup3.c: New file.
10575 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10577 * Makefile (tests): Add tst-attr1 and tst-attr2.
10578 * tst-attr1.c: New file.
10579 * tst-attr2.c: New file.
10581 * Makefile: Add rules to build and run tst-atfork2 test.
10582 * tst-atfork2.c: New file.
10583 * tst-atfork2mod.c: New file.
10585 * sysdeps/unix/sysv/linux/unregister-atfork.c
10586 (__unregister_atfork): Free the memory allocated for the handlers
10587 after removing them from the lists.
10589 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10592 * tst-atfork1.c (do_test): Wait for the child we forked.
10593 Report error in child.
10595 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10597 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10599 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10601 * Makefile (tests): Add tst-cancel8.
10602 * tst-cancel8.c: New file.
10604 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10605 clearing of control variable.
10606 * Makefile (tests): Add tst-once3 and tst-once4.
10607 * tst-once3.c: New file.
10608 * tst-once4.c: New file.
10610 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10612 * sysdeps/sh/Makefile: New file.
10613 * sysdeps/sh/bits/atomic.h: New file.
10614 * sysdeps/sh/pthread_spin_init.c: New file.
10615 * sysdeps/sh/pthread_spin_lock.c: New file.
10616 * sysdeps/sh/pthread_spin_trylock.S: New file.
10617 * sysdeps/sh/pthread_spin_unlock.S: New file.
10618 * sysdeps/sh/pthreaddef.h: New file.
10619 * sysdeps/sh/tcb-offsets.sym: New file.
10620 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10621 * sysdeps/sh/tls.h: New file.
10622 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10623 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10624 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10625 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10626 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10627 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10628 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10629 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10630 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10631 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10632 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10633 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10634 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10635 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10636 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10637 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10638 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10639 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10640 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10641 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10642 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10643 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10644 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10645 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10646 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10647 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10648 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10649 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10650 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10651 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10653 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10655 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10656 according to POSIX.
10658 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10660 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10662 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10663 (TLS_GET_FS): New #define.
10664 (TLS_SET_FS): New #define.
10665 Correct value of __NR_set_thread_area.
10667 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10669 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10671 * Makefile (tests): Add tst-popen1.
10672 * tst-popen1.c: New file.
10674 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10675 but inactive generalization.
10676 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10677 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10678 Minor optimization, remove one instruction.
10679 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10681 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10683 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10685 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10687 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10688 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10689 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10690 * sysdeps/pthread/pthread_cond_signal.c: New file.
10691 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10692 * sysdeps/pthread/pthread_cond_wait.c: New file.
10693 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10694 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10695 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10696 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10697 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10698 * sysdeps/s390/Makefile: New file.
10699 * sysdeps/s390/bits/atomic.h: New file.
10700 * sysdeps/s390/pthread_spin_init.c: New file.
10701 * sysdeps/s390/pthread_spin_lock.c: New file.
10702 * sysdeps/s390/pthread_spin_trylock.c: New file.
10703 * sysdeps/s390/pthread_spin_unlock.c: New file.
10704 * sysdeps/s390/pthreaddef.h: New file.
10705 * sysdeps/s390/tcb-offsets.sym: New file.
10706 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10707 * sysdeps/s390/tls.h: New file.
10708 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10709 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10710 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10711 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10712 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10713 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10714 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10715 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10716 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10717 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10718 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10719 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10720 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10721 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10722 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10723 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10724 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10725 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10726 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10727 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10728 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10729 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10730 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10732 2003-02-04 Ulrich Drepper <drepper@redhat.com>
10734 * atomic.h: Add a couple more default implementations.
10735 (atomic_compare_and_exchange_acq): Use
10736 __arch_compare_and_exchange_32_acq in return value definition. It
10738 (atomic_bit_set): Renamed from atomic_set_bit.
10739 Add missing atomic_ prefixes.
10741 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10742 thread library is available, use correct value to mark initialized
10745 2003-02-03 Ulrich Drepper <drepper@redhat.com>
10747 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10748 __sysconf to determine pagesize.
10750 * pthread_create.c: Include <atomic.h>.
10751 * allocatestack.c (allocate_stack): Implement coloring of the
10752 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10753 size minus one. Adjust users.
10754 * sysdeps/i386/i686/Makefile: New file.
10756 2003-02-02 Ulrich Drepper <drepper@redhat.com>
10758 * allocatestack.c: Improve comment throughout the file.
10760 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10761 (__lll_lock_wait): Add branch prediction.
10762 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10763 (__lll_lock_wait): Likewise.
10764 (lll_unlock_wake_cb): Removed.
10766 2003-01-31 Ulrich Drepper <drepper@redhat.com>
10768 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10769 _POSIX_THREAD_PRIORITY_SCHEDULING.
10771 2003-01-30 Jakub Jelinek <jakub@redhat.com>
10773 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10774 Fix return type of ptr___pthread_getspecific.
10776 2003-01-29 Ulrich Drepper <drepper@redhat.com>
10778 * Makefile (tests): Add tst-umask1.
10779 (tst-umask1-ARGS): Define.
10780 * tst-umask1.c: New file.
10782 2003-01-28 Ulrich Drepper <drepper@redhat.com>
10784 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10785 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10786 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10787 pthread_rwlock_unlock.
10788 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10789 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10790 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10791 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10792 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10794 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10795 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10797 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10798 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10799 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10801 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10802 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10804 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10805 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10806 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10808 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10809 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10811 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10813 * Makefile (libpthread-routines): Remove lowlevelcond and
10814 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10815 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10816 and pthread_cond_broadcast.
10817 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10818 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10819 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10820 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10821 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10822 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10823 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10824 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10825 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10826 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10827 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10828 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10829 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10830 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10831 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10832 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10833 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10834 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10835 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10836 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10837 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10838 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10839 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10840 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10841 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10842 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10843 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10844 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10845 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10846 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10847 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10849 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10850 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10851 of the code is moved to ...
10852 * sysdeps/pthread/createthread.c: ...here. New file.
10854 2003-01-27 Ulrich Drepper <drepper@redhat.com>
10856 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10857 (__new_sem_post): Clear %eax before returning.
10858 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10860 * Makefile (tests): Add tst-cleanup2.
10861 * tst-cleanup2.c: New file.
10863 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10864 Interpret first parameter correctly.
10866 2003-01-17 Ulrich Drepper <drepper@redhat.com>
10868 * Makefile (headers): Add bits/semaphore.h.
10870 2003-01-16 Jakub Jelinek <jakub@redhat.com>
10872 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10875 2003-01-14 Ulrich Drepper <drepper@redhat.com>
10877 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10878 must be used and mapping failed.
10879 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10881 * Makefile (CFLAGS-pthread_self.os): Define this, not
10882 CFLAGS-pthread_self.c.
10884 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10886 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10887 lll_unlock_wake_cb.
10889 * Makefile (libpthread-routines): Add version. Add rules to build
10890 version.os and banner.h.
10891 * version.c: New file.
10893 2003-01-13 Jakub Jelinek <jakub@redhat.com>
10895 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10896 the alias unconditional.
10897 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10899 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10901 * Makefile (CFLAGS-pthread_self.c): New definition.
10903 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10905 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10906 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10907 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10908 * init.c (__pthread_initialize_minimal_internal): Likewise.
10910 2003-01-07 Jakub Jelinek <jakub@redhat.com>
10912 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10914 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10915 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10916 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10917 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10918 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10919 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10921 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10923 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10924 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10925 * tst-cancel-wrappers.sh: Remove all exceptions.
10927 2003-01-05 Ulrich Drepper <drepper@redhat.com>
10929 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10930 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10932 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10933 Use __libc_pthread_functions array if SHARED.
10935 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10936 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10938 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10939 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10940 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10941 __libc_ptf_call instead of __libc_maybe_call.
10942 (PTF): New #define.
10943 (__libc_cleanup_region_start): Wrap function name with PTF call.
10944 (__libc_cleanup_region_end): Likewise.
10945 (__libc_cleanup_end): Likewise.
10947 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10948 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10949 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10950 * pthreadP.h: Add prototypes.
10952 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10953 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10954 __pthread_rwlock_unlock aliases.
10955 * pthreadP.h: Add prototypes for new aliases.
10957 * pthreadP.h (struct pthead_functions): Moved to...
10958 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10959 * init.c (pthread_functions): Add initializers for new elements.
10961 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10962 __pthread_cleanup_pop_restore aliases.
10963 * pthreadP.h: Add prototypes.
10965 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10966 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10967 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10968 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10969 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10970 * pthreadP.h: Adjust prototypes and callers.
10972 2003-01-04 Ulrich Drepper <drepper@redhat.com>
10974 * Makefile (tests): Add tst-cancel7.
10975 (tst-cancel7-ARGS): New variable.
10976 * tst-cancel7.c: New file.
10978 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10979 around gcc defficiencies.
10980 * old_pthread_cond_signal.c: Likewise.
10981 * old_pthread_cond_timedwait.c: Likewise.
10982 * old_pthread_cond_wait.c: Likewise.
10984 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10986 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10988 * Makefile (tests): Add tst-cond7.
10989 * tst-cond7.c: New file.
10991 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10992 (condvar_cleanup): Get condvar address from the right place.
10994 * atomic.h: Correct definitions of atomic_full_barrier,
10995 atomic_read_barrier, atomic_write_barrier.
10997 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10999 * old_pthread_cond_signal.c: Likewise.
11000 * old_pthread_cond_timedwait.c: Likewise.
11001 * old_pthread_cond_wait.c: Likewise.
11003 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11005 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11007 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11009 * pthreadP.h (pthread_cond_2_0_t): New type.
11010 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11011 Use new type for the 2.0 condvar function prototypes.
11012 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11013 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11015 * old_pthread_cond_destroy.c: Likewise.
11016 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11017 * old_pthread_cond_signal.c: Likewise.
11018 * old_pthread_cond_timedwait.c: Likewise.
11019 * old_pthread_cond_wait.c: Likewise.
11021 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11022 (__pthread_cond_wait): Don't save cancellation mode and seq value
11025 * herrno.c (__h_errno_location): Don't define as weak.
11027 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11029 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11030 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11031 and pthread_cond_wait.
11032 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11034 (__pthread_cond_broadcast_2_0): ... this.
11035 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11037 (__pthread_cond_destroy_2_0): ... this.
11038 * old_pthread_cond_init.c (__old_pthread_cond_init):
11040 (__pthread_cond_init_2_0): ... this.
11041 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11043 (__pthread_cond_signal_2_0): ... this.
11044 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11046 (__pthread_cond_wait_2_0): ... this.
11047 * pthread_cond_destroy.c: Include shlib-compat.h.
11048 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11049 * pthread_cond_init.c: Include shlib-compat.h.
11050 (pthread_cond_init): Change strong_alias into versioned_symbol.
11051 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11052 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11054 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11055 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11056 __pthread_cond_wait_2_0): New prototypes.
11057 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11058 __old_pthread_cond_init, __old_pthread_cond_signal,
11059 __old_pthread_cond_wait): Removed.
11060 * init.c: Include shlib-compat.h.
11061 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11062 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11063 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11064 ptr___pthread_cond_*_2_0 fields.
11065 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11066 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11068 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11069 LIBC_SIGACTION was not yet defined.
11070 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11071 [!defined LIBC_SIGACTION] (__sigaction): New function and
11073 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11074 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11076 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11078 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11080 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11082 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11083 New, larger type definition.
11084 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11086 * Versions [libpthread]: Add definitions for new pthread_cond_*
11087 interfaces for version GLIBC_2.3.2.
11088 * pthread_cond_init.c: Update initialization for new type definition.
11089 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11090 pthread_cond_timedwait, pthread_cond_signal, and
11091 pthread_cond_broadcast. Add old_pthread_cond_init,
11092 old_pthread_cond_destroy, old_pthread_cond_wait,
11093 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11094 old_pthread_cond_broadcast.
11095 * old_pthread_cond_broadcast.c: New file.
11096 * old_pthread_cond_destroy.c: New file.
11097 * old_pthread_cond_init.c: New file.
11098 * old_pthread_cond_signal.c: New file.
11099 * old_pthread_cond_timedwait.c: New file.
11100 * old_pthread_cond_wait.c: New file.
11101 * pthreadP.h: Add prototypes for the compatibility interfaces.
11103 * pthread_cond_destroy.c: Don't include <errno.h>.
11105 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11107 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11108 unnecessary zero offset when addressing MUTEX.
11110 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11112 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11114 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11115 for __register_atfork.
11117 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11119 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11120 instead of ASSEMBLER test macro.
11122 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11123 __libc_current_sigrtmax): Add libc_hidden_def.
11125 * sysdeps/pthread/list.h: Remove assert.h include.
11127 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11129 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11130 __pthread_initialize_minimal_internal not
11131 __pthread_initialize_minimal.
11133 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11135 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11136 __pthread_initialize_minimal as hidden.
11138 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11141 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11143 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11144 $(common-objpfx)format.lds, include that into the output script.
11146 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11148 2002-12-28 Andreas Jaeger <aj@suse.de>
11150 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11151 nsec resolution changes.
11152 (xstat64_conv): Likewise.
11153 (xstat32_conv): Likewise.
11154 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11155 struct kernel_stat.
11156 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11157 structs stat and stat64.
11158 * time/time.h (__timespec_defined): Define for __USE_MISC.
11159 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11161 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11163 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11165 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11166 (pthread_exit): Use strong_alias to avoid warnings.
11167 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11168 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11169 ptr___pthread_attr_init_2_*.
11170 * init.c (pthread_functions): Adjust.
11172 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11174 * forward.c: Make all functions available by default again. It
11175 caused too much trouble.
11177 * pt-siglongjmp.c: Removed.
11179 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11181 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11182 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11183 * sysdeps/i386/Makefile: New file.
11184 * sysdeps/i386/tcb-offsets.sym: New file.
11185 * sysdeps/pthread/tcb-offsets.h: New file.
11186 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11187 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11189 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11190 __register_atfork...
11191 (GLIBC_2.3.2): ...here.
11193 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11195 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11196 pthread_attr_setstackaddr with __attribute_deprecated__.
11198 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11200 * pt-system.c (system): Remove cancellation handling.
11201 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11202 cancellation routines.
11204 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11206 * descr.h: Include <dl-sysdep.h>.
11207 (struct pthread): Move header.data.list to the back of the struct.
11208 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11209 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11210 (SYSINFO_OFFSEET): Likewise.
11212 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11214 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11216 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11217 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11218 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11219 (USE_DL_SYSINFO): Undef.
11221 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11223 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11224 $(common-objpfx)libc.so.
11225 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11226 it is bigger than pipe buffer size even on arches with bigger
11228 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11230 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11232 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11233 correct errno access for case that USE___THREAD is not defined.
11235 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11237 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11238 Patch by Marijn Ros <marijn@mad.scientist.com>.
11240 2002-12-22 Roland McGrath <roland@redhat.com>
11242 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11244 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11246 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11248 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11250 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11251 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11252 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11254 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11256 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11257 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11258 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11259 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11260 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11261 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11262 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11263 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11265 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11267 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11269 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11271 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11273 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11274 that sysinfo is properly initialized.
11275 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11276 to 1 only for ld.so.
11278 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11279 RTLD_CORRECT_DYNAMIC_WEAK.
11281 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11283 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11284 Use return 0 as 6th argument to FORWARD4.
11285 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11287 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11289 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11290 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11291 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11292 (INIT_SYSINFO): New #define.
11293 (TLS_TP_INIT): Use INIT_SYSINFO.
11294 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11295 At test to make sure SYSINFO_OFFSET value is correct.
11296 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11298 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11300 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11301 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11302 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11303 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11304 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11305 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11306 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11308 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11310 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11311 macro instead of using int $0x80 directly.
11313 * sysdeps/pthread/bits/stdio-lock.h: New file.
11314 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11315 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11316 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11317 * Makefile (routines): Add libc-lowlevelmutex.
11319 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11320 __i686.get_pc_thunk.dx.
11322 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11324 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11325 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11326 ($(objpfx)tst-cancel-wrappers.out): New rule.
11327 * tst-cancel-wrappers.sh: New test.
11328 * tst-locale1.c: Include signal.h.
11329 (uselocale): Test static linking of __libc_current_sigrt*.
11331 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11333 * Makefile (tests): Add tst-cancel6.
11334 * tst-cancel6.c: New file
11336 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11338 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11339 Define meaningfully for assembler as well.
11340 * pthreadP.h (struct pthread_functions): Remove
11341 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11342 and ptr_pthread_attr_init_2_1 fields.
11343 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11344 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11345 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11346 (FORWARD3): Define using FORWARD4.
11347 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11349 * pt-system.c: Remove duplicate stdlib.h include.
11351 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11353 * sem_init.c: Define sem_init@GLIBC_2.0.
11354 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11355 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11357 * flockfile.c: Moved to...
11358 * sysdeps/pthread/flockfile.c: ...here. New file.
11359 * funlockfile.c: Moved to...
11360 * sysdeps/pthread/funlockfile.c: ...here. New file.
11361 * ftrylockfile.c: Moved to...
11362 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11364 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11366 * libc-cancellation.c: Guard both function with
11367 #if !defined NOT_IN_libc.
11368 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11369 automatically provided pthread wrappers.
11370 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11371 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11373 * pt-open.c: Removed.
11374 * pt-fcntl.c: Removed.
11375 * pt-fsync.c: Removed.
11376 * pt-lseek.c: Removed.
11377 * pt-msgrcv.c: Removed.
11378 * pt-msgsnd.c: Removed.
11379 * pt-msync.c: Removed.
11380 * pt-nanosleep.c: Removed.
11381 * pt-open64.c: Removed.
11382 * pt-pause.c: Removed.
11383 * pt-pread.c: Removed.
11384 * pt-pread64.c: Removed.
11385 * pt-pwrite.c: Removed.
11386 * pt-pwrite64.c: Removed.
11387 * pt-read.c: Removed.
11388 * pt-recv.c: Removed.
11389 * pt-recvfrom.c: Removed.
11390 * pt-recvmsg.c: Removed.
11391 * pt-send.c: Removed.
11392 * pt-sendto.c: Removed.
11393 * pt-sigtimedwait.c: Removed.
11394 * pt-sigwait.c: Removed.
11395 * pt-wait.c: Removed.
11396 * pt-waitpid.c: Removed.
11397 * pt-write.c: Removed.
11398 * pt-accept.c: Removed.
11399 * pt-close.c: Removed.
11400 * pt-connect.c: Removed.
11401 * pt-lseek64.c: Removed.
11402 * pt-sendmsg.c: Removed.
11403 * pt-tcdrain.c: Removed.
11405 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11407 * init.c (__pthread_initialize_minimal_internal): Renamed from
11408 __pthread_initialize_minimal. Make old name an alias. This
11409 converts a normal relocation into a relative relocation.
11411 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11413 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11414 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11415 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11416 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11417 pt-sigwaitinfo, pt-waitid, and pt-writev.
11418 * pt-creat.c: Removed.
11419 * pt-poll.c: Removed.
11420 * pt-pselect.c: Removed.
11421 * pt-readv.c: Removed.
11422 * pt-select.c: Removed.
11423 * pt-sigpause.c: Removed.
11424 * pt-sigsuspend.c: Removed.
11425 * pt-sigwaitinfo.c: Removed.
11426 * pt-waitid.c: Removed.
11427 * pt-writev.c: Removed.
11429 * init.c (pthread_functions): New variable.
11430 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11431 (or NULL) to __libc_pthread_init.
11432 * forward.c: Rewrite to use __libc:pthread_functions array to get
11433 function addresses.
11434 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11436 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11437 Take new parameter. Copy content of variable pointed to by it
11438 to __libc_pthread_init.
11440 * pthreadP.h (struct pthread_functions): New type.
11441 (__libc_pthread_init): Declare.
11443 * pthread_attr_destroy.c: Add namespace protected alias.
11444 * pthread_attr_getdetachstate.c: Likewise.
11445 * pthread_attr_getinheritsched.c: Likewise.
11446 * pthread_attr_getschedparam.c: Likewise.
11447 * pthread_attr_getschedpolicy.c: Likewise.
11448 * pthread_attr_getscope.c: Likewise.
11449 * pthread_attr_setdetachstate.c: Likewise.
11450 * pthread_attr_setinheritsched.c: Likewise.
11451 * pthread_attr_setschedparam.c: Likewise.
11452 * pthread_attr_setschedpolicy.c: Likewise.
11453 * pthread_attr_setscope.c: Likewise.
11454 * pthread_cond_broadcast.c: Likewise.
11455 * pthread_cond_destroy.c: Likewise.
11456 * pthread_cond_init.c: Likewise.
11457 * pthread_cond_signal.c: Likewise.
11458 * pthread_cond_wait.c: Likewise.
11459 * pthread_condattr_destroy.c: Likewise.
11460 * pthread_condattr_init.c: Likewise.
11461 * pthread_equal.c: Likewise.
11462 * pthread_exit.c: Likewise.
11463 * pthread_getschedparam.c: Likewise.
11464 * pthread_self.c: Likewise.
11465 * pthread_setcancelstate.c: Likewise.
11466 * pthread_setschedparam.c: Likewise.
11467 * pthread_mutex_destroy.c: Likewise.
11468 * pthread_mutex_init.c: Likewise.
11469 * pthreadP.h: Add prototypes for the aliases.
11471 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11472 multiple_threads member in correct TCB to 1.
11474 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11475 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11476 member of thread decriptor, otherwise return unconditionally 1.
11478 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11480 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11481 regular Linux version. Remove file.
11482 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11483 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11484 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11485 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11486 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11487 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11488 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11489 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11490 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11491 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11492 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11493 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11494 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11495 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11496 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11497 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11498 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11499 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11500 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11501 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11502 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11503 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11504 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11505 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11506 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11507 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11508 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11509 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11510 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11511 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11513 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11515 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11516 * sysdeps/unix/sysv/linux/open.c: Removed.
11517 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11518 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11519 * sysdeps/unix/sysv/linux/msync.c: Removed.
11520 * sysdeps/unix/sysv/linux/read.c: Removed.
11521 * sysdeps/unix/sysv/linux/close.c: Removed.
11522 * sysdeps/unix/sysv/linux/creat.c: Removed.
11523 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11524 * sysdeps/unix/sysv/linux/pause.c: Removed.
11525 * sysdeps/unix/sysv/linux/select.c: Removed.
11526 * sysdeps/unix/sysv/linux/write.c: Removed.
11528 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11530 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11531 element in TCB to see whether locking is needed.
11533 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11534 MULTIPLE_THREADS_OFFSET value is correct.
11536 * sysdeps/unix/sysv/linux/close.c: New file.
11537 * sysdeps/unix/sysv/linux/connect.S: New file.
11538 * sysdeps/unix/sysv/linux/creat.c: New file.
11539 * sysdeps/unix/sysv/linux/fsync.c: New file.
11540 * sysdeps/unix/sysv/linux/llseek.c: New file.
11541 * sysdeps/unix/sysv/linux/lseek.c: New file.
11542 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11543 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11544 * sysdeps/unix/sysv/linux/msync.c: New file.
11545 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11546 * sysdeps/unix/sysv/linux/open.c: New file.
11547 * sysdeps/unix/sysv/linux/open64.c: New file.
11548 * sysdeps/unix/sysv/linux/pause.c: New file.
11549 * sysdeps/unix/sysv/linux/poll.c: New file.
11550 * sysdeps/unix/sysv/linux/pread.c: New file.
11551 * sysdeps/unix/sysv/linux/pread64.c: New file.
11552 * sysdeps/unix/sysv/linux/pselect.c: New file.
11553 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11554 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11555 * sysdeps/unix/sysv/linux/readv.c: New file.
11556 * sysdeps/unix/sysv/linux/recv.S: New file.
11557 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11558 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11559 * sysdeps/unix/sysv/linux/select.c: New file.
11560 * sysdeps/unix/sysv/linux/send.S: New file.
11561 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11562 * sysdeps/unix/sysv/linux/sendto.S: New file.
11563 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11564 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11565 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11566 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11567 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11568 * sysdeps/unix/sysv/linux/system.c: New file.
11569 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11570 * sysdeps/unix/sysv/linux/wait.c: New file.
11571 * sysdeps/unix/sysv/linux/waitid.c: New file.
11572 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11573 * sysdeps/unix/sysv/linux/writev.c: New file.
11574 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11576 * pt-readv.c: Fix comment.
11578 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11580 * tst-cleanup1.c: Include stdlib.h.
11582 * tst-cancel5.c: New test.
11583 * Makefile (tests): Add tst-cancel5.
11584 (tst-cancel5): Link against libc.so libpthread.so in that order.
11586 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11588 * forward.c (test_loaded): Prevent recursive calls.
11590 * Makefile (routines): Add libc-cancellation.
11591 * libc-cancellation.c: New file.
11592 * descr.h (struct pthread): Add multiple_threads field.
11593 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11594 new thread descriptor to 1.
11595 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11596 Initialize multiple_thread field after successful thread creation.
11597 * cancellation.c (__do_cancel): Move to pthreadP.h.
11598 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11599 (__pthread_disable_asynccancel): Add internal_function attribute.
11600 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11601 * pthread_setcancelstate.c: Likewise.
11602 * pthread_setcanceltype.c: Likewise.
11603 * pthread_exit.c: Likewise.
11604 * pthreadP.h (CANCELLATION_P): Likewise.
11605 (__do_cancel): Define as static inline.
11606 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11607 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11609 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11610 fields. Define MULTIPLE_THREADS_OFFSET.
11611 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11613 * sysdeps/unix/sysv/linux/accept.S: New file.
11614 * sysdeps/unix/sysv/linux/read.c: New file.
11615 * sysdeps/unix/sysv/linux/write.c: New file.
11616 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11617 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11618 initialization of __libc_locking_needed.
11619 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11620 __libc_locking_needed, use multiple_threads field in TCB.
11621 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11623 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11625 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11627 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11629 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11630 access to __libc_locking_needed for PIC.
11632 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11634 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11635 declare for libc.so.
11636 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11638 (__libc_lock_lock): Put into statement expression.
11639 (__libc_lock_unlock): Remove trailing semicolon.
11640 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11642 2002-12-12 Roland McGrath <roland@redhat.com>
11644 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11645 "m" constraint to refer to __libc_locking_needed. Declare it here.
11647 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11649 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11650 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11651 Initialize __libc_locking_needed.
11652 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11653 instead of __register_pthread_fork_handler.
11654 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11655 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11656 fork-gen with libc_pthread_init.
11657 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11658 of __register_pthread_fork_handler.
11659 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11660 of __register_pthread_fork_handler.
11661 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11662 __libc_locking_needed to determine whether lock prefix can be avoided.
11663 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11665 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11667 * Makefile (tests): Add tst-cleanup1.
11668 * tst-cleanup1.c: New file.
11669 * cancellation.c (__cleanup_thread): Removed.
11670 (__do_cancel): Remove call to __cleanup_thread.
11671 * pthreadP.h: Remove __cleanup_thread prorotype.
11673 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11674 Remember function and argument even if cancellation handler
11675 function is not available.
11676 (__libc_cleanup_region_end): Execute registered function directly if
11677 pthread functions are not available.
11678 (__libc_cleanup_end): Likewise.
11680 * init.c (__pthread_initialize_minimal): Fix initialization in
11681 static lib by preventing gcc from being too clever.
11683 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11685 * init.c (__pthread_initialize_minimal): Remove unneccesary
11688 * Makefile (tests): We can run tst-locale2 now.
11690 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11692 * Versions: Remove duplicated sigwait entry.
11694 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11696 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11699 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11701 * pthreadP.h: Declare __pthread_enable_asynccancel and
11702 __pthread_disable_asynccancel.
11703 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11704 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11705 * cancellation.c (__pthread_enable_asynccancel): New function.
11706 (__pthread_disable_asynccancel): New function.
11707 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11708 * pt-close.c: Likewise.
11709 * pt-connect.c: Likewise.
11710 * pt-creat.c: Likewise.
11711 * pt-fcntl.c: Likewise.
11712 * pt-fsync.c: Likewise.
11713 * pt-lseek.c: Likewise.
11714 * pt-lseek64.c: Likewise.
11715 * pt-msgrcv.c: Likewise.
11716 * pt-msgsnd.c: Likewise.
11717 * pt-msync.c: Likewise.
11718 * pt-nanosleep.c: Likewise.
11719 * pt-open.c: Likewise.
11720 * pt-open64.c: Likewise.
11721 * pt-pause.c: Likewise.
11722 * pt-poll.c: Likewise.
11723 * pt-pread.c: Likewise.
11724 * pt-pread64.c: Likewise.
11725 * pt-pselect.c: Likewise.
11726 * pt-pwrite.c: Likewise.
11727 * pt-pwrite64.c: Likewise.
11728 * pt-read.c: Likewise.
11729 * pt-readv.c: Likewise.
11730 * pt-recv.c: Likewise.
11731 * pt-recvfrom.c: Likewise.
11732 * pt-recvmsg.c: Likewise.
11733 * pt-select.c: Likewise.
11734 * pt-send.c: Likewise.
11735 * pt-sendmsg.c: Likewise.
11736 * pt-sendto.c: Likewise.
11737 * pt-sigpause.c: Likewise.
11738 * pt-sigsuspend.c: Likewise.
11739 * pt-sigtimedwait.c: Likewise.
11740 * pt-sigwait.c: Likewise.
11741 * pt-sigwaitinfo.c: Likewise.
11742 * pt-system.c: Likewise.
11743 * pt-tcdrain.c: Likewise.
11744 * pt-wait.c: Likewise.
11745 * pt-waitid.c: Likewise.
11746 * pt-waitpid.c: Likewise.
11747 * pt-write.c: Likewise.
11748 * pt-writev.c: Likewise.
11749 * pthread_join.c: Likewise.
11750 * pthread_timedjoin.c: Likewise.
11752 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11753 (__xpg_sigpause): New function.
11754 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11756 2002-12-07 Ulrich Drepper <drepper@redhat.com>
11758 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11760 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11761 _GI_pthread_cleanup_pop to pthreadP.h.
11763 * ftrylockfile.c: Use _IO_lock_trylock instead of
11764 pthread_mutex_trylock.
11766 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11767 (CANCEL_RESET): Likewise.
11768 (__pthread_setcanceltype_): Declare.
11769 (__pthread_mutex_lock_internal): Declare.
11770 (__pthread_mutex_unlock_internal): Declare.
11771 (__pthread_once_internal): Declare.
11772 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11773 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11775 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11776 and pthread_mutex_unlock.
11777 * pthread_cond_wait.c: Likewise.
11778 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11779 * pthread_mutex_unlock.c: Likewise.
11781 * pthread_setcanceltype.c: Add additional alias
11782 __pthread_setcanceltype.
11784 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11785 * sem_open.c (sem_open): Likewise.
11786 Use __libc_open, __libc_write, and __libc_close instead of
11787 open, write, and close respectively.
11789 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11790 Rewrite as statement expression since it must return a value.
11792 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11793 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11796 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11797 alias __pthread_once_internal.
11799 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11801 2002-12-06 Ulrich Drepper <drepper@redhat.com>
11803 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11804 * tst-stdio1.c: New file.
11805 * tst-stdio2.c: New file.
11807 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11809 * Makefile (tests): Comment out tst-locale2 for now.
11810 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11812 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11814 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11815 Use _IO_lock_init instead of explicit assignment.
11817 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11818 Define __libc_lock_* and __libc_lock_recursive macros with
11819 lowlevellock macros, not pthread mutexes.
11821 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11822 of pthread_mutex_lock.
11823 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11824 instead of pthread_mutex_unlock.
11826 2002-12-06 Roland McGrath <roland@redhat.com>
11828 * allocatestack.c (__stack_user): Use uninitialized defn.
11829 * init.c (__pthread_initialize_minimal): Initialize it here.
11831 2002-12-05 Roland McGrath <roland@redhat.com>
11833 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11835 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11837 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11838 missing & here too.
11840 2002-12-05 Ulrich Drepper <drepper@redhat.com>
11842 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11844 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11845 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11846 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11847 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11848 for __libc_lock_* macros.
11849 * Makefile (routines): Add libc-lowlevellock.
11851 2002-10-09 Roland McGrath <roland@redhat.com>
11853 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11854 Under [__PIC__], call the function via the pointer fetched for
11855 comparison rather than a call by name that uses the PLT.
11856 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11857 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11858 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11859 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11860 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11862 2002-12-04 Roland McGrath <roland@redhat.com>
11864 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11866 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11867 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11869 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11871 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11873 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11874 a completely opaque, non-integer type.
11875 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11877 2002-12-05 Jakub Jelinek <jakub@redhat.com>
11879 * sysdeps/i386/tls.h: Include stdlib.h.
11880 * sysdeps/x86_64/tls.h: Likewise.
11882 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11884 * Makefile (tests): Add tst-locale2.
11885 (tests-static): Likewise.
11886 * tst-locale2.c: New file.
11888 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11889 volatile and add memory clobbers to lock operations.
11891 2002-12-03 Ulrich Drepper <drepper@redhat.com>
11893 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11894 * sysdeps/i386/i486/bits/atomic.h: New file.
11895 * sysdeps/i386/i586/bits/atomic.h: New file.
11896 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11897 include i486 version.
11898 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11899 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11900 Patch by Marijn Ros <marijn@mad.scientist.com>.
11902 * allocatestack.c (get_cached_stack): Don't crash if we first
11903 found a stack with a larger size then needed.
11904 Reported by Hui Huang <hui.huang@sun.com>.
11906 * Makefile (tests): Add tst-sysconf.
11907 * tst-sysconf.c: New file.
11909 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11910 PTHREAD_THREADS_MAX.
11912 2002-12-02 Roland McGrath <roland@redhat.com>
11914 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11915 Declare using hidden_proto instead of attribute_hidden, so there are
11916 non-.hidden static symbols for gdb to find.
11917 (__pthread_keys): Likewise.
11918 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11919 * allocatestack.c (__stack_user): Likewise.
11920 * pthread_create.c (__pthread_keys): Likewise.
11921 (__nptl_threads_events, __nptl_last_event): Make these static instead
11923 * pthread_key_create.c (__pthread_pthread_keys_max,
11924 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11926 2002-12-02 Ulrich Drepper <drepper@redhat.com>
11928 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11930 * tst-locale1.c: New file.
11932 * pthread_cond_timedwait.c: Include <stdlib.h>.
11934 * Makefile (tests): Add tst-fork2 and tst-fork3.
11935 * tst-fork2.c: New file.
11936 * tst-fork3.c: New file.
11938 2002-11-28 Ulrich Drepper <drepper@redhat.com>
11940 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11942 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11943 require it to 200112L.
11945 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11946 instruction only if HAVE_CMOV is defined.
11947 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11949 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11951 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11953 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11955 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11957 2002-11-27 Ulrich Drepper <drepper@redhat.com>
11959 * sysdeps/x86_64/bits/atomic.h: New file.
11961 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11964 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11965 possible since gettid cannot fail.
11967 * sysdeps/x86_64/pthreaddef.h: New file.
11969 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11971 * sysdeps/x86_64/pthread_spin_init.c: New file.
11972 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11973 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11974 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11976 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11977 Add missing lock prefix. Minute optimization.
11979 * tst-spin2.c (main): Also check successful trylock call.
11981 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11982 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11984 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11985 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11987 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11988 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11989 value in case of an error. Add support for INTERNAL_SYSCALL.
11991 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11992 value in case of an error.
11994 * sysdeps/x86_64/tls.h: New file.
11996 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11998 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11999 takes the array member name and the index as parameters.
12000 (THREAD_SETMEM_NC): Likewise.
12001 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12002 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12005 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12006 to decide which code to use.
12007 (THREAD_SETMEM_NC): Likewise.
12009 * allocatestack.c (queue_stack): Don't remove stack from list here.
12010 Do it in the caller. Correct condition to prematurely terminate
12011 loop to free stacks.
12012 (__deallocate_stack): Remove stack from list here.
12014 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12016 * Makefile (tests): Add tst-stack1.
12017 * tst-stack1.c: New file.
12019 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12022 * pthread_attr_getstack.c: Return bottom of the thread area.
12024 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12026 * Makefile (libpthread-routines): Add pt-allocrtsig and
12027 pthread_kill_other_threads.
12028 * pt-allocrtsig.c: New file.
12029 * pthread_kill_other_threads.c: New file.
12030 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12031 all three functions.
12032 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12034 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12035 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12036 and __libc_allocate_rtsig_private.
12037 * Versions (libpthread): Export pthread_kill_other_threads_np,
12038 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12040 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12042 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12043 the end of the stack. Adjust computations.
12044 When mprotect call fails dequeue stack and free it.
12045 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12047 * pthread_getattr_np.c: Likewise.
12049 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12052 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12054 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12055 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12057 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12059 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12060 * pthread_setspecific.c: Likewise.
12062 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12064 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12065 definitions. Get them from the official place.
12066 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12068 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12069 Use new CLONE_ flags in clone() calls.
12071 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12072 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12074 * Versions: Add pthread_* functions for libc.
12075 * forward.c: New file.
12077 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12079 * herrno.c: New file.
12082 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12083 sem_trywait, and sem_timedwait. Add herrno and res.
12084 * sem_init.c: Don't initialize lock and waiters members.
12085 * sem_open.c: Likewise.
12086 * sem_post.c: Removed.
12087 * sem_wait.c: Removed.
12088 * sem_trywait.c: Removed.
12089 * sem_timedwait.c: Removed.
12090 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12091 Includes full implementations of sem_post, sem_wait, sem_trywait,
12093 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12094 for new implementation.
12095 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12096 and waiters fields.
12098 * tst-sem3.c: Improve error message.
12099 * tst-signal3.c: Likewise.
12101 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12102 to tell the kernel about the termination futex and to initialize tid
12103 member. Don't initialize main_thread.
12104 * descr.h (struct pthread): Remove main_thread member.
12105 * cancelllation.c (__do_cancel): Remove code handling main thread.
12106 The main thread is not special anymore.
12108 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12109 size of the stacks to stack_cache_actsize.
12111 * pt-readv.c: Add missing "defined".
12112 * pt-sigwait.c: Likewise.
12113 * pt-writev.c: Likewise.
12115 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12117 * Versions: Export __connect from libpthread.
12118 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12120 * Makefile (libpthread-routines): Add pt-raise.
12121 * sysdeps/unix/sysv/linux/raise.c: New file.
12122 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12123 * sysdeps/generic/pt-raise.c: New file.
12125 * pthread_cond_init.c: Initialize all data elements of the condvar
12126 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12128 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12129 * pthread_create.c: Likewise.
12131 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12132 * tst-key1.c: New file.
12133 * tst-key2.c: New file.
12134 * tst-key3.c: New file.
12136 * Versions: Export pthread_detach for version GLIBC_2.0.
12137 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12139 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12141 * pthread_key_create.c: Terminate search after an unused key was found.
12142 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12144 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12145 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12147 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12149 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12150 dynamic lookup for errno in PIC.
12152 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12153 release the stack lock as soon as possible.
12154 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12155 the static TLS block.
12156 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12158 * cancellation.c: Renamed from cancelation.c.
12159 * Makefile: Adjust accordingly.
12160 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12161 * cleanup_defer.c: Use CANCELLATION_P.
12162 * pthread_testcancel.c: Likewise.
12163 * descr.h: Fix spelling in comments.
12164 * init.c: Likewise.
12165 * pthread_getattr_np.c: Likewise.
12166 * pthread_getschedparam.c: Likewise.
12167 * pthread_setschedparam.c: Likewise.
12168 * Versions: Likewise.
12170 * pt-pselect.c: New file.
12171 * Makefile (libpthread-routines): Add pt-pselect.
12172 * Versions: Add pselect.
12174 * tst-cancel4.c: New file.
12175 * Makefile (tests): Add tst-cancel4.
12177 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12179 * pthread_mutex_lock.c: Always record lock ownership.
12180 * pthread_mutex_timedlock.c: Likewise.
12181 * pthread_mutex_trylock.c: Likewise.
12183 * pt-readv.c: New file.
12184 * pt-writev.c: New file.
12185 * pt-creat.c: New file.
12186 * pt-msgrcv.c: New file.
12187 * pt-msgsnd.c: New file.
12188 * pt-poll.c: New file.
12189 * pt-select.c: New file.
12190 * pt-sigpause.c: New file.
12191 * pt-sigsuspend.c: New file.
12192 * pt-sigwait.c: New file.
12193 * pt-sigwaitinfo.c: New file.
12194 * pt-waitid.c: New file.
12195 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12196 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12197 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12198 * Versions: Add all the new functions.
12200 * tst-exit1.c: New file.
12201 * Makefile (tests): Add tst-exit1.
12203 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12205 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12207 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12209 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12210 call. pthread_join is an official cancellation point.
12211 * pthread_timedjoin.c: Likewise.
12213 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12214 and the condvar's mutex are retrieved.
12215 * pthread_cond_timedwait.c: Likewise.
12216 Reported by dice@saros.East.Sun.COM.
12218 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12220 * pthreadP.h: Cut out all type definitions and move them...
12221 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12222 * pthreadP.h: Include <internaltypes.h>.
12224 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12225 performance tweaks.
12227 * sem_trywait.c: Shuffle #includes around to get right order.
12228 * sem_timedwait.c: Likewise.
12229 * sem_post.c: Likewise.
12230 * sem_wait.c: Likewise.
12232 * nptl 0.3 released.
12234 * Makefile (tests): Add tst-signal3.
12235 * tst-signal3.c: New file.
12237 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12239 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12240 the asms modify the sem object.
12241 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12243 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12244 the actual members.
12245 * pthreadP.h (struct sem): New type. Actual semaphore type.
12246 * semaphoreP.h: Include pthreadP.h.
12247 * sem_getvalue.c: Adjust to sem_t change.
12248 * sem_init.c: Likewise.
12249 * sem_open.c: Likewise.
12250 * sem_post.c: Likewise.
12251 * sem_timedwait.c: Likewise.
12252 * sem_trywait.c: Likewise.
12253 * sem_wait.c: Likewise.
12255 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12257 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12258 * tst-basic2.c: New file.
12259 * tst-exec1.c: New file.
12260 * tst-exec2.c: New file.
12261 * tst-exec3.c: New file.
12263 * tst-fork1.c: Remove extra */.
12265 * nptl 0.2 released. The API for IA-32 is complete.