1 2012-09-13 H.J. Lu <hongjiu.lu@intel.com>
4 * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
7 2012-09-07 H.J. Lu <hongjiu.lu@intel.com>
9 * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
10 (LDLIBS-tst-cancel24): This.
12 2012-09-06 H.J. Lu <hongjiu.lu@intel.com>
15 * Makefile (tests-static): Add tst-cancel21-static.
17 * tst-cancel21-static.c: New file.
19 2012-09-01 Joseph Myers <joseph@codesourcery.com>
21 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
22 [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
23 [__NR_clock_getres]: Make code unconditional.
24 (pthread_getcpuclockid): Remove code left unreachable by removal
27 2012-08-31 Joseph Myers <joseph@codesourcery.com>
30 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
31 atomic_compare_and_exchange_bool_rel.
32 * tst-sem14.c: New file.
33 * Makefile (tests): Add tst-sem14.
35 2012-08-15 Roland McGrath <roland@hack.frob.com>
37 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
39 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
40 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
42 2012-08-16 Joseph Myers <joseph@codesourcery.com>
44 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
45 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
46 * pthread_condattr_setclock.c (pthread_condattr_setclock)
47 [!__ASSUME_POSIX_TIMERS]: Likewise.
48 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
49 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
50 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
51 [!__ASSUME_POSIX_TIMERS]: Likewise.
52 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
53 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
54 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
56 [!__NR-timer_create]: Remove conditional code.
57 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
58 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
60 [!__NR_timer_delete]: Remove conditional code.
61 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
62 * sysdeps/unix/sysv/linux/timer_getoverr.c
63 [__NR_timer_getoverrun]: Make code unconditional.
64 [!__NR_timer_getoverrun]: Remove conditional code.
65 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
66 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
67 Make code unconditional.
68 [!__NR_timer_gettime]: Remove conditional code.
69 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
70 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
71 Make code unconditional.
72 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
73 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
74 Make code unconditional.
75 [!__NR_timer_settime]: Remove conditional code.
76 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
77 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
78 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
81 2012-08-15 Tom de Vries <vries@codesourcery.com>
82 Maxim Kuvyrkov <maxim@codesourcery.com>
84 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
85 (__libc_lock_trylock): Allow pre-existing definitions.
87 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
89 * pthread_spin_lock.c: New file.
90 * pthread_spin_trylock.c: New file.
92 2012-08-08 Joseph Myers <joseph@codesourcery.com>
94 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
96 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
97 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
99 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
100 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
101 Make code unconditional.
102 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
103 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
104 __NR_tgkill]: Make code unconditional.
105 (raise) [__ASSUME_TGKILL]: Likewise.
106 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
107 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
108 [__ASSUME_TGKILL]: Make code unconditional.
109 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
110 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
111 __NR_tgkill]: Make code unconditional.
112 (raise) [__ASSUME_TGKILL]: Likewise.
113 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
115 2012-08-07 Joseph Myers <joseph@codesourcery.com>
117 * sysdeps/pthread/createthread.c (create_thread)
118 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
120 2012-08-03 Joseph Myers <joseph@codesourcery.com>
122 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
124 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
126 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
128 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
129 (pagesize): New static variable.
130 (allocate_and_test): Return MEM. Rename parameter to TARGET.
131 (check_stack_top): New local variables MEM and PAGEMASK. Cap
132 stack size to MAX_STACK_SIZE. Call allocate_and_test for
133 halfway up the stack top page. Verify that the top page was
135 (do_test): Get pagesize using sysconf.
137 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
139 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
141 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
142 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
145 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
147 * tst-pthread-getattr.c: Revert last change.
149 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
151 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
154 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
156 (check_stack_top): Read valued written into STACKADDR in
157 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
159 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
161 * nptl-init.c (sighandler_setxid): Fix the comment that
164 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
166 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
167 (__lll_robust_timedlock_wait): Simplify CFI directives.
169 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
172 * Makefile (tests): Add test case.
173 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
174 the __libc_stack_end page from stacksize. Truncate stacksize to
175 make it page aligned when it is computed from RLIMIT_STACK.
176 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
179 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
182 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
185 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
186 Jakub Jelinek <jakub@redhat.com>
189 * sysdeps/pthread/pthread.h
190 [!(defined __GNUC__ && defined __EXCEPTIONS)]
191 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
192 __libc_unlikely instead of __builtin_expect.
194 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
197 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
198 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
199 * sysdeps/unix/sysv/linux/i386/Implies: New file.
200 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
201 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
203 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
204 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
206 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
208 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
211 * nptl-init.c (pthread_functions): Remove use of INTUSE and
213 (__pthread_initialize_minimal_internal): Likewise.
214 * sem_open.c: Likewise.
215 * sem_unlink.c: Likewise.
216 * pthreadP.h: Replace _internal aliases by hidden_proto
218 * pthread_getspecific.c: Replace _internal alias by hidden_def.
219 * pthread_key_create.c: Likewise.
220 * pthread_mutex_destroy.c: Likewise.
221 * pthread_mutex_init.c: Likewise.
222 * pthread_mutex_lock.c: Likewise.
223 * pthread_mutex_unlock.c: Likewise.
224 * pthread_once.c: Likewise.
225 * pthread_rwlock_rdlock.c: Likewise.
226 * pthread_rwlock_unlock.c: Likewise.
227 * pthread_rwlock_wrlock.c: Likewise.
228 * pthread_setspecific.c: Likewise.
229 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
231 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
233 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
235 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
236 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
237 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
238 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
239 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
240 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
241 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
242 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
243 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
244 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
246 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
248 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
251 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
253 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
254 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
256 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
257 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
259 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
260 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
261 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
262 (pthread_barrier_wait): Likewise.
263 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
264 (__pthread_cond_broadcast): Likewise.
265 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
266 (__pthread_cond_signal): Likewise.
267 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
268 (__pthread_cond_timedwait): Likewise.
269 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
271 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
272 (__pthread_rwlock_rdlock): Likewise.
273 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
274 (pthread_rwlock_timedrdlock): Likewise.
275 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
276 (pthread_rwlock_timedwrlock): Likewise.
277 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
278 (__pthread_rwlock_unlock): Likewise.
279 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
280 (__pthread_rwlock_wrlock): Likewise.
281 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
282 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
283 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
285 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
287 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
290 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
291 __libc_stack_end rounded to the end of containing page as the
294 2012-05-25 Rayson Ho <rho@redhat.com>
296 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
298 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
299 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
302 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
303 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
304 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
305 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
307 2012-05-25 Rayson Ho <rho@redhat.com>
308 Roland McGrath <roland@hack.frob.com>
310 * DESIGN-systemtap-probes.txt: New file.
311 * pthread_cond_broadcast.c: SystemTap probes.
312 * pthread_cond_init.c: Likewise.
313 * pthread_cond_signal.c: Likewise.
314 * pthread_cond_wait.c: Likewise.
315 * pthread_cond_destroy.c: Likewise.
316 * pthread_create.c: Likewise.
317 * pthread_join.c: Likewise.
318 * pthread_mutex_destroy.c: Likewise.
319 * pthread_mutex_init.c: Likewise.
320 * pthread_mutex_lock.c: Likewise.
321 * pthread_mutex_timedlock.c: Likewise.
322 * pthread_mutex_unlock.c: Likewise.
323 * pthread_rwlock_destroy.c: Likewise.
324 * pthread_rwlock_rdlock.c: Likewise.
325 * pthread_rwlock_unlock.c: Likewise.
326 * pthread_rwlock_wrlock.c: Likewise.
327 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
328 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
329 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
330 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
331 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
332 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
333 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
334 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
336 2012-05-24 Roland McGrath <roland@hack.frob.com>
338 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
340 2012-05-17 Andreas Jaeger <aj@suse.de>
342 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
343 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
344 only for older kernels.
346 2012-05-15 Joseph Myers <joseph@codesourcery.com>
348 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
351 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
353 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
354 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
355 (lll_robust_lock): Likewise.
356 (lll_cond_lock): Likewise.
357 (lll_robust_cond_lock): Likewise.
358 (lll_timedlock): Likewise.
359 (lll_robust_timedlock): Likewise.
360 (lll_unlock): Likewise.
361 (lll_robust_unlock): Likewise.
363 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
365 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
366 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
368 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
370 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
372 (__gcc_personality_v0): Replace 8-byte data alignment with
373 LP_SIZE alignment and .quad with ASM_ADDR.
375 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
377 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
379 (__gcc_personality_v0): Replace 8-byte data alignment with
380 LP_SIZE alignment and .quad with ASM_ADDR.
382 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
384 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
385 NWAITERS, which is unsigned long int.
387 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
389 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
390 (__gcc_personality_v0): Replace 8-byte data alignment with
391 LP_SIZE alignment and .quad with ASM_ADDR.
393 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
395 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
396 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
397 __vdso_clock_gettime pointer into RAX_LP.
398 (__gcc_personality_v0): Replace 8-byte data alignment with
399 LP_SIZE alignment and .quad with ASM_ADDR.
401 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
403 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
404 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
405 __vdso_clock_gettime pointer into RAX_LP.
406 (__gcc_personality_v0): Replace 8-byte data alignment with
407 LP_SIZE alignment and .quad with ASM_ADDR.
409 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
411 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
412 LP_OP(cmp) and R8_LP on dep_mutex pointer.
414 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
416 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
417 to update pointer in memory. Load pointer into RDI_LP.
419 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
421 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
422 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
424 (LLL_STUB_UNWIND_INFO_END): Likewise.
425 (lll_timedlock): Load timeout pointer into RDX_LP.
426 (lll_robust_timedlock): Likewise.
428 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
429 Jakub Jelinek <jakub@redhat.com>
432 * Makefile (tests): Add test cases.
433 * descr.h (struct pthread): Add a comment describing multiple_threads.
434 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
436 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
437 before setting cancelstate of the thread.
438 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
439 (__libc_multiple_threads): Add explanatory comment.
440 * tst-cancel-self-cancelstate.c: New test case.
441 * tst-cancel-self-canceltype.c: Likewise.
442 * tst-cancel-self-cleanup.c: Supporting file for test cases.
443 * tst-cancel-self-testcancel.c: New test case.
444 * tst-cancel-self.c: Likewise.
445 * vars.c: Expand comment to include single-process case.
447 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
449 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
450 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
453 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
455 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
457 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
458 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
460 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
462 * shlib-versions: Move x86_64-.*-linux.* entry to ...
463 * sysdeps/x86_64/64/shlib-versions: Here. New file.
464 * sysdeps/x86_64/x32/shlib-versions: New file.
466 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
468 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
469 __SIZEOF_PTHREAD_XXX_T.
470 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
471 (pthread_mutex_t): Likewise.
472 (pthread_rwlock_t): Likewise.
473 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
476 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
478 * sysdeps/x86_64/x32/tls.h: New file.
480 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
482 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
484 (THREAD_SETMEM_NC): Likewise.
486 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
488 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
491 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
493 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
494 (__cleanup_fct_attribute): Check __x86_64__ instead of
497 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
499 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
500 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
501 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
502 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
503 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
505 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
507 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
508 instead of __WORDSIZE.
510 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
513 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
515 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
517 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
518 (__pthread_cond_timedwait): Use CFI directives.
519 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
520 (__pthread_cond_wait): Likewise.
521 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
522 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
524 2012-05-03 David S. Miller <davem@davemloft.net>
526 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
527 always have to return 0, especially for the pthread_spin_init
529 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
531 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
532 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
534 2012-05-02 David S. Miller <davem@davemloft.net>
536 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
537 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
538 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
539 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
540 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
541 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
542 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
543 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
544 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
545 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
546 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
547 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
548 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
549 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
550 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
551 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
552 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
553 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
555 2012-05-02 Allan McRae <allan@archlinux.org>
557 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
558 (LDFLAGS-tst-cancel24): Likewise.
560 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
562 * sysdeps/i386/pthread_spin_lock.S: New.
563 * sysdeps/i386/pthread_spin_lock.c: Delete.
564 * sysdeps/x86_64/pthread_spin_lock.S: New.
565 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
567 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
569 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
570 run when cross-compiling.
572 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
574 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
575 instead of libgcc_s.h.
577 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
579 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
581 2012-03-27 David S. Miller <davem@davemloft.net>
583 * tst-cond16.c (do_test): Use a thread stack size which is either
584 PTHREAD_STACK_MIN or the page size, whichever is larger.
585 * tst-cond18.c (do_test): Likewise.
587 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
589 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
590 register char * __asm__("rsp") to get stack frame.
592 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
594 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
597 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
599 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
602 2012-03-16 David S. Miller <davem@davemloft.net>
605 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
607 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
610 2012-03-15 David S. Miller <davem@davemloft.net>
613 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
615 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
618 * pt-crti.S: Replace FSF snail mail address with URL.
620 2012-03-09 Joseph Myers <joseph@codesourcery.com>
622 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
623 Do not define before including <time.h>.
625 2012-03-08 David S. Miller <davem@davemloft.net>
627 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
629 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
631 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
632 Check for timestamp before the Epoch.
634 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
637 * tst-sem13.c (do_test): Add another test case.
638 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
639 Fix updating nwaiters.
641 2012-03-07 Joseph Myers <joseph@codesourcery.com>
644 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
645 link test to a compile test.
646 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
648 * sysdeps/pthread/configure: Regenerated.
650 2012-03-07 Ulrich Drepper <drepper@gmail.com>
652 * Makefile (distribute): Remove variable.
654 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
656 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
657 superfluous assignment.
658 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
660 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
661 (sem_timedwait): Likewise.
663 2012-03-06 Ulrich Drepper <drepper@gmail.com>
665 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
666 installed headers to...
667 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
669 2012-03-06 David S. Miller <davem@davemloft.net>
671 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
672 atomic_increment and remove unused local variable.
673 (__old_sem_post): Likewise.
675 2012-02-27 David S. Miller <davem@davemloft.net>
677 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
678 non-existing __pthread_attr.
679 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
680 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
681 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
682 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
683 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
685 2012-02-26 Ulrich Drepper <drepper@gmail.com>
687 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
689 * sysdeps/pthread/pthread.h: Define __need_timespec before including
691 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
693 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
694 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
695 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
696 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
697 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
699 2012-02-21 Joseph Myers <joseph@codesourcery.com>
702 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
704 [crti.S not in sysdirs] (omit-deps): Do not append.
705 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
706 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
707 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
708 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
709 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
710 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
711 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
712 [crti.S in sysdirs] (extra-objs): Append unconditionally.
713 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
715 * sysdeps/pthread/pt-initfini.c: Remove file.
717 2012-02-16 Richard Henderson <rth@twiddle.net>
719 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
720 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
722 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
724 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
726 2012-02-16 David S. Miller <davem@davemloft.net>
728 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
730 2012-02-15 Marek Polacek <polacek@redhat.com>
732 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
734 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
736 Replace FSF snail mail address with URLs, as per GNU coding standards.
738 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
740 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
742 2012-02-08 Joseph Myers <joseph@codesourcery.com>
744 Support crti.S and crtn.S provided directly by architectures.
745 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
746 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
747 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
748 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
749 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
750 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
751 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
752 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
753 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
754 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
755 * pt-crti.S: New file.
756 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
758 2012-02-03 Joseph Myers <joseph@codesourcery.com>
760 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
761 macros for PIC register setup.
762 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
763 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
764 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
765 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
766 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
768 2012-01-11 Marek Polacek <polacek@redhat.com>
770 * forward.c (FORWARD_NORETURN): Define macro.
771 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
772 (__pthread_exit): Likewise.
774 2012-01-10 Ulrich Drepper <drepper@gmail.com>
776 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
778 * pthreadP.h: Add noreturn to __pthread_exit.
779 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
781 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
783 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
784 Call pthread_attr_setstacksize() with result of
785 __pthread_get_minstack() to account for application TLS usage.
787 2012-01-08 Marek Polacek <polacek@redhat.com>
789 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
791 2012-01-07 Ulrich Drepper <drepper@gmail.com>
794 * pthreadP.h: Use const instead of __const.
795 * semaphore.h: Likewise.
796 * sysdeps/pthread/bits/libc-lock.h: Likewise.
797 * sysdeps/pthread/bits/sigthread.h: Likewise.
798 * sysdeps/pthread/pthread.h: Likewise.
800 * Makefile: Remove elf=yes test, only ELF is supported.
802 * shlib-versions: Remove entries for ports architectures.
804 In case anyone cares, the IA-64 architecture could move to ports.
805 * sysdeps/ia64/*: Removed.
806 * sysdeps/unix/sysv/linux/ia64/*: Removed.
808 2011-12-22 Ulrich Drepper <drepper@gmail.com>
810 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
811 __pthread_get_minstack.
812 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
815 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
816 through __pthread_get_minstack.
817 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
818 directly from _rtld_global_ro.
819 (__pthread_get_minstack): New function.
820 * pthreadP.h: Declare __pthread_get_minstack.
821 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
823 2011-12-21 Ulrich Drepper <drepper@gmail.com>
826 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
827 Correct reading name from file.
829 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
831 * allocatestack.c (allocate_stack): Return errno on failure.
833 2011-12-14 Jeff Law <law@redhat.com>
836 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
838 2011-11-28 Andreas Schwab <schwab@redhat.com>
840 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
841 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
842 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
844 2011-11-15 Ulrich Drepper <drepper@gmail.com>
846 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
849 2011-10-29 Ulrich Drepper <drepper@gmail.com>
852 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
853 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
854 path for kernels with FUTEX_CLOCK_REALTIME.
855 Debugged by H.J. Lu <hjl.tools@gmail.com>.
857 2011-10-27 Andreas Schwab <schwab@redhat.com>
860 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
861 for memory synchronization functions.
862 * semaphore.h: Likewise.
864 2011-10-24 Ulrich Drepper <drepper@gmail.com>
866 * tst-cancel7.c: Avoid warning.
867 * tst-mutex6.c: Likewise.
868 * tst-mutex9.c: Likewise.
869 * tst-mutexpi6.c: Likewise.
871 2011-10-23 Ulrich Drepper <drepper@gmail.com>
873 * sysdeps/i386/tls.h: Remove #include <list.h>.
875 2011-10-15 Ulrich Drepper <drepper@gmail.com>
877 * pthread_create.c (start_thread): Call __ctype_init.
879 2011-09-15 Andreas Schwab <schwab@redhat.com>
881 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
883 (list_add): Add atomic_write_barrier.
884 * descr.h: Define __need_list_t before including <list.h>.
885 * nptl-init.c: Include <list.h>
886 * allocatestack.c: Likewise.
888 2011-09-11 Ulrich Drepper <drepper@gmail.com>
890 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
891 * sysdeps/ia64/tls.h: Likewise.
892 * sysdeps/powerpc/tls.h: Likewise.
893 * sysdeps/s390/tls.h: Likewise.
894 * sysdeps/sh/tls.h: Likewise.
895 * sysdeps/sparc/tls.h: Likewise.
896 * sysdeps/x86_64/tls.h: Likewise.
898 2011-09-10 Ulrich Drepper <drepper@gmail.com>
900 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
902 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
904 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
905 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
906 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
907 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
908 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
909 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
910 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
911 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
912 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
913 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
914 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
915 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
917 * tst-tls1.c: Support for __thread is now mandatory.
918 * tst-tls2.c: Likewise.
919 * tst-tls3.c: Likewise.
920 * tst-tls3mod.c: Likewise.
921 * tst-tls4.c: Likewise.
922 * tst-tls4moda.c: Likewise.
923 * tst-tls4modb.c: Likewise.
924 * tst-tls5.h: Likewise.
926 2011-09-08 Ulrich Drepper <drepper@gmail.com>
929 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
930 (pthread_rwlock_timedwrlock): Use correct macro in test.
931 Patch by H.J. Lu <hongjiu.lu@intel.com>.
933 2011-09-06 Ulrich Drepper <drepper@gmail.com>
935 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
936 use gettimeofday vsyscall, just call gettimeofday.
937 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
938 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
939 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
941 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
943 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
944 Simplify __vdso_clock_gettime use.
946 2011-09-05 David S. Miller <davem@davemloft.net>
948 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
950 (sem_timedwait): Call it to force an exception region around
951 the async cancel enable and the futex operation.
952 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
953 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
954 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
955 (__new_sem_wait): Call it to force an exception region around
956 the async cancel enable and the futex operation.
957 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
958 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
960 2011-08-31 Andreas Schwab <schwab@redhat.com>
962 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
965 2011-08-20 David S. Miller <davem@davemloft.net>
967 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
969 2011-08-14 Roland McGrath <roland@hack.frob.com>
971 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
972 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
974 2011-08-08 Andreas Schwab <schwab@redhat.com>
976 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
978 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
979 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
981 2011-07-22 Ulrich Drepper <drepper@gmail.com>
983 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
985 (__gcc_personality_v0): Likewise.
986 (_Unwind_ForcedUnwind): Likewise.
987 (_Unwind_GetCFA): Likewise.
989 2011-07-14 Roland McGrath <roland@hack.frob.com>
991 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
994 2011-06-30 Ulrich Drepper <drepper@gmail.com>
996 * nptl-init.c (__nptl_set_robust): New function.
997 (pthread_functions): Add reference.
998 * npthreadP.h: Declare __nptl_set_robust.
999 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1000 ptr_set_robust member.
1001 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1002 child if threads are used.
1004 2011-06-14 Andreas Jaeger <aj@suse.de>
1006 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1008 2011-05-11 Ulrich Drepper <drepper@gmail.com>
1011 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1013 2011-04-10 Ulrich Drepper <drepper@gmail.com>
1016 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1018 Patch partly by Robert Rex <robert.rex@exasol.com>.
1020 2011-01-19 Roland McGrath <roland@redhat.com>
1022 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1023 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1024 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1025 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1026 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1027 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1029 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1031 * Makefile (test-extras): Add tst-cleanup4aux.
1033 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1036 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1037 (__SETXID_2): Likewise.
1038 (__SETXID_3): Likewise.
1040 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1043 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1044 * alloca_cutoff.c: Add libc_hidden_def.
1046 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1049 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1050 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1051 of "struct pthread".
1053 2010-09-21 Andreas Schwab <schwab@redhat.com>
1055 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1056 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1057 (pthread_cleanup_push_defer_np): Likewise.
1059 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1061 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1064 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1065 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1067 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1068 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1070 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1072 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1074 2010-05-01 Alan Modra <amodra@gmail.com>
1076 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1077 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1078 to save temps. Correct cfi for possible later frame manipulation.
1079 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1080 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1081 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1082 (DOCARGS_6, UNDOCARGS_6): Likewise.
1083 (CENABLE, CDISABLE): Add nops for non-shared calls.
1085 2010-07-06 Andreas Schwab <schwab@redhat.com>
1087 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1090 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1092 * tst-abstime.c (do_test): Some more cleanups
1094 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1096 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1098 2010-07-01 Andreas Schwab <schwab@redhat.com>
1099 Ulrich Drepper <drepper@redhat.com>
1101 * Makefile (tests): Add tst-abstime.
1102 * tst-abstime.c: New file.
1103 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1104 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1105 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1106 (__lll_timedlock_wait): Likewise.
1107 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1108 (__lll_robust_timedlock_wait): Likewise.
1109 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1110 (__pthread_cond_timedwait): Likewise.
1111 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1112 (pthread_rwlock_timedrdlock): Likewise.
1113 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1114 (pthread_rwlock_timedwrlock): Likewise.
1115 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1118 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1120 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1122 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1124 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1125 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1127 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1130 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1131 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1132 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1134 * Makefile (libpthread-routines): Add pthread_getname and
1136 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1138 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1140 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1141 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1142 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1143 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1145 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1147 * pthread_cond_timedwait.c: Add check for
1148 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1149 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1152 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1154 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1155 and the call fails wake eventually waiting setxid threads. Don't free
1156 stack here if we try starting a thread.
1157 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1158 if the clone call failed.
1160 2010-03-08 Andreas Schwab <schwab@redhat.com>
1162 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1163 * allocatestack.c (get_cached_stack): Set setxid_futex.
1164 (allocate_stack): Likewise.
1166 2010-03-05 Andreas Schwab <schwab@redhat.com>
1167 Ulrich Drepper <drepper@redhat.com>
1169 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1170 it is creating a thread or it is just being created.
1171 * pthread_create.c (start_thread): Wake setxid thread if it is
1173 (__pthread_create_2_1): Initialize setxid_futex.
1174 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1177 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1179 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1181 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1183 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1185 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1186 Fix pthread_cond_timedwait with requeue-PI.
1187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1188 Fix pthread_cond_wait with requeue-PI.
1190 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1192 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1193 and pthread_mutexattr_setrobust for GLIBC_2.12.
1194 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1195 * pthread_mutexattr_getrobust.c: Define alias
1196 pthread_mutexattr_getrobust.
1197 * pthread_mutexattr_setrobust.c: Define alias
1198 pthread_mutexattr_setrobust.
1200 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1202 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1204 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1206 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1208 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1210 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1211 call __gmon_start__.
1212 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1214 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1216 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1219 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1221 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1222 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1223 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1224 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1225 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1226 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1227 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1228 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1230 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1232 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1233 Don't update nwaiters after invalid timeout is recognized.
1235 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1237 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1240 2009-11-27 Andreas Schwab <schwab@redhat.com>
1242 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1243 THREAD_SELF->cancelhandling after returning from futex call.
1245 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1247 * tst-sem13.c: New file.
1248 * Makefile (tests): Add tst-sem13.
1250 2009-11-22 Roland McGrath <roland@redhat.com>
1252 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1253 instead of recapitulating its contents.
1255 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1257 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1258 optimizations and cleanups.
1260 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1262 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1263 Remove redundant code. Fix cfi offsets.
1264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1267 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1269 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1270 reduce size of unwind info.
1272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1275 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1277 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1280 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1282 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1284 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1286 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1289 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1290 steps to avoid races with creation and terminations.
1291 * nptl-init.c (sighandler_setxid): Adjust.
1292 Patch by Daniel Jacobowitz.
1294 2009-09-07 Andreas Schwab <schwab@redhat.com>
1296 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1298 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1299 Joseph Myers <joseph@codesourcery.com>
1302 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1303 Initialize the sigev_notify field for newly created timer to make sure
1304 the timer gets deleted from the active timer's list upon timer_delete.
1306 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1308 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1309 Correct a logic error.
1311 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1313 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1314 of the field in local variables.
1315 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1316 variable and don't unconditionally clear it.
1318 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1320 * pthread_create.c (start_thread): Hint to the kernel that memory for
1321 the stack can be reused. We do not mark all the memory. The part
1322 still in use and some reserve are kept.
1324 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1326 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1328 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1330 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1333 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1335 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1337 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1339 2009-08-10 Andreas Schwab <schwab@redhat.com>
1341 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1342 (__pthread_cond_signal): Don't clobber register used for syscall
1345 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1347 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1348 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1350 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1351 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1354 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1356 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1357 enabled by the special *_asynccancel functions.
1358 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1359 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1361 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1363 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1365 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1366 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1367 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1368 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1369 since we can assume the special __*_{en,dis}able_asynccancel
1371 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1372 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1373 and PTHREAD_CANCELED.
1375 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1377 * descr.h: Better definition of *_BITMASK macros for cancellation.
1379 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1381 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1383 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1384 dynamic linker might have to save.
1385 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1386 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1389 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1391 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1393 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1395 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1396 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1397 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1398 requeue_pi for robust mutexes.
1399 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1400 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1401 Don't only skip __pthread_mutex_cond_lock. Call instead
1402 __pthread_mutex_cond_lock_adjust.
1403 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1405 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1406 optimization of PI mutex handling.
1408 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1411 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1412 instead of of _acq variants of cmpxchg.
1414 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1416 * sysdeps/x86_64/configure.in: New file.
1418 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1419 path when not using absolute timeout futex.
1421 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1423 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1424 optimizations of last changes.
1425 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1427 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1429 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1430 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1431 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1432 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1433 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1434 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1435 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1436 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1438 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1439 (__pthread_cond_timedwait): Make more robust.
1441 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1443 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1444 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1445 directly use absolute timeout.
1447 * tst-sem5.c (do_test): Add test for premature timeout.
1448 * Makefile: Linu tst-sem5 with librt.
1450 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1451 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1452 directly use absolute timeout.
1453 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1454 (pthread_rwlock_timedrdlock): Likewise.
1456 * tst-cond11.c (run_test): Add test to check that the timeout is
1459 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1460 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1461 directly use absolute timeout.
1463 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1464 (__pthread_cond_wait): Convert to using exception handler instead of
1465 registered unwind buffer.
1466 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1467 (__pthread_cond_timedwait): Likewise.
1469 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1471 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1472 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1473 use absolute timeout.
1475 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1476 handling of uncontested semaphore.
1478 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1479 (__condvar_cleanup): Rewrite to use cfi directives instead of
1480 hand-coded unwind tables.
1481 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1483 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1484 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1487 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1489 * Makefile (libpthread-routines): Add pthread_sigqueue.
1490 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1491 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1492 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1494 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1497 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1498 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1500 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1502 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1504 * libc-cancellation.c: Move __libc_cleanup_routine to...
1505 * libc-cleanup.c: ...here. New file.
1506 * Makefile (routines): Add libc-cleanup.
1508 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1510 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1511 * sysdeps/pthread/librt-cancellation.c: Likewise.
1514 * nptl-init.c: Renamed from init.c.
1515 * Makefile: Change all occurences of init.c to nptl-init.c.
1517 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1519 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1520 to test when deciding on the delay.
1521 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1522 * pthread_cancel.c: Close race between deciding on sending a signal
1523 and setting the CANCELING_BIT bit.
1525 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1527 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1529 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1531 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1533 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1534 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1535 * sysdeps/i386/tls.h: Likewise.
1536 (tcbhead_t): Add __private_tm member.
1538 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1540 * sem_open.c (sem_open): Rewrite initialization of initsem to
1543 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1544 Avoid warning by using may_alias attribute on ptrhack.
1546 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1549 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1550 Check policy and priority for validity.
1551 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1553 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1555 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1556 (__pthread_cond_timedwait): Change to use cfi directives instead of
1557 hand-coded unwind sections.
1559 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1561 * init.c (nptl_freeres): Compile only for SHARED.
1563 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1565 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1566 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1567 FUTEX_BITSET_MATCH_ANY.
1569 2009-02-27 Roland McGrath <roland@redhat.com>
1571 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1572 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1574 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1576 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1577 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1578 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1581 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1583 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1586 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1588 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1589 Unify name of include protector macro.
1591 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1593 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1594 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1596 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1598 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1601 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1602 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1603 * init.c (nptl_freeres): New function.
1604 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1605 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1606 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1608 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1609 load DSO. Assign last.
1610 (__unwind_freeres): New function.
1612 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1613 for better debugging. No need to use stack_list_add here.
1615 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1617 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1618 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1619 instead of computing relative timeout.
1620 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1621 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1623 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1625 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1627 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1629 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1630 (list_add_tail): Removed.
1632 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1634 * (in_flight_stack): New variable.
1635 (stack_list_del): New function. Use instead of list_del.
1636 (stack_list_add): New function. Use instead of list_add when adding to
1637 stack_cache and stack_used lists.
1638 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1639 when the fork call interrupted another thread.
1641 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1643 * init.c (__pthread_initialize_minimal_internal): Optimize test
1644 FUTEX_CLOCK_REALTIME a bit.
1646 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1648 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1649 only passing five parameters to FUTEX_WAIT_BITSET call.
1651 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1652 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1653 instead of computing relative timeout.
1655 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1657 * init.c (__pthread_initialize_minimal_internal): Check for
1658 FUTEX_CLOCK_REALTIME flag.
1659 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1660 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1663 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1664 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1665 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1666 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1667 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1668 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1670 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1672 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1673 loop body instead of ; to avoid gcc warnings.
1674 (pthread_cleanup_pop_restore_np): Likewise.
1675 Patch by Caolán McNamara <caolanm@redhat.com>.
1677 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1679 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1680 fast path here, for robust/PI/PP mutexes call
1681 __pthread_mutex_lock_full. Don't use switch, instead use a series
1682 of ifs according to their probability.
1683 (__pthread_mutex_lock_full): New function.
1684 * pthread_mutex_unlock.c: Include assert.h.
1685 (__pthread_mutex_unlock_usercnt): Handle only the
1686 fast path here, for robust/PI/PP mutexes call
1687 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1688 of ifs according to their probability.
1689 (__pthread_mutex_unlock_full): New function.
1690 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1691 (__pthread_mutex_lock_full): Define.
1693 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1695 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1696 implementation. Add necessary padding and.
1697 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1700 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1702 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1703 and FUTEX_WAKE_BITSET.
1705 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1707 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1708 and FUTEX_WAKE_BITSET.
1709 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1710 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1711 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1712 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1714 2008-11-25 Roland McGrath <roland@redhat.com>
1716 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1717 Subdirectories moved to ports repository as
1718 sysdeps/.../nptl subdirectories.
1720 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1723 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1725 * pthread_cond_init.c (__pthread_cond_init): Fix
1726 cond->__data.__nwaiters initialization.
1727 * Makefile (tests): Add tst-cond23.
1728 * tst-cond23.c: New test.
1730 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1732 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1734 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1737 2008-11-01 Ulrich Drepper <drepper@redhat.com>
1740 * pthread_mutex_lock.c: Add support for private PI mutexes.
1741 * pthread_mutex_timedlock.c: Likewise.
1742 * pthread_mutex_trylock.c: Likewise.
1743 * pthread_mutex_unlock.c: Likewise.
1744 Patch mostly by Ben Jackson <ben@ben.com>.
1746 2008-10-31 Ulrich Drepper <drepper@redhat.com>
1749 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1750 Increase stack size for helper thread.
1752 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1754 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1755 assembly with a clobber list for access registers a0 and a1.
1757 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1759 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1760 to force runp->refcntr to be read from memory.
1762 2008-09-08 Richard Guenther <rguenther@suse.de>
1764 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1765 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1766 lll_timedlock, lll_robust_timedlock, lll_unlock,
1767 lll_robust_unlock): Promote private to int.
1769 2008-08-15 Ulrich Drepper <drepper@redhat.com>
1771 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1772 ARCH_RETRY_MMAP definitions.
1773 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1774 Define MAP_STACK when not defined.
1775 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1776 handling of ARCH_RETRY_MMAP.
1778 2008-07-30 Ulrich Drepper <drepper@redhat.com>
1780 * tst-align2.c (f): Print message that f is reached.
1782 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1785 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1786 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1788 2008-07-25 Ulrich Drepper <drepper@redhat.com>
1790 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1791 SOCK_CLOEXEC if possible.
1793 2008-05-29 Ulrich Drepper <drepper@redhat.com>
1795 * Makefile (tests): Add tst-rwlock2a.
1796 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1797 * tst-rwlock2a.c: New file.
1799 2008-06-12 Ulrich Drepper <drepper@redhat.com>
1801 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1803 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1805 * sysdeps/pthread/pthread.h: Fix typo in comment.
1807 2008-05-28 Ulrich Drepper <drepper@redhat.com>
1809 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1810 of CPU set to the kernel.
1812 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1814 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1816 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1817 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1818 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1819 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1820 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1821 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1823 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1825 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1827 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1829 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1831 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1834 2008-05-26 Ulrich Drepper <drepper@redhat.com>
1836 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1838 2008-05-20 Jakub Jelinek <jakub@redhat.com>
1840 David S. Miller <davem@davemloft.net>
1842 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1844 2008-05-10 Ulrich Drepper <drepper@redhat.com>
1846 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1847 __pshared correctly.
1848 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1850 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1852 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1854 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1856 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1858 2008-04-14 David S. Miller <davem@davemloft.net>
1860 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1861 (__old_sem_wait): Fix argument to lll_futex_wait().
1863 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1865 * pthread_create.c: Require pthread_mutex_trylock and
1866 pthread_key_delete for libgcc.
1868 2008-04-08 Jakub Jelinek <jakub@redhat.com>
1871 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1872 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1873 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1875 2008-03-27 Ulrich Drepper <drepper@redhat.com>
1877 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1878 <linux/limits.h> has defined it.
1879 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1880 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1881 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1882 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1884 2008-03-18 Jakub Jelinek <jakub@redhat.com>
1886 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1888 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1889 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1891 2008-03-14 Ulrich Drepper <drepper@redhat.com>
1893 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1894 HAVE_DL_DISCOVER_OSVERSION.
1895 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1896 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1898 2008-03-07 Ulrich Drepper <drepper@redhat.com>
1901 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1902 _POSIX_CHOWN_RESTRICTED value to zero.
1904 2008-01-31 Roland McGrath <roland@redhat.com>
1906 * Makefile (omit-deps): Variable removed.
1908 2008-01-30 Ulrich Drepper <drepper@redhat.com>
1910 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1911 unnecessary addr32 prefix.
1913 2008-01-29 Roland McGrath <roland@redhat.com>
1915 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1917 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1919 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1921 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1923 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1925 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1926 (__lll_lock_wait_private): Fix typo.
1927 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1928 (pthread_barrier_wait): Likewise. Adjust XADD use.
1929 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1931 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1932 (pthread_rwlock_timedrdlock): Return correct return value.
1933 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1934 (pthread_rwlock_timedwrlock): Likewise.
1936 2008-01-15 Ulrich Drepper <drepper@redhat.com>
1938 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1939 thread returns the program exits with an error code.
1941 2008-01-10 Ulrich Drepper <drepper@redhat.com>
1943 * pthread-errnos.sym: Add EOVERFLOW.
1944 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1945 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1946 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1947 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1949 2007-12-14 Ulrich Drepper <drepper@redhat.com>
1951 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1952 parameter. Passed it as permission to mmap.
1953 * allocatestack.c (allocate_stack): Pass prot as second parameter
1956 2007-12-12 Ulrich Drepper <drepper@redhat.com>
1958 * tst-basic7.c: Allocate memory for the stack.
1961 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1962 (__pthread_cond_timedwait): Don't use VDSO.
1963 Patch by Michal Januszewski.
1965 2007-12-07 Ulrich Drepper <drepper@redhat.com>
1968 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1969 Allow label before pthread_cleanup_pop.
1970 (pthread_cleanup_pop_restore_np): Likewise.
1972 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1974 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1975 Store 2 before returning ETIMEDOUT.
1977 2007-11-23 Ulrich Drepper <drepper@redhat.com>
1979 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1980 Store 2 before returning ETIMEDOUT.
1981 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1982 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1983 (__lll_lock_wait_private): Optimize.
1984 (__lll_lock_wait): Likewise.
1986 2007-11-20 Jakub Jelinek <jakub@redhat.com>
1988 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1989 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1990 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1992 2007-11-08 Ulrich Drepper <drepper@redhat.com>
1995 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1996 If we time out, try one last time to lock the futex to avoid
1997 losing a wakeup signal.
1998 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1999 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2002 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2005 2007-11-07 Ulrich Drepper <drepper@redhat.com>
2008 * allocatestack.c (allocate_stack): Change ENOMEM error in case
2009 mmap failed to EAGAIN.
2010 * Makefile (tests): Add tst-basic7.
2011 * tst-basic7.c: New file.
2013 2007-11-05 Ulrich Drepper <drepper@redhat.com>
2015 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2016 Use __linkin_atfork.
2018 2007-11-03 Mike Frysinger <vapier@gentoo.org>
2020 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2021 missing line continuations.
2022 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2023 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
2025 2007-10-28 Ulrich Drepper <drepper@redhat.com>
2028 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2029 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2030 (struct timer): Add next element.
2031 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2032 enqueue timer structure into __active_timer_sigev_thread list.
2033 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2034 remove timer struct from __active_timer_sigev_thread.
2035 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2036 Before using timer structure make sure it is still on the
2037 __active_timer_sigev_thread list. Keep lock until done.
2038 Define __active_timer_sigev_thread and
2039 __active_timer_sigev_thread_lock.
2041 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2043 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2044 Redefine thread_atfork for use of ATFORK_MEM.
2045 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2046 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2048 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2049 Use atomic operation when removing first element of list.
2051 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2053 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2054 routine instead of an alias to __new_sem_post.
2056 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2058 * init.c (__pthread_initialize_minimal): Initialize word to appease
2061 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2063 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2064 libc.so just clear NAME.
2065 (__libc_rwlock_fini): Nop inside of libc.so.
2066 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2069 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2071 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2072 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2074 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2076 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2079 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2080 reclaimed stack if necessary.
2081 * Makefile (tests): Add tst-tsd6.
2082 * tst-tsd6.c: New file.
2084 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2086 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2087 Add private argument.
2089 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2091 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2092 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2094 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2096 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2097 (__lll_robust_timedlock): Pass private as last argument to
2098 __lll_robust_timedlock_wait.
2099 (__lll_unlock): Fix a pasto.
2101 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2103 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2104 sparc_old_sem): New structs.
2105 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2106 (__sem_wait_cleanup): New function.
2107 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2108 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2109 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2111 (__old_sem_wait): New function.
2112 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2113 nptl/sysdeps/unix/sysv/linux/sparc version.
2114 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2116 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2117 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2118 (__new_sem_trywait): Use sparc_old_sem structure.
2119 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2120 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2121 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2122 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2123 lll_futex_timed_wait.
2124 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2125 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2126 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2128 (__old_sem_post): New function.
2129 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2130 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2131 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2132 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2133 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2134 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2136 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2138 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2139 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2140 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2141 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2142 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2143 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2144 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2146 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2147 kernel-features.h and tcb-offsets.h.
2148 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2149 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2151 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2153 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2154 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2156 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2157 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2158 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2159 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2160 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2161 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2162 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2164 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2166 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2167 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2168 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2169 lll_futex_timed_wait.
2171 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2172 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2173 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2174 __lll_robust_unlock, __lll_wait_tid): Likewise.
2176 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2178 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2180 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2181 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2182 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2183 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2184 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2185 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2186 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2189 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2190 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2191 process private. Switch DW_CFA_advance_loc1 and some
2192 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2193 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2194 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2195 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2196 process private. Switch DW_CFA_advance_loc{1,2} and some
2197 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2198 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2199 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2200 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2202 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2203 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2204 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2206 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2207 (__pthread_cond_broadcast): Compare %r8 instead of
2208 dep_mutex-cond_*(%rdi) with $-1.
2209 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2210 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2213 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2215 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2217 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2219 * allocatestack.c: Include kernel-features.h.
2220 * pthread_create.c: Likewise.
2221 * pthread_mutex_init.c: Likewise.
2223 * pthread_cond_timedwait.c: Likewise.
2224 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2225 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2226 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2227 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2228 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2229 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2230 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2232 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2234 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2235 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2236 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2237 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2239 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2241 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2242 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2243 byte elements. One of them is the new __shared element.
2244 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2245 adjust names of other padding elements.
2246 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2247 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2248 byte elements. One of them is the new __shared element.
2249 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2250 adjust names of other padding elements.
2251 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2252 Renamed __pad1 element to __shared, adjust names of other padding
2254 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2255 (pthread_rwlock_t): Likewise.
2256 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2259 2007-08-09 Anton Blanchard <anton@samba.org>
2261 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2263 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2265 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2266 <kernel-features.h>.
2267 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2269 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2271 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2272 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2273 dealing with robust mutexes.
2274 * pthread_mutex_timedlock.c: Likewise.
2275 * pthread_mutex_trylock.c: Likewise.
2276 * pthread_mutex_unlock.c: Likewise.
2277 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2279 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2281 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2282 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2283 (PTHREAD_MUTEX_PSHARED): Define.
2284 * pthread_mutex_init.c (__pthread_mutex_init): Set
2285 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2287 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2288 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2289 as second argument to lll_lock.
2290 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2291 instead of its __data.__lock field.
2292 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2293 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2295 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2296 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2297 instead of mutex->__data.__kind directly, pass
2298 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2299 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2300 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2301 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2302 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2303 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2304 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2305 of mutex->__data.__kind directly.
2306 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2307 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2308 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2309 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2310 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2311 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2313 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2314 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2315 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2317 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2318 Take mutex as argument instead of its __data.__lock field, pass
2319 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2320 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2321 __data.__lock field.
2322 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2323 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2324 to lll_robust_cond_lock.
2325 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2326 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2327 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2328 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2329 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2330 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2332 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2333 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2335 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2336 pshared variable, pass it to lll_lock, lll_unlock,
2337 lll_futex_timedwait and lll_futex_wake.
2338 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2339 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2341 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2342 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2344 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2345 lll_futex_wake_unlock): Likewise.
2346 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2348 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2349 lll_futex_wake_unlock): Likewise.
2350 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2352 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2353 lll_futex_wake_unlock): Likewise.
2354 (lll_futex_wake): Fix a typo.
2355 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2356 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2357 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2358 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2359 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2360 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2361 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2362 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2363 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2364 (__pthread_cond_timedwait): Likewise.
2365 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2366 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2368 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2370 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2371 Don't use CGOTSETUP and CGOTRESTORE macros.
2372 (CGOTSETUP, CGOTRESTORE): Remove.
2373 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2376 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2378 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2379 definitions for private futexes.
2380 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2381 kernel-features.h and lowlevellock.h. Use private futexes if
2383 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2384 (__lll_mutex_lock_wait): Rename to
2385 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2386 (__lll_mutex_timedlock_wait): Rename to ...
2387 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2388 Don't compile in for libc.so.
2389 (__lll_mutex_unlock_wake): Rename to ...
2390 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2391 (__lll_timedwait_tid): Use __NR_gettimeofday.
2392 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2393 the header from assembler. Renamed all lll_mutex_* resp.
2394 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2395 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2396 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2398 (__lll_lock_wait_private): Add prototype.
2399 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2400 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2401 __lll_unlock_wake): Likewise.
2402 (lll_lock): Add private argument. Call __lll_lock_wait_private
2403 if private is constant LLL_PRIVATE.
2404 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2405 lll_timedlock, lll_robust_timedlock): Add private argument.
2406 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2407 if private is constant LLL_PRIVATE.
2408 (lll_robust_unlock, lll_robust_dead): Add private argument.
2409 (lll_lock_t): Remove.
2410 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2411 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2412 lll_cond_wake, lll_cond_broadcast): Remove.
2413 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2414 kernel-features.h and lowlevellock.h.
2415 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2416 (LOAD_FUTEX_WAIT): Define.
2417 (__lll_robust_mutex_lock_wait): Rename to ...
2418 (__lll_robust_lock_wait): ... this. Add private argument.
2419 Use LOAD_FUTEX_WAIT macro.
2420 (__lll_robust_mutex_timedlock_wait): Rename to ...
2421 (__lll_robust_timedlock_wait): ... this. Add private argument.
2422 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2423 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2425 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2426 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2427 __lll_mutex_{lock,unlock}_*.
2428 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2429 lowlevellock.h and pthread-errnos.h.
2430 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2431 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2432 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2433 __lll_mutex_{lock,unlock}_*.
2434 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2435 lowlevellock.h and pthread-errnos.h.
2436 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2437 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2438 __lll_mutex_{lock,unlock}_*.
2439 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2441 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2442 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2443 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2444 (__condvar_tw_cleanup): Likewise.
2445 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2447 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2448 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2449 __lll_mutex_{lock,unlock}_*.
2450 ( __condvar_w_cleanup): Likewise.
2451 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2452 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2453 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2455 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2456 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2457 __lll_mutex_{lock,unlock}_*.
2458 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2460 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2461 FUTEX_PRIVATE_FLAG): Remove.
2462 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2463 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2464 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2466 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2467 FUTEX_PRIVATE_FLAG): Remove.
2468 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2469 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2470 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2472 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2473 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2474 __lll_mutex_{lock,unlock}_*.
2475 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2477 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2478 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2479 __lll_mutex_{lock,unlock}_*.
2480 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2481 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2482 (__new_sem_post): Use standard initial exec code sequences.
2483 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2485 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2486 FUTEX_PRIVATE_FLAG): Remove.
2487 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2488 exec code sequences.
2489 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2490 (__new_sem_trywait): Use standard initial exec code sequences.
2491 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2492 (__new_sem_wait): Use standard initial exec code sequences.
2494 2007-07-31 Anton Blanchard <anton@samba.org>
2496 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2497 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2498 atomic_full_barrier.
2500 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2502 * allocatestack.c (stack_cache_lock): Change type to int.
2503 (get_cached_stack, allocate_stack, __deallocate_stack,
2504 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2505 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2506 as second argument to lll_lock and lll_unlock macros on
2508 * pthread_create.c (__find_in_stack_list): Likewise.
2509 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2510 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2512 * descr.h (struct pthread): Change lock and setxid_futex field
2514 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2515 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2516 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2517 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2519 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2520 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2521 * pthreadP.h (__attr_list_lock): Change type to int.
2522 * pthread_attr_init.c (__attr_list_lock): Likewise.
2523 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2524 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2526 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2527 also for lll_futex_{wake,wait}.
2528 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2530 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2531 LLL_SHARED as second argument to lll_{,un}lock.
2532 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2533 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2534 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2535 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2537 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2538 as second argument to lll_{,un}lock macros on pd->lock.
2539 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2540 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2541 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2542 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2544 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2546 * pthread_once.c (once_lock): Change type to int.
2547 (__pthread_once): Pass LLL_PRIVATE as second argument to
2548 lll_{,un}lock macros on once_lock.
2549 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2550 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2551 rwlock->__data.__shared as second argument to them and similarly
2553 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2555 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2557 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2558 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2559 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2560 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2561 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2562 to lll_{,un}lock macros on __sem_mappings_lock.
2563 * sem_open.c (check_add_mapping): Likewise.
2564 (__sem_mappings_lock): Change type to int.
2565 * semaphoreP.h (__sem_mappings_lock): Likewise.
2566 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2567 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2568 instead of lll_*mutex_*, pass LLL_SHARED as last
2570 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2571 pass LLL_SHARED as last argument.
2572 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2573 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2574 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2575 pass LLL_SHARED as last argument.
2576 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2577 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2578 LLL_SHARED as last argument.
2579 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2580 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2582 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2583 __libc_lock_lock_recursive, __libc_lock_unlock,
2584 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2585 argument to lll_{,un}lock.
2586 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2587 _IO_lock_unlock): Likewise.
2588 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2590 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2591 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2593 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2594 free_mem): Likewise.
2595 (__fork_lock): Change type to int.
2596 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2597 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2598 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2600 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2601 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2602 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2604 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2605 pass it through to lll_futex_*wait, only compile in when
2607 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2608 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2609 argument and pass it through to lll_futex_*wait.
2610 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2611 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2612 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2613 inline functions to __lll_* resp. __lll_robust_*.
2614 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2615 (lll_mutex_dead): Add private argument.
2616 (__lll_lock_wait_private): New prototype.
2617 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2618 __lll_robust_lock_timedwait): Add private argument to prototypes.
2619 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2620 call __lll_lock_wait_private, otherwise pass private to
2622 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2623 __lll_robust_timedlock): Add private argument, pass it to
2624 __lll_*wait functions.
2625 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2626 call __lll_unlock_wake_private, otherwise pass private to
2628 (__lll_robust_unlock): Add private argument, pass it to
2629 __lll_robust_unlock_wake.
2630 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2631 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2632 argument, pass it through to __lll_* inline function.
2633 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2634 (lll_lock_t): Remove.
2635 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2636 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2637 lll_cond_wake, lll_cond_broadcast): Remove.
2638 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2639 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2640 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2641 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2642 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2643 the header from assembler. Renamed all lll_mutex_* resp.
2644 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2645 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2646 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2647 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2648 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2649 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2650 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2652 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2653 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2654 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2655 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2656 MULTIPLE_THREADS_OFFSET as another asm operand.
2657 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2658 MULTIPLE_THREADS_OFFSET as last asm operand, call
2659 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2660 otherwise pass private as another argument to __lll_lock_wait.
2661 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2662 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2663 private as another argument to __lll_*lock_wait call.
2664 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2665 MULTIPLE_THREADS_OFFSET as another asm operand, call
2666 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2667 otherwise pass private as another argument to __lll_unlock_wake.
2668 (lll_robust_unlock): Add private argument, pass private as another
2669 argument to __lll_unlock_wake.
2670 (lll_robust_dead): Add private argument, use __lll_private_flag
2672 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2673 LLL_MUTEX_LOCK_INITIALIZER.
2674 (lll_lock_t): Remove.
2675 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2676 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2677 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2678 lll_cond_wake, lll_cond_broadcast): Remove.
2679 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2680 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2681 2007-05-2{3,9} changes.
2682 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2683 kernel-features.h and lowlevellock.h.
2684 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2685 (LOAD_FUTEX_WAIT): Rewritten.
2686 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2688 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2689 (__lll_mutex_lock_wait): Rename to ...
2690 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2691 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2692 (__lll_mutex_timedlock_wait): Rename to ...
2693 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2694 contains private argument. Don't compile in for libc.so.
2695 (__lll_mutex_unlock_wake): Rename to ...
2696 (__lll_unlock_wake): ... this. %ecx contains private argument.
2697 Don't compile in for libc.so.
2698 (__lll_timedwait_tid): Use __NR_gettimeofday.
2699 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2700 kernel-features.h and lowlevellock.h.
2701 (LOAD_FUTEX_WAIT): Define.
2702 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2704 (__lll_robust_mutex_lock_wait): Rename to ...
2705 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2706 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2708 (__lll_robust_mutex_timedlock_wait): Rename to ...
2709 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2710 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2711 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2713 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2714 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2715 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2716 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2717 to __lll_lock_wait in %edx.
2718 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2719 Include lowlevellock.h and pthread-errnos.h.
2720 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2721 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2722 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2723 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2724 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2726 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2727 Include lowlevellock.h and pthread-errnos.h.
2728 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2729 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2730 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2731 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2732 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2734 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2735 Include lowlevellock.h.
2736 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2738 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2739 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2740 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2741 __lll_unlock_wake. Use __NR_gettimeofday.
2742 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2743 Include lowlevellock.h.
2744 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2745 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2746 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2747 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2748 and __lll_unlock_wake.
2749 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2750 Include lowlevellock.h.
2751 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2752 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2753 MUTEX(%ebx) address in %edx rather than %ecx to
2754 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2755 and __lll_unlock_wake. Move return value from %ecx to %edx
2757 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2758 Include lowlevellock.h.
2759 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2761 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2762 MUTEX(%ebp) address in %edx rather than %ecx to
2763 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2764 and __lll_unlock_wake. Move return value from %ecx to %edx
2765 register. Use __NR_gettimeofday.
2766 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2767 Include lowlevellock.h.
2768 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2770 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2771 MUTEX(%ebp) address in %edx rather than %ecx to
2772 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2773 and __lll_unlock_wake. Move return value from %ecx to %edx
2774 register. Use __NR_gettimeofday.
2775 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2776 Include lowlevellock.h.
2777 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2778 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2779 MUTEX(%edi) address in %edx rather than %ecx to
2780 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2781 and __lll_unlock_wake.
2782 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2783 Include lowlevellock.h.
2784 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2785 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2786 MUTEX(%ebx) address in %edx rather than %ecx to
2787 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2788 and __lll_unlock_wake. Move return value from %ecx to %edx
2790 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2792 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2794 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2795 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2796 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2798 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2799 (sem_timedwait): Use __NR_gettimeofday.
2800 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2802 (LOCK): Don't define.
2803 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2805 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2806 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2808 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2809 2007-05-2{3,9} changes.
2810 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2811 kernel-features.h and lowlevellock.h.
2812 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2813 (LOAD_FUTEX_WAIT): Rewritten.
2814 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2815 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2816 (__lll_mutex_lock_wait): Rename to ...
2817 (__lll_lock_wait): ... this. %esi is now private argument.
2818 Don't compile in for libc.so.
2819 (__lll_mutex_timedlock_wait): Rename to ...
2820 (__lll_timedlock_wait): ... this. %esi contains private argument.
2821 Don't compile in for libc.so.
2822 (__lll_mutex_unlock_wake): Rename to ...
2823 (__lll_unlock_wake): ... this. %esi contains private argument.
2824 Don't compile in for libc.so.
2825 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2826 kernel-features.h and lowlevellock.h.
2827 (LOAD_FUTEX_WAIT): Define.
2828 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2829 (__lll_robust_mutex_lock_wait): Rename to ...
2830 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2831 Use LOAD_FUTEX_WAIT macro.
2832 (__lll_robust_mutex_timedlock_wait): Rename to ...
2833 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2834 private, use LOAD_FUTEX_WAIT macro.
2835 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2837 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2838 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2839 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2840 __lll_lock_wait and __lll_unlock_wake.
2841 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2842 Include lowlevellock.h and pthread-errnos.h.
2843 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2844 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2845 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2846 pass LLL_SHARED in %esi to both __lll_lock_wait and
2848 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2849 Include lowlevellock.h and pthread-errnos.h.
2850 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2851 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2852 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2853 pass LLL_SHARED in %esi to both __lll_lock_wait and
2855 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2856 Include lowlevellock.h.
2857 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2858 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2859 pass LLL_SHARED in %esi to both __lll_lock_wait and
2861 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2862 Include lowlevellock.h.
2863 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2864 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2865 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2866 and __lll_unlock_wake.
2867 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2868 Include lowlevellock.h.
2869 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2871 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2872 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2873 and __lll_unlock_wake.
2874 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2875 Include lowlevellock.h.
2876 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2878 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2879 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2880 and __lll_unlock_wake.
2881 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2882 Include lowlevellock.h.
2883 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2885 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2886 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2887 and __lll_unlock_wake.
2888 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2889 Include lowlevellock.h.
2890 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2892 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2893 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2894 and __lll_unlock_wake.
2895 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2896 Include lowlevellock.h.
2897 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2899 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2900 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2901 and __lll_unlock_wake.
2902 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2904 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2906 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2907 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2908 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2910 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2911 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2913 (LOCK): Don't define.
2914 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2916 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2917 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2918 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2919 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2920 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2921 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2922 (__lll_lock_wait_private): New function.
2923 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2924 it to lll_futex_*wait. Don't compile in for libc.so.
2925 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2927 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2928 (struct sparc_pthread_barrier): Remove.
2929 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2930 struct sparc_pthread_barrier. Pass
2931 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2932 and lll_futex_wait macros.
2933 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2935 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2936 Include sparc pthread_barrier_wait.c instead of generic one.
2938 2007-07-30 Jakub Jelinek <jakub@redhat.com>
2940 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2942 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2943 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2945 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2946 (pthread_rwlock_timedwrlock): Likewise.
2947 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2948 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2950 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2952 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2954 2007-07-26 Jakub Jelinek <jakub@redhat.com>
2956 * tst-locale2.c (useless): Add return statement.
2958 2007-07-24 Jakub Jelinek <jakub@redhat.com>
2960 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2961 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2962 * pthread_create.c (start_thread): Likewise.
2963 * init.c (sighandler_setxid): Likewise.
2964 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2965 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2966 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2967 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2968 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2969 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2970 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2971 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2972 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2974 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2976 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2978 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2979 __rtld_notify): Likewise.
2980 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2981 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2982 __pthread_once): Likewise.
2983 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2984 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2985 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2986 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2987 (lll_futex_wait): Add private argument, define as wrapper around
2988 lll_futex_timed_wait.
2989 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2990 use __lll_private_flag macro.
2991 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2992 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2993 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2994 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2995 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2996 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2997 (lll_futex_wait): Add private argument, define as wrapper around
2998 lll_futex_timed_wait.
2999 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3000 use __lll_private_flag macro.
3001 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3002 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3003 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3005 (lll_futex_timed_wait, lll_futex_wake): Use it.
3006 (lll_private_futex_wait, lll_private_futex_timed_wait,
3007 lll_private_futex_wake): Removed.
3008 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3009 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3010 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3011 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3012 (lll_futex_wait): Add private argument, define as wrapper around
3013 lll_futex_timed_wait.
3014 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3015 use __lll_private_flag macro.
3016 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3017 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3019 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3020 (lll_private_futex_wait, lll_private_futex_timed_wait,
3021 lll_private_futex_wake): Removed.
3022 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3023 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3024 (lll_private_futex_wait, lll_private_futex_timed_wait,
3025 lll_private_futex_wake): Removed.
3026 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3027 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3028 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3029 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3030 (lll_futex_wait): Add private argument, define as wrapper around
3031 lll_futex_timed_wait.
3032 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3033 use __lll_private_flag macro.
3034 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3035 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3037 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3039 (lll_futex_timed_wait, lll_futex_wake): Use it.
3040 (lll_private_futex_wait, lll_private_futex_timed_wait,
3041 lll_private_futex_wake): Removed.
3043 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3045 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3046 of the structure for sparc32.
3048 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3050 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3052 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3054 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3055 code used when private futexes are assumed.
3056 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3059 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3061 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3062 (__lll_private_flag): Define.
3063 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3064 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3066 (lll_private_futex_wait, lll_private_futex_timedwait,
3067 lll_private_futex_wake): Define as wrapper around non-_private
3069 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3070 (__lll_private_flag): Define.
3071 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3072 (lll_private_futex_wait, lll_private_futex_timedwait,
3073 lll_private_futex_wake): Define as wrapper around non-_private
3076 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3078 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3079 parameter to lll_futex_wait call.
3080 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3082 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3083 Replace lll_futex_wait with lll_private_futex_wait.
3084 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3085 Add LLL_SHARED parameter to lll_futex_wake().
3087 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3088 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3089 lll_private_futex_wake.
3090 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3091 bit from private parm before syscall.
3092 (lll_futex_timed_wait): Likewise.
3093 (lll_futex_wake): Likewise.
3094 (lll_futex_wake_unlock): Likewise.
3095 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3096 (lll_robust_mutex_unlock): Likewise.
3097 (lll_mutex_unlock_force): Likewise.
3098 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3100 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3102 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3103 compilation when unconditionally using private futexes.
3104 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3105 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3107 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3108 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3110 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3112 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3115 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3117 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3120 2007-05-16 Roland McGrath <roland@redhat.com>
3122 * init.c (__nptl_initial_report_events): New variable.
3123 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3126 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3128 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3129 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3131 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3133 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3136 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3138 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3139 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3140 * pthread_mutex_timedlock.c: Likewise.
3141 * pthread_mutex_trylock.c: Likewise.
3142 * pthread_mutex_unlock.c: Likewise.
3144 2007-06-17 Andreas Schwab <schwab@suse.de>
3146 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3149 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3151 * allocatestack.c (allocate_stack): Make code compile if
3152 __ASSUME_PRIVATE_FUTEX is set.
3154 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3156 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3157 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3158 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3159 (__pthread_rwlock_wrlock): Likewise.
3160 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3161 (pthread_rwlock_timedrdlock): Likewise.
3162 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3163 (pthread_rwlock_timedwrlock): Likewise.
3164 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3165 (__pthread_rwlock_unlock): Likewise.
3167 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3169 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3170 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3171 Split __flags into __flags, __shared, __pad1 and __pad2.
3172 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3173 futexes if they are available.
3174 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3175 in libc-lowlevellock.S allow using private futexes.
3176 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3177 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3178 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3179 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3180 lll_private_futex_timed_wait and lll_private_futex_wake.
3181 (lll_robust_mutex_unlock): Fix typo.
3182 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3183 field in futex command setup.
3184 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3185 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3186 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3187 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3188 if they are available. Remove clear_once_control.
3189 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3190 futexes if they are available.
3191 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3192 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3193 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3194 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3195 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3196 Wake only when there are waiters.
3197 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3198 support. Indicate that there are waiters. Remove unnecessary
3199 extra cancellation test.
3200 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3201 left-over duplication of __sem_wait_cleanup.
3203 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3205 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3206 parameter to lll_futex_wait, lll_futex_timed_wait, and
3207 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3208 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3209 lll_private_futex_wake.
3210 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3211 * allocatestack.c: Adjust use of lll_futex_* macros.
3213 * lowlevellock.h: Likewise.
3214 * pthread_barrier_wait.c: Likewise.
3215 * pthread_cond_broadcast.c: Likewise.
3216 * pthread_cond_destroy.c: Likewise.
3217 * pthread_cond_signal.c: Likewise.
3218 * pthread_cond_timedwait.c: Likewise.
3219 * pthread_cond_wait.c: Likewise.
3220 * pthread_create.c: Likewise.
3221 * pthread_mutex_lock.c: Likewise.
3222 * pthread_mutex_setprioceiling.c: Likewise.
3223 * pthread_mutex_timedlock.c: Likewise.
3224 * pthread_mutex_unlock.c: Likewise.
3225 * pthread_rwlock_timedrdlock.c: Likewise.
3226 * pthread_rwlock_timedwrlock.c: Likewise.
3227 * pthread_rwlock_unlock.c: Likewise.
3228 * sysdeps/alpha/tls.h: Likewise.
3229 * sysdeps/i386/tls.h: Likewise.
3230 * sysdeps/ia64/tls.h: Likewise.
3231 * sysdeps/powerpc/tls.h: Likewise.
3232 * sysdeps/pthread/aio_misc.h: Likewise.
3233 * sysdeps/pthread/gai_misc.h: Likewise.
3234 * sysdeps/s390/tls.h: Likewise.
3235 * sysdeps/sh/tls.h: Likewise.
3236 * sysdeps/sparc/tls.h: Likewise.
3237 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3238 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3239 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3240 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3241 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3242 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3243 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3244 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3245 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3246 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3248 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3249 * sysdeps/x86_64/tls.h: Likewise.
3251 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3253 * pthread_getattr_np.c: No need to install a cancellation handler,
3254 this is no cancellation point.
3255 * pthread_getschedparam.c: Likewise.
3256 * pthread_setschedparam.c: Likewise.
3257 * pthread_setschedprio.c: Likewise.
3258 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3260 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3261 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3262 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3263 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3264 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3265 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3266 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3267 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3268 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3269 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3270 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3271 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3273 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3274 whether there are more than one thread makes no sense here since
3275 we only call the slow path if the locks are taken.
3276 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3278 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3279 COND_NWAITERS_SHIFT.
3280 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3282 * pthread_cond_init.c: Likewise.
3283 * pthread_cond_timedwait.c: Likewise.
3284 * pthread_cond_wait.c: Likewise.
3285 * pthread_condattr_getclock.c: Likewise.
3286 * pthread_condattr_setclock.c: Likewise.
3287 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3288 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3289 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3290 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3291 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3293 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3295 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3298 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3300 (THREAD_GSCOPE_GET_FLAG): Remove.
3301 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3302 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3304 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3305 (THREAD_GSCOPE_GET_FLAG): Remove.
3306 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3307 instead of THREAD_GSCOPE_GET_FLAG.
3308 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3310 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3311 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3312 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3313 THREAD_GSCOPE_WAIT): Define.
3314 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3315 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3316 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3317 THREAD_GSCOPE_WAIT): Define.
3318 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3319 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3320 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3321 THREAD_GSCOPE_WAIT): Define.
3322 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3323 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3324 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3325 THREAD_GSCOPE_WAIT): Define.
3327 2007-05-24 Richard Henderson <rth@redhat.com>
3329 * descr.h (struct pthread): Add header.gscope_flag.
3330 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3331 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3332 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3333 THREAD_GSCOPE_WAIT): Define.
3335 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3337 * init.c: Make it compile with older kernel headers.
3339 * tst-initializers1.c: Show through exit code which test failed.
3341 * pthread_rwlock_init.c: Also initialize __shared field.
3342 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3343 element in rwlock structure into four byte elements. One of them is
3344 the new __shared element.
3345 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3347 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3348 __shared, adjust names of other padding elements.
3349 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3350 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3351 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3352 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3354 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3355 futex to use private operations if possible.
3356 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3358 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3360 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3361 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3362 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3363 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3365 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3367 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3368 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3370 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3372 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3373 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3374 * pthread_rwlock_timedrdlock.c: Likewise.
3375 * pthread_rwlock_tryrdlock.c: Likewise.
3377 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3380 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3381 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3382 duplication of __sem_wait_cleanup.
3384 * allocatestack.c: Revert last change.
3386 * sysdeps/i386/tls.h: Likewise.
3387 * sysdeps/x86_64/tls.h: Likewise.
3388 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3390 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3392 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3394 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3395 * pthread_barrier_init.c: Set private flag if pshared and private
3396 futexes are supported.
3397 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3398 private field in futex command setup.
3399 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3401 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3403 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3405 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3406 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3407 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3408 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3409 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3411 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3412 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3413 fields in the structure.
3414 (__old_sem_init): New function.
3415 * sem_open.c: Initialize all fields of the structure.
3416 * sem_getvalue.c: Adjust for renamed element.
3417 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3418 (gen-as-const-headers): Add structsem.sym.
3419 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3420 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3421 struct new_sem. Add struct old_sem.
3422 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3423 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3424 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3425 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3426 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3427 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3428 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3429 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3430 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3431 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3432 * tst-sem10.c: New file.
3433 * tst-sem11.c: New file.
3434 * tst-sem12.c: New file.
3435 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3438 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3439 Jakub Jelinek <jakub@redhat.com>
3441 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3442 Move __pthread_enable_asynccancel right before futex syscall.
3443 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3446 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3448 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3449 THREAD_COPY_PRIVATE_FUTEX): Define.
3450 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3451 THREAD_COPY_PRIVATE_FUTEX): Define.
3452 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3453 * init.c (__pthread_initialize_minimal_internal): Use
3454 THREAD_SET_PRIVATE_FUTEX.
3456 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3457 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3458 THREAD_GSCOPE_FLAG_WAIT): Define.
3459 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3460 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3461 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3463 (THREAD_GSCOPE_GET_FLAG): Define.
3464 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3465 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3466 instead of ->header.gscope_flag directly.
3468 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3470 * init.c (__pthread_initialize_minimal_internal): Check whether
3471 private futexes are available.
3472 * allocatestack.c (allocate_stack): Copy private_futex field from
3473 current thread into the new stack.
3474 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3475 futexes if they are available.
3476 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3477 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3478 in libc-lowlevellock.S allow using private futexes.
3479 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3480 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3482 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3483 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3484 if they are available.
3485 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3486 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3487 * sysdeps/i386/tcb-offsets.sym: Likewise.
3488 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3489 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3491 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3493 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3494 Remove ptr_wait_lookup_done again.
3495 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3496 (__pthread_initialize_minimal_internal): Initialize
3497 _dl_wait_lookup_done pointer in _rtld_global directly.
3498 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3499 Remove code to code _dl_wait_lookup_done.
3500 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3503 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3505 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3506 pthread_mutex_init failed with ENOTSUP.
3508 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3510 * allocatestack.c (__wait_lookup_done): New function.
3511 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3512 Add ptr_wait_lookup_done.
3513 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3514 * pthreadP.h: Declare __wait_lookup_done.
3515 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3516 Define macros to implement reference handling of global scope.
3517 * sysdeps/x86_64/tls.h: Likewise.
3518 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3519 Initialize GL(dl_wait_lookup_done).
3521 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3524 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3526 * pthread_mutex_timedlock.c: Likewise.
3527 * pthread_mutex_trylock.c: Likewise.
3528 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3530 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3531 * tst-robust9.c: New file.
3532 * tst-robustpi9.c: New file.
3534 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3535 unnecessary extra cancellation test.
3537 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3539 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3540 extra cancellation test.
3541 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3543 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3545 * descr.h (struct pthread): Rearrange members to fill hole in
3548 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3549 (__pthread_setaffinity_new): If syscall was successful and
3550 RESET_VGETCPU_CACHE is defined, use it before returning.
3551 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3553 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3556 * tst-align2.c: Include stackinfo.h.
3557 * tst-getpid1.c: Likewise.
3559 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3562 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3563 * tst-getpid1.c (do_test): Likewise.
3566 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3567 (allocate_stack): Likewise.
3569 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3571 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3572 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3573 (__lll_robust_timedlock_wait): Likewise.
3574 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3576 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3579 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3580 * tst-cancel4.c (tf_fdatasync): New test.
3582 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3585 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3586 check mutexes like normal mutexes.
3589 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3590 Initialize the whole sigevent structure to appease valgrind.
3592 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3594 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3595 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3597 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3599 * tst-locale1.c: Avoid warnings.
3600 * tst-locale2.c: Likewise.
3602 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3604 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3605 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3607 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3609 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3610 __extern_always_inline where appropriate.
3611 * sysdeps/pthread/pthread.h: Likewise.
3613 2007-03-13 Richard Henderson <rth@redhat.com>
3615 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3616 separate cfi regions for the two subsections.
3618 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3620 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3621 new thread, don't just decrement it.
3622 Patch by Suzuki K P <suzuki@in.ibm.com>.
3624 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3626 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3627 PTHFCT_CALL definition.
3629 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3631 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3632 available, don't use it.
3634 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3636 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3637 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3638 call into the kernel to delay.
3640 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3642 * tst-initializers1.c: We want to test the initializers as seen
3643 outside of libc, so undefined _LIBC.
3645 * pthread_join.c (cleanup): Avoid warning.
3647 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3649 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3650 (__lll_timedwait_tid): Add unwind info.
3652 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3653 function table, mangle the pointers.
3654 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3655 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3656 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3657 demangle pointers before use.
3658 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3660 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3661 * sysdeps/pthread/setxid.h: Likewise.
3663 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3665 * tst-rwlock7.c: Show some more information in case of correct
3668 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3670 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3671 (lll_futex_timed_wait): Undo part of last change, don't negate
3674 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3676 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3677 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3679 2006-12-28 David S. Miller <davem@davemloft.net>
3681 * shlib-versions: Fix sparc64 linux target specification.
3683 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3685 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3686 Adjust include path for pthread_barrier_wait.c move.
3688 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3690 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3691 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3693 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3695 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3696 6 argument cancellable syscalls.
3697 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3698 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3699 6 argument cancellable syscalls.
3700 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3702 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3704 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3705 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3707 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3709 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3710 __sync_lock_release instead of __sync_lock_release_si.
3712 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3714 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3716 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3717 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3718 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3719 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3720 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3721 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3722 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3723 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3724 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3725 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3726 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3728 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3730 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3731 * pthread_barrier_wait.c: ...here.
3732 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3733 * pthread_cond_broadcast.c: ...here.
3734 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3735 * pthread_cond_signal.c: ...here.
3736 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3737 * pthread_cond_timedwait.c: ...here.
3738 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3739 * pthread_cond_wait.c: ...here.
3740 * sysdeps/pthread/pthread_once.c: Move to...
3741 * pthread_once.c: ...here.
3742 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3743 * pthread_rwlock_rdlock.c: ...here.
3744 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3745 * pthread_rwlock_timedrdlock.c: ...here.
3746 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3747 * pthread_rwlock_timedwrlock.c: ...here.
3748 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3749 * pthread_rwlock_unlock.c: ...here.
3750 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3751 * pthread_rwlock_wrlock.c: ...here.
3752 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3753 * pthread_spin_destroy.c: ...here.
3754 * sysdeps/pthread/pthread_spin_init.c: Move to...
3755 * pthread_spin_init.c: ...here.
3756 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3757 * pthread_spin_unlock.c: ...here.
3758 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3759 * pthread_getcpuclockid.c: ...here.
3761 * init.c: USE_TLS support is now always enabled.
3762 * tst-tls5.h: Likewise.
3763 * sysdeps/alpha/tls.h: Likewise.
3764 * sysdeps/i386/tls.h: Likewise.
3765 * sysdeps/ia64/tls.h: Likewise.
3766 * sysdeps/powerpc/tls.h: Likewise.
3767 * sysdeps/s390/tls.h: Likewise.
3768 * sysdeps/sh/tls.h: Likewise.
3769 * sysdeps/sparc/tls.h: Likewise.
3770 * sysdeps/x86_64/tls.h: Likewise.
3772 2006-10-27 Jakub Jelinek <jakub@redhat.com>
3774 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3775 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3778 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3779 Define to THREAD_SELF->header.multiple_threads.
3780 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3782 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3784 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3785 (SINGLE_THREAD_P): Likewise.
3786 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3787 (SINGLE_THREAD_P): Likewise.
3788 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3789 (SINGLE_THREAD_P): Likewise.
3790 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3791 (SINGLE_THREAD_P): Likewise.
3792 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3794 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3795 (SINGLE_THREAD_P): Likewise.
3796 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3797 (SINGLE_THREAD_P): Likewise.
3798 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3801 2006-10-26 Jakub Jelinek <jakub@redhat.com>
3803 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3804 by default rather than 2_3_3.
3806 2006-10-17 Jakub Jelinek <jakub@redhat.com>
3808 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3809 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3810 atomic_* instead of catomic_* macros.
3812 2006-10-12 Ulrich Drepper <drepper@redhat.com>
3815 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3816 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3817 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3818 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3819 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3820 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3821 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3822 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3823 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3824 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3825 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3826 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3827 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3829 2006-10-11 Ulrich Drepper <drepper@redhat.com>
3831 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3832 cancelable syscalls with six parameters.
3834 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3835 operations instead of atomic_*.
3837 2006-10-09 Ulrich Drepper <drepper@redhat.com>
3839 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3841 2006-10-07 Ulrich Drepper <drepper@redhat.com>
3843 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3844 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3845 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3847 * pthread_attr_setstack.c: Allow overwriting the version number of the
3849 * pthread_attr_setstacksize.c: Likewise.
3850 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3852 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3853 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3855 2006-09-24 Ulrich Drepper <drepper@redhat.com>
3858 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3859 Patch by Petr Baudis.
3861 2006-09-18 Jakub Jelinek <jakub@redhat.com>
3863 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3865 * tst-cancel2.c (tf): Loop as long as something was written.
3867 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3869 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3870 mutexes wake all mutexes.
3871 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3872 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3873 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3875 2006-09-12 Ulrich Drepper <drepper@redhat.com>
3877 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3878 to guarantee the thread is always canceled.
3880 2006-09-08 Jakub Jelinek <jakub@redhat.com>
3882 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3884 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3885 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3886 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3887 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3888 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3890 2006-09-08 Ulrich Drepper <drepper@redhat.com>
3893 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3894 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3895 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3896 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3897 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3898 * Makefile (tests): Add tst-cond22.
3899 * tst-cond22.c: New file.
3901 2006-09-05 Ulrich Drepper <drepper@redhat.com>
3904 * descr.h (struct pthread): Add parent_cancelhandling.
3905 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3906 cancelhandling value to child.
3907 * pthread_create.c (start_thread): If parent thread was canceled
3908 reset the SIGCANCEL mask.
3909 * Makefile (tests): Add tst-cancel25.
3910 * tst-cancel25.c: New file.
3912 2006-09-05 Jakub Jelinek <jakub@redhat.com>
3913 Ulrich Drepper <drepper@redhat.com>
3915 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3916 counterp if it is already zero.
3917 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3919 2006-03-04 Jakub Jelinek <jakub@redhat.com>
3920 Roland McGrath <roland@redhat.com>
3922 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3923 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3924 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3925 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3926 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3927 lll_robust_mutex_timedlock, lll_mutex_unlock,
3928 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3929 Add _L_*_ symbols around the subsection.
3930 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3931 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3933 2006-03-03 Jakub Jelinek <jakub@redhat.com>
3934 Roland McGrath <roland@redhat.com>
3936 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3937 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3938 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3939 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3940 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3941 lll_robust_mutex_timedlock, lll_mutex_unlock,
3942 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3943 Add _L_*_ symbols around the subsection.
3944 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3945 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3947 2006-08-31 Ulrich Drepper <drepper@redhat.com>
3949 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3950 change because it can disturb too much existing code. If real hard
3951 reader preference is needed we'll introduce another type.
3952 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3953 (pthread_rwlock_timedwrlock): Likewise.
3954 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3957 2006-08-30 Ulrich Drepper <drepper@redhat.com>
3959 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3961 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3962 (pthread_rwlock_timedwrlock): Likewise.
3963 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3966 2006-08-25 Jakub Jelinek <jakub@redhat.com>
3968 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3969 Only define ifdef SHARED.
3971 2006-08-23 Ulrich Drepper <drepper@redhat.com>
3973 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3974 (free_stacks): ...here.
3975 (__free_stack_cache): New function.
3976 * pthreadP.h: Declare __free_stack_cache.
3977 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3979 * init.c (pthread_functions): Initialize ptr_freeres.
3980 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3981 New freeres function.
3983 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3986 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3988 2006-08-20 Ulrich Drepper <drepper@redhat.com>
3990 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3991 _XOPEN_REALTIME_THREADS.
3993 2006-08-15 Jakub Jelinek <jakub@redhat.com>
3995 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3996 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3997 HAVE_CLOCK_GETTIME_VSYSCALL.
3998 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4000 2006-08-14 Jakub Jelinek <jakub@redhat.com>
4002 * sysdeps/unix/sysv/linux/bits/posix_opt.h
4003 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4004 * descr.h (struct priority_protection_data): New type.
4005 (struct pthread): Add tpp field.
4006 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4007 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4008 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4009 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4011 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4012 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4013 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4014 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4016 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4018 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4019 * pthread_mutexattr_getprioceiling.c
4020 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4021 in the SCHED_FIFO priority range.
4022 * pthread_mutexattr_setprioceiling.c
4023 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4024 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4025 if mutex is not TPP. Ceiling is now in __data.__lock.
4026 * pthread_mutex_setprioceiling.c: Include stdbool.h.
4027 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
4028 is now in __data.__lock. Add locking.
4029 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4030 * Makefile (libpthread-routines): Add tpp.
4031 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4032 * tst-tpp.h: New file.
4033 * tst-mutexpp1.c: New file.
4034 * tst-mutexpp6.c: New file.
4035 * tst-mutexpp10.c: New file.
4036 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4037 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4039 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4042 * pthread_join.c (pthread_join): Account for self being canceled
4043 when checking for deadlocks.
4044 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4045 (tf1): Don't print anything after pthread_join returns, this would be
4046 another cancellation point.
4048 * tst-join6.c: New file.
4049 * Makefile (tests): Add tst-join6.
4051 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4054 * pthread_setspecific.c (__pthread_setspecific): Check
4055 out-of-range index before checking for unused key.
4057 * sysdeps/pthread/gai_misc.h: New file.
4059 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4061 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4062 file. Don't use sysctl.
4063 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4064 overwrite the file if this is likely not true.
4066 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4068 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4069 * Makefile (tests): Add tst-getpid3.
4070 * tst-getpid3.c: New file.
4072 2006-07-30 Roland McGrath <roland@redhat.com>
4074 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4076 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4077 (pause_not_cancel): New macro.
4078 (nanosleep_not_cancel): New macro.
4079 (sigsuspend_not_cancel): New macro.
4080 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4081 nanosleep_not_cancel macro from <not-cancel.h>.
4082 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4083 macro from <not-cancel.h>.
4085 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4086 Jakub Jelinek <jakub@redhat.com>
4088 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4089 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4090 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4091 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4092 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4093 * pthread_mutex_lock.c: Likewise.
4094 * pthread_mutex_timedlock.c: Likewise.
4095 * pthread_mutex_trylock.c: Likewise.
4096 * pthread_mutex_unlock.c: Likewise.
4097 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4099 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4100 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4101 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4102 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4103 pthread-pi-defines.sym.
4104 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4105 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4106 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4107 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4108 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4109 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4110 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4111 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4112 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4113 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4114 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4115 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4116 * tst-mutex2.c: Likewise.
4117 * tst-mutex3.c: Likewise.
4118 * tst-mutex4.c: Likewise.
4119 * tst-mutex5.c: Likewise.
4120 * tst-mutex6.c: Likewise.
4121 * tst-mutex7.c: Likewise.
4122 * tst-mutex7a.c: Likewise.
4123 * tst-mutex8.c: Likewise.
4124 * tst-mutex9.c: Likewise.
4125 * tst-robust1.c: Likewise.
4126 * tst-robust7.c: Likewise.
4127 * tst-robust8.c: Likewise.
4128 * tst-mutexpi1.c: New file.
4129 * tst-mutexpi2.c: New file.
4130 * tst-mutexpi3.c: New file.
4131 * tst-mutexpi4.c: New file.
4132 * tst-mutexpi5.c: New file.
4133 * tst-mutexpi6.c: New file.
4134 * tst-mutexpi7.c: New file.
4135 * tst-mutexpi7a.c: New file.
4136 * tst-mutexpi8.c: New file.
4137 * tst-mutexpi9.c: New file.
4138 * tst-robust1.c: New file.
4139 * tst-robust2.c: New file.
4140 * tst-robust3.c: New file.
4141 * tst-robust4.c: New file.
4142 * tst-robust5.c: New file.
4143 * tst-robust6.c: New file.
4144 * tst-robust7.c: New file.
4145 * tst-robust8.c: New file.
4146 * Makefile (tests): Add the new tests.
4148 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4149 * pthread_mutex_destroy.c: Remove unneeded label.
4151 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4153 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4154 computations to compile time.
4156 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4158 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4160 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4162 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4164 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4166 * pthread_key_create.c (__pthread_key_create): Do away with
4167 __pthread_keys_lock.
4169 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4170 (__kernel_cpumask_size): Mark as hidden.
4171 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4173 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4174 * semaphoreP.h (__sem_mappings_lock): Likewise.
4176 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4178 * pthread_atfork.c: Mark __dso_handle as hidden.
4180 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4183 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4184 the reload problem. Change the one path in pthread_cancel_init
4185 which causes the problem. Force gcc to reload. Simplify callers.
4186 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4187 (_Unwind_GetBSP): Undo last patch.
4189 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4191 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4192 function pointer is reloaded after pthread_cancel_init calls.
4195 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4196 pointers are reloaded after pthread_cancel_init calls.
4198 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4200 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4203 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4205 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4206 Allocate new object which is passed to timer_sigev_thread so that
4207 the timer can be deleted before the new thread is scheduled.
4209 2006-04-26 Roland McGrath <roland@redhat.com>
4211 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4213 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4215 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4216 suffix for conditional jumps.
4217 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4218 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4219 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4220 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4221 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4222 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4224 * init.c (sigcancel_handler): Compare with correct PID even if the
4225 thread is in the middle of a fork call.
4226 (sighandler_setxid): Likewise.
4227 Reported by Suzuki K P <suzuki@in.ibm.com> .
4229 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4231 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4233 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4235 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4236 fails [Coverity CID 105].
4238 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4240 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4242 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4245 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4246 Define __lll_rel_instr using lwsync.
4248 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4250 * allocatestack.c (allocate_stack): Always initialize robust_head.
4251 * descr.h: Define struct robust_list_head.
4252 (struct pthread): Use robust_list_head in robust mutex list definition.
4253 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4254 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4255 (__pthread_initialize_minimal_internal): Register robust_list with
4257 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4258 Declare __set_robust_list_avail.
4259 * pthread_create.c (start_thread): Register robust_list of new thread.
4260 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4262 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4263 number of users, it's unreliable.
4264 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4265 set_robust_list syscall is available.
4266 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4267 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4268 Set robust_head.list_op_pending before trying to lock a robust mutex.
4269 * pthread_mutex_timedlock.c: Likewise.
4270 * pthread_mutex_trylock.c: Likewise.
4271 * pthread_mutex_unlock.c: Likewise for unlocking.
4272 * Makefile (tests): Add tst-robust8.
4273 * tst-robust8.c: New file.
4275 2006-03-08 Andreas Schwab <schwab@suse.de>
4277 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4278 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4280 2006-03-05 Roland McGrath <roland@redhat.com>
4282 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4283 and $config_os doesn't match *linux*.
4285 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4287 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4288 Use __syscall_error.
4289 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4290 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4291 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4292 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4293 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4294 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4296 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4298 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4300 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4302 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4303 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4305 (__lll_robust_timedlock_wait): Likewise.
4306 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4307 (__lll_robust_lock_wait): Likewise.
4308 (__lll_robust_timedlock_wait): Likewise.
4309 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4310 (__lll_robust_lock_wait): Likewise.
4311 (__lll_robust_timedlock_wait): Likewise.
4313 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4315 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4316 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4317 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4318 lll_robust_mutex_unlock): Define.
4319 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4321 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4323 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4324 instead of <clone.S>.
4326 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4328 * Makefile (libpthread-routines): Add
4329 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4330 and pthread_mutex_[sg]etprioceiling.
4331 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4332 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4333 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4334 pthread_mutex_setprioceiling.
4335 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4336 PTHREAD_PRIO_PROTECT): New enum values.
4337 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4338 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4339 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4341 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4342 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4343 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4345 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4346 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4347 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4348 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4349 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4350 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4351 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4353 * pthread_mutex_getprioceiling.c: New file.
4354 * pthread_mutex_setprioceiling.c: New file.
4355 * pthread_mutexattr_getprioceiling.c: New file.
4356 * pthread_mutexattr_setprioceiling.c: New file.
4357 * pthread_mutexattr_getprotocol.c: New file.
4358 * pthread_mutexattr_setprotocol.c: New file.
4360 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4362 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4364 2006-02-27 Roland McGrath <roland@redhat.com>
4366 * sysdeps/pthread/Subdirs: List nptl here too.
4367 * configure (libc_add_on_canonical): New variable.
4369 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4371 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4372 self to get main source tree's file.
4373 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4374 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4375 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4376 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4377 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4378 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4379 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4380 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4381 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4382 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4383 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4384 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4385 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4387 * Makefile: Use $(sysdirs) in vpath directive.
4389 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4390 (CPPFLAGS-timer_routines.c): Likewise.
4392 * Makeconfig (includes): Variable removed.
4394 2006-02-26 Roland McGrath <roland@redhat.com>
4396 * sysdeps/generic/pt-raise.c: Moved to ...
4397 * pt-raise.c: ... here.
4398 * sysdeps/generic/lowlevellock.h: Moved to ...
4399 * lowlevellock.h: ... here.
4401 2006-02-23 Roland McGrath <roland@redhat.com>
4403 * descr.h (struct pthread): Add final member `end_padding'.
4404 (PTHREAD_STRUCT_END_PADDING): Use it.
4406 2006-02-20 Roland McGrath <roland@redhat.com>
4408 * sysdeps/mips: Directory removed, saved in ports repository.
4409 * sysdeps/unix/sysv/linux/mips: Likewise.
4411 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4413 * tst-robust1.c: Add second mutex to check that the mutex list is
4416 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4418 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4419 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4420 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4421 lll_robust_mutex_unlock): New macros.
4422 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4423 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4424 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4425 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4426 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4428 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4430 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4432 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4434 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4436 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4437 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4438 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4439 (lll_robust_mutex_unlock): Likewise.
4441 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4443 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4444 Set robust_list.__next rather than robust_list.
4445 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4446 (__pthread_list_t): New typedef.
4447 (pthread_mutex_t): Replace __next and __prev fields with __list.
4448 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4449 (__pthread_list_t): New typedef.
4450 (pthread_mutex_t): Replace __next and __prev fields with __list.
4451 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4452 (__pthread_list_t, __pthread_slist_t): New typedefs.
4453 (pthread_mutex_t): Replace __next and __prev fields with __list.
4454 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4455 (__pthread_list_t, __pthread_slist_t): New typedefs.
4456 (pthread_mutex_t): Replace __next and __prev fields with __list.
4457 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4458 (__pthread_list_t, __pthread_slist_t): New typedefs.
4459 (pthread_mutex_t): Replace __next and __prev fields with __list.
4460 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4461 (__pthread_slist_t): New typedef.
4462 (pthread_mutex_t): Replace __next field with __list.
4464 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4466 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4467 PTHREAD_MUTEX_OWNERDEAD.
4468 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4469 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4470 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4471 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4472 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4473 to PTHREAD_MUTEX_INCONSISTENT.
4474 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4475 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4476 * pthread_mutex_trylock.c: Likewise.
4477 * pthread_mutex_timedlock.c: Likewise.
4478 * pthread_mutex_unlock.c: Likewise.
4479 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4480 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4481 lowlevelrobustlock.sym.
4482 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4483 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4485 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4486 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4487 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4488 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4489 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4491 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4493 * allocatestack.c (allocate_stack): Initialize robust_list.
4494 * init.c (__pthread_initialize_minimal_internal): Likewise.
4495 * descr.h (struct xid_command): Pretty printing.
4496 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4497 robust_list. Adjust macros.
4498 * pthread_create.c (start_thread): Adjust robust_list handling.
4499 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4500 but the owner for all robust mutex types.
4501 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4502 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4503 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4504 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4506 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4507 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4509 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4511 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4512 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4514 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4516 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4518 (lll_futex_timed_wait): Define.
4520 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4522 * tst-cancel4.c: Test ppoll.
4524 2006-01-18 Andreas Jaeger <aj@suse.de>
4527 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4528 (pthread_mutex_t): Follow changes for other archs. Based on patch
4529 by Jim Gifford <patches@jg555.com>.
4531 2006-01-13 Richard Henderson <rth@redhat.com>
4533 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4535 2006-01-10 Roland McGrath <roland@redhat.com>
4537 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4538 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4539 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4540 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4541 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4542 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4543 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4544 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4545 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4546 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4548 2006-01-09 Roland McGrath <roland@redhat.com>
4550 * tst-initializers1-c89.c: New file.
4551 * tst-initializers1-c99.c: New file.
4552 * tst-initializers1-gnu89.c: New file.
4553 * tst-initializers1-gnu99.c: New file.
4554 * Makefile (tests): Add them.
4555 (CFLAGS-tst-initializers1-c89.c): New variable.
4556 (CFLAGS-tst-initializers1-c99.c): New variable.
4557 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4558 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4560 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4561 Use __extension__ on anonymous union definition.
4562 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4563 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4564 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4565 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4566 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4568 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4570 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4571 Don't give the union a name because it changes the mangled name.
4572 Instead name the struct for __data.
4573 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4575 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4578 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4580 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4581 stack bias to mc_ftp field.
4583 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4585 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4586 being too clever and reloading the futex value where it shouldn't.
4588 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4590 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4593 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4595 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4598 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4600 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4601 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4602 rename in tcbhead_t.
4604 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4605 Don't give the union a name because it changes the mangled name.
4606 Instead name the struct for __data.
4607 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4608 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4609 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4610 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4611 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4612 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4614 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4616 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4618 (lll_futex_timed_wait): Define.
4619 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4620 * sysdeps/pthread/aio_misc.h: New file.
4622 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4624 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4626 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4628 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4629 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4630 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4632 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4634 * tst-cancel24.cc: Use C headers instead of C++ headers.
4636 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4638 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4639 sparc-linux configured glibc.
4640 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4641 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4642 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4643 atomic_compare_and_exchange_val_24_acq instead of
4644 atomic_compare_and_exchange_val_acq.
4645 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4646 instead of atomic_exchange_rel.
4647 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4648 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4650 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4652 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4653 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4654 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4655 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4656 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4657 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4659 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4661 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4662 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4663 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4665 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4667 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4669 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4671 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4674 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4676 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4677 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4678 THREAD_COPY_POINTER_GUARD): Define.
4679 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4680 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4682 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4684 * version.c: Update copyright year.
4686 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4688 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4689 .eh_frame section, use cfi_* directives.
4690 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4692 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4694 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4697 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4699 * sysdeps/pthread/sigaction.c: Removed.
4700 * sigaction.c: New file.
4701 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4703 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4705 * Makefile (tests): Add tst-signal7.
4706 * tst-signal7.c: New file.
4708 2005-12-27 Roland McGrath <roland@redhat.com>
4710 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4711 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4712 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4713 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4714 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4715 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4716 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4717 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4718 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4719 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4720 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4722 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4724 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4725 and __prev field to pthread_mutex_t.
4726 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4727 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4728 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4729 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4730 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4733 2005-12-26 Ulrich Drepper <drepper@redhat.com>
4735 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4736 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4737 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4738 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4739 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4740 and PTHREAD_MUTEXATTR_FLAG_BITS.
4741 * descr.h (struct pthread): Add robust_list field and define
4742 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4743 * pthread_mutexattr_getrobust.c: New file.
4744 * pthread_mutexattr_setrobust.c: New file.
4745 * pthread_mutex_consistent.c: New file.
4746 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4747 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4748 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4749 Adjust pthread_mutex_t initializers.
4750 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4751 field to pthread_mutex_t.
4752 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4753 and __prev field to pthread_mutex_t.
4754 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4755 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4756 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4757 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4758 * pthread_mutexattr_gettype.c: Likewise.
4759 * pthread_mutexattr_setpshared.c: Likewise.
4760 * pthread_mutexattr_settype.c: Likewise.
4761 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4762 Initialize mutex kind according to robust flag.
4763 * pthread_mutex_lock.c: Implement local robust mutex.
4764 * pthread_mutex_timedlock.c: Likewise.
4765 * pthread_mutex_trylock.c: Likewise.
4766 * pthread_mutex_unlock.c: Likewise.
4767 * pthread_create.c (start_thread): Mark robust mutexes which remained
4769 * tst-robust1.c: New file.
4770 * tst-robust2.c: New file.
4771 * tst-robust3.c: New file.
4772 * tst-robust4.c: New file.
4773 * tst-robust5.c: New file.
4774 * tst-robust6.c: New file.
4775 * tst-robust7.c: New file.
4776 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4777 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4778 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4779 tst-robust5, tst-robust6, and tst-robust7.
4781 * tst-typesizes.c: New file.
4782 * Makefile (tests): Add tst-typesizes.
4784 * tst-once3.c: More debug output.
4786 2005-12-24 Ulrich Drepper <drepper@redhat.com>
4788 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4789 missing after last change.
4791 * version.c: Update copyright year.
4793 2005-12-23 Ulrich Drepper <drepper@redhat.com>
4795 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4796 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4797 * pthread_mutex_trylock.c: Likewise.
4798 * pthread_mutex_timedlock.c: Likewise.
4799 * pthread_mutex_unlock.c: Likewise.
4801 2005-12-22 Roland McGrath <roland@redhat.com>
4803 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4804 so that #include_next's search location is not reset to the -I..
4805 directory where <nptl/...> can be found.
4807 2005-12-22 Ulrich Drepper <drepper@redhat.com>
4810 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4811 Fix unwind info. Remove useless branch prediction prefix.
4812 * tst-cancel24.cc: New file.
4813 * Makefile: Add rules to build and run tst-cancel24.
4815 2005-12-21 Roland McGrath <roland@redhat.com>
4817 * libc-cancellation.c: Use <> rather than "" #includes.
4818 * pt-cleanup.c: Likewise.
4819 * pthread_create.c: Likewise.
4820 * pthread_join.c: Likewise.
4821 * pthread_timedjoin.c: Likewise.
4822 * pthread_tryjoin.c: Likewise.
4823 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4824 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4825 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4826 * unwind.c: Likewise.
4828 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4830 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4831 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4832 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4833 THREAD_COPY_POINTER_GUARD): Define.
4835 2005-12-19 Jakub Jelinek <jakub@redhat.com>
4837 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4839 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4840 THREAD_COPY_POINTER_GUARD): Define.
4841 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4842 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4843 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4844 THREAD_COPY_POINTER_GUARD): Define.
4845 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4846 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4847 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4848 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4849 Use PTR_DEMANGLE for B0 if defined.
4851 2005-12-17 Ulrich Drepper <drepper@redhat.com>
4853 * pthread_create.c (__pthread_create_2_1): Use
4854 THREAD_COPY_POINTER_GUARD if available.
4855 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4856 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4857 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4858 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4859 * sysdeps/x86_64/tls.h: Likewise.
4861 2005-12-15 Roland McGrath <roland@redhat.com>
4863 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4865 2005-12-13 Ulrich Drepper <drepper@redhat.com>
4867 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4869 * errno-loc.c: New file.
4871 2005-12-12 Roland McGrath <roland@redhat.com>
4873 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4874 adjustments before choosing stack size. Update minimum stack size
4875 calculation to match allocate_stack change.
4877 2005-12-12 Ulrich Drepper <drepper@redhat.com>
4879 * allocatestack.c (allocate_stack): Don't demand that there is an
4880 additional full page available on the stack beside guard, TLS, the
4883 2005-11-24 Ulrich Drepper <drepper@redhat.com>
4885 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4886 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4888 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4889 compiling 32-bit code we must define __cleanup_fct_attribute.
4891 005-11-24 Jakub Jelinek <jakub@redhat.com>
4894 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4895 __attribute__ instead of __attribute.
4896 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4897 (__cleanup_fct_attribute): Likewise.
4899 2005-11-17 Jakub Jelinek <jakub@redhat.com>
4901 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4902 a write barrier before writing libgcc_s_getcfa.
4904 2005-11-06 Ulrich Drepper <drepper@redhat.com>
4906 * sysdeps/unix/sysv/linux/configure: Removed.
4908 2005-11-05 Ulrich Drepper <drepper@redhat.com>
4910 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4911 optional init_array/fini_array support.
4913 2005-10-24 Roland McGrath <roland@redhat.com>
4915 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4916 versioned_symbol use.
4918 2005-10-16 Roland McGrath <roland@redhat.com>
4920 * init.c (__pthread_initialize_minimal_internal): Even when using a
4921 compile-time default stack size, apply the minimum that allocate_stack
4922 will require, and round up to page size.
4924 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4926 * Makefile ($(test-modules)): Remove static pattern rule.
4928 2005-10-14 Jakub Jelinek <jakub@redhat.com>
4929 Ulrich Drepper <drepper@redhat.com>
4931 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4932 alignment in callback function.
4933 * Makefile: Add rules to build and run tst-align3.
4934 * tst-align3.c: New file.
4936 2005-10-03 Jakub Jelinek <jakub@redhat.com>
4938 * allocatestack.c (setxid_signal_thread): Add
4939 INTERNAL_SYSCALL_DECL (err).
4941 2005-10-02 Jakub Jelinek <jakub@redhat.com>
4943 * allocatestack.c (setxid_signal_thread): Need to use
4944 atomic_compare_and_exchange_bool_acq.
4946 2005-10-01 Ulrich Drepper <drepper@redhat.com>
4947 Jakub Jelinek <jakub@redhat.com>
4949 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4951 (struct pthread): Move specific_used field to avoid padding.
4952 Add setxid_futex field.
4953 * init.c (sighandler_setxid): Reset setxid flag and release the
4955 * allocatestack.c (setxid_signal_thread): New function. Broken
4956 out of the bodies of the two loops in __nptl_setxid. For undetached
4957 threads check whether they are exiting and if yes, don't send a signal.
4958 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4959 * pthread_create.c (start_thread): For undetached threads, check
4960 whether setxid bit is set. If yes, wait until signal has been
4963 * allocatestack.c (STACK_VARIABLES): Initialize them.
4964 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4966 2004-09-02 Jakub Jelinek <jakub@redhat.com>
4968 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4969 waiters, awake all waiters on the associated mutex.
4971 2005-09-22 Roland McGrath <roland@redhat.com>
4973 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4974 ../sysdeps/x86_64/hp-timing.h).
4976 2005-08-29 Jakub Jelinek <jakub@redhat.com>
4978 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4979 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4980 (lll_futex_wake_unlock): Define.
4981 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4982 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4983 (lll_futex_wake_unlock): Define.
4984 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4985 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4986 (lll_futex_wake_unlock): Define.
4987 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4988 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4989 (lll_futex_wake_unlock): Define.
4990 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4991 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4992 (lll_futex_wake_unlock): Define.
4993 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4994 lll_futex_wake_unlock.
4995 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4996 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4997 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4998 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4999 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5000 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5002 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5004 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5005 Fix typo in register name.
5007 2005-08-23 Ulrich Drepper <drepper@redhat.com>
5009 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5010 Use __sigfillset. Document that sigfillset does the right thing wrt
5013 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5016 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5017 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5018 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5019 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5020 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5021 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5023 * Makefile (tests): Add tst-initializers1.
5024 (CFLAGS-tst-initializers1.c): Set.
5025 * tst-initializers1.c: New test.
5027 2005-07-11 Jakub Jelinek <jakub@redhat.com>
5029 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5030 Make sure __flags are located at offset 48 from the start of the
5033 2005-07-02 Roland McGrath <roland@redhat.com>
5035 * Makeconfig: Comment fix.
5037 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5039 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5040 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5041 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5042 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5043 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5044 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5045 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5046 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5047 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5048 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5050 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5052 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5053 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5054 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5056 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5057 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5058 field. Put in sysinfo field unconditionally.
5059 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5060 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5061 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5062 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5064 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5065 * pthread_create.c (__pthread_create_2_1): Use
5066 THREAD_COPY_STACK_GUARD macro.
5067 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5069 * tst-stackguard1.c: New file.
5070 * tst-stackguard1-static.c: New file.
5072 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5074 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5075 Invoke CGOTSETUP and CGOTRESTORE.
5076 (CGOTSETUP, CGOTRESTORE): Define.
5078 2005-05-29 Richard Henderson <rth@redhat.com>
5080 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5081 (tf_write, tf_writev): Use it.
5082 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5085 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5087 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5088 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5089 __librt_*_asynccancel@local.
5091 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5093 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5094 all occurrences of JUMPTARGET. Instead append @local to labels.
5096 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5098 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5099 size/alignment of struct pthread rather than tcbhead_t.
5100 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5102 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5104 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5107 2005-05-19 Richard Henderson <rth@redhat.com>
5109 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5110 __sync_val_compare_and_swap, not explicit _si variant.
5111 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5113 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5116 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5118 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5120 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5121 .eh_frame section, use cfi_* directives.
5123 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5125 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5128 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5131 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5134 2005-04-27 Roland McGrath <roland@redhat.com>
5136 * Makefile (tests): Remove tst-clock2.
5138 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5139 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5140 translating to the kernel clockid_t for our own process/thread clock.
5142 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5144 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5146 * old_pthread_cond_init.c: Include <errno.h>.
5147 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5148 process shared or uses clock other than CLOCK_REALTIME.
5149 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5151 2005-04-13 David S. Miller <davem@davemloft.net>
5153 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5154 * sysdeps/sparc/sparc64/clone.S: New file.
5156 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5159 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5160 __inline instead of inline.
5161 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5163 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5165 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5166 functionally equivalent, but shorter instructions.
5167 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5168 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5169 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5171 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5172 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5173 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5174 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5175 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5176 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5177 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5179 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5180 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5181 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5182 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5183 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5185 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5187 * sysdeps/mips/Makefile: New file.
5188 * sysdeps/mips/nptl-sysdep.S: New file.
5189 * sysdeps/mips/tcb-offsets.sym: New file.
5190 * sysdeps/mips/pthread_spin_lock.S: New file.
5191 * sysdeps/mips/pthread_spin_trylock.S: New file.
5192 * sysdeps/mips/pthreaddef.h: New file.
5193 * sysdeps/mips/tls.h: New file.
5194 * sysdeps/mips/jmpbuf-unwind.h: New file.
5195 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5196 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5197 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5198 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5199 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5200 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5201 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5202 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5203 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5204 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5206 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5209 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5212 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5214 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5216 2005-02-25 Roland McGrath <roland@redhat.com>
5218 * alloca_cutoff.c: Correct license text.
5219 * tst-unload.c: Likewise.
5220 * sysdeps/pthread/allocalim.h: Likewise.
5221 * sysdeps/pthread/pt-initfini.c: Likewise.
5222 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5223 * sysdeps/pthread/bits/sigthread.h: Likewise.
5224 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5225 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5227 2005-02-16 Roland McGrath <roland@redhat.com>
5229 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5230 Use unsigned int * for ptr_nthreads.
5232 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5235 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5238 2005-02-07 Richard Henderson <rth@redhat.com>
5241 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5244 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5246 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5247 order of arguments in invocation of atomic_add_zero.
5249 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5252 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5253 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5254 at least gotntpoff relocation and addition.
5255 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5257 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5259 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5262 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5264 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5265 entry for static tls deallocation fix.
5266 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5267 also contains information whether the memory pointed to is static
5269 * sysdeps/i386/tls.h: Likewise.
5270 * sysdeps/ia64/tls.h: Likewise.
5271 * sysdeps/powerpc/tls.h: Likewise.
5272 * sysdeps/s390/tls.h: Likewise.
5273 * sysdeps/sh/tls.h: Likewise.
5274 * sysdeps/sparc/tls.h: Likewise.
5275 * sysdeps/x86_64/tls.h: Likewise.
5277 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5279 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5281 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5283 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5285 * Makefile (tests): Add tst-align2.
5286 * tst-align2.c: New test.
5287 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5288 -mpreferred-stack-boundary=4.
5290 2004-12-18 Roland McGrath <roland@redhat.com>
5292 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5293 New file removed withdrawn for the moment.
5295 2004-12-17 Richard Henderson <rth@redhat.com>
5297 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5298 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5300 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5302 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5303 Increased PTHREAD_STACK_MIN.
5305 * tst-context1.c (stacks): Use bigger stack size.
5307 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5309 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5310 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5312 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5314 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5315 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5316 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5318 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5320 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5322 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5324 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5325 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5327 * tst-getpid1.c: If child crashes, report this first. Print which
5330 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5332 * init.c (__pthread_initialize_minimal_internal): Also unblock
5335 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5337 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5338 _POSIX_THREAD_CPUTIME): Define to 0.
5339 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5340 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5341 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5342 __timer_signal_thread_tclk): Remove.
5343 (init_module): Remove their initialization.
5344 (thread_cleanup): Remove their cleanup assertions.
5345 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5346 __timer_signal_thread_tclk): Remove.
5347 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5348 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5349 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5351 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5353 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5354 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5356 * Makefile (tests): Add tst-getpid2.
5357 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5358 (do_test): Use it. Use __clone2 instead of clone on ia64.
5359 * tst-getpid2.c: New test.
5361 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5363 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5365 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5367 * Makefile (tests): Add tst-getpid1.
5368 * tst-getpid1.c: New file.
5369 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5370 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5372 2004-12-02 Roland McGrath <roland@redhat.com>
5374 * Makefile (libpthread-nonshared): Variable removed.
5375 ($(objpfx)libpthread_nonshared.a): Target removed.
5376 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5377 These are now handled by generic magic from
5378 libpthread-static-only-routines being set.
5380 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5382 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5383 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5384 _POSIX_THREAD_PRIO_PROTECT): Define.
5385 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5386 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5387 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5389 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5391 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5392 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5393 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5394 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5395 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5396 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5397 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5399 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5401 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5403 * Makefile (libpthread-routines): Add pthread_setschedprio.
5404 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5405 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5406 * pthread_setschedprio.c: New file.
5408 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5410 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5411 * pthread_cancel.c (pthread_create): Likewise.
5413 * Makefile (libpthread-routines): Add vars.
5414 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5415 * init.c (__default_stacksize, __is_smp): Remove.
5417 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5418 and define a wrapper macro.
5419 (PTHREAD_STATIC_FN_REQUIRE): Define.
5420 * allocatestack.c (__find_thread_by_id): Undefine.
5421 * pthread_create (__pthread_keys): Remove.
5422 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5423 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5424 PTHREAD_STATIC_FN_REQUIRE.
5426 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5428 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5429 parameter to REGISTER macro.
5431 2004-11-17 Roland McGrath <roland@redhat.com>
5433 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5434 Make sure SIGCANCEL is blocked as well.
5436 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5438 * sysdeps/pthread/setxid.h: New file.
5439 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5440 (struct xid_command): Add forward decl.
5441 (struct pthread_functions): Change return type of __nptl_setxid hook
5443 * pthreadP.h (__nptl_setxid): Change return type to int.
5444 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5445 calling thread, return its return value and set errno on failure.
5446 * descr.h (struct xid_command): Change id type to long array.
5448 * Makefile: Add rules to build and test tst-setuid1 and
5450 * tst-setuid1.c: New test.
5451 * tst-setuid1-static.c: New test.
5453 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5455 * Makefile (tests): Add tst-exit3.
5456 * tst-exit3.c: New test.
5458 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5460 * Makefile (tests): Add tst-exit2.
5461 * tst-exit2.c: New file.
5463 2004-11-09 Roland McGrath <roland@redhat.com>
5466 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5467 here, before calling clone.
5468 * pthread_create.c (start_thread): Don't do it here.
5470 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5472 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5474 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5476 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5477 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5480 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5482 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5483 if sched_priority is not between minprio and maxprio.
5485 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5487 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5488 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5490 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5491 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5493 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5495 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5496 not-cancelable I/O functions.
5498 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5500 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5501 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5502 make sure 2 is stored in the futex and we looked at the old value.
5503 Fix a few other problems to return the correct value.
5505 2004-10-14 Richard Henderson <rth@redhat.com>
5507 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5510 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5512 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5513 of pthread-functions.h and pthreaddef.h.
5514 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5516 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5517 Change __data.__nwaiters from int to unsigned int.
5519 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5520 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5522 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5525 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5526 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5528 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5530 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5531 test fails, remove message queue.
5532 (tf_msgsnd): Likewise.
5534 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5536 * tst-clock1.c: Change #ifdef to #if defined.
5537 * tst-clock2.c: Likewise.
5538 * tst-cond11.c: Likewise.
5540 * sysdeps/pthread/timer_create.c (timer_create): Use
5541 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5542 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5545 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5547 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5548 _POSIX_THREAD_CPUTIME): Define to 0.
5550 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5552 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5553 and _POSIX_THREAD_CPUTIME to zero.
5554 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5555 * tst-barrier2.c: Fix testing for POSIX feature.
5556 * tst-clock1.c: Likewise.
5557 * tst-clock2.c: Likewise.
5558 * tst-cond11.c: Likewise.
5559 * tst-cond4.c: Likewise.
5560 * tst-cond6.c: Likewise.
5561 * tst-flock2.c: Likewise.
5562 * tst-mutex4.c: Likewise.
5563 * tst-mutex9.c: Likewise.
5564 * tst-rwlock12.c: Likewise.
5565 * tst-rwlock4.c: Likewise.
5566 * tst-signal1.c: Likewise.
5567 * tst-spin2.c: Likewise.
5568 * sysdeps/pthread/posix-timer.h: Likewise.
5569 * sysdeps/pthread/timer_create.c: Likewise.
5570 * sysdeps/pthread/timer_routines.c: Likewise.
5572 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5574 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5575 (__lll_mutex_timedlock_wait): Address futex correctly.
5577 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5578 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5579 make sure 2 is stored in the futex and we looked at the old value.
5580 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5581 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5582 which might very well made the code not working at all before.
5585 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5587 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5588 allow SIGSETXID to be sent.
5589 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5590 for SIGSETXID to be defined.
5591 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5592 SIGSETXID cannot be blocked.
5594 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5595 Add __extension__ to long long types.
5596 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5597 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5598 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5599 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5600 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5601 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5602 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5604 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5606 * descr.h (struct pthread): Add stopped_start field.
5607 * sysdeps/pthread/createthread.c (create_thread): Set
5608 start_stopped flag in descriptor for new thread appropriately.
5609 * pthread_create.c (start_thread): Only take lock to be stopped on
5610 startup if stopped_start flag says so.
5612 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5614 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5615 is created detached and if yes, do not try to free the stack in case
5616 the thread creation failed.
5617 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5618 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5619 case there has been no error. [BZ #405]
5621 * pthread_create.c (start_thread): Don't wait for scheduler data
5622 etc to be set at the beginning of the function. The cancellation
5623 infrastructure must have been set up. And enable async
5624 cancellation before potentially going to sleep. [BZ #401]
5626 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5628 * Versions: Remove exports for pthread_set*id_np functions.
5629 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5631 * Makefile: Don't build pthread_set*id code for now.
5633 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5635 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5637 * allocatestack.c (__nptl_setxid): New function.
5638 * descr.h (struct xid_command): Define type.
5639 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5640 (sighandler_setxid): New function.
5641 (__pthread_initialize_minimal): Register sighandler_setxid for
5643 * pt-allocrtsig.c: Update comment.
5644 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5645 Declare __nptl_setxid.
5646 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5647 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5648 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5649 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5650 and pthread_setresuid_np.
5651 * pthread_setgid_np.c: New file.
5652 * pthread_setuid_np.c: New file.
5653 * pthread_setegid_np.c: New file.
5654 * pthread_seteuid_np.c: New file.
5655 * pthread_setregid_np.c: New file.
5656 * pthread_setreuid_np.c: New file.
5657 * pthread_setresgid_np.c: New file.
5658 * pthread_setresuid_np.c: New file.
5659 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5660 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5661 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5662 and pthread_setresuid_np.
5663 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5664 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5665 pthread_setregid, and pthread_setresgid.
5667 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5669 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5670 ENOMEM when out of memory.
5672 2004-09-10 Roland McGrath <roland@redhat.com>
5675 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5676 code, since we don't try to use the broken CLONE_STOPPED any more.
5677 * pthread_create.c (start_thread): Likewise.
5679 2004-09-15 Richard Henderson <rth@redhat.com>
5681 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5683 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5685 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5686 (__libc_unwind_longjmp): Delete macro and declare as function.
5687 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5688 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5690 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5691 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5692 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5694 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5696 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5698 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5699 types also for __USE_XOPEN2K.
5700 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5701 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5702 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5703 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5704 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5705 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5706 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5709 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5711 * sysdeps/pthread/pthread.h
5712 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5713 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5714 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5715 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5718 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5720 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5721 PSEUDO to be used with . prefix.
5723 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5724 Use atomic_increment instead of atomic_exchange_and_add.
5725 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5727 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5729 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5732 * allocatestack.c (allocate_stack): Use atomic_increment_val
5733 instead of atomic_exchange_and_add.
5734 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5735 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5737 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5740 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5741 the initialization function might throw.
5743 2005-09-05 Richard Henderson <rth@redhat.com>
5745 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5746 Move definition inside libpthread, libc, librt check. Provide
5747 definition for rtld.
5749 2004-09-02 Ulrich Drepper <drepper@redhat.com>
5751 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5752 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5753 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5754 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5755 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5756 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5757 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5758 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5761 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5762 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5763 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5765 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5766 Decrement __nwaiters. If pthread_cond_destroy has been called and
5767 this is the last waiter, signal pthread_cond_destroy caller and
5768 avoid using the pthread_cond_t structure after unlock.
5769 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5770 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5771 Read clock type from the least significant bits of __nwaiters instead
5773 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5774 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5776 2004-08-31 Jakub Jelinek <jakub@redhat.com>
5779 * Makefile (tests): Add tst-cond20 and tst-cond21.
5780 * tst-cond20.c: New test.
5781 * tst-cond21.c: New test.
5782 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5783 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5785 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5787 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5788 (pthread_cond_t): Likewise.
5789 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5791 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5793 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5795 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5796 (cond_nwaiters): New.
5798 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5799 if there are waiters not signalled yet.
5800 Wait until all already signalled waiters wake up.
5801 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5802 __nwaiters. If pthread_cond_destroy has been called and this is the
5803 last waiter, signal pthread_cond_destroy caller and avoid using
5804 the pthread_cond_t structure after unlock.
5805 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5806 decrement it when leaving. If pthread_cond_destroy has been called
5807 and this is the last waiter, signal pthread_cond_destroy caller.
5808 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5809 Likewise. Read clock type from the least significant bits of
5810 __nwaiters instead of __clock.
5811 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5812 whether clock ID can be encoded in COND_CLOCK_BITS bits.
5813 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5814 clock type just from the last COND_CLOCK_BITS bits of value.
5815 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5816 instead of __clock, just from second bit of condattr's value.
5818 2004-08-30 Jakub Jelinek <jakub@redhat.com>
5820 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5821 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
5823 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5825 2004-08-15 Roland McGrath <roland@frob.com>
5827 * pthread_atfork.c: Update copyright terms including special exception
5828 for these trivial files, which are statically linked into executables
5829 that use dynamic linking for the significant library code.
5831 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5833 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5834 pthread_rwlock_rdlock.
5835 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5836 Decrease __nr_readers_queued after reacquiring lock.
5837 * sysdeps/pthread/pthread_rwlock_timedrdlock
5838 (pthread_rwlock_timedrdlock): Likewise.
5839 Reported by Bob Cook <bobcook47@hotmail.com>.
5841 2004-08-11 Jakub Jelinek <jakub@redhat.com>
5843 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5844 before pthread_barrier_wait.
5846 2004-08-07 Ulrich Drepper <drepper@redhat.com>
5848 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5849 Remove unnecessary exception handling data.
5851 2004-07-23 Jakub Jelinek <jakub@redhat.com>
5854 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5855 instead of clockid_t.
5857 2004-07-21 Roland McGrath <roland@redhat.com>
5859 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5861 2004-07-19 Roland McGrath <roland@redhat.com>
5863 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5865 2004-07-02 Roland McGrath <roland@redhat.com>
5867 * configure: Don't exit.
5869 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5871 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5872 (__pthread_cond_timedwait): Check for invalid nanosecond in
5875 2004-07-07 Ulrich Drepper <drepper@redhat.com>
5877 * Makefile: Add rules to build and run tst-fini1.
5878 * tst-fini1.c: New file.
5879 * tst-fini1mod.c: New file.
5881 2004-07-05 Ulrich Drepper <drepper@redhat.com>
5883 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5884 if no cancellation support is needed.
5885 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5886 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5887 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5888 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5889 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5890 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5891 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5892 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5893 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5895 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5896 only if not already defined.
5898 2004-07-05 Jakub Jelinek <jakub@redhat.com>
5900 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5901 constraint "m" instead of "0" for futex.
5903 * shlib-versions: Add powerpc64-.*-linux.*.
5905 2004-07-04 Jakub Jelinek <jakub@redhat.com>
5907 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5908 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5910 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5911 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5914 2004-06-29 Roland McGrath <roland@redhat.com>
5916 * Banner: NPTL no longer has its own version number.
5917 * Makefile (nptl-version): Variable removed.
5918 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5919 using $(version), the glibc version number.
5921 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5923 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5924 Fix branch offset for a PLT entry.
5925 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5927 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5929 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5931 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5934 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5936 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5939 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5941 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5942 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5944 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5945 (pthread_rwlock_timedrdlock): Likewise.
5947 2004-06-22 Jakub Jelinek <jakub@redhat.com>
5949 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5950 Set __r7 to val, not mutex.
5952 2004-06-27 Ulrich Drepper <drepper@redhat.com>
5954 * Makefile: Add rules to build tst-rwlock14.
5955 * tst-rwlock14.c: New file.
5957 2004-06-24 Boris Hu <boris.hu@intel.com>
5959 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5961 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5963 2004-06-19 Andreas Jaeger <aj@suse.de>
5965 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5966 assembler in last patch.
5968 2004-06-17 Ulrich Drepper <drepper@redhat.com>
5970 * sysdeps/pthread/pthread_cond_timedwait.c
5971 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5972 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5973 (__pthread_cond_timedwait): Check for invalid nanosecond in
5975 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5976 * tst-cond19.c: New file.
5977 * Makefile: Add rules to build and run tst-cond19.
5979 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5981 * tst-context1.c (GUARD_PATTERN): Defined.
5982 (tst_context_t): Define struct containing ucontext_t & guard words.
5983 (ctx): Declare as an array of tst_context_t.
5984 (fct): Verify uc_link & guard words are still valid.
5985 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5987 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5989 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5990 Add __data.__futex field, reshuffle __data.__clock.
5991 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5992 (__pthread_cond_signal): Increment __futex at the same time as
5993 __wakeup_seq or __total_seq. Pass address of __futex instead of
5994 address of low 32-bits of __wakeup_seq to futex syscall.
5995 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5996 (__pthread_cond_wait): Likewise. Pass __futex value from before
5997 releasing internal lock to FUTEX_WAIT.
5998 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5999 (__pthread_cond_timedwait): Likewise.
6000 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6001 (FUTEX_CMP_REQUEUE): Define.
6002 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6003 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6004 Pass __futex value from before the unlock and __futex address instead
6005 of address of low 32-bits of __wakeup_seq to futex syscall.
6006 Fallback to FUTEX_WAKE all on any errors.
6008 2004-06-08 Jakub Jelinek <jakub@redhat.com>
6010 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6012 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6013 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6014 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6015 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6016 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
6018 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
6020 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6021 Add memory clobber to inline assembly.
6022 (__lll_mutex_trylock): Likewise.
6023 (__lll_mutex_cond_trylock): Likewise.
6025 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
6027 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6028 Pass val argument as 6th system call argument in %r7.
6030 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6032 * Makefile (tests): Add tst-cond16.
6033 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6034 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6035 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6036 Add __data.__futex field, reshuffle __data.__clock.
6037 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6038 (__pthread_cond_signal): Increment __futex at the same time as
6039 __wakeup_seq or __total_seq. Pass address of __futex instead of
6040 address of low 32-bits of __wakeup_seq to futex syscall.
6041 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6042 (__pthread_cond_wait): Likewise. Pass __futex value from before
6043 releasing internal lock to FUTEX_WAIT.
6044 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6045 (__pthread_cond_timedwait): Likewise.
6046 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6047 (FUTEX_CMP_REQUEUE): Define.
6048 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6049 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6050 Pass __futex value from before the unlock and __futex address instead
6051 of address of low 32-bits of __wakeup_seq to futex syscall.
6052 Fallback to FUTEX_WAKE all on any errors.
6053 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6055 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6056 internally. Return non-zero if error, zero if success.
6057 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6058 Add __data.__futex field, reshuffle __data.__clock.
6059 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6061 (lll_futex_requeue): Add val argument, return 1 unconditionally
6063 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6064 Add __data.__futex field, reshuffle __data.__clock.
6065 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6067 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6068 internally. Return non-zero if error, zero if success.
6069 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6070 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6071 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6073 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6074 internally. Return non-zero if error, zero if success.
6075 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6076 Add __data.__futex field, reshuffle __data.__clock.
6077 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6079 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6080 internally. Return non-zero if error, zero if success.
6081 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6082 Add __data.__futex field, reshuffle __data.__clock.
6083 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6084 Add __data.__futex field, reshuffle __data.__clock.
6085 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6086 Increment __futex at the same time as __wakeup_seq or __total_seq.
6087 Pass address of __futex instead of address of low 32-bits of
6088 __wakeup_seq to futex syscall.
6089 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6090 Pass __futex value from before releasing internal lock
6092 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6093 Likewise. Avoid unnecessary shadowing of variables.
6094 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6095 Set __futex to 2 * __total_seq. Pass __futex value from before the
6096 unlock and __futex address instead of address of low 32-bits of
6097 __wakeup_seq to futex_requeue macro, adjust for new return value
6099 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6100 (__pthread_cond_signal): Increment __futex at the same time as
6101 __wakeup_seq or __total_seq. Pass address of __futex instead of
6102 address of low 32-bits of __wakeup_seq to futex syscall.
6103 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6104 (__pthread_cond_wait): Likewise. Pass __futex value from before
6105 releasing internal lock to FUTEX_WAIT.
6106 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6107 (__pthread_cond_timedwait): Likewise.
6108 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6109 (FUTEX_CMP_REQUEUE): Define.
6110 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6111 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6112 Pass __futex value from before the unlock and __futex address instead
6113 of address of low 32-bits of __wakeup_seq to futex syscall.
6114 Fallback to FUTEX_WAKE all on any errors.
6116 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6118 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6119 Add nop to align the end of critical section.
6120 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6122 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6124 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6125 Add __broadcast_seq field.
6126 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6127 all waiters as woken with woken_seq and bump broadcast counter.
6128 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6129 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6130 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6131 Comment typo fixes. Avoid returning -ETIMEDOUT.
6133 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6135 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6136 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6137 Reported by Kaz Kojima.
6139 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6141 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6143 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6145 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6146 __broadcast_seq with bc_seq after acquiring internal lock instead of
6149 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6151 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6154 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6155 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6156 (pthread_cond_t): Add __data.__broadcast_seq field.
6157 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6158 (FRAME_SIZE): Define.
6159 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6161 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6163 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6166 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6169 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6171 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6172 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6173 Add __broadcast_seq field.
6174 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6175 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6176 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6177 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6178 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6179 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6180 all waiters as woken with woken_seq and bump broadcast counter.
6181 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6183 __broadcast_seq field.
6184 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6185 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6186 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6187 * pthread_cond_init.c: Initialize __broadcast_seq field.
6188 * Makefile (tests): Add tst-cond17 and tst-cond18.
6189 Add .NOTPARALLEL goal.
6190 * tst-cond16.c: New file. From Jakub.
6191 * tst-cond17.c: New file. From Jakub.
6192 * tst-cond18.c: New file. From Jakub.
6194 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6196 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6200 Parametrize frame size. Correct some unwind info.
6201 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6203 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6205 * tst-stack3.c: Note testing functionality beyond POSIX.
6207 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6209 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6210 Change conditional from ifdef to if.
6212 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6214 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6215 SYSDEP_CANCEL_ERROR): Define.
6218 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6220 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6222 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6224 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6226 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6228 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6229 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6230 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6231 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6233 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6235 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6236 thread has all signals blocked.
6238 2004-04-18 Andreas Jaeger <aj@suse.de>
6240 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6241 (SEM_VALUE_MAX): Add missing brace.
6243 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6245 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6247 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6248 * sysdeps/pthread/tst-mqueue8x.c: New test.
6249 * tst-cancel4.c: Update comment about message queues.
6251 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6252 return it_value { 0, 0 }.
6253 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6255 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6256 assertion for SIGEV_NONE.
6257 (thread_attr_compare): Compare all attributes, not just a partial
6260 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6262 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6264 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6266 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6267 Just use a plain number.
6268 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6269 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6270 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6271 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6272 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6273 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6274 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6276 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6278 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6280 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6282 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6284 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6285 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6286 of calling sigwaitinfo.
6288 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6290 * allocatestack.c (allocate_stack): Set reported_guardsize
6292 * pthread_getattr_np.c (pthread_getattr_np): Use
6293 reported_guardsize instead of guardsize.
6294 * descr.h (struct pthread): Add reported_guardsize field.
6296 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6298 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6300 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6302 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6304 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6306 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6307 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6308 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6309 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6310 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6312 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6313 (_POSIX_MESSAGE_PASSING): Define.
6314 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6315 (_POSIX_MESSAGE_PASSING): Define.
6316 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6317 (_POSIX_MESSAGE_PASSING): Define.
6319 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6321 * tst-context1.c (fct): Check whether correct stack is used.
6323 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6325 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6326 matching constraints for asm mem parameters.
6328 * tst-clock2.c (tf): Don't define unless needed.
6330 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6332 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6335 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6337 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6338 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6339 * pthreadP.h: Declare __nptl_deallocate_tsd.
6340 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6343 * Makefile (tests): Add tst-tsd5.
6344 * tst-tsd5.c: New file.
6346 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6348 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6349 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6350 is SHLIB_COMPAT check.
6351 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6352 (__pthread_attr_getaffinity_old): Likewise.
6353 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6354 (__pthread_getaffinity_old): Likewise.
6355 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6356 (__pthread_setaffinity_old): Likewise.
6358 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6360 * allocatestack.c (_make_stacks_executable): Call
6361 _dl_make_stack_executable first.
6363 2004-03-24 Roland McGrath <roland@redhat.com>
6365 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6366 constraint instead of "0".
6368 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6370 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6371 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6373 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6374 code to avoid warning.
6376 2004-03-24 Andreas Jaeger <aj@suse.de>
6378 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6379 (__pthread_attr_setaffinity_old): Remove const.
6381 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6383 * sysdeps/unix/sysv/linux/smp.h: New file.
6384 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6385 * init.c: Define __is_smp.
6386 (__pthread_initialize_minimal_internal): Call is_smp_system to
6387 initialize __is_smp.
6388 * pthreadP.h: Declare __is_smp.
6389 Define MAX_ADAPTIVE_COUNT is necessary.
6390 * pthread_mutex_init.c: Add comment regarding __spins field.
6391 * pthread_mutex_lock.c: Implement adaptive mutex type.
6392 * pthread_mutex_timedlock.c: Likewise.
6393 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6394 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6396 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6397 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6398 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6399 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6400 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6401 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6402 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6403 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6404 lll_mutex_cond_trylock.
6405 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6406 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6407 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6408 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6409 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6410 Define BUSY_WAIT_NOP.
6411 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6412 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6414 * tst-mutex5.c: Add support for testing adaptive mutexes.
6415 * tst-mutex7.c: Likewise.
6416 * tst-mutex5a.c: New file.
6417 * tst-mutex7a.c: New file.
6418 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6420 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6421 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6422 vgettimeofday call might destroy the content.
6424 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6427 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6428 No need to restrict type of ret. Make it int. Add comment.
6430 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6431 Remove unnecessary setne instruction.
6433 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6435 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6436 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6437 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6438 If realloc fails, break out of the loop.
6440 2004-03-20 Andreas Jaeger <aj@suse.de>
6442 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6443 (__pthread_setaffinity_old): Fix interface.
6444 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6445 (__pthread_getaffinity_old): Likewise.
6447 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6448 (__pthread_setaffinity_new): Remove duplicate declaration.
6450 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6452 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6453 the return value to a safe register.
6454 (CDISABLE): Set the function argument correctly.
6456 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6458 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6459 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6460 Rewrite so that only one locked memory operation per round is needed.
6461 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6462 (pthread_barrier_wait): After wakeup, release lock only when the
6463 last thread stopped using the barrier object.
6464 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6465 (__pthread_cond_wait): Don't store mutex address if the current
6466 value is ~0l. Add correct cleanup support and unwind info.
6467 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6468 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6469 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6470 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6471 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6472 Add correct cleanup support and unwind info.
6473 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6474 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6475 information for syscall wrappers.
6477 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6479 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6480 cpusetsize field, remove next.
6481 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6482 parameter for size of the CPU set.
6483 (pthread_setaffinity_np): Likewise.
6484 (pthread_attr_getaffinity_np): Likewise.
6485 (pthread_attr_setaffinity_np): Likewise.
6486 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6487 interface change, keep compatibility code.
6488 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6489 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6490 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6491 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6492 __pthread_getaffinity_np.
6493 * Versions: Add version for changed interfaces.
6494 * tst-attr3.c: Adjust test for interface change.
6495 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6496 increasing buffer sizes.
6497 * pthread_attr_destroy.c: Remove unused list handling.
6498 * pthread_attr_init.c: Likewise.
6500 2004-03-17 Roland McGrath <roland@redhat.com>
6502 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6503 first argument to clock_getres so we ever enable kernel timers.
6505 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6507 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6509 2004-03-12 Richard Henderson <rth@redhat.com>
6511 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6512 oldvalue from CENABLE to CDISABLE.
6514 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6516 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6517 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6518 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6519 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6521 2004-03-11 Richard Henderson <rth@redhat.com>
6523 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6524 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6525 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6527 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6529 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6530 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6531 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6533 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6535 * forward.c (__pthread_cond_broadcast_2_0,
6536 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6537 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6538 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6540 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6542 * sysdeps/sh/tcb-offsets.sym: Add PID.
6543 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6544 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6546 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6548 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6549 include <sysdep-cancel.h>, vfork is no cancellation point.
6550 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6551 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6552 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6554 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6556 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6558 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6559 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6561 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6563 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6564 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6565 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6566 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6567 of DO_CALL_VIA_BREAK. Work around a gas problem.
6569 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6570 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6571 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6572 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6573 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6574 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6576 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6577 a local register for saving old PID. Negate PID in parent upon exit.
6579 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6581 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6582 before syscall, set to the old value in the parent afterwards.
6583 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6584 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6586 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6587 before syscall, set to the old value in the parent afterwards.
6588 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6589 * sysdeps/s390/tcb-offsets.sym: Add PID.
6591 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6592 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6593 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6594 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6595 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6596 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6598 2004-03-10 Andreas Schwab <schwab@suse.de>
6600 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6601 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6602 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6604 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6606 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6607 * tst-cancel21.c (do_one_test): Likewise.
6608 Reported by Gordon Jin <gordon.jin@intel.com>.
6610 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6612 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6613 if non-zero and set to INT_MIN if zero.
6614 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6615 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6616 (SAVE_PID, RESTORE_PID): Define.
6618 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6619 Use relative path to avoid including NPTL i386/vfork.S.
6620 (SAVE_PID, RESTORE_PID): Define.
6621 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6622 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6623 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6625 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6626 * tst-vfork1.c: New test.
6627 * tst-vfork2.c: New test.
6628 * tst-vfork1x.c: New test.
6629 * tst-vfork2x.c: New test.
6631 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6633 * sysdeps/i386/tcb-offsets.sym: Add PID.
6634 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6635 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6636 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6638 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6640 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6642 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6644 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6647 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6649 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6652 * tst-once4.c: Remove unnecessary macro definition.
6654 * tst-mutex7.c (do_test): Limit thread stack size.
6655 * tst-once2.c (do_test): Likewise.
6656 * tst-tls3.c (do_test): Likewise.
6657 * tst-tls1.c (do_test): Likewise.
6658 * tst-signal3.c (do_test): Likewise.
6659 * tst-kill6.c (do_test): Likewise.
6660 * tst-key4.c (do_test): Likewise.
6661 * tst-join4.c (do_test): Likewise.
6662 * tst-fork1.c (do_test): Likewise.
6663 * tst-context1.c (do_test): Likewise.
6664 * tst-cond2.c (do_test): Likewise.
6665 * tst-cond10.c (do_test): Likewise.
6666 * tst-clock2.c (do_test): Likewise.
6667 * tst-cancel10.c (do_test): Likewise.
6668 * tst-basic2.c (do_test): Likewise.
6669 * tst-barrier4.c (do_test): Likewise.
6671 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6673 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6675 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6677 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6678 (__pthread_cond_timedwait): Optimize wakeup test.
6679 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6680 (__pthread_cond_wait): Likewise.
6681 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6682 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6685 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6687 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6688 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6689 the atomic instruction needed.
6690 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6691 (__lll_mutex_lock_wait): Likewise.
6693 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6695 * Makefile (tests): Add tst-cond14 and tst-cond15.
6696 * tst-cond14.c: New file.
6697 * tst-cond15.c: New file.
6699 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6701 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6702 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6703 needs to be implemented differently to be useful.
6705 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6707 * pthread_attr_setschedparam.c: Don't test priority against limits
6708 here. Set ATTR_FLAG_SCHED_SET flag.
6709 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6710 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6711 from parent thread to child. If attribute is used and scheduling
6712 parameters are not inherited, copy parameters from attribute or
6713 compute them. Check priority value.
6714 * pthread_getschedparam.c: If the parameters aren't known yet get
6715 them from the kernel.
6716 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6717 ATTR_FLAG_POLICY_SET flag for thread.
6718 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6719 and ATTR_FLAG_POLICY_SET.
6721 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6723 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6724 fail if stack address hasn't been set. Just return 0.
6726 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6728 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6729 libpthread for the files in this list.
6730 (CFLAGS-tst-unload): Removed.
6731 * tst-unload.c (do_test): Don't use complete path for
6734 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6737 2004-02-22 Ulrich Drepper <drepper@redhat.com>
6739 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6740 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6741 operation per round is needed.
6742 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6743 (__lll_mutex_lock_wait): Likewise.
6745 2004-02-20 Ulrich Drepper <drepper@redhat.com>
6747 * tst-cancel9.c (cleanup): Don't print to stderr.
6749 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6751 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6753 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6755 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6756 (__syscall_error_handler2): Call CDISABLE.
6757 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6758 (__syscall_error_handler2): Call CDISABLE.
6760 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6761 Release lock before the loop, don't reacquire it.
6763 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6765 2004-02-19 Andreas Schwab <schwab@suse.de>
6767 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6770 2004-02-18 Ulrich Drepper <drepper@redhat.com>
6772 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6773 (pthread_barrier_wait): After wakeup, release lock only when the
6774 last thread stopped using the barrier object.
6775 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6776 (pthread_barrier_wait): Likewise.
6777 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6779 * Makefile (tests): Add tst-barrier4.
6780 * tst-barrier4.c: New file.
6782 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6783 (__pthread_cond_timedwait): Perform timeout test while holding
6784 internal lock to prevent wakeup race.
6785 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6786 * sysdeps/pthread/pthread_cond_timedwait.c
6787 (__pthread_cond_timedwait): Likewise.
6788 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6789 (__pthread_cond_timedwait): Likewise.
6791 2004-02-18 Jakub Jelinek <jakub@redhat.com>
6793 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6794 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6795 * Makefile (tests): Add tst-rwlock13.
6796 * tst-rwlock13.c: New test.
6798 2004-02-16 Ulrich Drepper <drepper@redhat.com>
6800 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6801 (__condvar_tw_cleanup): Little optimization.
6802 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6804 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6806 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6807 libpthread as "lib" parameter to SHLIB_COMPAT.
6808 (__novmx_siglongjmp): Fix typo in function name.
6809 (__novmx_longjmp): Fix typo in function name.
6811 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6813 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6816 * sysdeps/generic/pt-longjmp.c: Moved to...
6817 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
6819 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
6821 * Makefile (libpthread-routines): Add pt-cleanup.
6822 * pt-longjmp.c: Removed.
6823 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6824 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6825 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6826 Version longjmp, siglongjmp for GLIBC_2.3.4.
6827 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6829 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6831 * sysdeps/pthread/pthread_cond_timedwait.c
6832 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6833 Reuse code. Add __builtin_expects.
6835 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6836 (__pthread_cond_timedwait): Get internal lock in case timeout has
6837 passed before the futex syscall.
6838 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6840 2004-01-20 Ulrich Drepper <drepper@redhat.com>
6842 * allocatestack.c: Pretty printing.
6844 * sysdeps/pthread/createthread.c (create_thread): Don't add
6845 CLONE_DETACHED bit if it is not necessary.
6847 2004-01-16 Ulrich Drepper <drepper@redhat.com>
6849 * pthread_getattr_np.c: Include ldsodefs.h.
6851 2004-01-16 Richard Henderson <rth@redhat.com>
6853 * allocatestack.c: Don't declare __libc_stack_end.
6854 * init.c (__pthread_initialize_minimal_internal): Likewise.
6855 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6857 2004-01-15 Richard Henderson <rth@redhat.com>
6859 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6860 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6861 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6862 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6863 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6864 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6865 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6866 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6868 2004-01-14 Ulrich Drepper <drepper@redhat.com>
6870 * init.c (pthread_functions): Make array const.
6872 2004-01-13 Ulrich Drepper <drepper@redhat.com>
6874 * allocatestack.c (__make_stacks_executable): Change interface.
6875 Check parameters. Pass parameter on to libc counterpart.
6876 * pthreadP.h: Change declaration.
6878 2004-01-13 Richard Henderson <rth@redhat.com>
6880 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6882 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6885 * sysdeps/alpha/Makefile: New file.
6886 * sysdeps/alpha/tcb-offsets.sym: New file.
6887 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6888 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6890 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6893 2004-01-08 Jakub Jelinek <jakub@redhat.com>
6895 * Makefile (tests): Add tst-backtrace1.
6896 * tst-backtrace1.c: New test.
6898 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6900 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6901 register as second parameter to the REGISTER macro.
6902 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6903 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6904 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6905 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6906 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6907 of thread register as second parameter to REGISTER macro in 64 case.
6909 2004-01-03 Ulrich Drepper <drepper@redhat.com>
6911 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6912 (CFLAGS-getpid.o): Defined.
6913 (CFLAGS-getpid.os): Defined.
6915 2003-12-31 Ulrich Drepper <drepper@redhat.com>
6917 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6918 returned for main thread does not overlap with any other VMA.
6919 Patch by Jakub Jelinek.
6921 2003-12-29 Jakub Jelinek <jakub@redhat.com>
6923 * tst-raise1.c: Include stdio.h.
6925 2003-12-23 Jakub Jelinek <jakub@redhat.com>
6927 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6928 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6929 If pid is 0, set it to selftid.
6930 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6931 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6932 != 0, return self->tid without doing a syscall.
6933 * descr.h (struct pthread): Move pid field after tid.
6935 * Makefile (tests): Add tst-raise1.
6936 * tst-raise1.c: New file.
6938 2003-12-23 Roland McGrath <roland@redhat.com>
6940 * tst-oddstacklimit.c: New file.
6941 * Makefile (tests): Add it.
6942 (tst-oddstacklimit-ENV): New variable.
6944 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6945 value up to page size for __default_stacksize.
6947 2003-12-21 Ulrich Drepper <drepper@redhat.com>
6949 * Makefile (tests): Add tst-eintr5.
6950 * tst-eintr5.c: New file.
6952 * eintr.c (eintr_source): Prevent sending signal to self.
6954 * tst-eintr2.c (tf1): Improve error message.
6956 2003-12-20 Ulrich Drepper <drepper@redhat.com>
6958 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6959 * sysdeps/unix/sysv/linux/getpid.c: New file.
6960 * pthread_cancel.c: Add comment explaining use of PID field.
6961 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6962 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6963 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6964 temporarily to signal the field must not be relied on and updated
6966 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6967 temporarily negative.
6968 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6970 2003-12-19 Ulrich Drepper <drepper@redhat.com>
6972 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6973 (eintr_source): If ARG != NULL, use pthread_kill.
6974 * tst-eintr1.c: Adjust for this change.
6975 * tst-eintr2.c: Likewise.
6976 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6977 * tst-eintr3.c: New file.
6978 * tst-eintr4.c: New file.
6980 2003-12-19 Jakub Jelinek <jakub@redhat.com>
6982 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6983 if CANCELSTATE_BITMASK is set.
6984 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6987 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6988 (tests-reverse): Add tst-cancel23.
6989 * tst-cancel22.c: New test.
6990 * tst-cancel23.c: New test.
6992 2003-12-18 Ulrich Drepper <drepper@redhat.com>
6994 * tst-eintr1.c: Better error messages.
6996 * Makefile (tests): Add tst-eintr2.
6997 * tst-eintr2.c: New file.
6999 2003-12-18 Jakub Jelinek <jakub@redhat.com>
7001 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7002 (CFLAGS-tst-cancelx21.c): Set.
7003 * tst-cancel21.c: New test.
7004 * tst-cancelx21.c: New test.
7006 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
7008 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7009 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
7010 * pt-longjmp.c: Include jmpbuf-unwind.h.
7011 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7012 _JMPBUF_UNWINDS. Adjust compared pointers.
7013 * init.c (__pthread_initialize_minimal_internal): Initialize
7014 pd->stackblock_size.
7015 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7016 * sysdeps/alpha/jmpbuf-unwind.h: New file.
7017 * sysdeps/i386/jmpbuf-unwind.h: New file.
7018 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7019 * sysdeps/s390/jmpbuf-unwind.h: New file.
7020 * sysdeps/sh/jmpbuf-unwind.h: New file.
7021 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7022 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7023 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7024 (_JMPBUF_CFA_UNWINDS): Remove.
7025 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7027 2003-12-12 Jakub Jelinek <jakub@redhat.com>
7029 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7030 (CFLAGS-tst-cancelx20.c): Set.
7031 * tst-cancel20.c: New test.
7032 * tst-cancelx20.c: New test.
7034 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7036 * init.c (__pthread_initialize_minimal_internal): Don't treat
7037 architectures with separate register stack special here when
7038 computing default stack size.
7040 2003-12-17 Roland McGrath <roland@redhat.com>
7042 * Makefile (tst-cancelx7-ARGS): New variable.
7043 Reportd by Greg Schafer <gschafer@zip.com.au>.
7045 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7047 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7048 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7049 (tst-stack3-ENV): Set.
7050 ($(objpfx)tst-stack3-mem): New.
7051 * tst-stack3.c: New test.
7053 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7055 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7056 Add unwind directives. Drop unused .regstk directive.
7057 (_fini_EPILOG_BEGINS): Add unwind directives.
7059 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7061 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7062 Assume parameter is a pointer.
7063 (lll_futex_wake): Likewise.
7064 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7066 (lll_futex_wake): Likewise.
7067 Reported by Boris Hu.
7068 * sysdeps/unix/sysv/linux/unregister-atfork.c
7069 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7071 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7073 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7075 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7076 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7077 __rtld_lock_initialize for ld.so lock.
7078 Patch in part by Adam Li <adam.li@intel.com>.
7080 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7082 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7083 in $(gnulib). Also, remove stale comment.
7085 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7087 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7088 advantage of new syscall stub and optimize accordingly.
7090 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7091 from SYS_futex, to match expectations of
7092 sysdep.h:DO_INLINE_SYSCALL.
7093 (lll_futex_clobbers): Remove.
7094 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7095 (lll_futex_wake): Likewise.
7096 (lll_futex_requeue): Likewise.
7097 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7098 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7100 (__lll_mutex_lock): Likewise.
7101 (__lll_mutex_cond_lock): Likewise.
7102 (__lll_mutex_timed_lock): Likewise.
7103 (__lll_mutex_unlock): Likewise.
7104 (__lll_mutex_unlock_force): Likewise.
7106 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7107 comes before the include of <sysdep.h>.
7108 (THREAD_SELF_SYSINFO): New macro.
7109 (THREAD_SYSINFO): Likewise.
7110 (INIT_SYSINFO): New macro.
7111 (TLS_INIT_TP): Call INIT_SYSINFO.
7113 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7115 * sysdeps/pthread/createthread.c (create_thread): Use
7116 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7117 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7118 THREAD_SELF_SYSINFO instead of open code.
7119 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7120 (THREAD_SYSINFO): Likewise.
7122 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7124 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7126 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7128 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7129 instead of .init. Patch by David Mosberger.
7131 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7133 * sysdeps/pthread/configure.in: Remove broken declaration in C
7134 cleanup handling check.
7136 2003-11-30 Andreas Jaeger <aj@suse.de>
7138 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7139 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7142 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7144 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7145 * pthread_attr_destroy.c: Include shlib-compat.h.
7146 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7147 is set in iattr->flags.
7148 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7150 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7152 * Makefile (distribute): Add tst-cleanup4aux.c.
7154 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7157 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7159 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7160 pthread_cond_signal.
7162 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7163 store mutex address if the current value is ~0l.
7164 * sysdeps/pthread/pthread_cond_timedwait.c
7165 (__pthread_cond_timedwait): Likewise.
7166 * sysdeps/pthread/pthread_cond_broadcast.c
7167 (__pthread_cond_broadcast): Don't use requeue for pshared
7170 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7171 (__pthread_cond_wait): Don't store mutex address if the current
7173 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7174 (__pthread_cond_timedwait): Likewise.
7175 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7176 (__pthread_cond_broadcast): Don't use requeue for pshared
7179 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7180 element with ~0l for pshared condvars, with NULL otherwise.
7182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7183 (__pthread_cond_wait): Don't store mutex address if the current
7185 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7186 (__pthread_cond_timedwait): Likewise.
7187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7188 (__pthread_cond_broadcast): Don't use requeue for pshared
7191 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7192 * tst-cond12.c: New file.
7193 * tst-cond13.c: New file.
7195 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7197 * sysdeps/pthread/configure.in: Make missing forced unwind support
7200 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7202 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7204 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7206 * Makefile: Add magic to clean up correctly.
7208 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7210 * unwind.c (FRAME_LEFT): Define.
7211 (unwind_stop): Handle old style cleanups here.
7212 (__pthread_unwind): Handle old style cleanups only if
7213 !HAVE_FORCED_UNWIND.
7214 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7215 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7216 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7217 ($(objpfx)tst-cleanupx4): Likewise.
7218 * tst-cleanup4.c: New test.
7219 * tst-cleanup4aux.c: New.
7220 * tst-cleanupx4.c: New test.
7222 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7224 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7225 lll_mutex_*lock macros to skip atomic operations on some archs.
7227 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7229 * sysdeps/pthread/tst-timer.c (main): Initialize
7230 sigev2.sigev_value as well.
7232 2003-10-15 Roland McGrath <roland@redhat.com>
7234 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7236 * sysdeps/pthread/configure: Regenerated.
7238 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7240 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7241 locking macros. No distinction between normal and mutex locking
7243 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7244 Merge bits from lowlevelmutex.S we still need.
7245 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7246 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7247 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7248 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7249 new mutex implementation.
7250 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7251 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7252 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7253 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7254 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7255 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7256 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7257 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7258 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7259 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7260 symbol for entry point to avoid cancellation.
7262 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7264 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7266 (SAVE_OLDTYPE_0): Fix a typo.
7268 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7270 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7271 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7273 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7275 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7278 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7280 * Makefile (tests): Add tst-cancel19.
7281 * tst-cancel19.c: New test.
7283 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7285 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7286 restoring of the old cancellation type.
7288 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7290 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7292 2003-09-27 Wolfram Gloger <wg@malloc.de>
7294 * sysdeps/pthread/malloc-machine.h: New file
7296 2003-09-24 Roland McGrath <roland@redhat.com>
7298 * allocatestack.c (__make_stacks_executable): Don't ignore return
7299 value from _dl_make_stack_executable.
7301 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7303 * allocatestack.c (__make_stacks_executable): Also change
7304 permission of the currently unused stacks.
7306 * allocatestack.c (change_stack_perm): Split out from
7307 __make_stacks_executable.
7308 (allocate_stack): If the required permission changed between the time
7309 we started preparing the stack and queueing it, change the permission.
7310 (__make_stacks_executable): Call change_stack_perm.
7312 * Makefile: Build tst-execstack-mod locally.
7313 * tst-execstack-mod.c: New file.
7315 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7317 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7319 2003-09-23 Roland McGrath <roland@redhat.com>
7321 * tst-execstack.c: New file.
7322 * Makefile (tests): Add it.
7323 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7324 (LDFLAGS-tst-execstack): New variable.
7326 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7327 whether to use PROT_EXEC for stack mmap.
7328 (__make_stacks_executable): New function.
7329 * pthreadP.h: Declare it.
7330 * init.c (__pthread_initialize_minimal_internal): Set
7331 GL(dl_make_stack_executable_hook) to that.
7333 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7335 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7336 recommendation from AMD re avoidance of lock prefix.
7338 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7340 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7341 lll_futex_timed_wait instead of lll_futex_wait.
7342 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7343 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7344 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7345 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7346 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7347 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7348 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7349 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7350 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7351 Completely revamp the locking macros. No distinction between
7352 normal and mutex locking anymore.
7353 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7354 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7355 __lll_lock_timedwait): Fix prototypes.
7356 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7357 __lll_lock_timedwait): Likewise.
7358 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7359 macros, add __builtin_expect.
7360 (lll_mutex_timedlock): Likewise. Fix return value.
7361 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7362 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7363 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7364 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7365 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7366 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7367 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7368 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7370 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7372 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7373 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7374 operation if possible.
7376 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7377 like jumping over the lock prefix.
7379 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7381 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7382 locking macros. No distinction between normal and mutex locking
7384 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7385 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7386 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7387 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7388 locking. Merge bits from lowlevelmutex.S we still need.
7389 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7390 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7391 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7392 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7393 * Makefile (routines): Remove libc-lowlevelmutex.
7394 (libpthread-rountines): Remove lowlevelmutex.
7395 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7396 for new mutex implementation.
7397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7398 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7399 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7400 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7401 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7403 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7405 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7406 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7407 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7408 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7409 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7410 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7411 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7412 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7414 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7416 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7417 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7418 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7420 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7421 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7423 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7425 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7426 in parameters of asm with output parameters.
7428 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7429 type of DECR parameter to int.
7430 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7432 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7434 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7435 guardsize for each thread.
7437 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7439 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7440 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7441 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7443 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7444 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7446 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7447 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7448 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7449 (pthread_getaffinity_np): Add hidden_def.
7451 * Makefile (tests): Add tst-attr3.
7452 * tst-attr3.c: New test.
7454 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7456 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7458 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7459 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7461 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7463 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7464 * tst-align.c: Include tst-stack-align.h.
7465 (tf, do_test): Use TEST_STACK_ALIGN macro.
7467 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7469 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7472 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7474 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7475 stack-related values for the initial thread.
7477 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7479 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7481 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7483 * pthread_mutex_lock.c: Minor code rearrangements.
7485 2003-09-05 Roland McGrath <roland@redhat.com>
7487 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7488 Instead, include ../nptl_db/db_info.c to do its magic.
7489 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7490 (__pthread_pthread_key_2ndlevel_size): Likewise.
7491 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7492 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7493 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7494 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7495 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7496 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7497 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7498 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7499 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7500 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7501 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7502 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7503 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7504 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7505 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7506 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7507 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7509 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7511 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7512 of pthread_t to be compatible with LT.
7513 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7514 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7515 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7516 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7517 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7518 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7519 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7521 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7523 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7525 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7527 * unwind-forcedunwind.c: Move to...
7528 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7529 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7530 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7531 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7532 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7533 * unwind.c: Include jmpbuf-unwind.h.
7534 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7536 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7538 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7539 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7540 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7541 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7542 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7543 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7544 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7545 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7546 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7547 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7548 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7550 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7551 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7552 * Makefile (tests): Add tst-stack2.
7553 * tst-stack2.c: New test.
7554 * tst-stack1.c: Include limits.h and sys/param.h.
7555 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7557 * pthread_condattr_setpshared.c: Include errno.h.
7558 (pthread_condattr_setpshared): Return EINVAL if pshared
7559 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7561 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7562 defined symbol for entry point to avoid cancellation.
7563 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7565 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7567 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7569 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7571 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7573 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7574 __close_nocancel, __read_nocancel, __write_nocancel,
7575 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7576 libpthread.so or librt.so, define to corresponding function
7577 without _nocancel suffix.
7578 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7579 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7580 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7582 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7584 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7586 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7587 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7589 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7590 in subsections has a symbol associated with it.
7592 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7593 defined symbol for entry point to avoid cancellation.
7594 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7596 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7598 * Makefile (tests): Add tst-tls5.
7599 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7600 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7601 ($(objpfx)tst-tls5): New.
7602 ($(objpfx)tst-tls6.out): Likewise.
7603 (tests): Depend on $(objpfx)tst-tls6.out.
7604 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7605 (do_test): Check pthread_self () return value alignment.
7606 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7607 (tf): Check pthread_self () return value alignment.
7608 * tst-tls5.c: New test.
7610 * tst-tls5mod.c: New.
7611 * tst-tls5moda.c: New.
7612 * tst-tls5modb.c: New.
7613 * tst-tls5modc.c: New.
7614 * tst-tls5modd.c: New.
7615 * tst-tls5mode.c: New.
7616 * tst-tls5modf.c: New.
7617 * tst-tls6.sh: New test.
7619 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7620 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7621 * init.c (pthread_functions): Initialize them.
7622 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7623 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7624 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7625 pthread_cond_timedwait@@GLIBC_2.3.2.
7627 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7629 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7630 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7631 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7632 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7633 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7634 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7636 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7638 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7639 _POSIX_THREAD_PRIORITY_SCHEDULING.
7640 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7642 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7644 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7645 nested function, use static inline function from libio.h.
7646 Code by Richard Henderson.
7648 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7651 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7653 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7654 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7655 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7656 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7657 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7658 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7659 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7660 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7661 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7662 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7663 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7664 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7665 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7666 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7667 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7668 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7669 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7670 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7671 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7672 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7673 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7674 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7675 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7676 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7677 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7678 * sysdeps/sparc/tls.h: New file.
7679 * sysdeps/sparc/tcb-offsets.sym: New file.
7680 * sysdeps/sparc/Makefile: New file.
7681 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7682 * init.c [__sparc__] (__NR_set_tid_address): Define.
7684 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7686 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7687 _IO_release_lock): Define.
7689 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7691 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7692 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7694 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7696 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7697 (__pthread_cleanup_class): Add missing return types of member
7700 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7702 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7703 (lll_mutex_unlock_force): Add memory barrier between store and futex
7706 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7708 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7709 tempmsg in first loop.
7711 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7713 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7714 _POSIX_THREAD_PRIORITY_SCHEDULING.
7715 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7717 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7719 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7720 (__rtld_lock_default_lock_recursive,
7721 __rtld_lock_default_unlock_recursive): Define.
7722 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7723 __rtld_lock_unlock_recursive): Define using
7724 GL(_dl_rtld_*lock_recursive).
7725 * init.c (__pthread_initialize_minimal_internal): Initialize
7726 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7727 Lock GL(_dl_load_lock) the same number of times as
7728 GL(_dl_load_lock) using non-mt implementation was nested.
7730 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7731 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7733 2003-08-06 Jakub Jelinek <jakub@redhat.com>
7735 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7738 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7740 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7742 2003-08-03 Jakub Jelinek <jakub@redhat.com>
7744 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7745 to first syscall error check. Move syscall error check for tkill
7746 into __ASSUME_CLONE_STOPPED #ifdef.
7748 2003-08-02 Ulrich Drepper <drepper@redhat.com>
7750 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7751 is not defined, do explicit synchronization.
7752 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7753 is not defined also unlock pd->lock for non-debugging case in case
7755 * pthread_create.c (start_thread): Always get and release pd->lock
7756 if __ASSUME_CLONE_STOPPED is not defined.
7757 (start_thread_debug): Removed. Adjust users.
7758 * allocatestack.c (allocate_stack): Always initialize lock if
7759 __ASSUME_CLONE_STOPPED is not defined.
7760 * Makefile (tests): Add tst-sched1.
7761 * tst-sched1.c: New file.
7763 * sysdeps/pthread/createthread.c (do_clone): Only use
7764 sched_setschduler and pass correct parameters.
7766 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7768 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7769 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7770 PTHREAD_STACK_MIN in comments.
7772 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7774 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7775 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7777 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7778 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7779 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7780 (__pthread_cleanup_upto): Fix prototype.
7781 (_longjmp_unwind): Adjust caller.
7782 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7783 Change second argument to const struct pointer.
7784 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7785 * tst-sem9.c (main): Likewise.
7786 * unwind.c: Include string.h for strlen prototype.
7788 2003-07-31 Ulrich Drepper <drepper@redhat.com>
7790 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7791 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7792 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7794 Patch by Nicholas Miell <nmiell@attbi.com>.
7796 2003-07-30 Jakub Jelinek <jakub@redhat.com>
7798 * init.c (__pthread_initialize_minimal_internal): Initialize
7799 GL(dl_init_static_tls).
7800 * pthreadP.h (__pthread_init_static_tls): New prototype.
7801 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7803 * Makefile (tests): Add tst-tls4.
7804 (modules-names): Add tst-tls4moda and tst-tls4modb.
7805 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7806 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7808 * tst-tls4.c: New file.
7809 * tst-tls4moda.c: New file.
7810 * tst-tls4modb.c: New file.
7812 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
7814 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7815 before __timer_dealloc.
7816 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7817 Don't call list_unlink.
7819 2003-07-29 Roland McGrath <roland@redhat.com>
7821 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7823 2003-07-25 Jakub Jelinek <jakub@redhat.com>
7825 * tst-cancel17.c (do_test): Check if aio_cancel failed.
7826 Don't reuse struct aiocb A if it failed.
7827 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7828 not just one byte, as that does not block.
7830 2003-07-22 Jakub Jelinek <jakub@redhat.com>
7832 * sysdeps/pthread/unwind-resume.c: New file.
7833 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7834 unwind-resume in csu subdir.
7835 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7837 (librt-sysdep_routines, librt-shared-only-routines): Add
7839 * sysdeps/pthread/rt-unwind-resume.c: New file.
7840 * unwind-forcedunwind.c: New file.
7841 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7842 (libpthread-shared-only-routines): Likewise.
7843 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7844 * pthreadP.h (pthread_cancel_init): New prototype.
7845 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7847 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7848 attr argument const struct pthread_attr *.
7850 * res.c (__res_state): Return __resp.
7851 * descr.h: Include resolv.h.
7852 (struct pthread): Add res field.
7853 * pthread_create.c: Include resolv.h.
7854 (start_thread): Initialize __resp.
7855 * Makefile (tests): Add tst-_res1.
7856 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7857 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7858 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7860 * tst-_res1.c: New file.
7861 * tst-_res1mod1.c: New file.
7862 * tst-_res1mod2.c: New file.
7864 2003-07-21 Ulrich Drepper <drepper@redhat.com>
7866 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7868 * Makefile: Define various *-no-z-defs variables for test DSOs
7869 which has undefined symbols.
7871 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7873 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7874 Retry if the stwcx fails to store once_control.
7876 2003-07-20 Ulrich Drepper <drepper@redhat.com>
7878 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7879 pthread_attr_setaffinity.
7880 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7881 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7882 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7883 * pthread_attr_destroy.c: Free cpuset element if allocated.
7884 * pthread_create.c: Pass iattr as additional parameter to
7886 * sysdeps/pthread/createthread.c: If attribute is provided and
7887 a new thread is created with affinity set or scheduling parameters,
7888 start thread with CLONE_STOPPED.
7889 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7890 pthread_attr_setaffinity.
7891 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7894 2003-07-15 Ulrich Drepper <drepper@redhat.com>
7896 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7898 2003-07-14 Ulrich Drepper <drepper@redhat.com>
7900 * sysdeps/pthread/configure.in: Require CFI directives also for
7903 2003-07-15 Jakub Jelinek <jakub@redhat.com>
7905 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7908 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7910 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7912 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7913 registers as variables. Call __pthread_mutex_unlock_usercnt.
7914 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7915 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7916 not self pointer in __writer. Compare with TID to determine
7918 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7919 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7921 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7923 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7924 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7925 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7926 macros also when compiling librt.
7928 2003-07-11 Jakub Jelinek <jakub@redhat.com>
7930 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7931 -fasynchronous-unwind-tables.
7932 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7933 (PSEUDO): Add cfi directives.
7934 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7936 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7939 2003-07-08 Jakub Jelinek <jakub@redhat.com>
7941 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7942 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7943 * unwind.c (__pthread_unwind_next): Add hidden_def.
7944 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7946 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7947 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7948 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7950 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7951 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7953 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7954 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7955 __pthread_unregister_cancel and __pthread_unwind_next.
7957 2003-07-04 Jakub Jelinek <jakub@redhat.com>
7959 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7960 different symbol for the cancellation syscall wrapper and
7961 non-cancellation syscall wrapper.
7962 (PSEUDO_END): Define.
7964 2003-07-05 Richard Henderson <rth@redhat.com>
7966 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7967 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7968 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7969 return actual return value from the syscall, not 0.
7971 2003-07-07 Ulrich Drepper <drepper@redhat.com>
7973 * descr.h (struct pthread): Add pid field.
7974 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7975 (__reclaim_stacks): Likewise.
7976 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7977 also check for PID of the signal source.
7978 (__pthread_initialize_minimal_internal): Also initialize pid field
7979 of initial thread's descriptor.
7980 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7981 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7982 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7983 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7984 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7986 2003-07-05 Ulrich Drepper <drepper@redhat.com>
7988 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7989 Fix use of parameter.
7990 (__libc_cleanup_pop): Likewise.
7992 2003-07-04 Ulrich Drepper <drepper@redhat.com>
7994 * init.c (sigcancel_handler): Change parameters to match handler
7995 for SA_SIGACTION. Check signal number and code to recognize
7996 invalid invocations.
7998 2003-07-03 Roland McGrath <roland@redhat.com>
8000 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8001 Apply sizeof (struct pthread) bias to r13 value.
8003 2003-07-03 Ulrich Drepper <drepper@redhat.com>
8005 * sysdeps/pthread/configure.in: Require CFI directives.
8007 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8009 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8010 libpthread compilation.
8011 * unwind.c (__pthread_unwind): Add hidden_def.
8012 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8014 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8016 * libc-cancellation.c (__libc_cleanup_routine): Define.
8017 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8018 (__pthread_cleanup_pop): Define.
8020 2003-07-01 Richard Henderson <rth@redhat.com>
8022 * sysdeps/alpha/elf/pt-initfini.c: New file.
8023 * sysdeps/alpha/pthread_spin_lock.S: New file.
8024 * sysdeps/alpha/pthread_spin_trylock.S: New file.
8025 * sysdeps/alpha/pthreaddef.h: New file.
8026 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8027 * sysdeps/alpha/tls.h: New file.
8028 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8029 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8030 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8031 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8032 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8033 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8034 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8035 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8036 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8037 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8039 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8041 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8042 cleanup support and unwind info.
8044 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8046 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8047 Use correct cleanup handler registration. Add unwind info.
8048 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8049 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8050 * tst-once3.c: Add cleanup handler and check it is called.
8051 * tst-once4.c: Likewise.
8052 * tst-oncex3.c: New file.
8053 * tst-oncex4.c: New file.
8054 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8056 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8058 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8060 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8062 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8063 (tf_msgsnd): Likewise.
8065 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8066 premature returns a bit more.
8068 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8070 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8071 definition to the front.
8073 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8074 the cleanup functions to make the names unique. Fix dwarf opcode
8076 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8077 functions to make the names unique. Fix CFA offset for two blocks.
8079 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8081 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8082 missing closing braces.
8083 Patch by Christophe Saout <christophe@saout.de>.
8085 2003-06-24 Roland McGrath <roland@redhat.com>
8087 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8089 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8091 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8092 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8094 * pthreadP.h: Declare __find_thread_by_id.
8095 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8096 * pthread_clock_gettime.c: Allow using other thread's clock.
8097 * pthread_clock_settime.c: Likewise.
8098 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8099 * Makefile: Add rules to build and run tst-clock2.
8100 * tst-clock2.c: New file.
8102 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8104 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8105 to use exception-based cleanup handler.
8106 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8108 * tst-cond8.c (ch): Announce that we are done.
8110 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8112 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8113 Also test aio_suspend with timeout value.
8115 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8117 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8118 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8121 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8122 (__pthread_mutex_lock_internal): Likewise.
8123 (__pthread_mutex_unlock_internal): Likewise.
8124 (__pthread_mutex_unlock_usercnt): Declare.
8125 * pthread_mutex_destroy.c: Always fail if used in any way.
8126 * pthread_mutex_init.c: Update comment.
8127 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8128 * pthread_mutex_timedlock.c: Adjust __nusers.
8129 * pthread_mutex_trylock.c: Adjust __nusers.
8130 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8131 and public interfaces are wrapper with pass additional parameter.
8132 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8134 * tst-mutex8.c: New file.
8135 * Makefile (tests): Add tst-mutex8.
8136 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8137 __pthread_mutex_unlock_usercnt.
8138 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8139 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8140 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8142 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8143 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8144 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8146 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8147 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8148 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8149 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8150 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8152 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8153 * pthread_mutex_timedlock.c: Likewise.
8154 * pthread_mutex_trylock.c: Adjust __nusers.
8155 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8156 * tst-mutex9.c: New file.
8157 * Makefile (tests): Add tst-mutex9.
8158 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8159 * sysdeps/ia64/tls.h: Likewise.
8160 * sysdeps/powerpc/tls.h: Likewise.
8161 * sysdeps/s390/tls.h: Likewise.
8162 * sysdeps/sh/tls.h: Likewise.
8163 * sysdeps/x86_64/tls.h: Likewise.
8164 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8165 Change type of __owner.
8166 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8167 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8168 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8169 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8170 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8172 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8174 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8175 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8177 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8178 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8179 instead of nr to lll_futex_wake. Only set errno and return -1
8182 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8183 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8184 return actual return value from the syscall, not 0.
8186 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8188 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8189 find a random value.
8190 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8193 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8194 compat_timer_settime.
8195 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8196 compat_timer_gettime.
8197 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8198 compat_timer_getoverrun.
8199 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8200 compat_timer_delete.
8202 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8203 error-checking mutex detect busy mutexes.
8205 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8207 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8208 Add ax to clobber list.
8209 (lll_mutex_cond_lock): Likewise.
8210 (lll_mutex_unlock): Likewise.
8211 (lll_lock): Likewise.
8212 (lll_unlock): Likewise.
8214 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8215 * tst-cancel18.c: New file.
8216 * tst-cancelx18.c: New file.
8218 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8221 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8222 * tst-cancel17.c: New file.
8223 * tst-cancelx17.c: New file.
8225 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8226 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8227 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8229 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8231 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8233 * sysdeps/pthread/createthread.c (create_thread): Set
8234 header.multiple_threads unconditionally.
8235 * allocatestack.c (allocate_stack): Likewise.
8236 * descr.h (struct pthread): Add header.multiple_threads
8238 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8239 Define for librt. #error if neither libpthread, libc nor librt.
8240 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8242 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8243 CDISABLE): Likewise.
8244 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8245 CDISABLE): Likewise.
8246 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8247 CDISABLE): Likewise.
8248 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8249 CDISABLE): Likewise. Access header.multiple_threads outside of
8250 libc and libpthread.
8251 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8253 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8254 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8256 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8258 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8259 Also test early cancellation before the thread reaches the cancellation
8262 * Makefile: Compile forward.c with exceptions.
8264 * sysdeps/unix/sysv/linux/sleep.c: New file.
8266 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8268 * Makefile: Add CFLAGS definition to compile function wrappers
8269 duplicated from libc with exceptions.
8270 * tst-cancel4.c: Also check cancellation handlers.
8272 * Makefile: Add rules to build and run tst-cancel16 and
8273 tst-cancelx16. Add missing CFLAGS definitions.
8274 * tst-cancel16.c: New file.
8275 * tst-cancelx16.c: New file.
8277 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8279 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8280 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8281 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8282 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8284 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8285 (LIBC_CANCEL_RESET): Likewise.
8286 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8287 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8289 (CFLAGS-libcrt-cancellation.c): Define.
8290 * sysdeps/pthread/librt-cancellation.c: New file.
8291 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8292 macros also when compiling librt.
8293 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8294 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8295 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8296 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8297 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8298 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8299 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8301 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8302 compat_timer_create.
8304 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8306 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8308 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8310 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8311 Add libc_hidden_def.
8313 2003-06-13 Roland McGrath <roland@redhat.com>
8315 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8316 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8318 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8320 * allocatestack.c (queue_stack): Always inline.
8321 * ptreadhP.h (__do_cancel): Likewise.
8323 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8325 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8328 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8330 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8331 (__pthread_cond_signal): Remove incorrect second addition for
8334 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8336 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8337 (__pthread_cond_signal): Use correct futex pointer in
8338 __lll_mutex_lock_wait call.
8340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8341 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8343 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8345 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8347 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8350 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8351 hand-written CFI generation code. Since ENTRY/END also initiated
8352 CFI frames this caused two CFI sets to be generated.
8354 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8356 * cleanup_routine.c: New file.
8357 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8358 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8360 * Makefile (libpthread-routines): Add cleanup_routine.
8361 Add more CFLAGS variables to compile with exceptions. Add comments
8362 why which file needs unwind tables.
8363 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8365 * tst-cancelx1.c: New file.
8366 * tst-cancelx2.c: New file.
8367 * tst-cancelx3.c: New file.
8368 * tst-cancelx4.c: New file.
8369 * tst-cancelx5.c: New file.
8370 * tst-cancelx6.c: New file.
8371 * tst-cancelx7.c: New file.
8372 * tst-cancelx8.c: New file.
8373 * tst-cancelx9.c: New file.
8374 * tst-cancelx10.c: New file.
8375 * tst-cancelx11.c: New file.
8376 * tst-cancelx12.c: New file.
8377 * tst-cancelx13.c: New file.
8378 * tst-cancelx14.c: New file.
8379 * tst-cancelx15.c: New file.
8380 * tst-cleanupx0.c: New file.
8381 * tst-cleanupx0.expect: New file.
8382 * tst-cleanupx1.c: New file.
8383 * tst-cleanupx2.c: New file.
8384 * tst-cleanupx3.c: New file.
8386 * tst-cleanup0.c: Make standard compliant.
8387 * tst-cleanup1.c: Likewise.
8389 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8390 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8391 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8392 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8393 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8394 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8395 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8397 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8398 * tst-cancel12.c: New file.
8399 * tst-cancel13.c: New file.
8400 * tst-cancel14.c: New file.
8401 * tst-cancel15.c: New file.
8402 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8405 * tst-cancel1.c: Add some comments.
8407 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8410 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8412 * Makefile (CFLAGS-pthread_cancel.c): Define.
8414 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8416 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8417 Change type of __writer element to int.
8418 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8419 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8420 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8421 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8422 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8423 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8424 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8425 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8426 Compare with TID to determine deadlocks.
8427 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8428 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8429 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8430 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8431 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8432 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8434 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8436 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8437 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8438 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8440 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8442 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8443 * Makefile (tests): Add tst-rwlock12.
8444 * tst-rwlock12.c: New file.
8446 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8448 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8449 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8450 Remove bogus hidden_proto.
8451 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8453 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8454 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8455 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8456 ___lll_mutex_timedlock): Likewise.
8458 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8461 (__pthread_cond_signal): Add some code to eventually handle
8464 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8466 * Makefile (tests): Add tst-exec4.
8467 (tst-exec4-ARGS): Define.
8468 * tst-exec4.c: New file.
8470 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8472 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8473 Also fail if tv_nsec < 0.
8474 (__lll_timedwait_tid): Likewise.
8475 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8476 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8478 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8480 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8482 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8484 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8486 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8489 * Makefile (tests): Add tst-sem8 and tst-sem9.
8490 * tst-sem8.c: New file.
8491 * tst-sem9.c: New file.
8492 * sem_open.c: Fix creation of in_use record if the file exists but
8495 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8498 * sysdeps/pthread/timer_create.c (timer_create): In case
8499 evp==NULL, assign timer ID to sival_ptr.
8501 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8502 struct pthread_unwind_buf *.
8503 (struct pthread): Likewise for cleanup_jmp_buf element.
8505 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8506 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8507 * unwind.c (__pthread_unwind_next): Likewise.
8509 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8511 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8512 (lll_futex_timed_wait): Use int for futex value parameter.
8513 (lll_futex_wake): Likewise.
8514 (lll_futex_requeue): Likewise.
8516 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8517 Replace one memory operation with one register operation.
8519 * tst-join4.c (do_test): Fix error message.
8521 * tst-rwlock6.c (do_test): Use correct format specifier.
8523 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8524 (__lll_mutex_lock_wait): Replace one memory operation with one
8526 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8527 (__lll_mutex_lock_wait): Likewise.
8529 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8530 (__lll_mutex_cond_lock): Add one to value parameter of
8531 __lll_lock_wait to reflect reality in the futex syscall.
8532 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8533 (lll_mutex_cond_lock): Likewise.
8535 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8537 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8539 (lll_mutex_cond_lock): Define.
8541 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8543 * Makefile (tests): Add tst-signal6.
8544 * tst-signal6.c: New file.
8546 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8547 (__lll_mutex_unlock_force): New function
8548 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8550 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8551 (__lll_mutex_unlock_force): New function.
8552 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8554 * tst-rwlock7.c (do_test): Use correct format specifier.
8556 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8557 Find break parameter in correct asm argument.
8559 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8561 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8563 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8565 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8567 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8568 lll_futex_requeue, lll_mutex_unlock_force): Define.
8570 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8572 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8573 (pthread_cond_t): Add __mutex.
8574 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8575 lll_futex_requeue, lll_mutex_unlock_force): Define.
8577 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8579 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8580 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8582 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8584 (lll_futex_wait, lll_futex_wake): Define.
8585 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8586 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8587 FUTEX_REQUEUE instead of FUTEX_WAIT.
8588 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8589 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8590 mutex which was used in condvar structure. Call
8591 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8592 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8594 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8595 include tcb-offsets.h. Read wakeup value in locked region.
8596 Use the value of gbr register as THREAD_ID.
8597 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8598 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8599 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8601 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8604 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8606 * sysdeps/pthread/pthread_cond_broadcast.c
8607 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8609 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8611 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8612 typo in register name.
8613 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8614 correctly. Actually use requeue. Little optimization.
8615 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8616 mutex address early. Handle cancellation state as 32-bit value.
8617 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8618 Remove unnecessary label.
8620 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8622 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8623 instead of FUTEX_WAIT.
8624 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8625 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8626 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8627 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8628 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8629 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8630 used in condvar structure. Call __pthread_mutex_cond_lock instead
8631 of __pthread_mutex_lock_internal.
8632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8633 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8634 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8635 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8636 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8637 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8638 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8639 Add pthread_mutex_cond_lock.
8640 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8641 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8642 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8643 lll_mutex_cond_lock.
8644 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8645 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8646 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8648 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8649 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8651 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8652 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8654 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8655 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8656 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8657 macro don't define aliases.
8659 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8660 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8661 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8662 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8663 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8665 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8666 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8667 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8669 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8671 * sem_open.c: Fix one endless loop. Implement correct semantics
8672 wrt opening the same semaphore more then once.
8673 * sem_close.c: Adjust for sem_open change.
8674 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8675 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8676 * Makefile (tests): Add tst-sem7.
8677 * tst-sem7.c: New file.
8679 2003-05-16 Roland McGrath <roland@redhat.com>
8681 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8682 uninitialized variable braino.
8684 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8686 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8687 test for syscall availability.
8689 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8690 __no_posix_timers to -1 if the syscalls don't exist.
8692 * pthread_join.c (pthread_join): Set tid field of the joined
8693 thread to -1. This isn't necessary but helps to recognize some
8694 error conditions with almost no cost.
8696 * allocatestack.c (FREE_P): Also negative values indicate an
8699 * unwind.c: Include <unistd.h>.
8701 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8703 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8705 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8707 * Makefile (crti-objs, crtn-objs): New variables.
8708 (omit-deps, extra-objs): Add crtn.
8709 ($(objpfx)libpthread.so): Depend on both crti and crtn
8710 and links to them in multidir.
8711 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8713 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8715 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8716 (lll_mutex_unlock): Use atomic_exchange_rel.
8718 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8720 * cond-perf.c (cons): Add missing locking around setting of alldone.
8722 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8724 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8726 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8728 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8730 * tst-sem6.c: New file.
8731 * Makefile (tests): Add tst-sem6.
8733 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8734 Use atomic_exchange_rel instead of atomic_exchange.
8735 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8738 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8739 code for lll_futex_wait and lll_futex_wake in static apps. Use
8740 vsyscall is possible.
8742 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8743 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8744 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8745 pthread_setaffinity_np.
8746 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8747 and pthread_setaffinity_np.
8748 * Makefile (libpthread-routines): Add pthread_getaffinity and
8749 pthread_setaffinity.
8751 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8752 use it in case mmap to allocate the stack fails.
8753 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8754 ARCH_MAP_FLAGS here.
8755 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8758 2003-05-08 Ulrich Drepper <drepper@redhat.com>
8760 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8761 handler implementation. It is now lockless in fork().
8762 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8763 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8764 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8765 declare the __fork_*_lists.
8766 (struct fork_handler): Include pointers to all three functions.
8767 Add next, refcntr and need_signal elements.
8768 (__fork_handlers): New declaration.
8769 (__register_atfork_malloc): Remove declaration.
8770 (HAVE_register_atfork_malloc): Remove definition.
8771 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8772 __pthread_child_handler variable.
8773 (__libc_pthread_init): Use __register_atfork instead of explicitly
8775 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8777 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8779 * unwind.c (unwind_cleanup): Print error message and then abort. This
8780 function must never be reached.
8782 * cond-perf.c: New file.
8784 2003-05-05 Ulrich Drepper <drepper@redhat.com>
8786 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8788 2003-05-04 Roland McGrath <roland@redhat.com>
8790 * Makefile ($(objpfx)../libc.so): New target.
8792 2003-05-02 Ulrich Drepper <drepper@redhat.com>
8794 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8795 (pthread_condattr_t): Size is only an int, don't use long for
8797 (pthread_mutexattr_t): Likewise.
8798 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8799 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8800 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8802 2003-05-01 Ulrich Drepper <drepper@redhat.com>
8804 * sysdeps/i386/tls.h: Define THREAD_ID.
8805 * sysdeps/ia64/tls.h: Likewise.
8806 * sysdeps/powerpc/tls.h: Likewise.
8807 * sysdeps/s390/tls.h: Likewise.
8808 * sysdeps/sh/tls.h: Likewise.
8809 * sysdeps/x86_64/tls.h: Likewise.
8810 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8812 * pthread_mutex_timedlock.c: Likewise.
8813 * pthread_mutex_trylock.c: Likewise.
8814 * pthread_mutex_unlock.c: Likewise.
8815 * pthread_rwlock_trywrlock.c: Likewise.
8816 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8817 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8818 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8819 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8821 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8824 2003-04-29 Jakub Jelinek <jakub@redhat.com>
8826 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8827 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8828 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8829 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8830 Make __align long long instead of long.
8831 (pthread_rwlock_t): Formatting.
8832 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8833 (pthread_rwlock_t): Formatting.
8834 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8835 (pthread_cond_t): Make __align long long instead of long.
8836 (pthread_rwlock_t): Move __flags field to the same position as in
8839 2003-04-30 Ulrich Drepper <drepper@redhat.com>
8841 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8842 * tst-rwlock7.c (do_test): Likewise.
8844 2003-04-26 Roland McGrath <roland@redhat.com>
8846 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8848 2003-04-22 Jakub Jelinek <jakub@redhat.com>
8850 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8851 sizeof (struct pthread).
8852 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8854 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8856 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8858 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8860 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8862 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8864 (NO_TLS_OFFSET): Define.
8865 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8866 add TLS_TCB_SIZE unnecessarily.
8868 2003-04-22 Roland McGrath <roland@redhat.com>
8870 * Makeconfig (shared-thread-library): Reverse link order to work
8873 2003-04-22 Ulrich Drepper <drepper@redhat.com>
8875 * semaphore.h: Fix typo in comment.
8877 2003-04-21 Ulrich Drepper <drepper@redhat.com>
8879 * sysdeps/pthread/sigfillset.c: New file.
8881 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8882 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8883 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8884 * sysdeps/pthread/sigaction.c: Likewise.
8885 * sysdeps/pthread/sigprocmask.c: New file.
8886 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8888 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8889 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8892 2003-04-19 Ulrich Drepper <drepper@redhat.com>
8894 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8895 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8897 * sysdeps/unix/sysv/linux/unregister-atfork.c
8898 (__unregister_atfork): Don't free memory not allocated dynamically.
8900 * semaphore.h: Remove __THROW marker from cancellation points.
8901 * nptl/sysdeps/pthread/pthread.h: Likewise.
8903 2003-04-18 Ulrich Drepper <drepper@redhat.com>
8905 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8906 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8909 2003-04-16 Jakub Jelinek <jakub@redhat.com>
8911 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8913 2003-04-15 Roland McGrath <roland@redhat.com>
8915 * forward.c (__pthread_unwind): Tweak to avoid warning.
8917 2003-04-15 Ulrich Drepper <drepper@redhat.com>
8919 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8921 2003-04-14 Ulrich Drepper <drepper@redhat.com>
8923 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8924 overflow CFA advance instructions.
8925 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8927 2003-04-14 Jakub Jelinek <jakub@redhat.com>
8929 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8930 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8931 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8934 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8935 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8936 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8937 DW_CFA_advance_loc for .Laddl-.Lsubl.
8939 2003-04-13 Ulrich Drepper <drepper@redhat.com>
8941 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8942 position-independent unwind data for static libraries.
8943 Add missing unwind info. Add comments.
8945 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8946 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8947 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8948 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8950 2003-04-12 Ulrich Drepper <drepper@redhat.com>
8952 * Makefile: Make sure all cancellation points are compiled with
8953 exception and asynchronous unwind tables.
8955 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8956 which mishandles loading of global object addresses in PIC.
8957 (THREAD_SETMEM_NC): Likewise.
8959 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8961 * pthread.h: Define new data structure for cleanup buffer. Declare
8962 new cleanup handler interfaces.
8963 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8964 (struct pthread): Add cleanup_jmp_buf pointer. Define
8965 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8966 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8967 it. Declare old cleanup handler installation functions.
8968 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8970 * cleanup_defer.c: Likewise.
8971 * cleanup_compat.c: New file. Old cleanup code.
8972 * cleanup_def_compat.c: New file. Old cleanup code.
8973 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8974 if own thread descriptor.
8975 * unwind.c: New file.
8976 * forward.c: Add __pthread_unwind.
8977 * init.c (pthread_functions): Add __pthread_unwind.
8978 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8979 Add ptr___pthread_unwind.
8980 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8981 and unwind function.
8982 * Makefile (libpthread-routines): Add cleanup_compat,
8983 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8984 table generation if necessary.
8985 * version.c: Record whether unwind support is compiled in.
8986 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8987 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8989 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8990 complication to generate unwind information for syscall wrappers.
8991 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8992 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8993 __cleanup_fct_attribute.
8995 * Makefile: Add rules to build and run tst-cleanup0.
8996 * tst-cleanup0.c: New file.
8997 * tst-cleanup0.expect: New file.
8999 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
9000 caller. Optimize to avoid often unecessary local variable.
9002 2003-04-11 Roland McGrath <roland@redhat.com>
9004 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9005 sets variable `multidir'; include that.
9006 (generated): Add it.
9007 ($(objpfx)$(multidir)/crti.o): New target.
9008 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9010 2003-04-11 Ulrich Drepper <drepper@redhat.com>
9012 * tst-attr2.c (do_test): Add cast to avoid warning.
9013 * tst-mutex4.c (do_test): Likewise.
9015 2003-04-10 Ulrich Drepper <drepper@redhat.com>
9017 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9020 2003-04-09 Ulrich Drepper <drepper@redhat.com>
9022 * Makefile (tests): Add tst-detach1.
9023 * tst-detach1.c: New file.
9025 2003-04-08 Ulrich Drepper <drepper@redhat.com>
9027 * sysdeps/pthread/pthread.h: Remove duplicate
9028 pthread_cleanup_{push,pop} definitions.
9030 * tst-barrier2.c: Eliminate warnings.
9031 * tst-cancel4.c: Likewise.
9032 * tst-cond4.c: Likewise.
9033 * tst-cond6.c: Likewise.
9034 * tst-detach1.c: Likewise.
9035 * tst-rwlock4.c: Likewise.
9036 * tst-rwlock6.c: Likewise.
9037 * tst-rwlock7.c: Likewise.
9038 * tst-sem3.c: Likewise.
9039 * tst-spin2.c: Likewise.
9040 * tst-umask1.c: Likewise.
9042 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9044 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9046 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9048 * descr.h (struct pthread): Move cancelhandling member to the front.
9050 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9052 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9053 malloc_parent, and malloc_child statically.
9054 (__register_atfork_malloc): New function.
9055 (free_mem): Don't free any of the malloc_* variables on the list.
9056 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9057 Define HAVE_register_atfork_malloc.
9059 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9061 * sysdeps/pthread/createthread.c (create_thread): Add some more
9062 comments explaining when to set multiple_threads and when not.
9064 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9065 THREAD_ATOMIC_BIT_SET if not already defined.
9066 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9067 THREAD_ATOMIC_BIT_SET:
9068 * sysdeps/x86_64/tls.h: Likewise.
9069 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9070 THREAD_ATOMIC_CMPXCHG_VAL.
9071 (_pthread_cleanup_pop_restore): Likewise.
9072 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9073 (__pthread_enable_asynccancel_2): Likewise.
9074 (__pthread_disable_asynccancel): Likewise.
9075 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9076 (__libc_disable_asynccancel): Likewise.
9077 * init.c (sigcancel_handler): Likewise.
9078 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9079 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9081 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9083 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9084 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9085 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9086 * Makefile (tests): Add tst-cancel11.
9087 * tst-cancel11.c: New file.
9089 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9091 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9092 round, not the first. Use specific_used flag instead of local
9093 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9094 (__free_tcb): Don't call deallocate_tsd here.
9095 (start_thread): Call deallocate_tsd here.
9096 * pthread_setspecific.c: Set specific_used flag really only when
9098 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9099 * tst-tsd3.c: New file.
9100 * tst-tsd4.c: New file.
9102 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9104 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9105 Use atomic_exchange_and_add instead of __lll_add.
9106 (__lll_mutex_timedlock): Likewise.
9107 Patch by Ian Wienand.
9109 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9111 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9112 (SINGLE_THREAD_P): Fix typo.
9113 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9115 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9117 * Makefile (tests): Add tst-align.
9118 * tst-align.c: New file.
9119 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9121 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9124 * tst-tsd2.c: Add casts to avoid warnings.
9126 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9128 * descr.h (struct pthread): Move most often used elements to the front.
9130 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9132 * Makefile (libpthread-routines): Add pthread_atfork.
9133 (libpthread-static-only-routines): Add pthread_atfork.
9135 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9137 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9139 (INSTALL_DTV): Add parens.
9140 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9141 Use passed descr instead of THREAD_SELF.
9142 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9143 (__lll_mutex_timedlock_wait): Correct expected value after
9145 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9146 Release lock before waking up the waiters.
9147 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9148 criteria. Reorderstruct passed to cleanup handler. Fix
9149 handling of cancellation and failung pthread_mutex_unlock call.
9150 Use __pthread_enable_asynccancel_2 instead of
9151 __pthread_enable_asynccancel.
9152 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9153 Return result of lock re-get if it fails.
9154 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9155 for __pthread_cleanup_push.
9156 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9157 completely broken rwlock implementation.
9158 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9159 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9160 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9161 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9162 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9163 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9164 versioned_symbol macro.
9165 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9166 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9168 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9170 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9171 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9173 (struct timer): Remove th and bar field.
9174 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9175 debugging code. Create only one helper thread.
9176 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9178 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9179 Renamed. Define statically. Use thread info from siginfo.
9180 (__helper_once): New variable.
9181 (__helper_tid): New variable.
9182 (__reset_helper_control): New function.
9183 (__start_helper_thread): New function.
9185 * pthread_create.c (start_thread): Don't use setjmp inside
9186 __builtin_expect to work around gcc bug.
9188 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9189 timer_delete syscall fails, but not with ENOSYS, set
9192 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9193 (timer_settime): Fix typo.
9194 * sysdeps/unix/sysv/linux/timer_getoverr.c
9195 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9197 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9200 offset of cleanupbuf.__prev.
9202 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9204 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9207 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9209 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9210 NULL provide default definition to syscall.
9212 2003-03-25 Roland McGrath <roland@redhat.com>
9214 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9215 (timer_id2ptr): Fix typo.
9217 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9219 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9220 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9221 * sysdeps/ia64/pthreaddef.h: Likewise.
9222 * sysdeps/powerpc/pthreaddef.h: Likewise.
9223 * sysdeps/s390/pthreaddef.h: Likewise.
9224 * sysdeps/sh/pthreaddef.h: Likewise.
9225 * sysdeps/x86_64/pthreaddef.h: Likewise.
9226 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9227 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9229 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9230 SIGTIMER is not unblocked.
9231 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9233 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9235 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9236 pass pointer through as ID.
9237 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9238 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9239 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9240 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9241 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9242 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9243 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9244 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9245 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9246 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9247 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9248 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9249 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9250 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9251 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9252 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9253 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9254 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9255 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9256 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9257 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9258 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9259 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9260 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9261 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9262 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9263 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9264 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9265 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9266 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9267 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9268 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9269 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9271 * pthreadP.h: Remove FRAME_LEFT definition.
9272 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9273 already left frame. Programs which have this problem are not POSIX
9275 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9277 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9279 * sysdeps/pthread/tst-timer.c: Check return values of the
9282 2003-03-23 Roland McGrath <roland@redhat.com>
9284 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9285 * tst-tls3mod.c: Likewise.
9286 * tst-tls1.c: Likewise.
9287 * tst-tls2.c: Likewise.
9289 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9292 * tst-join5.c (tf1, tf2): Add a cast.
9294 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9296 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9297 Don't test anything.
9298 * tst-cond4.c: Likewise.
9299 * tst-cond6.c: Likewise.
9300 * tst-flock2.c: Likewise.
9301 * tst-mutex4.c: Likewise.
9302 * tst-rwlock4.c: Likewise.
9303 * tst-signal1.c: Likewise.
9304 * tst-spin2.c: Likewise.
9305 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9307 * tst-mutex4.c: Use test-skeleton.c.
9308 * tst-spin2.c: Likewise.
9309 * tst-sysconf.c: Likewise.
9310 * tst-barrier2.c: Likewise.
9311 * tst-cond4.c: Likewise.
9312 * tst-cond6.c: Likewise.
9313 * tst-rwlock4.c: Likewise.
9314 * tst-unload.c: Likewise.
9315 * tst-flock2.c (do_test): Use return instead of exit.
9317 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9319 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9321 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9323 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9324 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9325 instead of __lll_compare_and_swap.
9326 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9328 Removed definition if __lll_compare_and_swap.
9330 * cancellation.c: Adjust for new form of compare&exchange macros.
9331 * cleanup_defer.c: Likewise.
9333 * libc-cancellation.c: Likewise.
9334 * old_pthread_cond_broadcast.c: Likewise.
9335 * old_pthread_cond_signal.c: Likewise.
9336 * old_pthread_cond_timedwait.c: Likewise.
9337 * old_pthread_cond_wait.c: Likewise.
9338 * pthread_cancel.c: Likewise.
9339 * pthread_create.c: Likewise.
9340 * pthread_detach.c: Likewise.
9341 * pthread_join.c: Likewise.
9342 * pthread_key_delete.c: Likewise.
9343 * pthread_setcancelstate.c: Likewise.
9344 * pthread_setcanceltype.c: Likewise.
9345 * pthread_timedjoin.c: Likewise.
9346 * pthread_tryjoin.c: Likewise.
9347 * sysdeps/pthread/createthread.c: Likewise.
9349 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9351 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9352 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9353 definitions. Replace uses with calls to atomic_* functions.
9354 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9355 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9356 __lll_test_and_set calls with atomic_exchange_and_add and
9357 atomic_exchange calls respectively.
9358 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9359 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9360 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9361 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9362 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9363 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9364 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9366 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9367 returns the old value.
9369 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9371 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9372 int for variable OLDVAL and correct inline assembler contraint.
9373 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9374 type int for variable OLD.
9376 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9378 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9379 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9380 instead of multiple_threads field in the TCB.
9382 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9384 * sysdeps/i386/i686/bits/atomic.h: Removed.
9385 * sysdeps/i386/i586/bits/atomic.h: Removed.
9386 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9387 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9388 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9389 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9390 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9391 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9392 * atomic.h: Removed. Moved to glibc.
9394 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9395 support for clock selection.
9397 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9400 2003-03-18 Roland McGrath <roland@redhat.com>
9402 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9403 Add __lll_rel_instr first. Add memory clobber.
9404 (lll_mutex_unlock): Use __lll_test_and_set.
9405 From Paul Mackerras <paulus@samba.org>.
9407 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9409 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9410 (SINGLE_THREAD_P): Add `header.' prefix.
9411 From Paul Mackerras <paulus@samba.org>.
9413 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9414 pthread_timedjoin_np to ...
9415 (libpthread: GLIBC_2.3.3): ... here.
9416 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9418 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9419 Avoid shadowing VAL variable.
9421 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9424 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9426 * Makefile (tests): Add tst-cond11.
9427 * tst-cond11.c: New file.
9429 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9430 struct passed to cleanup handler to eliminate one more
9432 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9434 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9435 (pthrad_cond_t): Replace __unused field with __clock.
9437 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9438 waken all waiters in cleanup handler.
9439 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9440 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9442 * pthread_condattr_getclock.c: New file.
9443 * pthread_condattr_setclock.c: New file.
9444 * sysdeps/pthread/pthread.h: Declare these new functions.
9445 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9446 * Makefile (libpthread-routines): Add the new functions.
9447 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9448 Renamed field to value. Document use of the bits.
9449 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9451 * pthread_condattr_setpshared.c: Likewise.
9452 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9453 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9454 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9456 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9457 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9458 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9459 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9461 Implement clock selection.
9462 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9463 * pthread-errnos.sym: Add ENOSYS.
9464 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9465 _POSIX_CLOCK_SELECTION.
9466 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9468 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9469 invalid .size directive.
9471 2003-03-17 Roland McGrath <roland@redhat.com>
9473 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9476 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9478 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9479 Use __lll_add instead of spelling it out. Use protected symbol names.
9480 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9482 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9483 Renamed from lll_compare_and_swap. Use new name where necessary.
9484 (__lll_add): Defined.
9485 (__lll_dec_if_positive): Defined.
9486 (__lll_test_and_set): Defined.
9487 * sysdeps/ia64/pthread_spin_init.c: Removed.
9488 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9489 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9490 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9491 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9492 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9493 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9494 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9495 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9496 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9497 __sync_lock_release_si.
9498 Patch by Jakub Jelinek.
9500 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9501 Fix timeout handling.
9502 (__lll_timedwait_tid): Likewise.
9503 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9504 Patch by Jakub Jelinek.
9506 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9508 2003-03-17 Roland McGrath <roland@redhat.com>
9510 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9511 * sysdeps/pthread/pthread_spin_init.c: New file.
9512 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9513 * sysdeps/powerpc/Makefile: New file.
9514 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9515 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9516 * sysdeps/powerpc/pthreaddef.h: New file.
9517 * sysdeps/powerpc/tcb-offsets.sym: New file.
9518 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9519 * sysdeps/powerpc/tls.h: New file.
9520 * sysdeps/powerpc/bits/atomic.h: New file.
9521 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9522 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9523 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9525 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9526 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9527 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9528 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9529 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9530 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9531 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9532 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9533 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9534 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9535 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9536 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9537 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9538 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9539 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9541 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9543 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9544 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9545 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9546 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9547 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9549 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9551 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9552 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9553 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9554 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9555 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9557 2003-03-16 Roland McGrath <roland@redhat.com>
9559 * tst-fork4.c: Include <string.h>.
9560 * tst-signal2.c: Likewise.
9561 * tst-mutex5.c (do_test): exit -> return.
9562 * tst-mutex2.c: Include <stdlib.h>.
9564 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9566 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9567 (__lll_mutex_timedlock_wait): Correct expected value after
9568 spurious wakeup. Otherwise we would never wait again.
9570 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9571 zone versus inline asm stupidity. Use correct instructions.
9573 * tst-rwlock6.c: Add some more status output.
9575 2003-03-15 Roland McGrath <roland@redhat.com>
9577 * sysdeps/pthread/configure.in: New file.
9578 * sysdeps/pthread/configure: New file (generated).
9580 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9582 * allocatestack.c (allocate_stack): Store the exact stack size of
9583 user allocated stacks.
9585 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9587 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9588 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9589 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9590 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9591 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9592 Use `header.' prefix.
9593 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9595 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9597 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9598 __builtin_frame_address, use stack pointer.
9600 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9601 instead of __builtin_frame_pointer.
9603 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9605 * tst-basic1.c (do_test): Add cast to avoid warning.
9606 * tst-basic2.c (do_test): Likewise.
9608 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9609 amount of stack correction.
9611 * tst-fork4.c: Use test-skeleton.c.
9613 2003-03-14 Roland McGrath <roland@redhat.com>
9615 * init.c: Fix typo "#eli" for "#else".
9617 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9619 * allocatestack.c (__stack_user): Use hidden_data_def.
9620 * pthread_create.c (__pthread_keys): Likewise.
9622 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9624 2003-03-14 Roland McGrath <roland@redhat.com>
9626 * tst-fork4.c: New file.
9627 * Makefile (tests): Add it.
9629 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9630 we always define the padding space.
9631 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9632 stopped supporting its own extensions fully.
9633 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9634 struct also called `header', so `header.multiple_threads' is the field
9635 name to use on all machines.
9636 * allocatestack.c (allocate_stack): Use `header.' prefix.
9637 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9638 * pthread_create.c (__pthread_create_2_1): Likewise.
9639 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9640 (THREAD_SELF): Likewise.
9641 * sysdeps/x86_64/tls.h: Likewise.
9642 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9643 (SINGLE_THREAD_P): Likewise.
9644 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9645 (SINGLE_THREAD_P): Likewise.
9646 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9647 (SINGLE_THREAD_P): Likewise.
9649 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9652 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9654 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9655 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9657 * pthread_create.c (start_thread): setjmp is expected to return 0.
9659 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9660 (THREAD_GETMEM_NC): Likewise.
9662 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9664 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9665 and the size of the stack which must be allocated is a multiple,
9666 allocate one more page.
9667 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9668 MULTI_PAGE_ALIASING.
9670 2003-03-13 Roland McGrath <roland@redhat.com>
9672 * pthread_create.c (start_thread): Set EXITING_BIT after the
9673 event-reporting (and destructors), not before.
9675 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9677 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9678 lll_futex_wake): Declare register variables as long int instead of
9679 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9680 Make syscall arguments clobbered by the syscall.
9681 (lll_futex_wait): Define using lll_futex_timed_wait.
9683 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9686 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9689 * allocatestack.c (nptl_ncreated): Only declare if
9690 COLORING_INCREMENT != 0.
9692 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9693 (__libc_enable_asynccancel_2): Remove prototype.
9695 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9696 ctid to match kernel.
9698 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9700 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9701 libc_multiple_threads.
9702 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9703 __libc_multiple_threads to...
9704 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9706 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9708 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9709 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9711 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9712 (__pthread_once_internal): Define.
9714 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9715 macros instead of .symver directly.
9716 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9717 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9719 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9720 * sysdeps/x86_64/tcb-offsets.sym: New file.
9721 * sysdeps/x86_64/Makefile: New file.
9723 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9724 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9725 to access own pthread_t in TCB.
9726 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9728 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9730 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9732 2003-03-12 Roland McGrath <roland@redhat.com>
9734 * pthread-errnos.sym: New file.
9735 * Makefile (gen-as-const-headers): New variable, list that file.
9736 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9737 header <pthread-errnos.h> instead of defining errno values here.
9738 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9739 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9740 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9741 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9742 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9744 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9746 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9747 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9748 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9749 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9750 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9751 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9752 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9753 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9754 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9755 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9756 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9757 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9758 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9759 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9760 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9761 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9762 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9763 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9764 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9765 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9766 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9767 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9768 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9769 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9770 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9771 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9772 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9774 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9775 CLONE_CHILD_SETTID worked.
9777 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9779 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9781 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9784 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9785 (pthread_cond_t): Add padding.
9787 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9788 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9789 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9791 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9792 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9793 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9794 (__pthread_rwlock_timedrdlock): Likewise.
9795 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9796 (__pthread_rwlock_wrlock): Likewise.
9797 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9798 (__pthread_rwlock_rdlock): Likewise.
9800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9802 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9803 result of lock re-get if it fails.
9805 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9807 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9808 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9809 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9810 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9811 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9812 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9813 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9814 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9815 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9816 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9818 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9819 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9821 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9822 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9823 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9824 (create_thread): Likewise.
9825 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9826 * init.c (__pthread_initialize_minimal_internal): Initialize
9827 __libc_multiple_threads_ptr if necessary.
9828 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9829 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9830 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9831 __libc_multiple_threads.
9832 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9835 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9836 (THREAD_SETMEM_NC): Likewise.
9838 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9839 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9840 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9841 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9843 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9844 Eliminate one entire instruction.
9846 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9847 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9848 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9849 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9850 instead of __pthread_enable_asynccancel.
9851 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9852 (__pthread_cond_wait): Likewise.
9853 * sysdeps/pthread/pthread_cond_timedwait.c
9854 (__pthread_cond_timedwait): Likewise.
9855 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9858 (__condvar_cleanup): Wake up all waiters in case we got signaled
9859 after being woken up but before disabling asynchronous
9861 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9862 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9863 (__condvar_cleanup): Likewise.
9865 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9866 Make it an error if architecture has no #if case. Add x86-64.
9868 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9869 pt-initfini.s generation.
9871 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9872 (TLS_INIT_TP): Fix typo.
9874 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9876 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9877 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9879 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9880 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9881 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9882 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9883 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9884 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9885 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9886 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9888 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9890 * sysdeps/pthread/pthread_cond_timedwait.c
9891 (__pthread_cond_timedwait): Return the result of the final
9892 locking. If it succeeds, the regular function return value.
9894 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9895 Return result of the final locking.
9896 * version.c (__nptl_main): Work around problems with the strange
9897 INTERNAL_SYSCALL macro on ppc32.
9898 * init.c (__pthread_initialize_minimal_internal): Unblock
9899 SIGCANCEL in case the parent blocked it.
9900 Reported by Paul Mackerras <paulus@samba.org>.
9902 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9903 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9904 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9906 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9908 * sysdeps/pthread/pthread_cond_timedwait.c
9909 (__pthread_cond_timedwait): Unlock and fail if
9910 __pthread_mutex_unlock_internal failed.
9912 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9913 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9915 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9916 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9917 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9918 ALLOCATE_STACK): New macros.
9919 (TLS_TPADJ): New macro.
9920 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9921 (allocate_stack): Handle TLS_DTV_AT_TP and
9922 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9923 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9925 * init.c [__ia64__] (__NR_set_tid_address): Define.
9927 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9928 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9929 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9930 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9931 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9932 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9933 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9934 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9935 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9936 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9937 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9938 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9939 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9940 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9941 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9942 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9943 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9944 * sysdeps/ia64/bits/atomic.h: New file.
9945 * sysdeps/ia64/Makefile: New file.
9946 * sysdeps/ia64/pthread_spin_init.c: New file.
9947 * sysdeps/ia64/pthread_spin_lock.c: New file.
9948 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9949 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9950 * sysdeps/ia64/pthreaddef.h: New file.
9951 * sysdeps/ia64/tcb-offsets.sym: New file.
9952 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9953 * sysdeps/ia64/tls.h: New file.
9955 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9956 to syscall instead of no arguments.
9958 2003-03-10 Ulrich Drepper <drepper@redhat.com>
9960 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9961 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9962 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9963 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9965 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9968 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9970 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9971 lowlevelbarrier.sym.
9972 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9973 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9974 Include lowlevelbarrier.h and don't define offsets locally.
9975 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9977 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9978 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9979 (__lll_mutex_timedlock_wait): Likewise.
9980 (lll_mutex_lock): Adjust asm for that.
9981 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9982 (lll_lock): Adjust asm for operand order change.
9983 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9984 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9986 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9987 Reverse order of parameters.
9988 (__lll_timedwait_tid): Remove regparms attribute.
9989 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9990 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9992 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9993 (__lll_timedwait_tid): Remove one unnecessary instruction.
9995 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9996 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9997 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10000 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10001 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10003 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10006 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10007 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
10009 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10010 define LOCK here (if UP is not defined). The actual code is in
10013 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10014 LOCK is already defined. Don't define lll_unlock_wake_cb and
10015 __lll_timedwait_tid for libc.so.
10016 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10017 define LOCK here (if UP is not defined). The actual code is in
10020 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10021 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10022 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10023 instead of lowlevelsem.h.
10024 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10025 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10026 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10028 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10029 lowlevelrwlock.sym.
10030 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10031 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10032 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10034 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10036 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10037 last changed. D'oh.
10039 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10041 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10042 of __libc_locking_needed.
10043 (lll_trylock): Initialize %eax to zero.
10045 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10046 pthread_cond_t definition.
10048 2003-03-10 Roland McGrath <roland@redhat.com>
10050 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10051 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10052 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10053 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10054 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10056 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10057 Instead of setting PD->multiple_threads, set globals
10058 __pthread_multiple_threads and __libc_multiple_threads.
10059 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10060 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10061 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10063 * descr.h (struct pthread): Conditionalize first member on
10064 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10065 containing an anonymous tcbhead_t. Move `list' member out.
10066 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10067 * allocatestack.c: Remove use of `header.data.' prefix.
10068 * pthread_create.c: Likewise.
10069 * init.c (__pthread_initialize_minimal_internal): Likewise.
10070 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10071 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10072 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10073 * sysdeps/x86_64/tls.h: Likewise.
10074 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10075 (SINGLE_THREAD_P): Likewise.
10076 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10077 (SINGLE_THREAD_P): Likewise.
10078 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10079 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10081 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10083 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10085 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10086 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10088 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10089 leftovers from the ia32 code.
10091 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10093 (clear_once_control): Don't load %esi.
10095 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10098 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10100 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10101 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10103 * Makefile (tests): Add tst-cond10.
10104 * tst-cond10.c: New file.
10106 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10108 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10109 * tst-signal3.c (do_test): Likewise.
10110 * tst-sem5.c (do_test): Likewise.
10111 * tst-kill6.c (do_test): Likewise.
10112 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10114 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10116 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10117 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10118 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10119 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10120 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10121 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10122 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10124 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10126 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10127 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10129 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10130 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10131 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10132 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10133 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10135 * allocatestack.c (allocate_stack): If mprotect() fails free the
10138 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10140 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10142 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10143 lll_wake_tid. This was used only to work around kernel limits in
10145 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10146 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10147 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10148 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10150 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10151 (__pthread_initialize_minimal_internal): Change initialization of
10152 __static_tls_align_m1 appropriately.
10153 * pthreadP.h (__static_tls_align_m1): Renamed from
10154 __static_tls_align.
10155 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10156 instead of __static_tls_align-1.
10158 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10160 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10162 * pthread_create.c: Define __pthread_keys using nocommon
10163 attribute, not by placing it explicitly in bss.
10164 Remove DEFINE_DEALLOC definition. Not needed anymore.
10166 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10167 Use it in mmap call to allocate stacks.
10169 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10171 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10172 result of the thread function.
10174 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10176 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10177 version is just fine.
10179 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10180 (__pthread_child_handler): Renamed from pthread_child_handler,
10181 exported, and marked hidden. Change all users.
10182 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10183 free __pthread_child_handler from child list.
10185 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10187 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10189 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10190 Fix handling of cancellation and failing pthread_mutex_unlock call.
10191 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10192 (__pthread_cond_wait): Likewise.
10194 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10195 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10196 lll_futex_timed_wait call.
10197 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10198 (pthread_rwlock_timedwrlock): Likewise.
10200 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10201 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10202 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10204 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10205 check of lll_futex_wake return value.
10207 2003-03-03 Roland McGrath <roland@redhat.com>
10209 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10211 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10212 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10213 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10215 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10217 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10218 error for CPU clocks.
10220 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10221 _POSIX_MONOTONIC_CLOCK.
10222 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10224 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10227 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10229 * descr.h (struct pthread): Move cleanup field to the front.
10231 2003-03-01 Roland McGrath <roland@redhat.com>
10233 * sem_open.c (sem_open): Braino fix.
10235 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10237 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10238 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10239 __pthread_cleanup_pop functionality.
10240 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10242 * descr.h (struct pthread): Move tid field to the front now that
10245 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10246 (__lll_mutex_timedlock_wait): Remove.
10247 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10248 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10249 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10250 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10251 (lll_unlock_wake_cb): Don't save and restore %esi.
10252 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10254 (__lll_timedwait_tid): Add alignment.
10255 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10256 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10258 (__lll_timedwait_tid): Removed.
10259 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10260 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10261 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10262 (pthread_barrier_wait): Don't save, load, and restore %esi for
10264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10265 (__pthread_cond_signal): Don't save, load, and restore %esi.
10266 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10267 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10268 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10269 Don't save, load, and restore %esi.
10271 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10273 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10274 Release lock before waking up the waiters.
10276 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10278 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10279 (reader_thread): Likewise.
10281 * sysdeps/pthread/pthread_rwlock_unlock.c
10282 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10283 to wake up readers if there are none.
10285 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10286 Release internal lock before wake threads.
10288 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10290 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10291 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10293 * tst-rwlock9.c: Likewise.
10294 * tst-rwlock10.c: New file.
10295 * tst-rwlock11.c: New file.
10297 * Makefile (tests): Add tst-dlsym1.
10298 * tst-dlsym1.c: New file.
10300 * init.c (__pthread_initialize_minimal_internal): Set
10301 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10302 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10304 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10306 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10308 * tst-cond2.c: Fix sychronization with child.
10310 * tst-rwlock8.c (reader_thread): Remove unused variable.
10312 * Makefile: Add rules to build and run tst-tls3.
10313 * tst-tls3.c: New file.
10314 * tst-tls3mod.c: New file.
10316 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10317 * tst-rwlock8.c: New file.
10318 * tst-rwlock9.c: New file.
10319 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10320 complete broken rwlock implementation.
10321 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10323 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10325 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10326 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10327 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10328 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10329 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10330 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10331 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10333 2003-02-23 Roland McGrath <roland@redhat.com>
10335 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10337 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10339 * Makefile (tests): Add tst-context1.
10340 * tst-context1.c: New file.
10342 * Makefile (tests): Add tst-tls1 and tst-tls2.
10343 * tst-tls1.c: New file.
10344 * tst-tls2.c: New file.
10346 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10347 for failed cmpxchg.
10349 * pthread_create.c (start_thread): Set EXITING_BIT early.
10351 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10352 (THREAD_GETMEM_NC): Likewise.
10354 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10356 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10357 off 3 more bytes by using offset-less instructions when possible.
10359 * Makefile: Add dependency for $(objpfx)version.d.
10361 * eintr.c (eintr_source): Add unnecessary return but the compiler
10364 * tst-kill3.c: Include <unistd.h>.
10366 2003-02-21 Roland McGrath <roland@redhat.com>
10368 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10370 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10372 * Makefile (tests): Add tst-eintr1.
10373 (distribute): Add eintr.c.
10374 * tst-eintr1.c: New file.
10375 * eintr.c: New file.
10377 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10379 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10380 Disallow sending SIGCANCEL.
10382 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10383 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10384 * tst-kill1.c: New file.
10385 * tst-kill2.c: New file.
10386 * tst-kill3.c: New file.
10387 * tst-kill5.c: New file.
10388 * tst-kill6.c: New file.
10389 * tst-basic7.c: Renamed to...
10390 * tst-kill4.c: ...this.
10392 2003-02-21 Roland McGrath <roland@redhat.com>
10394 * Makefile (install-lib-ldscripts): New variable.
10396 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10398 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10399 * pthread_cancel.c: Use INVALID_TD_P.
10400 * pthread_detach.c: Likewise.
10401 * pthread_getschedparam.c: Likewise.
10402 * pthread_setschedparam.c: Likewise.
10403 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10404 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10405 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10406 * pthread_timedjoin.c: Likewise.
10408 * tst-basic7.c: Include <signal.h>.
10410 * pthread_join.c (pthread_join): Limited checking for invalid
10412 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10414 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10416 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10417 beginning of the loop. Clear the entire first block of TSD.
10418 * Makefile (tests): Add tst-key4.
10419 * tst-key4.c: New file.
10421 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10423 * Makefile (tests): Add tst-basic7.
10424 * tst-basic7.c: New file.
10426 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10427 Add some more __builtin_expect.
10429 * pthreadP.h: Define dummy version of DEBUGGING_P.
10431 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10433 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10434 _POSIX_THREAD_PRIORITY_SCHEDULING.
10435 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10436 _XOPEN_REALTIME_THREADS.
10437 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10439 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10440 kernel returns EINVAL for PID <= 0, work around it.
10442 * Makefile (tests): Add tst-signal5.
10443 * tst-signal5.c: New file.
10445 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10446 and LOGIN_NAME_MAX.
10448 * tst-cancel1.c (tf): Block all signals.
10450 * Makefile (tests): Add tst-basic6.
10451 * tst-basic6.c: New file.
10453 * tst-basic1.c: Add test for process ID.
10455 * Makefile (tests): Add tst-cancel10.
10456 * tst-cancel10.c: New file.
10458 * Makefile (tests): Add tst-signal4.
10459 * tst-signal4.c: New file.
10461 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10462 __sigismember instead of sigismember. Add __builtin_expect.
10464 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10466 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10467 pthread_setcancelstate, and pthread_rwlock_setpshared.
10469 * tst-cancel7.c (do_test): Make sure the pid file exists before
10470 canceling the thread.
10472 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10473 pthread_rwlock_timedrdlock tests.
10474 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10475 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10476 Check for invalid tv_nsec field.
10477 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10480 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10481 recursive mutex of overflow.
10483 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10485 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10486 going into an endless loop.
10487 * Makefile (tests): Add tst-cancel9.
10488 * tst-cancel9.c: New file.
10490 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10492 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10494 * tst-mutex5.c (do_test): Add more timedlock tests.
10496 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10497 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10499 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10500 use INLINE_SYSCALL. Error number is returned, not -1.
10502 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10503 and __deallocate_stack with internal_function.
10504 * pthread_create.c: Adjust definitions appropriately.
10505 * allocatestack.c: Likewise.
10507 * pthread_join.c: Add one more __builtin_expect.
10508 * pthread_timedjoin.c: Likewise.
10510 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10511 not data of sequence number does not match.
10512 Add one __builtin_expect.
10514 * Makefile (tests): Add tst-clock1.
10515 * tst-clock1.c: New file.
10517 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10518 negative arguments.
10519 * Makefile (tests): Add tst-basic5.
10520 * tst-basic5.c: New file.
10522 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10524 * Makefile (tests): Add tst-basic4.
10525 * tst-basic4.c: New file.
10527 * pthreadP.h: Add declaraction for __nptl_nthreads.
10528 * pthread_create.c: Define __nptl_nthreads
10529 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10530 after thread is done. If then zero, call exit(0).
10531 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10532 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10533 * init.c (pthread_functions): Initialize ptr_nthreads.
10534 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10535 (__reclaim_stacks): Decrement __nptl_nthreads.
10536 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10538 * Makefile (tests): Add tst-basic3.
10539 * tst-basic3.c: New file.
10541 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10542 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10543 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10544 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10545 if asynchronous canceling is enabled.
10546 * pthread_join.c (pthread_join): When recognizing circular joins,
10547 take into account the other thread might be already canceled.
10548 * Makefile (tests): Add tst-join5.
10549 * tst-join5.c: New file.
10551 * Makefile (tests): Add tst-join4.
10552 * tst-join4.c: New file.
10554 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10556 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10558 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10560 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10561 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10562 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10564 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10566 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10567 error if lll_futex_wake failed.
10569 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10571 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10572 handling of cancellation and failung pthread_mutex_unlock call.
10573 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10574 * Makefile (tests): Add tst-cond8 and tst-cond9.
10575 * tst-cond8.c: New file.
10576 * tst-cond9.c: New file.
10578 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10580 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10581 non-standard initializers with __USE_GNU.
10583 * Makefile (tests): Add tst-cleanup3.
10584 * tst-cleanup3.c: New file.
10586 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10588 * Makefile (tests): Add tst-attr1 and tst-attr2.
10589 * tst-attr1.c: New file.
10590 * tst-attr2.c: New file.
10592 * Makefile: Add rules to build and run tst-atfork2 test.
10593 * tst-atfork2.c: New file.
10594 * tst-atfork2mod.c: New file.
10596 * sysdeps/unix/sysv/linux/unregister-atfork.c
10597 (__unregister_atfork): Free the memory allocated for the handlers
10598 after removing them from the lists.
10600 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10603 * tst-atfork1.c (do_test): Wait for the child we forked.
10604 Report error in child.
10606 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10608 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10610 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10612 * Makefile (tests): Add tst-cancel8.
10613 * tst-cancel8.c: New file.
10615 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10616 clearing of control variable.
10617 * Makefile (tests): Add tst-once3 and tst-once4.
10618 * tst-once3.c: New file.
10619 * tst-once4.c: New file.
10621 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10623 * sysdeps/sh/Makefile: New file.
10624 * sysdeps/sh/bits/atomic.h: New file.
10625 * sysdeps/sh/pthread_spin_init.c: New file.
10626 * sysdeps/sh/pthread_spin_lock.c: New file.
10627 * sysdeps/sh/pthread_spin_trylock.S: New file.
10628 * sysdeps/sh/pthread_spin_unlock.S: New file.
10629 * sysdeps/sh/pthreaddef.h: New file.
10630 * sysdeps/sh/tcb-offsets.sym: New file.
10631 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10632 * sysdeps/sh/tls.h: New file.
10633 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10634 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10635 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10636 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10637 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10638 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10639 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10640 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10641 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10642 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10643 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10644 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10645 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10646 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10647 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10648 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10649 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10650 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10651 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10652 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10653 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10654 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10655 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10656 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10657 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10658 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10659 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10660 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10661 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10662 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10664 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10666 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10667 according to POSIX.
10669 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10671 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10673 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10674 (TLS_GET_FS): New #define.
10675 (TLS_SET_FS): New #define.
10676 Correct value of __NR_set_thread_area.
10678 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10680 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10682 * Makefile (tests): Add tst-popen1.
10683 * tst-popen1.c: New file.
10685 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10686 but inactive generalization.
10687 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10688 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10689 Minor optimization, remove one instruction.
10690 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10692 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10694 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10696 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10698 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10699 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10700 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10701 * sysdeps/pthread/pthread_cond_signal.c: New file.
10702 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10703 * sysdeps/pthread/pthread_cond_wait.c: New file.
10704 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10705 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10706 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10707 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10708 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10709 * sysdeps/s390/Makefile: New file.
10710 * sysdeps/s390/bits/atomic.h: New file.
10711 * sysdeps/s390/pthread_spin_init.c: New file.
10712 * sysdeps/s390/pthread_spin_lock.c: New file.
10713 * sysdeps/s390/pthread_spin_trylock.c: New file.
10714 * sysdeps/s390/pthread_spin_unlock.c: New file.
10715 * sysdeps/s390/pthreaddef.h: New file.
10716 * sysdeps/s390/tcb-offsets.sym: New file.
10717 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10718 * sysdeps/s390/tls.h: New file.
10719 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10720 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10721 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10722 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10723 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10724 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10725 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10726 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10727 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10728 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10729 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10730 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10731 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10732 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10733 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10734 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10735 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10736 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10737 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10738 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10739 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10740 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10741 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10743 2003-02-04 Ulrich Drepper <drepper@redhat.com>
10745 * atomic.h: Add a couple more default implementations.
10746 (atomic_compare_and_exchange_acq): Use
10747 __arch_compare_and_exchange_32_acq in return value definition. It
10749 (atomic_bit_set): Renamed from atomic_set_bit.
10750 Add missing atomic_ prefixes.
10752 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10753 thread library is available, use correct value to mark initialized
10756 2003-02-03 Ulrich Drepper <drepper@redhat.com>
10758 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10759 __sysconf to determine pagesize.
10761 * pthread_create.c: Include <atomic.h>.
10762 * allocatestack.c (allocate_stack): Implement coloring of the
10763 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10764 size minus one. Adjust users.
10765 * sysdeps/i386/i686/Makefile: New file.
10767 2003-02-02 Ulrich Drepper <drepper@redhat.com>
10769 * allocatestack.c: Improve comment throughout the file.
10771 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10772 (__lll_lock_wait): Add branch prediction.
10773 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10774 (__lll_lock_wait): Likewise.
10775 (lll_unlock_wake_cb): Removed.
10777 2003-01-31 Ulrich Drepper <drepper@redhat.com>
10779 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10780 _POSIX_THREAD_PRIORITY_SCHEDULING.
10782 2003-01-30 Jakub Jelinek <jakub@redhat.com>
10784 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10785 Fix return type of ptr___pthread_getspecific.
10787 2003-01-29 Ulrich Drepper <drepper@redhat.com>
10789 * Makefile (tests): Add tst-umask1.
10790 (tst-umask1-ARGS): Define.
10791 * tst-umask1.c: New file.
10793 2003-01-28 Ulrich Drepper <drepper@redhat.com>
10795 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10796 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10797 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10798 pthread_rwlock_unlock.
10799 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10800 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10801 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10802 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10803 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10805 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10806 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10808 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10809 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10810 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10812 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10813 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10815 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10816 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10817 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10819 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10820 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10822 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10824 * Makefile (libpthread-routines): Remove lowlevelcond and
10825 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10826 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10827 and pthread_cond_broadcast.
10828 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10829 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10830 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10831 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10832 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10833 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10834 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10835 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10836 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10837 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10838 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10839 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10840 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10841 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10842 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10843 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10844 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10845 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10846 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10847 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10848 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10849 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10850 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10851 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10852 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10853 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10854 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10855 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10856 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10857 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10858 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10860 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10861 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10862 of the code is moved to ...
10863 * sysdeps/pthread/createthread.c: ...here. New file.
10865 2003-01-27 Ulrich Drepper <drepper@redhat.com>
10867 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10868 (__new_sem_post): Clear %eax before returning.
10869 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10871 * Makefile (tests): Add tst-cleanup2.
10872 * tst-cleanup2.c: New file.
10874 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10875 Interpret first parameter correctly.
10877 2003-01-17 Ulrich Drepper <drepper@redhat.com>
10879 * Makefile (headers): Add bits/semaphore.h.
10881 2003-01-16 Jakub Jelinek <jakub@redhat.com>
10883 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10886 2003-01-14 Ulrich Drepper <drepper@redhat.com>
10888 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10889 must be used and mapping failed.
10890 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10892 * Makefile (CFLAGS-pthread_self.os): Define this, not
10893 CFLAGS-pthread_self.c.
10895 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10897 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10898 lll_unlock_wake_cb.
10900 * Makefile (libpthread-routines): Add version. Add rules to build
10901 version.os and banner.h.
10902 * version.c: New file.
10904 2003-01-13 Jakub Jelinek <jakub@redhat.com>
10906 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10907 the alias unconditional.
10908 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10910 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10912 * Makefile (CFLAGS-pthread_self.c): New definition.
10914 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10916 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10917 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10918 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10919 * init.c (__pthread_initialize_minimal_internal): Likewise.
10921 2003-01-07 Jakub Jelinek <jakub@redhat.com>
10923 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10925 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10926 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10927 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10928 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10929 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10930 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10932 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10934 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10935 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10936 * tst-cancel-wrappers.sh: Remove all exceptions.
10938 2003-01-05 Ulrich Drepper <drepper@redhat.com>
10940 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10941 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10943 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10944 Use __libc_pthread_functions array if SHARED.
10946 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10947 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10949 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10950 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10951 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10952 __libc_ptf_call instead of __libc_maybe_call.
10953 (PTF): New #define.
10954 (__libc_cleanup_region_start): Wrap function name with PTF call.
10955 (__libc_cleanup_region_end): Likewise.
10956 (__libc_cleanup_end): Likewise.
10958 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10959 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10960 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10961 * pthreadP.h: Add prototypes.
10963 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10964 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10965 __pthread_rwlock_unlock aliases.
10966 * pthreadP.h: Add prototypes for new aliases.
10968 * pthreadP.h (struct pthead_functions): Moved to...
10969 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10970 * init.c (pthread_functions): Add initializers for new elements.
10972 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10973 __pthread_cleanup_pop_restore aliases.
10974 * pthreadP.h: Add prototypes.
10976 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10977 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10978 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10979 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10980 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10981 * pthreadP.h: Adjust prototypes and callers.
10983 2003-01-04 Ulrich Drepper <drepper@redhat.com>
10985 * Makefile (tests): Add tst-cancel7.
10986 (tst-cancel7-ARGS): New variable.
10987 * tst-cancel7.c: New file.
10989 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10990 around gcc defficiencies.
10991 * old_pthread_cond_signal.c: Likewise.
10992 * old_pthread_cond_timedwait.c: Likewise.
10993 * old_pthread_cond_wait.c: Likewise.
10995 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10997 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10999 * Makefile (tests): Add tst-cond7.
11000 * tst-cond7.c: New file.
11002 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11003 (condvar_cleanup): Get condvar address from the right place.
11005 * atomic.h: Correct definitions of atomic_full_barrier,
11006 atomic_read_barrier, atomic_write_barrier.
11008 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11010 * old_pthread_cond_signal.c: Likewise.
11011 * old_pthread_cond_timedwait.c: Likewise.
11012 * old_pthread_cond_wait.c: Likewise.
11014 2003-01-03 Jakub Jelinek <jakub@redhat.com>
11016 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11018 2003-01-03 Ulrich Drepper <drepper@redhat.com>
11020 * pthreadP.h (pthread_cond_2_0_t): New type.
11021 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11022 Use new type for the 2.0 condvar function prototypes.
11023 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11024 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11026 * old_pthread_cond_destroy.c: Likewise.
11027 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
11028 * old_pthread_cond_signal.c: Likewise.
11029 * old_pthread_cond_timedwait.c: Likewise.
11030 * old_pthread_cond_wait.c: Likewise.
11032 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11033 (__pthread_cond_wait): Don't save cancellation mode and seq value
11036 * herrno.c (__h_errno_location): Don't define as weak.
11038 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11040 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11041 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11042 and pthread_cond_wait.
11043 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11045 (__pthread_cond_broadcast_2_0): ... this.
11046 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11048 (__pthread_cond_destroy_2_0): ... this.
11049 * old_pthread_cond_init.c (__old_pthread_cond_init):
11051 (__pthread_cond_init_2_0): ... this.
11052 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11054 (__pthread_cond_signal_2_0): ... this.
11055 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11057 (__pthread_cond_wait_2_0): ... this.
11058 * pthread_cond_destroy.c: Include shlib-compat.h.
11059 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11060 * pthread_cond_init.c: Include shlib-compat.h.
11061 (pthread_cond_init): Change strong_alias into versioned_symbol.
11062 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11063 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11065 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11066 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11067 __pthread_cond_wait_2_0): New prototypes.
11068 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11069 __old_pthread_cond_init, __old_pthread_cond_signal,
11070 __old_pthread_cond_wait): Removed.
11071 * init.c: Include shlib-compat.h.
11072 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11073 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11074 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11075 ptr___pthread_cond_*_2_0 fields.
11076 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11077 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11079 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11080 LIBC_SIGACTION was not yet defined.
11081 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11082 [!defined LIBC_SIGACTION] (__sigaction): New function and
11084 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11085 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11087 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11089 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11091 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11093 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11094 New, larger type definition.
11095 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11097 * Versions [libpthread]: Add definitions for new pthread_cond_*
11098 interfaces for version GLIBC_2.3.2.
11099 * pthread_cond_init.c: Update initialization for new type definition.
11100 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11101 pthread_cond_timedwait, pthread_cond_signal, and
11102 pthread_cond_broadcast. Add old_pthread_cond_init,
11103 old_pthread_cond_destroy, old_pthread_cond_wait,
11104 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11105 old_pthread_cond_broadcast.
11106 * old_pthread_cond_broadcast.c: New file.
11107 * old_pthread_cond_destroy.c: New file.
11108 * old_pthread_cond_init.c: New file.
11109 * old_pthread_cond_signal.c: New file.
11110 * old_pthread_cond_timedwait.c: New file.
11111 * old_pthread_cond_wait.c: New file.
11112 * pthreadP.h: Add prototypes for the compatibility interfaces.
11114 * pthread_cond_destroy.c: Don't include <errno.h>.
11116 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11118 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11119 unnecessary zero offset when addressing MUTEX.
11121 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11123 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11125 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11126 for __register_atfork.
11128 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11130 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11131 instead of ASSEMBLER test macro.
11133 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11134 __libc_current_sigrtmax): Add libc_hidden_def.
11136 * sysdeps/pthread/list.h: Remove assert.h include.
11138 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11140 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11141 __pthread_initialize_minimal_internal not
11142 __pthread_initialize_minimal.
11144 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11146 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11147 __pthread_initialize_minimal as hidden.
11149 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11152 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11154 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11155 $(common-objpfx)format.lds, include that into the output script.
11157 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11159 2002-12-28 Andreas Jaeger <aj@suse.de>
11161 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11162 nsec resolution changes.
11163 (xstat64_conv): Likewise.
11164 (xstat32_conv): Likewise.
11165 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11166 struct kernel_stat.
11167 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11168 structs stat and stat64.
11169 * time/time.h (__timespec_defined): Define for __USE_MISC.
11170 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11172 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11174 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11176 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11177 (pthread_exit): Use strong_alias to avoid warnings.
11178 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11179 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11180 ptr___pthread_attr_init_2_*.
11181 * init.c (pthread_functions): Adjust.
11183 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11185 * forward.c: Make all functions available by default again. It
11186 caused too much trouble.
11188 * pt-siglongjmp.c: Removed.
11190 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11192 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11193 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11194 * sysdeps/i386/Makefile: New file.
11195 * sysdeps/i386/tcb-offsets.sym: New file.
11196 * sysdeps/pthread/tcb-offsets.h: New file.
11197 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11198 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11200 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11201 __register_atfork...
11202 (GLIBC_2.3.2): ...here.
11204 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11206 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11207 pthread_attr_setstackaddr with __attribute_deprecated__.
11209 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11211 * pt-system.c (system): Remove cancellation handling.
11212 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11213 cancellation routines.
11215 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11217 * descr.h: Include <dl-sysdep.h>.
11218 (struct pthread): Move header.data.list to the back of the struct.
11219 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11220 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11221 (SYSINFO_OFFSEET): Likewise.
11223 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11225 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11227 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11228 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11229 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11230 (USE_DL_SYSINFO): Undef.
11232 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11234 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11235 $(common-objpfx)libc.so.
11236 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11237 it is bigger than pipe buffer size even on arches with bigger
11239 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11241 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11243 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11244 correct errno access for case that USE___THREAD is not defined.
11246 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11248 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11249 Patch by Marijn Ros <marijn@mad.scientist.com>.
11251 2002-12-22 Roland McGrath <roland@redhat.com>
11253 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11255 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11257 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11259 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11261 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11262 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11263 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11265 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11267 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11268 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11269 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11270 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11271 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11272 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11273 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11274 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11276 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11278 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11280 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11282 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11284 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11285 that sysinfo is properly initialized.
11286 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11287 to 1 only for ld.so.
11289 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11290 RTLD_CORRECT_DYNAMIC_WEAK.
11292 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11294 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11295 Use return 0 as 6th argument to FORWARD4.
11296 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11298 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11300 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11301 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11302 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11303 (INIT_SYSINFO): New #define.
11304 (TLS_TP_INIT): Use INIT_SYSINFO.
11305 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11306 At test to make sure SYSINFO_OFFSET value is correct.
11307 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11309 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11311 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11312 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11313 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11314 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11315 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11316 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11317 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11319 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11321 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11322 macro instead of using int $0x80 directly.
11324 * sysdeps/pthread/bits/stdio-lock.h: New file.
11325 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11326 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11327 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11328 * Makefile (routines): Add libc-lowlevelmutex.
11330 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11331 __i686.get_pc_thunk.dx.
11333 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11335 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11336 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11337 ($(objpfx)tst-cancel-wrappers.out): New rule.
11338 * tst-cancel-wrappers.sh: New test.
11339 * tst-locale1.c: Include signal.h.
11340 (uselocale): Test static linking of __libc_current_sigrt*.
11342 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11344 * Makefile (tests): Add tst-cancel6.
11345 * tst-cancel6.c: New file
11347 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11349 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11350 Define meaningfully for assembler as well.
11351 * pthreadP.h (struct pthread_functions): Remove
11352 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11353 and ptr_pthread_attr_init_2_1 fields.
11354 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11355 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11356 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11357 (FORWARD3): Define using FORWARD4.
11358 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11360 * pt-system.c: Remove duplicate stdlib.h include.
11362 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11364 * sem_init.c: Define sem_init@GLIBC_2.0.
11365 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11366 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11368 * flockfile.c: Moved to...
11369 * sysdeps/pthread/flockfile.c: ...here. New file.
11370 * funlockfile.c: Moved to...
11371 * sysdeps/pthread/funlockfile.c: ...here. New file.
11372 * ftrylockfile.c: Moved to...
11373 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11375 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11377 * libc-cancellation.c: Guard both function with
11378 #if !defined NOT_IN_libc.
11379 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11380 automatically provided pthread wrappers.
11381 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11382 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11384 * pt-open.c: Removed.
11385 * pt-fcntl.c: Removed.
11386 * pt-fsync.c: Removed.
11387 * pt-lseek.c: Removed.
11388 * pt-msgrcv.c: Removed.
11389 * pt-msgsnd.c: Removed.
11390 * pt-msync.c: Removed.
11391 * pt-nanosleep.c: Removed.
11392 * pt-open64.c: Removed.
11393 * pt-pause.c: Removed.
11394 * pt-pread.c: Removed.
11395 * pt-pread64.c: Removed.
11396 * pt-pwrite.c: Removed.
11397 * pt-pwrite64.c: Removed.
11398 * pt-read.c: Removed.
11399 * pt-recv.c: Removed.
11400 * pt-recvfrom.c: Removed.
11401 * pt-recvmsg.c: Removed.
11402 * pt-send.c: Removed.
11403 * pt-sendto.c: Removed.
11404 * pt-sigtimedwait.c: Removed.
11405 * pt-sigwait.c: Removed.
11406 * pt-wait.c: Removed.
11407 * pt-waitpid.c: Removed.
11408 * pt-write.c: Removed.
11409 * pt-accept.c: Removed.
11410 * pt-close.c: Removed.
11411 * pt-connect.c: Removed.
11412 * pt-lseek64.c: Removed.
11413 * pt-sendmsg.c: Removed.
11414 * pt-tcdrain.c: Removed.
11416 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11418 * init.c (__pthread_initialize_minimal_internal): Renamed from
11419 __pthread_initialize_minimal. Make old name an alias. This
11420 converts a normal relocation into a relative relocation.
11422 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11424 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11425 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11426 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11427 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11428 pt-sigwaitinfo, pt-waitid, and pt-writev.
11429 * pt-creat.c: Removed.
11430 * pt-poll.c: Removed.
11431 * pt-pselect.c: Removed.
11432 * pt-readv.c: Removed.
11433 * pt-select.c: Removed.
11434 * pt-sigpause.c: Removed.
11435 * pt-sigsuspend.c: Removed.
11436 * pt-sigwaitinfo.c: Removed.
11437 * pt-waitid.c: Removed.
11438 * pt-writev.c: Removed.
11440 * init.c (pthread_functions): New variable.
11441 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11442 (or NULL) to __libc_pthread_init.
11443 * forward.c: Rewrite to use __libc:pthread_functions array to get
11444 function addresses.
11445 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11447 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11448 Take new parameter. Copy content of variable pointed to by it
11449 to __libc_pthread_init.
11451 * pthreadP.h (struct pthread_functions): New type.
11452 (__libc_pthread_init): Declare.
11454 * pthread_attr_destroy.c: Add namespace protected alias.
11455 * pthread_attr_getdetachstate.c: Likewise.
11456 * pthread_attr_getinheritsched.c: Likewise.
11457 * pthread_attr_getschedparam.c: Likewise.
11458 * pthread_attr_getschedpolicy.c: Likewise.
11459 * pthread_attr_getscope.c: Likewise.
11460 * pthread_attr_setdetachstate.c: Likewise.
11461 * pthread_attr_setinheritsched.c: Likewise.
11462 * pthread_attr_setschedparam.c: Likewise.
11463 * pthread_attr_setschedpolicy.c: Likewise.
11464 * pthread_attr_setscope.c: Likewise.
11465 * pthread_cond_broadcast.c: Likewise.
11466 * pthread_cond_destroy.c: Likewise.
11467 * pthread_cond_init.c: Likewise.
11468 * pthread_cond_signal.c: Likewise.
11469 * pthread_cond_wait.c: Likewise.
11470 * pthread_condattr_destroy.c: Likewise.
11471 * pthread_condattr_init.c: Likewise.
11472 * pthread_equal.c: Likewise.
11473 * pthread_exit.c: Likewise.
11474 * pthread_getschedparam.c: Likewise.
11475 * pthread_self.c: Likewise.
11476 * pthread_setcancelstate.c: Likewise.
11477 * pthread_setschedparam.c: Likewise.
11478 * pthread_mutex_destroy.c: Likewise.
11479 * pthread_mutex_init.c: Likewise.
11480 * pthreadP.h: Add prototypes for the aliases.
11482 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11483 multiple_threads member in correct TCB to 1.
11485 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11486 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11487 member of thread decriptor, otherwise return unconditionally 1.
11489 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11491 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11492 regular Linux version. Remove file.
11493 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11494 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11495 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11496 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11497 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11498 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11499 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11500 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11501 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11502 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11503 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11504 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11505 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11506 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11507 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11508 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11509 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11510 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11511 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11512 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11513 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11514 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11515 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11516 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11517 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11518 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11519 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11520 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11521 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11522 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11524 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11526 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11527 * sysdeps/unix/sysv/linux/open.c: Removed.
11528 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11529 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11530 * sysdeps/unix/sysv/linux/msync.c: Removed.
11531 * sysdeps/unix/sysv/linux/read.c: Removed.
11532 * sysdeps/unix/sysv/linux/close.c: Removed.
11533 * sysdeps/unix/sysv/linux/creat.c: Removed.
11534 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11535 * sysdeps/unix/sysv/linux/pause.c: Removed.
11536 * sysdeps/unix/sysv/linux/select.c: Removed.
11537 * sysdeps/unix/sysv/linux/write.c: Removed.
11539 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11541 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11542 element in TCB to see whether locking is needed.
11544 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11545 MULTIPLE_THREADS_OFFSET value is correct.
11547 * sysdeps/unix/sysv/linux/close.c: New file.
11548 * sysdeps/unix/sysv/linux/connect.S: New file.
11549 * sysdeps/unix/sysv/linux/creat.c: New file.
11550 * sysdeps/unix/sysv/linux/fsync.c: New file.
11551 * sysdeps/unix/sysv/linux/llseek.c: New file.
11552 * sysdeps/unix/sysv/linux/lseek.c: New file.
11553 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11554 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11555 * sysdeps/unix/sysv/linux/msync.c: New file.
11556 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11557 * sysdeps/unix/sysv/linux/open.c: New file.
11558 * sysdeps/unix/sysv/linux/open64.c: New file.
11559 * sysdeps/unix/sysv/linux/pause.c: New file.
11560 * sysdeps/unix/sysv/linux/poll.c: New file.
11561 * sysdeps/unix/sysv/linux/pread.c: New file.
11562 * sysdeps/unix/sysv/linux/pread64.c: New file.
11563 * sysdeps/unix/sysv/linux/pselect.c: New file.
11564 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11565 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11566 * sysdeps/unix/sysv/linux/readv.c: New file.
11567 * sysdeps/unix/sysv/linux/recv.S: New file.
11568 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11569 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11570 * sysdeps/unix/sysv/linux/select.c: New file.
11571 * sysdeps/unix/sysv/linux/send.S: New file.
11572 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11573 * sysdeps/unix/sysv/linux/sendto.S: New file.
11574 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11575 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11576 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11577 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11578 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11579 * sysdeps/unix/sysv/linux/system.c: New file.
11580 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11581 * sysdeps/unix/sysv/linux/wait.c: New file.
11582 * sysdeps/unix/sysv/linux/waitid.c: New file.
11583 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11584 * sysdeps/unix/sysv/linux/writev.c: New file.
11585 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11587 * pt-readv.c: Fix comment.
11589 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11591 * tst-cleanup1.c: Include stdlib.h.
11593 * tst-cancel5.c: New test.
11594 * Makefile (tests): Add tst-cancel5.
11595 (tst-cancel5): Link against libc.so libpthread.so in that order.
11597 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11599 * forward.c (test_loaded): Prevent recursive calls.
11601 * Makefile (routines): Add libc-cancellation.
11602 * libc-cancellation.c: New file.
11603 * descr.h (struct pthread): Add multiple_threads field.
11604 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11605 new thread descriptor to 1.
11606 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11607 Initialize multiple_thread field after successful thread creation.
11608 * cancellation.c (__do_cancel): Move to pthreadP.h.
11609 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11610 (__pthread_disable_asynccancel): Add internal_function attribute.
11611 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11612 * pthread_setcancelstate.c: Likewise.
11613 * pthread_setcanceltype.c: Likewise.
11614 * pthread_exit.c: Likewise.
11615 * pthreadP.h (CANCELLATION_P): Likewise.
11616 (__do_cancel): Define as static inline.
11617 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11618 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11620 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11621 fields. Define MULTIPLE_THREADS_OFFSET.
11622 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11624 * sysdeps/unix/sysv/linux/accept.S: New file.
11625 * sysdeps/unix/sysv/linux/read.c: New file.
11626 * sysdeps/unix/sysv/linux/write.c: New file.
11627 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11628 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11629 initialization of __libc_locking_needed.
11630 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11631 __libc_locking_needed, use multiple_threads field in TCB.
11632 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11634 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11636 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11638 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11640 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11641 access to __libc_locking_needed for PIC.
11643 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11645 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11646 declare for libc.so.
11647 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11649 (__libc_lock_lock): Put into statement expression.
11650 (__libc_lock_unlock): Remove trailing semicolon.
11651 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11653 2002-12-12 Roland McGrath <roland@redhat.com>
11655 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11656 "m" constraint to refer to __libc_locking_needed. Declare it here.
11658 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11660 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11661 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11662 Initialize __libc_locking_needed.
11663 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11664 instead of __register_pthread_fork_handler.
11665 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11666 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11667 fork-gen with libc_pthread_init.
11668 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11669 of __register_pthread_fork_handler.
11670 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11671 of __register_pthread_fork_handler.
11672 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11673 __libc_locking_needed to determine whether lock prefix can be avoided.
11674 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11676 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11678 * Makefile (tests): Add tst-cleanup1.
11679 * tst-cleanup1.c: New file.
11680 * cancellation.c (__cleanup_thread): Removed.
11681 (__do_cancel): Remove call to __cleanup_thread.
11682 * pthreadP.h: Remove __cleanup_thread prorotype.
11684 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11685 Remember function and argument even if cancellation handler
11686 function is not available.
11687 (__libc_cleanup_region_end): Execute registered function directly if
11688 pthread functions are not available.
11689 (__libc_cleanup_end): Likewise.
11691 * init.c (__pthread_initialize_minimal): Fix initialization in
11692 static lib by preventing gcc from being too clever.
11694 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11696 * init.c (__pthread_initialize_minimal): Remove unneccesary
11699 * Makefile (tests): We can run tst-locale2 now.
11701 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11703 * Versions: Remove duplicated sigwait entry.
11705 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11707 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11710 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11712 * pthreadP.h: Declare __pthread_enable_asynccancel and
11713 __pthread_disable_asynccancel.
11714 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11715 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11716 * cancellation.c (__pthread_enable_asynccancel): New function.
11717 (__pthread_disable_asynccancel): New function.
11718 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11719 * pt-close.c: Likewise.
11720 * pt-connect.c: Likewise.
11721 * pt-creat.c: Likewise.
11722 * pt-fcntl.c: Likewise.
11723 * pt-fsync.c: Likewise.
11724 * pt-lseek.c: Likewise.
11725 * pt-lseek64.c: Likewise.
11726 * pt-msgrcv.c: Likewise.
11727 * pt-msgsnd.c: Likewise.
11728 * pt-msync.c: Likewise.
11729 * pt-nanosleep.c: Likewise.
11730 * pt-open.c: Likewise.
11731 * pt-open64.c: Likewise.
11732 * pt-pause.c: Likewise.
11733 * pt-poll.c: Likewise.
11734 * pt-pread.c: Likewise.
11735 * pt-pread64.c: Likewise.
11736 * pt-pselect.c: Likewise.
11737 * pt-pwrite.c: Likewise.
11738 * pt-pwrite64.c: Likewise.
11739 * pt-read.c: Likewise.
11740 * pt-readv.c: Likewise.
11741 * pt-recv.c: Likewise.
11742 * pt-recvfrom.c: Likewise.
11743 * pt-recvmsg.c: Likewise.
11744 * pt-select.c: Likewise.
11745 * pt-send.c: Likewise.
11746 * pt-sendmsg.c: Likewise.
11747 * pt-sendto.c: Likewise.
11748 * pt-sigpause.c: Likewise.
11749 * pt-sigsuspend.c: Likewise.
11750 * pt-sigtimedwait.c: Likewise.
11751 * pt-sigwait.c: Likewise.
11752 * pt-sigwaitinfo.c: Likewise.
11753 * pt-system.c: Likewise.
11754 * pt-tcdrain.c: Likewise.
11755 * pt-wait.c: Likewise.
11756 * pt-waitid.c: Likewise.
11757 * pt-waitpid.c: Likewise.
11758 * pt-write.c: Likewise.
11759 * pt-writev.c: Likewise.
11760 * pthread_join.c: Likewise.
11761 * pthread_timedjoin.c: Likewise.
11763 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11764 (__xpg_sigpause): New function.
11765 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11767 2002-12-07 Ulrich Drepper <drepper@redhat.com>
11769 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11771 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11772 _GI_pthread_cleanup_pop to pthreadP.h.
11774 * ftrylockfile.c: Use _IO_lock_trylock instead of
11775 pthread_mutex_trylock.
11777 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11778 (CANCEL_RESET): Likewise.
11779 (__pthread_setcanceltype_): Declare.
11780 (__pthread_mutex_lock_internal): Declare.
11781 (__pthread_mutex_unlock_internal): Declare.
11782 (__pthread_once_internal): Declare.
11783 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11784 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11786 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11787 and pthread_mutex_unlock.
11788 * pthread_cond_wait.c: Likewise.
11789 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11790 * pthread_mutex_unlock.c: Likewise.
11792 * pthread_setcanceltype.c: Add additional alias
11793 __pthread_setcanceltype.
11795 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11796 * sem_open.c (sem_open): Likewise.
11797 Use __libc_open, __libc_write, and __libc_close instead of
11798 open, write, and close respectively.
11800 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11801 Rewrite as statement expression since it must return a value.
11803 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11804 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11807 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11808 alias __pthread_once_internal.
11810 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11812 2002-12-06 Ulrich Drepper <drepper@redhat.com>
11814 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11815 * tst-stdio1.c: New file.
11816 * tst-stdio2.c: New file.
11818 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11820 * Makefile (tests): Comment out tst-locale2 for now.
11821 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11823 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11825 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11826 Use _IO_lock_init instead of explicit assignment.
11828 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11829 Define __libc_lock_* and __libc_lock_recursive macros with
11830 lowlevellock macros, not pthread mutexes.
11832 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11833 of pthread_mutex_lock.
11834 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11835 instead of pthread_mutex_unlock.
11837 2002-12-06 Roland McGrath <roland@redhat.com>
11839 * allocatestack.c (__stack_user): Use uninitialized defn.
11840 * init.c (__pthread_initialize_minimal): Initialize it here.
11842 2002-12-05 Roland McGrath <roland@redhat.com>
11844 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11846 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11848 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11849 missing & here too.
11851 2002-12-05 Ulrich Drepper <drepper@redhat.com>
11853 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11855 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11856 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11857 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11858 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11859 for __libc_lock_* macros.
11860 * Makefile (routines): Add libc-lowlevellock.
11862 2002-10-09 Roland McGrath <roland@redhat.com>
11864 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11865 Under [__PIC__], call the function via the pointer fetched for
11866 comparison rather than a call by name that uses the PLT.
11867 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11868 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11869 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11870 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11871 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11873 2002-12-04 Roland McGrath <roland@redhat.com>
11875 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11877 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11878 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11880 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11882 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11884 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11885 a completely opaque, non-integer type.
11886 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11888 2002-12-05 Jakub Jelinek <jakub@redhat.com>
11890 * sysdeps/i386/tls.h: Include stdlib.h.
11891 * sysdeps/x86_64/tls.h: Likewise.
11893 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11895 * Makefile (tests): Add tst-locale2.
11896 (tests-static): Likewise.
11897 * tst-locale2.c: New file.
11899 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11900 volatile and add memory clobbers to lock operations.
11902 2002-12-03 Ulrich Drepper <drepper@redhat.com>
11904 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11905 * sysdeps/i386/i486/bits/atomic.h: New file.
11906 * sysdeps/i386/i586/bits/atomic.h: New file.
11907 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11908 include i486 version.
11909 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11910 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11911 Patch by Marijn Ros <marijn@mad.scientist.com>.
11913 * allocatestack.c (get_cached_stack): Don't crash if we first
11914 found a stack with a larger size then needed.
11915 Reported by Hui Huang <hui.huang@sun.com>.
11917 * Makefile (tests): Add tst-sysconf.
11918 * tst-sysconf.c: New file.
11920 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11921 PTHREAD_THREADS_MAX.
11923 2002-12-02 Roland McGrath <roland@redhat.com>
11925 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11926 Declare using hidden_proto instead of attribute_hidden, so there are
11927 non-.hidden static symbols for gdb to find.
11928 (__pthread_keys): Likewise.
11929 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11930 * allocatestack.c (__stack_user): Likewise.
11931 * pthread_create.c (__pthread_keys): Likewise.
11932 (__nptl_threads_events, __nptl_last_event): Make these static instead
11934 * pthread_key_create.c (__pthread_pthread_keys_max,
11935 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11937 2002-12-02 Ulrich Drepper <drepper@redhat.com>
11939 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11941 * tst-locale1.c: New file.
11943 * pthread_cond_timedwait.c: Include <stdlib.h>.
11945 * Makefile (tests): Add tst-fork2 and tst-fork3.
11946 * tst-fork2.c: New file.
11947 * tst-fork3.c: New file.
11949 2002-11-28 Ulrich Drepper <drepper@redhat.com>
11951 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11953 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11954 require it to 200112L.
11956 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11957 instruction only if HAVE_CMOV is defined.
11958 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11960 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11962 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11964 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11966 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11968 2002-11-27 Ulrich Drepper <drepper@redhat.com>
11970 * sysdeps/x86_64/bits/atomic.h: New file.
11972 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11975 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11976 possible since gettid cannot fail.
11978 * sysdeps/x86_64/pthreaddef.h: New file.
11980 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11982 * sysdeps/x86_64/pthread_spin_init.c: New file.
11983 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11984 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11985 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11987 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11988 Add missing lock prefix. Minute optimization.
11990 * tst-spin2.c (main): Also check successful trylock call.
11992 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11993 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11995 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11996 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11998 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11999 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12000 value in case of an error. Add support for INTERNAL_SYSCALL.
12002 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12003 value in case of an error.
12005 * sysdeps/x86_64/tls.h: New file.
12007 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12009 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
12010 takes the array member name and the index as parameters.
12011 (THREAD_SETMEM_NC): Likewise.
12012 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12013 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12016 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12017 to decide which code to use.
12018 (THREAD_SETMEM_NC): Likewise.
12020 * allocatestack.c (queue_stack): Don't remove stack from list here.
12021 Do it in the caller. Correct condition to prematurely terminate
12022 loop to free stacks.
12023 (__deallocate_stack): Remove stack from list here.
12025 2002-11-26 Ulrich Drepper <drepper@redhat.com>
12027 * Makefile (tests): Add tst-stack1.
12028 * tst-stack1.c: New file.
12030 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12033 * pthread_attr_getstack.c: Return bottom of the thread area.
12035 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12037 * Makefile (libpthread-routines): Add pt-allocrtsig and
12038 pthread_kill_other_threads.
12039 * pt-allocrtsig.c: New file.
12040 * pthread_kill_other_threads.c: New file.
12041 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12042 all three functions.
12043 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12045 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12046 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12047 and __libc_allocate_rtsig_private.
12048 * Versions (libpthread): Export pthread_kill_other_threads_np,
12049 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12051 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12053 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12054 the end of the stack. Adjust computations.
12055 When mprotect call fails dequeue stack and free it.
12056 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12058 * pthread_getattr_np.c: Likewise.
12060 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12063 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12065 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12066 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12068 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12070 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12071 * pthread_setspecific.c: Likewise.
12073 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12075 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12076 definitions. Get them from the official place.
12077 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12079 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12080 Use new CLONE_ flags in clone() calls.
12082 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12083 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12085 * Versions: Add pthread_* functions for libc.
12086 * forward.c: New file.
12088 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12090 * herrno.c: New file.
12093 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12094 sem_trywait, and sem_timedwait. Add herrno and res.
12095 * sem_init.c: Don't initialize lock and waiters members.
12096 * sem_open.c: Likewise.
12097 * sem_post.c: Removed.
12098 * sem_wait.c: Removed.
12099 * sem_trywait.c: Removed.
12100 * sem_timedwait.c: Removed.
12101 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12102 Includes full implementations of sem_post, sem_wait, sem_trywait,
12104 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12105 for new implementation.
12106 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12107 and waiters fields.
12109 * tst-sem3.c: Improve error message.
12110 * tst-signal3.c: Likewise.
12112 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12113 to tell the kernel about the termination futex and to initialize tid
12114 member. Don't initialize main_thread.
12115 * descr.h (struct pthread): Remove main_thread member.
12116 * cancelllation.c (__do_cancel): Remove code handling main thread.
12117 The main thread is not special anymore.
12119 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12120 size of the stacks to stack_cache_actsize.
12122 * pt-readv.c: Add missing "defined".
12123 * pt-sigwait.c: Likewise.
12124 * pt-writev.c: Likewise.
12126 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12128 * Versions: Export __connect from libpthread.
12129 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12131 * Makefile (libpthread-routines): Add pt-raise.
12132 * sysdeps/unix/sysv/linux/raise.c: New file.
12133 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12134 * sysdeps/generic/pt-raise.c: New file.
12136 * pthread_cond_init.c: Initialize all data elements of the condvar
12137 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12139 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12140 * pthread_create.c: Likewise.
12142 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12143 * tst-key1.c: New file.
12144 * tst-key2.c: New file.
12145 * tst-key3.c: New file.
12147 * Versions: Export pthread_detach for version GLIBC_2.0.
12148 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12150 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12152 * pthread_key_create.c: Terminate search after an unused key was found.
12153 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12155 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12156 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12158 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12160 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12161 dynamic lookup for errno in PIC.
12163 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12164 release the stack lock as soon as possible.
12165 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12166 the static TLS block.
12167 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12169 * cancellation.c: Renamed from cancelation.c.
12170 * Makefile: Adjust accordingly.
12171 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12172 * cleanup_defer.c: Use CANCELLATION_P.
12173 * pthread_testcancel.c: Likewise.
12174 * descr.h: Fix spelling in comments.
12175 * init.c: Likewise.
12176 * pthread_getattr_np.c: Likewise.
12177 * pthread_getschedparam.c: Likewise.
12178 * pthread_setschedparam.c: Likewise.
12179 * Versions: Likewise.
12181 * pt-pselect.c: New file.
12182 * Makefile (libpthread-routines): Add pt-pselect.
12183 * Versions: Add pselect.
12185 * tst-cancel4.c: New file.
12186 * Makefile (tests): Add tst-cancel4.
12188 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12190 * pthread_mutex_lock.c: Always record lock ownership.
12191 * pthread_mutex_timedlock.c: Likewise.
12192 * pthread_mutex_trylock.c: Likewise.
12194 * pt-readv.c: New file.
12195 * pt-writev.c: New file.
12196 * pt-creat.c: New file.
12197 * pt-msgrcv.c: New file.
12198 * pt-msgsnd.c: New file.
12199 * pt-poll.c: New file.
12200 * pt-select.c: New file.
12201 * pt-sigpause.c: New file.
12202 * pt-sigsuspend.c: New file.
12203 * pt-sigwait.c: New file.
12204 * pt-sigwaitinfo.c: New file.
12205 * pt-waitid.c: New file.
12206 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12207 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12208 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12209 * Versions: Add all the new functions.
12211 * tst-exit1.c: New file.
12212 * Makefile (tests): Add tst-exit1.
12214 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12216 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12218 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12220 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12221 call. pthread_join is an official cancellation point.
12222 * pthread_timedjoin.c: Likewise.
12224 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12225 and the condvar's mutex are retrieved.
12226 * pthread_cond_timedwait.c: Likewise.
12227 Reported by dice@saros.East.Sun.COM.
12229 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12231 * pthreadP.h: Cut out all type definitions and move them...
12232 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12233 * pthreadP.h: Include <internaltypes.h>.
12235 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12236 performance tweaks.
12238 * sem_trywait.c: Shuffle #includes around to get right order.
12239 * sem_timedwait.c: Likewise.
12240 * sem_post.c: Likewise.
12241 * sem_wait.c: Likewise.
12243 * nptl 0.3 released.
12245 * Makefile (tests): Add tst-signal3.
12246 * tst-signal3.c: New file.
12248 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12250 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12251 the asms modify the sem object.
12252 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12254 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12255 the actual members.
12256 * pthreadP.h (struct sem): New type. Actual semaphore type.
12257 * semaphoreP.h: Include pthreadP.h.
12258 * sem_getvalue.c: Adjust to sem_t change.
12259 * sem_init.c: Likewise.
12260 * sem_open.c: Likewise.
12261 * sem_post.c: Likewise.
12262 * sem_timedwait.c: Likewise.
12263 * sem_trywait.c: Likewise.
12264 * sem_wait.c: Likewise.
12266 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12268 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12269 * tst-basic2.c: New file.
12270 * tst-exec1.c: New file.
12271 * tst-exec2.c: New file.
12272 * tst-exec3.c: New file.
12274 * tst-fork1.c: Remove extra */.
12276 * nptl 0.2 released. The API for IA-32 is complete.