1 2012-09-24 H.J. Lu <hongjiu.lu@intel.com>
3 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
4 to uint64_t for 64-bit store.
5 (THREAD_SETMEM_NC): Likewise.
7 2012-09-19 H.J. Lu <hongjiu.lu@intel.com>
9 * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
11 (THREAD_SETMEM_NC): Likewise.
13 2012-09-14 Jeff Law <law@redhat.com>
16 * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
18 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
21 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
24 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
26 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
27 (LDLIBS-tst-cancel24): This.
29 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
32 * Makefile (tests-static): Add tst-cancel21-static.
34 * tst-cancel21-static.c: New file.
36 2012-09-01 Joseph Myers <joseph@codesourcery.com>
38 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
39 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
40 [__NR_clock_getres]: Make code unconditional.
41 (pthread_getcpuclockid): Remove code left unreachable by removal
44 2012-08-31 Joseph Myers <joseph@codesourcery.com>
47 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
48 atomic_compare_and_exchange_bool_rel.
49 * tst-sem14.c: New file.
50 * Makefile (tests): Add tst-sem14.
52 2012-08-15 Roland McGrath <roland@hack.frob.com>
54 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
56 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
57 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
59 2012-08-16 Joseph Myers <joseph@codesourcery.com>
61 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
62 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
63 * pthread_condattr_setclock.c (pthread_condattr_setclock)
64 [!__ASSUME_POSIX_TIMERS]: Likewise.
65 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
66 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
67 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
68 [!__ASSUME_POSIX_TIMERS]: Likewise.
69 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
70 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
71 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
73 [!__NR-timer_create]: Remove conditional code.
74 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
75 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
77 [!__NR_timer_delete]: Remove conditional code.
78 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
79 * sysdeps/unix/sysv/linux/timer_getoverr.c
80 [__NR_timer_getoverrun]: Make code unconditional.
81 [!__NR_timer_getoverrun]: Remove conditional code.
82 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
83 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
84 Make code unconditional.
85 [!__NR_timer_gettime]: Remove conditional code.
86 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
87 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
88 Make code unconditional.
89 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
90 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
91 Make code unconditional.
92 [!__NR_timer_settime]: Remove conditional code.
93 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
94 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
95 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
98 2012-08-15 Tom de Vries <vries@codesourcery.com>
99 Maxim Kuvyrkov <maxim@codesourcery.com>
101 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
102 (__libc_lock_trylock): Allow pre-existing definitions.
104 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
106 * pthread_spin_lock.c: New file.
107 * pthread_spin_trylock.c: New file.
109 2012-08-08 Joseph Myers <joseph@codesourcery.com>
111 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
113 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
114 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
116 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
117 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
118 Make code unconditional.
119 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
120 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
121 __NR_tgkill]: Make code unconditional.
122 (raise) [__ASSUME_TGKILL]: Likewise.
123 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
124 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
125 [__ASSUME_TGKILL]: Make code unconditional.
126 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
127 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
128 __NR_tgkill]: Make code unconditional.
129 (raise) [__ASSUME_TGKILL]: Likewise.
130 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
132 2012-08-07 Joseph Myers <joseph@codesourcery.com>
134 * sysdeps/pthread/createthread.c (create_thread)
135 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
137 2012-08-03 Joseph Myers <joseph@codesourcery.com>
139 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
141 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
143 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
145 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
146 (pagesize): New static variable.
147 (allocate_and_test): Return MEM. Rename parameter to TARGET.
148 (check_stack_top): New local variables MEM and PAGEMASK. Cap
149 stack size to MAX_STACK_SIZE. Call allocate_and_test for
150 halfway up the stack top page. Verify that the top page was
152 (do_test): Get pagesize using sysconf.
154 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
156 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
158 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
159 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
162 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
164 * tst-pthread-getattr.c: Revert last change.
166 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
168 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
171 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
173 (check_stack_top): Read valued written into STACKADDR in
174 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
176 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
178 * nptl-init.c (sighandler_setxid): Fix the comment that
181 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
183 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
184 (__lll_robust_timedlock_wait): Simplify CFI directives.
186 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
189 * Makefile (tests): Add test case.
190 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
191 the __libc_stack_end page from stacksize. Truncate stacksize to
192 make it page aligned when it is computed from RLIMIT_STACK.
193 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
196 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
199 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
202 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
203 Jakub Jelinek <jakub@redhat.com>
206 * sysdeps/pthread/pthread.h
207 [!(defined __GNUC__ && defined __EXCEPTIONS)]
208 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
209 __libc_unlikely instead of __builtin_expect.
211 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
214 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
215 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
216 * sysdeps/unix/sysv/linux/i386/Implies: New file.
217 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
218 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
220 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
221 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
223 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
225 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
228 * nptl-init.c (pthread_functions): Remove use of INTUSE and
230 (__pthread_initialize_minimal_internal): Likewise.
231 * sem_open.c: Likewise.
232 * sem_unlink.c: Likewise.
233 * pthreadP.h: Replace _internal aliases by hidden_proto
235 * pthread_getspecific.c: Replace _internal alias by hidden_def.
236 * pthread_key_create.c: Likewise.
237 * pthread_mutex_destroy.c: Likewise.
238 * pthread_mutex_init.c: Likewise.
239 * pthread_mutex_lock.c: Likewise.
240 * pthread_mutex_unlock.c: Likewise.
241 * pthread_once.c: Likewise.
242 * pthread_rwlock_rdlock.c: Likewise.
243 * pthread_rwlock_unlock.c: Likewise.
244 * pthread_rwlock_wrlock.c: Likewise.
245 * pthread_setspecific.c: Likewise.
246 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
248 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
250 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
252 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
253 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
254 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
255 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
256 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
257 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
258 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
259 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
260 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
261 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
263 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
265 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
268 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
270 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
271 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
273 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
274 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
276 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
277 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
278 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
279 (pthread_barrier_wait): Likewise.
280 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
281 (__pthread_cond_broadcast): Likewise.
282 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
283 (__pthread_cond_signal): Likewise.
284 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
285 (__pthread_cond_timedwait): Likewise.
286 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
288 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
289 (__pthread_rwlock_rdlock): Likewise.
290 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
291 (pthread_rwlock_timedrdlock): Likewise.
292 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
293 (pthread_rwlock_timedwrlock): Likewise.
294 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
295 (__pthread_rwlock_unlock): Likewise.
296 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
297 (__pthread_rwlock_wrlock): Likewise.
298 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
299 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
300 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
302 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
304 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
307 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
308 __libc_stack_end rounded to the end of containing page as the
311 2012-05-25 Rayson Ho <rho@redhat.com>
313 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
315 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
316 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
317 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
318 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
319 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
320 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
321 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
322 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
324 2012-05-25 Rayson Ho <rho@redhat.com>
325 Roland McGrath <roland@hack.frob.com>
327 * DESIGN-systemtap-probes.txt: New file.
328 * pthread_cond_broadcast.c: SystemTap probes.
329 * pthread_cond_init.c: Likewise.
330 * pthread_cond_signal.c: Likewise.
331 * pthread_cond_wait.c: Likewise.
332 * pthread_cond_destroy.c: Likewise.
333 * pthread_create.c: Likewise.
334 * pthread_join.c: Likewise.
335 * pthread_mutex_destroy.c: Likewise.
336 * pthread_mutex_init.c: Likewise.
337 * pthread_mutex_lock.c: Likewise.
338 * pthread_mutex_timedlock.c: Likewise.
339 * pthread_mutex_unlock.c: Likewise.
340 * pthread_rwlock_destroy.c: Likewise.
341 * pthread_rwlock_rdlock.c: Likewise.
342 * pthread_rwlock_unlock.c: Likewise.
343 * pthread_rwlock_wrlock.c: Likewise.
344 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
345 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
346 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
347 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
349 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
350 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
351 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
353 2012-05-24 Roland McGrath <roland@hack.frob.com>
355 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
357 2012-05-17 Andreas Jaeger <aj@suse.de>
359 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
360 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
361 only for older kernels.
363 2012-05-15 Joseph Myers <joseph@codesourcery.com>
365 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
368 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
370 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
371 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
372 (lll_robust_lock): Likewise.
373 (lll_cond_lock): Likewise.
374 (lll_robust_cond_lock): Likewise.
375 (lll_timedlock): Likewise.
376 (lll_robust_timedlock): Likewise.
377 (lll_unlock): Likewise.
378 (lll_robust_unlock): Likewise.
380 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
382 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
383 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
385 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
387 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
389 (__gcc_personality_v0): Replace 8-byte data alignment with
390 LP_SIZE alignment and .quad with ASM_ADDR.
392 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
394 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
396 (__gcc_personality_v0): Replace 8-byte data alignment with
397 LP_SIZE alignment and .quad with ASM_ADDR.
399 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
401 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
402 NWAITERS, which is unsigned long int.
404 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
406 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
407 (__gcc_personality_v0): Replace 8-byte data alignment with
408 LP_SIZE alignment and .quad with ASM_ADDR.
410 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
412 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
413 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
414 __vdso_clock_gettime pointer into RAX_LP.
415 (__gcc_personality_v0): Replace 8-byte data alignment with
416 LP_SIZE alignment and .quad with ASM_ADDR.
418 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
421 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
422 __vdso_clock_gettime pointer into RAX_LP.
423 (__gcc_personality_v0): Replace 8-byte data alignment with
424 LP_SIZE alignment and .quad with ASM_ADDR.
426 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
428 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
429 LP_OP(cmp) and R8_LP on dep_mutex pointer.
431 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
433 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
434 to update pointer in memory. Load pointer into RDI_LP.
436 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
438 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
439 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
441 (LLL_STUB_UNWIND_INFO_END): Likewise.
442 (lll_timedlock): Load timeout pointer into RDX_LP.
443 (lll_robust_timedlock): Likewise.
445 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
446 Jakub Jelinek <jakub@redhat.com>
449 * Makefile (tests): Add test cases.
450 * descr.h (struct pthread): Add a comment describing multiple_threads.
451 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
453 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
454 before setting cancelstate of the thread.
455 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
456 (__libc_multiple_threads): Add explanatory comment.
457 * tst-cancel-self-cancelstate.c: New test case.
458 * tst-cancel-self-canceltype.c: Likewise.
459 * tst-cancel-self-cleanup.c: Supporting file for test cases.
460 * tst-cancel-self-testcancel.c: New test case.
461 * tst-cancel-self.c: Likewise.
462 * vars.c: Expand comment to include single-process case.
464 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
466 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
467 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
470 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
472 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
474 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
475 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
477 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
479 * shlib-versions: Move x86_64-.*-linux.* entry to ...
480 * sysdeps/x86_64/64/shlib-versions: Here. New file.
481 * sysdeps/x86_64/x32/shlib-versions: New file.
483 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
485 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
486 __SIZEOF_PTHREAD_XXX_T.
487 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
488 (pthread_mutex_t): Likewise.
489 (pthread_rwlock_t): Likewise.
490 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
493 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
495 * sysdeps/x86_64/x32/tls.h: New file.
497 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
499 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
501 (THREAD_SETMEM_NC): Likewise.
503 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
505 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
508 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
510 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
511 (__cleanup_fct_attribute): Check __x86_64__ instead of
514 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
516 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
517 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
518 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
519 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
520 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
522 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
524 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
525 instead of __WORDSIZE.
527 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
530 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
532 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
534 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
535 (__pthread_cond_timedwait): Use CFI directives.
536 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
537 (__pthread_cond_wait): Likewise.
538 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
539 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
541 2012-05-03 David S. Miller <davem@davemloft.net>
543 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
544 always have to return 0, especially for the pthread_spin_init
546 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
548 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
549 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
551 2012-05-02 David S. Miller <davem@davemloft.net>
553 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
554 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
555 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
556 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
557 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
558 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
559 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
560 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
561 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
562 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
563 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
564 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
565 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
566 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
567 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
568 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
569 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
570 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
572 2012-05-02 Allan McRae <allan@archlinux.org>
574 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
575 (LDFLAGS-tst-cancel24): Likewise.
577 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
579 * sysdeps/i386/pthread_spin_lock.S: New.
580 * sysdeps/i386/pthread_spin_lock.c: Delete.
581 * sysdeps/x86_64/pthread_spin_lock.S: New.
582 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
584 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
586 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
587 run when cross-compiling.
589 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
591 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
592 instead of libgcc_s.h.
594 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
596 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
598 2012-03-27 David S. Miller <davem@davemloft.net>
600 * tst-cond16.c (do_test): Use a thread stack size which is either
601 PTHREAD_STACK_MIN or the page size, whichever is larger.
602 * tst-cond18.c (do_test): Likewise.
604 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
606 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
607 register char * __asm__("rsp") to get stack frame.
609 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
611 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
614 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
616 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
619 2012-03-16 David S. Miller <davem@davemloft.net>
622 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
624 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
627 2012-03-15 David S. Miller <davem@davemloft.net>
630 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
632 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
635 * pt-crti.S: Replace FSF snail mail address with URL.
637 2012-03-09 Joseph Myers <joseph@codesourcery.com>
639 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
640 Do not define before including <time.h>.
642 2012-03-08 David S. Miller <davem@davemloft.net>
644 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
646 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
648 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
649 Check for timestamp before the Epoch.
651 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
654 * tst-sem13.c (do_test): Add another test case.
655 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
656 Fix updating nwaiters.
658 2012-03-07 Joseph Myers <joseph@codesourcery.com>
661 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
662 link test to a compile test.
663 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
665 * sysdeps/pthread/configure: Regenerated.
667 2012-03-07 Ulrich Drepper <drepper@gmail.com>
669 * Makefile (distribute): Remove variable.
671 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
673 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
674 superfluous assignment.
675 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
677 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
678 (sem_timedwait): Likewise.
680 2012-03-06 Ulrich Drepper <drepper@gmail.com>
682 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
683 installed headers to...
684 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
686 2012-03-06 David S. Miller <davem@davemloft.net>
688 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
689 atomic_increment and remove unused local variable.
690 (__old_sem_post): Likewise.
692 2012-02-27 David S. Miller <davem@davemloft.net>
694 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
695 non-existing __pthread_attr.
696 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
697 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
698 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
699 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
700 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
702 2012-02-26 Ulrich Drepper <drepper@gmail.com>
704 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
706 * sysdeps/pthread/pthread.h: Define __need_timespec before including
708 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
710 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
711 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
712 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
713 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
714 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
716 2012-02-21 Joseph Myers <joseph@codesourcery.com>
719 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
721 [crti.S not in sysdirs] (omit-deps): Do not append.
722 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
723 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
724 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
725 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
726 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
727 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
728 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
729 [crti.S in sysdirs] (extra-objs): Append unconditionally.
730 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
732 * sysdeps/pthread/pt-initfini.c: Remove file.
734 2012-02-16 Richard Henderson <rth@twiddle.net>
736 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
737 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
739 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
741 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
743 2012-02-16 David S. Miller <davem@davemloft.net>
745 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
747 2012-02-15 Marek Polacek <polacek@redhat.com>
749 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
751 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
753 Replace FSF snail mail address with URLs, as per GNU coding standards.
755 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
757 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
759 2012-02-08 Joseph Myers <joseph@codesourcery.com>
761 Support crti.S and crtn.S provided directly by architectures.
762 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
763 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
764 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
765 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
766 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
767 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
768 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
769 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
770 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
771 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
772 * pt-crti.S: New file.
773 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
775 2012-02-03 Joseph Myers <joseph@codesourcery.com>
777 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
778 macros for PIC register setup.
779 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
780 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
781 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
782 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
783 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
785 2012-01-11 Marek Polacek <polacek@redhat.com>
787 * forward.c (FORWARD_NORETURN): Define macro.
788 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
789 (__pthread_exit): Likewise.
791 2012-01-10 Ulrich Drepper <drepper@gmail.com>
793 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
795 * pthreadP.h: Add noreturn to __pthread_exit.
796 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
798 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
800 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
801 Call pthread_attr_setstacksize() with result of
802 __pthread_get_minstack() to account for application TLS usage.
804 2012-01-08 Marek Polacek <polacek@redhat.com>
806 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
808 2012-01-07 Ulrich Drepper <drepper@gmail.com>
811 * pthreadP.h: Use const instead of __const.
812 * semaphore.h: Likewise.
813 * sysdeps/pthread/bits/libc-lock.h: Likewise.
814 * sysdeps/pthread/bits/sigthread.h: Likewise.
815 * sysdeps/pthread/pthread.h: Likewise.
817 * Makefile: Remove elf=yes test, only ELF is supported.
819 * shlib-versions: Remove entries for ports architectures.
821 In case anyone cares, the IA-64 architecture could move to ports.
822 * sysdeps/ia64/*: Removed.
823 * sysdeps/unix/sysv/linux/ia64/*: Removed.
825 2011-12-22 Ulrich Drepper <drepper@gmail.com>
827 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
828 __pthread_get_minstack.
829 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
832 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
833 through __pthread_get_minstack.
834 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
835 directly from _rtld_global_ro.
836 (__pthread_get_minstack): New function.
837 * pthreadP.h: Declare __pthread_get_minstack.
838 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
840 2011-12-21 Ulrich Drepper <drepper@gmail.com>
843 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
844 Correct reading name from file.
846 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
848 * allocatestack.c (allocate_stack): Return errno on failure.
850 2011-12-14 Jeff Law <law@redhat.com>
853 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
855 2011-11-28 Andreas Schwab <schwab@redhat.com>
857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
858 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
859 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
861 2011-11-15 Ulrich Drepper <drepper@gmail.com>
863 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
866 2011-10-29 Ulrich Drepper <drepper@gmail.com>
869 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
870 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
871 path for kernels with FUTEX_CLOCK_REALTIME.
872 Debugged by H.J. Lu <hjl.tools@gmail.com>.
874 2011-10-27 Andreas Schwab <schwab@redhat.com>
877 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
878 for memory synchronization functions.
879 * semaphore.h: Likewise.
881 2011-10-24 Ulrich Drepper <drepper@gmail.com>
883 * tst-cancel7.c: Avoid warning.
884 * tst-mutex6.c: Likewise.
885 * tst-mutex9.c: Likewise.
886 * tst-mutexpi6.c: Likewise.
888 2011-10-23 Ulrich Drepper <drepper@gmail.com>
890 * sysdeps/i386/tls.h: Remove #include <list.h>.
892 2011-10-15 Ulrich Drepper <drepper@gmail.com>
894 * pthread_create.c (start_thread): Call __ctype_init.
896 2011-09-15 Andreas Schwab <schwab@redhat.com>
898 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
900 (list_add): Add atomic_write_barrier.
901 * descr.h: Define __need_list_t before including <list.h>.
902 * nptl-init.c: Include <list.h>
903 * allocatestack.c: Likewise.
905 2011-09-11 Ulrich Drepper <drepper@gmail.com>
907 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
908 * sysdeps/ia64/tls.h: Likewise.
909 * sysdeps/powerpc/tls.h: Likewise.
910 * sysdeps/s390/tls.h: Likewise.
911 * sysdeps/sh/tls.h: Likewise.
912 * sysdeps/sparc/tls.h: Likewise.
913 * sysdeps/x86_64/tls.h: Likewise.
915 2011-09-10 Ulrich Drepper <drepper@gmail.com>
917 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
919 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
921 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
922 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
923 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
924 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
925 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
926 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
927 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
928 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
929 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
930 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
931 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
932 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
934 * tst-tls1.c: Support for __thread is now mandatory.
935 * tst-tls2.c: Likewise.
936 * tst-tls3.c: Likewise.
937 * tst-tls3mod.c: Likewise.
938 * tst-tls4.c: Likewise.
939 * tst-tls4moda.c: Likewise.
940 * tst-tls4modb.c: Likewise.
941 * tst-tls5.h: Likewise.
943 2011-09-08 Ulrich Drepper <drepper@gmail.com>
946 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
947 (pthread_rwlock_timedwrlock): Use correct macro in test.
948 Patch by H.J. Lu <hongjiu.lu@intel.com>.
950 2011-09-06 Ulrich Drepper <drepper@gmail.com>
952 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
953 use gettimeofday vsyscall, just call gettimeofday.
954 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
955 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
956 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
958 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
960 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
961 Simplify __vdso_clock_gettime use.
963 2011-09-05 David S. Miller <davem@davemloft.net>
965 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
967 (sem_timedwait): Call it to force an exception region around
968 the async cancel enable and the futex operation.
969 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
970 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
971 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
972 (__new_sem_wait): Call it to force an exception region around
973 the async cancel enable and the futex operation.
974 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
975 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
977 2011-08-31 Andreas Schwab <schwab@redhat.com>
979 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
982 2011-08-20 David S. Miller <davem@davemloft.net>
984 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
986 2011-08-14 Roland McGrath <roland@hack.frob.com>
988 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
989 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
991 2011-08-08 Andreas Schwab <schwab@redhat.com>
993 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
995 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
996 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
998 2011-07-22 Ulrich Drepper <drepper@gmail.com>
1000 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1002 (__gcc_personality_v0): Likewise.
1003 (_Unwind_ForcedUnwind): Likewise.
1004 (_Unwind_GetCFA): Likewise.
1006 2011-07-14 Roland McGrath <roland@hack.frob.com>
1008 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1011 2011-06-30 Ulrich Drepper <drepper@gmail.com>
1013 * nptl-init.c (__nptl_set_robust): New function.
1014 (pthread_functions): Add reference.
1015 * npthreadP.h: Declare __nptl_set_robust.
1016 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1017 ptr_set_robust member.
1018 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1019 child if threads are used.
1021 2011-06-14 Andreas Jaeger <aj@suse.de>
1023 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1025 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1028 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1030 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1033 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1035 Patch partly by Robert Rex <robert.rex@exasol.com>.
1037 2011-01-19 Roland McGrath <roland@redhat.com>
1039 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1040 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1041 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1042 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1043 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1044 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1046 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1048 * Makefile (test-extras): Add tst-cleanup4aux.
1050 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1053 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1054 (__SETXID_2): Likewise.
1055 (__SETXID_3): Likewise.
1057 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1060 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1061 * alloca_cutoff.c: Add libc_hidden_def.
1063 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1066 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1067 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1068 of "struct pthread".
1070 2010-09-21 Andreas Schwab <schwab@redhat.com>
1072 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1073 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1074 (pthread_cleanup_push_defer_np): Likewise.
1076 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1078 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1081 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1082 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1084 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1085 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1087 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1089 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1091 2010-05-01 Alan Modra <amodra@gmail.com>
1093 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1094 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1095 to save temps. Correct cfi for possible later frame manipulation.
1096 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1097 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1098 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1099 (DOCARGS_6, UNDOCARGS_6): Likewise.
1100 (CENABLE, CDISABLE): Add nops for non-shared calls.
1102 2010-07-06 Andreas Schwab <schwab@redhat.com>
1104 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1107 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1109 * tst-abstime.c (do_test): Some more cleanups
1111 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1113 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1115 2010-07-01 Andreas Schwab <schwab@redhat.com>
1116 Ulrich Drepper <drepper@redhat.com>
1118 * Makefile (tests): Add tst-abstime.
1119 * tst-abstime.c: New file.
1120 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1121 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1122 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1123 (__lll_timedlock_wait): Likewise.
1124 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1125 (__lll_robust_timedlock_wait): Likewise.
1126 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1127 (__pthread_cond_timedwait): Likewise.
1128 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1129 (pthread_rwlock_timedrdlock): Likewise.
1130 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1131 (pthread_rwlock_timedwrlock): Likewise.
1132 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1135 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1137 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1139 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1141 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1142 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1144 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1147 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1148 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1149 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1151 * Makefile (libpthread-routines): Add pthread_getname and
1153 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1155 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1157 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1158 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1159 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1160 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1162 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1164 * pthread_cond_timedwait.c: Add check for
1165 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1166 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1169 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1171 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1172 and the call fails wake eventually waiting setxid threads. Don't free
1173 stack here if we try starting a thread.
1174 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1175 if the clone call failed.
1177 2010-03-08 Andreas Schwab <schwab@redhat.com>
1179 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1180 * allocatestack.c (get_cached_stack): Set setxid_futex.
1181 (allocate_stack): Likewise.
1183 2010-03-05 Andreas Schwab <schwab@redhat.com>
1184 Ulrich Drepper <drepper@redhat.com>
1186 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1187 it is creating a thread or it is just being created.
1188 * pthread_create.c (start_thread): Wake setxid thread if it is
1190 (__pthread_create_2_1): Initialize setxid_futex.
1191 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1194 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1198 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1200 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1202 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1203 Fix pthread_cond_timedwait with requeue-PI.
1204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1205 Fix pthread_cond_wait with requeue-PI.
1207 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1209 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1210 and pthread_mutexattr_setrobust for GLIBC_2.12.
1211 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1212 * pthread_mutexattr_getrobust.c: Define alias
1213 pthread_mutexattr_getrobust.
1214 * pthread_mutexattr_setrobust.c: Define alias
1215 pthread_mutexattr_setrobust.
1217 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1219 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1221 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1223 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1225 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1227 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1228 call __gmon_start__.
1229 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1231 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1233 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1236 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1238 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1239 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1240 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1241 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1242 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1243 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1244 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1245 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1247 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1249 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1250 Don't update nwaiters after invalid timeout is recognized.
1252 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1254 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1257 2009-11-27 Andreas Schwab <schwab@redhat.com>
1259 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1260 THREAD_SELF->cancelhandling after returning from futex call.
1262 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1264 * tst-sem13.c: New file.
1265 * Makefile (tests): Add tst-sem13.
1267 2009-11-22 Roland McGrath <roland@redhat.com>
1269 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1270 instead of recapitulating its contents.
1272 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1275 optimizations and cleanups.
1277 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1279 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1280 Remove redundant code. Fix cfi offsets.
1281 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1284 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1286 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1287 reduce size of unwind info.
1289 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1291 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1292 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1294 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1297 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1299 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1301 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1303 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1306 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1307 steps to avoid races with creation and terminations.
1308 * nptl-init.c (sighandler_setxid): Adjust.
1309 Patch by Daniel Jacobowitz.
1311 2009-09-07 Andreas Schwab <schwab@redhat.com>
1313 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1315 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1316 Joseph Myers <joseph@codesourcery.com>
1319 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1320 Initialize the sigev_notify field for newly created timer to make sure
1321 the timer gets deleted from the active timer's list upon timer_delete.
1323 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1325 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1326 Correct a logic error.
1328 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1330 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1331 of the field in local variables.
1332 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1333 variable and don't unconditionally clear it.
1335 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1337 * pthread_create.c (start_thread): Hint to the kernel that memory for
1338 the stack can be reused. We do not mark all the memory. The part
1339 still in use and some reserve are kept.
1341 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1343 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1345 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1347 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1350 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1352 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1354 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1356 2009-08-10 Andreas Schwab <schwab@redhat.com>
1358 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1359 (__pthread_cond_signal): Don't clobber register used for syscall
1362 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1364 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1365 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1367 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1368 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1371 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1373 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1374 enabled by the special *_asynccancel functions.
1375 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1376 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1378 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1380 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1382 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1383 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1384 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1385 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1386 since we can assume the special __*_{en,dis}able_asynccancel
1388 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1389 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1390 and PTHREAD_CANCELED.
1392 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1394 * descr.h: Better definition of *_BITMASK macros for cancellation.
1396 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1398 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1400 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1401 dynamic linker might have to save.
1402 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1403 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1406 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1408 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1410 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1412 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1413 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1414 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1415 requeue_pi for robust mutexes.
1416 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1417 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1418 Don't only skip __pthread_mutex_cond_lock. Call instead
1419 __pthread_mutex_cond_lock_adjust.
1420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1422 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1423 optimization of PI mutex handling.
1425 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1428 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1429 instead of of _acq variants of cmpxchg.
1431 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1433 * sysdeps/x86_64/configure.in: New file.
1435 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1436 path when not using absolute timeout futex.
1438 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1440 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1441 optimizations of last changes.
1442 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1444 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1446 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1447 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1449 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1450 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1451 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1452 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1453 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1455 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1456 (__pthread_cond_timedwait): Make more robust.
1458 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1460 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1461 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1462 directly use absolute timeout.
1464 * tst-sem5.c (do_test): Add test for premature timeout.
1465 * Makefile: Linu tst-sem5 with librt.
1467 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1468 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1469 directly use absolute timeout.
1470 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1471 (pthread_rwlock_timedrdlock): Likewise.
1473 * tst-cond11.c (run_test): Add test to check that the timeout is
1476 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1477 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1478 directly use absolute timeout.
1480 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1481 (__pthread_cond_wait): Convert to using exception handler instead of
1482 registered unwind buffer.
1483 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1484 (__pthread_cond_timedwait): Likewise.
1486 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1488 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1489 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1490 use absolute timeout.
1492 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1493 handling of uncontested semaphore.
1495 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1496 (__condvar_cleanup): Rewrite to use cfi directives instead of
1497 hand-coded unwind tables.
1498 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1500 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1501 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1504 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1506 * Makefile (libpthread-routines): Add pthread_sigqueue.
1507 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1508 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1509 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1511 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1514 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1515 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1517 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1519 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1521 * libc-cancellation.c: Move __libc_cleanup_routine to...
1522 * libc-cleanup.c: ...here. New file.
1523 * Makefile (routines): Add libc-cleanup.
1525 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1527 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1528 * sysdeps/pthread/librt-cancellation.c: Likewise.
1531 * nptl-init.c: Renamed from init.c.
1532 * Makefile: Change all occurences of init.c to nptl-init.c.
1534 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1536 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1537 to test when deciding on the delay.
1538 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1539 * pthread_cancel.c: Close race between deciding on sending a signal
1540 and setting the CANCELING_BIT bit.
1542 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1544 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1546 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1548 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1550 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1551 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1552 * sysdeps/i386/tls.h: Likewise.
1553 (tcbhead_t): Add __private_tm member.
1555 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1557 * sem_open.c (sem_open): Rewrite initialization of initsem to
1560 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1561 Avoid warning by using may_alias attribute on ptrhack.
1563 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1566 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1567 Check policy and priority for validity.
1568 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1570 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1572 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1573 (__pthread_cond_timedwait): Change to use cfi directives instead of
1574 hand-coded unwind sections.
1576 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1578 * init.c (nptl_freeres): Compile only for SHARED.
1580 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1582 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1583 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1584 FUTEX_BITSET_MATCH_ANY.
1586 2009-02-27 Roland McGrath <roland@redhat.com>
1588 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1589 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1591 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1593 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1594 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1595 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1598 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1600 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1603 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1605 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1606 Unify name of include protector macro.
1608 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1610 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1611 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1613 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1615 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1618 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1619 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1620 * init.c (nptl_freeres): New function.
1621 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1622 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1623 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1625 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1626 load DSO. Assign last.
1627 (__unwind_freeres): New function.
1629 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1630 for better debugging. No need to use stack_list_add here.
1632 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1634 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1635 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1636 instead of computing relative timeout.
1637 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1638 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1640 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1642 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1644 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1646 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1647 (list_add_tail): Removed.
1649 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1651 * (in_flight_stack): New variable.
1652 (stack_list_del): New function. Use instead of list_del.
1653 (stack_list_add): New function. Use instead of list_add when adding to
1654 stack_cache and stack_used lists.
1655 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1656 when the fork call interrupted another thread.
1658 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1660 * init.c (__pthread_initialize_minimal_internal): Optimize test
1661 FUTEX_CLOCK_REALTIME a bit.
1663 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1665 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1666 only passing five parameters to FUTEX_WAIT_BITSET call.
1668 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1669 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1670 instead of computing relative timeout.
1672 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1674 * init.c (__pthread_initialize_minimal_internal): Check for
1675 FUTEX_CLOCK_REALTIME flag.
1676 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1677 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1680 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1681 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1682 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1683 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1684 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1685 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1687 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1689 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1690 loop body instead of ; to avoid gcc warnings.
1691 (pthread_cleanup_pop_restore_np): Likewise.
1692 Patch by Caolán McNamara <caolanm@redhat.com>.
1694 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1696 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1697 fast path here, for robust/PI/PP mutexes call
1698 __pthread_mutex_lock_full. Don't use switch, instead use a series
1699 of ifs according to their probability.
1700 (__pthread_mutex_lock_full): New function.
1701 * pthread_mutex_unlock.c: Include assert.h.
1702 (__pthread_mutex_unlock_usercnt): Handle only the
1703 fast path here, for robust/PI/PP mutexes call
1704 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1705 of ifs according to their probability.
1706 (__pthread_mutex_unlock_full): New function.
1707 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1708 (__pthread_mutex_lock_full): Define.
1710 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1712 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1713 implementation. Add necessary padding and.
1714 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1717 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1719 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1720 and FUTEX_WAKE_BITSET.
1722 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1724 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1725 and FUTEX_WAKE_BITSET.
1726 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1727 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1728 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1729 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1731 2008-11-25 Roland McGrath <roland@redhat.com>
1733 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1734 Subdirectories moved to ports repository as
1735 sysdeps/.../nptl subdirectories.
1737 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1740 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1742 * pthread_cond_init.c (__pthread_cond_init): Fix
1743 cond->__data.__nwaiters initialization.
1744 * Makefile (tests): Add tst-cond23.
1745 * tst-cond23.c: New test.
1747 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1749 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1751 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1754 2008-11-01 Ulrich Drepper <drepper@redhat.com>
1757 * pthread_mutex_lock.c: Add support for private PI mutexes.
1758 * pthread_mutex_timedlock.c: Likewise.
1759 * pthread_mutex_trylock.c: Likewise.
1760 * pthread_mutex_unlock.c: Likewise.
1761 Patch mostly by Ben Jackson <ben@ben.com>.
1763 2008-10-31 Ulrich Drepper <drepper@redhat.com>
1766 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1767 Increase stack size for helper thread.
1769 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1771 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1772 assembly with a clobber list for access registers a0 and a1.
1774 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1776 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1777 to force runp->refcntr to be read from memory.
1779 2008-09-08 Richard Guenther <rguenther@suse.de>
1781 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1782 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1783 lll_timedlock, lll_robust_timedlock, lll_unlock,
1784 lll_robust_unlock): Promote private to int.
1786 2008-08-15 Ulrich Drepper <drepper@redhat.com>
1788 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1789 ARCH_RETRY_MMAP definitions.
1790 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1791 Define MAP_STACK when not defined.
1792 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1793 handling of ARCH_RETRY_MMAP.
1795 2008-07-30 Ulrich Drepper <drepper@redhat.com>
1797 * tst-align2.c (f): Print message that f is reached.
1799 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1802 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1803 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1805 2008-07-25 Ulrich Drepper <drepper@redhat.com>
1807 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1808 SOCK_CLOEXEC if possible.
1810 2008-05-29 Ulrich Drepper <drepper@redhat.com>
1812 * Makefile (tests): Add tst-rwlock2a.
1813 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1814 * tst-rwlock2a.c: New file.
1816 2008-06-12 Ulrich Drepper <drepper@redhat.com>
1818 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1820 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1822 * sysdeps/pthread/pthread.h: Fix typo in comment.
1824 2008-05-28 Ulrich Drepper <drepper@redhat.com>
1826 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1827 of CPU set to the kernel.
1829 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1831 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1834 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1835 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1836 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1837 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1838 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1840 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1842 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1844 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1846 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1848 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1851 2008-05-26 Ulrich Drepper <drepper@redhat.com>
1853 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1855 2008-05-20 Jakub Jelinek <jakub@redhat.com>
1857 David S. Miller <davem@davemloft.net>
1859 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1861 2008-05-10 Ulrich Drepper <drepper@redhat.com>
1863 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1864 __pshared correctly.
1865 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1867 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1869 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1871 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1873 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1875 2008-04-14 David S. Miller <davem@davemloft.net>
1877 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1878 (__old_sem_wait): Fix argument to lll_futex_wait().
1880 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1882 * pthread_create.c: Require pthread_mutex_trylock and
1883 pthread_key_delete for libgcc.
1885 2008-04-08 Jakub Jelinek <jakub@redhat.com>
1888 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1889 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1890 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1892 2008-03-27 Ulrich Drepper <drepper@redhat.com>
1894 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1895 <linux/limits.h> has defined it.
1896 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1897 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1898 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1899 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1901 2008-03-18 Jakub Jelinek <jakub@redhat.com>
1903 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1905 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1906 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1908 2008-03-14 Ulrich Drepper <drepper@redhat.com>
1910 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1911 HAVE_DL_DISCOVER_OSVERSION.
1912 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1913 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1915 2008-03-07 Ulrich Drepper <drepper@redhat.com>
1918 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1919 _POSIX_CHOWN_RESTRICTED value to zero.
1921 2008-01-31 Roland McGrath <roland@redhat.com>
1923 * Makefile (omit-deps): Variable removed.
1925 2008-01-30 Ulrich Drepper <drepper@redhat.com>
1927 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1928 unnecessary addr32 prefix.
1930 2008-01-29 Roland McGrath <roland@redhat.com>
1932 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1934 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1936 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1938 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1940 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1942 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1943 (__lll_lock_wait_private): Fix typo.
1944 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1945 (pthread_barrier_wait): Likewise. Adjust XADD use.
1946 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1948 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1949 (pthread_rwlock_timedrdlock): Return correct return value.
1950 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1951 (pthread_rwlock_timedwrlock): Likewise.
1953 2008-01-15 Ulrich Drepper <drepper@redhat.com>
1955 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1956 thread returns the program exits with an error code.
1958 2008-01-10 Ulrich Drepper <drepper@redhat.com>
1960 * pthread-errnos.sym: Add EOVERFLOW.
1961 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1962 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1963 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1964 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1966 2007-12-14 Ulrich Drepper <drepper@redhat.com>
1968 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1969 parameter. Passed it as permission to mmap.
1970 * allocatestack.c (allocate_stack): Pass prot as second parameter
1973 2007-12-12 Ulrich Drepper <drepper@redhat.com>
1975 * tst-basic7.c: Allocate memory for the stack.
1978 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1979 (__pthread_cond_timedwait): Don't use VDSO.
1980 Patch by Michal Januszewski.
1982 2007-12-07 Ulrich Drepper <drepper@redhat.com>
1985 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1986 Allow label before pthread_cleanup_pop.
1987 (pthread_cleanup_pop_restore_np): Likewise.
1989 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1991 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1992 Store 2 before returning ETIMEDOUT.
1994 2007-11-23 Ulrich Drepper <drepper@redhat.com>
1996 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1997 Store 2 before returning ETIMEDOUT.
1998 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1999 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2000 (__lll_lock_wait_private): Optimize.
2001 (__lll_lock_wait): Likewise.
2003 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2005 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2006 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2007 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2009 2007-11-08 Ulrich Drepper <drepper@redhat.com>
2012 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2013 If we time out, try one last time to lock the futex to avoid
2014 losing a wakeup signal.
2015 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2016 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2019 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2022 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2025 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2026 mmap failed to EAGAIN.
2027 * Makefile (tests): Add tst-basic7.
2028 * tst-basic7.c: New file.
2030 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2032 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2033 Use __linkin_atfork.
2035 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2037 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2038 missing line continuations.
2039 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2040 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2042 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2045 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2046 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2047 (struct timer): Add next element.
2048 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2049 enqueue timer structure into __active_timer_sigev_thread list.
2050 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2051 remove timer struct from __active_timer_sigev_thread.
2052 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2053 Before using timer structure make sure it is still on the
2054 __active_timer_sigev_thread list. Keep lock until done.
2055 Define __active_timer_sigev_thread and
2056 __active_timer_sigev_thread_lock.
2058 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2060 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2061 Redefine thread_atfork for use of ATFORK_MEM.
2062 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2063 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2065 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2066 Use atomic operation when removing first element of list.
2068 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2070 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2071 routine instead of an alias to __new_sem_post.
2073 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2075 * init.c (__pthread_initialize_minimal): Initialize word to appease
2078 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2080 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2081 libc.so just clear NAME.
2082 (__libc_rwlock_fini): Nop inside of libc.so.
2083 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2086 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2088 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2089 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2091 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2093 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2096 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2097 reclaimed stack if necessary.
2098 * Makefile (tests): Add tst-tsd6.
2099 * tst-tsd6.c: New file.
2101 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2103 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2104 Add private argument.
2106 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2108 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2109 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2111 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2113 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2114 (__lll_robust_timedlock): Pass private as last argument to
2115 __lll_robust_timedlock_wait.
2116 (__lll_unlock): Fix a pasto.
2118 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2120 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2121 sparc_old_sem): New structs.
2122 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2123 (__sem_wait_cleanup): New function.
2124 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2125 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2126 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2128 (__old_sem_wait): New function.
2129 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2130 nptl/sysdeps/unix/sysv/linux/sparc version.
2131 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2133 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2134 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2135 (__new_sem_trywait): Use sparc_old_sem structure.
2136 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2137 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2138 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2139 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2140 lll_futex_timed_wait.
2141 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2142 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2143 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2145 (__old_sem_post): New function.
2146 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2147 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2148 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2149 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2150 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2151 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2153 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2155 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2156 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2157 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2158 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2159 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2160 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2161 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2163 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2164 kernel-features.h and tcb-offsets.h.
2165 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2166 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2168 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2170 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2171 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2173 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2174 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2175 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2176 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2177 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2178 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2179 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2181 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2183 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2184 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2185 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2186 lll_futex_timed_wait.
2188 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2189 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2190 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2191 __lll_robust_unlock, __lll_wait_tid): Likewise.
2193 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2195 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2197 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2198 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2199 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2200 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2201 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2202 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2203 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2206 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2207 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2208 process private. Switch DW_CFA_advance_loc1 and some
2209 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2210 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2211 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2212 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2213 process private. Switch DW_CFA_advance_loc{1,2} and some
2214 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2215 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2216 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2217 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2219 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2220 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2221 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2223 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2224 (__pthread_cond_broadcast): Compare %r8 instead of
2225 dep_mutex-cond_*(%rdi) with $-1.
2226 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2227 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2230 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2232 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2234 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2236 * allocatestack.c: Include kernel-features.h.
2237 * pthread_create.c: Likewise.
2238 * pthread_mutex_init.c: Likewise.
2240 * pthread_cond_timedwait.c: Likewise.
2241 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2242 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2243 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2244 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2245 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2246 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2247 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2249 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2251 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2252 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2253 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2254 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2256 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2258 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2259 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2260 byte elements. One of them is the new __shared element.
2261 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2262 adjust names of other padding elements.
2263 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2264 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2265 byte elements. One of them is the new __shared element.
2266 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2267 adjust names of other padding elements.
2268 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2269 Renamed __pad1 element to __shared, adjust names of other padding
2271 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2272 (pthread_rwlock_t): Likewise.
2273 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2276 2007-08-09 Anton Blanchard <anton@samba.org>
2278 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2280 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2282 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2283 <kernel-features.h>.
2284 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2286 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2288 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2289 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2290 dealing with robust mutexes.
2291 * pthread_mutex_timedlock.c: Likewise.
2292 * pthread_mutex_trylock.c: Likewise.
2293 * pthread_mutex_unlock.c: Likewise.
2294 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2296 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2298 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2299 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2300 (PTHREAD_MUTEX_PSHARED): Define.
2301 * pthread_mutex_init.c (__pthread_mutex_init): Set
2302 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2304 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2305 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2306 as second argument to lll_lock.
2307 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2308 instead of its __data.__lock field.
2309 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2310 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2312 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2313 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2314 instead of mutex->__data.__kind directly, pass
2315 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2316 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2317 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2318 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2319 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2320 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2321 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2322 of mutex->__data.__kind directly.
2323 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2324 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2325 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2326 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2327 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2328 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2330 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2331 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2332 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2334 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2335 Take mutex as argument instead of its __data.__lock field, pass
2336 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2337 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2338 __data.__lock field.
2339 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2340 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2341 to lll_robust_cond_lock.
2342 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2343 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2344 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2345 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2346 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2347 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2349 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2350 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2352 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2353 pshared variable, pass it to lll_lock, lll_unlock,
2354 lll_futex_timedwait and lll_futex_wake.
2355 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2356 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2358 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2359 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2361 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2362 lll_futex_wake_unlock): Likewise.
2363 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2365 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2366 lll_futex_wake_unlock): Likewise.
2367 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2369 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2370 lll_futex_wake_unlock): Likewise.
2371 (lll_futex_wake): Fix a typo.
2372 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2373 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2374 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2375 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2376 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2377 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2378 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2379 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2380 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2381 (__pthread_cond_timedwait): Likewise.
2382 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2383 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2385 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2387 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2388 Don't use CGOTSETUP and CGOTRESTORE macros.
2389 (CGOTSETUP, CGOTRESTORE): Remove.
2390 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2393 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2395 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2396 definitions for private futexes.
2397 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2398 kernel-features.h and lowlevellock.h. Use private futexes if
2400 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2401 (__lll_mutex_lock_wait): Rename to
2402 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2403 (__lll_mutex_timedlock_wait): Rename to ...
2404 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2405 Don't compile in for libc.so.
2406 (__lll_mutex_unlock_wake): Rename to ...
2407 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2408 (__lll_timedwait_tid): Use __NR_gettimeofday.
2409 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2410 the header from assembler. Renamed all lll_mutex_* resp.
2411 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2412 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2413 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2415 (__lll_lock_wait_private): Add prototype.
2416 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2417 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2418 __lll_unlock_wake): Likewise.
2419 (lll_lock): Add private argument. Call __lll_lock_wait_private
2420 if private is constant LLL_PRIVATE.
2421 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2422 lll_timedlock, lll_robust_timedlock): Add private argument.
2423 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2424 if private is constant LLL_PRIVATE.
2425 (lll_robust_unlock, lll_robust_dead): Add private argument.
2426 (lll_lock_t): Remove.
2427 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2428 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2429 lll_cond_wake, lll_cond_broadcast): Remove.
2430 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2431 kernel-features.h and lowlevellock.h.
2432 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2433 (LOAD_FUTEX_WAIT): Define.
2434 (__lll_robust_mutex_lock_wait): Rename to ...
2435 (__lll_robust_lock_wait): ... this. Add private argument.
2436 Use LOAD_FUTEX_WAIT macro.
2437 (__lll_robust_mutex_timedlock_wait): Rename to ...
2438 (__lll_robust_timedlock_wait): ... this. Add private argument.
2439 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2440 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2442 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2443 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2444 __lll_mutex_{lock,unlock}_*.
2445 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2446 lowlevellock.h and pthread-errnos.h.
2447 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2448 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2449 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2450 __lll_mutex_{lock,unlock}_*.
2451 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2452 lowlevellock.h and pthread-errnos.h.
2453 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2454 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2455 __lll_mutex_{lock,unlock}_*.
2456 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2458 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2459 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2460 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2461 (__condvar_tw_cleanup): Likewise.
2462 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2464 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2465 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2466 __lll_mutex_{lock,unlock}_*.
2467 ( __condvar_w_cleanup): Likewise.
2468 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2469 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2470 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2472 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2473 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2474 __lll_mutex_{lock,unlock}_*.
2475 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2477 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2478 FUTEX_PRIVATE_FLAG): Remove.
2479 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2480 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2481 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2483 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2484 FUTEX_PRIVATE_FLAG): Remove.
2485 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2486 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2487 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2489 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2490 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2491 __lll_mutex_{lock,unlock}_*.
2492 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2494 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2495 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2496 __lll_mutex_{lock,unlock}_*.
2497 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2498 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2499 (__new_sem_post): Use standard initial exec code sequences.
2500 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2502 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2503 FUTEX_PRIVATE_FLAG): Remove.
2504 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2505 exec code sequences.
2506 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2507 (__new_sem_trywait): Use standard initial exec code sequences.
2508 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2509 (__new_sem_wait): Use standard initial exec code sequences.
2511 2007-07-31 Anton Blanchard <anton@samba.org>
2513 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2514 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2515 atomic_full_barrier.
2517 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2519 * allocatestack.c (stack_cache_lock): Change type to int.
2520 (get_cached_stack, allocate_stack, __deallocate_stack,
2521 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2522 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2523 as second argument to lll_lock and lll_unlock macros on
2525 * pthread_create.c (__find_in_stack_list): Likewise.
2526 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2527 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2529 * descr.h (struct pthread): Change lock and setxid_futex field
2531 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2532 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2533 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2534 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2536 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2537 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2538 * pthreadP.h (__attr_list_lock): Change type to int.
2539 * pthread_attr_init.c (__attr_list_lock): Likewise.
2540 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2541 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2543 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2544 also for lll_futex_{wake,wait}.
2545 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2547 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2548 LLL_SHARED as second argument to lll_{,un}lock.
2549 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2550 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2551 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2552 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2554 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2555 as second argument to lll_{,un}lock macros on pd->lock.
2556 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2557 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2558 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2559 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2561 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2563 * pthread_once.c (once_lock): Change type to int.
2564 (__pthread_once): Pass LLL_PRIVATE as second argument to
2565 lll_{,un}lock macros on once_lock.
2566 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2567 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2568 rwlock->__data.__shared as second argument to them and similarly
2570 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2572 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2574 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2575 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2576 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2577 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2578 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2579 to lll_{,un}lock macros on __sem_mappings_lock.
2580 * sem_open.c (check_add_mapping): Likewise.
2581 (__sem_mappings_lock): Change type to int.
2582 * semaphoreP.h (__sem_mappings_lock): Likewise.
2583 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2584 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2585 instead of lll_*mutex_*, pass LLL_SHARED as last
2587 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2588 pass LLL_SHARED as last argument.
2589 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2590 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2591 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2592 pass LLL_SHARED as last argument.
2593 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2594 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2595 LLL_SHARED as last argument.
2596 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2597 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2599 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2600 __libc_lock_lock_recursive, __libc_lock_unlock,
2601 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2602 argument to lll_{,un}lock.
2603 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2604 _IO_lock_unlock): Likewise.
2605 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2607 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2608 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2610 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2611 free_mem): Likewise.
2612 (__fork_lock): Change type to int.
2613 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2614 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2615 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2617 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2618 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2619 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2621 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2622 pass it through to lll_futex_*wait, only compile in when
2624 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2625 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2626 argument and pass it through to lll_futex_*wait.
2627 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2628 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2629 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2630 inline functions to __lll_* resp. __lll_robust_*.
2631 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2632 (lll_mutex_dead): Add private argument.
2633 (__lll_lock_wait_private): New prototype.
2634 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2635 __lll_robust_lock_timedwait): Add private argument to prototypes.
2636 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2637 call __lll_lock_wait_private, otherwise pass private to
2639 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2640 __lll_robust_timedlock): Add private argument, pass it to
2641 __lll_*wait functions.
2642 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2643 call __lll_unlock_wake_private, otherwise pass private to
2645 (__lll_robust_unlock): Add private argument, pass it to
2646 __lll_robust_unlock_wake.
2647 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2648 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2649 argument, pass it through to __lll_* inline function.
2650 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2651 (lll_lock_t): Remove.
2652 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2653 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2654 lll_cond_wake, lll_cond_broadcast): Remove.
2655 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2656 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2657 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2658 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2659 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2660 the header from assembler. Renamed all lll_mutex_* resp.
2661 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2662 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2663 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2664 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2665 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2666 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2667 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2669 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2670 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2671 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2672 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2673 MULTIPLE_THREADS_OFFSET as another asm operand.
2674 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2675 MULTIPLE_THREADS_OFFSET as last asm operand, call
2676 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2677 otherwise pass private as another argument to __lll_lock_wait.
2678 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2679 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2680 private as another argument to __lll_*lock_wait call.
2681 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2682 MULTIPLE_THREADS_OFFSET as another asm operand, call
2683 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2684 otherwise pass private as another argument to __lll_unlock_wake.
2685 (lll_robust_unlock): Add private argument, pass private as another
2686 argument to __lll_unlock_wake.
2687 (lll_robust_dead): Add private argument, use __lll_private_flag
2689 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2690 LLL_MUTEX_LOCK_INITIALIZER.
2691 (lll_lock_t): Remove.
2692 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2693 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2694 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2695 lll_cond_wake, lll_cond_broadcast): Remove.
2696 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2697 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2698 2007-05-2{3,9} changes.
2699 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2700 kernel-features.h and lowlevellock.h.
2701 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2702 (LOAD_FUTEX_WAIT): Rewritten.
2703 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2705 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2706 (__lll_mutex_lock_wait): Rename to ...
2707 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2708 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2709 (__lll_mutex_timedlock_wait): Rename to ...
2710 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2711 contains private argument. Don't compile in for libc.so.
2712 (__lll_mutex_unlock_wake): Rename to ...
2713 (__lll_unlock_wake): ... this. %ecx contains private argument.
2714 Don't compile in for libc.so.
2715 (__lll_timedwait_tid): Use __NR_gettimeofday.
2716 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2717 kernel-features.h and lowlevellock.h.
2718 (LOAD_FUTEX_WAIT): Define.
2719 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2721 (__lll_robust_mutex_lock_wait): Rename to ...
2722 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2723 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2725 (__lll_robust_mutex_timedlock_wait): Rename to ...
2726 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2727 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2728 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2730 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2731 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2732 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2733 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2734 to __lll_lock_wait in %edx.
2735 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2736 Include lowlevellock.h and pthread-errnos.h.
2737 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2738 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2739 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2740 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2741 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2743 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2744 Include lowlevellock.h and pthread-errnos.h.
2745 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2746 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2747 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2748 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2749 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2751 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2752 Include lowlevellock.h.
2753 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2755 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2756 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2757 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2758 __lll_unlock_wake. Use __NR_gettimeofday.
2759 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2760 Include lowlevellock.h.
2761 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2762 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2763 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2764 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2765 and __lll_unlock_wake.
2766 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2767 Include lowlevellock.h.
2768 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2769 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2770 MUTEX(%ebx) address in %edx rather than %ecx to
2771 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2772 and __lll_unlock_wake. Move return value from %ecx to %edx
2774 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2775 Include lowlevellock.h.
2776 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2778 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2779 MUTEX(%ebp) address in %edx rather than %ecx to
2780 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2781 and __lll_unlock_wake. Move return value from %ecx to %edx
2782 register. Use __NR_gettimeofday.
2783 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2784 Include lowlevellock.h.
2785 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2787 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2788 MUTEX(%ebp) address in %edx rather than %ecx to
2789 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2790 and __lll_unlock_wake. Move return value from %ecx to %edx
2791 register. Use __NR_gettimeofday.
2792 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2793 Include lowlevellock.h.
2794 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2795 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2796 MUTEX(%edi) address in %edx rather than %ecx to
2797 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2798 and __lll_unlock_wake.
2799 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2800 Include lowlevellock.h.
2801 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2802 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2803 MUTEX(%ebx) address in %edx rather than %ecx to
2804 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2805 and __lll_unlock_wake. Move return value from %ecx to %edx
2807 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2809 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2811 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2812 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2813 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2815 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2816 (sem_timedwait): Use __NR_gettimeofday.
2817 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2819 (LOCK): Don't define.
2820 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2822 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2823 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2825 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2826 2007-05-2{3,9} changes.
2827 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2828 kernel-features.h and lowlevellock.h.
2829 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2830 (LOAD_FUTEX_WAIT): Rewritten.
2831 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2832 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2833 (__lll_mutex_lock_wait): Rename to ...
2834 (__lll_lock_wait): ... this. %esi is now private argument.
2835 Don't compile in for libc.so.
2836 (__lll_mutex_timedlock_wait): Rename to ...
2837 (__lll_timedlock_wait): ... this. %esi contains private argument.
2838 Don't compile in for libc.so.
2839 (__lll_mutex_unlock_wake): Rename to ...
2840 (__lll_unlock_wake): ... this. %esi contains private argument.
2841 Don't compile in for libc.so.
2842 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2843 kernel-features.h and lowlevellock.h.
2844 (LOAD_FUTEX_WAIT): Define.
2845 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2846 (__lll_robust_mutex_lock_wait): Rename to ...
2847 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2848 Use LOAD_FUTEX_WAIT macro.
2849 (__lll_robust_mutex_timedlock_wait): Rename to ...
2850 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2851 private, use LOAD_FUTEX_WAIT macro.
2852 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2854 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2855 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2856 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2857 __lll_lock_wait and __lll_unlock_wake.
2858 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2859 Include lowlevellock.h and pthread-errnos.h.
2860 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2861 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2862 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2863 pass LLL_SHARED in %esi to both __lll_lock_wait and
2865 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2866 Include lowlevellock.h and pthread-errnos.h.
2867 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2868 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2869 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2870 pass LLL_SHARED in %esi to both __lll_lock_wait and
2872 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2873 Include lowlevellock.h.
2874 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2875 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2876 pass LLL_SHARED in %esi to both __lll_lock_wait and
2878 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2879 Include lowlevellock.h.
2880 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2881 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2882 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2883 and __lll_unlock_wake.
2884 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2885 Include lowlevellock.h.
2886 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2888 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2889 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2890 and __lll_unlock_wake.
2891 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2892 Include lowlevellock.h.
2893 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2895 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2896 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2897 and __lll_unlock_wake.
2898 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2899 Include lowlevellock.h.
2900 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2902 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2903 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2904 and __lll_unlock_wake.
2905 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2906 Include lowlevellock.h.
2907 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2909 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2910 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2911 and __lll_unlock_wake.
2912 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2913 Include lowlevellock.h.
2914 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2916 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2917 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2918 and __lll_unlock_wake.
2919 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2921 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2923 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2924 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2925 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2927 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2928 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2930 (LOCK): Don't define.
2931 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2933 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2934 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2935 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2936 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2937 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2938 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2939 (__lll_lock_wait_private): New function.
2940 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2941 it to lll_futex_*wait. Don't compile in for libc.so.
2942 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2944 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2945 (struct sparc_pthread_barrier): Remove.
2946 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2947 struct sparc_pthread_barrier. Pass
2948 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2949 and lll_futex_wait macros.
2950 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2952 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2953 Include sparc pthread_barrier_wait.c instead of generic one.
2955 2007-07-30 Jakub Jelinek <jakub@redhat.com>
2957 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2959 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2960 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2962 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2963 (pthread_rwlock_timedwrlock): Likewise.
2964 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2965 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2967 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2969 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2971 2007-07-26 Jakub Jelinek <jakub@redhat.com>
2973 * tst-locale2.c (useless): Add return statement.
2975 2007-07-24 Jakub Jelinek <jakub@redhat.com>
2977 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2978 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2979 * pthread_create.c (start_thread): Likewise.
2980 * init.c (sighandler_setxid): Likewise.
2981 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2982 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2983 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2984 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2985 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2986 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2987 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2988 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2989 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2991 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2993 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2995 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2996 __rtld_notify): Likewise.
2997 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2998 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2999 __pthread_once): Likewise.
3000 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3001 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3002 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3003 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3004 (lll_futex_wait): Add private argument, define as wrapper around
3005 lll_futex_timed_wait.
3006 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3007 use __lll_private_flag macro.
3008 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3009 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3010 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3011 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3012 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3013 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3014 (lll_futex_wait): Add private argument, define as wrapper around
3015 lll_futex_timed_wait.
3016 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3017 use __lll_private_flag macro.
3018 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3019 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3020 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3022 (lll_futex_timed_wait, lll_futex_wake): Use it.
3023 (lll_private_futex_wait, lll_private_futex_timed_wait,
3024 lll_private_futex_wake): Removed.
3025 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3026 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3027 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3028 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3029 (lll_futex_wait): Add private argument, define as wrapper around
3030 lll_futex_timed_wait.
3031 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3032 use __lll_private_flag macro.
3033 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3034 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3036 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3037 (lll_private_futex_wait, lll_private_futex_timed_wait,
3038 lll_private_futex_wake): Removed.
3039 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3040 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3041 (lll_private_futex_wait, lll_private_futex_timed_wait,
3042 lll_private_futex_wake): Removed.
3043 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3044 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3045 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3046 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3047 (lll_futex_wait): Add private argument, define as wrapper around
3048 lll_futex_timed_wait.
3049 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3050 use __lll_private_flag macro.
3051 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3052 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3054 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3056 (lll_futex_timed_wait, lll_futex_wake): Use it.
3057 (lll_private_futex_wait, lll_private_futex_timed_wait,
3058 lll_private_futex_wake): Removed.
3060 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3062 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3063 of the structure for sparc32.
3065 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3067 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3069 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3071 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3072 code used when private futexes are assumed.
3073 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3076 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3078 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3079 (__lll_private_flag): Define.
3080 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3081 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3083 (lll_private_futex_wait, lll_private_futex_timedwait,
3084 lll_private_futex_wake): Define as wrapper around non-_private
3086 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3087 (__lll_private_flag): Define.
3088 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3089 (lll_private_futex_wait, lll_private_futex_timedwait,
3090 lll_private_futex_wake): Define as wrapper around non-_private
3093 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3095 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3096 parameter to lll_futex_wait call.
3097 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3099 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3100 Replace lll_futex_wait with lll_private_futex_wait.
3101 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3102 Add LLL_SHARED parameter to lll_futex_wake().
3104 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3105 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3106 lll_private_futex_wake.
3107 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3108 bit from private parm before syscall.
3109 (lll_futex_timed_wait): Likewise.
3110 (lll_futex_wake): Likewise.
3111 (lll_futex_wake_unlock): Likewise.
3112 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3113 (lll_robust_mutex_unlock): Likewise.
3114 (lll_mutex_unlock_force): Likewise.
3115 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3117 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3119 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3120 compilation when unconditionally using private futexes.
3121 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3122 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3124 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3125 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3127 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3129 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3132 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3134 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3137 2007-05-16 Roland McGrath <roland@redhat.com>
3139 * init.c (__nptl_initial_report_events): New variable.
3140 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3143 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3145 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3146 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3148 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3150 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3153 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3155 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3156 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3157 * pthread_mutex_timedlock.c: Likewise.
3158 * pthread_mutex_trylock.c: Likewise.
3159 * pthread_mutex_unlock.c: Likewise.
3161 2007-06-17 Andreas Schwab <schwab@suse.de>
3163 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3166 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3168 * allocatestack.c (allocate_stack): Make code compile if
3169 __ASSUME_PRIVATE_FUTEX is set.
3171 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3173 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3174 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3175 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3176 (__pthread_rwlock_wrlock): Likewise.
3177 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3178 (pthread_rwlock_timedrdlock): Likewise.
3179 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3180 (pthread_rwlock_timedwrlock): Likewise.
3181 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3182 (__pthread_rwlock_unlock): Likewise.
3184 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3186 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3187 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3188 Split __flags into __flags, __shared, __pad1 and __pad2.
3189 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3190 futexes if they are available.
3191 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3192 in libc-lowlevellock.S allow using private futexes.
3193 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3194 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3195 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3196 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3197 lll_private_futex_timed_wait and lll_private_futex_wake.
3198 (lll_robust_mutex_unlock): Fix typo.
3199 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3200 field in futex command setup.
3201 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3202 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3203 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3204 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3205 if they are available. Remove clear_once_control.
3206 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3207 futexes if they are available.
3208 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3209 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3210 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3211 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3212 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3213 Wake only when there are waiters.
3214 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3215 support. Indicate that there are waiters. Remove unnecessary
3216 extra cancellation test.
3217 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3218 left-over duplication of __sem_wait_cleanup.
3220 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3222 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3223 parameter to lll_futex_wait, lll_futex_timed_wait, and
3224 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3225 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3226 lll_private_futex_wake.
3227 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3228 * allocatestack.c: Adjust use of lll_futex_* macros.
3230 * lowlevellock.h: Likewise.
3231 * pthread_barrier_wait.c: Likewise.
3232 * pthread_cond_broadcast.c: Likewise.
3233 * pthread_cond_destroy.c: Likewise.
3234 * pthread_cond_signal.c: Likewise.
3235 * pthread_cond_timedwait.c: Likewise.
3236 * pthread_cond_wait.c: Likewise.
3237 * pthread_create.c: Likewise.
3238 * pthread_mutex_lock.c: Likewise.
3239 * pthread_mutex_setprioceiling.c: Likewise.
3240 * pthread_mutex_timedlock.c: Likewise.
3241 * pthread_mutex_unlock.c: Likewise.
3242 * pthread_rwlock_timedrdlock.c: Likewise.
3243 * pthread_rwlock_timedwrlock.c: Likewise.
3244 * pthread_rwlock_unlock.c: Likewise.
3245 * sysdeps/alpha/tls.h: Likewise.
3246 * sysdeps/i386/tls.h: Likewise.
3247 * sysdeps/ia64/tls.h: Likewise.
3248 * sysdeps/powerpc/tls.h: Likewise.
3249 * sysdeps/pthread/aio_misc.h: Likewise.
3250 * sysdeps/pthread/gai_misc.h: Likewise.
3251 * sysdeps/s390/tls.h: Likewise.
3252 * sysdeps/sh/tls.h: Likewise.
3253 * sysdeps/sparc/tls.h: Likewise.
3254 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3255 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3256 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3257 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3258 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3259 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3260 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3261 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3262 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3263 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3265 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3266 * sysdeps/x86_64/tls.h: Likewise.
3268 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3270 * pthread_getattr_np.c: No need to install a cancellation handler,
3271 this is no cancellation point.
3272 * pthread_getschedparam.c: Likewise.
3273 * pthread_setschedparam.c: Likewise.
3274 * pthread_setschedprio.c: Likewise.
3275 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3277 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3278 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3279 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3280 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3281 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3282 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3283 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3284 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3285 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3286 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3287 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3288 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3290 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3291 whether there are more than one thread makes no sense here since
3292 we only call the slow path if the locks are taken.
3293 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3295 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3296 COND_NWAITERS_SHIFT.
3297 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3299 * pthread_cond_init.c: Likewise.
3300 * pthread_cond_timedwait.c: Likewise.
3301 * pthread_cond_wait.c: Likewise.
3302 * pthread_condattr_getclock.c: Likewise.
3303 * pthread_condattr_setclock.c: Likewise.
3304 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3305 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3306 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3307 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3308 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3310 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3312 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3315 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3317 (THREAD_GSCOPE_GET_FLAG): Remove.
3318 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3319 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3321 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3322 (THREAD_GSCOPE_GET_FLAG): Remove.
3323 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3324 instead of THREAD_GSCOPE_GET_FLAG.
3325 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3327 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3328 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3329 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3330 THREAD_GSCOPE_WAIT): Define.
3331 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3332 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3333 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3334 THREAD_GSCOPE_WAIT): Define.
3335 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3336 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3337 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3338 THREAD_GSCOPE_WAIT): Define.
3339 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3340 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3341 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3342 THREAD_GSCOPE_WAIT): Define.
3344 2007-05-24 Richard Henderson <rth@redhat.com>
3346 * descr.h (struct pthread): Add header.gscope_flag.
3347 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3348 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3349 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3350 THREAD_GSCOPE_WAIT): Define.
3352 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3354 * init.c: Make it compile with older kernel headers.
3356 * tst-initializers1.c: Show through exit code which test failed.
3358 * pthread_rwlock_init.c: Also initialize __shared field.
3359 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3360 element in rwlock structure into four byte elements. One of them is
3361 the new __shared element.
3362 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3364 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3365 __shared, adjust names of other padding elements.
3366 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3367 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3368 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3369 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3371 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3372 futex to use private operations if possible.
3373 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3375 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3377 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3378 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3379 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3380 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3382 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3384 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3385 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3387 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3389 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3390 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3391 * pthread_rwlock_timedrdlock.c: Likewise.
3392 * pthread_rwlock_tryrdlock.c: Likewise.
3394 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3397 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3398 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3399 duplication of __sem_wait_cleanup.
3401 * allocatestack.c: Revert last change.
3403 * sysdeps/i386/tls.h: Likewise.
3404 * sysdeps/x86_64/tls.h: Likewise.
3405 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3407 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3409 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3411 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3412 * pthread_barrier_init.c: Set private flag if pshared and private
3413 futexes are supported.
3414 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3415 private field in futex command setup.
3416 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3418 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3420 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3422 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3423 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3424 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3425 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3426 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3428 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3429 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3430 fields in the structure.
3431 (__old_sem_init): New function.
3432 * sem_open.c: Initialize all fields of the structure.
3433 * sem_getvalue.c: Adjust for renamed element.
3434 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3435 (gen-as-const-headers): Add structsem.sym.
3436 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3437 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3438 struct new_sem. Add struct old_sem.
3439 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3440 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3441 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3442 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3443 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3444 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3445 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3446 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3447 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3448 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3449 * tst-sem10.c: New file.
3450 * tst-sem11.c: New file.
3451 * tst-sem12.c: New file.
3452 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3455 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3456 Jakub Jelinek <jakub@redhat.com>
3458 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3459 Move __pthread_enable_asynccancel right before futex syscall.
3460 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3463 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3465 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3466 THREAD_COPY_PRIVATE_FUTEX): Define.
3467 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3468 THREAD_COPY_PRIVATE_FUTEX): Define.
3469 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3470 * init.c (__pthread_initialize_minimal_internal): Use
3471 THREAD_SET_PRIVATE_FUTEX.
3473 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3474 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3475 THREAD_GSCOPE_FLAG_WAIT): Define.
3476 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3477 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3478 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3480 (THREAD_GSCOPE_GET_FLAG): Define.
3481 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3482 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3483 instead of ->header.gscope_flag directly.
3485 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3487 * init.c (__pthread_initialize_minimal_internal): Check whether
3488 private futexes are available.
3489 * allocatestack.c (allocate_stack): Copy private_futex field from
3490 current thread into the new stack.
3491 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3492 futexes if they are available.
3493 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3494 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3495 in libc-lowlevellock.S allow using private futexes.
3496 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3497 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3499 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3500 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3501 if they are available.
3502 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3503 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3504 * sysdeps/i386/tcb-offsets.sym: Likewise.
3505 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3506 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3508 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3510 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3511 Remove ptr_wait_lookup_done again.
3512 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3513 (__pthread_initialize_minimal_internal): Initialize
3514 _dl_wait_lookup_done pointer in _rtld_global directly.
3515 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3516 Remove code to code _dl_wait_lookup_done.
3517 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3520 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3522 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3523 pthread_mutex_init failed with ENOTSUP.
3525 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3527 * allocatestack.c (__wait_lookup_done): New function.
3528 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3529 Add ptr_wait_lookup_done.
3530 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3531 * pthreadP.h: Declare __wait_lookup_done.
3532 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3533 Define macros to implement reference handling of global scope.
3534 * sysdeps/x86_64/tls.h: Likewise.
3535 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3536 Initialize GL(dl_wait_lookup_done).
3538 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3541 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3543 * pthread_mutex_timedlock.c: Likewise.
3544 * pthread_mutex_trylock.c: Likewise.
3545 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3547 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3548 * tst-robust9.c: New file.
3549 * tst-robustpi9.c: New file.
3551 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3552 unnecessary extra cancellation test.
3554 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3556 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3557 extra cancellation test.
3558 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3560 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3562 * descr.h (struct pthread): Rearrange members to fill hole in
3565 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3566 (__pthread_setaffinity_new): If syscall was successful and
3567 RESET_VGETCPU_CACHE is defined, use it before returning.
3568 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3570 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3573 * tst-align2.c: Include stackinfo.h.
3574 * tst-getpid1.c: Likewise.
3576 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3579 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3580 * tst-getpid1.c (do_test): Likewise.
3583 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3584 (allocate_stack): Likewise.
3586 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3588 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3589 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3590 (__lll_robust_timedlock_wait): Likewise.
3591 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3593 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3596 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3597 * tst-cancel4.c (tf_fdatasync): New test.
3599 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3602 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3603 check mutexes like normal mutexes.
3606 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3607 Initialize the whole sigevent structure to appease valgrind.
3609 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3611 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3612 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3614 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3616 * tst-locale1.c: Avoid warnings.
3617 * tst-locale2.c: Likewise.
3619 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3621 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3622 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3624 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3626 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3627 __extern_always_inline where appropriate.
3628 * sysdeps/pthread/pthread.h: Likewise.
3630 2007-03-13 Richard Henderson <rth@redhat.com>
3632 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3633 separate cfi regions for the two subsections.
3635 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3637 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3638 new thread, don't just decrement it.
3639 Patch by Suzuki K P <suzuki@in.ibm.com>.
3641 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3643 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3644 PTHFCT_CALL definition.
3646 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3648 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3649 available, don't use it.
3651 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3653 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3654 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3655 call into the kernel to delay.
3657 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3659 * tst-initializers1.c: We want to test the initializers as seen
3660 outside of libc, so undefined _LIBC.
3662 * pthread_join.c (cleanup): Avoid warning.
3664 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3666 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3667 (__lll_timedwait_tid): Add unwind info.
3669 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3670 function table, mangle the pointers.
3671 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3672 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3673 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3674 demangle pointers before use.
3675 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3677 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3678 * sysdeps/pthread/setxid.h: Likewise.
3680 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3682 * tst-rwlock7.c: Show some more information in case of correct
3685 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3687 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3688 (lll_futex_timed_wait): Undo part of last change, don't negate
3691 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3693 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3694 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3696 2006-12-28 David S. Miller <davem@davemloft.net>
3698 * shlib-versions: Fix sparc64 linux target specification.
3700 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3702 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3703 Adjust include path for pthread_barrier_wait.c move.
3705 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3707 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3708 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3710 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3712 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3713 6 argument cancellable syscalls.
3714 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3715 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3716 6 argument cancellable syscalls.
3717 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3719 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3721 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3722 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3724 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3726 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3727 __sync_lock_release instead of __sync_lock_release_si.
3729 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3731 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3733 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3734 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3735 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3736 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3737 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3738 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3739 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3740 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3741 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3742 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3743 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3745 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3747 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3748 * pthread_barrier_wait.c: ...here.
3749 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3750 * pthread_cond_broadcast.c: ...here.
3751 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3752 * pthread_cond_signal.c: ...here.
3753 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3754 * pthread_cond_timedwait.c: ...here.
3755 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3756 * pthread_cond_wait.c: ...here.
3757 * sysdeps/pthread/pthread_once.c: Move to...
3758 * pthread_once.c: ...here.
3759 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3760 * pthread_rwlock_rdlock.c: ...here.
3761 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3762 * pthread_rwlock_timedrdlock.c: ...here.
3763 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3764 * pthread_rwlock_timedwrlock.c: ...here.
3765 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3766 * pthread_rwlock_unlock.c: ...here.
3767 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3768 * pthread_rwlock_wrlock.c: ...here.
3769 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3770 * pthread_spin_destroy.c: ...here.
3771 * sysdeps/pthread/pthread_spin_init.c: Move to...
3772 * pthread_spin_init.c: ...here.
3773 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3774 * pthread_spin_unlock.c: ...here.
3775 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3776 * pthread_getcpuclockid.c: ...here.
3778 * init.c: USE_TLS support is now always enabled.
3779 * tst-tls5.h: Likewise.
3780 * sysdeps/alpha/tls.h: Likewise.
3781 * sysdeps/i386/tls.h: Likewise.
3782 * sysdeps/ia64/tls.h: Likewise.
3783 * sysdeps/powerpc/tls.h: Likewise.
3784 * sysdeps/s390/tls.h: Likewise.
3785 * sysdeps/sh/tls.h: Likewise.
3786 * sysdeps/sparc/tls.h: Likewise.
3787 * sysdeps/x86_64/tls.h: Likewise.
3789 2006-10-27 Jakub Jelinek <jakub@redhat.com>
3791 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3792 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3795 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3796 Define to THREAD_SELF->header.multiple_threads.
3797 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3799 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3801 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3802 (SINGLE_THREAD_P): Likewise.
3803 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3804 (SINGLE_THREAD_P): Likewise.
3805 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3806 (SINGLE_THREAD_P): Likewise.
3807 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3808 (SINGLE_THREAD_P): Likewise.
3809 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3811 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3812 (SINGLE_THREAD_P): Likewise.
3813 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3814 (SINGLE_THREAD_P): Likewise.
3815 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3818 2006-10-26 Jakub Jelinek <jakub@redhat.com>
3820 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3821 by default rather than 2_3_3.
3823 2006-10-17 Jakub Jelinek <jakub@redhat.com>
3825 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3826 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3827 atomic_* instead of catomic_* macros.
3829 2006-10-12 Ulrich Drepper <drepper@redhat.com>
3832 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3833 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3834 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3835 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3836 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3837 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3838 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3839 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3840 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3841 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3842 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3843 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3844 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3846 2006-10-11 Ulrich Drepper <drepper@redhat.com>
3848 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3849 cancelable syscalls with six parameters.
3851 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3852 operations instead of atomic_*.
3854 2006-10-09 Ulrich Drepper <drepper@redhat.com>
3856 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3858 2006-10-07 Ulrich Drepper <drepper@redhat.com>
3860 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3861 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3862 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3864 * pthread_attr_setstack.c: Allow overwriting the version number of the
3866 * pthread_attr_setstacksize.c: Likewise.
3867 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3869 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3870 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3872 2006-09-24 Ulrich Drepper <drepper@redhat.com>
3875 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3876 Patch by Petr Baudis.
3878 2006-09-18 Jakub Jelinek <jakub@redhat.com>
3880 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3882 * tst-cancel2.c (tf): Loop as long as something was written.
3884 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3886 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3887 mutexes wake all mutexes.
3888 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3889 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3890 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3892 2006-09-12 Ulrich Drepper <drepper@redhat.com>
3894 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3895 to guarantee the thread is always canceled.
3897 2006-09-08 Jakub Jelinek <jakub@redhat.com>
3899 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3901 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3902 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3903 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3904 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3905 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3907 2006-09-08 Ulrich Drepper <drepper@redhat.com>
3910 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3911 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3912 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3914 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3915 * Makefile (tests): Add tst-cond22.
3916 * tst-cond22.c: New file.
3918 2006-09-05 Ulrich Drepper <drepper@redhat.com>
3921 * descr.h (struct pthread): Add parent_cancelhandling.
3922 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3923 cancelhandling value to child.
3924 * pthread_create.c (start_thread): If parent thread was canceled
3925 reset the SIGCANCEL mask.
3926 * Makefile (tests): Add tst-cancel25.
3927 * tst-cancel25.c: New file.
3929 2006-09-05 Jakub Jelinek <jakub@redhat.com>
3930 Ulrich Drepper <drepper@redhat.com>
3932 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3933 counterp if it is already zero.
3934 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3936 2006-03-04 Jakub Jelinek <jakub@redhat.com>
3937 Roland McGrath <roland@redhat.com>
3939 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3940 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3941 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3942 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3943 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3944 lll_robust_mutex_timedlock, lll_mutex_unlock,
3945 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3946 Add _L_*_ symbols around the subsection.
3947 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3948 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3950 2006-03-03 Jakub Jelinek <jakub@redhat.com>
3951 Roland McGrath <roland@redhat.com>
3953 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3954 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3955 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3956 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3957 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3958 lll_robust_mutex_timedlock, lll_mutex_unlock,
3959 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3960 Add _L_*_ symbols around the subsection.
3961 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3962 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3964 2006-08-31 Ulrich Drepper <drepper@redhat.com>
3966 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3967 change because it can disturb too much existing code. If real hard
3968 reader preference is needed we'll introduce another type.
3969 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3970 (pthread_rwlock_timedwrlock): Likewise.
3971 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3974 2006-08-30 Ulrich Drepper <drepper@redhat.com>
3976 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3978 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3979 (pthread_rwlock_timedwrlock): Likewise.
3980 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3983 2006-08-25 Jakub Jelinek <jakub@redhat.com>
3985 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3986 Only define ifdef SHARED.
3988 2006-08-23 Ulrich Drepper <drepper@redhat.com>
3990 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3991 (free_stacks): ...here.
3992 (__free_stack_cache): New function.
3993 * pthreadP.h: Declare __free_stack_cache.
3994 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3996 * init.c (pthread_functions): Initialize ptr_freeres.
3997 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3998 New freeres function.
4000 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
4003 * Makefile (extra-objs): Add modules to extra-test-objs instead.
4005 2006-08-20 Ulrich Drepper <drepper@redhat.com>
4007 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4008 _XOPEN_REALTIME_THREADS.
4010 2006-08-15 Jakub Jelinek <jakub@redhat.com>
4012 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4013 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4014 HAVE_CLOCK_GETTIME_VSYSCALL.
4015 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4017 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4019 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4020 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4021 * descr.h (struct priority_protection_data): New type.
4022 (struct pthread): Add tpp field.
4023 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4024 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4025 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4026 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4028 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4029 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4030 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4031 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4033 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4035 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4036 * pthread_mutexattr_getprioceiling.c
4037 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4038 in the SCHED_FIFO priority range.
4039 * pthread_mutexattr_setprioceiling.c
4040 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4041 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4042 if mutex is not TPP. Ceiling is now in __data.__lock.
4043 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4044 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4045 is now in __data.__lock. Add locking.
4046 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4047 * Makefile (libpthread-routines): Add tpp.
4048 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4049 * tst-tpp.h: New file.
4050 * tst-mutexpp1.c: New file.
4051 * tst-mutexpp6.c: New file.
4052 * tst-mutexpp10.c: New file.
4053 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4054 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4056 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4059 * pthread_join.c (pthread_join): Account for self being canceled
4060 when checking for deadlocks.
4061 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4062 (tf1): Don't print anything after pthread_join returns, this would be
4063 another cancellation point.
4065 * tst-join6.c: New file.
4066 * Makefile (tests): Add tst-join6.
4068 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4071 * pthread_setspecific.c (__pthread_setspecific): Check
4072 out-of-range index before checking for unused key.
4074 * sysdeps/pthread/gai_misc.h: New file.
4076 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4078 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4079 file. Don't use sysctl.
4080 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4081 overwrite the file if this is likely not true.
4083 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4085 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4086 * Makefile (tests): Add tst-getpid3.
4087 * tst-getpid3.c: New file.
4089 2006-07-30 Roland McGrath <roland@redhat.com>
4091 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4093 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4094 (pause_not_cancel): New macro.
4095 (nanosleep_not_cancel): New macro.
4096 (sigsuspend_not_cancel): New macro.
4097 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4098 nanosleep_not_cancel macro from <not-cancel.h>.
4099 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4100 macro from <not-cancel.h>.
4102 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4103 Jakub Jelinek <jakub@redhat.com>
4105 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4106 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4107 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4108 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4109 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4110 * pthread_mutex_lock.c: Likewise.
4111 * pthread_mutex_timedlock.c: Likewise.
4112 * pthread_mutex_trylock.c: Likewise.
4113 * pthread_mutex_unlock.c: Likewise.
4114 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4117 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4118 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4119 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4120 pthread-pi-defines.sym.
4121 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4122 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4123 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4124 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4125 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4126 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4127 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4128 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4129 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4130 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4131 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4132 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4133 * tst-mutex2.c: Likewise.
4134 * tst-mutex3.c: Likewise.
4135 * tst-mutex4.c: Likewise.
4136 * tst-mutex5.c: Likewise.
4137 * tst-mutex6.c: Likewise.
4138 * tst-mutex7.c: Likewise.
4139 * tst-mutex7a.c: Likewise.
4140 * tst-mutex8.c: Likewise.
4141 * tst-mutex9.c: Likewise.
4142 * tst-robust1.c: Likewise.
4143 * tst-robust7.c: Likewise.
4144 * tst-robust8.c: Likewise.
4145 * tst-mutexpi1.c: New file.
4146 * tst-mutexpi2.c: New file.
4147 * tst-mutexpi3.c: New file.
4148 * tst-mutexpi4.c: New file.
4149 * tst-mutexpi5.c: New file.
4150 * tst-mutexpi6.c: New file.
4151 * tst-mutexpi7.c: New file.
4152 * tst-mutexpi7a.c: New file.
4153 * tst-mutexpi8.c: New file.
4154 * tst-mutexpi9.c: New file.
4155 * tst-robust1.c: New file.
4156 * tst-robust2.c: New file.
4157 * tst-robust3.c: New file.
4158 * tst-robust4.c: New file.
4159 * tst-robust5.c: New file.
4160 * tst-robust6.c: New file.
4161 * tst-robust7.c: New file.
4162 * tst-robust8.c: New file.
4163 * Makefile (tests): Add the new tests.
4165 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4166 * pthread_mutex_destroy.c: Remove unneeded label.
4168 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4170 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4171 computations to compile time.
4173 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4175 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4177 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4179 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4181 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4183 * pthread_key_create.c (__pthread_key_create): Do away with
4184 __pthread_keys_lock.
4186 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4187 (__kernel_cpumask_size): Mark as hidden.
4188 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4190 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4191 * semaphoreP.h (__sem_mappings_lock): Likewise.
4193 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4195 * pthread_atfork.c: Mark __dso_handle as hidden.
4197 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4200 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4201 the reload problem. Change the one path in pthread_cancel_init
4202 which causes the problem. Force gcc to reload. Simplify callers.
4203 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4204 (_Unwind_GetBSP): Undo last patch.
4206 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4208 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4209 function pointer is reloaded after pthread_cancel_init calls.
4212 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4213 pointers are reloaded after pthread_cancel_init calls.
4215 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4217 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4220 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4222 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4223 Allocate new object which is passed to timer_sigev_thread so that
4224 the timer can be deleted before the new thread is scheduled.
4226 2006-04-26 Roland McGrath <roland@redhat.com>
4228 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4230 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4232 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4233 suffix for conditional jumps.
4234 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4235 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4236 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4237 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4238 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4239 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4241 * init.c (sigcancel_handler): Compare with correct PID even if the
4242 thread is in the middle of a fork call.
4243 (sighandler_setxid): Likewise.
4244 Reported by Suzuki K P <suzuki@in.ibm.com> .
4246 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4248 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4250 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4252 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4253 fails [Coverity CID 105].
4255 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4257 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4259 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4262 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4263 Define __lll_rel_instr using lwsync.
4265 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4267 * allocatestack.c (allocate_stack): Always initialize robust_head.
4268 * descr.h: Define struct robust_list_head.
4269 (struct pthread): Use robust_list_head in robust mutex list definition.
4270 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4271 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4272 (__pthread_initialize_minimal_internal): Register robust_list with
4274 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4275 Declare __set_robust_list_avail.
4276 * pthread_create.c (start_thread): Register robust_list of new thread.
4277 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4279 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4280 number of users, it's unreliable.
4281 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4282 set_robust_list syscall is available.
4283 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4284 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4285 Set robust_head.list_op_pending before trying to lock a robust mutex.
4286 * pthread_mutex_timedlock.c: Likewise.
4287 * pthread_mutex_trylock.c: Likewise.
4288 * pthread_mutex_unlock.c: Likewise for unlocking.
4289 * Makefile (tests): Add tst-robust8.
4290 * tst-robust8.c: New file.
4292 2006-03-08 Andreas Schwab <schwab@suse.de>
4294 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4295 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4297 2006-03-05 Roland McGrath <roland@redhat.com>
4299 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4300 and $config_os doesn't match *linux*.
4302 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4304 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4305 Use __syscall_error.
4306 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4307 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4308 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4309 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4310 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4311 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4313 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4315 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4317 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4319 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4320 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4322 (__lll_robust_timedlock_wait): Likewise.
4323 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4324 (__lll_robust_lock_wait): Likewise.
4325 (__lll_robust_timedlock_wait): Likewise.
4326 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4327 (__lll_robust_lock_wait): Likewise.
4328 (__lll_robust_timedlock_wait): Likewise.
4330 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4332 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4333 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4334 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4335 lll_robust_mutex_unlock): Define.
4336 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4338 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4340 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4341 instead of <clone.S>.
4343 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4345 * Makefile (libpthread-routines): Add
4346 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4347 and pthread_mutex_[sg]etprioceiling.
4348 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4349 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4350 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4351 pthread_mutex_setprioceiling.
4352 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4353 PTHREAD_PRIO_PROTECT): New enum values.
4354 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4355 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4356 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4358 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4359 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4360 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4362 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4363 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4364 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4365 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4366 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4367 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4368 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4370 * pthread_mutex_getprioceiling.c: New file.
4371 * pthread_mutex_setprioceiling.c: New file.
4372 * pthread_mutexattr_getprioceiling.c: New file.
4373 * pthread_mutexattr_setprioceiling.c: New file.
4374 * pthread_mutexattr_getprotocol.c: New file.
4375 * pthread_mutexattr_setprotocol.c: New file.
4377 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4379 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4381 2006-02-27 Roland McGrath <roland@redhat.com>
4383 * sysdeps/pthread/Subdirs: List nptl here too.
4384 * configure (libc_add_on_canonical): New variable.
4386 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4388 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4389 self to get main source tree's file.
4390 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4391 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4392 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4393 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4394 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4395 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4396 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4397 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4398 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4399 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4400 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4401 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4402 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4404 * Makefile: Use $(sysdirs) in vpath directive.
4406 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4407 (CPPFLAGS-timer_routines.c): Likewise.
4409 * Makeconfig (includes): Variable removed.
4411 2006-02-26 Roland McGrath <roland@redhat.com>
4413 * sysdeps/generic/pt-raise.c: Moved to ...
4414 * pt-raise.c: ... here.
4415 * sysdeps/generic/lowlevellock.h: Moved to ...
4416 * lowlevellock.h: ... here.
4418 2006-02-23 Roland McGrath <roland@redhat.com>
4420 * descr.h (struct pthread): Add final member `end_padding'.
4421 (PTHREAD_STRUCT_END_PADDING): Use it.
4423 2006-02-20 Roland McGrath <roland@redhat.com>
4425 * sysdeps/mips: Directory removed, saved in ports repository.
4426 * sysdeps/unix/sysv/linux/mips: Likewise.
4428 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4430 * tst-robust1.c: Add second mutex to check that the mutex list is
4433 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4435 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4436 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4437 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4438 lll_robust_mutex_unlock): New macros.
4439 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4440 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4441 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4442 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4443 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4445 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4447 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4449 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4451 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4453 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4454 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4455 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4456 (lll_robust_mutex_unlock): Likewise.
4458 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4460 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4461 Set robust_list.__next rather than robust_list.
4462 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4463 (__pthread_list_t): New typedef.
4464 (pthread_mutex_t): Replace __next and __prev fields with __list.
4465 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4466 (__pthread_list_t): New typedef.
4467 (pthread_mutex_t): Replace __next and __prev fields with __list.
4468 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4469 (__pthread_list_t, __pthread_slist_t): New typedefs.
4470 (pthread_mutex_t): Replace __next and __prev fields with __list.
4471 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4472 (__pthread_list_t, __pthread_slist_t): New typedefs.
4473 (pthread_mutex_t): Replace __next and __prev fields with __list.
4474 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4475 (__pthread_list_t, __pthread_slist_t): New typedefs.
4476 (pthread_mutex_t): Replace __next and __prev fields with __list.
4477 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4478 (__pthread_slist_t): New typedef.
4479 (pthread_mutex_t): Replace __next field with __list.
4481 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4483 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4484 PTHREAD_MUTEX_OWNERDEAD.
4485 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4486 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4487 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4488 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4489 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4490 to PTHREAD_MUTEX_INCONSISTENT.
4491 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4492 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4493 * pthread_mutex_trylock.c: Likewise.
4494 * pthread_mutex_timedlock.c: Likewise.
4495 * pthread_mutex_unlock.c: Likewise.
4496 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4497 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4498 lowlevelrobustlock.sym.
4499 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4500 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4502 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4503 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4504 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4505 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4506 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4508 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4510 * allocatestack.c (allocate_stack): Initialize robust_list.
4511 * init.c (__pthread_initialize_minimal_internal): Likewise.
4512 * descr.h (struct xid_command): Pretty printing.
4513 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4514 robust_list. Adjust macros.
4515 * pthread_create.c (start_thread): Adjust robust_list handling.
4516 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4517 but the owner for all robust mutex types.
4518 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4519 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4520 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4521 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4523 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4524 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4526 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4528 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4529 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4531 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4533 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4535 (lll_futex_timed_wait): Define.
4537 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4539 * tst-cancel4.c: Test ppoll.
4541 2006-01-18 Andreas Jaeger <aj@suse.de>
4544 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4545 (pthread_mutex_t): Follow changes for other archs. Based on patch
4546 by Jim Gifford <patches@jg555.com>.
4548 2006-01-13 Richard Henderson <rth@redhat.com>
4550 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4552 2006-01-10 Roland McGrath <roland@redhat.com>
4554 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4555 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4556 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4557 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4558 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4559 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4560 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4561 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4562 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4563 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4565 2006-01-09 Roland McGrath <roland@redhat.com>
4567 * tst-initializers1-c89.c: New file.
4568 * tst-initializers1-c99.c: New file.
4569 * tst-initializers1-gnu89.c: New file.
4570 * tst-initializers1-gnu99.c: New file.
4571 * Makefile (tests): Add them.
4572 (CFLAGS-tst-initializers1-c89.c): New variable.
4573 (CFLAGS-tst-initializers1-c99.c): New variable.
4574 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4575 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4577 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4578 Use __extension__ on anonymous union definition.
4579 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4580 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4581 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4582 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4583 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4585 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4587 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4588 Don't give the union a name because it changes the mangled name.
4589 Instead name the struct for __data.
4590 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4592 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4595 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4597 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4598 stack bias to mc_ftp field.
4600 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4602 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4603 being too clever and reloading the futex value where it shouldn't.
4605 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4607 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4610 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4612 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4615 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4617 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4618 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4619 rename in tcbhead_t.
4621 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4622 Don't give the union a name because it changes the mangled name.
4623 Instead name the struct for __data.
4624 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4625 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4626 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4627 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4628 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4629 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4631 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4633 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4635 (lll_futex_timed_wait): Define.
4636 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4637 * sysdeps/pthread/aio_misc.h: New file.
4639 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4641 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4643 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4645 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4646 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4647 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4649 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4651 * tst-cancel24.cc: Use C headers instead of C++ headers.
4653 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4655 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4656 sparc-linux configured glibc.
4657 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4658 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4659 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4660 atomic_compare_and_exchange_val_24_acq instead of
4661 atomic_compare_and_exchange_val_acq.
4662 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4663 instead of atomic_exchange_rel.
4664 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4665 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4667 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4669 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4670 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4671 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4672 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4673 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4674 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4676 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4678 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4679 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4680 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4682 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4684 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4686 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4688 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4691 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4693 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4694 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4695 THREAD_COPY_POINTER_GUARD): Define.
4696 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4697 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4699 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4701 * version.c: Update copyright year.
4703 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4705 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4706 .eh_frame section, use cfi_* directives.
4707 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4709 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4711 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4714 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4716 * sysdeps/pthread/sigaction.c: Removed.
4717 * sigaction.c: New file.
4718 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4720 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4722 * Makefile (tests): Add tst-signal7.
4723 * tst-signal7.c: New file.
4725 2005-12-27 Roland McGrath <roland@redhat.com>
4727 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4728 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4729 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4730 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4731 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4732 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4733 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4734 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4735 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4736 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4737 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4739 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4741 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4742 and __prev field to pthread_mutex_t.
4743 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4744 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4745 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4746 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4747 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4750 2005-12-26 Ulrich Drepper <drepper@redhat.com>
4752 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4753 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4754 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4755 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4756 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4757 and PTHREAD_MUTEXATTR_FLAG_BITS.
4758 * descr.h (struct pthread): Add robust_list field and define
4759 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4760 * pthread_mutexattr_getrobust.c: New file.
4761 * pthread_mutexattr_setrobust.c: New file.
4762 * pthread_mutex_consistent.c: New file.
4763 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4764 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4765 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4766 Adjust pthread_mutex_t initializers.
4767 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4768 field to pthread_mutex_t.
4769 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4770 and __prev field to pthread_mutex_t.
4771 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4772 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4773 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4774 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4775 * pthread_mutexattr_gettype.c: Likewise.
4776 * pthread_mutexattr_setpshared.c: Likewise.
4777 * pthread_mutexattr_settype.c: Likewise.
4778 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4779 Initialize mutex kind according to robust flag.
4780 * pthread_mutex_lock.c: Implement local robust mutex.
4781 * pthread_mutex_timedlock.c: Likewise.
4782 * pthread_mutex_trylock.c: Likewise.
4783 * pthread_mutex_unlock.c: Likewise.
4784 * pthread_create.c (start_thread): Mark robust mutexes which remained
4786 * tst-robust1.c: New file.
4787 * tst-robust2.c: New file.
4788 * tst-robust3.c: New file.
4789 * tst-robust4.c: New file.
4790 * tst-robust5.c: New file.
4791 * tst-robust6.c: New file.
4792 * tst-robust7.c: New file.
4793 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4794 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4795 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4796 tst-robust5, tst-robust6, and tst-robust7.
4798 * tst-typesizes.c: New file.
4799 * Makefile (tests): Add tst-typesizes.
4801 * tst-once3.c: More debug output.
4803 2005-12-24 Ulrich Drepper <drepper@redhat.com>
4805 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4806 missing after last change.
4808 * version.c: Update copyright year.
4810 2005-12-23 Ulrich Drepper <drepper@redhat.com>
4812 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4813 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4814 * pthread_mutex_trylock.c: Likewise.
4815 * pthread_mutex_timedlock.c: Likewise.
4816 * pthread_mutex_unlock.c: Likewise.
4818 2005-12-22 Roland McGrath <roland@redhat.com>
4820 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4821 so that #include_next's search location is not reset to the -I..
4822 directory where <nptl/...> can be found.
4824 2005-12-22 Ulrich Drepper <drepper@redhat.com>
4827 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4828 Fix unwind info. Remove useless branch prediction prefix.
4829 * tst-cancel24.cc: New file.
4830 * Makefile: Add rules to build and run tst-cancel24.
4832 2005-12-21 Roland McGrath <roland@redhat.com>
4834 * libc-cancellation.c: Use <> rather than "" #includes.
4835 * pt-cleanup.c: Likewise.
4836 * pthread_create.c: Likewise.
4837 * pthread_join.c: Likewise.
4838 * pthread_timedjoin.c: Likewise.
4839 * pthread_tryjoin.c: Likewise.
4840 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4841 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4842 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4843 * unwind.c: Likewise.
4845 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4847 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4848 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4849 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4850 THREAD_COPY_POINTER_GUARD): Define.
4852 2005-12-19 Jakub Jelinek <jakub@redhat.com>
4854 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4856 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4857 THREAD_COPY_POINTER_GUARD): Define.
4858 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4859 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4860 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4861 THREAD_COPY_POINTER_GUARD): Define.
4862 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4863 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4864 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4865 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4866 Use PTR_DEMANGLE for B0 if defined.
4868 2005-12-17 Ulrich Drepper <drepper@redhat.com>
4870 * pthread_create.c (__pthread_create_2_1): Use
4871 THREAD_COPY_POINTER_GUARD if available.
4872 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4873 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4874 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4875 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4876 * sysdeps/x86_64/tls.h: Likewise.
4878 2005-12-15 Roland McGrath <roland@redhat.com>
4880 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4882 2005-12-13 Ulrich Drepper <drepper@redhat.com>
4884 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4886 * errno-loc.c: New file.
4888 2005-12-12 Roland McGrath <roland@redhat.com>
4890 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4891 adjustments before choosing stack size. Update minimum stack size
4892 calculation to match allocate_stack change.
4894 2005-12-12 Ulrich Drepper <drepper@redhat.com>
4896 * allocatestack.c (allocate_stack): Don't demand that there is an
4897 additional full page available on the stack beside guard, TLS, the
4900 2005-11-24 Ulrich Drepper <drepper@redhat.com>
4902 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4903 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4905 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4906 compiling 32-bit code we must define __cleanup_fct_attribute.
4908 005-11-24 Jakub Jelinek <jakub@redhat.com>
4911 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4912 __attribute__ instead of __attribute.
4913 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4914 (__cleanup_fct_attribute): Likewise.
4916 2005-11-17 Jakub Jelinek <jakub@redhat.com>
4918 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4919 a write barrier before writing libgcc_s_getcfa.
4921 2005-11-06 Ulrich Drepper <drepper@redhat.com>
4923 * sysdeps/unix/sysv/linux/configure: Removed.
4925 2005-11-05 Ulrich Drepper <drepper@redhat.com>
4927 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4928 optional init_array/fini_array support.
4930 2005-10-24 Roland McGrath <roland@redhat.com>
4932 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4933 versioned_symbol use.
4935 2005-10-16 Roland McGrath <roland@redhat.com>
4937 * init.c (__pthread_initialize_minimal_internal): Even when using a
4938 compile-time default stack size, apply the minimum that allocate_stack
4939 will require, and round up to page size.
4941 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4943 * Makefile ($(test-modules)): Remove static pattern rule.
4945 2005-10-14 Jakub Jelinek <jakub@redhat.com>
4946 Ulrich Drepper <drepper@redhat.com>
4948 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4949 alignment in callback function.
4950 * Makefile: Add rules to build and run tst-align3.
4951 * tst-align3.c: New file.
4953 2005-10-03 Jakub Jelinek <jakub@redhat.com>
4955 * allocatestack.c (setxid_signal_thread): Add
4956 INTERNAL_SYSCALL_DECL (err).
4958 2005-10-02 Jakub Jelinek <jakub@redhat.com>
4960 * allocatestack.c (setxid_signal_thread): Need to use
4961 atomic_compare_and_exchange_bool_acq.
4963 2005-10-01 Ulrich Drepper <drepper@redhat.com>
4964 Jakub Jelinek <jakub@redhat.com>
4966 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4968 (struct pthread): Move specific_used field to avoid padding.
4969 Add setxid_futex field.
4970 * init.c (sighandler_setxid): Reset setxid flag and release the
4972 * allocatestack.c (setxid_signal_thread): New function. Broken
4973 out of the bodies of the two loops in __nptl_setxid. For undetached
4974 threads check whether they are exiting and if yes, don't send a signal.
4975 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4976 * pthread_create.c (start_thread): For undetached threads, check
4977 whether setxid bit is set. If yes, wait until signal has been
4980 * allocatestack.c (STACK_VARIABLES): Initialize them.
4981 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4983 2004-09-02 Jakub Jelinek <jakub@redhat.com>
4985 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4986 waiters, awake all waiters on the associated mutex.
4988 2005-09-22 Roland McGrath <roland@redhat.com>
4990 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4991 ../sysdeps/x86_64/hp-timing.h).
4993 2005-08-29 Jakub Jelinek <jakub@redhat.com>
4995 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4996 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4997 (lll_futex_wake_unlock): Define.
4998 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4999 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5000 (lll_futex_wake_unlock): Define.
5001 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5002 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5003 (lll_futex_wake_unlock): Define.
5004 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5005 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5006 (lll_futex_wake_unlock): Define.
5007 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5008 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5009 (lll_futex_wake_unlock): Define.
5010 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5011 lll_futex_wake_unlock.
5012 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5013 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5014 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5015 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5016 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5017 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5019 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5021 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5022 Fix typo in register name.
5024 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5026 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5027 Use __sigfillset. Document that sigfillset does the right thing wrt
5030 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5033 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5034 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5035 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5036 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5037 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5038 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5040 * Makefile (tests): Add tst-initializers1.
5041 (CFLAGS-tst-initializers1.c): Set.
5042 * tst-initializers1.c: New test.
5044 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5046 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5047 Make sure __flags are located at offset 48 from the start of the
5050 2005-07-02 Roland McGrath <roland@redhat.com>
5052 * Makeconfig: Comment fix.
5054 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5056 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5057 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5058 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5059 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5060 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5061 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5062 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5063 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5064 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5065 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5067 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5069 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5070 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5071 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5073 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5074 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5075 field. Put in sysinfo field unconditionally.
5076 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5077 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5078 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5079 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5081 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5082 * pthread_create.c (__pthread_create_2_1): Use
5083 THREAD_COPY_STACK_GUARD macro.
5084 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5086 * tst-stackguard1.c: New file.
5087 * tst-stackguard1-static.c: New file.
5089 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5091 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5092 Invoke CGOTSETUP and CGOTRESTORE.
5093 (CGOTSETUP, CGOTRESTORE): Define.
5095 2005-05-29 Richard Henderson <rth@redhat.com>
5097 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5098 (tf_write, tf_writev): Use it.
5099 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5102 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5104 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5105 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5106 __librt_*_asynccancel@local.
5108 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5110 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5111 all occurrences of JUMPTARGET. Instead append @local to labels.
5113 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5115 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5116 size/alignment of struct pthread rather than tcbhead_t.
5117 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5119 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5121 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5124 2005-05-19 Richard Henderson <rth@redhat.com>
5126 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5127 __sync_val_compare_and_swap, not explicit _si variant.
5128 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5130 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5133 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5135 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5137 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5138 .eh_frame section, use cfi_* directives.
5140 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5142 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5145 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5148 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5151 2005-04-27 Roland McGrath <roland@redhat.com>
5153 * Makefile (tests): Remove tst-clock2.
5155 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5156 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5157 translating to the kernel clockid_t for our own process/thread clock.
5159 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5161 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5163 * old_pthread_cond_init.c: Include <errno.h>.
5164 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5165 process shared or uses clock other than CLOCK_REALTIME.
5166 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5168 2005-04-13 David S. Miller <davem@davemloft.net>
5170 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5171 * sysdeps/sparc/sparc64/clone.S: New file.
5173 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5176 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5177 __inline instead of inline.
5178 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5180 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5182 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5183 functionally equivalent, but shorter instructions.
5184 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5185 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5186 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5188 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5189 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5190 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5191 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5193 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5194 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5196 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5197 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5198 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5199 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5200 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5202 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5204 * sysdeps/mips/Makefile: New file.
5205 * sysdeps/mips/nptl-sysdep.S: New file.
5206 * sysdeps/mips/tcb-offsets.sym: New file.
5207 * sysdeps/mips/pthread_spin_lock.S: New file.
5208 * sysdeps/mips/pthread_spin_trylock.S: New file.
5209 * sysdeps/mips/pthreaddef.h: New file.
5210 * sysdeps/mips/tls.h: New file.
5211 * sysdeps/mips/jmpbuf-unwind.h: New file.
5212 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5213 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5214 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5215 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5216 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5217 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5218 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5219 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5220 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5221 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5223 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5226 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5229 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5231 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5233 2005-02-25 Roland McGrath <roland@redhat.com>
5235 * alloca_cutoff.c: Correct license text.
5236 * tst-unload.c: Likewise.
5237 * sysdeps/pthread/allocalim.h: Likewise.
5238 * sysdeps/pthread/pt-initfini.c: Likewise.
5239 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5240 * sysdeps/pthread/bits/sigthread.h: Likewise.
5241 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5242 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5244 2005-02-16 Roland McGrath <roland@redhat.com>
5246 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5247 Use unsigned int * for ptr_nthreads.
5249 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5252 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5255 2005-02-07 Richard Henderson <rth@redhat.com>
5258 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5261 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5263 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5264 order of arguments in invocation of atomic_add_zero.
5266 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5269 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5270 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5271 at least gotntpoff relocation and addition.
5272 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5274 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5276 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5279 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5281 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5282 entry for static tls deallocation fix.
5283 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5284 also contains information whether the memory pointed to is static
5286 * sysdeps/i386/tls.h: Likewise.
5287 * sysdeps/ia64/tls.h: Likewise.
5288 * sysdeps/powerpc/tls.h: Likewise.
5289 * sysdeps/s390/tls.h: Likewise.
5290 * sysdeps/sh/tls.h: Likewise.
5291 * sysdeps/sparc/tls.h: Likewise.
5292 * sysdeps/x86_64/tls.h: Likewise.
5294 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5296 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5298 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5300 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5302 * Makefile (tests): Add tst-align2.
5303 * tst-align2.c: New test.
5304 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5305 -mpreferred-stack-boundary=4.
5307 2004-12-18 Roland McGrath <roland@redhat.com>
5309 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5310 New file removed withdrawn for the moment.
5312 2004-12-17 Richard Henderson <rth@redhat.com>
5314 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5315 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5317 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5319 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5320 Increased PTHREAD_STACK_MIN.
5322 * tst-context1.c (stacks): Use bigger stack size.
5324 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5326 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5327 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5329 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5331 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5332 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5333 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5335 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5337 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5339 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5341 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5342 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5344 * tst-getpid1.c: If child crashes, report this first. Print which
5347 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5349 * init.c (__pthread_initialize_minimal_internal): Also unblock
5352 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5354 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5355 _POSIX_THREAD_CPUTIME): Define to 0.
5356 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5357 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5358 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5359 __timer_signal_thread_tclk): Remove.
5360 (init_module): Remove their initialization.
5361 (thread_cleanup): Remove their cleanup assertions.
5362 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5363 __timer_signal_thread_tclk): Remove.
5364 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5365 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5366 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5368 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5370 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5371 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5373 * Makefile (tests): Add tst-getpid2.
5374 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5375 (do_test): Use it. Use __clone2 instead of clone on ia64.
5376 * tst-getpid2.c: New test.
5378 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5380 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5382 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5384 * Makefile (tests): Add tst-getpid1.
5385 * tst-getpid1.c: New file.
5386 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5387 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5389 2004-12-02 Roland McGrath <roland@redhat.com>
5391 * Makefile (libpthread-nonshared): Variable removed.
5392 ($(objpfx)libpthread_nonshared.a): Target removed.
5393 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5394 These are now handled by generic magic from
5395 libpthread-static-only-routines being set.
5397 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5399 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5400 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5401 _POSIX_THREAD_PRIO_PROTECT): Define.
5402 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5403 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5404 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5406 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5408 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5409 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5410 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5411 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5412 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5413 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5414 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5416 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5418 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5420 * Makefile (libpthread-routines): Add pthread_setschedprio.
5421 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5422 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5423 * pthread_setschedprio.c: New file.
5425 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5427 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5428 * pthread_cancel.c (pthread_create): Likewise.
5430 * Makefile (libpthread-routines): Add vars.
5431 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5432 * init.c (__default_stacksize, __is_smp): Remove.
5434 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5435 and define a wrapper macro.
5436 (PTHREAD_STATIC_FN_REQUIRE): Define.
5437 * allocatestack.c (__find_thread_by_id): Undefine.
5438 * pthread_create (__pthread_keys): Remove.
5439 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5440 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5441 PTHREAD_STATIC_FN_REQUIRE.
5443 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5445 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5446 parameter to REGISTER macro.
5448 2004-11-17 Roland McGrath <roland@redhat.com>
5450 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5451 Make sure SIGCANCEL is blocked as well.
5453 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5455 * sysdeps/pthread/setxid.h: New file.
5456 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5457 (struct xid_command): Add forward decl.
5458 (struct pthread_functions): Change return type of __nptl_setxid hook
5460 * pthreadP.h (__nptl_setxid): Change return type to int.
5461 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5462 calling thread, return its return value and set errno on failure.
5463 * descr.h (struct xid_command): Change id type to long array.
5465 * Makefile: Add rules to build and test tst-setuid1 and
5467 * tst-setuid1.c: New test.
5468 * tst-setuid1-static.c: New test.
5470 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5472 * Makefile (tests): Add tst-exit3.
5473 * tst-exit3.c: New test.
5475 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5477 * Makefile (tests): Add tst-exit2.
5478 * tst-exit2.c: New file.
5480 2004-11-09 Roland McGrath <roland@redhat.com>
5483 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5484 here, before calling clone.
5485 * pthread_create.c (start_thread): Don't do it here.
5487 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5489 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5491 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5493 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5494 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5497 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5499 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5500 if sched_priority is not between minprio and maxprio.
5502 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5504 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5505 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5507 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5508 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5510 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5512 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5513 not-cancelable I/O functions.
5515 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5517 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5518 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5519 make sure 2 is stored in the futex and we looked at the old value.
5520 Fix a few other problems to return the correct value.
5522 2004-10-14 Richard Henderson <rth@redhat.com>
5524 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5527 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5529 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5530 of pthread-functions.h and pthreaddef.h.
5531 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5533 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5534 Change __data.__nwaiters from int to unsigned int.
5536 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5537 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5539 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5542 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5543 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5545 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5547 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5548 test fails, remove message queue.
5549 (tf_msgsnd): Likewise.
5551 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5553 * tst-clock1.c: Change #ifdef to #if defined.
5554 * tst-clock2.c: Likewise.
5555 * tst-cond11.c: Likewise.
5557 * sysdeps/pthread/timer_create.c (timer_create): Use
5558 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5559 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5562 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5564 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5565 _POSIX_THREAD_CPUTIME): Define to 0.
5567 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5569 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5570 and _POSIX_THREAD_CPUTIME to zero.
5571 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5572 * tst-barrier2.c: Fix testing for POSIX feature.
5573 * tst-clock1.c: Likewise.
5574 * tst-clock2.c: Likewise.
5575 * tst-cond11.c: Likewise.
5576 * tst-cond4.c: Likewise.
5577 * tst-cond6.c: Likewise.
5578 * tst-flock2.c: Likewise.
5579 * tst-mutex4.c: Likewise.
5580 * tst-mutex9.c: Likewise.
5581 * tst-rwlock12.c: Likewise.
5582 * tst-rwlock4.c: Likewise.
5583 * tst-signal1.c: Likewise.
5584 * tst-spin2.c: Likewise.
5585 * sysdeps/pthread/posix-timer.h: Likewise.
5586 * sysdeps/pthread/timer_create.c: Likewise.
5587 * sysdeps/pthread/timer_routines.c: Likewise.
5589 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5591 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5592 (__lll_mutex_timedlock_wait): Address futex correctly.
5594 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5595 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5596 make sure 2 is stored in the futex and we looked at the old value.
5597 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5598 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5599 which might very well made the code not working at all before.
5602 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5604 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5605 allow SIGSETXID to be sent.
5606 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5607 for SIGSETXID to be defined.
5608 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5609 SIGSETXID cannot be blocked.
5611 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5612 Add __extension__ to long long types.
5613 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5614 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5615 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5616 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5617 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5618 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5619 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5621 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5623 * descr.h (struct pthread): Add stopped_start field.
5624 * sysdeps/pthread/createthread.c (create_thread): Set
5625 start_stopped flag in descriptor for new thread appropriately.
5626 * pthread_create.c (start_thread): Only take lock to be stopped on
5627 startup if stopped_start flag says so.
5629 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5631 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5632 is created detached and if yes, do not try to free the stack in case
5633 the thread creation failed.
5634 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5635 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5636 case there has been no error. [BZ #405]
5638 * pthread_create.c (start_thread): Don't wait for scheduler data
5639 etc to be set at the beginning of the function. The cancellation
5640 infrastructure must have been set up. And enable async
5641 cancellation before potentially going to sleep. [BZ #401]
5643 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5645 * Versions: Remove exports for pthread_set*id_np functions.
5646 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5648 * Makefile: Don't build pthread_set*id code for now.
5650 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5652 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5654 * allocatestack.c (__nptl_setxid): New function.
5655 * descr.h (struct xid_command): Define type.
5656 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5657 (sighandler_setxid): New function.
5658 (__pthread_initialize_minimal): Register sighandler_setxid for
5660 * pt-allocrtsig.c: Update comment.
5661 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5662 Declare __nptl_setxid.
5663 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5664 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5665 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5666 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5667 and pthread_setresuid_np.
5668 * pthread_setgid_np.c: New file.
5669 * pthread_setuid_np.c: New file.
5670 * pthread_setegid_np.c: New file.
5671 * pthread_seteuid_np.c: New file.
5672 * pthread_setregid_np.c: New file.
5673 * pthread_setreuid_np.c: New file.
5674 * pthread_setresgid_np.c: New file.
5675 * pthread_setresuid_np.c: New file.
5676 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5677 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5678 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5679 and pthread_setresuid_np.
5680 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5681 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5682 pthread_setregid, and pthread_setresgid.
5684 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5686 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5687 ENOMEM when out of memory.
5689 2004-09-10 Roland McGrath <roland@redhat.com>
5692 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5693 code, since we don't try to use the broken CLONE_STOPPED any more.
5694 * pthread_create.c (start_thread): Likewise.
5696 2004-09-15 Richard Henderson <rth@redhat.com>
5698 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5700 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5702 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5703 (__libc_unwind_longjmp): Delete macro and declare as function.
5704 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5705 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5707 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5708 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5709 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5711 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5713 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5715 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5716 types also for __USE_XOPEN2K.
5717 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5718 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5719 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5720 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5721 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5722 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5723 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5726 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5728 * sysdeps/pthread/pthread.h
5729 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5730 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5731 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5732 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5735 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5737 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5738 PSEUDO to be used with . prefix.
5740 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5741 Use atomic_increment instead of atomic_exchange_and_add.
5742 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5744 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5746 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5749 * allocatestack.c (allocate_stack): Use atomic_increment_val
5750 instead of atomic_exchange_and_add.
5751 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5752 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5754 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5757 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5758 the initialization function might throw.
5760 2005-09-05 Richard Henderson <rth@redhat.com>
5762 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5763 Move definition inside libpthread, libc, librt check. Provide
5764 definition for rtld.
5766 2004-09-02 Ulrich Drepper <drepper@redhat.com>
5768 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5769 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5770 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5771 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5772 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5773 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5774 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5775 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5778 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5779 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5780 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5782 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5783 Decrement __nwaiters. If pthread_cond_destroy has been called and
5784 this is the last waiter, signal pthread_cond_destroy caller and
5785 avoid using the pthread_cond_t structure after unlock.
5786 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5787 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5788 Read clock type from the least significant bits of __nwaiters instead
5790 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5791 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5793 2004-08-31 Jakub Jelinek <jakub@redhat.com>
5796 * Makefile (tests): Add tst-cond20 and tst-cond21.
5797 * tst-cond20.c: New test.
5798 * tst-cond21.c: New test.
5799 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5800 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5802 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5804 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5805 (pthread_cond_t): Likewise.
5806 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5808 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5810 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5812 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5813 (cond_nwaiters): New.
5815 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5816 if there are waiters not signalled yet.
5817 Wait until all already signalled waiters wake up.
5818 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5819 __nwaiters. If pthread_cond_destroy has been called and this is the
5820 last waiter, signal pthread_cond_destroy caller and avoid using
5821 the pthread_cond_t structure after unlock.
5822 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5823 decrement it when leaving. If pthread_cond_destroy has been called
5824 and this is the last waiter, signal pthread_cond_destroy caller.
5825 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5826 Likewise. Read clock type from the least significant bits of
5827 __nwaiters instead of __clock.
5828 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5829 whether clock ID can be encoded in COND_CLOCK_BITS bits.
5830 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5831 clock type just from the last COND_CLOCK_BITS bits of value.
5832 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5833 instead of __clock, just from second bit of condattr's value.
5835 2004-08-30 Jakub Jelinek <jakub@redhat.com>
5837 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5838 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
5840 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5842 2004-08-15 Roland McGrath <roland@frob.com>
5844 * pthread_atfork.c: Update copyright terms including special exception
5845 for these trivial files, which are statically linked into executables
5846 that use dynamic linking for the significant library code.
5848 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5850 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5851 pthread_rwlock_rdlock.
5852 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5853 Decrease __nr_readers_queued after reacquiring lock.
5854 * sysdeps/pthread/pthread_rwlock_timedrdlock
5855 (pthread_rwlock_timedrdlock): Likewise.
5856 Reported by Bob Cook <bobcook47@hotmail.com>.
5858 2004-08-11 Jakub Jelinek <jakub@redhat.com>
5860 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5861 before pthread_barrier_wait.
5863 2004-08-07 Ulrich Drepper <drepper@redhat.com>
5865 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5866 Remove unnecessary exception handling data.
5868 2004-07-23 Jakub Jelinek <jakub@redhat.com>
5871 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5872 instead of clockid_t.
5874 2004-07-21 Roland McGrath <roland@redhat.com>
5876 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5878 2004-07-19 Roland McGrath <roland@redhat.com>
5880 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5882 2004-07-02 Roland McGrath <roland@redhat.com>
5884 * configure: Don't exit.
5886 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5888 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5889 (__pthread_cond_timedwait): Check for invalid nanosecond in
5892 2004-07-07 Ulrich Drepper <drepper@redhat.com>
5894 * Makefile: Add rules to build and run tst-fini1.
5895 * tst-fini1.c: New file.
5896 * tst-fini1mod.c: New file.
5898 2004-07-05 Ulrich Drepper <drepper@redhat.com>
5900 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5901 if no cancellation support is needed.
5902 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5903 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5904 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5905 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5906 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5907 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5908 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5909 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5910 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5912 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5913 only if not already defined.
5915 2004-07-05 Jakub Jelinek <jakub@redhat.com>
5917 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5918 constraint "m" instead of "0" for futex.
5920 * shlib-versions: Add powerpc64-.*-linux.*.
5922 2004-07-04 Jakub Jelinek <jakub@redhat.com>
5924 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5925 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5927 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5928 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5931 2004-06-29 Roland McGrath <roland@redhat.com>
5933 * Banner: NPTL no longer has its own version number.
5934 * Makefile (nptl-version): Variable removed.
5935 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5936 using $(version), the glibc version number.
5938 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5940 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5941 Fix branch offset for a PLT entry.
5942 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5944 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5946 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5948 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5951 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5953 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5956 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5958 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5959 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5961 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5962 (pthread_rwlock_timedrdlock): Likewise.
5964 2004-06-22 Jakub Jelinek <jakub@redhat.com>
5966 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5967 Set __r7 to val, not mutex.
5969 2004-06-27 Ulrich Drepper <drepper@redhat.com>
5971 * Makefile: Add rules to build tst-rwlock14.
5972 * tst-rwlock14.c: New file.
5974 2004-06-24 Boris Hu <boris.hu@intel.com>
5976 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5978 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5980 2004-06-19 Andreas Jaeger <aj@suse.de>
5982 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5983 assembler in last patch.
5985 2004-06-17 Ulrich Drepper <drepper@redhat.com>
5987 * sysdeps/pthread/pthread_cond_timedwait.c
5988 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5989 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5990 (__pthread_cond_timedwait): Check for invalid nanosecond in
5992 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5993 * tst-cond19.c: New file.
5994 * Makefile: Add rules to build and run tst-cond19.
5996 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5998 * tst-context1.c (GUARD_PATTERN): Defined.
5999 (tst_context_t): Define struct containing ucontext_t & guard words.
6000 (ctx): Declare as an array of tst_context_t.
6001 (fct): Verify uc_link & guard words are still valid.
6002 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
6004 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6006 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6007 Add __data.__futex field, reshuffle __data.__clock.
6008 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6009 (__pthread_cond_signal): Increment __futex at the same time as
6010 __wakeup_seq or __total_seq. Pass address of __futex instead of
6011 address of low 32-bits of __wakeup_seq to futex syscall.
6012 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6013 (__pthread_cond_wait): Likewise. Pass __futex value from before
6014 releasing internal lock to FUTEX_WAIT.
6015 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6016 (__pthread_cond_timedwait): Likewise.
6017 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6018 (FUTEX_CMP_REQUEUE): Define.
6019 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6020 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6021 Pass __futex value from before the unlock and __futex address instead
6022 of address of low 32-bits of __wakeup_seq to futex syscall.
6023 Fallback to FUTEX_WAKE all on any errors.
6025 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6027 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6029 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6030 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6031 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6032 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6033 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6035 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6037 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6038 Add memory clobber to inline assembly.
6039 (__lll_mutex_trylock): Likewise.
6040 (__lll_mutex_cond_trylock): Likewise.
6042 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6044 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6045 Pass val argument as 6th system call argument in %r7.
6047 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6049 * Makefile (tests): Add tst-cond16.
6050 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6051 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6052 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6053 Add __data.__futex field, reshuffle __data.__clock.
6054 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6055 (__pthread_cond_signal): Increment __futex at the same time as
6056 __wakeup_seq or __total_seq. Pass address of __futex instead of
6057 address of low 32-bits of __wakeup_seq to futex syscall.
6058 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6059 (__pthread_cond_wait): Likewise. Pass __futex value from before
6060 releasing internal lock to FUTEX_WAIT.
6061 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6062 (__pthread_cond_timedwait): Likewise.
6063 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6064 (FUTEX_CMP_REQUEUE): Define.
6065 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6066 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6067 Pass __futex value from before the unlock and __futex address instead
6068 of address of low 32-bits of __wakeup_seq to futex syscall.
6069 Fallback to FUTEX_WAKE all on any errors.
6070 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6072 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6073 internally. Return non-zero if error, zero if success.
6074 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6075 Add __data.__futex field, reshuffle __data.__clock.
6076 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6078 (lll_futex_requeue): Add val argument, return 1 unconditionally
6080 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6081 Add __data.__futex field, reshuffle __data.__clock.
6082 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6084 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6085 internally. Return non-zero if error, zero if success.
6086 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6087 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6088 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6090 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6091 internally. Return non-zero if error, zero if success.
6092 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6093 Add __data.__futex field, reshuffle __data.__clock.
6094 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6096 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6097 internally. Return non-zero if error, zero if success.
6098 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6099 Add __data.__futex field, reshuffle __data.__clock.
6100 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6101 Add __data.__futex field, reshuffle __data.__clock.
6102 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6103 Increment __futex at the same time as __wakeup_seq or __total_seq.
6104 Pass address of __futex instead of address of low 32-bits of
6105 __wakeup_seq to futex syscall.
6106 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6107 Pass __futex value from before releasing internal lock
6109 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6110 Likewise. Avoid unnecessary shadowing of variables.
6111 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6112 Set __futex to 2 * __total_seq. Pass __futex value from before the
6113 unlock and __futex address instead of address of low 32-bits of
6114 __wakeup_seq to futex_requeue macro, adjust for new return value
6116 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6117 (__pthread_cond_signal): Increment __futex at the same time as
6118 __wakeup_seq or __total_seq. Pass address of __futex instead of
6119 address of low 32-bits of __wakeup_seq to futex syscall.
6120 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6121 (__pthread_cond_wait): Likewise. Pass __futex value from before
6122 releasing internal lock to FUTEX_WAIT.
6123 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6124 (__pthread_cond_timedwait): Likewise.
6125 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6126 (FUTEX_CMP_REQUEUE): Define.
6127 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6128 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6129 Pass __futex value from before the unlock and __futex address instead
6130 of address of low 32-bits of __wakeup_seq to futex syscall.
6131 Fallback to FUTEX_WAKE all on any errors.
6133 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6135 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6136 Add nop to align the end of critical section.
6137 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6139 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6141 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6142 Add __broadcast_seq field.
6143 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6144 all waiters as woken with woken_seq and bump broadcast counter.
6145 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6146 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6147 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6148 Comment typo fixes. Avoid returning -ETIMEDOUT.
6150 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6153 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6154 Reported by Kaz Kojima.
6156 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6158 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6160 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6162 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6163 __broadcast_seq with bc_seq after acquiring internal lock instead of
6166 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6168 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6170 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6171 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6172 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6173 (pthread_cond_t): Add __data.__broadcast_seq field.
6174 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6175 (FRAME_SIZE): Define.
6176 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6178 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6180 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6182 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6183 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6186 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6188 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6189 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6190 Add __broadcast_seq field.
6191 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6192 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6193 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6194 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6195 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6197 all waiters as woken with woken_seq and bump broadcast counter.
6198 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6200 __broadcast_seq field.
6201 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6202 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6203 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6204 * pthread_cond_init.c: Initialize __broadcast_seq field.
6205 * Makefile (tests): Add tst-cond17 and tst-cond18.
6206 Add .NOTPARALLEL goal.
6207 * tst-cond16.c: New file. From Jakub.
6208 * tst-cond17.c: New file. From Jakub.
6209 * tst-cond18.c: New file. From Jakub.
6211 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6213 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6216 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6217 Parametrize frame size. Correct some unwind info.
6218 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6220 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6222 * tst-stack3.c: Note testing functionality beyond POSIX.
6224 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6226 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6227 Change conditional from ifdef to if.
6229 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6231 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6232 SYSDEP_CANCEL_ERROR): Define.
6235 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6237 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6239 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6241 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6243 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6245 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6246 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6247 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6248 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6250 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6252 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6253 thread has all signals blocked.
6255 2004-04-18 Andreas Jaeger <aj@suse.de>
6257 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6258 (SEM_VALUE_MAX): Add missing brace.
6260 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6262 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6264 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6265 * sysdeps/pthread/tst-mqueue8x.c: New test.
6266 * tst-cancel4.c: Update comment about message queues.
6268 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6269 return it_value { 0, 0 }.
6270 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6272 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6273 assertion for SIGEV_NONE.
6274 (thread_attr_compare): Compare all attributes, not just a partial
6277 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6279 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6281 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6283 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6284 Just use a plain number.
6285 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6286 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6287 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6288 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6289 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6290 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6291 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6293 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6295 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6297 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6299 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6301 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6302 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6303 of calling sigwaitinfo.
6305 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6307 * allocatestack.c (allocate_stack): Set reported_guardsize
6309 * pthread_getattr_np.c (pthread_getattr_np): Use
6310 reported_guardsize instead of guardsize.
6311 * descr.h (struct pthread): Add reported_guardsize field.
6313 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6315 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6317 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6319 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6321 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6323 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6324 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6325 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6326 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6327 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6329 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6330 (_POSIX_MESSAGE_PASSING): Define.
6331 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6332 (_POSIX_MESSAGE_PASSING): Define.
6333 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6334 (_POSIX_MESSAGE_PASSING): Define.
6336 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6338 * tst-context1.c (fct): Check whether correct stack is used.
6340 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6342 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6343 matching constraints for asm mem parameters.
6345 * tst-clock2.c (tf): Don't define unless needed.
6347 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6349 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6352 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6354 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6355 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6356 * pthreadP.h: Declare __nptl_deallocate_tsd.
6357 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6360 * Makefile (tests): Add tst-tsd5.
6361 * tst-tsd5.c: New file.
6363 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6365 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6366 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6367 is SHLIB_COMPAT check.
6368 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6369 (__pthread_attr_getaffinity_old): Likewise.
6370 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6371 (__pthread_getaffinity_old): Likewise.
6372 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6373 (__pthread_setaffinity_old): Likewise.
6375 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6377 * allocatestack.c (_make_stacks_executable): Call
6378 _dl_make_stack_executable first.
6380 2004-03-24 Roland McGrath <roland@redhat.com>
6382 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6383 constraint instead of "0".
6385 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6387 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6388 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6390 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6391 code to avoid warning.
6393 2004-03-24 Andreas Jaeger <aj@suse.de>
6395 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6396 (__pthread_attr_setaffinity_old): Remove const.
6398 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6400 * sysdeps/unix/sysv/linux/smp.h: New file.
6401 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6402 * init.c: Define __is_smp.
6403 (__pthread_initialize_minimal_internal): Call is_smp_system to
6404 initialize __is_smp.
6405 * pthreadP.h: Declare __is_smp.
6406 Define MAX_ADAPTIVE_COUNT is necessary.
6407 * pthread_mutex_init.c: Add comment regarding __spins field.
6408 * pthread_mutex_lock.c: Implement adaptive mutex type.
6409 * pthread_mutex_timedlock.c: Likewise.
6410 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6411 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6413 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6414 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6415 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6416 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6417 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6418 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6419 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6420 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6421 lll_mutex_cond_trylock.
6422 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6423 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6424 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6425 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6426 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6427 Define BUSY_WAIT_NOP.
6428 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6429 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6431 * tst-mutex5.c: Add support for testing adaptive mutexes.
6432 * tst-mutex7.c: Likewise.
6433 * tst-mutex5a.c: New file.
6434 * tst-mutex7a.c: New file.
6435 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6437 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6438 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6439 vgettimeofday call might destroy the content.
6441 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6444 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6445 No need to restrict type of ret. Make it int. Add comment.
6447 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6448 Remove unnecessary setne instruction.
6450 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6452 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6453 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6454 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6455 If realloc fails, break out of the loop.
6457 2004-03-20 Andreas Jaeger <aj@suse.de>
6459 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6460 (__pthread_setaffinity_old): Fix interface.
6461 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6462 (__pthread_getaffinity_old): Likewise.
6464 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6465 (__pthread_setaffinity_new): Remove duplicate declaration.
6467 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6469 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6470 the return value to a safe register.
6471 (CDISABLE): Set the function argument correctly.
6473 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6475 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6476 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6477 Rewrite so that only one locked memory operation per round is needed.
6478 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6479 (pthread_barrier_wait): After wakeup, release lock only when the
6480 last thread stopped using the barrier object.
6481 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6482 (__pthread_cond_wait): Don't store mutex address if the current
6483 value is ~0l. Add correct cleanup support and unwind info.
6484 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6485 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6486 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6487 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6488 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6489 Add correct cleanup support and unwind info.
6490 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6491 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6492 information for syscall wrappers.
6494 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6496 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6497 cpusetsize field, remove next.
6498 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6499 parameter for size of the CPU set.
6500 (pthread_setaffinity_np): Likewise.
6501 (pthread_attr_getaffinity_np): Likewise.
6502 (pthread_attr_setaffinity_np): Likewise.
6503 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6504 interface change, keep compatibility code.
6505 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6506 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6507 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6508 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6509 __pthread_getaffinity_np.
6510 * Versions: Add version for changed interfaces.
6511 * tst-attr3.c: Adjust test for interface change.
6512 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6513 increasing buffer sizes.
6514 * pthread_attr_destroy.c: Remove unused list handling.
6515 * pthread_attr_init.c: Likewise.
6517 2004-03-17 Roland McGrath <roland@redhat.com>
6519 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6520 first argument to clock_getres so we ever enable kernel timers.
6522 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6524 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6526 2004-03-12 Richard Henderson <rth@redhat.com>
6528 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6529 oldvalue from CENABLE to CDISABLE.
6531 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6533 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6534 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6535 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6536 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6538 2004-03-11 Richard Henderson <rth@redhat.com>
6540 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6541 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6542 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6544 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6546 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6547 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6548 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6550 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6552 * forward.c (__pthread_cond_broadcast_2_0,
6553 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6554 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6555 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6557 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6559 * sysdeps/sh/tcb-offsets.sym: Add PID.
6560 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6561 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6563 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6565 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6566 include <sysdep-cancel.h>, vfork is no cancellation point.
6567 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6568 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6569 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6571 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6573 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6575 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6576 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6578 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6580 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6581 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6582 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6583 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6584 of DO_CALL_VIA_BREAK. Work around a gas problem.
6586 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6587 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6588 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6589 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6590 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6591 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6593 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6594 a local register for saving old PID. Negate PID in parent upon exit.
6596 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6598 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6599 before syscall, set to the old value in the parent afterwards.
6600 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6601 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6603 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6604 before syscall, set to the old value in the parent afterwards.
6605 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6606 * sysdeps/s390/tcb-offsets.sym: Add PID.
6608 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6609 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6610 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6611 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6612 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6613 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6615 2004-03-10 Andreas Schwab <schwab@suse.de>
6617 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6618 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6619 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6621 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6623 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6624 * tst-cancel21.c (do_one_test): Likewise.
6625 Reported by Gordon Jin <gordon.jin@intel.com>.
6627 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6629 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6630 if non-zero and set to INT_MIN if zero.
6631 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6632 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6633 (SAVE_PID, RESTORE_PID): Define.
6635 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6636 Use relative path to avoid including NPTL i386/vfork.S.
6637 (SAVE_PID, RESTORE_PID): Define.
6638 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6639 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6640 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6642 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6643 * tst-vfork1.c: New test.
6644 * tst-vfork2.c: New test.
6645 * tst-vfork1x.c: New test.
6646 * tst-vfork2x.c: New test.
6648 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6650 * sysdeps/i386/tcb-offsets.sym: Add PID.
6651 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6652 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6653 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6655 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6657 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6659 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6661 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6664 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6666 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6669 * tst-once4.c: Remove unnecessary macro definition.
6671 * tst-mutex7.c (do_test): Limit thread stack size.
6672 * tst-once2.c (do_test): Likewise.
6673 * tst-tls3.c (do_test): Likewise.
6674 * tst-tls1.c (do_test): Likewise.
6675 * tst-signal3.c (do_test): Likewise.
6676 * tst-kill6.c (do_test): Likewise.
6677 * tst-key4.c (do_test): Likewise.
6678 * tst-join4.c (do_test): Likewise.
6679 * tst-fork1.c (do_test): Likewise.
6680 * tst-context1.c (do_test): Likewise.
6681 * tst-cond2.c (do_test): Likewise.
6682 * tst-cond10.c (do_test): Likewise.
6683 * tst-clock2.c (do_test): Likewise.
6684 * tst-cancel10.c (do_test): Likewise.
6685 * tst-basic2.c (do_test): Likewise.
6686 * tst-barrier4.c (do_test): Likewise.
6688 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6690 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6692 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6694 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6695 (__pthread_cond_timedwait): Optimize wakeup test.
6696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6697 (__pthread_cond_wait): Likewise.
6698 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6699 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6702 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6704 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6705 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6706 the atomic instruction needed.
6707 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6708 (__lll_mutex_lock_wait): Likewise.
6710 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6712 * Makefile (tests): Add tst-cond14 and tst-cond15.
6713 * tst-cond14.c: New file.
6714 * tst-cond15.c: New file.
6716 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6718 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6719 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6720 needs to be implemented differently to be useful.
6722 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6724 * pthread_attr_setschedparam.c: Don't test priority against limits
6725 here. Set ATTR_FLAG_SCHED_SET flag.
6726 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6727 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6728 from parent thread to child. If attribute is used and scheduling
6729 parameters are not inherited, copy parameters from attribute or
6730 compute them. Check priority value.
6731 * pthread_getschedparam.c: If the parameters aren't known yet get
6732 them from the kernel.
6733 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6734 ATTR_FLAG_POLICY_SET flag for thread.
6735 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6736 and ATTR_FLAG_POLICY_SET.
6738 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6740 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6741 fail if stack address hasn't been set. Just return 0.
6743 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6745 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6746 libpthread for the files in this list.
6747 (CFLAGS-tst-unload): Removed.
6748 * tst-unload.c (do_test): Don't use complete path for
6751 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6754 2004-02-22 Ulrich Drepper <drepper@redhat.com>
6756 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6757 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6758 operation per round is needed.
6759 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6760 (__lll_mutex_lock_wait): Likewise.
6762 2004-02-20 Ulrich Drepper <drepper@redhat.com>
6764 * tst-cancel9.c (cleanup): Don't print to stderr.
6766 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6768 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6770 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6772 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6773 (__syscall_error_handler2): Call CDISABLE.
6774 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6775 (__syscall_error_handler2): Call CDISABLE.
6777 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6778 Release lock before the loop, don't reacquire it.
6780 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6782 2004-02-19 Andreas Schwab <schwab@suse.de>
6784 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6787 2004-02-18 Ulrich Drepper <drepper@redhat.com>
6789 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6790 (pthread_barrier_wait): After wakeup, release lock only when the
6791 last thread stopped using the barrier object.
6792 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6793 (pthread_barrier_wait): Likewise.
6794 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6796 * Makefile (tests): Add tst-barrier4.
6797 * tst-barrier4.c: New file.
6799 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6800 (__pthread_cond_timedwait): Perform timeout test while holding
6801 internal lock to prevent wakeup race.
6802 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6803 * sysdeps/pthread/pthread_cond_timedwait.c
6804 (__pthread_cond_timedwait): Likewise.
6805 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6806 (__pthread_cond_timedwait): Likewise.
6808 2004-02-18 Jakub Jelinek <jakub@redhat.com>
6810 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6811 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6812 * Makefile (tests): Add tst-rwlock13.
6813 * tst-rwlock13.c: New test.
6815 2004-02-16 Ulrich Drepper <drepper@redhat.com>
6817 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6818 (__condvar_tw_cleanup): Little optimization.
6819 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6821 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6823 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6824 libpthread as "lib" parameter to SHLIB_COMPAT.
6825 (__novmx_siglongjmp): Fix typo in function name.
6826 (__novmx_longjmp): Fix typo in function name.
6828 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6830 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6833 * sysdeps/generic/pt-longjmp.c: Moved to...
6834 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
6836 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
6838 * Makefile (libpthread-routines): Add pt-cleanup.
6839 * pt-longjmp.c: Removed.
6840 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6841 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6842 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6843 Version longjmp, siglongjmp for GLIBC_2.3.4.
6844 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6846 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6848 * sysdeps/pthread/pthread_cond_timedwait.c
6849 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6850 Reuse code. Add __builtin_expects.
6852 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6853 (__pthread_cond_timedwait): Get internal lock in case timeout has
6854 passed before the futex syscall.
6855 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6857 2004-01-20 Ulrich Drepper <drepper@redhat.com>
6859 * allocatestack.c: Pretty printing.
6861 * sysdeps/pthread/createthread.c (create_thread): Don't add
6862 CLONE_DETACHED bit if it is not necessary.
6864 2004-01-16 Ulrich Drepper <drepper@redhat.com>
6866 * pthread_getattr_np.c: Include ldsodefs.h.
6868 2004-01-16 Richard Henderson <rth@redhat.com>
6870 * allocatestack.c: Don't declare __libc_stack_end.
6871 * init.c (__pthread_initialize_minimal_internal): Likewise.
6872 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6874 2004-01-15 Richard Henderson <rth@redhat.com>
6876 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6877 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6878 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6879 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6880 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6881 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6882 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6883 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6885 2004-01-14 Ulrich Drepper <drepper@redhat.com>
6887 * init.c (pthread_functions): Make array const.
6889 2004-01-13 Ulrich Drepper <drepper@redhat.com>
6891 * allocatestack.c (__make_stacks_executable): Change interface.
6892 Check parameters. Pass parameter on to libc counterpart.
6893 * pthreadP.h: Change declaration.
6895 2004-01-13 Richard Henderson <rth@redhat.com>
6897 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6899 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6902 * sysdeps/alpha/Makefile: New file.
6903 * sysdeps/alpha/tcb-offsets.sym: New file.
6904 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6905 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6907 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6910 2004-01-08 Jakub Jelinek <jakub@redhat.com>
6912 * Makefile (tests): Add tst-backtrace1.
6913 * tst-backtrace1.c: New test.
6915 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6917 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6918 register as second parameter to the REGISTER macro.
6919 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6920 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6921 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6922 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6923 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6924 of thread register as second parameter to REGISTER macro in 64 case.
6926 2004-01-03 Ulrich Drepper <drepper@redhat.com>
6928 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6929 (CFLAGS-getpid.o): Defined.
6930 (CFLAGS-getpid.os): Defined.
6932 2003-12-31 Ulrich Drepper <drepper@redhat.com>
6934 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6935 returned for main thread does not overlap with any other VMA.
6936 Patch by Jakub Jelinek.
6938 2003-12-29 Jakub Jelinek <jakub@redhat.com>
6940 * tst-raise1.c: Include stdio.h.
6942 2003-12-23 Jakub Jelinek <jakub@redhat.com>
6944 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6945 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6946 If pid is 0, set it to selftid.
6947 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6948 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6949 != 0, return self->tid without doing a syscall.
6950 * descr.h (struct pthread): Move pid field after tid.
6952 * Makefile (tests): Add tst-raise1.
6953 * tst-raise1.c: New file.
6955 2003-12-23 Roland McGrath <roland@redhat.com>
6957 * tst-oddstacklimit.c: New file.
6958 * Makefile (tests): Add it.
6959 (tst-oddstacklimit-ENV): New variable.
6961 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6962 value up to page size for __default_stacksize.
6964 2003-12-21 Ulrich Drepper <drepper@redhat.com>
6966 * Makefile (tests): Add tst-eintr5.
6967 * tst-eintr5.c: New file.
6969 * eintr.c (eintr_source): Prevent sending signal to self.
6971 * tst-eintr2.c (tf1): Improve error message.
6973 2003-12-20 Ulrich Drepper <drepper@redhat.com>
6975 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6976 * sysdeps/unix/sysv/linux/getpid.c: New file.
6977 * pthread_cancel.c: Add comment explaining use of PID field.
6978 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6979 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6980 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6981 temporarily to signal the field must not be relied on and updated
6983 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6984 temporarily negative.
6985 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6987 2003-12-19 Ulrich Drepper <drepper@redhat.com>
6989 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6990 (eintr_source): If ARG != NULL, use pthread_kill.
6991 * tst-eintr1.c: Adjust for this change.
6992 * tst-eintr2.c: Likewise.
6993 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6994 * tst-eintr3.c: New file.
6995 * tst-eintr4.c: New file.
6997 2003-12-19 Jakub Jelinek <jakub@redhat.com>
6999 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7000 if CANCELSTATE_BITMASK is set.
7001 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7004 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7005 (tests-reverse): Add tst-cancel23.
7006 * tst-cancel22.c: New test.
7007 * tst-cancel23.c: New test.
7009 2003-12-18 Ulrich Drepper <drepper@redhat.com>
7011 * tst-eintr1.c: Better error messages.
7013 * Makefile (tests): Add tst-eintr2.
7014 * tst-eintr2.c: New file.
7016 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7018 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7019 (CFLAGS-tst-cancelx21.c): Set.
7020 * tst-cancel21.c: New test.
7021 * tst-cancelx21.c: New test.
7023 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7025 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7026 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7027 * pt-longjmp.c: Include jmpbuf-unwind.h.
7028 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7029 _JMPBUF_UNWINDS. Adjust compared pointers.
7030 * init.c (__pthread_initialize_minimal_internal): Initialize
7031 pd->stackblock_size.
7032 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7033 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7034 * sysdeps/i386/jmpbuf-unwind.h: New file.
7035 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7036 * sysdeps/s390/jmpbuf-unwind.h: New file.
7037 * sysdeps/sh/jmpbuf-unwind.h: New file.
7038 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7039 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7040 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7041 (_JMPBUF_CFA_UNWINDS): Remove.
7042 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7044 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7046 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7047 (CFLAGS-tst-cancelx20.c): Set.
7048 * tst-cancel20.c: New test.
7049 * tst-cancelx20.c: New test.
7051 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7053 * init.c (__pthread_initialize_minimal_internal): Don't treat
7054 architectures with separate register stack special here when
7055 computing default stack size.
7057 2003-12-17 Roland McGrath <roland@redhat.com>
7059 * Makefile (tst-cancelx7-ARGS): New variable.
7060 Reportd by Greg Schafer <gschafer@zip.com.au>.
7062 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7064 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7065 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7066 (tst-stack3-ENV): Set.
7067 ($(objpfx)tst-stack3-mem): New.
7068 * tst-stack3.c: New test.
7070 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7072 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7073 Add unwind directives. Drop unused .regstk directive.
7074 (_fini_EPILOG_BEGINS): Add unwind directives.
7076 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7078 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7079 Assume parameter is a pointer.
7080 (lll_futex_wake): Likewise.
7081 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7083 (lll_futex_wake): Likewise.
7084 Reported by Boris Hu.
7085 * sysdeps/unix/sysv/linux/unregister-atfork.c
7086 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7088 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7090 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7092 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7093 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7094 __rtld_lock_initialize for ld.so lock.
7095 Patch in part by Adam Li <adam.li@intel.com>.
7097 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7099 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7100 in $(gnulib). Also, remove stale comment.
7102 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7104 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7105 advantage of new syscall stub and optimize accordingly.
7107 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7108 from SYS_futex, to match expectations of
7109 sysdep.h:DO_INLINE_SYSCALL.
7110 (lll_futex_clobbers): Remove.
7111 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7112 (lll_futex_wake): Likewise.
7113 (lll_futex_requeue): Likewise.
7114 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7115 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7117 (__lll_mutex_lock): Likewise.
7118 (__lll_mutex_cond_lock): Likewise.
7119 (__lll_mutex_timed_lock): Likewise.
7120 (__lll_mutex_unlock): Likewise.
7121 (__lll_mutex_unlock_force): Likewise.
7123 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7124 comes before the include of <sysdep.h>.
7125 (THREAD_SELF_SYSINFO): New macro.
7126 (THREAD_SYSINFO): Likewise.
7127 (INIT_SYSINFO): New macro.
7128 (TLS_INIT_TP): Call INIT_SYSINFO.
7130 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7132 * sysdeps/pthread/createthread.c (create_thread): Use
7133 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7134 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7135 THREAD_SELF_SYSINFO instead of open code.
7136 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7137 (THREAD_SYSINFO): Likewise.
7139 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7141 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7143 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7145 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7146 instead of .init. Patch by David Mosberger.
7148 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7150 * sysdeps/pthread/configure.in: Remove broken declaration in C
7151 cleanup handling check.
7153 2003-11-30 Andreas Jaeger <aj@suse.de>
7155 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7156 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7159 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7161 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7162 * pthread_attr_destroy.c: Include shlib-compat.h.
7163 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7164 is set in iattr->flags.
7165 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7167 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7169 * Makefile (distribute): Add tst-cleanup4aux.c.
7171 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7174 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7176 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7177 pthread_cond_signal.
7179 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7180 store mutex address if the current value is ~0l.
7181 * sysdeps/pthread/pthread_cond_timedwait.c
7182 (__pthread_cond_timedwait): Likewise.
7183 * sysdeps/pthread/pthread_cond_broadcast.c
7184 (__pthread_cond_broadcast): Don't use requeue for pshared
7187 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7188 (__pthread_cond_wait): Don't store mutex address if the current
7190 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7191 (__pthread_cond_timedwait): Likewise.
7192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7193 (__pthread_cond_broadcast): Don't use requeue for pshared
7196 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7197 element with ~0l for pshared condvars, with NULL otherwise.
7199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7200 (__pthread_cond_wait): Don't store mutex address if the current
7202 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7203 (__pthread_cond_timedwait): Likewise.
7204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7205 (__pthread_cond_broadcast): Don't use requeue for pshared
7208 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7209 * tst-cond12.c: New file.
7210 * tst-cond13.c: New file.
7212 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7214 * sysdeps/pthread/configure.in: Make missing forced unwind support
7217 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7219 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7221 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7223 * Makefile: Add magic to clean up correctly.
7225 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7227 * unwind.c (FRAME_LEFT): Define.
7228 (unwind_stop): Handle old style cleanups here.
7229 (__pthread_unwind): Handle old style cleanups only if
7230 !HAVE_FORCED_UNWIND.
7231 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7232 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7233 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7234 ($(objpfx)tst-cleanupx4): Likewise.
7235 * tst-cleanup4.c: New test.
7236 * tst-cleanup4aux.c: New.
7237 * tst-cleanupx4.c: New test.
7239 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7241 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7242 lll_mutex_*lock macros to skip atomic operations on some archs.
7244 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7246 * sysdeps/pthread/tst-timer.c (main): Initialize
7247 sigev2.sigev_value as well.
7249 2003-10-15 Roland McGrath <roland@redhat.com>
7251 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7253 * sysdeps/pthread/configure: Regenerated.
7255 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7257 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7258 locking macros. No distinction between normal and mutex locking
7260 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7261 Merge bits from lowlevelmutex.S we still need.
7262 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7263 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7264 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7265 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7266 new mutex implementation.
7267 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7268 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7269 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7270 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7271 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7272 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7273 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7274 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7275 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7276 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7277 symbol for entry point to avoid cancellation.
7279 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7281 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7283 (SAVE_OLDTYPE_0): Fix a typo.
7285 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7287 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7288 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7290 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7292 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7295 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7297 * Makefile (tests): Add tst-cancel19.
7298 * tst-cancel19.c: New test.
7300 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7302 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7303 restoring of the old cancellation type.
7305 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7307 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7309 2003-09-27 Wolfram Gloger <wg@malloc.de>
7311 * sysdeps/pthread/malloc-machine.h: New file
7313 2003-09-24 Roland McGrath <roland@redhat.com>
7315 * allocatestack.c (__make_stacks_executable): Don't ignore return
7316 value from _dl_make_stack_executable.
7318 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7320 * allocatestack.c (__make_stacks_executable): Also change
7321 permission of the currently unused stacks.
7323 * allocatestack.c (change_stack_perm): Split out from
7324 __make_stacks_executable.
7325 (allocate_stack): If the required permission changed between the time
7326 we started preparing the stack and queueing it, change the permission.
7327 (__make_stacks_executable): Call change_stack_perm.
7329 * Makefile: Build tst-execstack-mod locally.
7330 * tst-execstack-mod.c: New file.
7332 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7334 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7336 2003-09-23 Roland McGrath <roland@redhat.com>
7338 * tst-execstack.c: New file.
7339 * Makefile (tests): Add it.
7340 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7341 (LDFLAGS-tst-execstack): New variable.
7343 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7344 whether to use PROT_EXEC for stack mmap.
7345 (__make_stacks_executable): New function.
7346 * pthreadP.h: Declare it.
7347 * init.c (__pthread_initialize_minimal_internal): Set
7348 GL(dl_make_stack_executable_hook) to that.
7350 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7352 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7353 recommendation from AMD re avoidance of lock prefix.
7355 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7357 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7358 lll_futex_timed_wait instead of lll_futex_wait.
7359 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7360 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7361 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7362 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7363 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7364 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7365 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7366 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7367 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7368 Completely revamp the locking macros. No distinction between
7369 normal and mutex locking anymore.
7370 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7371 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7372 __lll_lock_timedwait): Fix prototypes.
7373 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7374 __lll_lock_timedwait): Likewise.
7375 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7376 macros, add __builtin_expect.
7377 (lll_mutex_timedlock): Likewise. Fix return value.
7378 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7379 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7380 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7381 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7382 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7383 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7384 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7385 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7387 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7389 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7390 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7391 operation if possible.
7393 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7394 like jumping over the lock prefix.
7396 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7398 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7399 locking macros. No distinction between normal and mutex locking
7401 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7402 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7403 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7404 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7405 locking. Merge bits from lowlevelmutex.S we still need.
7406 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7407 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7408 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7409 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7410 * Makefile (routines): Remove libc-lowlevelmutex.
7411 (libpthread-rountines): Remove lowlevelmutex.
7412 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7413 for new mutex implementation.
7414 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7416 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7417 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7418 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7420 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7422 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7423 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7424 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7425 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7426 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7427 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7428 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7429 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7431 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7433 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7434 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7435 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7437 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7438 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7440 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7442 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7443 in parameters of asm with output parameters.
7445 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7446 type of DECR parameter to int.
7447 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7449 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7451 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7452 guardsize for each thread.
7454 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7456 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7457 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7458 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7460 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7461 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7463 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7464 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7465 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7466 (pthread_getaffinity_np): Add hidden_def.
7468 * Makefile (tests): Add tst-attr3.
7469 * tst-attr3.c: New test.
7471 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7473 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7475 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7476 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7478 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7480 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7481 * tst-align.c: Include tst-stack-align.h.
7482 (tf, do_test): Use TEST_STACK_ALIGN macro.
7484 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7486 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7489 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7491 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7492 stack-related values for the initial thread.
7494 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7496 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7498 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7500 * pthread_mutex_lock.c: Minor code rearrangements.
7502 2003-09-05 Roland McGrath <roland@redhat.com>
7504 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7505 Instead, include ../nptl_db/db_info.c to do its magic.
7506 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7507 (__pthread_pthread_key_2ndlevel_size): Likewise.
7508 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7509 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7510 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7511 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7512 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7513 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7514 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7515 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7516 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7517 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7518 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7519 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7520 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7521 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7522 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7523 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7524 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7526 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7528 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7529 of pthread_t to be compatible with LT.
7530 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7531 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7532 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7533 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7534 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7535 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7536 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7538 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7540 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7542 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7544 * unwind-forcedunwind.c: Move to...
7545 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7546 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7547 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7548 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7549 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7550 * unwind.c: Include jmpbuf-unwind.h.
7551 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7553 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7555 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7556 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7557 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7558 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7559 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7560 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7561 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7562 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7563 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7564 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7565 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7567 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7568 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7569 * Makefile (tests): Add tst-stack2.
7570 * tst-stack2.c: New test.
7571 * tst-stack1.c: Include limits.h and sys/param.h.
7572 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7574 * pthread_condattr_setpshared.c: Include errno.h.
7575 (pthread_condattr_setpshared): Return EINVAL if pshared
7576 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7578 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7579 defined symbol for entry point to avoid cancellation.
7580 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7582 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7584 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7586 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7588 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7590 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7591 __close_nocancel, __read_nocancel, __write_nocancel,
7592 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7593 libpthread.so or librt.so, define to corresponding function
7594 without _nocancel suffix.
7595 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7596 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7597 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7599 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7601 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7603 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7604 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7606 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7607 in subsections has a symbol associated with it.
7609 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7610 defined symbol for entry point to avoid cancellation.
7611 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7613 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7615 * Makefile (tests): Add tst-tls5.
7616 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7617 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7618 ($(objpfx)tst-tls5): New.
7619 ($(objpfx)tst-tls6.out): Likewise.
7620 (tests): Depend on $(objpfx)tst-tls6.out.
7621 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7622 (do_test): Check pthread_self () return value alignment.
7623 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7624 (tf): Check pthread_self () return value alignment.
7625 * tst-tls5.c: New test.
7627 * tst-tls5mod.c: New.
7628 * tst-tls5moda.c: New.
7629 * tst-tls5modb.c: New.
7630 * tst-tls5modc.c: New.
7631 * tst-tls5modd.c: New.
7632 * tst-tls5mode.c: New.
7633 * tst-tls5modf.c: New.
7634 * tst-tls6.sh: New test.
7636 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7637 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7638 * init.c (pthread_functions): Initialize them.
7639 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7640 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7641 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7642 pthread_cond_timedwait@@GLIBC_2.3.2.
7644 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7646 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7647 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7648 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7649 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7650 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7651 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7653 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7655 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7656 _POSIX_THREAD_PRIORITY_SCHEDULING.
7657 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7659 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7661 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7662 nested function, use static inline function from libio.h.
7663 Code by Richard Henderson.
7665 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7668 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7670 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7671 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7672 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7673 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7674 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7675 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7676 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7677 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7678 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7679 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7680 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7681 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7682 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7683 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7684 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7685 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7686 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7687 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7688 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7689 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7690 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7691 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7692 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7693 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7694 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7695 * sysdeps/sparc/tls.h: New file.
7696 * sysdeps/sparc/tcb-offsets.sym: New file.
7697 * sysdeps/sparc/Makefile: New file.
7698 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7699 * init.c [__sparc__] (__NR_set_tid_address): Define.
7701 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7703 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7704 _IO_release_lock): Define.
7706 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7708 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7709 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7711 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7713 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7714 (__pthread_cleanup_class): Add missing return types of member
7717 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7719 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7720 (lll_mutex_unlock_force): Add memory barrier between store and futex
7723 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7725 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7726 tempmsg in first loop.
7728 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7730 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7731 _POSIX_THREAD_PRIORITY_SCHEDULING.
7732 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7734 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7736 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7737 (__rtld_lock_default_lock_recursive,
7738 __rtld_lock_default_unlock_recursive): Define.
7739 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7740 __rtld_lock_unlock_recursive): Define using
7741 GL(_dl_rtld_*lock_recursive).
7742 * init.c (__pthread_initialize_minimal_internal): Initialize
7743 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7744 Lock GL(_dl_load_lock) the same number of times as
7745 GL(_dl_load_lock) using non-mt implementation was nested.
7747 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7748 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7750 2003-08-06 Jakub Jelinek <jakub@redhat.com>
7752 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7755 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7757 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7759 2003-08-03 Jakub Jelinek <jakub@redhat.com>
7761 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7762 to first syscall error check. Move syscall error check for tkill
7763 into __ASSUME_CLONE_STOPPED #ifdef.
7765 2003-08-02 Ulrich Drepper <drepper@redhat.com>
7767 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7768 is not defined, do explicit synchronization.
7769 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7770 is not defined also unlock pd->lock for non-debugging case in case
7772 * pthread_create.c (start_thread): Always get and release pd->lock
7773 if __ASSUME_CLONE_STOPPED is not defined.
7774 (start_thread_debug): Removed. Adjust users.
7775 * allocatestack.c (allocate_stack): Always initialize lock if
7776 __ASSUME_CLONE_STOPPED is not defined.
7777 * Makefile (tests): Add tst-sched1.
7778 * tst-sched1.c: New file.
7780 * sysdeps/pthread/createthread.c (do_clone): Only use
7781 sched_setschduler and pass correct parameters.
7783 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7785 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7786 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7787 PTHREAD_STACK_MIN in comments.
7789 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7791 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7792 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7794 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7795 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7796 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7797 (__pthread_cleanup_upto): Fix prototype.
7798 (_longjmp_unwind): Adjust caller.
7799 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7800 Change second argument to const struct pointer.
7801 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7802 * tst-sem9.c (main): Likewise.
7803 * unwind.c: Include string.h for strlen prototype.
7805 2003-07-31 Ulrich Drepper <drepper@redhat.com>
7807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7808 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7809 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7811 Patch by Nicholas Miell <nmiell@attbi.com>.
7813 2003-07-30 Jakub Jelinek <jakub@redhat.com>
7815 * init.c (__pthread_initialize_minimal_internal): Initialize
7816 GL(dl_init_static_tls).
7817 * pthreadP.h (__pthread_init_static_tls): New prototype.
7818 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7820 * Makefile (tests): Add tst-tls4.
7821 (modules-names): Add tst-tls4moda and tst-tls4modb.
7822 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7823 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7825 * tst-tls4.c: New file.
7826 * tst-tls4moda.c: New file.
7827 * tst-tls4modb.c: New file.
7829 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
7831 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7832 before __timer_dealloc.
7833 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7834 Don't call list_unlink.
7836 2003-07-29 Roland McGrath <roland@redhat.com>
7838 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7840 2003-07-25 Jakub Jelinek <jakub@redhat.com>
7842 * tst-cancel17.c (do_test): Check if aio_cancel failed.
7843 Don't reuse struct aiocb A if it failed.
7844 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7845 not just one byte, as that does not block.
7847 2003-07-22 Jakub Jelinek <jakub@redhat.com>
7849 * sysdeps/pthread/unwind-resume.c: New file.
7850 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7851 unwind-resume in csu subdir.
7852 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7854 (librt-sysdep_routines, librt-shared-only-routines): Add
7856 * sysdeps/pthread/rt-unwind-resume.c: New file.
7857 * unwind-forcedunwind.c: New file.
7858 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7859 (libpthread-shared-only-routines): Likewise.
7860 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7861 * pthreadP.h (pthread_cancel_init): New prototype.
7862 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7864 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7865 attr argument const struct pthread_attr *.
7867 * res.c (__res_state): Return __resp.
7868 * descr.h: Include resolv.h.
7869 (struct pthread): Add res field.
7870 * pthread_create.c: Include resolv.h.
7871 (start_thread): Initialize __resp.
7872 * Makefile (tests): Add tst-_res1.
7873 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7874 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7875 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7877 * tst-_res1.c: New file.
7878 * tst-_res1mod1.c: New file.
7879 * tst-_res1mod2.c: New file.
7881 2003-07-21 Ulrich Drepper <drepper@redhat.com>
7883 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7885 * Makefile: Define various *-no-z-defs variables for test DSOs
7886 which has undefined symbols.
7888 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7890 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7891 Retry if the stwcx fails to store once_control.
7893 2003-07-20 Ulrich Drepper <drepper@redhat.com>
7895 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7896 pthread_attr_setaffinity.
7897 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7898 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7899 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7900 * pthread_attr_destroy.c: Free cpuset element if allocated.
7901 * pthread_create.c: Pass iattr as additional parameter to
7903 * sysdeps/pthread/createthread.c: If attribute is provided and
7904 a new thread is created with affinity set or scheduling parameters,
7905 start thread with CLONE_STOPPED.
7906 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7907 pthread_attr_setaffinity.
7908 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7911 2003-07-15 Ulrich Drepper <drepper@redhat.com>
7913 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7915 2003-07-14 Ulrich Drepper <drepper@redhat.com>
7917 * sysdeps/pthread/configure.in: Require CFI directives also for
7920 2003-07-15 Jakub Jelinek <jakub@redhat.com>
7922 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7925 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7927 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7929 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7930 registers as variables. Call __pthread_mutex_unlock_usercnt.
7931 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7932 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7933 not self pointer in __writer. Compare with TID to determine
7935 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7936 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7938 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7940 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7941 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7942 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7943 macros also when compiling librt.
7945 2003-07-11 Jakub Jelinek <jakub@redhat.com>
7947 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7948 -fasynchronous-unwind-tables.
7949 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7950 (PSEUDO): Add cfi directives.
7951 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7953 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7956 2003-07-08 Jakub Jelinek <jakub@redhat.com>
7958 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7959 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7960 * unwind.c (__pthread_unwind_next): Add hidden_def.
7961 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7963 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7964 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7965 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7967 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7968 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7970 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7971 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7972 __pthread_unregister_cancel and __pthread_unwind_next.
7974 2003-07-04 Jakub Jelinek <jakub@redhat.com>
7976 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7977 different symbol for the cancellation syscall wrapper and
7978 non-cancellation syscall wrapper.
7979 (PSEUDO_END): Define.
7981 2003-07-05 Richard Henderson <rth@redhat.com>
7983 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7984 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7985 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7986 return actual return value from the syscall, not 0.
7988 2003-07-07 Ulrich Drepper <drepper@redhat.com>
7990 * descr.h (struct pthread): Add pid field.
7991 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7992 (__reclaim_stacks): Likewise.
7993 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7994 also check for PID of the signal source.
7995 (__pthread_initialize_minimal_internal): Also initialize pid field
7996 of initial thread's descriptor.
7997 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7998 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7999 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8000 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8001 * sysdeps/unix/sysv/linux/raise.c: Likewise.
8003 2003-07-05 Ulrich Drepper <drepper@redhat.com>
8005 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8006 Fix use of parameter.
8007 (__libc_cleanup_pop): Likewise.
8009 2003-07-04 Ulrich Drepper <drepper@redhat.com>
8011 * init.c (sigcancel_handler): Change parameters to match handler
8012 for SA_SIGACTION. Check signal number and code to recognize
8013 invalid invocations.
8015 2003-07-03 Roland McGrath <roland@redhat.com>
8017 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8018 Apply sizeof (struct pthread) bias to r13 value.
8020 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8022 * sysdeps/pthread/configure.in: Require CFI directives.
8024 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8026 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8027 libpthread compilation.
8028 * unwind.c (__pthread_unwind): Add hidden_def.
8029 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8031 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8033 * libc-cancellation.c (__libc_cleanup_routine): Define.
8034 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8035 (__pthread_cleanup_pop): Define.
8037 2003-07-01 Richard Henderson <rth@redhat.com>
8039 * sysdeps/alpha/elf/pt-initfini.c: New file.
8040 * sysdeps/alpha/pthread_spin_lock.S: New file.
8041 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8042 * sysdeps/alpha/pthreaddef.h: New file.
8043 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8044 * sysdeps/alpha/tls.h: New file.
8045 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8046 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8047 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8048 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8049 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8050 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8051 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8052 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8053 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8054 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8056 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8058 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8059 cleanup support and unwind info.
8061 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8063 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8064 Use correct cleanup handler registration. Add unwind info.
8065 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8066 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8067 * tst-once3.c: Add cleanup handler and check it is called.
8068 * tst-once4.c: Likewise.
8069 * tst-oncex3.c: New file.
8070 * tst-oncex4.c: New file.
8071 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8073 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8075 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8077 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8079 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8080 (tf_msgsnd): Likewise.
8082 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8083 premature returns a bit more.
8085 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8087 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8088 definition to the front.
8090 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8091 the cleanup functions to make the names unique. Fix dwarf opcode
8093 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8094 functions to make the names unique. Fix CFA offset for two blocks.
8096 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8098 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8099 missing closing braces.
8100 Patch by Christophe Saout <christophe@saout.de>.
8102 2003-06-24 Roland McGrath <roland@redhat.com>
8104 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8106 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8108 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8109 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8111 * pthreadP.h: Declare __find_thread_by_id.
8112 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8113 * pthread_clock_gettime.c: Allow using other thread's clock.
8114 * pthread_clock_settime.c: Likewise.
8115 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8116 * Makefile: Add rules to build and run tst-clock2.
8117 * tst-clock2.c: New file.
8119 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8121 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8122 to use exception-based cleanup handler.
8123 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8125 * tst-cond8.c (ch): Announce that we are done.
8127 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8129 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8130 Also test aio_suspend with timeout value.
8132 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8134 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8135 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8138 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8139 (__pthread_mutex_lock_internal): Likewise.
8140 (__pthread_mutex_unlock_internal): Likewise.
8141 (__pthread_mutex_unlock_usercnt): Declare.
8142 * pthread_mutex_destroy.c: Always fail if used in any way.
8143 * pthread_mutex_init.c: Update comment.
8144 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8145 * pthread_mutex_timedlock.c: Adjust __nusers.
8146 * pthread_mutex_trylock.c: Adjust __nusers.
8147 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8148 and public interfaces are wrapper with pass additional parameter.
8149 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8151 * tst-mutex8.c: New file.
8152 * Makefile (tests): Add tst-mutex8.
8153 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8154 __pthread_mutex_unlock_usercnt.
8155 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8156 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8157 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8158 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8159 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8160 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8161 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8163 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8164 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8165 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8166 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8167 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8169 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8170 * pthread_mutex_timedlock.c: Likewise.
8171 * pthread_mutex_trylock.c: Adjust __nusers.
8172 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8173 * tst-mutex9.c: New file.
8174 * Makefile (tests): Add tst-mutex9.
8175 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8176 * sysdeps/ia64/tls.h: Likewise.
8177 * sysdeps/powerpc/tls.h: Likewise.
8178 * sysdeps/s390/tls.h: Likewise.
8179 * sysdeps/sh/tls.h: Likewise.
8180 * sysdeps/x86_64/tls.h: Likewise.
8181 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8182 Change type of __owner.
8183 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8184 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8185 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8186 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8187 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8189 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8191 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8192 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8194 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8195 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8196 instead of nr to lll_futex_wake. Only set errno and return -1
8199 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8200 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8201 return actual return value from the syscall, not 0.
8203 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8205 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8206 find a random value.
8207 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8210 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8211 compat_timer_settime.
8212 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8213 compat_timer_gettime.
8214 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8215 compat_timer_getoverrun.
8216 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8217 compat_timer_delete.
8219 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8220 error-checking mutex detect busy mutexes.
8222 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8224 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8225 Add ax to clobber list.
8226 (lll_mutex_cond_lock): Likewise.
8227 (lll_mutex_unlock): Likewise.
8228 (lll_lock): Likewise.
8229 (lll_unlock): Likewise.
8231 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8232 * tst-cancel18.c: New file.
8233 * tst-cancelx18.c: New file.
8235 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8238 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8239 * tst-cancel17.c: New file.
8240 * tst-cancelx17.c: New file.
8242 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8243 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8244 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8246 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8248 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8250 * sysdeps/pthread/createthread.c (create_thread): Set
8251 header.multiple_threads unconditionally.
8252 * allocatestack.c (allocate_stack): Likewise.
8253 * descr.h (struct pthread): Add header.multiple_threads
8255 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8256 Define for librt. #error if neither libpthread, libc nor librt.
8257 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8259 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8260 CDISABLE): Likewise.
8261 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8262 CDISABLE): Likewise.
8263 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8264 CDISABLE): Likewise.
8265 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8266 CDISABLE): Likewise. Access header.multiple_threads outside of
8267 libc and libpthread.
8268 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8270 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8271 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8273 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8275 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8276 Also test early cancellation before the thread reaches the cancellation
8279 * Makefile: Compile forward.c with exceptions.
8281 * sysdeps/unix/sysv/linux/sleep.c: New file.
8283 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8285 * Makefile: Add CFLAGS definition to compile function wrappers
8286 duplicated from libc with exceptions.
8287 * tst-cancel4.c: Also check cancellation handlers.
8289 * Makefile: Add rules to build and run tst-cancel16 and
8290 tst-cancelx16. Add missing CFLAGS definitions.
8291 * tst-cancel16.c: New file.
8292 * tst-cancelx16.c: New file.
8294 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8296 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8297 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8298 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8299 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8301 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8302 (LIBC_CANCEL_RESET): Likewise.
8303 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8304 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8306 (CFLAGS-libcrt-cancellation.c): Define.
8307 * sysdeps/pthread/librt-cancellation.c: New file.
8308 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8309 macros also when compiling librt.
8310 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8311 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8312 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8313 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8314 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8315 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8316 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8318 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8319 compat_timer_create.
8321 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8323 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8325 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8327 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8328 Add libc_hidden_def.
8330 2003-06-13 Roland McGrath <roland@redhat.com>
8332 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8333 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8335 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8337 * allocatestack.c (queue_stack): Always inline.
8338 * ptreadhP.h (__do_cancel): Likewise.
8340 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8342 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8345 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8347 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8348 (__pthread_cond_signal): Remove incorrect second addition for
8351 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8353 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8354 (__pthread_cond_signal): Use correct futex pointer in
8355 __lll_mutex_lock_wait call.
8357 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8358 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8360 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8362 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8364 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8367 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8368 hand-written CFI generation code. Since ENTRY/END also initiated
8369 CFI frames this caused two CFI sets to be generated.
8371 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8373 * cleanup_routine.c: New file.
8374 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8375 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8377 * Makefile (libpthread-routines): Add cleanup_routine.
8378 Add more CFLAGS variables to compile with exceptions. Add comments
8379 why which file needs unwind tables.
8380 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8382 * tst-cancelx1.c: New file.
8383 * tst-cancelx2.c: New file.
8384 * tst-cancelx3.c: New file.
8385 * tst-cancelx4.c: New file.
8386 * tst-cancelx5.c: New file.
8387 * tst-cancelx6.c: New file.
8388 * tst-cancelx7.c: New file.
8389 * tst-cancelx8.c: New file.
8390 * tst-cancelx9.c: New file.
8391 * tst-cancelx10.c: New file.
8392 * tst-cancelx11.c: New file.
8393 * tst-cancelx12.c: New file.
8394 * tst-cancelx13.c: New file.
8395 * tst-cancelx14.c: New file.
8396 * tst-cancelx15.c: New file.
8397 * tst-cleanupx0.c: New file.
8398 * tst-cleanupx0.expect: New file.
8399 * tst-cleanupx1.c: New file.
8400 * tst-cleanupx2.c: New file.
8401 * tst-cleanupx3.c: New file.
8403 * tst-cleanup0.c: Make standard compliant.
8404 * tst-cleanup1.c: Likewise.
8406 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8407 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8408 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8409 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8410 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8411 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8412 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8414 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8415 * tst-cancel12.c: New file.
8416 * tst-cancel13.c: New file.
8417 * tst-cancel14.c: New file.
8418 * tst-cancel15.c: New file.
8419 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8422 * tst-cancel1.c: Add some comments.
8424 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8427 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8429 * Makefile (CFLAGS-pthread_cancel.c): Define.
8431 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8433 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8434 Change type of __writer element to int.
8435 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8436 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8437 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8438 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8439 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8440 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8441 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8442 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8443 Compare with TID to determine deadlocks.
8444 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8445 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8446 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8447 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8448 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8449 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8451 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8453 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8454 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8455 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8457 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8459 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8460 * Makefile (tests): Add tst-rwlock12.
8461 * tst-rwlock12.c: New file.
8463 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8465 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8466 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8467 Remove bogus hidden_proto.
8468 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8470 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8471 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8472 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8473 ___lll_mutex_timedlock): Likewise.
8475 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8477 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8478 (__pthread_cond_signal): Add some code to eventually handle
8481 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8483 * Makefile (tests): Add tst-exec4.
8484 (tst-exec4-ARGS): Define.
8485 * tst-exec4.c: New file.
8487 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8489 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8490 Also fail if tv_nsec < 0.
8491 (__lll_timedwait_tid): Likewise.
8492 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8493 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8495 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8497 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8499 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8501 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8503 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8506 * Makefile (tests): Add tst-sem8 and tst-sem9.
8507 * tst-sem8.c: New file.
8508 * tst-sem9.c: New file.
8509 * sem_open.c: Fix creation of in_use record if the file exists but
8512 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8515 * sysdeps/pthread/timer_create.c (timer_create): In case
8516 evp==NULL, assign timer ID to sival_ptr.
8518 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8519 struct pthread_unwind_buf *.
8520 (struct pthread): Likewise for cleanup_jmp_buf element.
8522 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8523 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8524 * unwind.c (__pthread_unwind_next): Likewise.
8526 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8528 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8529 (lll_futex_timed_wait): Use int for futex value parameter.
8530 (lll_futex_wake): Likewise.
8531 (lll_futex_requeue): Likewise.
8533 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8534 Replace one memory operation with one register operation.
8536 * tst-join4.c (do_test): Fix error message.
8538 * tst-rwlock6.c (do_test): Use correct format specifier.
8540 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8541 (__lll_mutex_lock_wait): Replace one memory operation with one
8543 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8544 (__lll_mutex_lock_wait): Likewise.
8546 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8547 (__lll_mutex_cond_lock): Add one to value parameter of
8548 __lll_lock_wait to reflect reality in the futex syscall.
8549 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8550 (lll_mutex_cond_lock): Likewise.
8552 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8554 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8556 (lll_mutex_cond_lock): Define.
8558 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8560 * Makefile (tests): Add tst-signal6.
8561 * tst-signal6.c: New file.
8563 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8564 (__lll_mutex_unlock_force): New function
8565 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8567 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8568 (__lll_mutex_unlock_force): New function.
8569 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8571 * tst-rwlock7.c (do_test): Use correct format specifier.
8573 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8574 Find break parameter in correct asm argument.
8576 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8578 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8580 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8582 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8584 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8585 lll_futex_requeue, lll_mutex_unlock_force): Define.
8587 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8589 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8590 (pthread_cond_t): Add __mutex.
8591 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8592 lll_futex_requeue, lll_mutex_unlock_force): Define.
8594 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8596 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8597 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8599 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8601 (lll_futex_wait, lll_futex_wake): Define.
8602 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8603 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8604 FUTEX_REQUEUE instead of FUTEX_WAIT.
8605 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8606 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8607 mutex which was used in condvar structure. Call
8608 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8609 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8611 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8612 include tcb-offsets.h. Read wakeup value in locked region.
8613 Use the value of gbr register as THREAD_ID.
8614 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8615 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8616 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8618 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8621 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8623 * sysdeps/pthread/pthread_cond_broadcast.c
8624 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8626 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8628 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8629 typo in register name.
8630 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8631 correctly. Actually use requeue. Little optimization.
8632 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8633 mutex address early. Handle cancellation state as 32-bit value.
8634 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8635 Remove unnecessary label.
8637 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8639 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8640 instead of FUTEX_WAIT.
8641 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8642 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8643 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8644 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8645 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8646 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8647 used in condvar structure. Call __pthread_mutex_cond_lock instead
8648 of __pthread_mutex_lock_internal.
8649 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8650 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8651 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8652 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8653 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8654 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8655 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8656 Add pthread_mutex_cond_lock.
8657 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8658 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8659 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8660 lll_mutex_cond_lock.
8661 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8662 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8663 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8665 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8666 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8668 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8669 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8671 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8672 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8673 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8674 macro don't define aliases.
8676 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8677 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8678 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8679 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8680 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8681 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8682 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8683 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8684 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8686 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8688 * sem_open.c: Fix one endless loop. Implement correct semantics
8689 wrt opening the same semaphore more then once.
8690 * sem_close.c: Adjust for sem_open change.
8691 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8692 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8693 * Makefile (tests): Add tst-sem7.
8694 * tst-sem7.c: New file.
8696 2003-05-16 Roland McGrath <roland@redhat.com>
8698 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8699 uninitialized variable braino.
8701 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8703 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8704 test for syscall availability.
8706 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8707 __no_posix_timers to -1 if the syscalls don't exist.
8709 * pthread_join.c (pthread_join): Set tid field of the joined
8710 thread to -1. This isn't necessary but helps to recognize some
8711 error conditions with almost no cost.
8713 * allocatestack.c (FREE_P): Also negative values indicate an
8716 * unwind.c: Include <unistd.h>.
8718 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8720 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8722 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8724 * Makefile (crti-objs, crtn-objs): New variables.
8725 (omit-deps, extra-objs): Add crtn.
8726 ($(objpfx)libpthread.so): Depend on both crti and crtn
8727 and links to them in multidir.
8728 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8730 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8732 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8733 (lll_mutex_unlock): Use atomic_exchange_rel.
8735 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8737 * cond-perf.c (cons): Add missing locking around setting of alldone.
8739 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8741 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8743 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8745 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8747 * tst-sem6.c: New file.
8748 * Makefile (tests): Add tst-sem6.
8750 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8751 Use atomic_exchange_rel instead of atomic_exchange.
8752 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8755 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8756 code for lll_futex_wait and lll_futex_wake in static apps. Use
8757 vsyscall is possible.
8759 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8760 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8761 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8762 pthread_setaffinity_np.
8763 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8764 and pthread_setaffinity_np.
8765 * Makefile (libpthread-routines): Add pthread_getaffinity and
8766 pthread_setaffinity.
8768 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8769 use it in case mmap to allocate the stack fails.
8770 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8771 ARCH_MAP_FLAGS here.
8772 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8775 2003-05-08 Ulrich Drepper <drepper@redhat.com>
8777 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8778 handler implementation. It is now lockless in fork().
8779 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8780 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8781 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8782 declare the __fork_*_lists.
8783 (struct fork_handler): Include pointers to all three functions.
8784 Add next, refcntr and need_signal elements.
8785 (__fork_handlers): New declaration.
8786 (__register_atfork_malloc): Remove declaration.
8787 (HAVE_register_atfork_malloc): Remove definition.
8788 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8789 __pthread_child_handler variable.
8790 (__libc_pthread_init): Use __register_atfork instead of explicitly
8792 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8794 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8796 * unwind.c (unwind_cleanup): Print error message and then abort. This
8797 function must never be reached.
8799 * cond-perf.c: New file.
8801 2003-05-05 Ulrich Drepper <drepper@redhat.com>
8803 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8805 2003-05-04 Roland McGrath <roland@redhat.com>
8807 * Makefile ($(objpfx)../libc.so): New target.
8809 2003-05-02 Ulrich Drepper <drepper@redhat.com>
8811 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8812 (pthread_condattr_t): Size is only an int, don't use long for
8814 (pthread_mutexattr_t): Likewise.
8815 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8816 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8817 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8819 2003-05-01 Ulrich Drepper <drepper@redhat.com>
8821 * sysdeps/i386/tls.h: Define THREAD_ID.
8822 * sysdeps/ia64/tls.h: Likewise.
8823 * sysdeps/powerpc/tls.h: Likewise.
8824 * sysdeps/s390/tls.h: Likewise.
8825 * sysdeps/sh/tls.h: Likewise.
8826 * sysdeps/x86_64/tls.h: Likewise.
8827 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8829 * pthread_mutex_timedlock.c: Likewise.
8830 * pthread_mutex_trylock.c: Likewise.
8831 * pthread_mutex_unlock.c: Likewise.
8832 * pthread_rwlock_trywrlock.c: Likewise.
8833 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8834 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8835 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8836 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8838 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8841 2003-04-29 Jakub Jelinek <jakub@redhat.com>
8843 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8844 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8845 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8846 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8847 Make __align long long instead of long.
8848 (pthread_rwlock_t): Formatting.
8849 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8850 (pthread_rwlock_t): Formatting.
8851 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8852 (pthread_cond_t): Make __align long long instead of long.
8853 (pthread_rwlock_t): Move __flags field to the same position as in
8856 2003-04-30 Ulrich Drepper <drepper@redhat.com>
8858 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8859 * tst-rwlock7.c (do_test): Likewise.
8861 2003-04-26 Roland McGrath <roland@redhat.com>
8863 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8865 2003-04-22 Jakub Jelinek <jakub@redhat.com>
8867 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8868 sizeof (struct pthread).
8869 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8871 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8873 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8875 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8877 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8879 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8881 (NO_TLS_OFFSET): Define.
8882 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8883 add TLS_TCB_SIZE unnecessarily.
8885 2003-04-22 Roland McGrath <roland@redhat.com>
8887 * Makeconfig (shared-thread-library): Reverse link order to work
8890 2003-04-22 Ulrich Drepper <drepper@redhat.com>
8892 * semaphore.h: Fix typo in comment.
8894 2003-04-21 Ulrich Drepper <drepper@redhat.com>
8896 * sysdeps/pthread/sigfillset.c: New file.
8898 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8899 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8900 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8901 * sysdeps/pthread/sigaction.c: Likewise.
8902 * sysdeps/pthread/sigprocmask.c: New file.
8903 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8905 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8906 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8909 2003-04-19 Ulrich Drepper <drepper@redhat.com>
8911 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8912 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8914 * sysdeps/unix/sysv/linux/unregister-atfork.c
8915 (__unregister_atfork): Don't free memory not allocated dynamically.
8917 * semaphore.h: Remove __THROW marker from cancellation points.
8918 * nptl/sysdeps/pthread/pthread.h: Likewise.
8920 2003-04-18 Ulrich Drepper <drepper@redhat.com>
8922 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8923 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8926 2003-04-16 Jakub Jelinek <jakub@redhat.com>
8928 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8930 2003-04-15 Roland McGrath <roland@redhat.com>
8932 * forward.c (__pthread_unwind): Tweak to avoid warning.
8934 2003-04-15 Ulrich Drepper <drepper@redhat.com>
8936 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8938 2003-04-14 Ulrich Drepper <drepper@redhat.com>
8940 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8941 overflow CFA advance instructions.
8942 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8944 2003-04-14 Jakub Jelinek <jakub@redhat.com>
8946 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8947 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8948 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8951 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8952 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8953 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8954 DW_CFA_advance_loc for .Laddl-.Lsubl.
8956 2003-04-13 Ulrich Drepper <drepper@redhat.com>
8958 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8959 position-independent unwind data for static libraries.
8960 Add missing unwind info. Add comments.
8962 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8964 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8965 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8967 2003-04-12 Ulrich Drepper <drepper@redhat.com>
8969 * Makefile: Make sure all cancellation points are compiled with
8970 exception and asynchronous unwind tables.
8972 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8973 which mishandles loading of global object addresses in PIC.
8974 (THREAD_SETMEM_NC): Likewise.
8976 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8978 * pthread.h: Define new data structure for cleanup buffer. Declare
8979 new cleanup handler interfaces.
8980 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8981 (struct pthread): Add cleanup_jmp_buf pointer. Define
8982 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8983 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8984 it. Declare old cleanup handler installation functions.
8985 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8987 * cleanup_defer.c: Likewise.
8988 * cleanup_compat.c: New file. Old cleanup code.
8989 * cleanup_def_compat.c: New file. Old cleanup code.
8990 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8991 if own thread descriptor.
8992 * unwind.c: New file.
8993 * forward.c: Add __pthread_unwind.
8994 * init.c (pthread_functions): Add __pthread_unwind.
8995 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8996 Add ptr___pthread_unwind.
8997 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8998 and unwind function.
8999 * Makefile (libpthread-routines): Add cleanup_compat,
9000 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
9001 table generation if necessary.
9002 * version.c: Record whether unwind support is compiled in.
9003 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9004 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9006 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9007 complication to generate unwind information for syscall wrappers.
9008 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9009 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9010 __cleanup_fct_attribute.
9012 * Makefile: Add rules to build and run tst-cleanup0.
9013 * tst-cleanup0.c: New file.
9014 * tst-cleanup0.expect: New file.
9016 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9017 caller. Optimize to avoid often unecessary local variable.
9019 2003-04-11 Roland McGrath <roland@redhat.com>
9021 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9022 sets variable `multidir'; include that.
9023 (generated): Add it.
9024 ($(objpfx)$(multidir)/crti.o): New target.
9025 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9027 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9029 * tst-attr2.c (do_test): Add cast to avoid warning.
9030 * tst-mutex4.c (do_test): Likewise.
9032 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9034 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9037 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9039 * Makefile (tests): Add tst-detach1.
9040 * tst-detach1.c: New file.
9042 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9044 * sysdeps/pthread/pthread.h: Remove duplicate
9045 pthread_cleanup_{push,pop} definitions.
9047 * tst-barrier2.c: Eliminate warnings.
9048 * tst-cancel4.c: Likewise.
9049 * tst-cond4.c: Likewise.
9050 * tst-cond6.c: Likewise.
9051 * tst-detach1.c: Likewise.
9052 * tst-rwlock4.c: Likewise.
9053 * tst-rwlock6.c: Likewise.
9054 * tst-rwlock7.c: Likewise.
9055 * tst-sem3.c: Likewise.
9056 * tst-spin2.c: Likewise.
9057 * tst-umask1.c: Likewise.
9059 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9061 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9063 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9065 * descr.h (struct pthread): Move cancelhandling member to the front.
9067 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9069 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9070 malloc_parent, and malloc_child statically.
9071 (__register_atfork_malloc): New function.
9072 (free_mem): Don't free any of the malloc_* variables on the list.
9073 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9074 Define HAVE_register_atfork_malloc.
9076 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9078 * sysdeps/pthread/createthread.c (create_thread): Add some more
9079 comments explaining when to set multiple_threads and when not.
9081 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9082 THREAD_ATOMIC_BIT_SET if not already defined.
9083 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9084 THREAD_ATOMIC_BIT_SET:
9085 * sysdeps/x86_64/tls.h: Likewise.
9086 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9087 THREAD_ATOMIC_CMPXCHG_VAL.
9088 (_pthread_cleanup_pop_restore): Likewise.
9089 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9090 (__pthread_enable_asynccancel_2): Likewise.
9091 (__pthread_disable_asynccancel): Likewise.
9092 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9093 (__libc_disable_asynccancel): Likewise.
9094 * init.c (sigcancel_handler): Likewise.
9095 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9096 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9098 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9100 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9101 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9102 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9103 * Makefile (tests): Add tst-cancel11.
9104 * tst-cancel11.c: New file.
9106 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9108 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9109 round, not the first. Use specific_used flag instead of local
9110 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9111 (__free_tcb): Don't call deallocate_tsd here.
9112 (start_thread): Call deallocate_tsd here.
9113 * pthread_setspecific.c: Set specific_used flag really only when
9115 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9116 * tst-tsd3.c: New file.
9117 * tst-tsd4.c: New file.
9119 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9121 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9122 Use atomic_exchange_and_add instead of __lll_add.
9123 (__lll_mutex_timedlock): Likewise.
9124 Patch by Ian Wienand.
9126 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9128 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9129 (SINGLE_THREAD_P): Fix typo.
9130 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9132 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9134 * Makefile (tests): Add tst-align.
9135 * tst-align.c: New file.
9136 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9138 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9141 * tst-tsd2.c: Add casts to avoid warnings.
9143 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9145 * descr.h (struct pthread): Move most often used elements to the front.
9147 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9149 * Makefile (libpthread-routines): Add pthread_atfork.
9150 (libpthread-static-only-routines): Add pthread_atfork.
9152 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9154 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9156 (INSTALL_DTV): Add parens.
9157 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9158 Use passed descr instead of THREAD_SELF.
9159 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9160 (__lll_mutex_timedlock_wait): Correct expected value after
9162 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9163 Release lock before waking up the waiters.
9164 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9165 criteria. Reorderstruct passed to cleanup handler. Fix
9166 handling of cancellation and failung pthread_mutex_unlock call.
9167 Use __pthread_enable_asynccancel_2 instead of
9168 __pthread_enable_asynccancel.
9169 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9170 Return result of lock re-get if it fails.
9171 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9172 for __pthread_cleanup_push.
9173 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9174 completely broken rwlock implementation.
9175 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9176 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9177 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9178 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9179 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9180 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9181 versioned_symbol macro.
9182 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9183 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9185 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9187 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9188 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9190 (struct timer): Remove th and bar field.
9191 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9192 debugging code. Create only one helper thread.
9193 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9195 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9196 Renamed. Define statically. Use thread info from siginfo.
9197 (__helper_once): New variable.
9198 (__helper_tid): New variable.
9199 (__reset_helper_control): New function.
9200 (__start_helper_thread): New function.
9202 * pthread_create.c (start_thread): Don't use setjmp inside
9203 __builtin_expect to work around gcc bug.
9205 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9206 timer_delete syscall fails, but not with ENOSYS, set
9209 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9210 (timer_settime): Fix typo.
9211 * sysdeps/unix/sysv/linux/timer_getoverr.c
9212 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9214 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9216 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9217 offset of cleanupbuf.__prev.
9219 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9221 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9224 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9226 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9227 NULL provide default definition to syscall.
9229 2003-03-25 Roland McGrath <roland@redhat.com>
9231 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9232 (timer_id2ptr): Fix typo.
9234 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9236 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9237 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9238 * sysdeps/ia64/pthreaddef.h: Likewise.
9239 * sysdeps/powerpc/pthreaddef.h: Likewise.
9240 * sysdeps/s390/pthreaddef.h: Likewise.
9241 * sysdeps/sh/pthreaddef.h: Likewise.
9242 * sysdeps/x86_64/pthreaddef.h: Likewise.
9243 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9244 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9246 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9247 SIGTIMER is not unblocked.
9248 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9250 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9252 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9253 pass pointer through as ID.
9254 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9255 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9256 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9257 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9258 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9259 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9260 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9261 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9262 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9263 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9264 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9265 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9266 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9267 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9268 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9269 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9270 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9271 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9272 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9273 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9274 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9275 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9276 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9277 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9278 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9279 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9280 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9281 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9282 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9283 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9284 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9285 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9286 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9288 * pthreadP.h: Remove FRAME_LEFT definition.
9289 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9290 already left frame. Programs which have this problem are not POSIX
9292 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9294 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9296 * sysdeps/pthread/tst-timer.c: Check return values of the
9299 2003-03-23 Roland McGrath <roland@redhat.com>
9301 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9302 * tst-tls3mod.c: Likewise.
9303 * tst-tls1.c: Likewise.
9304 * tst-tls2.c: Likewise.
9306 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9309 * tst-join5.c (tf1, tf2): Add a cast.
9311 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9313 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9314 Don't test anything.
9315 * tst-cond4.c: Likewise.
9316 * tst-cond6.c: Likewise.
9317 * tst-flock2.c: Likewise.
9318 * tst-mutex4.c: Likewise.
9319 * tst-rwlock4.c: Likewise.
9320 * tst-signal1.c: Likewise.
9321 * tst-spin2.c: Likewise.
9322 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9324 * tst-mutex4.c: Use test-skeleton.c.
9325 * tst-spin2.c: Likewise.
9326 * tst-sysconf.c: Likewise.
9327 * tst-barrier2.c: Likewise.
9328 * tst-cond4.c: Likewise.
9329 * tst-cond6.c: Likewise.
9330 * tst-rwlock4.c: Likewise.
9331 * tst-unload.c: Likewise.
9332 * tst-flock2.c (do_test): Use return instead of exit.
9334 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9336 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9338 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9340 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9341 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9342 instead of __lll_compare_and_swap.
9343 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9345 Removed definition if __lll_compare_and_swap.
9347 * cancellation.c: Adjust for new form of compare&exchange macros.
9348 * cleanup_defer.c: Likewise.
9350 * libc-cancellation.c: Likewise.
9351 * old_pthread_cond_broadcast.c: Likewise.
9352 * old_pthread_cond_signal.c: Likewise.
9353 * old_pthread_cond_timedwait.c: Likewise.
9354 * old_pthread_cond_wait.c: Likewise.
9355 * pthread_cancel.c: Likewise.
9356 * pthread_create.c: Likewise.
9357 * pthread_detach.c: Likewise.
9358 * pthread_join.c: Likewise.
9359 * pthread_key_delete.c: Likewise.
9360 * pthread_setcancelstate.c: Likewise.
9361 * pthread_setcanceltype.c: Likewise.
9362 * pthread_timedjoin.c: Likewise.
9363 * pthread_tryjoin.c: Likewise.
9364 * sysdeps/pthread/createthread.c: Likewise.
9366 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9368 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9369 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9370 definitions. Replace uses with calls to atomic_* functions.
9371 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9372 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9373 __lll_test_and_set calls with atomic_exchange_and_add and
9374 atomic_exchange calls respectively.
9375 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9376 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9377 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9378 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9379 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9380 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9381 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9383 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9384 returns the old value.
9386 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9388 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9389 int for variable OLDVAL and correct inline assembler contraint.
9390 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9391 type int for variable OLD.
9393 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9395 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9396 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9397 instead of multiple_threads field in the TCB.
9399 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9401 * sysdeps/i386/i686/bits/atomic.h: Removed.
9402 * sysdeps/i386/i586/bits/atomic.h: Removed.
9403 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9404 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9405 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9406 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9407 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9408 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9409 * atomic.h: Removed. Moved to glibc.
9411 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9412 support for clock selection.
9414 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9417 2003-03-18 Roland McGrath <roland@redhat.com>
9419 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9420 Add __lll_rel_instr first. Add memory clobber.
9421 (lll_mutex_unlock): Use __lll_test_and_set.
9422 From Paul Mackerras <paulus@samba.org>.
9424 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9426 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9427 (SINGLE_THREAD_P): Add `header.' prefix.
9428 From Paul Mackerras <paulus@samba.org>.
9430 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9431 pthread_timedjoin_np to ...
9432 (libpthread: GLIBC_2.3.3): ... here.
9433 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9435 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9436 Avoid shadowing VAL variable.
9438 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9441 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9443 * Makefile (tests): Add tst-cond11.
9444 * tst-cond11.c: New file.
9446 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9447 struct passed to cleanup handler to eliminate one more
9449 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9451 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9452 (pthrad_cond_t): Replace __unused field with __clock.
9454 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9455 waken all waiters in cleanup handler.
9456 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9457 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9459 * pthread_condattr_getclock.c: New file.
9460 * pthread_condattr_setclock.c: New file.
9461 * sysdeps/pthread/pthread.h: Declare these new functions.
9462 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9463 * Makefile (libpthread-routines): Add the new functions.
9464 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9465 Renamed field to value. Document use of the bits.
9466 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9468 * pthread_condattr_setpshared.c: Likewise.
9469 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9470 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9471 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9473 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9474 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9475 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9476 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9477 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9478 Implement clock selection.
9479 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9480 * pthread-errnos.sym: Add ENOSYS.
9481 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9482 _POSIX_CLOCK_SELECTION.
9483 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9485 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9486 invalid .size directive.
9488 2003-03-17 Roland McGrath <roland@redhat.com>
9490 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9493 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9495 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9496 Use __lll_add instead of spelling it out. Use protected symbol names.
9497 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9499 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9500 Renamed from lll_compare_and_swap. Use new name where necessary.
9501 (__lll_add): Defined.
9502 (__lll_dec_if_positive): Defined.
9503 (__lll_test_and_set): Defined.
9504 * sysdeps/ia64/pthread_spin_init.c: Removed.
9505 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9506 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9507 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9508 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9509 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9510 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9511 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9512 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9513 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9514 __sync_lock_release_si.
9515 Patch by Jakub Jelinek.
9517 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9518 Fix timeout handling.
9519 (__lll_timedwait_tid): Likewise.
9520 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9521 Patch by Jakub Jelinek.
9523 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9525 2003-03-17 Roland McGrath <roland@redhat.com>
9527 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9528 * sysdeps/pthread/pthread_spin_init.c: New file.
9529 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9530 * sysdeps/powerpc/Makefile: New file.
9531 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9532 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9533 * sysdeps/powerpc/pthreaddef.h: New file.
9534 * sysdeps/powerpc/tcb-offsets.sym: New file.
9535 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9536 * sysdeps/powerpc/tls.h: New file.
9537 * sysdeps/powerpc/bits/atomic.h: New file.
9538 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9539 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9540 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9542 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9543 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9544 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9545 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9546 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9547 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9548 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9549 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9550 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9551 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9552 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9553 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9554 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9555 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9556 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9558 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9560 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9561 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9562 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9563 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9564 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9566 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9568 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9569 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9570 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9571 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9572 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9574 2003-03-16 Roland McGrath <roland@redhat.com>
9576 * tst-fork4.c: Include <string.h>.
9577 * tst-signal2.c: Likewise.
9578 * tst-mutex5.c (do_test): exit -> return.
9579 * tst-mutex2.c: Include <stdlib.h>.
9581 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9583 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9584 (__lll_mutex_timedlock_wait): Correct expected value after
9585 spurious wakeup. Otherwise we would never wait again.
9587 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9588 zone versus inline asm stupidity. Use correct instructions.
9590 * tst-rwlock6.c: Add some more status output.
9592 2003-03-15 Roland McGrath <roland@redhat.com>
9594 * sysdeps/pthread/configure.in: New file.
9595 * sysdeps/pthread/configure: New file (generated).
9597 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9599 * allocatestack.c (allocate_stack): Store the exact stack size of
9600 user allocated stacks.
9602 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9604 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9605 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9606 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9607 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9608 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9609 Use `header.' prefix.
9610 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9612 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9614 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9615 __builtin_frame_address, use stack pointer.
9617 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9618 instead of __builtin_frame_pointer.
9620 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9622 * tst-basic1.c (do_test): Add cast to avoid warning.
9623 * tst-basic2.c (do_test): Likewise.
9625 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9626 amount of stack correction.
9628 * tst-fork4.c: Use test-skeleton.c.
9630 2003-03-14 Roland McGrath <roland@redhat.com>
9632 * init.c: Fix typo "#eli" for "#else".
9634 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9636 * allocatestack.c (__stack_user): Use hidden_data_def.
9637 * pthread_create.c (__pthread_keys): Likewise.
9639 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9641 2003-03-14 Roland McGrath <roland@redhat.com>
9643 * tst-fork4.c: New file.
9644 * Makefile (tests): Add it.
9646 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9647 we always define the padding space.
9648 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9649 stopped supporting its own extensions fully.
9650 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9651 struct also called `header', so `header.multiple_threads' is the field
9652 name to use on all machines.
9653 * allocatestack.c (allocate_stack): Use `header.' prefix.
9654 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9655 * pthread_create.c (__pthread_create_2_1): Likewise.
9656 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9657 (THREAD_SELF): Likewise.
9658 * sysdeps/x86_64/tls.h: Likewise.
9659 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9660 (SINGLE_THREAD_P): Likewise.
9661 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9662 (SINGLE_THREAD_P): Likewise.
9663 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9664 (SINGLE_THREAD_P): Likewise.
9666 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9669 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9671 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9672 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9674 * pthread_create.c (start_thread): setjmp is expected to return 0.
9676 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9677 (THREAD_GETMEM_NC): Likewise.
9679 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9681 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9682 and the size of the stack which must be allocated is a multiple,
9683 allocate one more page.
9684 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9685 MULTI_PAGE_ALIASING.
9687 2003-03-13 Roland McGrath <roland@redhat.com>
9689 * pthread_create.c (start_thread): Set EXITING_BIT after the
9690 event-reporting (and destructors), not before.
9692 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9694 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9695 lll_futex_wake): Declare register variables as long int instead of
9696 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9697 Make syscall arguments clobbered by the syscall.
9698 (lll_futex_wait): Define using lll_futex_timed_wait.
9700 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9703 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9706 * allocatestack.c (nptl_ncreated): Only declare if
9707 COLORING_INCREMENT != 0.
9709 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9710 (__libc_enable_asynccancel_2): Remove prototype.
9712 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9713 ctid to match kernel.
9715 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9717 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9718 libc_multiple_threads.
9719 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9720 __libc_multiple_threads to...
9721 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9723 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9725 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9726 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9728 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9729 (__pthread_once_internal): Define.
9731 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9732 macros instead of .symver directly.
9733 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9734 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9736 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9737 * sysdeps/x86_64/tcb-offsets.sym: New file.
9738 * sysdeps/x86_64/Makefile: New file.
9740 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9741 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9742 to access own pthread_t in TCB.
9743 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9745 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9747 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9749 2003-03-12 Roland McGrath <roland@redhat.com>
9751 * pthread-errnos.sym: New file.
9752 * Makefile (gen-as-const-headers): New variable, list that file.
9753 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9754 header <pthread-errnos.h> instead of defining errno values here.
9755 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9756 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9757 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9758 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9759 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9761 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9763 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9764 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9765 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9766 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9767 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9768 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9769 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9770 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9771 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9772 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9773 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9774 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9775 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9776 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9777 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9778 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9779 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9780 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9781 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9782 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9783 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9784 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9785 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9786 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9787 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9788 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9789 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9791 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9792 CLONE_CHILD_SETTID worked.
9794 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9796 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9798 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9801 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9802 (pthread_cond_t): Add padding.
9804 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9805 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9806 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9808 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9809 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9810 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9811 (__pthread_rwlock_timedrdlock): Likewise.
9812 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9813 (__pthread_rwlock_wrlock): Likewise.
9814 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9815 (__pthread_rwlock_rdlock): Likewise.
9817 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9819 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9820 result of lock re-get if it fails.
9822 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9824 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9825 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9826 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9827 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9828 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9829 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9830 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9831 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9832 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9833 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9835 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9836 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9838 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9839 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9840 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9841 (create_thread): Likewise.
9842 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9843 * init.c (__pthread_initialize_minimal_internal): Initialize
9844 __libc_multiple_threads_ptr if necessary.
9845 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9846 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9847 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9848 __libc_multiple_threads.
9849 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9852 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9853 (THREAD_SETMEM_NC): Likewise.
9855 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9856 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9857 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9858 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9860 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9861 Eliminate one entire instruction.
9863 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9864 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9865 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9866 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9867 instead of __pthread_enable_asynccancel.
9868 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9869 (__pthread_cond_wait): Likewise.
9870 * sysdeps/pthread/pthread_cond_timedwait.c
9871 (__pthread_cond_timedwait): Likewise.
9872 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9874 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9875 (__condvar_cleanup): Wake up all waiters in case we got signaled
9876 after being woken up but before disabling asynchronous
9878 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9879 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9880 (__condvar_cleanup): Likewise.
9882 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9883 Make it an error if architecture has no #if case. Add x86-64.
9885 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9886 pt-initfini.s generation.
9888 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9889 (TLS_INIT_TP): Fix typo.
9891 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9893 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9894 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9896 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9897 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9898 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9899 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9900 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9901 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9902 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9903 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9905 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9907 * sysdeps/pthread/pthread_cond_timedwait.c
9908 (__pthread_cond_timedwait): Return the result of the final
9909 locking. If it succeeds, the regular function return value.
9911 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9912 Return result of the final locking.
9913 * version.c (__nptl_main): Work around problems with the strange
9914 INTERNAL_SYSCALL macro on ppc32.
9915 * init.c (__pthread_initialize_minimal_internal): Unblock
9916 SIGCANCEL in case the parent blocked it.
9917 Reported by Paul Mackerras <paulus@samba.org>.
9919 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9920 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9921 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9923 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9925 * sysdeps/pthread/pthread_cond_timedwait.c
9926 (__pthread_cond_timedwait): Unlock and fail if
9927 __pthread_mutex_unlock_internal failed.
9929 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9930 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9932 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9933 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9934 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9935 ALLOCATE_STACK): New macros.
9936 (TLS_TPADJ): New macro.
9937 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9938 (allocate_stack): Handle TLS_DTV_AT_TP and
9939 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9940 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9942 * init.c [__ia64__] (__NR_set_tid_address): Define.
9944 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9945 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9946 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9947 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9948 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9949 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9950 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9951 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9952 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9953 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9954 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9955 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9956 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9957 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9958 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9959 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9960 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9961 * sysdeps/ia64/bits/atomic.h: New file.
9962 * sysdeps/ia64/Makefile: New file.
9963 * sysdeps/ia64/pthread_spin_init.c: New file.
9964 * sysdeps/ia64/pthread_spin_lock.c: New file.
9965 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9966 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9967 * sysdeps/ia64/pthreaddef.h: New file.
9968 * sysdeps/ia64/tcb-offsets.sym: New file.
9969 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9970 * sysdeps/ia64/tls.h: New file.
9972 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9973 to syscall instead of no arguments.
9975 2003-03-10 Ulrich Drepper <drepper@redhat.com>
9977 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9978 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9979 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9980 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9982 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9985 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9987 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9988 lowlevelbarrier.sym.
9989 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9990 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9991 Include lowlevelbarrier.h and don't define offsets locally.
9992 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9994 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9995 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9996 (__lll_mutex_timedlock_wait): Likewise.
9997 (lll_mutex_lock): Adjust asm for that.
9998 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9999 (lll_lock): Adjust asm for operand order change.
10000 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10001 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10003 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10004 Reverse order of parameters.
10005 (__lll_timedwait_tid): Remove regparms attribute.
10006 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10007 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10009 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10010 (__lll_timedwait_tid): Remove one unnecessary instruction.
10012 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10013 __lll_mutex_timedlock_wait only for NOT_IN_libc.
10014 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10017 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10018 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10020 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10023 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10024 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10026 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10027 define LOCK here (if UP is not defined). The actual code is in
10030 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10031 LOCK is already defined. Don't define lll_unlock_wake_cb and
10032 __lll_timedwait_tid for libc.so.
10033 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10034 define LOCK here (if UP is not defined). The actual code is in
10037 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10038 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10039 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10040 instead of lowlevelsem.h.
10041 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10042 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10043 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10045 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10046 lowlevelrwlock.sym.
10047 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10048 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10049 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10051 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10053 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10054 last changed. D'oh.
10056 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10058 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10059 of __libc_locking_needed.
10060 (lll_trylock): Initialize %eax to zero.
10062 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10063 pthread_cond_t definition.
10065 2003-03-10 Roland McGrath <roland@redhat.com>
10067 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10068 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10069 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10070 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10071 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10073 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10074 Instead of setting PD->multiple_threads, set globals
10075 __pthread_multiple_threads and __libc_multiple_threads.
10076 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10077 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10078 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10080 * descr.h (struct pthread): Conditionalize first member on
10081 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10082 containing an anonymous tcbhead_t. Move `list' member out.
10083 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10084 * allocatestack.c: Remove use of `header.data.' prefix.
10085 * pthread_create.c: Likewise.
10086 * init.c (__pthread_initialize_minimal_internal): Likewise.
10087 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10088 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10089 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10090 * sysdeps/x86_64/tls.h: Likewise.
10091 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10092 (SINGLE_THREAD_P): Likewise.
10093 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10094 (SINGLE_THREAD_P): Likewise.
10095 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10096 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10098 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10100 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10102 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10103 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10105 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10106 leftovers from the ia32 code.
10108 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10110 (clear_once_control): Don't load %esi.
10112 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10115 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10117 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10118 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10120 * Makefile (tests): Add tst-cond10.
10121 * tst-cond10.c: New file.
10123 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10125 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10126 * tst-signal3.c (do_test): Likewise.
10127 * tst-sem5.c (do_test): Likewise.
10128 * tst-kill6.c (do_test): Likewise.
10129 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10131 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10133 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10134 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10135 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10136 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10137 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10138 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10139 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10141 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10143 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10144 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10145 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10146 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10147 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10148 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10149 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10150 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10152 * allocatestack.c (allocate_stack): If mprotect() fails free the
10155 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10157 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10159 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10160 lll_wake_tid. This was used only to work around kernel limits in
10162 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10163 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10164 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10165 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10167 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10168 (__pthread_initialize_minimal_internal): Change initialization of
10169 __static_tls_align_m1 appropriately.
10170 * pthreadP.h (__static_tls_align_m1): Renamed from
10171 __static_tls_align.
10172 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10173 instead of __static_tls_align-1.
10175 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10177 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10179 * pthread_create.c: Define __pthread_keys using nocommon
10180 attribute, not by placing it explicitly in bss.
10181 Remove DEFINE_DEALLOC definition. Not needed anymore.
10183 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10184 Use it in mmap call to allocate stacks.
10186 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10188 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10189 result of the thread function.
10191 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10193 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10194 version is just fine.
10196 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10197 (__pthread_child_handler): Renamed from pthread_child_handler,
10198 exported, and marked hidden. Change all users.
10199 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10200 free __pthread_child_handler from child list.
10202 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10204 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10206 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10207 Fix handling of cancellation and failing pthread_mutex_unlock call.
10208 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10209 (__pthread_cond_wait): Likewise.
10211 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10212 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10213 lll_futex_timed_wait call.
10214 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10215 (pthread_rwlock_timedwrlock): Likewise.
10217 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10218 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10219 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10221 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10222 check of lll_futex_wake return value.
10224 2003-03-03 Roland McGrath <roland@redhat.com>
10226 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10228 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10229 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10230 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10232 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10234 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10235 error for CPU clocks.
10237 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10238 _POSIX_MONOTONIC_CLOCK.
10239 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10241 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10244 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10246 * descr.h (struct pthread): Move cleanup field to the front.
10248 2003-03-01 Roland McGrath <roland@redhat.com>
10250 * sem_open.c (sem_open): Braino fix.
10252 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10254 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10255 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10256 __pthread_cleanup_pop functionality.
10257 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10259 * descr.h (struct pthread): Move tid field to the front now that
10262 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10263 (__lll_mutex_timedlock_wait): Remove.
10264 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10265 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10266 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10267 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10268 (lll_unlock_wake_cb): Don't save and restore %esi.
10269 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10271 (__lll_timedwait_tid): Add alignment.
10272 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10273 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10275 (__lll_timedwait_tid): Removed.
10276 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10277 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10278 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10279 (pthread_barrier_wait): Don't save, load, and restore %esi for
10281 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10282 (__pthread_cond_signal): Don't save, load, and restore %esi.
10283 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10284 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10285 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10286 Don't save, load, and restore %esi.
10288 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10290 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10291 Release lock before waking up the waiters.
10293 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10295 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10296 (reader_thread): Likewise.
10298 * sysdeps/pthread/pthread_rwlock_unlock.c
10299 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10300 to wake up readers if there are none.
10302 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10303 Release internal lock before wake threads.
10305 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10307 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10308 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10310 * tst-rwlock9.c: Likewise.
10311 * tst-rwlock10.c: New file.
10312 * tst-rwlock11.c: New file.
10314 * Makefile (tests): Add tst-dlsym1.
10315 * tst-dlsym1.c: New file.
10317 * init.c (__pthread_initialize_minimal_internal): Set
10318 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10319 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10321 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10323 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10325 * tst-cond2.c: Fix sychronization with child.
10327 * tst-rwlock8.c (reader_thread): Remove unused variable.
10329 * Makefile: Add rules to build and run tst-tls3.
10330 * tst-tls3.c: New file.
10331 * tst-tls3mod.c: New file.
10333 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10334 * tst-rwlock8.c: New file.
10335 * tst-rwlock9.c: New file.
10336 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10337 complete broken rwlock implementation.
10338 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10340 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10342 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10343 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10344 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10345 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10346 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10347 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10348 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10350 2003-02-23 Roland McGrath <roland@redhat.com>
10352 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10354 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10356 * Makefile (tests): Add tst-context1.
10357 * tst-context1.c: New file.
10359 * Makefile (tests): Add tst-tls1 and tst-tls2.
10360 * tst-tls1.c: New file.
10361 * tst-tls2.c: New file.
10363 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10364 for failed cmpxchg.
10366 * pthread_create.c (start_thread): Set EXITING_BIT early.
10368 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10369 (THREAD_GETMEM_NC): Likewise.
10371 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10373 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10374 off 3 more bytes by using offset-less instructions when possible.
10376 * Makefile: Add dependency for $(objpfx)version.d.
10378 * eintr.c (eintr_source): Add unnecessary return but the compiler
10381 * tst-kill3.c: Include <unistd.h>.
10383 2003-02-21 Roland McGrath <roland@redhat.com>
10385 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10387 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10389 * Makefile (tests): Add tst-eintr1.
10390 (distribute): Add eintr.c.
10391 * tst-eintr1.c: New file.
10392 * eintr.c: New file.
10394 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10396 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10397 Disallow sending SIGCANCEL.
10399 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10400 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10401 * tst-kill1.c: New file.
10402 * tst-kill2.c: New file.
10403 * tst-kill3.c: New file.
10404 * tst-kill5.c: New file.
10405 * tst-kill6.c: New file.
10406 * tst-basic7.c: Renamed to...
10407 * tst-kill4.c: ...this.
10409 2003-02-21 Roland McGrath <roland@redhat.com>
10411 * Makefile (install-lib-ldscripts): New variable.
10413 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10415 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10416 * pthread_cancel.c: Use INVALID_TD_P.
10417 * pthread_detach.c: Likewise.
10418 * pthread_getschedparam.c: Likewise.
10419 * pthread_setschedparam.c: Likewise.
10420 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10421 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10422 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10423 * pthread_timedjoin.c: Likewise.
10425 * tst-basic7.c: Include <signal.h>.
10427 * pthread_join.c (pthread_join): Limited checking for invalid
10429 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10431 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10433 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10434 beginning of the loop. Clear the entire first block of TSD.
10435 * Makefile (tests): Add tst-key4.
10436 * tst-key4.c: New file.
10438 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10440 * Makefile (tests): Add tst-basic7.
10441 * tst-basic7.c: New file.
10443 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10444 Add some more __builtin_expect.
10446 * pthreadP.h: Define dummy version of DEBUGGING_P.
10448 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10450 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10451 _POSIX_THREAD_PRIORITY_SCHEDULING.
10452 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10453 _XOPEN_REALTIME_THREADS.
10454 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10456 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10457 kernel returns EINVAL for PID <= 0, work around it.
10459 * Makefile (tests): Add tst-signal5.
10460 * tst-signal5.c: New file.
10462 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10463 and LOGIN_NAME_MAX.
10465 * tst-cancel1.c (tf): Block all signals.
10467 * Makefile (tests): Add tst-basic6.
10468 * tst-basic6.c: New file.
10470 * tst-basic1.c: Add test for process ID.
10472 * Makefile (tests): Add tst-cancel10.
10473 * tst-cancel10.c: New file.
10475 * Makefile (tests): Add tst-signal4.
10476 * tst-signal4.c: New file.
10478 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10479 __sigismember instead of sigismember. Add __builtin_expect.
10481 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10483 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10484 pthread_setcancelstate, and pthread_rwlock_setpshared.
10486 * tst-cancel7.c (do_test): Make sure the pid file exists before
10487 canceling the thread.
10489 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10490 pthread_rwlock_timedrdlock tests.
10491 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10492 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10493 Check for invalid tv_nsec field.
10494 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10497 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10498 recursive mutex of overflow.
10500 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10502 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10503 going into an endless loop.
10504 * Makefile (tests): Add tst-cancel9.
10505 * tst-cancel9.c: New file.
10507 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10509 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10511 * tst-mutex5.c (do_test): Add more timedlock tests.
10513 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10514 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10516 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10517 use INLINE_SYSCALL. Error number is returned, not -1.
10519 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10520 and __deallocate_stack with internal_function.
10521 * pthread_create.c: Adjust definitions appropriately.
10522 * allocatestack.c: Likewise.
10524 * pthread_join.c: Add one more __builtin_expect.
10525 * pthread_timedjoin.c: Likewise.
10527 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10528 not data of sequence number does not match.
10529 Add one __builtin_expect.
10531 * Makefile (tests): Add tst-clock1.
10532 * tst-clock1.c: New file.
10534 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10535 negative arguments.
10536 * Makefile (tests): Add tst-basic5.
10537 * tst-basic5.c: New file.
10539 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10541 * Makefile (tests): Add tst-basic4.
10542 * tst-basic4.c: New file.
10544 * pthreadP.h: Add declaraction for __nptl_nthreads.
10545 * pthread_create.c: Define __nptl_nthreads
10546 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10547 after thread is done. If then zero, call exit(0).
10548 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10549 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10550 * init.c (pthread_functions): Initialize ptr_nthreads.
10551 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10552 (__reclaim_stacks): Decrement __nptl_nthreads.
10553 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10555 * Makefile (tests): Add tst-basic3.
10556 * tst-basic3.c: New file.
10558 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10559 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10560 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10561 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10562 if asynchronous canceling is enabled.
10563 * pthread_join.c (pthread_join): When recognizing circular joins,
10564 take into account the other thread might be already canceled.
10565 * Makefile (tests): Add tst-join5.
10566 * tst-join5.c: New file.
10568 * Makefile (tests): Add tst-join4.
10569 * tst-join4.c: New file.
10571 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10573 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10575 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10577 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10578 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10579 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10581 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10583 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10584 error if lll_futex_wake failed.
10586 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10588 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10589 handling of cancellation and failung pthread_mutex_unlock call.
10590 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10591 * Makefile (tests): Add tst-cond8 and tst-cond9.
10592 * tst-cond8.c: New file.
10593 * tst-cond9.c: New file.
10595 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10597 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10598 non-standard initializers with __USE_GNU.
10600 * Makefile (tests): Add tst-cleanup3.
10601 * tst-cleanup3.c: New file.
10603 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10605 * Makefile (tests): Add tst-attr1 and tst-attr2.
10606 * tst-attr1.c: New file.
10607 * tst-attr2.c: New file.
10609 * Makefile: Add rules to build and run tst-atfork2 test.
10610 * tst-atfork2.c: New file.
10611 * tst-atfork2mod.c: New file.
10613 * sysdeps/unix/sysv/linux/unregister-atfork.c
10614 (__unregister_atfork): Free the memory allocated for the handlers
10615 after removing them from the lists.
10617 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10620 * tst-atfork1.c (do_test): Wait for the child we forked.
10621 Report error in child.
10623 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10625 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10627 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10629 * Makefile (tests): Add tst-cancel8.
10630 * tst-cancel8.c: New file.
10632 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10633 clearing of control variable.
10634 * Makefile (tests): Add tst-once3 and tst-once4.
10635 * tst-once3.c: New file.
10636 * tst-once4.c: New file.
10638 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10640 * sysdeps/sh/Makefile: New file.
10641 * sysdeps/sh/bits/atomic.h: New file.
10642 * sysdeps/sh/pthread_spin_init.c: New file.
10643 * sysdeps/sh/pthread_spin_lock.c: New file.
10644 * sysdeps/sh/pthread_spin_trylock.S: New file.
10645 * sysdeps/sh/pthread_spin_unlock.S: New file.
10646 * sysdeps/sh/pthreaddef.h: New file.
10647 * sysdeps/sh/tcb-offsets.sym: New file.
10648 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10649 * sysdeps/sh/tls.h: New file.
10650 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10651 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10652 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10653 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10654 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10655 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10656 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10657 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10658 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10659 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10660 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10661 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10662 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10663 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10664 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10665 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10666 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10667 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10668 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10669 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10670 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10671 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10672 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10673 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10674 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10675 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10676 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10677 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10678 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10679 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10681 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10683 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10684 according to POSIX.
10686 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10688 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10690 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10691 (TLS_GET_FS): New #define.
10692 (TLS_SET_FS): New #define.
10693 Correct value of __NR_set_thread_area.
10695 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10697 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10699 * Makefile (tests): Add tst-popen1.
10700 * tst-popen1.c: New file.
10702 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10703 but inactive generalization.
10704 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10705 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10706 Minor optimization, remove one instruction.
10707 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10709 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10711 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10713 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10715 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10716 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10717 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10718 * sysdeps/pthread/pthread_cond_signal.c: New file.
10719 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10720 * sysdeps/pthread/pthread_cond_wait.c: New file.
10721 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10722 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10723 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10724 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10725 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10726 * sysdeps/s390/Makefile: New file.
10727 * sysdeps/s390/bits/atomic.h: New file.
10728 * sysdeps/s390/pthread_spin_init.c: New file.
10729 * sysdeps/s390/pthread_spin_lock.c: New file.
10730 * sysdeps/s390/pthread_spin_trylock.c: New file.
10731 * sysdeps/s390/pthread_spin_unlock.c: New file.
10732 * sysdeps/s390/pthreaddef.h: New file.
10733 * sysdeps/s390/tcb-offsets.sym: New file.
10734 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10735 * sysdeps/s390/tls.h: New file.
10736 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10737 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10738 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10739 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10740 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10741 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10742 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10743 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10744 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10745 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10746 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10747 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10748 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10749 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10750 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10751 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10752 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10753 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10754 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10755 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10756 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10757 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10758 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10760 2003-02-04 Ulrich Drepper <drepper@redhat.com>
10762 * atomic.h: Add a couple more default implementations.
10763 (atomic_compare_and_exchange_acq): Use
10764 __arch_compare_and_exchange_32_acq in return value definition. It
10766 (atomic_bit_set): Renamed from atomic_set_bit.
10767 Add missing atomic_ prefixes.
10769 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10770 thread library is available, use correct value to mark initialized
10773 2003-02-03 Ulrich Drepper <drepper@redhat.com>
10775 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10776 __sysconf to determine pagesize.
10778 * pthread_create.c: Include <atomic.h>.
10779 * allocatestack.c (allocate_stack): Implement coloring of the
10780 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10781 size minus one. Adjust users.
10782 * sysdeps/i386/i686/Makefile: New file.
10784 2003-02-02 Ulrich Drepper <drepper@redhat.com>
10786 * allocatestack.c: Improve comment throughout the file.
10788 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10789 (__lll_lock_wait): Add branch prediction.
10790 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10791 (__lll_lock_wait): Likewise.
10792 (lll_unlock_wake_cb): Removed.
10794 2003-01-31 Ulrich Drepper <drepper@redhat.com>
10796 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10797 _POSIX_THREAD_PRIORITY_SCHEDULING.
10799 2003-01-30 Jakub Jelinek <jakub@redhat.com>
10801 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10802 Fix return type of ptr___pthread_getspecific.
10804 2003-01-29 Ulrich Drepper <drepper@redhat.com>
10806 * Makefile (tests): Add tst-umask1.
10807 (tst-umask1-ARGS): Define.
10808 * tst-umask1.c: New file.
10810 2003-01-28 Ulrich Drepper <drepper@redhat.com>
10812 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10813 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10814 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10815 pthread_rwlock_unlock.
10816 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10817 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10818 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10819 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10820 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10822 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10823 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10825 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10826 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10827 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10829 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10830 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10832 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10833 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10834 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10836 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10837 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10839 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10841 * Makefile (libpthread-routines): Remove lowlevelcond and
10842 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10843 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10844 and pthread_cond_broadcast.
10845 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10846 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10847 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10848 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10849 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10850 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10851 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10852 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10853 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10854 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10855 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10856 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10858 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10859 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10860 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10861 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10862 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10863 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10864 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10865 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10866 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10867 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10868 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10869 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10870 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10871 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10872 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10873 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10874 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10875 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10877 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10878 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10879 of the code is moved to ...
10880 * sysdeps/pthread/createthread.c: ...here. New file.
10882 2003-01-27 Ulrich Drepper <drepper@redhat.com>
10884 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10885 (__new_sem_post): Clear %eax before returning.
10886 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10888 * Makefile (tests): Add tst-cleanup2.
10889 * tst-cleanup2.c: New file.
10891 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10892 Interpret first parameter correctly.
10894 2003-01-17 Ulrich Drepper <drepper@redhat.com>
10896 * Makefile (headers): Add bits/semaphore.h.
10898 2003-01-16 Jakub Jelinek <jakub@redhat.com>
10900 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10903 2003-01-14 Ulrich Drepper <drepper@redhat.com>
10905 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10906 must be used and mapping failed.
10907 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10909 * Makefile (CFLAGS-pthread_self.os): Define this, not
10910 CFLAGS-pthread_self.c.
10912 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10914 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10915 lll_unlock_wake_cb.
10917 * Makefile (libpthread-routines): Add version. Add rules to build
10918 version.os and banner.h.
10919 * version.c: New file.
10921 2003-01-13 Jakub Jelinek <jakub@redhat.com>
10923 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10924 the alias unconditional.
10925 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10927 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10929 * Makefile (CFLAGS-pthread_self.c): New definition.
10931 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10933 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10934 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10935 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10936 * init.c (__pthread_initialize_minimal_internal): Likewise.
10938 2003-01-07 Jakub Jelinek <jakub@redhat.com>
10940 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10942 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10943 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10944 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10945 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10946 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10947 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10949 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10951 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10952 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10953 * tst-cancel-wrappers.sh: Remove all exceptions.
10955 2003-01-05 Ulrich Drepper <drepper@redhat.com>
10957 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10958 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10960 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10961 Use __libc_pthread_functions array if SHARED.
10963 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10964 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10966 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10967 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10968 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10969 __libc_ptf_call instead of __libc_maybe_call.
10970 (PTF): New #define.
10971 (__libc_cleanup_region_start): Wrap function name with PTF call.
10972 (__libc_cleanup_region_end): Likewise.
10973 (__libc_cleanup_end): Likewise.
10975 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10976 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10977 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10978 * pthreadP.h: Add prototypes.
10980 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10981 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10982 __pthread_rwlock_unlock aliases.
10983 * pthreadP.h: Add prototypes for new aliases.
10985 * pthreadP.h (struct pthead_functions): Moved to...
10986 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10987 * init.c (pthread_functions): Add initializers for new elements.
10989 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10990 __pthread_cleanup_pop_restore aliases.
10991 * pthreadP.h: Add prototypes.
10993 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10994 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10995 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10996 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10997 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10998 * pthreadP.h: Adjust prototypes and callers.
11000 2003-01-04 Ulrich Drepper <drepper@redhat.com>
11002 * Makefile (tests): Add tst-cancel7.
11003 (tst-cancel7-ARGS): New variable.
11004 * tst-cancel7.c: New file.
11006 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11007 around gcc defficiencies.
11008 * old_pthread_cond_signal.c: Likewise.
11009 * old_pthread_cond_timedwait.c: Likewise.
11010 * old_pthread_cond_wait.c: Likewise.
11012 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11014 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11016 * Makefile (tests): Add tst-cond7.
11017 * tst-cond7.c: New file.
11019 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11020 (condvar_cleanup): Get condvar address from the right place.
11022 * atomic.h: Correct definitions of atomic_full_barrier,
11023 atomic_read_barrier, atomic_write_barrier.
11025 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11027 * old_pthread_cond_signal.c: Likewise.
11028 * old_pthread_cond_timedwait.c: Likewise.
11029 * old_pthread_cond_wait.c: Likewise.
11031 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11033 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11035 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11037 * pthreadP.h (pthread_cond_2_0_t): New type.
11038 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11039 Use new type for the 2.0 condvar function prototypes.
11040 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11041 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11043 * old_pthread_cond_destroy.c: Likewise.
11044 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11045 * old_pthread_cond_signal.c: Likewise.
11046 * old_pthread_cond_timedwait.c: Likewise.
11047 * old_pthread_cond_wait.c: Likewise.
11049 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11050 (__pthread_cond_wait): Don't save cancellation mode and seq value
11053 * herrno.c (__h_errno_location): Don't define as weak.
11055 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11057 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11058 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11059 and pthread_cond_wait.
11060 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11062 (__pthread_cond_broadcast_2_0): ... this.
11063 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11065 (__pthread_cond_destroy_2_0): ... this.
11066 * old_pthread_cond_init.c (__old_pthread_cond_init):
11068 (__pthread_cond_init_2_0): ... this.
11069 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11071 (__pthread_cond_signal_2_0): ... this.
11072 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11074 (__pthread_cond_wait_2_0): ... this.
11075 * pthread_cond_destroy.c: Include shlib-compat.h.
11076 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11077 * pthread_cond_init.c: Include shlib-compat.h.
11078 (pthread_cond_init): Change strong_alias into versioned_symbol.
11079 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11080 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11082 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11083 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11084 __pthread_cond_wait_2_0): New prototypes.
11085 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11086 __old_pthread_cond_init, __old_pthread_cond_signal,
11087 __old_pthread_cond_wait): Removed.
11088 * init.c: Include shlib-compat.h.
11089 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11090 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11091 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11092 ptr___pthread_cond_*_2_0 fields.
11093 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11094 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11096 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11097 LIBC_SIGACTION was not yet defined.
11098 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11099 [!defined LIBC_SIGACTION] (__sigaction): New function and
11101 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11102 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11104 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11106 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11108 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11110 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11111 New, larger type definition.
11112 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11114 * Versions [libpthread]: Add definitions for new pthread_cond_*
11115 interfaces for version GLIBC_2.3.2.
11116 * pthread_cond_init.c: Update initialization for new type definition.
11117 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11118 pthread_cond_timedwait, pthread_cond_signal, and
11119 pthread_cond_broadcast. Add old_pthread_cond_init,
11120 old_pthread_cond_destroy, old_pthread_cond_wait,
11121 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11122 old_pthread_cond_broadcast.
11123 * old_pthread_cond_broadcast.c: New file.
11124 * old_pthread_cond_destroy.c: New file.
11125 * old_pthread_cond_init.c: New file.
11126 * old_pthread_cond_signal.c: New file.
11127 * old_pthread_cond_timedwait.c: New file.
11128 * old_pthread_cond_wait.c: New file.
11129 * pthreadP.h: Add prototypes for the compatibility interfaces.
11131 * pthread_cond_destroy.c: Don't include <errno.h>.
11133 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11135 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11136 unnecessary zero offset when addressing MUTEX.
11138 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11140 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11142 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11143 for __register_atfork.
11145 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11147 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11148 instead of ASSEMBLER test macro.
11150 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11151 __libc_current_sigrtmax): Add libc_hidden_def.
11153 * sysdeps/pthread/list.h: Remove assert.h include.
11155 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11157 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11158 __pthread_initialize_minimal_internal not
11159 __pthread_initialize_minimal.
11161 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11163 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11164 __pthread_initialize_minimal as hidden.
11166 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11169 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11171 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11172 $(common-objpfx)format.lds, include that into the output script.
11174 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11176 2002-12-28 Andreas Jaeger <aj@suse.de>
11178 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11179 nsec resolution changes.
11180 (xstat64_conv): Likewise.
11181 (xstat32_conv): Likewise.
11182 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11183 struct kernel_stat.
11184 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11185 structs stat and stat64.
11186 * time/time.h (__timespec_defined): Define for __USE_MISC.
11187 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11189 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11191 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11193 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11194 (pthread_exit): Use strong_alias to avoid warnings.
11195 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11196 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11197 ptr___pthread_attr_init_2_*.
11198 * init.c (pthread_functions): Adjust.
11200 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11202 * forward.c: Make all functions available by default again. It
11203 caused too much trouble.
11205 * pt-siglongjmp.c: Removed.
11207 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11209 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11210 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11211 * sysdeps/i386/Makefile: New file.
11212 * sysdeps/i386/tcb-offsets.sym: New file.
11213 * sysdeps/pthread/tcb-offsets.h: New file.
11214 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11215 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11217 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11218 __register_atfork...
11219 (GLIBC_2.3.2): ...here.
11221 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11223 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11224 pthread_attr_setstackaddr with __attribute_deprecated__.
11226 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11228 * pt-system.c (system): Remove cancellation handling.
11229 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11230 cancellation routines.
11232 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11234 * descr.h: Include <dl-sysdep.h>.
11235 (struct pthread): Move header.data.list to the back of the struct.
11236 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11237 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11238 (SYSINFO_OFFSEET): Likewise.
11240 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11242 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11244 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11245 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11246 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11247 (USE_DL_SYSINFO): Undef.
11249 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11251 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11252 $(common-objpfx)libc.so.
11253 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11254 it is bigger than pipe buffer size even on arches with bigger
11256 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11258 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11260 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11261 correct errno access for case that USE___THREAD is not defined.
11263 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11265 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11266 Patch by Marijn Ros <marijn@mad.scientist.com>.
11268 2002-12-22 Roland McGrath <roland@redhat.com>
11270 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11272 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11274 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11276 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11278 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11279 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11280 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11282 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11284 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11285 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11286 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11287 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11288 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11289 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11290 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11291 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11293 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11295 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11297 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11299 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11301 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11302 that sysinfo is properly initialized.
11303 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11304 to 1 only for ld.so.
11306 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11307 RTLD_CORRECT_DYNAMIC_WEAK.
11309 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11311 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11312 Use return 0 as 6th argument to FORWARD4.
11313 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11315 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11317 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11318 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11319 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11320 (INIT_SYSINFO): New #define.
11321 (TLS_TP_INIT): Use INIT_SYSINFO.
11322 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11323 At test to make sure SYSINFO_OFFSET value is correct.
11324 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11326 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11328 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11329 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11330 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11331 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11332 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11333 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11334 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11336 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11338 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11339 macro instead of using int $0x80 directly.
11341 * sysdeps/pthread/bits/stdio-lock.h: New file.
11342 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11343 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11344 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11345 * Makefile (routines): Add libc-lowlevelmutex.
11347 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11348 __i686.get_pc_thunk.dx.
11350 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11352 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11353 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11354 ($(objpfx)tst-cancel-wrappers.out): New rule.
11355 * tst-cancel-wrappers.sh: New test.
11356 * tst-locale1.c: Include signal.h.
11357 (uselocale): Test static linking of __libc_current_sigrt*.
11359 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11361 * Makefile (tests): Add tst-cancel6.
11362 * tst-cancel6.c: New file
11364 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11366 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11367 Define meaningfully for assembler as well.
11368 * pthreadP.h (struct pthread_functions): Remove
11369 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11370 and ptr_pthread_attr_init_2_1 fields.
11371 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11372 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11373 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11374 (FORWARD3): Define using FORWARD4.
11375 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11377 * pt-system.c: Remove duplicate stdlib.h include.
11379 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11381 * sem_init.c: Define sem_init@GLIBC_2.0.
11382 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11383 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11385 * flockfile.c: Moved to...
11386 * sysdeps/pthread/flockfile.c: ...here. New file.
11387 * funlockfile.c: Moved to...
11388 * sysdeps/pthread/funlockfile.c: ...here. New file.
11389 * ftrylockfile.c: Moved to...
11390 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11392 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11394 * libc-cancellation.c: Guard both function with
11395 #if !defined NOT_IN_libc.
11396 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11397 automatically provided pthread wrappers.
11398 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11399 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11401 * pt-open.c: Removed.
11402 * pt-fcntl.c: Removed.
11403 * pt-fsync.c: Removed.
11404 * pt-lseek.c: Removed.
11405 * pt-msgrcv.c: Removed.
11406 * pt-msgsnd.c: Removed.
11407 * pt-msync.c: Removed.
11408 * pt-nanosleep.c: Removed.
11409 * pt-open64.c: Removed.
11410 * pt-pause.c: Removed.
11411 * pt-pread.c: Removed.
11412 * pt-pread64.c: Removed.
11413 * pt-pwrite.c: Removed.
11414 * pt-pwrite64.c: Removed.
11415 * pt-read.c: Removed.
11416 * pt-recv.c: Removed.
11417 * pt-recvfrom.c: Removed.
11418 * pt-recvmsg.c: Removed.
11419 * pt-send.c: Removed.
11420 * pt-sendto.c: Removed.
11421 * pt-sigtimedwait.c: Removed.
11422 * pt-sigwait.c: Removed.
11423 * pt-wait.c: Removed.
11424 * pt-waitpid.c: Removed.
11425 * pt-write.c: Removed.
11426 * pt-accept.c: Removed.
11427 * pt-close.c: Removed.
11428 * pt-connect.c: Removed.
11429 * pt-lseek64.c: Removed.
11430 * pt-sendmsg.c: Removed.
11431 * pt-tcdrain.c: Removed.
11433 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11435 * init.c (__pthread_initialize_minimal_internal): Renamed from
11436 __pthread_initialize_minimal. Make old name an alias. This
11437 converts a normal relocation into a relative relocation.
11439 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11441 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11442 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11443 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11444 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11445 pt-sigwaitinfo, pt-waitid, and pt-writev.
11446 * pt-creat.c: Removed.
11447 * pt-poll.c: Removed.
11448 * pt-pselect.c: Removed.
11449 * pt-readv.c: Removed.
11450 * pt-select.c: Removed.
11451 * pt-sigpause.c: Removed.
11452 * pt-sigsuspend.c: Removed.
11453 * pt-sigwaitinfo.c: Removed.
11454 * pt-waitid.c: Removed.
11455 * pt-writev.c: Removed.
11457 * init.c (pthread_functions): New variable.
11458 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11459 (or NULL) to __libc_pthread_init.
11460 * forward.c: Rewrite to use __libc:pthread_functions array to get
11461 function addresses.
11462 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11464 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11465 Take new parameter. Copy content of variable pointed to by it
11466 to __libc_pthread_init.
11468 * pthreadP.h (struct pthread_functions): New type.
11469 (__libc_pthread_init): Declare.
11471 * pthread_attr_destroy.c: Add namespace protected alias.
11472 * pthread_attr_getdetachstate.c: Likewise.
11473 * pthread_attr_getinheritsched.c: Likewise.
11474 * pthread_attr_getschedparam.c: Likewise.
11475 * pthread_attr_getschedpolicy.c: Likewise.
11476 * pthread_attr_getscope.c: Likewise.
11477 * pthread_attr_setdetachstate.c: Likewise.
11478 * pthread_attr_setinheritsched.c: Likewise.
11479 * pthread_attr_setschedparam.c: Likewise.
11480 * pthread_attr_setschedpolicy.c: Likewise.
11481 * pthread_attr_setscope.c: Likewise.
11482 * pthread_cond_broadcast.c: Likewise.
11483 * pthread_cond_destroy.c: Likewise.
11484 * pthread_cond_init.c: Likewise.
11485 * pthread_cond_signal.c: Likewise.
11486 * pthread_cond_wait.c: Likewise.
11487 * pthread_condattr_destroy.c: Likewise.
11488 * pthread_condattr_init.c: Likewise.
11489 * pthread_equal.c: Likewise.
11490 * pthread_exit.c: Likewise.
11491 * pthread_getschedparam.c: Likewise.
11492 * pthread_self.c: Likewise.
11493 * pthread_setcancelstate.c: Likewise.
11494 * pthread_setschedparam.c: Likewise.
11495 * pthread_mutex_destroy.c: Likewise.
11496 * pthread_mutex_init.c: Likewise.
11497 * pthreadP.h: Add prototypes for the aliases.
11499 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11500 multiple_threads member in correct TCB to 1.
11502 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11503 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11504 member of thread decriptor, otherwise return unconditionally 1.
11506 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11508 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11509 regular Linux version. Remove file.
11510 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11511 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11512 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11513 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11514 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11515 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11516 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11517 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11518 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11519 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11520 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11521 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11522 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11523 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11524 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11525 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11526 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11527 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11528 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11529 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11530 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11531 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11532 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11533 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11534 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11535 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11536 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11537 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11538 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11539 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11541 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11543 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11544 * sysdeps/unix/sysv/linux/open.c: Removed.
11545 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11546 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11547 * sysdeps/unix/sysv/linux/msync.c: Removed.
11548 * sysdeps/unix/sysv/linux/read.c: Removed.
11549 * sysdeps/unix/sysv/linux/close.c: Removed.
11550 * sysdeps/unix/sysv/linux/creat.c: Removed.
11551 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11552 * sysdeps/unix/sysv/linux/pause.c: Removed.
11553 * sysdeps/unix/sysv/linux/select.c: Removed.
11554 * sysdeps/unix/sysv/linux/write.c: Removed.
11556 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11558 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11559 element in TCB to see whether locking is needed.
11561 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11562 MULTIPLE_THREADS_OFFSET value is correct.
11564 * sysdeps/unix/sysv/linux/close.c: New file.
11565 * sysdeps/unix/sysv/linux/connect.S: New file.
11566 * sysdeps/unix/sysv/linux/creat.c: New file.
11567 * sysdeps/unix/sysv/linux/fsync.c: New file.
11568 * sysdeps/unix/sysv/linux/llseek.c: New file.
11569 * sysdeps/unix/sysv/linux/lseek.c: New file.
11570 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11571 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11572 * sysdeps/unix/sysv/linux/msync.c: New file.
11573 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11574 * sysdeps/unix/sysv/linux/open.c: New file.
11575 * sysdeps/unix/sysv/linux/open64.c: New file.
11576 * sysdeps/unix/sysv/linux/pause.c: New file.
11577 * sysdeps/unix/sysv/linux/poll.c: New file.
11578 * sysdeps/unix/sysv/linux/pread.c: New file.
11579 * sysdeps/unix/sysv/linux/pread64.c: New file.
11580 * sysdeps/unix/sysv/linux/pselect.c: New file.
11581 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11582 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11583 * sysdeps/unix/sysv/linux/readv.c: New file.
11584 * sysdeps/unix/sysv/linux/recv.S: New file.
11585 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11586 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11587 * sysdeps/unix/sysv/linux/select.c: New file.
11588 * sysdeps/unix/sysv/linux/send.S: New file.
11589 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11590 * sysdeps/unix/sysv/linux/sendto.S: New file.
11591 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11592 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11593 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11594 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11595 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11596 * sysdeps/unix/sysv/linux/system.c: New file.
11597 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11598 * sysdeps/unix/sysv/linux/wait.c: New file.
11599 * sysdeps/unix/sysv/linux/waitid.c: New file.
11600 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11601 * sysdeps/unix/sysv/linux/writev.c: New file.
11602 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11604 * pt-readv.c: Fix comment.
11606 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11608 * tst-cleanup1.c: Include stdlib.h.
11610 * tst-cancel5.c: New test.
11611 * Makefile (tests): Add tst-cancel5.
11612 (tst-cancel5): Link against libc.so libpthread.so in that order.
11614 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11616 * forward.c (test_loaded): Prevent recursive calls.
11618 * Makefile (routines): Add libc-cancellation.
11619 * libc-cancellation.c: New file.
11620 * descr.h (struct pthread): Add multiple_threads field.
11621 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11622 new thread descriptor to 1.
11623 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11624 Initialize multiple_thread field after successful thread creation.
11625 * cancellation.c (__do_cancel): Move to pthreadP.h.
11626 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11627 (__pthread_disable_asynccancel): Add internal_function attribute.
11628 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11629 * pthread_setcancelstate.c: Likewise.
11630 * pthread_setcanceltype.c: Likewise.
11631 * pthread_exit.c: Likewise.
11632 * pthreadP.h (CANCELLATION_P): Likewise.
11633 (__do_cancel): Define as static inline.
11634 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11635 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11637 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11638 fields. Define MULTIPLE_THREADS_OFFSET.
11639 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11641 * sysdeps/unix/sysv/linux/accept.S: New file.
11642 * sysdeps/unix/sysv/linux/read.c: New file.
11643 * sysdeps/unix/sysv/linux/write.c: New file.
11644 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11645 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11646 initialization of __libc_locking_needed.
11647 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11648 __libc_locking_needed, use multiple_threads field in TCB.
11649 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11651 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11653 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11655 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11657 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11658 access to __libc_locking_needed for PIC.
11660 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11662 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11663 declare for libc.so.
11664 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11666 (__libc_lock_lock): Put into statement expression.
11667 (__libc_lock_unlock): Remove trailing semicolon.
11668 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11670 2002-12-12 Roland McGrath <roland@redhat.com>
11672 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11673 "m" constraint to refer to __libc_locking_needed. Declare it here.
11675 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11677 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11678 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11679 Initialize __libc_locking_needed.
11680 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11681 instead of __register_pthread_fork_handler.
11682 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11683 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11684 fork-gen with libc_pthread_init.
11685 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11686 of __register_pthread_fork_handler.
11687 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11688 of __register_pthread_fork_handler.
11689 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11690 __libc_locking_needed to determine whether lock prefix can be avoided.
11691 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11693 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11695 * Makefile (tests): Add tst-cleanup1.
11696 * tst-cleanup1.c: New file.
11697 * cancellation.c (__cleanup_thread): Removed.
11698 (__do_cancel): Remove call to __cleanup_thread.
11699 * pthreadP.h: Remove __cleanup_thread prorotype.
11701 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11702 Remember function and argument even if cancellation handler
11703 function is not available.
11704 (__libc_cleanup_region_end): Execute registered function directly if
11705 pthread functions are not available.
11706 (__libc_cleanup_end): Likewise.
11708 * init.c (__pthread_initialize_minimal): Fix initialization in
11709 static lib by preventing gcc from being too clever.
11711 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11713 * init.c (__pthread_initialize_minimal): Remove unneccesary
11716 * Makefile (tests): We can run tst-locale2 now.
11718 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11720 * Versions: Remove duplicated sigwait entry.
11722 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11724 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11727 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11729 * pthreadP.h: Declare __pthread_enable_asynccancel and
11730 __pthread_disable_asynccancel.
11731 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11732 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11733 * cancellation.c (__pthread_enable_asynccancel): New function.
11734 (__pthread_disable_asynccancel): New function.
11735 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11736 * pt-close.c: Likewise.
11737 * pt-connect.c: Likewise.
11738 * pt-creat.c: Likewise.
11739 * pt-fcntl.c: Likewise.
11740 * pt-fsync.c: Likewise.
11741 * pt-lseek.c: Likewise.
11742 * pt-lseek64.c: Likewise.
11743 * pt-msgrcv.c: Likewise.
11744 * pt-msgsnd.c: Likewise.
11745 * pt-msync.c: Likewise.
11746 * pt-nanosleep.c: Likewise.
11747 * pt-open.c: Likewise.
11748 * pt-open64.c: Likewise.
11749 * pt-pause.c: Likewise.
11750 * pt-poll.c: Likewise.
11751 * pt-pread.c: Likewise.
11752 * pt-pread64.c: Likewise.
11753 * pt-pselect.c: Likewise.
11754 * pt-pwrite.c: Likewise.
11755 * pt-pwrite64.c: Likewise.
11756 * pt-read.c: Likewise.
11757 * pt-readv.c: Likewise.
11758 * pt-recv.c: Likewise.
11759 * pt-recvfrom.c: Likewise.
11760 * pt-recvmsg.c: Likewise.
11761 * pt-select.c: Likewise.
11762 * pt-send.c: Likewise.
11763 * pt-sendmsg.c: Likewise.
11764 * pt-sendto.c: Likewise.
11765 * pt-sigpause.c: Likewise.
11766 * pt-sigsuspend.c: Likewise.
11767 * pt-sigtimedwait.c: Likewise.
11768 * pt-sigwait.c: Likewise.
11769 * pt-sigwaitinfo.c: Likewise.
11770 * pt-system.c: Likewise.
11771 * pt-tcdrain.c: Likewise.
11772 * pt-wait.c: Likewise.
11773 * pt-waitid.c: Likewise.
11774 * pt-waitpid.c: Likewise.
11775 * pt-write.c: Likewise.
11776 * pt-writev.c: Likewise.
11777 * pthread_join.c: Likewise.
11778 * pthread_timedjoin.c: Likewise.
11780 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11781 (__xpg_sigpause): New function.
11782 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11784 2002-12-07 Ulrich Drepper <drepper@redhat.com>
11786 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11788 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11789 _GI_pthread_cleanup_pop to pthreadP.h.
11791 * ftrylockfile.c: Use _IO_lock_trylock instead of
11792 pthread_mutex_trylock.
11794 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11795 (CANCEL_RESET): Likewise.
11796 (__pthread_setcanceltype_): Declare.
11797 (__pthread_mutex_lock_internal): Declare.
11798 (__pthread_mutex_unlock_internal): Declare.
11799 (__pthread_once_internal): Declare.
11800 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11801 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11803 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11804 and pthread_mutex_unlock.
11805 * pthread_cond_wait.c: Likewise.
11806 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11807 * pthread_mutex_unlock.c: Likewise.
11809 * pthread_setcanceltype.c: Add additional alias
11810 __pthread_setcanceltype.
11812 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11813 * sem_open.c (sem_open): Likewise.
11814 Use __libc_open, __libc_write, and __libc_close instead of
11815 open, write, and close respectively.
11817 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11818 Rewrite as statement expression since it must return a value.
11820 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11821 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11824 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11825 alias __pthread_once_internal.
11827 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11829 2002-12-06 Ulrich Drepper <drepper@redhat.com>
11831 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11832 * tst-stdio1.c: New file.
11833 * tst-stdio2.c: New file.
11835 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11837 * Makefile (tests): Comment out tst-locale2 for now.
11838 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11840 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11842 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11843 Use _IO_lock_init instead of explicit assignment.
11845 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11846 Define __libc_lock_* and __libc_lock_recursive macros with
11847 lowlevellock macros, not pthread mutexes.
11849 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11850 of pthread_mutex_lock.
11851 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11852 instead of pthread_mutex_unlock.
11854 2002-12-06 Roland McGrath <roland@redhat.com>
11856 * allocatestack.c (__stack_user): Use uninitialized defn.
11857 * init.c (__pthread_initialize_minimal): Initialize it here.
11859 2002-12-05 Roland McGrath <roland@redhat.com>
11861 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11863 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11865 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11866 missing & here too.
11868 2002-12-05 Ulrich Drepper <drepper@redhat.com>
11870 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11872 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11873 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11874 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11875 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11876 for __libc_lock_* macros.
11877 * Makefile (routines): Add libc-lowlevellock.
11879 2002-10-09 Roland McGrath <roland@redhat.com>
11881 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11882 Under [__PIC__], call the function via the pointer fetched for
11883 comparison rather than a call by name that uses the PLT.
11884 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11885 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11886 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11887 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11888 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11890 2002-12-04 Roland McGrath <roland@redhat.com>
11892 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11894 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11895 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11897 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11899 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11901 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11902 a completely opaque, non-integer type.
11903 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11905 2002-12-05 Jakub Jelinek <jakub@redhat.com>
11907 * sysdeps/i386/tls.h: Include stdlib.h.
11908 * sysdeps/x86_64/tls.h: Likewise.
11910 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11912 * Makefile (tests): Add tst-locale2.
11913 (tests-static): Likewise.
11914 * tst-locale2.c: New file.
11916 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11917 volatile and add memory clobbers to lock operations.
11919 2002-12-03 Ulrich Drepper <drepper@redhat.com>
11921 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11922 * sysdeps/i386/i486/bits/atomic.h: New file.
11923 * sysdeps/i386/i586/bits/atomic.h: New file.
11924 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11925 include i486 version.
11926 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11927 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11928 Patch by Marijn Ros <marijn@mad.scientist.com>.
11930 * allocatestack.c (get_cached_stack): Don't crash if we first
11931 found a stack with a larger size then needed.
11932 Reported by Hui Huang <hui.huang@sun.com>.
11934 * Makefile (tests): Add tst-sysconf.
11935 * tst-sysconf.c: New file.
11937 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11938 PTHREAD_THREADS_MAX.
11940 2002-12-02 Roland McGrath <roland@redhat.com>
11942 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11943 Declare using hidden_proto instead of attribute_hidden, so there are
11944 non-.hidden static symbols for gdb to find.
11945 (__pthread_keys): Likewise.
11946 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11947 * allocatestack.c (__stack_user): Likewise.
11948 * pthread_create.c (__pthread_keys): Likewise.
11949 (__nptl_threads_events, __nptl_last_event): Make these static instead
11951 * pthread_key_create.c (__pthread_pthread_keys_max,
11952 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11954 2002-12-02 Ulrich Drepper <drepper@redhat.com>
11956 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11958 * tst-locale1.c: New file.
11960 * pthread_cond_timedwait.c: Include <stdlib.h>.
11962 * Makefile (tests): Add tst-fork2 and tst-fork3.
11963 * tst-fork2.c: New file.
11964 * tst-fork3.c: New file.
11966 2002-11-28 Ulrich Drepper <drepper@redhat.com>
11968 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11970 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11971 require it to 200112L.
11973 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11974 instruction only if HAVE_CMOV is defined.
11975 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11977 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11979 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11981 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11983 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11985 2002-11-27 Ulrich Drepper <drepper@redhat.com>
11987 * sysdeps/x86_64/bits/atomic.h: New file.
11989 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11992 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11993 possible since gettid cannot fail.
11995 * sysdeps/x86_64/pthreaddef.h: New file.
11997 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11999 * sysdeps/x86_64/pthread_spin_init.c: New file.
12000 * sysdeps/x86_64/pthread_spin_lock.c: New file.
12001 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12002 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12004 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12005 Add missing lock prefix. Minute optimization.
12007 * tst-spin2.c (main): Also check successful trylock call.
12009 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12010 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
12012 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12013 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
12015 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
12016 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12017 value in case of an error. Add support for INTERNAL_SYSCALL.
12019 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12020 value in case of an error.
12022 * sysdeps/x86_64/tls.h: New file.
12024 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12026 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12027 takes the array member name and the index as parameters.
12028 (THREAD_SETMEM_NC): Likewise.
12029 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12030 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12033 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12034 to decide which code to use.
12035 (THREAD_SETMEM_NC): Likewise.
12037 * allocatestack.c (queue_stack): Don't remove stack from list here.
12038 Do it in the caller. Correct condition to prematurely terminate
12039 loop to free stacks.
12040 (__deallocate_stack): Remove stack from list here.
12042 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12044 * Makefile (tests): Add tst-stack1.
12045 * tst-stack1.c: New file.
12047 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12050 * pthread_attr_getstack.c: Return bottom of the thread area.
12052 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12054 * Makefile (libpthread-routines): Add pt-allocrtsig and
12055 pthread_kill_other_threads.
12056 * pt-allocrtsig.c: New file.
12057 * pthread_kill_other_threads.c: New file.
12058 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12059 all three functions.
12060 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12062 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12063 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12064 and __libc_allocate_rtsig_private.
12065 * Versions (libpthread): Export pthread_kill_other_threads_np,
12066 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12068 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12070 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12071 the end of the stack. Adjust computations.
12072 When mprotect call fails dequeue stack and free it.
12073 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12075 * pthread_getattr_np.c: Likewise.
12077 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12080 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12082 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12083 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12085 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12087 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12088 * pthread_setspecific.c: Likewise.
12090 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12092 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12093 definitions. Get them from the official place.
12094 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12096 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12097 Use new CLONE_ flags in clone() calls.
12099 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12100 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12102 * Versions: Add pthread_* functions for libc.
12103 * forward.c: New file.
12105 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12107 * herrno.c: New file.
12110 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12111 sem_trywait, and sem_timedwait. Add herrno and res.
12112 * sem_init.c: Don't initialize lock and waiters members.
12113 * sem_open.c: Likewise.
12114 * sem_post.c: Removed.
12115 * sem_wait.c: Removed.
12116 * sem_trywait.c: Removed.
12117 * sem_timedwait.c: Removed.
12118 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12119 Includes full implementations of sem_post, sem_wait, sem_trywait,
12121 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12122 for new implementation.
12123 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12124 and waiters fields.
12126 * tst-sem3.c: Improve error message.
12127 * tst-signal3.c: Likewise.
12129 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12130 to tell the kernel about the termination futex and to initialize tid
12131 member. Don't initialize main_thread.
12132 * descr.h (struct pthread): Remove main_thread member.
12133 * cancelllation.c (__do_cancel): Remove code handling main thread.
12134 The main thread is not special anymore.
12136 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12137 size of the stacks to stack_cache_actsize.
12139 * pt-readv.c: Add missing "defined".
12140 * pt-sigwait.c: Likewise.
12141 * pt-writev.c: Likewise.
12143 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12145 * Versions: Export __connect from libpthread.
12146 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12148 * Makefile (libpthread-routines): Add pt-raise.
12149 * sysdeps/unix/sysv/linux/raise.c: New file.
12150 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12151 * sysdeps/generic/pt-raise.c: New file.
12153 * pthread_cond_init.c: Initialize all data elements of the condvar
12154 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12156 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12157 * pthread_create.c: Likewise.
12159 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12160 * tst-key1.c: New file.
12161 * tst-key2.c: New file.
12162 * tst-key3.c: New file.
12164 * Versions: Export pthread_detach for version GLIBC_2.0.
12165 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12167 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12169 * pthread_key_create.c: Terminate search after an unused key was found.
12170 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12172 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12173 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12175 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12177 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12178 dynamic lookup for errno in PIC.
12180 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12181 release the stack lock as soon as possible.
12182 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12183 the static TLS block.
12184 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12186 * cancellation.c: Renamed from cancelation.c.
12187 * Makefile: Adjust accordingly.
12188 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12189 * cleanup_defer.c: Use CANCELLATION_P.
12190 * pthread_testcancel.c: Likewise.
12191 * descr.h: Fix spelling in comments.
12192 * init.c: Likewise.
12193 * pthread_getattr_np.c: Likewise.
12194 * pthread_getschedparam.c: Likewise.
12195 * pthread_setschedparam.c: Likewise.
12196 * Versions: Likewise.
12198 * pt-pselect.c: New file.
12199 * Makefile (libpthread-routines): Add pt-pselect.
12200 * Versions: Add pselect.
12202 * tst-cancel4.c: New file.
12203 * Makefile (tests): Add tst-cancel4.
12205 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12207 * pthread_mutex_lock.c: Always record lock ownership.
12208 * pthread_mutex_timedlock.c: Likewise.
12209 * pthread_mutex_trylock.c: Likewise.
12211 * pt-readv.c: New file.
12212 * pt-writev.c: New file.
12213 * pt-creat.c: New file.
12214 * pt-msgrcv.c: New file.
12215 * pt-msgsnd.c: New file.
12216 * pt-poll.c: New file.
12217 * pt-select.c: New file.
12218 * pt-sigpause.c: New file.
12219 * pt-sigsuspend.c: New file.
12220 * pt-sigwait.c: New file.
12221 * pt-sigwaitinfo.c: New file.
12222 * pt-waitid.c: New file.
12223 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12224 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12225 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12226 * Versions: Add all the new functions.
12228 * tst-exit1.c: New file.
12229 * Makefile (tests): Add tst-exit1.
12231 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12233 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12235 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12237 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12238 call. pthread_join is an official cancellation point.
12239 * pthread_timedjoin.c: Likewise.
12241 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12242 and the condvar's mutex are retrieved.
12243 * pthread_cond_timedwait.c: Likewise.
12244 Reported by dice@saros.East.Sun.COM.
12246 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12248 * pthreadP.h: Cut out all type definitions and move them...
12249 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12250 * pthreadP.h: Include <internaltypes.h>.
12252 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12253 performance tweaks.
12255 * sem_trywait.c: Shuffle #includes around to get right order.
12256 * sem_timedwait.c: Likewise.
12257 * sem_post.c: Likewise.
12258 * sem_wait.c: Likewise.
12260 * nptl 0.3 released.
12262 * Makefile (tests): Add tst-signal3.
12263 * tst-signal3.c: New file.
12265 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12267 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12268 the asms modify the sem object.
12269 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12271 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12272 the actual members.
12273 * pthreadP.h (struct sem): New type. Actual semaphore type.
12274 * semaphoreP.h: Include pthreadP.h.
12275 * sem_getvalue.c: Adjust to sem_t change.
12276 * sem_init.c: Likewise.
12277 * sem_open.c: Likewise.
12278 * sem_post.c: Likewise.
12279 * sem_timedwait.c: Likewise.
12280 * sem_trywait.c: Likewise.
12281 * sem_wait.c: Likewise.
12283 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12285 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12286 * tst-basic2.c: New file.
12287 * tst-exec1.c: New file.
12288 * tst-exec2.c: New file.
12289 * tst-exec3.c: New file.
12291 * tst-fork1.c: Remove extra */.
12293 * nptl 0.2 released. The API for IA-32 is complete.