1 2012-08-15 Roland McGrath <roland@hack.frob.com>
3 2012-08-15 Roland McGrath <roland@hack.frob.com>
5 2012-08-15 Roland McGrath <roland@hack.frob.com>
7 * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
9 (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
10 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
12 2012-08-16 Joseph Myers <joseph@codesourcery.com>
14 * pthread_cond_timedwait.c (__pthread_cond_timedwait)
15 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
16 * pthread_condattr_setclock.c (pthread_condattr_setclock)
17 [!__ASSUME_POSIX_TIMERS]: Likewise.
18 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
19 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
20 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
21 [!__ASSUME_POSIX_TIMERS]: Likewise.
22 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
23 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
24 * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
26 [!__NR-timer_create]: Remove conditional code.
27 (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
28 * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
30 [!__NR_timer_delete]: Remove conditional code.
31 (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
32 * sysdeps/unix/sysv/linux/timer_getoverr.c
33 [__NR_timer_getoverrun]: Make code unconditional.
34 [!__NR_timer_getoverrun]: Remove conditional code.
35 (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
36 * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
37 Make code unconditional.
38 [!__NR_timer_gettime]: Remove conditional code.
39 (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
40 * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
41 Make code unconditional.
42 [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
43 * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
44 Make code unconditional.
45 [!__NR_timer_settime]: Remove conditional code.
46 (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
47 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
48 (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
51 2012-08-15 Tom de Vries <vries@codesourcery.com>
52 Maxim Kuvyrkov <maxim@codesourcery.com>
54 * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
55 (__libc_lock_trylock): Allow pre-existing definitions.
57 2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
59 * pthread_spin_lock.c: New file.
60 * pthread_spin_trylock.c: New file.
62 2012-08-08 Joseph Myers <joseph@codesourcery.com>
64 * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
66 (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
67 * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
69 (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
70 * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
71 Make code unconditional.
72 (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
73 * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
74 __NR_tgkill]: Make code unconditional.
75 (raise) [__ASSUME_TGKILL]: Likewise.
76 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
77 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
78 [__ASSUME_TGKILL]: Make code unconditional.
79 (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
80 * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
81 __NR_tgkill]: Make code unconditional.
82 (raise) [__ASSUME_TGKILL]: Likewise.
83 (raise) [!__ASSUME_TGKILL]: Remove conditional code.
85 2012-08-07 Joseph Myers <joseph@codesourcery.com>
87 * sysdeps/pthread/createthread.c (create_thread)
88 [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
90 2012-08-03 Joseph Myers <joseph@codesourcery.com>
92 * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
94 (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
96 2012-07-28 Siddhesh Poyarekar <siddhesh@redhat.com>
98 * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
99 (pagesize): New static variable.
100 (allocate_and_test): Return MEM. Rename parameter to TARGET.
101 (check_stack_top): New local variables MEM and PAGEMASK. Cap
102 stack size to MAX_STACK_SIZE. Call allocate_and_test for
103 halfway up the stack top page. Verify that the top page was
105 (do_test): Get pagesize using sysconf.
107 2012-07-25 Andreas Schwab <schwab@linux-m68k.org>
109 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
111 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
112 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
115 2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
117 * tst-pthread-getattr.c: Revert last change.
119 2012-07-20 Siddhesh Poyarekar <siddhesh@redhat.com>
121 * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
124 (allocate_and_test): Return STACKADDR. Access STACKADDR instead
126 (check_stack_top): Read valued written into STACKADDR in
127 allocate_and_test. Cap stack size to MAX_STACK_SIZE.
129 2012-07-19 Siddhesh Poyarekar <siddhesh@redhat.com>
131 * nptl-init.c (sighandler_setxid): Fix the comment that
134 2012-06-23 Thomas Schwinge <thomas@codesourcery.com>
136 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
137 (__lll_robust_timedlock_wait): Simplify CFI directives.
139 2012-06-20 Siddhesh Poyarekar <siddhesh@redhat.com>
142 * Makefile (tests): Add test case.
143 * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
144 the __libc_stack_end page from stacksize. Truncate stacksize to
145 make it page aligned when it is computed from RLIMIT_STACK.
146 * tst-pthread-getattr.c: New test case. Verify that stackaddr is
149 2012-06-07 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
152 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
155 2012-06-04 Siddhesh Poyarekar <siddhesh@redhat.com>
156 Jakub Jelinek <jakub@redhat.com>
159 * sysdeps/pthread/pthread.h
160 [!(defined __GNUC__ && defined __EXCEPTIONS)]
161 (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
162 __libc_unlikely instead of __builtin_expect.
164 2012-05-30 H.J. Lu <hongjiu.lu@intel.com>
167 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
168 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
169 * sysdeps/unix/sysv/linux/i386/Implies: New file.
170 * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
171 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
173 * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
174 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
176 * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
178 2012-05-30 Andreas Schwab <schwab@linux-m68k.org>
181 * nptl-init.c (pthread_functions): Remove use of INTUSE and
183 (__pthread_initialize_minimal_internal): Likewise.
184 * sem_open.c: Likewise.
185 * sem_unlink.c: Likewise.
186 * pthreadP.h: Replace _internal aliases by hidden_proto
188 * pthread_getspecific.c: Replace _internal alias by hidden_def.
189 * pthread_key_create.c: Likewise.
190 * pthread_mutex_destroy.c: Likewise.
191 * pthread_mutex_init.c: Likewise.
192 * pthread_mutex_lock.c: Likewise.
193 * pthread_mutex_unlock.c: Likewise.
194 * pthread_once.c: Likewise.
195 * pthread_rwlock_rdlock.c: Likewise.
196 * pthread_rwlock_unlock.c: Likewise.
197 * pthread_rwlock_wrlock.c: Likewise.
198 * pthread_setspecific.c: Likewise.
199 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
201 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
203 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
205 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
206 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
207 * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
208 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
209 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
210 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
211 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
212 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
213 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
214 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
216 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
218 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
221 2012-05-27 Chung-Lin Tang <cltang@codesourcery.com>
223 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
224 (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
226 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
227 (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
229 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
230 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
231 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
232 (pthread_barrier_wait): Likewise.
233 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
234 (__pthread_cond_broadcast): Likewise.
235 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
236 (__pthread_cond_signal): Likewise.
237 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
238 (__pthread_cond_timedwait): Likewise.
239 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
241 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
242 (__pthread_rwlock_rdlock): Likewise.
243 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
244 (pthread_rwlock_timedrdlock): Likewise.
245 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
246 (pthread_rwlock_timedwrlock): Likewise.
247 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
248 (__pthread_rwlock_unlock): Likewise.
249 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
250 (__pthread_rwlock_wrlock): Likewise.
251 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
252 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
253 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
255 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
257 2012-05-26 Siddhesh Poyarekar <siddhesh@redhat.com>
260 * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
261 __libc_stack_end rounded to the end of containing page as the
264 2012-05-25 Rayson Ho <rho@redhat.com>
266 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
268 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
269 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
270 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
271 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
273 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
274 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
275 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
277 2012-05-25 Rayson Ho <rho@redhat.com>
278 Roland McGrath <roland@hack.frob.com>
280 * DESIGN-systemtap-probes.txt: New file.
281 * pthread_cond_broadcast.c: SystemTap probes.
282 * pthread_cond_init.c: Likewise.
283 * pthread_cond_signal.c: Likewise.
284 * pthread_cond_wait.c: Likewise.
285 * pthread_cond_destroy.c: Likewise.
286 * pthread_create.c: Likewise.
287 * pthread_join.c: Likewise.
288 * pthread_mutex_destroy.c: Likewise.
289 * pthread_mutex_init.c: Likewise.
290 * pthread_mutex_lock.c: Likewise.
291 * pthread_mutex_timedlock.c: Likewise.
292 * pthread_mutex_unlock.c: Likewise.
293 * pthread_rwlock_destroy.c: Likewise.
294 * pthread_rwlock_rdlock.c: Likewise.
295 * pthread_rwlock_unlock.c: Likewise.
296 * pthread_rwlock_wrlock.c: Likewise.
297 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
298 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
299 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
300 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
301 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
302 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
303 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
304 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
306 2012-05-24 Roland McGrath <roland@hack.frob.com>
308 * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
310 2012-05-17 Andreas Jaeger <aj@suse.de>
312 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
313 (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
314 only for older kernels.
316 2012-05-15 Joseph Myers <joseph@codesourcery.com>
318 * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
321 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
323 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
324 futex pointer into RDI_LP. Use RSP_LP to operate on stack.
325 (lll_robust_lock): Likewise.
326 (lll_cond_lock): Likewise.
327 (lll_robust_cond_lock): Likewise.
328 (lll_timedlock): Likewise.
329 (lll_robust_timedlock): Likewise.
330 (lll_unlock): Likewise.
331 (lll_robust_unlock): Likewise.
333 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
335 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
336 LP_OP(cmp) and RCX_LP on dep_mutex pointer.
338 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
340 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
342 (__gcc_personality_v0): Replace 8-byte data alignment with
343 LP_SIZE alignment and .quad with ASM_ADDR.
345 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
347 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
349 (__gcc_personality_v0): Replace 8-byte data alignment with
350 LP_SIZE alignment and .quad with ASM_ADDR.
352 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
354 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
355 NWAITERS, which is unsigned long int.
357 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
359 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
360 (__gcc_personality_v0): Replace 8-byte data alignment with
361 LP_SIZE alignment and .quad with ASM_ADDR.
363 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
365 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
366 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
367 __vdso_clock_gettime pointer into RAX_LP.
368 (__gcc_personality_v0): Replace 8-byte data alignment with
369 LP_SIZE alignment and .quad with ASM_ADDR.
371 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
373 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
374 LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer. Load
375 __vdso_clock_gettime pointer into RAX_LP.
376 (__gcc_personality_v0): Replace 8-byte data alignment with
377 LP_SIZE alignment and .quad with ASM_ADDR.
379 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
381 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
382 LP_OP(cmp) and R8_LP on dep_mutex pointer.
384 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
386 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
387 to update pointer in memory. Load pointer into RDI_LP.
389 2012-05-15 H.J. Lu <hongjiu.lu@intel.com>
391 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
392 (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
394 (LLL_STUB_UNWIND_INFO_END): Likewise.
395 (lll_timedlock): Load timeout pointer into RDX_LP.
396 (lll_robust_timedlock): Likewise.
398 2012-05-15 Siddhesh Poyarekar <siddhesh@redhat.com>
399 Jakub Jelinek <jakub@redhat.com>
402 * Makefile (tests): Add test cases.
403 * descr.h (struct pthread): Add a comment describing multiple_threads.
404 * pthreadP.h (__pthread_multiple_threads): Expand comment to include
406 * pthread_cancel.c (pthread_cancel): Enable multiple_threads
407 before setting cancelstate of the thread.
408 * sysdeps/unix/sysv/linux/libc_multiple_threads.c
409 (__libc_multiple_threads): Add explanatory comment.
410 * tst-cancel-self-cancelstate.c: New test case.
411 * tst-cancel-self-canceltype.c: Likewise.
412 * tst-cancel-self-cleanup.c: Supporting file for test cases.
413 * tst-cancel-self-testcancel.c: New test case.
414 * tst-cancel-self.c: Likewise.
415 * vars.c: Expand comment to include single-process case.
417 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
419 * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
420 (tcbhead_t): Remove __x86_64__ check. Align rtld_savespace_sse
423 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
425 * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
427 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
428 __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
430 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
432 * shlib-versions: Move x86_64-.*-linux.* entry to ...
433 * sysdeps/x86_64/64/shlib-versions: Here. New file.
434 * sysdeps/x86_64/x32/shlib-versions: New file.
436 2012-05-14 H.J. Lu <hongjiu.lu@intel.com>
438 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
439 __SIZEOF_PTHREAD_XXX_T.
440 (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
441 (pthread_mutex_t): Likewise.
442 (pthread_rwlock_t): Likewise.
443 (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New. Defined if __x86_64__
446 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
448 * sysdeps/x86_64/x32/tls.h: New file.
450 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
452 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
454 (THREAD_SETMEM_NC): Likewise.
456 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
458 * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
461 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
463 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
464 (__cleanup_fct_attribute): Check __x86_64__ instead of
467 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
469 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
470 __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
471 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
472 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
473 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
475 2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
477 * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
478 instead of __WORDSIZE.
480 2012-05-10 Thomas Schwinge <thomas@schwinge.name>
483 * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
485 2012-05-09 Chung-Lin Tang <cltang@codesourcery.com>
487 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
488 (__pthread_cond_timedwait): Use CFI directives.
489 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
490 (__pthread_cond_wait): Likewise.
491 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
492 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
494 2012-05-03 David S. Miller <davem@davemloft.net>
496 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
497 always have to return 0, especially for the pthread_spin_init
499 * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
501 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
502 * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
504 2012-05-02 David S. Miller <davem@davemloft.net>
506 * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
507 * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
508 * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
509 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
510 * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
511 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
512 * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
513 * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
514 * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
515 * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
516 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
517 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
518 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
519 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
520 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
521 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
522 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
523 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
525 2012-05-02 Allan McRae <allan@archlinux.org>
527 * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
528 (LDFLAGS-tst-cancel24): Likewise.
530 2012-05-02 Paul Pluzhnikov <ppluzhnikov@google.com>
532 * sysdeps/i386/pthread_spin_lock.S: New.
533 * sysdeps/i386/pthread_spin_lock.c: Delete.
534 * sysdeps/x86_64/pthread_spin_lock.S: New.
535 * sysdeps/x86_64/pthread_spin_lock.c: Delete.
537 2012-04-28 Andreas Schwab <schwab@linux-m68k.org>
539 * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
540 run when cross-compiling.
542 2012-04-26 Siddhesh Poyarekar <siddhesh@redhat.com>
544 * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
545 instead of libgcc_s.h.
547 2012-04-20 Paul Pluzhnikov <ppluzhnikov@google.com>
549 * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
551 2012-03-27 David S. Miller <davem@davemloft.net>
553 * tst-cond16.c (do_test): Use a thread stack size which is either
554 PTHREAD_STACK_MIN or the page size, whichever is larger.
555 * tst-cond18.c (do_test): Likewise.
557 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
559 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
560 register char * __asm__("rsp") to get stack frame.
562 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
564 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
567 2012-03-19 H.J. Lu <hongjiu.lu@intel.com>
569 * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
572 2012-03-16 David S. Miller <davem@davemloft.net>
575 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
577 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
580 2012-03-15 David S. Miller <davem@davemloft.net>
583 * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
585 2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
588 * pt-crti.S: Replace FSF snail mail address with URL.
590 2012-03-09 Joseph Myers <joseph@codesourcery.com>
592 * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
593 Do not define before including <time.h>.
595 2012-03-08 David S. Miller <davem@davemloft.net>
597 * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
599 2012-03-08 Thomas Schwinge <thomas@codesourcery.com>
601 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
602 Check for timestamp before the Epoch.
604 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
607 * tst-sem13.c (do_test): Add another test case.
608 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
609 Fix updating nwaiters.
611 2012-03-07 Joseph Myers <joseph@codesourcery.com>
614 * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
615 link test to a compile test.
616 (libc_cv_c_cleanup): Likewise. Declare puts rather than including
618 * sysdeps/pthread/configure: Regenerated.
620 2012-03-07 Ulrich Drepper <drepper@gmail.com>
622 * Makefile (distribute): Remove variable.
624 2012-01-23 Thomas Schwinge <thomas@codesourcery.com>
626 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
627 superfluous assignment.
628 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
630 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
631 (sem_timedwait): Likewise.
633 2012-03-06 Ulrich Drepper <drepper@gmail.com>
635 * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
636 installed headers to...
637 * sysdeps/pthread/bits/libc-lockP.h: ...here. New file.
639 2012-03-06 David S. Miller <davem@davemloft.net>
641 * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
642 atomic_increment and remove unused local variable.
643 (__old_sem_post): Likewise.
645 2012-02-27 David S. Miller <davem@davemloft.net>
647 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
648 non-existing __pthread_attr.
649 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
650 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
651 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
652 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
653 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
655 2012-02-26 Ulrich Drepper <drepper@gmail.com>
657 * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
659 * sysdeps/pthread/pthread.h: Define __need_timespec before including
661 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
663 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
664 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
665 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
666 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
667 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
669 2012-02-21 Joseph Myers <joseph@codesourcery.com>
672 * Makefile (generated): Remove crti.S, crtn.S, defs.h and
674 [crti.S not in sysdirs] (omit-deps): Do not append.
675 [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
676 [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
677 [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
678 [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
679 [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
680 [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
681 [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
682 [crti.S in sysdirs] (extra-objs): Append unconditionally.
683 [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
685 * sysdeps/pthread/pt-initfini.c: Remove file.
687 2012-02-16 Richard Henderson <rth@twiddle.net>
689 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
690 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
692 2012-02-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
694 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
696 2012-02-16 David S. Miller <davem@davemloft.net>
698 * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
700 2012-02-15 Marek Polacek <polacek@redhat.com>
702 * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
704 2012-02-09 Paul Eggert <eggert@cs.ucla.edu>
706 Replace FSF snail mail address with URLs, as per GNU coding standards.
708 2012-02-08 Andreas Schwab <schwab@linux-m68k.org>
710 * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
712 2012-02-08 Joseph Myers <joseph@codesourcery.com>
714 Support crti.S and crtn.S provided directly by architectures.
715 * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
716 [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
717 [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
718 [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
719 [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
720 [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
721 [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
722 [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
723 [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
724 [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
725 * pt-crti.S: New file.
726 * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
728 2012-02-03 Joseph Myers <joseph@codesourcery.com>
730 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
731 macros for PIC register setup.
732 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
733 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
734 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
735 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
736 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
738 2012-01-11 Marek Polacek <polacek@redhat.com>
740 * forward.c (FORWARD_NORETURN): Define macro.
741 (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
742 (__pthread_exit): Likewise.
744 2012-01-10 Ulrich Drepper <drepper@gmail.com>
746 * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
748 * pthreadP.h: Add noreturn to __pthread_exit.
749 * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
751 2011-12-30 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
753 * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
754 Call pthread_attr_setstacksize() with result of
755 __pthread_get_minstack() to account for application TLS usage.
757 2012-01-08 Marek Polacek <polacek@redhat.com>
759 * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
761 2012-01-07 Ulrich Drepper <drepper@gmail.com>
764 * pthreadP.h: Use const instead of __const.
765 * semaphore.h: Likewise.
766 * sysdeps/pthread/bits/libc-lock.h: Likewise.
767 * sysdeps/pthread/bits/sigthread.h: Likewise.
768 * sysdeps/pthread/pthread.h: Likewise.
770 * Makefile: Remove elf=yes test, only ELF is supported.
772 * shlib-versions: Remove entries for ports architectures.
774 In case anyone cares, the IA-64 architecture could move to ports.
775 * sysdeps/ia64/*: Removed.
776 * sysdeps/unix/sysv/linux/ia64/*: Removed.
778 2011-12-22 Ulrich Drepper <drepper@gmail.com>
780 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
781 __pthread_get_minstack.
782 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
785 * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
786 through __pthread_get_minstack.
787 * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
788 directly from _rtld_global_ro.
789 (__pthread_get_minstack): New function.
790 * pthreadP.h: Declare __pthread_get_minstack.
791 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
793 2011-12-21 Ulrich Drepper <drepper@gmail.com>
796 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
797 Correct reading name from file.
799 2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
801 * allocatestack.c (allocate_stack): Return errno on failure.
803 2011-12-14 Jeff Law <law@redhat.com>
806 * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
808 2011-11-28 Andreas Schwab <schwab@redhat.com>
810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
811 EAGAIN from FUTEX_WAIT_REQUEUE_PI.
812 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
814 2011-11-15 Ulrich Drepper <drepper@gmail.com>
816 * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
819 2011-10-29 Ulrich Drepper <drepper@gmail.com>
822 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
823 (__pthread_cond_timedwait): Initialize %r15 correctly also for code
824 path for kernels with FUTEX_CLOCK_REALTIME.
825 Debugged by H.J. Lu <hjl.tools@gmail.com>.
827 2011-10-27 Andreas Schwab <schwab@redhat.com>
830 * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
831 for memory synchronization functions.
832 * semaphore.h: Likewise.
834 2011-10-24 Ulrich Drepper <drepper@gmail.com>
836 * tst-cancel7.c: Avoid warning.
837 * tst-mutex6.c: Likewise.
838 * tst-mutex9.c: Likewise.
839 * tst-mutexpi6.c: Likewise.
841 2011-10-23 Ulrich Drepper <drepper@gmail.com>
843 * sysdeps/i386/tls.h: Remove #include <list.h>.
845 2011-10-15 Ulrich Drepper <drepper@gmail.com>
847 * pthread_create.c (start_thread): Call __ctype_init.
849 2011-09-15 Andreas Schwab <schwab@redhat.com>
851 * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
853 (list_add): Add atomic_write_barrier.
854 * descr.h: Define __need_list_t before including <list.h>.
855 * nptl-init.c: Include <list.h>
856 * allocatestack.c: Likewise.
858 2011-09-11 Ulrich Drepper <drepper@gmail.com>
860 * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
861 * sysdeps/ia64/tls.h: Likewise.
862 * sysdeps/powerpc/tls.h: Likewise.
863 * sysdeps/s390/tls.h: Likewise.
864 * sysdeps/sh/tls.h: Likewise.
865 * sysdeps/sparc/tls.h: Likewise.
866 * sysdeps/x86_64/tls.h: Likewise.
868 2011-09-10 Ulrich Drepper <drepper@gmail.com>
870 * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
872 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
874 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
875 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
876 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
877 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
878 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
879 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
880 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
881 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
882 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
883 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
884 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
885 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
887 * tst-tls1.c: Support for __thread is now mandatory.
888 * tst-tls2.c: Likewise.
889 * tst-tls3.c: Likewise.
890 * tst-tls3mod.c: Likewise.
891 * tst-tls4.c: Likewise.
892 * tst-tls4moda.c: Likewise.
893 * tst-tls4modb.c: Likewise.
894 * tst-tls5.h: Likewise.
896 2011-09-08 Ulrich Drepper <drepper@gmail.com>
899 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
900 (pthread_rwlock_timedwrlock): Use correct macro in test.
901 Patch by H.J. Lu <hongjiu.lu@intel.com>.
903 2011-09-06 Ulrich Drepper <drepper@gmail.com>
905 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
906 use gettimeofday vsyscall, just call gettimeofday.
907 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
908 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
909 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
911 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
913 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
914 Simplify __vdso_clock_gettime use.
916 2011-09-05 David S. Miller <davem@davemloft.net>
918 * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
920 (sem_timedwait): Call it to force an exception region around
921 the async cancel enable and the futex operation.
922 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
923 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
924 * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
925 (__new_sem_wait): Call it to force an exception region around
926 the async cancel enable and the futex operation.
927 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
928 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
930 2011-08-31 Andreas Schwab <schwab@redhat.com>
932 * allocatestack.c (setxid_mark_thread): Ensure that the exiting
935 2011-08-20 David S. Miller <davem@davemloft.net>
937 * Makefile (tst-cleanup0.out): Fix typo in output redirection.
939 2011-08-14 Roland McGrath <roland@hack.frob.com>
941 * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
942 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
944 2011-08-08 Andreas Schwab <schwab@redhat.com>
946 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
948 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
949 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
951 2011-07-22 Ulrich Drepper <drepper@gmail.com>
953 * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
955 (__gcc_personality_v0): Likewise.
956 (_Unwind_ForcedUnwind): Likewise.
957 (_Unwind_GetCFA): Likewise.
959 2011-07-14 Roland McGrath <roland@hack.frob.com>
961 * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
964 2011-06-30 Ulrich Drepper <drepper@gmail.com>
966 * nptl-init.c (__nptl_set_robust): New function.
967 (pthread_functions): Add reference.
968 * npthreadP.h: Declare __nptl_set_robust.
969 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
970 ptr_set_robust member.
971 * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
972 child if threads are used.
974 2011-06-14 Andreas Jaeger <aj@suse.de>
976 * pthread_rwlock_init.c: Include <string.h> for memset declaration.
978 2011-05-11 Ulrich Drepper <drepper@gmail.com>
981 * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
983 2011-04-10 Ulrich Drepper <drepper@gmail.com>
986 * allocatestack.c (get_cached_stack): Deallocate DTV entries before
988 Patch partly by Robert Rex <robert.rex@exasol.com>.
990 2011-01-19 Roland McGrath <roland@redhat.com>
992 * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
993 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
994 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
995 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
996 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
997 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
999 2011-01-16 Andreas Schwab <schwab@linux-m68k.org>
1001 * Makefile (test-extras): Add tst-cleanup4aux.
1003 2011-01-14 Ulrich Drepper <drepper@gmail.com>
1006 * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1007 (__SETXID_2): Likewise.
1008 (__SETXID_3): Likewise.
1010 2011-01-13 Ulrich Drepper <drepper@gmail.com>
1013 * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1014 * alloca_cutoff.c: Add libc_hidden_def.
1016 2010-10-13 H.J. Lu <hongjiu.lu@intel.com>
1019 * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1020 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1021 of "struct pthread".
1023 2010-09-21 Andreas Schwab <schwab@redhat.com>
1025 * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1026 [!__EXCEPTIONS]: Mangle local variable not_first_call.
1027 (pthread_cleanup_push_defer_np): Likewise.
1029 2010-09-03 Ulrich Drepper <drepper@redhat.com>
1031 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1034 2010-08-10 Dinakar Guniguntala <dino@in.ibm.com>
1035 Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1037 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1038 FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1040 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
1042 * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1044 2010-05-01 Alan Modra <amodra@gmail.com>
1046 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1047 (PSEUDO): Use correct cr save. Don't use wrong parm save area
1048 to save temps. Correct cfi for possible later frame manipulation.
1049 (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1050 (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1051 (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1052 (DOCARGS_6, UNDOCARGS_6): Likewise.
1053 (CENABLE, CDISABLE): Add nops for non-shared calls.
1055 2010-07-06 Andreas Schwab <schwab@redhat.com>
1057 * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1060 2010-07-03 Ulrich Drepper <drepper@redhat.com>
1062 * tst-abstime.c (do_test): Some more cleanups
1064 2010-07-02 Ulrich Drepper <drepper@redhat.com>
1066 * tst-abstime.c: Correct testing and add test for sem_timedwait.
1068 2010-07-01 Andreas Schwab <schwab@redhat.com>
1069 Ulrich Drepper <drepper@redhat.com>
1071 * Makefile (tests): Add tst-abstime.
1072 * tst-abstime.c: New file.
1073 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1074 (__lll_timedlock_wait): Check for timestamp before the Epoch.
1075 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1076 (__lll_timedlock_wait): Likewise.
1077 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1078 (__lll_robust_timedlock_wait): Likewise.
1079 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1080 (__pthread_cond_timedwait): Likewise.
1081 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1082 (pthread_rwlock_timedrdlock): Likewise.
1083 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1084 (pthread_rwlock_timedwrlock): Likewise.
1085 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1088 2010-07-01 Ulrich Drepper <drepper@redhat.com>
1090 * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1092 2010-06-01 Takashi Yoshii <takashi.yoshii.zj@renesas.com>
1094 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1095 location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1097 2010-04-09 Ulrich Drepper <drepper@redhat.com>
1100 * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1101 * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1102 * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1104 * Makefile (libpthread-routines): Add pthread_getname and
1106 * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1108 2010-04-05 Thomas Schwinge <thomas@schwinge.name>
1110 * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1111 * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1112 * sysdeps/pthread/Makefile: Remove csu section and rt section's
1113 unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1115 2010-03-23 Luis Machado <luisgpm@br.ibm.com>
1117 * pthread_cond_timedwait.c: Add check for
1118 HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1119 (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1122 2010-03-09 Ulrich Drepper <drepper@redhat.com>
1124 * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1125 and the call fails wake eventually waiting setxid threads. Don't free
1126 stack here if we try starting a thread.
1127 * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1128 if the clone call failed.
1130 2010-03-08 Andreas Schwab <schwab@redhat.com>
1132 * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1133 * allocatestack.c (get_cached_stack): Set setxid_futex.
1134 (allocate_stack): Likewise.
1136 2010-03-05 Andreas Schwab <schwab@redhat.com>
1137 Ulrich Drepper <drepper@redhat.com>
1139 * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1140 it is creating a thread or it is just being created.
1141 * pthread_create.c (start_thread): Wake setxid thread if it is
1143 (__pthread_create_2_1): Initialize setxid_futex.
1144 * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1147 2010-01-15 Ulrich Drepper <drepper@redhat.com>
1149 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1151 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1153 2010-01-15 Michal Schmidt <mschmidt@redhat.com>
1155 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1156 Fix pthread_cond_timedwait with requeue-PI.
1157 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1158 Fix pthread_cond_wait with requeue-PI.
1160 2010-01-14 Ulrich Drepper <drepper@redhat.com>
1162 * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1163 and pthread_mutexattr_setrobust for GLIBC_2.12.
1164 * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1165 * pthread_mutexattr_getrobust.c: Define alias
1166 pthread_mutexattr_getrobust.
1167 * pthread_mutexattr_setrobust.c: Define alias
1168 pthread_mutexattr_setrobust.
1170 2010-01-12 Ulrich Drepper <drepper@redhat.com>
1172 * sysdeps/pthread/pthread.h: Cleanup. Fix up for XPG7.
1174 2010-01-08 Ulrich Drepper <drepper@redhat.com>
1176 * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1178 2009-12-18 Thomas Schwinge <thomas@codesourcery.com>
1180 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1181 call __gmon_start__.
1182 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1184 2009-12-17 Ulrich Drepper <drepper@redhat.com>
1186 * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1189 2009-12-01 Dinakar Guniguntala <dino@in.ibm.com>
1191 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1192 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1193 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1194 is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1195 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1197 is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1198 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1200 2009-12-12 Ulrich Drepper <drepper@redhat.com>
1202 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1203 Don't update nwaiters after invalid timeout is recognized.
1205 2009-11-27 Thomas Schwinge <thomas@codesourcery.com>
1207 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1210 2009-11-27 Andreas Schwab <schwab@redhat.com>
1212 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1213 THREAD_SELF->cancelhandling after returning from futex call.
1215 2009-11-24 Ulrich Drepper <drepper@redhat.com>
1217 * tst-sem13.c: New file.
1218 * Makefile (tests): Add tst-sem13.
1220 2009-11-22 Roland McGrath <roland@redhat.com>
1222 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1223 instead of recapitulating its contents.
1225 2009-11-18 Ulrich Drepper <drepper@redhat.com>
1227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1228 optimizations and cleanups.
1230 2009-11-18 Dinakar Guniguntala <dino@in.ibm.com>
1232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1233 Remove redundant code. Fix cfi offsets.
1234 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1237 2009-11-17 Ulrich Drepper <drepper@redhat.com>
1239 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1240 reduce size of unwind info.
1242 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1245 Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1247 2009-11-03 Andreas Schwab <schwab@linux-m68k.org>
1250 * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1252 * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1254 2009-10-30 Ulrich Drepper <drepper@redhat.com>
1256 * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1259 * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1260 steps to avoid races with creation and terminations.
1261 * nptl-init.c (sighandler_setxid): Adjust.
1262 Patch by Daniel Jacobowitz.
1264 2009-09-07 Andreas Schwab <schwab@redhat.com>
1266 * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1268 2009-09-02 Suzuki K P <suzuki@in.ibm.com>
1269 Joseph Myers <joseph@codesourcery.com>
1272 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1273 Initialize the sigev_notify field for newly created timer to make sure
1274 the timer gets deleted from the active timer's list upon timer_delete.
1276 2009-08-27 Andrew Stubbs <ams@codesourcery.com>
1278 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1279 Correct a logic error.
1281 2009-08-25 Ulrich Drepper <drepper@redhat.com>
1283 * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1284 of the field in local variables.
1285 (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1286 variable and don't unconditionally clear it.
1288 2009-08-24 Ulrich Drepper <drepper@redhat.com>
1290 * pthread_create.c (start_thread): Hint to the kernel that memory for
1291 the stack can be reused. We do not mark all the memory. The part
1292 still in use and some reserve are kept.
1294 2009-08-23 Ulrich Drepper <drepper@redhat.com>
1296 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1298 2009-08-11 Ulrich Drepper <drepper@redhat.com>
1300 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1303 2009-08-10 Ulrich Drepper <drepper@redhat.com>
1305 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1307 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1309 2009-08-10 Andreas Schwab <schwab@redhat.com>
1311 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1312 (__pthread_cond_signal): Don't clobber register used for syscall
1315 2009-08-08 Ulrich Drepper <drepper@redhat.com>
1317 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1318 Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1320 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1321 (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1324 2009-08-07 Ulrich Drepper <drepper@redhat.com>
1326 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1327 enabled by the special *_asynccancel functions.
1328 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1329 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1331 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1333 2009-08-04 Ulrich Drepper <drepper@redhat.com>
1335 * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1336 * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1337 * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1338 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1339 since we can assume the special __*_{en,dis}able_asynccancel
1341 (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1342 * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1343 and PTHREAD_CANCELED.
1345 2009-07-31 Ulrich Drepper <drepper@redhat.com>
1347 * descr.h: Better definition of *_BITMASK macros for cancellation.
1349 2009-07-29 Ulrich Drepper <drepper@redhat.com>
1351 * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1353 * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1354 dynamic linker might have to save.
1355 Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1356 RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL. Pretty
1359 * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1361 2009-07-28 Ulrich Drepper <drepper@redhat.com>
1363 * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1365 * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1366 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1367 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1368 requeue_pi for robust mutexes.
1369 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1370 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1371 Don't only skip __pthread_mutex_cond_lock. Call instead
1372 __pthread_mutex_cond_lock_adjust.
1373 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1375 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1376 optimization of PI mutex handling.
1378 2009-07-27 Ulrich Drepper <drepper@redhat.com>
1381 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1382 instead of of _acq variants of cmpxchg.
1384 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1386 * sysdeps/x86_64/configure.in: New file.
1388 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1389 path when not using absolute timeout futex.
1391 2009-07-20 Ulrich Drepper <drepper@redhat.com>
1393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1394 optimizations of last changes.
1395 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1397 2009-07-19 Ulrich Drepper <drepper@redhat.com>
1399 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1400 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1401 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1402 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1403 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1404 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1405 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1406 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1408 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1409 (__pthread_cond_timedwait): Make more robust.
1411 2009-07-18 Ulrich Drepper <drepper@redhat.com>
1413 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1414 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1415 directly use absolute timeout.
1417 * tst-sem5.c (do_test): Add test for premature timeout.
1418 * Makefile: Linu tst-sem5 with librt.
1420 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1421 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1422 directly use absolute timeout.
1423 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1424 (pthread_rwlock_timedrdlock): Likewise.
1426 * tst-cond11.c (run_test): Add test to check that the timeout is
1429 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1430 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1431 directly use absolute timeout.
1433 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1434 (__pthread_cond_wait): Convert to using exception handler instead of
1435 registered unwind buffer.
1436 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1437 (__pthread_cond_timedwait): Likewise.
1439 2009-07-17 Ulrich Drepper <drepper@redhat.com>
1441 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1442 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1443 use absolute timeout.
1445 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1446 handling of uncontested semaphore.
1448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1449 (__condvar_cleanup): Rewrite to use cfi directives instead of
1450 hand-coded unwind tables.
1451 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1453 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1454 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1457 2009-06-12 Ulrich Drepper <drepper@redhat.com>
1459 * Makefile (libpthread-routines): Add pthread_sigqueue.
1460 * Versions: Add pthread_sigqueue for GLIBC_2.11.
1461 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1462 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1464 2009-06-11 Ulrich Drepper <drepper@redhat.com>
1467 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1468 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1470 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1472 2009-05-16 Ulrich Drepper <drepper@redhat.com>
1474 * libc-cancellation.c: Move __libc_cleanup_routine to...
1475 * libc-cleanup.c: ...here. New file.
1476 * Makefile (routines): Add libc-cleanup.
1478 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1480 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1481 * sysdeps/pthread/librt-cancellation.c: Likewise.
1484 * nptl-init.c: Renamed from init.c.
1485 * Makefile: Change all occurences of init.c to nptl-init.c.
1487 2009-05-15 Ulrich Drepper <drepper@redhat.com>
1489 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1490 to test when deciding on the delay.
1491 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1492 * pthread_cancel.c: Close race between deciding on sending a signal
1493 and setting the CANCELING_BIT bit.
1495 * cancellation.c (__pthread_disable_asynccancel): Don't return if
1497 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1499 2009-04-27 Ulrich Drepper <drepper@redhat.com>
1501 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1503 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1504 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1505 * sysdeps/i386/tls.h: Likewise.
1506 (tcbhead_t): Add __private_tm member.
1508 2009-04-26 Ulrich Drepper <drepper@redhat.com>
1510 * sem_open.c (sem_open): Rewrite initialization of initsem to
1513 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1514 Avoid warning by using may_alias attribute on ptrhack.
1516 2009-04-22 Ulrich Drepper <drepper@redhat.com>
1519 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1520 Check policy and priority for validity.
1521 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1523 2009-03-15 Ulrich Drepper <drepper@redhat.com>
1525 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1526 (__pthread_cond_timedwait): Change to use cfi directives instead of
1527 hand-coded unwind sections.
1529 2009-03-10 Ulrich Drepper <drepper@redhat.com>
1531 * init.c (nptl_freeres): Compile only for SHARED.
1533 2009-03-09 Jakub Jelinek <jakub@redhat.com>
1535 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1536 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1537 FUTEX_BITSET_MATCH_ANY.
1539 2009-02-27 Roland McGrath <roland@redhat.com>
1541 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1542 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1544 2009-02-26 Ulrich Drepper <drepper@redhat.com>
1546 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1547 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1548 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
1551 2009-02-25 Ulrich Drepper <drepper@redhat.com>
1553 * sysdeps/pthread/pthread.h: The robust mutex functions are in
1556 2009-02-24 Ulrich Drepper <drepper@redhat.com>
1558 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1559 Unify name of include protector macro.
1561 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
1563 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1564 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1566 2009-01-29 Ulrich Drepper <drepper@redhat.com>
1568 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1571 * allocatestack.c (__free_stacks): Renamed from free_stacks.
1572 (__free_stack_cache): Removed. Change callers to call __free_stacks.
1573 * init.c (nptl_freeres): New function.
1574 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1575 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
1576 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1578 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1579 load DSO. Assign last.
1580 (__unwind_freeres): New function.
1582 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1583 for better debugging. No need to use stack_list_add here.
1585 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1587 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1588 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1589 instead of computing relative timeout.
1590 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1591 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1593 2009-01-25 Ulrich Drepper <drepper@redhat.com>
1595 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1597 2009-01-08 Ulrich Drepper <drepper@redhat.com>
1599 * sysdeps/pthread/list.h (list_add): Initialize new element first.
1600 (list_add_tail): Removed.
1602 2009-01-07 Ulrich Drepper <drepper@redhat.com>
1604 * (in_flight_stack): New variable.
1605 (stack_list_del): New function. Use instead of list_del.
1606 (stack_list_add): New function. Use instead of list_add when adding to
1607 stack_cache and stack_used lists.
1608 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1609 when the fork call interrupted another thread.
1611 2009-01-04 Ulrich Drepper <drepper@redhat.com>
1613 * init.c (__pthread_initialize_minimal_internal): Optimize test
1614 FUTEX_CLOCK_REALTIME a bit.
1616 2009-01-03 Ulrich Drepper <drepper@redhat.com>
1618 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1619 only passing five parameters to FUTEX_WAIT_BITSET call.
1621 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1622 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1623 instead of computing relative timeout.
1625 2009-01-02 Ulrich Drepper <drepper@redhat.com>
1627 * init.c (__pthread_initialize_minimal_internal): Check for
1628 FUTEX_CLOCK_REALTIME flag.
1629 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1630 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1633 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1634 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1635 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1636 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1637 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1638 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1640 2008-12-09 Ulrich Drepper <drepper@redhat.com>
1642 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1643 loop body instead of ; to avoid gcc warnings.
1644 (pthread_cleanup_pop_restore_np): Likewise.
1645 Patch by Caolán McNamara <caolanm@redhat.com>.
1647 2008-12-09 Jakub Jelinek <jakub@redhat.com>
1649 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1650 fast path here, for robust/PI/PP mutexes call
1651 __pthread_mutex_lock_full. Don't use switch, instead use a series
1652 of ifs according to their probability.
1653 (__pthread_mutex_lock_full): New function.
1654 * pthread_mutex_unlock.c: Include assert.h.
1655 (__pthread_mutex_unlock_usercnt): Handle only the
1656 fast path here, for robust/PI/PP mutexes call
1657 __pthread_mutex_unlock_full. Don't use switch, instead use a series
1658 of ifs according to their probability.
1659 (__pthread_mutex_unlock_full): New function.
1660 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1661 (__pthread_mutex_lock_full): Define.
1663 2008-12-08 Ulrich Drepper <drepper@redhat.com>
1665 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1666 implementation. Add necessary padding and.
1667 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
1670 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1672 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
1673 and FUTEX_WAKE_BITSET.
1675 2008-12-02 Ulrich Drepper <drepper@redhat.com>
1677 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
1678 and FUTEX_WAKE_BITSET.
1679 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1680 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1681 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1682 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1684 2008-11-25 Roland McGrath <roland@redhat.com>
1686 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
1687 Subdirectories moved to ports repository as
1688 sysdeps/.../nptl subdirectories.
1690 2008-11-12 Jakub Jelinek <jakub@redhat.com>
1693 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
1695 * pthread_cond_init.c (__pthread_cond_init): Fix
1696 cond->__data.__nwaiters initialization.
1697 * Makefile (tests): Add tst-cond23.
1698 * tst-cond23.c: New test.
1700 2008-11-07 Jakub Jelinek <jakub@redhat.com>
1702 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
1704 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
1707 2008-11-01 Ulrich Drepper <drepper@redhat.com>
1710 * pthread_mutex_lock.c: Add support for private PI mutexes.
1711 * pthread_mutex_timedlock.c: Likewise.
1712 * pthread_mutex_trylock.c: Likewise.
1713 * pthread_mutex_unlock.c: Likewise.
1714 Patch mostly by Ben Jackson <ben@ben.com>.
1716 2008-10-31 Ulrich Drepper <drepper@redhat.com>
1719 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
1720 Increase stack size for helper thread.
1722 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
1724 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
1725 assembly with a clobber list for access registers a0 and a1.
1727 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1729 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
1730 to force runp->refcntr to be read from memory.
1732 2008-09-08 Richard Guenther <rguenther@suse.de>
1734 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
1735 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1736 lll_timedlock, lll_robust_timedlock, lll_unlock,
1737 lll_robust_unlock): Promote private to int.
1739 2008-08-15 Ulrich Drepper <drepper@redhat.com>
1741 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1742 ARCH_RETRY_MMAP definitions.
1743 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1744 Define MAP_STACK when not defined.
1745 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
1746 handling of ARCH_RETRY_MMAP.
1748 2008-07-30 Ulrich Drepper <drepper@redhat.com>
1750 * tst-align2.c (f): Print message that f is reached.
1752 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
1755 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1756 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1758 2008-07-25 Ulrich Drepper <drepper@redhat.com>
1760 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1761 SOCK_CLOEXEC if possible.
1763 2008-05-29 Ulrich Drepper <drepper@redhat.com>
1765 * Makefile (tests): Add tst-rwlock2a.
1766 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1767 * tst-rwlock2a.c: New file.
1769 2008-06-12 Ulrich Drepper <drepper@redhat.com>
1771 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1773 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
1775 * sysdeps/pthread/pthread.h: Fix typo in comment.
1777 2008-05-28 Ulrich Drepper <drepper@redhat.com>
1779 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1780 of CPU set to the kernel.
1782 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
1784 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1786 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1787 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1788 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1789 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1790 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1791 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1793 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
1795 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1797 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1799 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1801 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1804 2008-05-26 Ulrich Drepper <drepper@redhat.com>
1806 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1808 2008-05-20 Jakub Jelinek <jakub@redhat.com>
1810 David S. Miller <davem@davemloft.net>
1812 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1814 2008-05-10 Ulrich Drepper <drepper@redhat.com>
1816 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1817 __pshared correctly.
1818 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1820 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1822 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1824 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1826 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1828 2008-04-14 David S. Miller <davem@davemloft.net>
1830 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1831 (__old_sem_wait): Fix argument to lll_futex_wait().
1833 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
1835 * pthread_create.c: Require pthread_mutex_trylock and
1836 pthread_key_delete for libgcc.
1838 2008-04-08 Jakub Jelinek <jakub@redhat.com>
1841 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1842 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1843 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1845 2008-03-27 Ulrich Drepper <drepper@redhat.com>
1847 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1848 <linux/limits.h> has defined it.
1849 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1850 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1851 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1852 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1854 2008-03-18 Jakub Jelinek <jakub@redhat.com>
1856 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1858 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1859 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1861 2008-03-14 Ulrich Drepper <drepper@redhat.com>
1863 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1864 HAVE_DL_DISCOVER_OSVERSION.
1865 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1866 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1868 2008-03-07 Ulrich Drepper <drepper@redhat.com>
1871 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1872 _POSIX_CHOWN_RESTRICTED value to zero.
1874 2008-01-31 Roland McGrath <roland@redhat.com>
1876 * Makefile (omit-deps): Variable removed.
1878 2008-01-30 Ulrich Drepper <drepper@redhat.com>
1880 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1881 unnecessary addr32 prefix.
1883 2008-01-29 Roland McGrath <roland@redhat.com>
1885 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1887 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1889 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1891 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1893 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1895 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1896 (__lll_lock_wait_private): Fix typo.
1897 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1898 (pthread_barrier_wait): Likewise. Adjust XADD use.
1899 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1901 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1902 (pthread_rwlock_timedrdlock): Return correct return value.
1903 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1904 (pthread_rwlock_timedwrlock): Likewise.
1906 2008-01-15 Ulrich Drepper <drepper@redhat.com>
1908 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1909 thread returns the program exits with an error code.
1911 2008-01-10 Ulrich Drepper <drepper@redhat.com>
1913 * pthread-errnos.sym: Add EOVERFLOW.
1914 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1915 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1916 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1917 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1919 2007-12-14 Ulrich Drepper <drepper@redhat.com>
1921 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1922 parameter. Passed it as permission to mmap.
1923 * allocatestack.c (allocate_stack): Pass prot as second parameter
1926 2007-12-12 Ulrich Drepper <drepper@redhat.com>
1928 * tst-basic7.c: Allocate memory for the stack.
1931 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1932 (__pthread_cond_timedwait): Don't use VDSO.
1933 Patch by Michal Januszewski.
1935 2007-12-07 Ulrich Drepper <drepper@redhat.com>
1938 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1939 Allow label before pthread_cleanup_pop.
1940 (pthread_cleanup_pop_restore_np): Likewise.
1942 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1944 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1945 Store 2 before returning ETIMEDOUT.
1947 2007-11-23 Ulrich Drepper <drepper@redhat.com>
1949 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1950 Store 2 before returning ETIMEDOUT.
1951 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1952 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1953 (__lll_lock_wait_private): Optimize.
1954 (__lll_lock_wait): Likewise.
1956 2007-11-20 Jakub Jelinek <jakub@redhat.com>
1958 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1959 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1960 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1962 2007-11-08 Ulrich Drepper <drepper@redhat.com>
1965 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1966 If we time out, try one last time to lock the futex to avoid
1967 losing a wakeup signal.
1968 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1969 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1972 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1975 2007-11-07 Ulrich Drepper <drepper@redhat.com>
1978 * allocatestack.c (allocate_stack): Change ENOMEM error in case
1979 mmap failed to EAGAIN.
1980 * Makefile (tests): Add tst-basic7.
1981 * tst-basic7.c: New file.
1983 2007-11-05 Ulrich Drepper <drepper@redhat.com>
1985 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1986 Use __linkin_atfork.
1988 2007-11-03 Mike Frysinger <vapier@gentoo.org>
1990 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1991 missing line continuations.
1992 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1993 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
1995 2007-10-28 Ulrich Drepper <drepper@redhat.com>
1998 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1999 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2000 (struct timer): Add next element.
2001 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2002 enqueue timer structure into __active_timer_sigev_thread list.
2003 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2004 remove timer struct from __active_timer_sigev_thread.
2005 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2006 Before using timer structure make sure it is still on the
2007 __active_timer_sigev_thread list. Keep lock until done.
2008 Define __active_timer_sigev_thread and
2009 __active_timer_sigev_thread_lock.
2011 2007-10-27 Ulrich Drepper <drepper@redhat.com>
2013 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2014 Redefine thread_atfork for use of ATFORK_MEM.
2015 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2016 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2018 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2019 Use atomic operation when removing first element of list.
2021 2007-10-17 Jakub Jelinek <jakub@redhat.com>
2023 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2024 routine instead of an alias to __new_sem_post.
2026 2007-10-15 Jakub Jelinek <jakub@redhat.com>
2028 * init.c (__pthread_initialize_minimal): Initialize word to appease
2031 2007-10-10 Jakub Jelinek <jakub@redhat.com>
2033 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2034 libc.so just clear NAME.
2035 (__libc_rwlock_fini): Nop inside of libc.so.
2036 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2039 2007-09-02 Ulrich Drepper <drepper@redhat.com>
2041 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2042 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2044 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2046 2007-08-21 Ulrich Drepper <drepper@redhat.com>
2049 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2050 reclaimed stack if necessary.
2051 * Makefile (tests): Add tst-tsd6.
2052 * tst-tsd6.c: New file.
2054 2007-08-21 Jakub Jelinek <jakub@redhat.com>
2056 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2057 Add private argument.
2059 2007-08-20 Ulrich Drepper <drepper@redhat.com>
2061 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2062 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2064 2007-08-16 Jakub Jelinek <jakub@redhat.com>
2066 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2067 (__lll_robust_timedlock): Pass private as last argument to
2068 __lll_robust_timedlock_wait.
2069 (__lll_unlock): Fix a pasto.
2071 2007-08-15 Jakub Jelinek <jakub@redhat.com>
2073 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2074 sparc_old_sem): New structs.
2075 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2076 (__sem_wait_cleanup): New function.
2077 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
2078 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2079 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2081 (__old_sem_wait): New function.
2082 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2083 nptl/sysdeps/unix/sysv/linux/sparc version.
2084 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2086 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2087 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2088 (__new_sem_trywait): Use sparc_old_sem structure.
2089 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2090 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
2091 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
2092 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2093 lll_futex_timed_wait.
2094 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2095 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
2096 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2098 (__old_sem_post): New function.
2099 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2100 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2101 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2102 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2103 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2104 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2106 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2108 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2109 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2110 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2111 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2112 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2113 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2114 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2116 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2117 kernel-features.h and tcb-offsets.h.
2118 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2119 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2121 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2123 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2124 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2126 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2127 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2128 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2129 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2130 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2131 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2132 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2134 2007-08-14 Jakub Jelinek <jakub@redhat.com>
2136 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2137 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2138 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2139 lll_futex_timed_wait.
2141 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2142 __lll_robust_unlock): Rewrite as macros instead of inline functions.
2143 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2144 __lll_robust_unlock, __lll_wait_tid): Likewise.
2146 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2148 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2150 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2151 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2152 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2153 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2154 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2155 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2156 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2157 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2159 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2160 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2161 process private. Switch DW_CFA_advance_loc1 and some
2162 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2163 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2164 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2165 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2166 process private. Switch DW_CFA_advance_loc{1,2} and some
2167 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2168 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2169 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2170 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2172 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2173 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2174 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2176 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2177 (__pthread_cond_broadcast): Compare %r8 instead of
2178 dep_mutex-cond_*(%rdi) with $-1.
2179 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2180 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2183 2007-08-13 Ulrich Drepper <drepper@redhat.com>
2185 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2187 2007-08-13 Jakub Jelinek <jakub@redhat.com>
2189 * allocatestack.c: Include kernel-features.h.
2190 * pthread_create.c: Likewise.
2191 * pthread_mutex_init.c: Likewise.
2193 * pthread_cond_timedwait.c: Likewise.
2194 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2195 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2196 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2197 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2198 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2200 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2202 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2204 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2205 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2206 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2207 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2209 2007-08-12 Jakub Jelinek <jakub@redhat.com>
2211 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2212 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2213 byte elements. One of them is the new __shared element.
2214 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2215 adjust names of other padding elements.
2216 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2217 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2218 byte elements. One of them is the new __shared element.
2219 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2220 adjust names of other padding elements.
2221 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2222 Renamed __pad1 element to __shared, adjust names of other padding
2224 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2225 (pthread_rwlock_t): Likewise.
2226 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2229 2007-08-09 Anton Blanchard <anton@samba.org>
2231 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2233 2007-08-12 Ulrich Drepper <drepper@redhat.com>
2235 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2236 <kernel-features.h>.
2237 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2239 2007-08-11 Ulrich Drepper <drepper@redhat.com>
2241 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2242 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2243 dealing with robust mutexes.
2244 * pthread_mutex_timedlock.c: Likewise.
2245 * pthread_mutex_trylock.c: Likewise.
2246 * pthread_mutex_unlock.c: Likewise.
2247 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2249 2007-08-06 Jakub Jelinek <jakub@redhat.com>
2251 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2252 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2253 (PTHREAD_MUTEX_PSHARED): Define.
2254 * pthread_mutex_init.c (__pthread_mutex_init): Set
2255 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2257 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2258 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2259 as second argument to lll_lock.
2260 (LLL_MUTEX_TRYLOCK): Take mutex as argument
2261 instead of its __data.__lock field.
2262 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2263 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2265 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2266 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2267 instead of mutex->__data.__kind directly, pass
2268 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2269 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2270 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2271 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2272 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2273 to lll_timedlock, lll_robust_timedlock, lll_unlock and
2274 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
2275 of mutex->__data.__kind directly.
2276 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2277 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2278 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
2279 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2280 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2281 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2283 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2284 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2285 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2287 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2288 Take mutex as argument instead of its __data.__lock field, pass
2289 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2290 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2291 __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
2294 to lll_robust_cond_lock.
2295 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2296 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2297 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
2298 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2299 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2300 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2302 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2303 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2305 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2306 pshared variable, pass it to lll_lock, lll_unlock,
2307 lll_futex_timedwait and lll_futex_wake.
2308 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2309 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2311 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2312 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2314 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2315 lll_futex_wake_unlock): Likewise.
2316 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2318 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2319 lll_futex_wake_unlock): Likewise.
2320 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2322 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2323 lll_futex_wake_unlock): Likewise.
2324 (lll_futex_wake): Fix a typo.
2325 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2326 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2327 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2328 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2329 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2330 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2331 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2332 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2333 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2334 (__pthread_cond_timedwait): Likewise.
2335 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2336 (__condvar_cleanup, __pthread_cond_wait): Likewise.
2338 2007-08-05 Jakub Jelinek <jakub@redhat.com>
2340 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2341 Don't use CGOTSETUP and CGOTRESTORE macros.
2342 (CGOTSETUP, CGOTRESTORE): Remove.
2343 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2346 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2348 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2349 definitions for private futexes.
2350 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2351 kernel-features.h and lowlevellock.h. Use private futexes if
2353 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2354 (__lll_mutex_lock_wait): Rename to
2355 (__lll_lock_wait): ... this. Don't compile in for libc.so.
2356 (__lll_mutex_timedlock_wait): Rename to ...
2357 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
2358 Don't compile in for libc.so.
2359 (__lll_mutex_unlock_wake): Rename to ...
2360 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
2361 (__lll_timedwait_tid): Use __NR_gettimeofday.
2362 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2363 the header from assembler. Renamed all lll_mutex_* resp.
2364 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2365 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2366 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2368 (__lll_lock_wait_private): Add prototype.
2369 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2370 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2371 __lll_unlock_wake): Likewise.
2372 (lll_lock): Add private argument. Call __lll_lock_wait_private
2373 if private is constant LLL_PRIVATE.
2374 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2375 lll_timedlock, lll_robust_timedlock): Add private argument.
2376 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
2377 if private is constant LLL_PRIVATE.
2378 (lll_robust_unlock, lll_robust_dead): Add private argument.
2379 (lll_lock_t): Remove.
2380 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2381 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2382 lll_cond_wake, lll_cond_broadcast): Remove.
2383 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2384 kernel-features.h and lowlevellock.h.
2385 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2386 (LOAD_FUTEX_WAIT): Define.
2387 (__lll_robust_mutex_lock_wait): Rename to ...
2388 (__lll_robust_lock_wait): ... this. Add private argument.
2389 Use LOAD_FUTEX_WAIT macro.
2390 (__lll_robust_mutex_timedlock_wait): Rename to ...
2391 (__lll_robust_timedlock_wait): ... this. Add private argument.
2392 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
2393 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2395 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2396 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2397 __lll_mutex_{lock,unlock}_*.
2398 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2399 lowlevellock.h and pthread-errnos.h.
2400 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2401 FUTEX_CMP_REQUEUE, EINVAL): Remove.
2402 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2403 __lll_mutex_{lock,unlock}_*.
2404 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2405 lowlevellock.h and pthread-errnos.h.
2406 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2407 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2408 __lll_mutex_{lock,unlock}_*.
2409 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2411 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2412 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2413 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2414 (__condvar_tw_cleanup): Likewise.
2415 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2417 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2418 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2419 __lll_mutex_{lock,unlock}_*.
2420 ( __condvar_w_cleanup): Likewise.
2421 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2422 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2423 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2425 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2426 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2427 __lll_mutex_{lock,unlock}_*.
2428 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2430 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2431 FUTEX_PRIVATE_FLAG): Remove.
2432 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2433 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2434 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2436 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2437 FUTEX_PRIVATE_FLAG): Remove.
2438 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2439 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
2440 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2442 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2443 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2444 __lll_mutex_{lock,unlock}_*.
2445 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2447 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2448 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2449 __lll_mutex_{lock,unlock}_*.
2450 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2451 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2452 (__new_sem_post): Use standard initial exec code sequences.
2453 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2455 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2456 FUTEX_PRIVATE_FLAG): Remove.
2457 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
2458 exec code sequences.
2459 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2460 (__new_sem_trywait): Use standard initial exec code sequences.
2461 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2462 (__new_sem_wait): Use standard initial exec code sequences.
2464 2007-07-31 Anton Blanchard <anton@samba.org>
2466 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2467 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2468 atomic_full_barrier.
2470 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2472 * allocatestack.c (stack_cache_lock): Change type to int.
2473 (get_cached_stack, allocate_stack, __deallocate_stack,
2474 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2475 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2476 as second argument to lll_lock and lll_unlock macros on
2478 * pthread_create.c (__find_in_stack_list): Likewise.
2479 (start_thread): Similarly with pd->lock. Use lll_robust_dead
2480 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2482 * descr.h (struct pthread): Change lock and setxid_futex field
2484 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2485 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2486 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2487 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2489 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2490 * pthread_cond_init.c (__pthread_cond_init): Likewise.
2491 * pthreadP.h (__attr_list_lock): Change type to int.
2492 * pthread_attr_init.c (__attr_list_lock): Likewise.
2493 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2494 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2496 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2497 also for lll_futex_{wake,wait}.
2498 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2500 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2501 LLL_SHARED as second argument to lll_{,un}lock.
2502 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2503 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2504 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2505 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2507 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2508 as second argument to lll_{,un}lock macros on pd->lock.
2509 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2510 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2511 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2512 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2514 * sysdeps/pthread/createthread.c (do_clone, create_thread):
2516 * pthread_once.c (once_lock): Change type to int.
2517 (__pthread_once): Pass LLL_PRIVATE as second argument to
2518 lll_{,un}lock macros on once_lock.
2519 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2520 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2521 rwlock->__data.__shared as second argument to them and similarly
2523 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2525 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2527 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2528 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2529 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2530 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2531 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2532 to lll_{,un}lock macros on __sem_mappings_lock.
2533 * sem_open.c (check_add_mapping): Likewise.
2534 (__sem_mappings_lock): Change type to int.
2535 * semaphoreP.h (__sem_mappings_lock): Likewise.
2536 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2537 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2538 instead of lll_*mutex_*, pass LLL_SHARED as last
2540 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2541 pass LLL_SHARED as last argument.
2542 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2543 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2544 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2545 pass LLL_SHARED as last argument.
2546 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2547 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2548 LLL_SHARED as last argument.
2549 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2550 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2552 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2553 __libc_lock_lock_recursive, __libc_lock_unlock,
2554 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2555 argument to lll_{,un}lock.
2556 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2557 _IO_lock_unlock): Likewise.
2558 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2560 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2561 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2563 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2564 free_mem): Likewise.
2565 (__fork_lock): Change type to int.
2566 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2567 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2568 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2570 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2571 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2572 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2574 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2575 pass it through to lll_futex_*wait, only compile in when
2577 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2578 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2579 argument and pass it through to lll_futex_*wait.
2580 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2581 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2582 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2583 inline functions to __lll_* resp. __lll_robust_*.
2584 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2585 (lll_mutex_dead): Add private argument.
2586 (__lll_lock_wait_private): New prototype.
2587 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2588 __lll_robust_lock_timedwait): Add private argument to prototypes.
2589 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2590 call __lll_lock_wait_private, otherwise pass private to
2592 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2593 __lll_robust_timedlock): Add private argument, pass it to
2594 __lll_*wait functions.
2595 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2596 call __lll_unlock_wake_private, otherwise pass private to
2598 (__lll_robust_unlock): Add private argument, pass it to
2599 __lll_robust_unlock_wake.
2600 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2601 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2602 argument, pass it through to __lll_* inline function.
2603 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2604 (lll_lock_t): Remove.
2605 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2606 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2607 lll_cond_wake, lll_cond_broadcast): Remove.
2608 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2609 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2610 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2611 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2612 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2613 the header from assembler. Renamed all lll_mutex_* resp.
2614 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2615 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2616 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2617 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2618 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2619 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2620 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2622 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2623 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2624 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2625 (lll_trylock): Likewise, use __lll_trylock_asm, pass
2626 MULTIPLE_THREADS_OFFSET as another asm operand.
2627 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2628 MULTIPLE_THREADS_OFFSET as last asm operand, call
2629 __lll_lock_wait_private if private is constant LLL_PRIVATE,
2630 otherwise pass private as another argument to __lll_lock_wait.
2631 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2632 lll_timedlock, lll_robust_timedlock): Add private argument, pass
2633 private as another argument to __lll_*lock_wait call.
2634 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2635 MULTIPLE_THREADS_OFFSET as another asm operand, call
2636 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2637 otherwise pass private as another argument to __lll_unlock_wake.
2638 (lll_robust_unlock): Add private argument, pass private as another
2639 argument to __lll_unlock_wake.
2640 (lll_robust_dead): Add private argument, use __lll_private_flag
2642 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2643 LLL_MUTEX_LOCK_INITIALIZER.
2644 (lll_lock_t): Remove.
2645 (LLL_LOCK_INITIALIZER_WAITERS): Define.
2646 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2647 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2648 lll_cond_wake, lll_cond_broadcast): Remove.
2649 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2650 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2651 2007-05-2{3,9} changes.
2652 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2653 kernel-features.h and lowlevellock.h.
2654 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2655 (LOAD_FUTEX_WAIT): Rewritten.
2656 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2658 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2659 (__lll_mutex_lock_wait): Rename to ...
2660 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
2661 %ecx, %ecx is now private argument. Don't compile in for libc.so.
2662 (__lll_mutex_timedlock_wait): Rename to ...
2663 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
2664 contains private argument. Don't compile in for libc.so.
2665 (__lll_mutex_unlock_wake): Rename to ...
2666 (__lll_unlock_wake): ... this. %ecx contains private argument.
2667 Don't compile in for libc.so.
2668 (__lll_timedwait_tid): Use __NR_gettimeofday.
2669 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
2670 kernel-features.h and lowlevellock.h.
2671 (LOAD_FUTEX_WAIT): Define.
2672 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2674 (__lll_robust_mutex_lock_wait): Rename to ...
2675 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
2676 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
2678 (__lll_robust_mutex_timedlock_wait): Rename to ...
2679 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
2680 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
2681 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
2683 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2684 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2685 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
2686 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
2687 to __lll_lock_wait in %edx.
2688 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2689 Include lowlevellock.h and pthread-errnos.h.
2690 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2691 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2692 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
2693 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2694 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2697 Include lowlevellock.h and pthread-errnos.h.
2698 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2699 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2700 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
2701 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2702 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2704 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2705 Include lowlevellock.h.
2706 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2708 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
2709 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
2710 pass LLL_SHARED in %ecx to both __lll_lock_wait and
2711 __lll_unlock_wake. Use __NR_gettimeofday.
2712 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2713 Include lowlevellock.h.
2714 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2715 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
2716 to __lll_*, pass cond_lock address in %edx rather than %ecx to
2717 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
2718 and __lll_unlock_wake.
2719 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
2720 Include lowlevellock.h.
2721 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2722 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
2723 MUTEX(%ebx) address in %edx rather than %ecx to
2724 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2725 and __lll_unlock_wake. Move return value from %ecx to %edx
2727 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2728 Include lowlevellock.h.
2729 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2731 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2732 MUTEX(%ebp) address in %edx rather than %ecx to
2733 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2734 and __lll_unlock_wake. Move return value from %ecx to %edx
2735 register. Use __NR_gettimeofday.
2736 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2737 Include lowlevellock.h.
2738 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2740 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2741 MUTEX(%ebp) address in %edx rather than %ecx to
2742 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2743 and __lll_unlock_wake. Move return value from %ecx to %edx
2744 register. Use __NR_gettimeofday.
2745 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2746 Include lowlevellock.h.
2747 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2748 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2749 MUTEX(%edi) address in %edx rather than %ecx to
2750 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2751 and __lll_unlock_wake.
2752 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2753 Include lowlevellock.h.
2754 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2755 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2756 MUTEX(%ebx) address in %edx rather than %ecx to
2757 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2758 and __lll_unlock_wake. Move return value from %ecx to %edx
2760 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2762 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2764 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2765 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2766 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2768 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2769 (sem_timedwait): Use __NR_gettimeofday.
2770 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2772 (LOCK): Don't define.
2773 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2775 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2776 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2778 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2779 2007-05-2{3,9} changes.
2780 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2781 kernel-features.h and lowlevellock.h.
2782 (LOAD_PRIVATE_FUTEX_WAIT): Define.
2783 (LOAD_FUTEX_WAIT): Rewritten.
2784 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2785 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2786 (__lll_mutex_lock_wait): Rename to ...
2787 (__lll_lock_wait): ... this. %esi is now private argument.
2788 Don't compile in for libc.so.
2789 (__lll_mutex_timedlock_wait): Rename to ...
2790 (__lll_timedlock_wait): ... this. %esi contains private argument.
2791 Don't compile in for libc.so.
2792 (__lll_mutex_unlock_wake): Rename to ...
2793 (__lll_unlock_wake): ... this. %esi contains private argument.
2794 Don't compile in for libc.so.
2795 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2796 kernel-features.h and lowlevellock.h.
2797 (LOAD_FUTEX_WAIT): Define.
2798 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2799 (__lll_robust_mutex_lock_wait): Rename to ...
2800 (__lll_robust_lock_wait): ... this. %esi argument contains private.
2801 Use LOAD_FUTEX_WAIT macro.
2802 (__lll_robust_mutex_timedlock_wait): Rename to ...
2803 (__lll_robust_timedlock_wait): ... this. %esi argument contains
2804 private, use LOAD_FUTEX_WAIT macro.
2805 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2807 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2808 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2809 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2810 __lll_lock_wait and __lll_unlock_wake.
2811 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2812 Include lowlevellock.h and pthread-errnos.h.
2813 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2814 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2815 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2816 pass LLL_SHARED in %esi to both __lll_lock_wait and
2818 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2819 Include lowlevellock.h and pthread-errnos.h.
2820 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2821 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2822 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2823 pass LLL_SHARED in %esi to both __lll_lock_wait and
2825 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2826 Include lowlevellock.h.
2827 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2828 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2829 pass LLL_SHARED in %esi to both __lll_lock_wait and
2831 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2832 Include lowlevellock.h.
2833 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2834 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2835 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2836 and __lll_unlock_wake.
2837 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2838 Include lowlevellock.h.
2839 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2841 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2842 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2843 and __lll_unlock_wake.
2844 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2845 Include lowlevellock.h.
2846 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2848 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2849 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2850 and __lll_unlock_wake.
2851 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2852 Include lowlevellock.h.
2853 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2855 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2856 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2857 and __lll_unlock_wake.
2858 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2859 Include lowlevellock.h.
2860 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2862 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2863 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2864 and __lll_unlock_wake.
2865 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2866 Include lowlevellock.h.
2867 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2869 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2870 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2871 and __lll_unlock_wake.
2872 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2874 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2876 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2877 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2878 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2880 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2881 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2883 (LOCK): Don't define.
2884 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2886 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2887 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2888 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2889 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2890 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2891 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2892 (__lll_lock_wait_private): New function.
2893 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2894 it to lll_futex_*wait. Don't compile in for libc.so.
2895 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2897 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2898 (struct sparc_pthread_barrier): Remove.
2899 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2900 struct sparc_pthread_barrier. Pass
2901 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2902 and lll_futex_wait macros.
2903 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2905 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2906 Include sparc pthread_barrier_wait.c instead of generic one.
2908 2007-07-30 Jakub Jelinek <jakub@redhat.com>
2910 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2912 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2913 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2915 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2916 (pthread_rwlock_timedwrlock): Likewise.
2917 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2918 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2920 2007-07-31 Jakub Jelinek <jakub@redhat.com>
2922 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2924 2007-07-26 Jakub Jelinek <jakub@redhat.com>
2926 * tst-locale2.c (useless): Add return statement.
2928 2007-07-24 Jakub Jelinek <jakub@redhat.com>
2930 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2931 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2932 * pthread_create.c (start_thread): Likewise.
2933 * init.c (sighandler_setxid): Likewise.
2934 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2935 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2936 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2937 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2938 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2939 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2940 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2941 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2942 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2944 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2946 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2948 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2949 __rtld_notify): Likewise.
2950 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2951 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2952 __pthread_once): Likewise.
2953 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2954 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2955 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2956 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2957 (lll_futex_wait): Add private argument, define as wrapper around
2958 lll_futex_timed_wait.
2959 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2960 use __lll_private_flag macro.
2961 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2962 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2963 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2964 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2965 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2966 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2967 (lll_futex_wait): Add private argument, define as wrapper around
2968 lll_futex_timed_wait.
2969 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2970 use __lll_private_flag macro.
2971 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2972 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2973 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2975 (lll_futex_timed_wait, lll_futex_wake): Use it.
2976 (lll_private_futex_wait, lll_private_futex_timed_wait,
2977 lll_private_futex_wake): Removed.
2978 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2979 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2980 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2981 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2982 (lll_futex_wait): Add private argument, define as wrapper around
2983 lll_futex_timed_wait.
2984 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2985 use __lll_private_flag macro.
2986 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2987 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2989 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2990 (lll_private_futex_wait, lll_private_futex_timed_wait,
2991 lll_private_futex_wake): Removed.
2992 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2993 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2994 (lll_private_futex_wait, lll_private_futex_timed_wait,
2995 lll_private_futex_wake): Removed.
2996 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2997 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2998 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2999 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3000 (lll_futex_wait): Add private argument, define as wrapper around
3001 lll_futex_timed_wait.
3002 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3003 use __lll_private_flag macro.
3004 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3005 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3007 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3009 (lll_futex_timed_wait, lll_futex_wake): Use it.
3010 (lll_private_futex_wait, lll_private_futex_timed_wait,
3011 lll_private_futex_wake): Removed.
3013 2007-07-27 Jakub Jelinek <jakub@redhat.com>
3015 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3016 of the structure for sparc32.
3018 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
3020 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3022 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3024 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3025 code used when private futexes are assumed.
3026 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3029 2007-07-23 Jakub Jelinek <jakub@redhat.com>
3031 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3032 (__lll_private_flag): Define.
3033 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3034 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3036 (lll_private_futex_wait, lll_private_futex_timedwait,
3037 lll_private_futex_wake): Define as wrapper around non-_private
3039 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3040 (__lll_private_flag): Define.
3041 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3042 (lll_private_futex_wait, lll_private_futex_timedwait,
3043 lll_private_futex_wake): Define as wrapper around non-_private
3046 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
3048 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3049 parameter to lll_futex_wait call.
3050 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3052 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3053 Replace lll_futex_wait with lll_private_futex_wait.
3054 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3055 Add LLL_SHARED parameter to lll_futex_wake().
3057 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3058 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3059 lll_private_futex_wake.
3060 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3061 bit from private parm before syscall.
3062 (lll_futex_timed_wait): Likewise.
3063 (lll_futex_wake): Likewise.
3064 (lll_futex_wake_unlock): Likewise.
3065 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3066 (lll_robust_mutex_unlock): Likewise.
3067 (lll_mutex_unlock_force): Likewise.
3068 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3070 2007-07-23 Ulrich Drepper <drepper@redhat.com>
3072 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3073 compilation when unconditionally using private futexes.
3074 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3075 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3077 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3078 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3080 2007-07-17 Jakub Jelinek <jakub@redhat.com>
3082 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3085 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3087 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3090 2007-05-16 Roland McGrath <roland@redhat.com>
3092 * init.c (__nptl_initial_report_events): New variable.
3093 (__pthread_initialize_minimal_internal): Initialize pd->report_events
3096 2007-06-22 Jakub Jelinek <jakub@redhat.com>
3098 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3099 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3101 2007-06-19 Ulrich Drepper <drepper@redhat.com>
3103 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3106 2007-06-18 Ulrich Drepper <drepper@redhat.com>
3108 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3109 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3110 * pthread_mutex_timedlock.c: Likewise.
3111 * pthread_mutex_trylock.c: Likewise.
3112 * pthread_mutex_unlock.c: Likewise.
3114 2007-06-17 Andreas Schwab <schwab@suse.de>
3116 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3119 2007-06-17 Ulrich Drepper <drepper@redhat.com>
3121 * allocatestack.c (allocate_stack): Make code compile if
3122 __ASSUME_PRIVATE_FUTEX is set.
3124 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3126 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3127 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3128 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3129 (__pthread_rwlock_wrlock): Likewise.
3130 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3131 (pthread_rwlock_timedrdlock): Likewise.
3132 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3133 (pthread_rwlock_timedwrlock): Likewise.
3134 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3135 (__pthread_rwlock_unlock): Likewise.
3137 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3139 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3140 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3141 Split __flags into __flags, __shared, __pad1 and __pad2.
3142 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3143 futexes if they are available.
3144 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3145 in libc-lowlevellock.S allow using private futexes.
3146 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3147 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
3148 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
3149 to call lll_futex_timed_wait. Add lll_private_futex_wait,
3150 lll_private_futex_timed_wait and lll_private_futex_wake.
3151 (lll_robust_mutex_unlock): Fix typo.
3152 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3153 field in futex command setup.
3154 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3155 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3156 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3157 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3158 if they are available. Remove clear_once_control.
3159 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3160 futexes if they are available.
3161 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3162 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3163 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3164 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3165 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3166 Wake only when there are waiters.
3167 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3168 support. Indicate that there are waiters. Remove unnecessary
3169 extra cancellation test.
3170 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
3171 left-over duplication of __sem_wait_cleanup.
3173 2007-06-07 Ulrich Drepper <drepper@redhat.com>
3175 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3176 parameter to lll_futex_wait, lll_futex_timed_wait, and
3177 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
3178 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3179 lll_private_futex_wake.
3180 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3181 * allocatestack.c: Adjust use of lll_futex_* macros.
3183 * lowlevellock.h: Likewise.
3184 * pthread_barrier_wait.c: Likewise.
3185 * pthread_cond_broadcast.c: Likewise.
3186 * pthread_cond_destroy.c: Likewise.
3187 * pthread_cond_signal.c: Likewise.
3188 * pthread_cond_timedwait.c: Likewise.
3189 * pthread_cond_wait.c: Likewise.
3190 * pthread_create.c: Likewise.
3191 * pthread_mutex_lock.c: Likewise.
3192 * pthread_mutex_setprioceiling.c: Likewise.
3193 * pthread_mutex_timedlock.c: Likewise.
3194 * pthread_mutex_unlock.c: Likewise.
3195 * pthread_rwlock_timedrdlock.c: Likewise.
3196 * pthread_rwlock_timedwrlock.c: Likewise.
3197 * pthread_rwlock_unlock.c: Likewise.
3198 * sysdeps/alpha/tls.h: Likewise.
3199 * sysdeps/i386/tls.h: Likewise.
3200 * sysdeps/ia64/tls.h: Likewise.
3201 * sysdeps/powerpc/tls.h: Likewise.
3202 * sysdeps/pthread/aio_misc.h: Likewise.
3203 * sysdeps/pthread/gai_misc.h: Likewise.
3204 * sysdeps/s390/tls.h: Likewise.
3205 * sysdeps/sh/tls.h: Likewise.
3206 * sysdeps/sparc/tls.h: Likewise.
3207 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3208 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3209 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3210 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3211 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3212 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3213 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3214 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3215 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3216 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3218 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3219 * sysdeps/x86_64/tls.h: Likewise.
3221 2007-05-29 Ulrich Drepper <drepper@redhat.com>
3223 * pthread_getattr_np.c: No need to install a cancellation handler,
3224 this is no cancellation point.
3225 * pthread_getschedparam.c: Likewise.
3226 * pthread_setschedparam.c: Likewise.
3227 * pthread_setschedprio.c: Likewise.
3228 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3230 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3231 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3232 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3233 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3234 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3235 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3236 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3237 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3238 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3239 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3240 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3241 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3243 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3244 whether there are more than one thread makes no sense here since
3245 we only call the slow path if the locks are taken.
3246 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3248 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3249 COND_NWAITERS_SHIFT.
3250 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3252 * pthread_cond_init.c: Likewise.
3253 * pthread_cond_timedwait.c: Likewise.
3254 * pthread_cond_wait.c: Likewise.
3255 * pthread_condattr_getclock.c: Likewise.
3256 * pthread_condattr_setclock.c: Likewise.
3257 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3258 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3259 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3260 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3261 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3263 2007-05-28 Jakub Jelinek <jakub@redhat.com>
3265 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3268 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3270 (THREAD_GSCOPE_GET_FLAG): Remove.
3271 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3272 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3274 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3275 (THREAD_GSCOPE_GET_FLAG): Remove.
3276 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3277 instead of THREAD_GSCOPE_GET_FLAG.
3278 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
3280 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3281 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3282 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3283 THREAD_GSCOPE_WAIT): Define.
3284 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3285 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3286 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3287 THREAD_GSCOPE_WAIT): Define.
3288 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3289 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3290 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3291 THREAD_GSCOPE_WAIT): Define.
3292 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3293 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3294 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3295 THREAD_GSCOPE_WAIT): Define.
3297 2007-05-24 Richard Henderson <rth@redhat.com>
3299 * descr.h (struct pthread): Add header.gscope_flag.
3300 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3301 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3302 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3303 THREAD_GSCOPE_WAIT): Define.
3305 2007-05-27 Ulrich Drepper <drepper@redhat.com>
3307 * init.c: Make it compile with older kernel headers.
3309 * tst-initializers1.c: Show through exit code which test failed.
3311 * pthread_rwlock_init.c: Also initialize __shared field.
3312 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3313 element in rwlock structure into four byte elements. One of them is
3314 the new __shared element.
3315 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3317 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3318 __shared, adjust names of other padding elements.
3319 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3320 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3321 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3322 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3324 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3325 futex to use private operations if possible.
3326 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3328 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3330 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3331 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3332 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3333 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3335 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3337 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3338 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3340 2007-05-26 Ulrich Drepper <drepper@redhat.com>
3342 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3343 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3344 * pthread_rwlock_timedrdlock.c: Likewise.
3345 * pthread_rwlock_tryrdlock.c: Likewise.
3347 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3350 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3351 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3352 duplication of __sem_wait_cleanup.
3354 * allocatestack.c: Revert last change.
3356 * sysdeps/i386/tls.h: Likewise.
3357 * sysdeps/x86_64/tls.h: Likewise.
3358 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3360 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3362 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3364 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3365 * pthread_barrier_init.c: Set private flag if pshared and private
3366 futexes are supported.
3367 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3368 private field in futex command setup.
3369 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3371 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3373 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3375 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3376 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3377 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3378 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3379 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3381 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3382 * sem_init.c (__new_sem_init): Rewrite to initialize all three
3383 fields in the structure.
3384 (__old_sem_init): New function.
3385 * sem_open.c: Initialize all fields of the structure.
3386 * sem_getvalue.c: Adjust for renamed element.
3387 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3388 (gen-as-const-headers): Add structsem.sym.
3389 * sysdeps/unix/sysv/linux/structsem.sym: New file.
3390 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3391 struct new_sem. Add struct old_sem.
3392 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3393 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3394 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3395 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3396 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3397 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3398 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3399 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3400 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3401 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3402 * tst-sem10.c: New file.
3403 * tst-sem11.c: New file.
3404 * tst-sem12.c: New file.
3405 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3408 2007-05-25 Ulrich Drepper <drepper@redhat.com>
3409 Jakub Jelinek <jakub@redhat.com>
3411 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3412 Move __pthread_enable_asynccancel right before futex syscall.
3413 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3416 2007-05-24 Jakub Jelinek <jakub@redhat.com>
3418 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3419 THREAD_COPY_PRIVATE_FUTEX): Define.
3420 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3421 THREAD_COPY_PRIVATE_FUTEX): Define.
3422 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3423 * init.c (__pthread_initialize_minimal_internal): Use
3424 THREAD_SET_PRIVATE_FUTEX.
3426 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3427 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3428 THREAD_GSCOPE_FLAG_WAIT): Define.
3429 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3430 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3431 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3433 (THREAD_GSCOPE_GET_FLAG): Define.
3434 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3435 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3436 instead of ->header.gscope_flag directly.
3438 2007-05-23 Ulrich Drepper <drepper@redhat.com>
3440 * init.c (__pthread_initialize_minimal_internal): Check whether
3441 private futexes are available.
3442 * allocatestack.c (allocate_stack): Copy private_futex field from
3443 current thread into the new stack.
3444 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3445 futexes if they are available.
3446 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3447 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3448 in libc-lowlevellock.S allow using private futexes.
3449 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3450 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3452 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3453 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3454 if they are available.
3455 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3456 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3457 * sysdeps/i386/tcb-offsets.sym: Likewise.
3458 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3459 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3461 2007-05-21 Ulrich Drepper <drepper@redhat.com>
3463 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3464 Remove ptr_wait_lookup_done again.
3465 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3466 (__pthread_initialize_minimal_internal): Initialize
3467 _dl_wait_lookup_done pointer in _rtld_global directly.
3468 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3469 Remove code to code _dl_wait_lookup_done.
3470 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3473 2007-05-21 Jakub Jelinek <jakub@redhat.com>
3475 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3476 pthread_mutex_init failed with ENOTSUP.
3478 2007-05-19 Ulrich Drepper <drepper@redhat.com>
3480 * allocatestack.c (__wait_lookup_done): New function.
3481 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3482 Add ptr_wait_lookup_done.
3483 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3484 * pthreadP.h: Declare __wait_lookup_done.
3485 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3486 Define macros to implement reference handling of global scope.
3487 * sysdeps/x86_64/tls.h: Likewise.
3488 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3489 Initialize GL(dl_wait_lookup_done).
3491 2007-05-17 Ulrich Drepper <drepper@redhat.com>
3494 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3496 * pthread_mutex_timedlock.c: Likewise.
3497 * pthread_mutex_trylock.c: Likewise.
3498 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3500 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3501 * tst-robust9.c: New file.
3502 * tst-robustpi9.c: New file.
3504 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3505 unnecessary extra cancellation test.
3507 2007-05-14 Ulrich Drepper <drepper@redhat.com>
3509 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3510 extra cancellation test.
3511 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3513 2007-05-10 Ulrich Drepper <drepper@redhat.com>
3515 * descr.h (struct pthread): Rearrange members to fill hole in
3518 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3519 (__pthread_setaffinity_new): If syscall was successful and
3520 RESET_VGETCPU_CACHE is defined, use it before returning.
3521 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3523 2007-05-10 Jakub Jelinek <jakub@redhat.com>
3526 * tst-align2.c: Include stackinfo.h.
3527 * tst-getpid1.c: Likewise.
3529 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
3532 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3533 * tst-getpid1.c (do_test): Likewise.
3536 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3537 (allocate_stack): Likewise.
3539 2007-05-07 Ulrich Drepper <drepper@redhat.com>
3541 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3542 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3543 (__lll_robust_timedlock_wait): Likewise.
3544 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3546 2007-05-06 Mike Frysinger <vapier@gentoo.org>
3549 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3550 * tst-cancel4.c (tf_fdatasync): New test.
3552 2007-04-27 Ulrich Drepper <drepper@redhat.com>
3555 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3556 check mutexes like normal mutexes.
3559 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3560 Initialize the whole sigevent structure to appease valgrind.
3562 2007-04-25 Ulrich Drepper <drepper@redhat.com>
3564 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3565 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3567 2007-04-06 Ulrich Drepper <drepper@redhat.com>
3569 * tst-locale1.c: Avoid warnings.
3570 * tst-locale2.c: Likewise.
3572 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
3574 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3575 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3577 2007-03-16 Jakub Jelinek <jakub@redhat.com>
3579 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3580 __extern_always_inline where appropriate.
3581 * sysdeps/pthread/pthread.h: Likewise.
3583 2007-03-13 Richard Henderson <rth@redhat.com>
3585 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3586 separate cfi regions for the two subsections.
3588 2007-02-25 Ulrich Drepper <drepper@redhat.com>
3590 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3591 new thread, don't just decrement it.
3592 Patch by Suzuki K P <suzuki@in.ibm.com>.
3594 2007-02-21 Ulrich Drepper <drepper@redhat.com>
3596 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3597 PTHFCT_CALL definition.
3599 2007-02-18 Ulrich Drepper <drepper@redhat.com>
3601 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3602 available, don't use it.
3604 2007-02-09 Jakub Jelinek <jakub@redhat.com>
3606 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3607 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3608 call into the kernel to delay.
3610 2007-01-18 Ulrich Drepper <drepper@redhat.com>
3612 * tst-initializers1.c: We want to test the initializers as seen
3613 outside of libc, so undefined _LIBC.
3615 * pthread_join.c (cleanup): Avoid warning.
3617 2007-01-17 Ulrich Drepper <drepper@redhat.com>
3619 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3620 (__lll_timedwait_tid): Add unwind info.
3622 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3623 function table, mangle the pointers.
3624 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3625 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3626 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3627 demangle pointers before use.
3628 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3630 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3631 * sysdeps/pthread/setxid.h: Likewise.
3633 2007-01-12 Ulrich Drepper <drepper@redhat.com>
3635 * tst-rwlock7.c: Show some more information in case of correct
3638 2007-01-11 Ulrich Drepper <drepper@redhat.com>
3640 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3641 (lll_futex_timed_wait): Undo part of last change, don't negate
3644 2007-01-10 Ulrich Drepper <drepper@redhat.com>
3646 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
3647 FUTEX_CMP_REQUEUE and lll_futex_requeue.
3649 2006-12-28 David S. Miller <davem@davemloft.net>
3651 * shlib-versions: Fix sparc64 linux target specification.
3653 2007-01-10 Jakub Jelinek <jakub@redhat.com>
3655 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3656 Adjust include path for pthread_barrier_wait.c move.
3658 2006-12-21 Jakub Jelinek <jakub@redhat.com>
3660 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3661 tid isn't reread from pd->tid in between ESRCH test and the syscall.
3663 2006-12-06 Jakub Jelinek <jakub@redhat.com>
3665 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3666 6 argument cancellable syscalls.
3667 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3668 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
3669 6 argument cancellable syscalls.
3670 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
3672 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3674 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
3675 (__rtld_mrlock_initialize): Add missing closing parenthesis.
3677 2006-10-30 Jakub Jelinek <jakub@redhat.com>
3679 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3680 __sync_lock_release instead of __sync_lock_release_si.
3682 2006-10-29 Jakub Jelinek <jakub@redhat.com>
3684 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
3686 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
3687 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
3688 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3689 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3690 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3691 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3692 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3693 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3694 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3695 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3696 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3698 2006-10-27 Ulrich Drepper <drepper@redhat.com>
3700 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
3701 * pthread_barrier_wait.c: ...here.
3702 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
3703 * pthread_cond_broadcast.c: ...here.
3704 * sysdeps/pthread/pthread_cond_signal.c: Move to...
3705 * pthread_cond_signal.c: ...here.
3706 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
3707 * pthread_cond_timedwait.c: ...here.
3708 * sysdeps/pthread/pthread_cond_wait.c: Move to...
3709 * pthread_cond_wait.c: ...here.
3710 * sysdeps/pthread/pthread_once.c: Move to...
3711 * pthread_once.c: ...here.
3712 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
3713 * pthread_rwlock_rdlock.c: ...here.
3714 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
3715 * pthread_rwlock_timedrdlock.c: ...here.
3716 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
3717 * pthread_rwlock_timedwrlock.c: ...here.
3718 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
3719 * pthread_rwlock_unlock.c: ...here.
3720 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
3721 * pthread_rwlock_wrlock.c: ...here.
3722 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
3723 * pthread_spin_destroy.c: ...here.
3724 * sysdeps/pthread/pthread_spin_init.c: Move to...
3725 * pthread_spin_init.c: ...here.
3726 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
3727 * pthread_spin_unlock.c: ...here.
3728 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
3729 * pthread_getcpuclockid.c: ...here.
3731 * init.c: USE_TLS support is now always enabled.
3732 * tst-tls5.h: Likewise.
3733 * sysdeps/alpha/tls.h: Likewise.
3734 * sysdeps/i386/tls.h: Likewise.
3735 * sysdeps/ia64/tls.h: Likewise.
3736 * sysdeps/powerpc/tls.h: Likewise.
3737 * sysdeps/s390/tls.h: Likewise.
3738 * sysdeps/sh/tls.h: Likewise.
3739 * sysdeps/sparc/tls.h: Likewise.
3740 * sysdeps/x86_64/tls.h: Likewise.
3742 2006-10-27 Jakub Jelinek <jakub@redhat.com>
3744 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3745 __rtld_mrlock_change): Update oldval if atomic compare and exchange
3748 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3749 Define to THREAD_SELF->header.multiple_threads.
3750 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3752 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3754 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3755 (SINGLE_THREAD_P): Likewise.
3756 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3757 (SINGLE_THREAD_P): Likewise.
3758 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3759 (SINGLE_THREAD_P): Likewise.
3760 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3761 (SINGLE_THREAD_P): Likewise.
3762 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3764 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3765 (SINGLE_THREAD_P): Likewise.
3766 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3767 (SINGLE_THREAD_P): Likewise.
3768 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3771 2006-10-26 Jakub Jelinek <jakub@redhat.com>
3773 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3774 by default rather than 2_3_3.
3776 2006-10-17 Jakub Jelinek <jakub@redhat.com>
3778 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3779 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3780 atomic_* instead of catomic_* macros.
3782 2006-10-12 Ulrich Drepper <drepper@redhat.com>
3785 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3786 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3787 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3788 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3789 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3790 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3791 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3792 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3793 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3794 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3795 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3796 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3797 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3799 2006-10-11 Ulrich Drepper <drepper@redhat.com>
3801 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3802 cancelable syscalls with six parameters.
3804 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3805 operations instead of atomic_*.
3807 2006-10-09 Ulrich Drepper <drepper@redhat.com>
3809 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3811 2006-10-07 Ulrich Drepper <drepper@redhat.com>
3813 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3814 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3815 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3817 * pthread_attr_setstack.c: Allow overwriting the version number of the
3819 * pthread_attr_setstacksize.c: Likewise.
3820 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3822 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3823 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3825 2006-09-24 Ulrich Drepper <drepper@redhat.com>
3828 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3829 Patch by Petr Baudis.
3831 2006-09-18 Jakub Jelinek <jakub@redhat.com>
3833 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3835 * tst-cancel2.c (tf): Loop as long as something was written.
3837 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3839 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3840 mutexes wake all mutexes.
3841 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3842 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3843 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3845 2006-09-12 Ulrich Drepper <drepper@redhat.com>
3847 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3848 to guarantee the thread is always canceled.
3850 2006-09-08 Jakub Jelinek <jakub@redhat.com>
3852 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3854 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3855 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
3856 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3858 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3860 2006-09-08 Ulrich Drepper <drepper@redhat.com>
3863 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3864 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3865 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3867 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3868 * Makefile (tests): Add tst-cond22.
3869 * tst-cond22.c: New file.
3871 2006-09-05 Ulrich Drepper <drepper@redhat.com>
3874 * descr.h (struct pthread): Add parent_cancelhandling.
3875 * sysdeps/pthread/createthread.c (create_thread): Pass parent
3876 cancelhandling value to child.
3877 * pthread_create.c (start_thread): If parent thread was canceled
3878 reset the SIGCANCEL mask.
3879 * Makefile (tests): Add tst-cancel25.
3880 * tst-cancel25.c: New file.
3882 2006-09-05 Jakub Jelinek <jakub@redhat.com>
3883 Ulrich Drepper <drepper@redhat.com>
3885 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3886 counterp if it is already zero.
3887 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3889 2006-03-04 Jakub Jelinek <jakub@redhat.com>
3890 Roland McGrath <roland@redhat.com>
3892 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3893 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3894 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3895 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3896 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3897 lll_robust_mutex_timedlock, lll_mutex_unlock,
3898 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3899 Add _L_*_ symbols around the subsection.
3900 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3901 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3903 2006-03-03 Jakub Jelinek <jakub@redhat.com>
3904 Roland McGrath <roland@redhat.com>
3906 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3907 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3908 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3909 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3910 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3911 lll_robust_mutex_timedlock, lll_mutex_unlock,
3912 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3913 Add _L_*_ symbols around the subsection.
3914 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3915 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3917 2006-08-31 Ulrich Drepper <drepper@redhat.com>
3919 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3920 change because it can disturb too much existing code. If real hard
3921 reader preference is needed we'll introduce another type.
3922 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3923 (pthread_rwlock_timedwrlock): Likewise.
3924 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3927 2006-08-30 Ulrich Drepper <drepper@redhat.com>
3929 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3931 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3932 (pthread_rwlock_timedwrlock): Likewise.
3933 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3936 2006-08-25 Jakub Jelinek <jakub@redhat.com>
3938 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3939 Only define ifdef SHARED.
3941 2006-08-23 Ulrich Drepper <drepper@redhat.com>
3943 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3944 (free_stacks): ...here.
3945 (__free_stack_cache): New function.
3946 * pthreadP.h: Declare __free_stack_cache.
3947 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3949 * init.c (pthread_functions): Initialize ptr_freeres.
3950 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3951 New freeres function.
3953 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
3956 * Makefile (extra-objs): Add modules to extra-test-objs instead.
3958 2006-08-20 Ulrich Drepper <drepper@redhat.com>
3960 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3961 _XOPEN_REALTIME_THREADS.
3963 2006-08-15 Jakub Jelinek <jakub@redhat.com>
3965 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3966 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3967 HAVE_CLOCK_GETTIME_VSYSCALL.
3968 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3970 2006-08-14 Jakub Jelinek <jakub@redhat.com>
3972 * sysdeps/unix/sysv/linux/bits/posix_opt.h
3973 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3974 * descr.h (struct priority_protection_data): New type.
3975 (struct pthread): Add tpp field.
3976 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3977 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3978 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3979 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3981 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3982 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3983 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3984 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3986 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3988 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3989 * pthread_mutexattr_getprioceiling.c
3990 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3991 in the SCHED_FIFO priority range.
3992 * pthread_mutexattr_setprioceiling.c
3993 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3994 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3995 if mutex is not TPP. Ceiling is now in __data.__lock.
3996 * pthread_mutex_setprioceiling.c: Include stdbool.h.
3997 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
3998 is now in __data.__lock. Add locking.
3999 * pthread_create.c (__free_tcb): Free pd->tpp structure.
4000 * Makefile (libpthread-routines): Add tpp.
4001 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4002 * tst-tpp.h: New file.
4003 * tst-mutexpp1.c: New file.
4004 * tst-mutexpp6.c: New file.
4005 * tst-mutexpp10.c: New file.
4006 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4007 * tst-mutex6.c (TEST_FUNCTION): Likewise.
4009 2006-08-12 Ulrich Drepper <drepper@redhat.com>
4012 * pthread_join.c (pthread_join): Account for self being canceled
4013 when checking for deadlocks.
4014 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
4015 (tf1): Don't print anything after pthread_join returns, this would be
4016 another cancellation point.
4018 * tst-join6.c: New file.
4019 * Makefile (tests): Add tst-join6.
4021 2006-08-03 Ulrich Drepper <drepper@redhat.com>
4024 * pthread_setspecific.c (__pthread_setspecific): Check
4025 out-of-range index before checking for unused key.
4027 * sysdeps/pthread/gai_misc.h: New file.
4029 2006-08-01 Ulrich Drepper <drepper@redhat.com>
4031 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
4032 file. Don't use sysctl.
4033 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
4034 overwrite the file if this is likely not true.
4036 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
4038 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4039 * Makefile (tests): Add tst-getpid3.
4040 * tst-getpid3.c: New file.
4042 2006-07-30 Roland McGrath <roland@redhat.com>
4044 * Makefile (libpthread-routines): Add ptw-sigsuspend.
4046 * sysdeps/unix/sysv/linux/i386/not-cancel.h
4047 (pause_not_cancel): New macro.
4048 (nanosleep_not_cancel): New macro.
4049 (sigsuspend_not_cancel): New macro.
4050 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4051 nanosleep_not_cancel macro from <not-cancel.h>.
4052 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4053 macro from <not-cancel.h>.
4055 2006-07-28 Ulrich Drepper <drepper@redhat.com>
4056 Jakub Jelinek <jakub@redhat.com>
4058 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4059 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
4060 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4061 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4062 * pthread_mutex_init.c: Add support for priority inheritance mutex.
4063 * pthread_mutex_lock.c: Likewise.
4064 * pthread_mutex_timedlock.c: Likewise.
4065 * pthread_mutex_trylock.c: Likewise.
4066 * pthread_mutex_unlock.c: Likewise.
4067 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4069 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4070 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4071 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4072 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4073 pthread-pi-defines.sym.
4074 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4075 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4076 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4077 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4078 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4079 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4080 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4081 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4082 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4083 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4084 _POSIX_THREAD_PRIO_INHERIT to 200112L.
4085 * tst-mutex1.c: Adjust to allow use in PI mutex test.
4086 * tst-mutex2.c: Likewise.
4087 * tst-mutex3.c: Likewise.
4088 * tst-mutex4.c: Likewise.
4089 * tst-mutex5.c: Likewise.
4090 * tst-mutex6.c: Likewise.
4091 * tst-mutex7.c: Likewise.
4092 * tst-mutex7a.c: Likewise.
4093 * tst-mutex8.c: Likewise.
4094 * tst-mutex9.c: Likewise.
4095 * tst-robust1.c: Likewise.
4096 * tst-robust7.c: Likewise.
4097 * tst-robust8.c: Likewise.
4098 * tst-mutexpi1.c: New file.
4099 * tst-mutexpi2.c: New file.
4100 * tst-mutexpi3.c: New file.
4101 * tst-mutexpi4.c: New file.
4102 * tst-mutexpi5.c: New file.
4103 * tst-mutexpi6.c: New file.
4104 * tst-mutexpi7.c: New file.
4105 * tst-mutexpi7a.c: New file.
4106 * tst-mutexpi8.c: New file.
4107 * tst-mutexpi9.c: New file.
4108 * tst-robust1.c: New file.
4109 * tst-robust2.c: New file.
4110 * tst-robust3.c: New file.
4111 * tst-robust4.c: New file.
4112 * tst-robust5.c: New file.
4113 * tst-robust6.c: New file.
4114 * tst-robust7.c: New file.
4115 * tst-robust8.c: New file.
4116 * Makefile (tests): Add the new tests.
4118 * pthread_create.c (start_thread): Add some casts to avoid warnings.
4119 * pthread_mutex_destroy.c: Remove unneeded label.
4121 2006-07-01 Ulrich Drepper <drepper@redhat.com>
4123 * pthread_mutex_init.c (__pthread_mutex_init): Move some
4124 computations to compile time.
4126 2006-06-04 Ulrich Drepper <drepper@redhat.com>
4128 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4130 2006-05-15 Ulrich Drepper <drepper@redhat.com>
4132 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4134 2006-05-11 Ulrich Drepper <drepper@redhat.com>
4136 * pthread_key_create.c (__pthread_key_create): Do away with
4137 __pthread_keys_lock.
4139 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4140 (__kernel_cpumask_size): Mark as hidden.
4141 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4143 * sem_open.c (__sem_mappings_lock): Mark as hidden.
4144 * semaphoreP.h (__sem_mappings_lock): Likewise.
4146 2006-05-10 Ulrich Drepper <drepper@redhat.com>
4148 * pthread_atfork.c: Mark __dso_handle as hidden.
4150 2006-05-09 Ulrich Drepper <drepper@redhat.com>
4153 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4154 the reload problem. Change the one path in pthread_cancel_init
4155 which causes the problem. Force gcc to reload. Simplify callers.
4156 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4157 (_Unwind_GetBSP): Undo last patch.
4159 2006-05-07 Ulrich Drepper <drepper@redhat.com>
4161 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4162 function pointer is reloaded after pthread_cancel_init calls.
4165 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4166 pointers are reloaded after pthread_cancel_init calls.
4168 2006-05-01 Ulrich Drepper <drepper@redhat.com>
4170 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4173 2006-04-27 Ulrich Drepper <drepper@redhat.com>
4175 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4176 Allocate new object which is passed to timer_sigev_thread so that
4177 the timer can be deleted before the new thread is scheduled.
4179 2006-04-26 Roland McGrath <roland@redhat.com>
4181 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4183 2006-04-08 Ulrich Drepper <drepper@redhat.com>
4185 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4186 suffix for conditional jumps.
4187 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4188 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4189 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4190 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4191 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4192 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4194 * init.c (sigcancel_handler): Compare with correct PID even if the
4195 thread is in the middle of a fork call.
4196 (sighandler_setxid): Likewise.
4197 Reported by Suzuki K P <suzuki@in.ibm.com> .
4199 2006-04-07 Jakub Jelinek <jakub@redhat.com>
4201 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4203 2006-04-06 Ulrich Drepper <drepper@redhat.com>
4205 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4206 fails [Coverity CID 105].
4208 2006-04-05 Ulrich Drepper <drepper@redhat.com>
4210 * sysdeps/pthread/pthread.h: Add nonnull attributes.
4212 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
4215 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4216 Define __lll_rel_instr using lwsync.
4218 2006-03-27 Ulrich Drepper <drepper@redhat.com>
4220 * allocatestack.c (allocate_stack): Always initialize robust_head.
4221 * descr.h: Define struct robust_list_head.
4222 (struct pthread): Use robust_list_head in robust mutex list definition.
4223 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4224 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4225 (__pthread_initialize_minimal_internal): Register robust_list with
4227 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4228 Declare __set_robust_list_avail.
4229 * pthread_create.c (start_thread): Register robust_list of new thread.
4230 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4232 * pthread_mutex_destroy.c: For robust mutexes don't look at the
4233 number of users, it's unreliable.
4234 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4235 set_robust_list syscall is available.
4236 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4237 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4238 Set robust_head.list_op_pending before trying to lock a robust mutex.
4239 * pthread_mutex_timedlock.c: Likewise.
4240 * pthread_mutex_trylock.c: Likewise.
4241 * pthread_mutex_unlock.c: Likewise for unlocking.
4242 * Makefile (tests): Add tst-robust8.
4243 * tst-robust8.c: New file.
4245 2006-03-08 Andreas Schwab <schwab@suse.de>
4247 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4248 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4250 2006-03-05 Roland McGrath <roland@redhat.com>
4252 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4253 and $config_os doesn't match *linux*.
4255 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
4257 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4258 Use __syscall_error.
4259 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4260 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4261 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4262 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4263 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4264 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4266 2006-03-02 Ulrich Drepper <drepper@redhat.com>
4268 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4270 2006-03-01 Ulrich Drepper <drepper@redhat.com>
4272 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4273 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4275 (__lll_robust_timedlock_wait): Likewise.
4276 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4277 (__lll_robust_lock_wait): Likewise.
4278 (__lll_robust_timedlock_wait): Likewise.
4279 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4280 (__lll_robust_lock_wait): Likewise.
4281 (__lll_robust_timedlock_wait): Likewise.
4283 2006-03-01 Jakub Jelinek <jakub@redhat.com>
4285 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4286 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4287 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4288 lll_robust_mutex_unlock): Define.
4289 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4291 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
4293 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4294 instead of <clone.S>.
4296 2006-02-27 Jakub Jelinek <jakub@redhat.com>
4298 * Makefile (libpthread-routines): Add
4299 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4300 and pthread_mutex_[sg]etprioceiling.
4301 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4302 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4303 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4304 pthread_mutex_setprioceiling.
4305 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4306 PTHREAD_PRIO_PROTECT): New enum values.
4307 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4308 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4309 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4311 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4312 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4313 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4315 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4316 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4317 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4318 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4319 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4320 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4321 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4323 * pthread_mutex_getprioceiling.c: New file.
4324 * pthread_mutex_setprioceiling.c: New file.
4325 * pthread_mutexattr_getprioceiling.c: New file.
4326 * pthread_mutexattr_setprioceiling.c: New file.
4327 * pthread_mutexattr_getprotocol.c: New file.
4328 * pthread_mutexattr_setprotocol.c: New file.
4330 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
4332 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4334 2006-02-27 Roland McGrath <roland@redhat.com>
4336 * sysdeps/pthread/Subdirs: List nptl here too.
4337 * configure (libc_add_on_canonical): New variable.
4339 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4341 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4342 self to get main source tree's file.
4343 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4344 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4345 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4346 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4347 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4348 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4349 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4350 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4351 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4352 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4353 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4354 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4355 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4357 * Makefile: Use $(sysdirs) in vpath directive.
4359 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4360 (CPPFLAGS-timer_routines.c): Likewise.
4362 * Makeconfig (includes): Variable removed.
4364 2006-02-26 Roland McGrath <roland@redhat.com>
4366 * sysdeps/generic/pt-raise.c: Moved to ...
4367 * pt-raise.c: ... here.
4368 * sysdeps/generic/lowlevellock.h: Moved to ...
4369 * lowlevellock.h: ... here.
4371 2006-02-23 Roland McGrath <roland@redhat.com>
4373 * descr.h (struct pthread): Add final member `end_padding'.
4374 (PTHREAD_STRUCT_END_PADDING): Use it.
4376 2006-02-20 Roland McGrath <roland@redhat.com>
4378 * sysdeps/mips: Directory removed, saved in ports repository.
4379 * sysdeps/unix/sysv/linux/mips: Likewise.
4381 2006-02-18 Ulrich Drepper <drepper@redhat.com>
4383 * tst-robust1.c: Add second mutex to check that the mutex list is
4386 2006-02-17 Jakub Jelinek <jakub@redhat.com>
4388 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4389 lll_robust_mutex_trylock, lll_robust_mutex_lock,
4390 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4391 lll_robust_mutex_unlock): New macros.
4392 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4393 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4394 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4395 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4396 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4398 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4400 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4402 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4404 2006-02-17 Ulrich Drepper <drepper@redhat.com>
4406 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4407 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4408 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4409 (lll_robust_mutex_unlock): Likewise.
4411 2006-02-13 Jakub Jelinek <jakub@redhat.com>
4413 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4414 Set robust_list.__next rather than robust_list.
4415 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4416 (__pthread_list_t): New typedef.
4417 (pthread_mutex_t): Replace __next and __prev fields with __list.
4418 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4419 (__pthread_list_t): New typedef.
4420 (pthread_mutex_t): Replace __next and __prev fields with __list.
4421 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4422 (__pthread_list_t, __pthread_slist_t): New typedefs.
4423 (pthread_mutex_t): Replace __next and __prev fields with __list.
4424 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4425 (__pthread_list_t, __pthread_slist_t): New typedefs.
4426 (pthread_mutex_t): Replace __next and __prev fields with __list.
4427 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4428 (__pthread_list_t, __pthread_slist_t): New typedefs.
4429 (pthread_mutex_t): Replace __next and __prev fields with __list.
4430 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4431 (__pthread_slist_t): New typedef.
4432 (pthread_mutex_t): Replace __next field with __list.
4434 2006-02-15 Ulrich Drepper <drepper@redhat.com>
4436 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4437 PTHREAD_MUTEX_OWNERDEAD.
4438 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4439 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4440 * Makefile (libpthread-routines): Add lowlevelrobustlock.
4441 * pthread_create.c (start_thread): Very much simplify robust_list loop.
4442 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4443 to PTHREAD_MUTEX_INCONSISTENT.
4444 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4445 * pthread_mutex_lock.c: Reimplement robust mutex handling.
4446 * pthread_mutex_trylock.c: Likewise.
4447 * pthread_mutex_timedlock.c: Likewise.
4448 * pthread_mutex_unlock.c: Likewise.
4449 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4450 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4451 lowlevelrobustlock.sym.
4452 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4453 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4455 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4456 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4457 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4458 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4459 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4461 2006-02-12 Ulrich Drepper <drepper@redhat.com>
4463 * allocatestack.c (allocate_stack): Initialize robust_list.
4464 * init.c (__pthread_initialize_minimal_internal): Likewise.
4465 * descr.h (struct xid_command): Pretty printing.
4466 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4467 robust_list. Adjust macros.
4468 * pthread_create.c (start_thread): Adjust robust_list handling.
4469 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4470 but the owner for all robust mutex types.
4471 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4472 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
4473 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4474 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4476 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4477 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4479 2006-02-08 Jakub Jelinek <jakub@redhat.com>
4481 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4482 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4484 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4486 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4488 (lll_futex_timed_wait): Define.
4490 2006-01-19 Ulrich Drepper <drepper@redhat.com>
4492 * tst-cancel4.c: Test ppoll.
4494 2006-01-18 Andreas Jaeger <aj@suse.de>
4497 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4498 (pthread_mutex_t): Follow changes for other archs. Based on patch
4499 by Jim Gifford <patches@jg555.com>.
4501 2006-01-13 Richard Henderson <rth@redhat.com>
4503 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4505 2006-01-10 Roland McGrath <roland@redhat.com>
4507 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4508 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4509 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4510 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4511 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4512 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4513 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4514 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4515 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4516 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4518 2006-01-09 Roland McGrath <roland@redhat.com>
4520 * tst-initializers1-c89.c: New file.
4521 * tst-initializers1-c99.c: New file.
4522 * tst-initializers1-gnu89.c: New file.
4523 * tst-initializers1-gnu99.c: New file.
4524 * Makefile (tests): Add them.
4525 (CFLAGS-tst-initializers1-c89.c): New variable.
4526 (CFLAGS-tst-initializers1-c99.c): New variable.
4527 (CFLAGS-tst-initializers1-gnu89.c): New variable.
4528 (CFLAGS-tst-initializers1-gnu99.c): New variable.
4530 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4531 Use __extension__ on anonymous union definition.
4532 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4533 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4534 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4535 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4536 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4538 2006-01-08 Jakub Jelinek <jakub@redhat.com>
4540 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4541 Don't give the union a name because it changes the mangled name.
4542 Instead name the struct for __data.
4543 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4545 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4548 2006-01-09 Jakub Jelinek <jakub@redhat.com>
4550 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4551 stack bias to mc_ftp field.
4553 2006-01-07 Ulrich Drepper <drepper@redhat.com>
4555 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4556 being too clever and reloading the futex value where it shouldn't.
4558 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4560 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4563 2006-01-06 Jakub Jelinek <jakub@redhat.com>
4565 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4568 2006-01-06 Ulrich Drepper <drepper@redhat.com>
4570 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4571 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4572 rename in tcbhead_t.
4574 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4575 Don't give the union a name because it changes the mangled name.
4576 Instead name the struct for __data.
4577 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4578 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4579 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4580 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4581 * pthread_create.c (start_thread): Adjust robust mutex free loop.
4582 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4584 2006-01-05 Ulrich Drepper <drepper@redhat.com>
4586 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4588 (lll_futex_timed_wait): Define.
4589 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4590 * sysdeps/pthread/aio_misc.h: New file.
4592 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
4594 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4596 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
4598 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4599 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4600 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4602 2006-01-04 Ulrich Drepper <drepper@redhat.com>
4604 * tst-cancel24.cc: Use C headers instead of C++ headers.
4606 2006-01-03 Jakub Jelinek <jakub@redhat.com>
4608 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4609 sparc-linux configured glibc.
4610 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4611 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4612 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4613 atomic_compare_and_exchange_val_24_acq instead of
4614 atomic_compare_and_exchange_val_acq.
4615 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4616 instead of atomic_exchange_rel.
4617 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4618 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4620 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4622 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4623 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4624 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4625 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4626 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4627 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4629 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4631 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4632 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4633 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4635 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4637 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4639 2006-01-03 Ulrich Drepper <drepper@redhat.com>
4641 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4644 2006-01-02 Jakub Jelinek <jakub@redhat.com>
4646 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4647 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4648 THREAD_COPY_POINTER_GUARD): Define.
4649 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4650 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4652 2006-01-01 Ulrich Drepper <drepper@redhat.com>
4654 * version.c: Update copyright year.
4656 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4658 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4659 .eh_frame section, use cfi_* directives.
4660 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4662 2005-12-30 Ulrich Drepper <drepper@redhat.com>
4664 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4667 2005-12-29 Ulrich Drepper <drepper@redhat.com>
4669 * sysdeps/pthread/sigaction.c: Removed.
4670 * sigaction.c: New file.
4671 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
4673 2005-12-28 Ulrich Drepper <drepper@redhat.com>
4675 * Makefile (tests): Add tst-signal7.
4676 * tst-signal7.c: New file.
4678 2005-12-27 Roland McGrath <roland@redhat.com>
4680 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
4681 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
4682 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
4683 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4684 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4685 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4686 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4687 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4688 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4689 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4690 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4692 2005-12-27 Jakub Jelinek <jakub@redhat.com>
4694 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
4695 and __prev field to pthread_mutex_t.
4696 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4697 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4698 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4699 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4700 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
4703 2005-12-26 Ulrich Drepper <drepper@redhat.com>
4705 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
4706 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
4707 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
4708 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
4709 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
4710 and PTHREAD_MUTEXATTR_FLAG_BITS.
4711 * descr.h (struct pthread): Add robust_list field and define
4712 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
4713 * pthread_mutexattr_getrobust.c: New file.
4714 * pthread_mutexattr_setrobust.c: New file.
4715 * pthread_mutex_consistent.c: New file.
4716 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
4717 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4718 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
4719 Adjust pthread_mutex_t initializers.
4720 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
4721 field to pthread_mutex_t.
4722 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
4723 and __prev field to pthread_mutex_t.
4724 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
4725 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
4726 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
4727 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
4728 * pthread_mutexattr_gettype.c: Likewise.
4729 * pthread_mutexattr_setpshared.c: Likewise.
4730 * pthread_mutexattr_settype.c: Likewise.
4731 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
4732 Initialize mutex kind according to robust flag.
4733 * pthread_mutex_lock.c: Implement local robust mutex.
4734 * pthread_mutex_timedlock.c: Likewise.
4735 * pthread_mutex_trylock.c: Likewise.
4736 * pthread_mutex_unlock.c: Likewise.
4737 * pthread_create.c (start_thread): Mark robust mutexes which remained
4739 * tst-robust1.c: New file.
4740 * tst-robust2.c: New file.
4741 * tst-robust3.c: New file.
4742 * tst-robust4.c: New file.
4743 * tst-robust5.c: New file.
4744 * tst-robust6.c: New file.
4745 * tst-robust7.c: New file.
4746 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4747 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4748 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4749 tst-robust5, tst-robust6, and tst-robust7.
4751 * tst-typesizes.c: New file.
4752 * Makefile (tests): Add tst-typesizes.
4754 * tst-once3.c: More debug output.
4756 2005-12-24 Ulrich Drepper <drepper@redhat.com>
4758 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4759 missing after last change.
4761 * version.c: Update copyright year.
4763 2005-12-23 Ulrich Drepper <drepper@redhat.com>
4765 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4766 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4767 * pthread_mutex_trylock.c: Likewise.
4768 * pthread_mutex_timedlock.c: Likewise.
4769 * pthread_mutex_unlock.c: Likewise.
4771 2005-12-22 Roland McGrath <roland@redhat.com>
4773 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4774 so that #include_next's search location is not reset to the -I..
4775 directory where <nptl/...> can be found.
4777 2005-12-22 Ulrich Drepper <drepper@redhat.com>
4780 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4781 Fix unwind info. Remove useless branch prediction prefix.
4782 * tst-cancel24.cc: New file.
4783 * Makefile: Add rules to build and run tst-cancel24.
4785 2005-12-21 Roland McGrath <roland@redhat.com>
4787 * libc-cancellation.c: Use <> rather than "" #includes.
4788 * pt-cleanup.c: Likewise.
4789 * pthread_create.c: Likewise.
4790 * pthread_join.c: Likewise.
4791 * pthread_timedjoin.c: Likewise.
4792 * pthread_tryjoin.c: Likewise.
4793 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4794 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4795 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4796 * unwind.c: Likewise.
4798 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4800 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4801 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4802 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4803 THREAD_COPY_POINTER_GUARD): Define.
4805 2005-12-19 Jakub Jelinek <jakub@redhat.com>
4807 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4809 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4810 THREAD_COPY_POINTER_GUARD): Define.
4811 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4812 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4813 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4814 THREAD_COPY_POINTER_GUARD): Define.
4815 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4816 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4817 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4818 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4819 Use PTR_DEMANGLE for B0 if defined.
4821 2005-12-17 Ulrich Drepper <drepper@redhat.com>
4823 * pthread_create.c (__pthread_create_2_1): Use
4824 THREAD_COPY_POINTER_GUARD if available.
4825 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4826 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4827 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4828 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4829 * sysdeps/x86_64/tls.h: Likewise.
4831 2005-12-15 Roland McGrath <roland@redhat.com>
4833 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4835 2005-12-13 Ulrich Drepper <drepper@redhat.com>
4837 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4839 * errno-loc.c: New file.
4841 2005-12-12 Roland McGrath <roland@redhat.com>
4843 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4844 adjustments before choosing stack size. Update minimum stack size
4845 calculation to match allocate_stack change.
4847 2005-12-12 Ulrich Drepper <drepper@redhat.com>
4849 * allocatestack.c (allocate_stack): Don't demand that there is an
4850 additional full page available on the stack beside guard, TLS, the
4853 2005-11-24 Ulrich Drepper <drepper@redhat.com>
4855 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4856 (__cleanup_fct_attribute): Use __regparm__ not regparm.
4858 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4859 compiling 32-bit code we must define __cleanup_fct_attribute.
4861 005-11-24 Jakub Jelinek <jakub@redhat.com>
4864 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4865 __attribute__ instead of __attribute.
4866 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4867 (__cleanup_fct_attribute): Likewise.
4869 2005-11-17 Jakub Jelinek <jakub@redhat.com>
4871 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4872 a write barrier before writing libgcc_s_getcfa.
4874 2005-11-06 Ulrich Drepper <drepper@redhat.com>
4876 * sysdeps/unix/sysv/linux/configure: Removed.
4878 2005-11-05 Ulrich Drepper <drepper@redhat.com>
4880 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4881 optional init_array/fini_array support.
4883 2005-10-24 Roland McGrath <roland@redhat.com>
4885 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4886 versioned_symbol use.
4888 2005-10-16 Roland McGrath <roland@redhat.com>
4890 * init.c (__pthread_initialize_minimal_internal): Even when using a
4891 compile-time default stack size, apply the minimum that allocate_stack
4892 will require, and round up to page size.
4894 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
4896 * Makefile ($(test-modules)): Remove static pattern rule.
4898 2005-10-14 Jakub Jelinek <jakub@redhat.com>
4899 Ulrich Drepper <drepper@redhat.com>
4901 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4902 alignment in callback function.
4903 * Makefile: Add rules to build and run tst-align3.
4904 * tst-align3.c: New file.
4906 2005-10-03 Jakub Jelinek <jakub@redhat.com>
4908 * allocatestack.c (setxid_signal_thread): Add
4909 INTERNAL_SYSCALL_DECL (err).
4911 2005-10-02 Jakub Jelinek <jakub@redhat.com>
4913 * allocatestack.c (setxid_signal_thread): Need to use
4914 atomic_compare_and_exchange_bool_acq.
4916 2005-10-01 Ulrich Drepper <drepper@redhat.com>
4917 Jakub Jelinek <jakub@redhat.com>
4919 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
4921 (struct pthread): Move specific_used field to avoid padding.
4922 Add setxid_futex field.
4923 * init.c (sighandler_setxid): Reset setxid flag and release the
4925 * allocatestack.c (setxid_signal_thread): New function. Broken
4926 out of the bodies of the two loops in __nptl_setxid. For undetached
4927 threads check whether they are exiting and if yes, don't send a signal.
4928 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4929 * pthread_create.c (start_thread): For undetached threads, check
4930 whether setxid bit is set. If yes, wait until signal has been
4933 * allocatestack.c (STACK_VARIABLES): Initialize them.
4934 * pthread_create.c (__pthread_create_2_1): Initialize pd.
4936 2004-09-02 Jakub Jelinek <jakub@redhat.com>
4938 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4939 waiters, awake all waiters on the associated mutex.
4941 2005-09-22 Roland McGrath <roland@redhat.com>
4943 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4944 ../sysdeps/x86_64/hp-timing.h).
4946 2005-08-29 Jakub Jelinek <jakub@redhat.com>
4948 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4949 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4950 (lll_futex_wake_unlock): Define.
4951 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4952 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4953 (lll_futex_wake_unlock): Define.
4954 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4955 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4956 (lll_futex_wake_unlock): Define.
4957 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4958 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4959 (lll_futex_wake_unlock): Define.
4960 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4961 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4962 (lll_futex_wake_unlock): Define.
4963 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4964 lll_futex_wake_unlock.
4965 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4966 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4967 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4968 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4969 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4970 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4972 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4974 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4975 Fix typo in register name.
4977 2005-08-23 Ulrich Drepper <drepper@redhat.com>
4979 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4980 Use __sigfillset. Document that sigfillset does the right thing wrt
4983 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4986 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4987 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4988 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4989 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4990 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4991 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4993 * Makefile (tests): Add tst-initializers1.
4994 (CFLAGS-tst-initializers1.c): Set.
4995 * tst-initializers1.c: New test.
4997 2005-07-11 Jakub Jelinek <jakub@redhat.com>
4999 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5000 Make sure __flags are located at offset 48 from the start of the
5003 2005-07-02 Roland McGrath <roland@redhat.com>
5005 * Makeconfig: Comment fix.
5007 2005-07-05 Jakub Jelinek <jakub@redhat.com>
5009 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5010 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5011 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5012 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5013 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5014 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5015 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5016 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5017 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5018 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5020 2005-06-25 Jakub Jelinek <jakub@redhat.com>
5022 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5023 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5024 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5026 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5027 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5028 field. Put in sysinfo field unconditionally.
5029 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5030 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5031 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5032 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5034 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5035 * pthread_create.c (__pthread_create_2_1): Use
5036 THREAD_COPY_STACK_GUARD macro.
5037 * Makefile: Add rules to build and run tst-stackguard1{,-static}
5039 * tst-stackguard1.c: New file.
5040 * tst-stackguard1-static.c: New file.
5042 2005-06-14 Alan Modra <amodra@bigpond.net.au>
5044 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5045 Invoke CGOTSETUP and CGOTRESTORE.
5046 (CGOTSETUP, CGOTRESTORE): Define.
5048 2005-05-29 Richard Henderson <rth@redhat.com>
5050 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5051 (tf_write, tf_writev): Use it.
5052 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
5055 2005-05-23 Jakub Jelinek <jakub@redhat.com>
5057 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5058 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5059 __librt_*_asynccancel@local.
5061 2005-05-17 Alan Modra <amodra@bigpond.net.au>
5063 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5064 all occurrences of JUMPTARGET. Instead append @local to labels.
5066 2005-05-20 Jakub Jelinek <jakub@redhat.com>
5068 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5069 size/alignment of struct pthread rather than tcbhead_t.
5070 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5072 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5074 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5077 2005-05-19 Richard Henderson <rth@redhat.com>
5079 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5080 __sync_val_compare_and_swap, not explicit _si variant.
5081 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5083 2005-05-03 Ulrich Drepper <drepper@redhat.com>
5086 * sysdeps/pthread/pthread.h: Avoid empty initializers.
5088 2005-05-03 Jakub Jelinek <jakub@redhat.com>
5090 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5091 .eh_frame section, use cfi_* directives.
5093 2005-04-27 Jakub Jelinek <jakub@redhat.com>
5095 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5098 2005-04-27 Ulrich Drepper <drepper@redhat.com>
5101 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5104 2005-04-27 Roland McGrath <roland@redhat.com>
5106 * Makefile (tests): Remove tst-clock2.
5108 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5109 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5110 translating to the kernel clockid_t for our own process/thread clock.
5112 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5114 2005-04-15 Jakub Jelinek <jakub@redhat.com>
5116 * old_pthread_cond_init.c: Include <errno.h>.
5117 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5118 process shared or uses clock other than CLOCK_REALTIME.
5119 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5121 2005-04-13 David S. Miller <davem@davemloft.net>
5123 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5124 * sysdeps/sparc/sparc64/clone.S: New file.
5126 2005-04-05 Jakub Jelinek <jakub@redhat.com>
5129 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5130 __inline instead of inline.
5131 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5133 2005-03-31 Jakub Jelinek <jakub@redhat.com>
5135 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5136 functionally equivalent, but shorter instructions.
5137 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5138 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5139 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5141 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5142 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5143 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5144 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5145 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5146 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5147 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5149 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5150 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5151 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5152 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5153 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5155 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
5157 * sysdeps/mips/Makefile: New file.
5158 * sysdeps/mips/nptl-sysdep.S: New file.
5159 * sysdeps/mips/tcb-offsets.sym: New file.
5160 * sysdeps/mips/pthread_spin_lock.S: New file.
5161 * sysdeps/mips/pthread_spin_trylock.S: New file.
5162 * sysdeps/mips/pthreaddef.h: New file.
5163 * sysdeps/mips/tls.h: New file.
5164 * sysdeps/mips/jmpbuf-unwind.h: New file.
5165 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5166 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5167 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5168 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5169 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5170 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5171 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5172 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5173 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5174 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5176 2005-03-23 Ulrich Drepper <drepper@redhat.com>
5179 * pthread_create.c (__pthread_create_2_1): Rename syscall error
5182 2005-03-10 Jakub Jelinek <jakub@redhat.com>
5184 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5186 2005-02-25 Roland McGrath <roland@redhat.com>
5188 * alloca_cutoff.c: Correct license text.
5189 * tst-unload.c: Likewise.
5190 * sysdeps/pthread/allocalim.h: Likewise.
5191 * sysdeps/pthread/pt-initfini.c: Likewise.
5192 * sysdeps/pthread/bits/libc-lock.h: Likewise.
5193 * sysdeps/pthread/bits/sigthread.h: Likewise.
5194 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5195 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5197 2005-02-16 Roland McGrath <roland@redhat.com>
5199 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5200 Use unsigned int * for ptr_nthreads.
5202 2005-02-14 Alan Modra <amodra@bigpond.net.au>
5205 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5208 2005-02-07 Richard Henderson <rth@redhat.com>
5211 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5214 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
5216 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5217 order of arguments in invocation of atomic_add_zero.
5219 2005-01-26 Jakub Jelinek <jakub@redhat.com>
5222 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5223 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5224 at least gotntpoff relocation and addition.
5225 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5227 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5229 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5232 2005-01-06 Ulrich Drepper <drepper@redhat.com>
5234 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5235 entry for static tls deallocation fix.
5236 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5237 also contains information whether the memory pointed to is static
5239 * sysdeps/i386/tls.h: Likewise.
5240 * sysdeps/ia64/tls.h: Likewise.
5241 * sysdeps/powerpc/tls.h: Likewise.
5242 * sysdeps/s390/tls.h: Likewise.
5243 * sysdeps/sh/tls.h: Likewise.
5244 * sysdeps/sparc/tls.h: Likewise.
5245 * sysdeps/x86_64/tls.h: Likewise.
5247 2004-12-27 Ulrich Drepper <drepper@redhat.com>
5249 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5251 2004-12-21 Jakub Jelinek <jakub@redhat.com>
5253 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5255 * Makefile (tests): Add tst-align2.
5256 * tst-align2.c: New test.
5257 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5258 -mpreferred-stack-boundary=4.
5260 2004-12-18 Roland McGrath <roland@redhat.com>
5262 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5263 New file removed withdrawn for the moment.
5265 2004-12-17 Richard Henderson <rth@redhat.com>
5267 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5268 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5270 2004-12-16 Ulrich Drepper <drepper@redhat.com>
5272 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5273 Increased PTHREAD_STACK_MIN.
5275 * tst-context1.c (stacks): Use bigger stack size.
5277 2004-12-16 Jakub Jelinek <jakub@redhat.com>
5279 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5280 * sysdeps/sparc/tcb-offsets.sym: Add TID.
5282 2004-12-15 Jakub Jelinek <jakub@redhat.com>
5284 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5285 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5286 * sysdeps/s390/tcb-offsets.sym (TID): Add.
5288 2004-12-15 Ulrich Drepper <drepper@redhat.com>
5290 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5292 2004-12-14 Ulrich Drepper <drepper@redhat.com>
5294 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5295 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5297 * tst-getpid1.c: If child crashes, report this first. Print which
5300 2004-12-09 Ulrich Drepper <drepper@redhat.com>
5302 * init.c (__pthread_initialize_minimal_internal): Also unblock
5305 2004-12-01 Jakub Jelinek <jakub@redhat.com>
5307 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5308 _POSIX_THREAD_CPUTIME): Define to 0.
5309 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5310 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5311 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5312 __timer_signal_thread_tclk): Remove.
5313 (init_module): Remove their initialization.
5314 (thread_cleanup): Remove their cleanup assertions.
5315 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5316 __timer_signal_thread_tclk): Remove.
5317 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5318 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5319 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5321 2004-12-07 Jakub Jelinek <jakub@redhat.com>
5323 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5324 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5326 * Makefile (tests): Add tst-getpid2.
5327 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5328 (do_test): Use it. Use __clone2 instead of clone on ia64.
5329 * tst-getpid2.c: New test.
5331 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5333 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5335 2004-12-04 Ulrich Drepper <drepper@redhat.com>
5337 * Makefile (tests): Add tst-getpid1.
5338 * tst-getpid1.c: New file.
5339 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5340 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5342 2004-12-02 Roland McGrath <roland@redhat.com>
5344 * Makefile (libpthread-nonshared): Variable removed.
5345 ($(objpfx)libpthread_nonshared.a): Target removed.
5346 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5347 These are now handled by generic magic from
5348 libpthread-static-only-routines being set.
5350 2004-11-27 Ulrich Drepper <drepper@redhat.com>
5352 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5353 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5354 _POSIX_THREAD_PRIO_PROTECT): Define.
5355 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5356 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5357 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5359 2004-11-26 Jakub Jelinek <jakub@redhat.com>
5361 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5362 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5363 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5364 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5365 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5366 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5367 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5369 2004-11-24 Ulrich Drepper <drepper@redhat.com>
5371 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5373 * Makefile (libpthread-routines): Add pthread_setschedprio.
5374 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5375 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5376 * pthread_setschedprio.c: New file.
5378 2004-11-20 Jakub Jelinek <jakub@redhat.com>
5380 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5381 * pthread_cancel.c (pthread_create): Likewise.
5383 * Makefile (libpthread-routines): Add vars.
5384 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5385 * init.c (__default_stacksize, __is_smp): Remove.
5387 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5388 and define a wrapper macro.
5389 (PTHREAD_STATIC_FN_REQUIRE): Define.
5390 * allocatestack.c (__find_thread_by_id): Undefine.
5391 * pthread_create (__pthread_keys): Remove.
5392 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5393 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5394 PTHREAD_STATIC_FN_REQUIRE.
5396 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5398 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5399 parameter to REGISTER macro.
5401 2004-11-17 Roland McGrath <roland@redhat.com>
5403 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5404 Make sure SIGCANCEL is blocked as well.
5406 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5408 * sysdeps/pthread/setxid.h: New file.
5409 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5410 (struct xid_command): Add forward decl.
5411 (struct pthread_functions): Change return type of __nptl_setxid hook
5413 * pthreadP.h (__nptl_setxid): Change return type to int.
5414 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5415 calling thread, return its return value and set errno on failure.
5416 * descr.h (struct xid_command): Change id type to long array.
5418 * Makefile: Add rules to build and test tst-setuid1 and
5420 * tst-setuid1.c: New test.
5421 * tst-setuid1-static.c: New test.
5423 2004-11-10 Jakub Jelinek <jakub@redhat.com>
5425 * Makefile (tests): Add tst-exit3.
5426 * tst-exit3.c: New test.
5428 2004-11-09 Ulrich Drepper <drepper@redhat.com>
5430 * Makefile (tests): Add tst-exit2.
5431 * tst-exit2.c: New file.
5433 2004-11-09 Roland McGrath <roland@redhat.com>
5436 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5437 here, before calling clone.
5438 * pthread_create.c (start_thread): Don't do it here.
5440 2004-11-02 Jakub Jelinek <jakub@redhat.com>
5442 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5444 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5446 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5447 Set ETIMEDOUT to errno when time is up. Tweak to avoid
5450 2004-10-28 Jakub Jelinek <jakub@redhat.com>
5452 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5453 if sched_priority is not between minprio and maxprio.
5455 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5457 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5458 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5460 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5461 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5463 2004-10-24 Ulrich Drepper <drepper@redhat.com>
5465 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5466 not-cancelable I/O functions.
5468 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5470 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5471 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5472 make sure 2 is stored in the futex and we looked at the old value.
5473 Fix a few other problems to return the correct value.
5475 2004-10-14 Richard Henderson <rth@redhat.com>
5477 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5480 2004-10-06 Jakub Jelinek <jakub@redhat.com>
5482 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5483 of pthread-functions.h and pthreaddef.h.
5484 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5486 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5487 Change __data.__nwaiters from int to unsigned int.
5489 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5490 sysconf (_SC_THREAD_CPUTIME) returns negative value.
5492 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5495 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5496 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5498 2004-10-06 Ulrich Drepper <drepper@redhat.com>
5500 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
5501 test fails, remove message queue.
5502 (tf_msgsnd): Likewise.
5504 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5506 * tst-clock1.c: Change #ifdef to #if defined.
5507 * tst-clock2.c: Likewise.
5508 * tst-cond11.c: Likewise.
5510 * sysdeps/pthread/timer_create.c (timer_create): Use
5511 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5512 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5515 2004-10-05 Jakub Jelinek <jakub@redhat.com>
5517 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5518 _POSIX_THREAD_CPUTIME): Define to 0.
5520 2004-10-04 Ulrich Drepper <drepper@redhat.com>
5522 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5523 and _POSIX_THREAD_CPUTIME to zero.
5524 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5525 * tst-barrier2.c: Fix testing for POSIX feature.
5526 * tst-clock1.c: Likewise.
5527 * tst-clock2.c: Likewise.
5528 * tst-cond11.c: Likewise.
5529 * tst-cond4.c: Likewise.
5530 * tst-cond6.c: Likewise.
5531 * tst-flock2.c: Likewise.
5532 * tst-mutex4.c: Likewise.
5533 * tst-mutex9.c: Likewise.
5534 * tst-rwlock12.c: Likewise.
5535 * tst-rwlock4.c: Likewise.
5536 * tst-signal1.c: Likewise.
5537 * tst-spin2.c: Likewise.
5538 * sysdeps/pthread/posix-timer.h: Likewise.
5539 * sysdeps/pthread/timer_create.c: Likewise.
5540 * sysdeps/pthread/timer_routines.c: Likewise.
5542 2004-10-01 Ulrich Drepper <drepper@redhat.com>
5544 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5545 (__lll_mutex_timedlock_wait): Address futex correctly.
5547 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5548 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5549 make sure 2 is stored in the futex and we looked at the old value.
5550 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5551 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
5552 which might very well made the code not working at all before.
5555 2004-09-28 Ulrich Drepper <drepper@redhat.com>
5557 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5558 allow SIGSETXID to be sent.
5559 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5560 for SIGSETXID to be defined.
5561 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5562 SIGSETXID cannot be blocked.
5564 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5565 Add __extension__ to long long types.
5566 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5567 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5568 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5569 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5570 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5571 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5572 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5574 2004-09-25 Ulrich Drepper <drepper@redhat.com>
5576 * descr.h (struct pthread): Add stopped_start field.
5577 * sysdeps/pthread/createthread.c (create_thread): Set
5578 start_stopped flag in descriptor for new thread appropriately.
5579 * pthread_create.c (start_thread): Only take lock to be stopped on
5580 startup if stopped_start flag says so.
5582 2004-09-24 Ulrich Drepper <drepper@redhat.com>
5584 * pthread_create.c (__pthread_create_2_1): Remember whether thread
5585 is created detached and if yes, do not try to free the stack in case
5586 the thread creation failed.
5587 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5588 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5589 case there has been no error. [BZ #405]
5591 * pthread_create.c (start_thread): Don't wait for scheduler data
5592 etc to be set at the beginning of the function. The cancellation
5593 infrastructure must have been set up. And enable async
5594 cancellation before potentially going to sleep. [BZ #401]
5596 2004-09-20 Ulrich Drepper <drepper@redhat.com>
5598 * Versions: Remove exports for pthread_set*id_np functions.
5599 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5601 * Makefile: Don't build pthread_set*id code for now.
5603 2004-09-19 Ulrich Drepper <drepper@redhat.com>
5605 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5607 * allocatestack.c (__nptl_setxid): New function.
5608 * descr.h (struct xid_command): Define type.
5609 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5610 (sighandler_setxid): New function.
5611 (__pthread_initialize_minimal): Register sighandler_setxid for
5613 * pt-allocrtsig.c: Update comment.
5614 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
5615 Declare __nptl_setxid.
5616 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5617 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5618 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5619 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5620 and pthread_setresuid_np.
5621 * pthread_setgid_np.c: New file.
5622 * pthread_setuid_np.c: New file.
5623 * pthread_setegid_np.c: New file.
5624 * pthread_seteuid_np.c: New file.
5625 * pthread_setregid_np.c: New file.
5626 * pthread_setreuid_np.c: New file.
5627 * pthread_setresgid_np.c: New file.
5628 * pthread_setresuid_np.c: New file.
5629 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5630 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5631 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5632 and pthread_setresuid_np.
5633 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5634 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5635 pthread_setregid, and pthread_setresgid.
5637 2004-09-18 Ulrich Drepper <drepper@redhat.com>
5639 * allocatestack.c (allocate_stack): Return EAGAIN instead of
5640 ENOMEM when out of memory.
5642 2004-09-10 Roland McGrath <roland@redhat.com>
5645 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5646 code, since we don't try to use the broken CLONE_STOPPED any more.
5647 * pthread_create.c (start_thread): Likewise.
5649 2004-09-15 Richard Henderson <rth@redhat.com>
5651 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5653 2004-09-01 David Mosberger <davidm@hpl.hp.com>
5655 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5656 (__libc_unwind_longjmp): Delete macro and declare as function.
5657 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5658 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5660 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5661 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5662 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5664 2004-09-12 Ulrich Drepper <drepper@redhat.com>
5666 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
5668 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
5669 types also for __USE_XOPEN2K.
5670 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5671 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5672 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5673 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5674 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5675 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5676 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5679 2004-09-08 Ulrich Drepper <drepper@redhat.com>
5681 * sysdeps/pthread/pthread.h
5682 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
5683 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
5684 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
5685 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
5688 2004-09-07 Ulrich Drepper <drepper@redhat.com>
5690 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
5691 PSEUDO to be used with . prefix.
5693 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
5694 Use atomic_increment instead of atomic_exchange_and_add.
5695 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
5697 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5699 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5702 * allocatestack.c (allocate_stack): Use atomic_increment_val
5703 instead of atomic_exchange_and_add.
5704 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
5705 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
5707 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5710 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
5711 the initialization function might throw.
5713 2005-09-05 Richard Henderson <rth@redhat.com>
5715 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5716 Move definition inside libpthread, libc, librt check. Provide
5717 definition for rtld.
5719 2004-09-02 Ulrich Drepper <drepper@redhat.com>
5721 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
5722 * sysdeps/i386/jmpbuf-unwind.h: Likewise
5723 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5724 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5725 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5726 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5727 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5728 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5731 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5732 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
5733 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5735 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5736 Decrement __nwaiters. If pthread_cond_destroy has been called and
5737 this is the last waiter, signal pthread_cond_destroy caller and
5738 avoid using the pthread_cond_t structure after unlock.
5739 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5740 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5741 Read clock type from the least significant bits of __nwaiters instead
5743 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5744 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5746 2004-08-31 Jakub Jelinek <jakub@redhat.com>
5749 * Makefile (tests): Add tst-cond20 and tst-cond21.
5750 * tst-cond20.c: New test.
5751 * tst-cond21.c: New test.
5752 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5753 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5755 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5757 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5758 (pthread_cond_t): Likewise.
5759 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5761 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5763 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5765 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5766 (cond_nwaiters): New.
5768 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5769 if there are waiters not signalled yet.
5770 Wait until all already signalled waiters wake up.
5771 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5772 __nwaiters. If pthread_cond_destroy has been called and this is the
5773 last waiter, signal pthread_cond_destroy caller and avoid using
5774 the pthread_cond_t structure after unlock.
5775 (__pthread_cond_wait): Increment __nwaiters in the beginning,
5776 decrement it when leaving. If pthread_cond_destroy has been called
5777 and this is the last waiter, signal pthread_cond_destroy caller.
5778 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5779 Likewise. Read clock type from the least significant bits of
5780 __nwaiters instead of __clock.
5781 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5782 whether clock ID can be encoded in COND_CLOCK_BITS bits.
5783 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5784 clock type just from the last COND_CLOCK_BITS bits of value.
5785 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5786 instead of __clock, just from second bit of condattr's value.
5788 2004-08-30 Jakub Jelinek <jakub@redhat.com>
5790 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5791 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
5793 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5795 2004-08-15 Roland McGrath <roland@frob.com>
5797 * pthread_atfork.c: Update copyright terms including special exception
5798 for these trivial files, which are statically linked into executables
5799 that use dynamic linking for the significant library code.
5801 2004-08-09 Jakub Jelinek <jakub@redhat.com>
5803 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5804 pthread_rwlock_rdlock.
5805 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5806 Decrease __nr_readers_queued after reacquiring lock.
5807 * sysdeps/pthread/pthread_rwlock_timedrdlock
5808 (pthread_rwlock_timedrdlock): Likewise.
5809 Reported by Bob Cook <bobcook47@hotmail.com>.
5811 2004-08-11 Jakub Jelinek <jakub@redhat.com>
5813 * tst-rwlock14.c (tf): Read main thread handle from *ARG
5814 before pthread_barrier_wait.
5816 2004-08-07 Ulrich Drepper <drepper@redhat.com>
5818 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5819 Remove unnecessary exception handling data.
5821 2004-07-23 Jakub Jelinek <jakub@redhat.com>
5824 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5825 instead of clockid_t.
5827 2004-07-21 Roland McGrath <roland@redhat.com>
5829 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5831 2004-07-19 Roland McGrath <roland@redhat.com>
5833 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5835 2004-07-02 Roland McGrath <roland@redhat.com>
5837 * configure: Don't exit.
5839 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5841 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5842 (__pthread_cond_timedwait): Check for invalid nanosecond in
5845 2004-07-07 Ulrich Drepper <drepper@redhat.com>
5847 * Makefile: Add rules to build and run tst-fini1.
5848 * tst-fini1.c: New file.
5849 * tst-fini1mod.c: New file.
5851 2004-07-05 Ulrich Drepper <drepper@redhat.com>
5853 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5854 if no cancellation support is needed.
5855 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5856 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5857 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5858 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5859 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5860 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5861 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5862 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5863 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5865 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5866 only if not already defined.
5868 2004-07-05 Jakub Jelinek <jakub@redhat.com>
5870 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5871 constraint "m" instead of "0" for futex.
5873 * shlib-versions: Add powerpc64-.*-linux.*.
5875 2004-07-04 Jakub Jelinek <jakub@redhat.com>
5877 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5878 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5880 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5881 1 billion and 64-bit tv_nsec which is valid when truncated to 32
5884 2004-06-29 Roland McGrath <roland@redhat.com>
5886 * Banner: NPTL no longer has its own version number.
5887 * Makefile (nptl-version): Variable removed.
5888 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5889 using $(version), the glibc version number.
5891 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5893 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5894 Fix branch offset for a PLT entry.
5895 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5897 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5899 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5901 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5904 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5906 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5909 2004-06-28 Jakub Jelinek <jakub@redhat.com>
5911 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5912 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5914 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5915 (pthread_rwlock_timedrdlock): Likewise.
5917 2004-06-22 Jakub Jelinek <jakub@redhat.com>
5919 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5920 Set __r7 to val, not mutex.
5922 2004-06-27 Ulrich Drepper <drepper@redhat.com>
5924 * Makefile: Add rules to build tst-rwlock14.
5925 * tst-rwlock14.c: New file.
5927 2004-06-24 Boris Hu <boris.hu@intel.com>
5929 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5931 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5933 2004-06-19 Andreas Jaeger <aj@suse.de>
5935 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5936 assembler in last patch.
5938 2004-06-17 Ulrich Drepper <drepper@redhat.com>
5940 * sysdeps/pthread/pthread_cond_timedwait.c
5941 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5942 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5943 (__pthread_cond_timedwait): Check for invalid nanosecond in
5945 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5946 * tst-cond19.c: New file.
5947 * Makefile: Add rules to build and run tst-cond19.
5949 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
5951 * tst-context1.c (GUARD_PATTERN): Defined.
5952 (tst_context_t): Define struct containing ucontext_t & guard words.
5953 (ctx): Declare as an array of tst_context_t.
5954 (fct): Verify uc_link & guard words are still valid.
5955 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
5957 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5959 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5960 Add __data.__futex field, reshuffle __data.__clock.
5961 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5962 (__pthread_cond_signal): Increment __futex at the same time as
5963 __wakeup_seq or __total_seq. Pass address of __futex instead of
5964 address of low 32-bits of __wakeup_seq to futex syscall.
5965 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5966 (__pthread_cond_wait): Likewise. Pass __futex value from before
5967 releasing internal lock to FUTEX_WAIT.
5968 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5969 (__pthread_cond_timedwait): Likewise.
5970 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5971 (FUTEX_CMP_REQUEUE): Define.
5972 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5973 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5974 Pass __futex value from before the unlock and __futex address instead
5975 of address of low 32-bits of __wakeup_seq to futex syscall.
5976 Fallback to FUTEX_WAKE all on any errors.
5978 2004-06-08 Jakub Jelinek <jakub@redhat.com>
5980 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5982 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5983 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5984 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5985 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5986 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
5988 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
5990 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5991 Add memory clobber to inline assembly.
5992 (__lll_mutex_trylock): Likewise.
5993 (__lll_mutex_cond_trylock): Likewise.
5995 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
5997 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5998 Pass val argument as 6th system call argument in %r7.
6000 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6002 * Makefile (tests): Add tst-cond16.
6003 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6004 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6005 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6006 Add __data.__futex field, reshuffle __data.__clock.
6007 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6008 (__pthread_cond_signal): Increment __futex at the same time as
6009 __wakeup_seq or __total_seq. Pass address of __futex instead of
6010 address of low 32-bits of __wakeup_seq to futex syscall.
6011 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6012 (__pthread_cond_wait): Likewise. Pass __futex value from before
6013 releasing internal lock to FUTEX_WAIT.
6014 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6015 (__pthread_cond_timedwait): Likewise.
6016 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6017 (FUTEX_CMP_REQUEUE): Define.
6018 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6019 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6020 Pass __futex value from before the unlock and __futex address instead
6021 of address of low 32-bits of __wakeup_seq to futex syscall.
6022 Fallback to FUTEX_WAKE all on any errors.
6023 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6025 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6026 internally. Return non-zero if error, zero if success.
6027 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6028 Add __data.__futex field, reshuffle __data.__clock.
6029 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6031 (lll_futex_requeue): Add val argument, return 1 unconditionally
6033 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6034 Add __data.__futex field, reshuffle __data.__clock.
6035 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6037 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6038 internally. Return non-zero if error, zero if success.
6039 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6040 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6041 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6043 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6044 internally. Return non-zero if error, zero if success.
6045 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6046 Add __data.__futex field, reshuffle __data.__clock.
6047 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6049 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6050 internally. Return non-zero if error, zero if success.
6051 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6052 Add __data.__futex field, reshuffle __data.__clock.
6053 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6054 Add __data.__futex field, reshuffle __data.__clock.
6055 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6056 Increment __futex at the same time as __wakeup_seq or __total_seq.
6057 Pass address of __futex instead of address of low 32-bits of
6058 __wakeup_seq to futex syscall.
6059 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6060 Pass __futex value from before releasing internal lock
6062 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6063 Likewise. Avoid unnecessary shadowing of variables.
6064 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6065 Set __futex to 2 * __total_seq. Pass __futex value from before the
6066 unlock and __futex address instead of address of low 32-bits of
6067 __wakeup_seq to futex_requeue macro, adjust for new return value
6069 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6070 (__pthread_cond_signal): Increment __futex at the same time as
6071 __wakeup_seq or __total_seq. Pass address of __futex instead of
6072 address of low 32-bits of __wakeup_seq to futex syscall.
6073 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6074 (__pthread_cond_wait): Likewise. Pass __futex value from before
6075 releasing internal lock to FUTEX_WAIT.
6076 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6077 (__pthread_cond_timedwait): Likewise.
6078 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6079 (FUTEX_CMP_REQUEUE): Define.
6080 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6081 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6082 Pass __futex value from before the unlock and __futex address instead
6083 of address of low 32-bits of __wakeup_seq to futex syscall.
6084 Fallback to FUTEX_WAKE all on any errors.
6086 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6088 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6089 Add nop to align the end of critical section.
6090 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6092 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6094 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6095 Add __broadcast_seq field.
6096 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6097 all waiters as woken with woken_seq and bump broadcast counter.
6098 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6099 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
6100 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6101 Comment typo fixes. Avoid returning -ETIMEDOUT.
6103 2004-06-01 Ulrich Drepper <drepper@redhat.com>
6105 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6106 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6107 Reported by Kaz Kojima.
6109 2004-05-25 Jakub Jelinek <jakub@redhat.com>
6111 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6113 2004-05-21 Jakub Jelinek <jakub@redhat.com>
6115 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6116 __broadcast_seq with bc_seq after acquiring internal lock instead of
6119 2004-05-18 Jakub Jelinek <jakub@redhat.com>
6121 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6123 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6124 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6125 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6126 (pthread_cond_t): Add __data.__broadcast_seq field.
6127 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6128 (FRAME_SIZE): Define.
6129 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
6131 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6133 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
6135 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6136 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
6139 2004-05-18 Ulrich Drepper <drepper@redhat.com>
6141 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6142 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6143 Add __broadcast_seq field.
6144 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6145 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6146 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6147 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6148 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6149 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6150 all waiters as woken with woken_seq and bump broadcast counter.
6151 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6153 __broadcast_seq field.
6154 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6155 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6156 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6157 * pthread_cond_init.c: Initialize __broadcast_seq field.
6158 * Makefile (tests): Add tst-cond17 and tst-cond18.
6159 Add .NOTPARALLEL goal.
6160 * tst-cond16.c: New file. From Jakub.
6161 * tst-cond17.c: New file. From Jakub.
6162 * tst-cond18.c: New file. From Jakub.
6164 2004-05-16 Ulrich Drepper <drepper@redhat.com>
6166 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6169 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6170 Parametrize frame size. Correct some unwind info.
6171 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6173 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6175 * tst-stack3.c: Note testing functionality beyond POSIX.
6177 2004-05-04 Jakub Jelinek <jakub@redhat.com>
6179 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6180 Change conditional from ifdef to if.
6182 2004-04-23 Jakub Jelinek <jakub@redhat.com>
6184 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6185 SYSDEP_CANCEL_ERROR): Define.
6188 2004-05-01 Jakub Jelinek <jakub@redhat.com>
6190 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6192 2004-04-20 Jakub Jelinek <jakub@redhat.com>
6194 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6196 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6198 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6199 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6200 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6201 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6203 2004-04-19 Ulrich Drepper <drepper@redhat.com>
6205 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6206 thread has all signals blocked.
6208 2004-04-18 Andreas Jaeger <aj@suse.de>
6210 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6211 (SEM_VALUE_MAX): Add missing brace.
6213 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6215 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6217 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6218 * sysdeps/pthread/tst-mqueue8x.c: New test.
6219 * tst-cancel4.c: Update comment about message queues.
6221 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6222 return it_value { 0, 0 }.
6223 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6225 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6226 assertion for SIGEV_NONE.
6227 (thread_attr_compare): Compare all attributes, not just a partial
6230 2004-04-17 Jakub Jelinek <jakub@redhat.com>
6232 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6234 2004-04-17 Ulrich Drepper <drepper@redhat.com>
6236 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6237 Just use a plain number.
6238 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6239 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6240 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6241 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6242 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6243 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6244 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6246 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6248 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6250 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6252 2004-04-15 Jakub Jelinek <jakub@redhat.com>
6254 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6255 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6256 of calling sigwaitinfo.
6258 2004-04-16 Ulrich Drepper <drepper@redhat.com>
6260 * allocatestack.c (allocate_stack): Set reported_guardsize
6262 * pthread_getattr_np.c (pthread_getattr_np): Use
6263 reported_guardsize instead of guardsize.
6264 * descr.h (struct pthread): Add reported_guardsize field.
6266 2004-04-13 Jakub Jelinek <jakub@redhat.com>
6268 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6270 2004-04-12 Ulrich Drepper <drepper@redhat.com>
6272 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6274 2004-04-08 Jakub Jelinek <jakub@redhat.com>
6276 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6277 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6278 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6279 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6280 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6282 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6283 (_POSIX_MESSAGE_PASSING): Define.
6284 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6285 (_POSIX_MESSAGE_PASSING): Define.
6286 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6287 (_POSIX_MESSAGE_PASSING): Define.
6289 2004-04-04 Ulrich Drepper <drepper@redhat.com>
6291 * tst-context1.c (fct): Check whether correct stack is used.
6293 2004-04-03 Ulrich Drepper <drepper@redhat.com>
6295 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6296 matching constraints for asm mem parameters.
6298 * tst-clock2.c (tf): Don't define unless needed.
6300 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
6302 * Makefile (link-libc-static): Use $(static-gnulib) instead of
6305 2004-03-30 Ulrich Drepper <drepper@redhat.com>
6307 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6308 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6309 * pthreadP.h: Declare __nptl_deallocate_tsd.
6310 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6313 * Makefile (tests): Add tst-tsd5.
6314 * tst-tsd5.c: New file.
6316 2004-03-29 Ulrich Drepper <drepper@redhat.com>
6318 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6319 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6320 is SHLIB_COMPAT check.
6321 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6322 (__pthread_attr_getaffinity_old): Likewise.
6323 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6324 (__pthread_getaffinity_old): Likewise.
6325 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6326 (__pthread_setaffinity_old): Likewise.
6328 2004-03-26 Ulrich Drepper <drepper@redhat.com>
6330 * allocatestack.c (_make_stacks_executable): Call
6331 _dl_make_stack_executable first.
6333 2004-03-24 Roland McGrath <roland@redhat.com>
6335 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6336 constraint instead of "0".
6338 2004-03-24 Ulrich Drepper <drepper@redhat.com>
6340 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6341 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6343 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6344 code to avoid warning.
6346 2004-03-24 Andreas Jaeger <aj@suse.de>
6348 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6349 (__pthread_attr_setaffinity_old): Remove const.
6351 2004-03-23 Ulrich Drepper <drepper@redhat.com>
6353 * sysdeps/unix/sysv/linux/smp.h: New file.
6354 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6355 * init.c: Define __is_smp.
6356 (__pthread_initialize_minimal_internal): Call is_smp_system to
6357 initialize __is_smp.
6358 * pthreadP.h: Declare __is_smp.
6359 Define MAX_ADAPTIVE_COUNT is necessary.
6360 * pthread_mutex_init.c: Add comment regarding __spins field.
6361 * pthread_mutex_lock.c: Implement adaptive mutex type.
6362 * pthread_mutex_timedlock.c: Likewise.
6363 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6364 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6366 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6367 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6368 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6369 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6370 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6371 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6372 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6373 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6374 lll_mutex_cond_trylock.
6375 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6376 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6377 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6378 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6379 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6380 Define BUSY_WAIT_NOP.
6381 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6382 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6384 * tst-mutex5.c: Add support for testing adaptive mutexes.
6385 * tst-mutex7.c: Likewise.
6386 * tst-mutex5a.c: New file.
6387 * tst-mutex7a.c: New file.
6388 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6390 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6391 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6392 vgettimeofday call might destroy the content.
6394 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6397 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6398 No need to restrict type of ret. Make it int. Add comment.
6400 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6401 Remove unnecessary setne instruction.
6403 2004-03-22 Jakub Jelinek <jakub@redhat.com>
6405 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6406 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6407 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6408 If realloc fails, break out of the loop.
6410 2004-03-20 Andreas Jaeger <aj@suse.de>
6412 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6413 (__pthread_setaffinity_old): Fix interface.
6414 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6415 (__pthread_getaffinity_old): Likewise.
6417 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6418 (__pthread_setaffinity_new): Remove duplicate declaration.
6420 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6422 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6423 the return value to a safe register.
6424 (CDISABLE): Set the function argument correctly.
6426 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6428 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6429 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6430 Rewrite so that only one locked memory operation per round is needed.
6431 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6432 (pthread_barrier_wait): After wakeup, release lock only when the
6433 last thread stopped using the barrier object.
6434 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6435 (__pthread_cond_wait): Don't store mutex address if the current
6436 value is ~0l. Add correct cleanup support and unwind info.
6437 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6438 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6439 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6440 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6441 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6442 Add correct cleanup support and unwind info.
6443 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6444 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6445 information for syscall wrappers.
6447 2004-03-18 Ulrich Drepper <drepper@redhat.com>
6449 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6450 cpusetsize field, remove next.
6451 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6452 parameter for size of the CPU set.
6453 (pthread_setaffinity_np): Likewise.
6454 (pthread_attr_getaffinity_np): Likewise.
6455 (pthread_attr_setaffinity_np): Likewise.
6456 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6457 interface change, keep compatibility code.
6458 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6459 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6460 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6461 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
6462 __pthread_getaffinity_np.
6463 * Versions: Add version for changed interfaces.
6464 * tst-attr3.c: Adjust test for interface change.
6465 * pthread_getattr_np.c: Query the kernel about the affinity mask with
6466 increasing buffer sizes.
6467 * pthread_attr_destroy.c: Remove unused list handling.
6468 * pthread_attr_init.c: Likewise.
6470 2004-03-17 Roland McGrath <roland@redhat.com>
6472 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6473 first argument to clock_getres so we ever enable kernel timers.
6475 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
6477 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6479 2004-03-12 Richard Henderson <rth@redhat.com>
6481 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6482 oldvalue from CENABLE to CDISABLE.
6484 2004-03-12 Ulrich Drepper <drepper@redhat.com>
6486 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6487 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6488 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6489 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6491 2004-03-11 Richard Henderson <rth@redhat.com>
6493 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6494 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6495 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6497 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6499 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6500 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6501 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6503 2004-03-11 Jakub Jelinek <jakub@redhat.com>
6505 * forward.c (__pthread_cond_broadcast_2_0,
6506 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6507 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6508 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6510 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6512 * sysdeps/sh/tcb-offsets.sym: Add PID.
6513 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6514 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6516 2004-03-10 Ulrich Drepper <drepper@redhat.com>
6518 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6519 include <sysdep-cancel.h>, vfork is no cancellation point.
6520 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6521 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6522 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6524 2004-03-10 Jakub Jelinek <jakub@redhat.com>
6526 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6528 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6529 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6531 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6533 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6534 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6535 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6536 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6537 of DO_CALL_VIA_BREAK. Work around a gas problem.
6539 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6540 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6541 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6542 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6543 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6544 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6546 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6547 a local register for saving old PID. Negate PID in parent upon exit.
6549 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6551 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6552 before syscall, set to the old value in the parent afterwards.
6553 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6554 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6556 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6557 before syscall, set to the old value in the parent afterwards.
6558 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6559 * sysdeps/s390/tcb-offsets.sym: Add PID.
6561 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6562 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6563 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6564 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6565 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6566 * sysdeps/sparc/tcb-offsets.sym: Add PID.
6568 2004-03-10 Andreas Schwab <schwab@suse.de>
6570 * sysdeps/ia64/tcb-offsets.sym: Add PID.
6571 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6572 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6574 2004-03-09 Jakub Jelinek <jakub@redhat.com>
6576 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6577 * tst-cancel21.c (do_one_test): Likewise.
6578 Reported by Gordon Jin <gordon.jin@intel.com>.
6580 2004-02-09 Jakub Jelinek <jakub@redhat.com>
6582 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6583 if non-zero and set to INT_MIN if zero.
6584 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6585 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6586 (SAVE_PID, RESTORE_PID): Define.
6588 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6589 Use relative path to avoid including NPTL i386/vfork.S.
6590 (SAVE_PID, RESTORE_PID): Define.
6591 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6592 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6593 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6595 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6596 * tst-vfork1.c: New test.
6597 * tst-vfork2.c: New test.
6598 * tst-vfork1x.c: New test.
6599 * tst-vfork2x.c: New test.
6601 2004-03-08 Ulrich Drepper <drepper@redhat.com>
6603 * sysdeps/i386/tcb-offsets.sym: Add PID.
6604 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6605 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6606 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6608 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
6610 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6612 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
6614 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6617 2004-03-07 Ulrich Drepper <drepper@redhat.com>
6619 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6622 * tst-once4.c: Remove unnecessary macro definition.
6624 * tst-mutex7.c (do_test): Limit thread stack size.
6625 * tst-once2.c (do_test): Likewise.
6626 * tst-tls3.c (do_test): Likewise.
6627 * tst-tls1.c (do_test): Likewise.
6628 * tst-signal3.c (do_test): Likewise.
6629 * tst-kill6.c (do_test): Likewise.
6630 * tst-key4.c (do_test): Likewise.
6631 * tst-join4.c (do_test): Likewise.
6632 * tst-fork1.c (do_test): Likewise.
6633 * tst-context1.c (do_test): Likewise.
6634 * tst-cond2.c (do_test): Likewise.
6635 * tst-cond10.c (do_test): Likewise.
6636 * tst-clock2.c (do_test): Likewise.
6637 * tst-cancel10.c (do_test): Likewise.
6638 * tst-basic2.c (do_test): Likewise.
6639 * tst-barrier4.c (do_test): Likewise.
6641 2004-03-05 Ulrich Drepper <drepper@redhat.com>
6643 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6645 2004-03-01 Ulrich Drepper <drepper@redhat.com>
6647 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6648 (__pthread_cond_timedwait): Optimize wakeup test.
6649 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6650 (__pthread_cond_wait): Likewise.
6651 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6652 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6655 2004-02-29 Ulrich Drepper <drepper@redhat.com>
6657 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6658 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
6659 the atomic instruction needed.
6660 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6661 (__lll_mutex_lock_wait): Likewise.
6663 2004-02-28 Ulrich Drepper <drepper@redhat.com>
6665 * Makefile (tests): Add tst-cond14 and tst-cond15.
6666 * tst-cond14.c: New file.
6667 * tst-cond15.c: New file.
6669 2004-02-27 Ulrich Drepper <drepper@redhat.com>
6671 * sysdeps/pthread/createthread.c (create_thread): Remove use of
6672 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
6673 needs to be implemented differently to be useful.
6675 2004-02-26 Ulrich Drepper <drepper@redhat.com>
6677 * pthread_attr_setschedparam.c: Don't test priority against limits
6678 here. Set ATTR_FLAG_SCHED_SET flag.
6679 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
6680 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
6681 from parent thread to child. If attribute is used and scheduling
6682 parameters are not inherited, copy parameters from attribute or
6683 compute them. Check priority value.
6684 * pthread_getschedparam.c: If the parameters aren't known yet get
6685 them from the kernel.
6686 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
6687 ATTR_FLAG_POLICY_SET flag for thread.
6688 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
6689 and ATTR_FLAG_POLICY_SET.
6691 * sysdeps/pthread/createthread.c: Use tgkill if possible.
6693 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
6694 fail if stack address hasn't been set. Just return 0.
6696 2004-02-25 Ulrich Drepper <drepper@redhat.com>
6698 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
6699 libpthread for the files in this list.
6700 (CFLAGS-tst-unload): Removed.
6701 * tst-unload.c (do_test): Don't use complete path for
6704 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
6707 2004-02-22 Ulrich Drepper <drepper@redhat.com>
6709 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6710 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
6711 operation per round is needed.
6712 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6713 (__lll_mutex_lock_wait): Likewise.
6715 2004-02-20 Ulrich Drepper <drepper@redhat.com>
6717 * tst-cancel9.c (cleanup): Don't print to stderr.
6719 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6721 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
6723 2004-02-20 Jakub Jelinek <jakub@redhat.com>
6725 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
6726 (__syscall_error_handler2): Call CDISABLE.
6727 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
6728 (__syscall_error_handler2): Call CDISABLE.
6730 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6731 Release lock before the loop, don't reacquire it.
6733 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
6735 2004-02-19 Andreas Schwab <schwab@suse.de>
6737 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6740 2004-02-18 Ulrich Drepper <drepper@redhat.com>
6742 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6743 (pthread_barrier_wait): After wakeup, release lock only when the
6744 last thread stopped using the barrier object.
6745 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6746 (pthread_barrier_wait): Likewise.
6747 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6749 * Makefile (tests): Add tst-barrier4.
6750 * tst-barrier4.c: New file.
6752 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6753 (__pthread_cond_timedwait): Perform timeout test while holding
6754 internal lock to prevent wakeup race.
6755 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6756 * sysdeps/pthread/pthread_cond_timedwait.c
6757 (__pthread_cond_timedwait): Likewise.
6758 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6759 (__pthread_cond_timedwait): Likewise.
6761 2004-02-18 Jakub Jelinek <jakub@redhat.com>
6763 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6764 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6765 * Makefile (tests): Add tst-rwlock13.
6766 * tst-rwlock13.c: New test.
6768 2004-02-16 Ulrich Drepper <drepper@redhat.com>
6770 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6771 (__condvar_tw_cleanup): Little optimization.
6772 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6774 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
6776 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6777 libpthread as "lib" parameter to SHLIB_COMPAT.
6778 (__novmx_siglongjmp): Fix typo in function name.
6779 (__novmx_longjmp): Fix typo in function name.
6781 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6783 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6786 * sysdeps/generic/pt-longjmp.c: Moved to...
6787 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
6789 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
6791 * Makefile (libpthread-routines): Add pt-cleanup.
6792 * pt-longjmp.c: Removed.
6793 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6794 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6795 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6796 Version longjmp, siglongjmp for GLIBC_2.3.4.
6797 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6799 2004-02-13 Ulrich Drepper <drepper@redhat.com>
6801 * sysdeps/pthread/pthread_cond_timedwait.c
6802 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
6803 Reuse code. Add __builtin_expects.
6805 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6806 (__pthread_cond_timedwait): Get internal lock in case timeout has
6807 passed before the futex syscall.
6808 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6810 2004-01-20 Ulrich Drepper <drepper@redhat.com>
6812 * allocatestack.c: Pretty printing.
6814 * sysdeps/pthread/createthread.c (create_thread): Don't add
6815 CLONE_DETACHED bit if it is not necessary.
6817 2004-01-16 Ulrich Drepper <drepper@redhat.com>
6819 * pthread_getattr_np.c: Include ldsodefs.h.
6821 2004-01-16 Richard Henderson <rth@redhat.com>
6823 * allocatestack.c: Don't declare __libc_stack_end.
6824 * init.c (__pthread_initialize_minimal_internal): Likewise.
6825 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6827 2004-01-15 Richard Henderson <rth@redhat.com>
6829 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6830 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6831 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6832 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6833 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6834 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6835 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6836 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6838 2004-01-14 Ulrich Drepper <drepper@redhat.com>
6840 * init.c (pthread_functions): Make array const.
6842 2004-01-13 Ulrich Drepper <drepper@redhat.com>
6844 * allocatestack.c (__make_stacks_executable): Change interface.
6845 Check parameters. Pass parameter on to libc counterpart.
6846 * pthreadP.h: Change declaration.
6848 2004-01-13 Richard Henderson <rth@redhat.com>
6850 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6852 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6855 * sysdeps/alpha/Makefile: New file.
6856 * sysdeps/alpha/tcb-offsets.sym: New file.
6857 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6858 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6860 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6863 2004-01-08 Jakub Jelinek <jakub@redhat.com>
6865 * Makefile (tests): Add tst-backtrace1.
6866 * tst-backtrace1.c: New test.
6868 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
6870 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6871 register as second parameter to the REGISTER macro.
6872 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6873 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6874 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6875 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6876 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6877 of thread register as second parameter to REGISTER macro in 64 case.
6879 2004-01-03 Ulrich Drepper <drepper@redhat.com>
6881 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6882 (CFLAGS-getpid.o): Defined.
6883 (CFLAGS-getpid.os): Defined.
6885 2003-12-31 Ulrich Drepper <drepper@redhat.com>
6887 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6888 returned for main thread does not overlap with any other VMA.
6889 Patch by Jakub Jelinek.
6891 2003-12-29 Jakub Jelinek <jakub@redhat.com>
6893 * tst-raise1.c: Include stdio.h.
6895 2003-12-23 Jakub Jelinek <jakub@redhat.com>
6897 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6898 setting with __ASSUME_TGKILL || defined __NR_tgkill.
6899 If pid is 0, set it to selftid.
6900 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6901 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
6902 != 0, return self->tid without doing a syscall.
6903 * descr.h (struct pthread): Move pid field after tid.
6905 * Makefile (tests): Add tst-raise1.
6906 * tst-raise1.c: New file.
6908 2003-12-23 Roland McGrath <roland@redhat.com>
6910 * tst-oddstacklimit.c: New file.
6911 * Makefile (tests): Add it.
6912 (tst-oddstacklimit-ENV): New variable.
6914 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6915 value up to page size for __default_stacksize.
6917 2003-12-21 Ulrich Drepper <drepper@redhat.com>
6919 * Makefile (tests): Add tst-eintr5.
6920 * tst-eintr5.c: New file.
6922 * eintr.c (eintr_source): Prevent sending signal to self.
6924 * tst-eintr2.c (tf1): Improve error message.
6926 2003-12-20 Ulrich Drepper <drepper@redhat.com>
6928 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6929 * sysdeps/unix/sysv/linux/getpid.c: New file.
6930 * pthread_cancel.c: Add comment explaining use of PID field.
6931 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6932 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6933 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6934 temporarily to signal the field must not be relied on and updated
6936 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6937 temporarily negative.
6938 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6940 2003-12-19 Ulrich Drepper <drepper@redhat.com>
6942 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
6943 (eintr_source): If ARG != NULL, use pthread_kill.
6944 * tst-eintr1.c: Adjust for this change.
6945 * tst-eintr2.c: Likewise.
6946 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6947 * tst-eintr3.c: New file.
6948 * tst-eintr4.c: New file.
6950 2003-12-19 Jakub Jelinek <jakub@redhat.com>
6952 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6953 if CANCELSTATE_BITMASK is set.
6954 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6957 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6958 (tests-reverse): Add tst-cancel23.
6959 * tst-cancel22.c: New test.
6960 * tst-cancel23.c: New test.
6962 2003-12-18 Ulrich Drepper <drepper@redhat.com>
6964 * tst-eintr1.c: Better error messages.
6966 * Makefile (tests): Add tst-eintr2.
6967 * tst-eintr2.c: New file.
6969 2003-12-18 Jakub Jelinek <jakub@redhat.com>
6971 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6972 (CFLAGS-tst-cancelx21.c): Set.
6973 * tst-cancel21.c: New test.
6974 * tst-cancelx21.c: New test.
6976 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
6978 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6979 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
6980 * pt-longjmp.c: Include jmpbuf-unwind.h.
6981 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6982 _JMPBUF_UNWINDS. Adjust compared pointers.
6983 * init.c (__pthread_initialize_minimal_internal): Initialize
6984 pd->stackblock_size.
6985 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6986 * sysdeps/alpha/jmpbuf-unwind.h: New file.
6987 * sysdeps/i386/jmpbuf-unwind.h: New file.
6988 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6989 * sysdeps/s390/jmpbuf-unwind.h: New file.
6990 * sysdeps/sh/jmpbuf-unwind.h: New file.
6991 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6992 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6993 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6994 (_JMPBUF_CFA_UNWINDS): Remove.
6995 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6997 2003-12-12 Jakub Jelinek <jakub@redhat.com>
6999 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7000 (CFLAGS-tst-cancelx20.c): Set.
7001 * tst-cancel20.c: New test.
7002 * tst-cancelx20.c: New test.
7004 2003-12-17 Ulrich Drepper <drepper@redhat.com>
7006 * init.c (__pthread_initialize_minimal_internal): Don't treat
7007 architectures with separate register stack special here when
7008 computing default stack size.
7010 2003-12-17 Roland McGrath <roland@redhat.com>
7012 * Makefile (tst-cancelx7-ARGS): New variable.
7013 Reportd by Greg Schafer <gschafer@zip.com.au>.
7015 2003-12-17 Jakub Jelinek <jakub@redhat.com>
7017 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
7018 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7019 (tst-stack3-ENV): Set.
7020 ($(objpfx)tst-stack3-mem): New.
7021 * tst-stack3.c: New test.
7023 2003-12-10 David Mosberger <davidm@hpl.hp.com>
7025 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7026 Add unwind directives. Drop unused .regstk directive.
7027 (_fini_EPILOG_BEGINS): Add unwind directives.
7029 2003-12-11 Ulrich Drepper <drepper@redhat.com>
7031 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7032 Assume parameter is a pointer.
7033 (lll_futex_wake): Likewise.
7034 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7036 (lll_futex_wake): Likewise.
7037 Reported by Boris Hu.
7038 * sysdeps/unix/sysv/linux/unregister-atfork.c
7039 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7041 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7043 2003-12-10 Ulrich Drepper <drepper@redhat.com>
7045 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7046 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7047 __rtld_lock_initialize for ld.so lock.
7048 Patch in part by Adam Li <adam.li@intel.com>.
7050 2003-12-02 David Mosberger <davidm@hpl.hp.com>
7052 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7053 in $(gnulib). Also, remove stale comment.
7055 2003-11-12 David Mosberger <davidm@hpl.hp.com>
7057 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7058 advantage of new syscall stub and optimize accordingly.
7060 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7061 from SYS_futex, to match expectations of
7062 sysdep.h:DO_INLINE_SYSCALL.
7063 (lll_futex_clobbers): Remove.
7064 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7065 (lll_futex_wake): Likewise.
7066 (lll_futex_requeue): Likewise.
7067 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7068 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7070 (__lll_mutex_lock): Likewise.
7071 (__lll_mutex_cond_lock): Likewise.
7072 (__lll_mutex_timed_lock): Likewise.
7073 (__lll_mutex_unlock): Likewise.
7074 (__lll_mutex_unlock_force): Likewise.
7076 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7077 comes before the include of <sysdep.h>.
7078 (THREAD_SELF_SYSINFO): New macro.
7079 (THREAD_SYSINFO): Likewise.
7080 (INIT_SYSINFO): New macro.
7081 (TLS_INIT_TP): Call INIT_SYSINFO.
7083 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7085 * sysdeps/pthread/createthread.c (create_thread): Use
7086 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7087 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7088 THREAD_SELF_SYSINFO instead of open code.
7089 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7090 (THREAD_SYSINFO): Likewise.
7092 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7094 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7096 2003-12-06 Ulrich Drepper <drepper@redhat.com>
7098 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7099 instead of .init. Patch by David Mosberger.
7101 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
7103 * sysdeps/pthread/configure.in: Remove broken declaration in C
7104 cleanup handling check.
7106 2003-11-30 Andreas Jaeger <aj@suse.de>
7108 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7109 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7112 2003-11-27 Jakub Jelinek <jakub@redhat.com>
7114 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7115 * pthread_attr_destroy.c: Include shlib-compat.h.
7116 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7117 is set in iattr->flags.
7118 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7120 2003-11-21 Jakub Jelinek <jakub@redhat.com>
7122 * Makefile (distribute): Add tst-cleanup4aux.c.
7124 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
7127 2003-11-21 Ulrich Drepper <drepper@redhat.com>
7129 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7130 pthread_cond_signal.
7132 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7133 store mutex address if the current value is ~0l.
7134 * sysdeps/pthread/pthread_cond_timedwait.c
7135 (__pthread_cond_timedwait): Likewise.
7136 * sysdeps/pthread/pthread_cond_broadcast.c
7137 (__pthread_cond_broadcast): Don't use requeue for pshared
7140 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7141 (__pthread_cond_wait): Don't store mutex address if the current
7143 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7144 (__pthread_cond_timedwait): Likewise.
7145 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7146 (__pthread_cond_broadcast): Don't use requeue for pshared
7149 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7150 element with ~0l for pshared condvars, with NULL otherwise.
7152 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7153 (__pthread_cond_wait): Don't store mutex address if the current
7155 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7156 (__pthread_cond_timedwait): Likewise.
7157 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7158 (__pthread_cond_broadcast): Don't use requeue for pshared
7161 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7162 * tst-cond12.c: New file.
7163 * tst-cond13.c: New file.
7165 2003-11-17 Ulrich Drepper <drepper@redhat.com>
7167 * sysdeps/pthread/configure.in: Make missing forced unwind support
7170 2003-11-11 Ulrich Drepper <drepper@redhat.com>
7172 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7174 2003-11-06 Ulrich Drepper <drepper@redhat.com>
7176 * Makefile: Add magic to clean up correctly.
7178 2003-11-05 Jakub Jelinek <jakub@redhat.com>
7180 * unwind.c (FRAME_LEFT): Define.
7181 (unwind_stop): Handle old style cleanups here.
7182 (__pthread_unwind): Handle old style cleanups only if
7183 !HAVE_FORCED_UNWIND.
7184 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7185 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7186 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7187 ($(objpfx)tst-cleanupx4): Likewise.
7188 * tst-cleanup4.c: New test.
7189 * tst-cleanup4aux.c: New.
7190 * tst-cleanupx4.c: New test.
7192 2003-11-04 Ulrich Drepper <drepper@redhat.com>
7194 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7195 lll_mutex_*lock macros to skip atomic operations on some archs.
7197 2003-11-03 Ulrich Drepper <drepper@redhat.com>
7199 * sysdeps/pthread/tst-timer.c (main): Initialize
7200 sigev2.sigev_value as well.
7202 2003-10-15 Roland McGrath <roland@redhat.com>
7204 * sysdeps/pthread/configure.in: Barf if visibility attribute support
7206 * sysdeps/pthread/configure: Regenerated.
7208 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7210 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7211 locking macros. No distinction between normal and mutex locking
7213 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7214 Merge bits from lowlevelmutex.S we still need.
7215 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7216 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7217 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7218 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7219 new mutex implementation.
7220 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7221 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7222 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7223 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7224 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7225 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7226 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7227 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7228 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7229 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7230 symbol for entry point to avoid cancellation.
7232 2003-10-07 Jakub Jelinek <jakub@redhat.com>
7234 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7236 (SAVE_OLDTYPE_0): Fix a typo.
7238 2003-10-03 Ulrich Drepper <drepper@redhat.com>
7240 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7241 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
7243 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7245 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7248 2003-10-02 Jakub Jelinek <jakub@redhat.com>
7250 * Makefile (tests): Add tst-cancel19.
7251 * tst-cancel19.c: New test.
7253 2003-10-02 Ulrich Drepper <drepper@redhat.com>
7255 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7256 restoring of the old cancellation type.
7258 2003-09-30 Jakub Jelinek <jakub@redhat.com>
7260 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7262 2003-09-27 Wolfram Gloger <wg@malloc.de>
7264 * sysdeps/pthread/malloc-machine.h: New file
7266 2003-09-24 Roland McGrath <roland@redhat.com>
7268 * allocatestack.c (__make_stacks_executable): Don't ignore return
7269 value from _dl_make_stack_executable.
7271 2003-09-24 Ulrich Drepper <drepper@redhat.com>
7273 * allocatestack.c (__make_stacks_executable): Also change
7274 permission of the currently unused stacks.
7276 * allocatestack.c (change_stack_perm): Split out from
7277 __make_stacks_executable.
7278 (allocate_stack): If the required permission changed between the time
7279 we started preparing the stack and queueing it, change the permission.
7280 (__make_stacks_executable): Call change_stack_perm.
7282 * Makefile: Build tst-execstack-mod locally.
7283 * tst-execstack-mod.c: New file.
7285 2003-09-23 Jakub Jelinek <jakub@redhat.com>
7287 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7289 2003-09-23 Roland McGrath <roland@redhat.com>
7291 * tst-execstack.c: New file.
7292 * Makefile (tests): Add it.
7293 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7294 (LDFLAGS-tst-execstack): New variable.
7296 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7297 whether to use PROT_EXEC for stack mmap.
7298 (__make_stacks_executable): New function.
7299 * pthreadP.h: Declare it.
7300 * init.c (__pthread_initialize_minimal_internal): Set
7301 GL(dl_make_stack_executable_hook) to that.
7303 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7305 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7306 recommendation from AMD re avoidance of lock prefix.
7308 2003-09-22 Jakub Jelinek <jakub@redhat.com>
7310 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7311 lll_futex_timed_wait instead of lll_futex_wait.
7312 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7313 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7314 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7315 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7316 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7317 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7318 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7319 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7320 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7321 Completely revamp the locking macros. No distinction between
7322 normal and mutex locking anymore.
7323 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7324 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7325 __lll_lock_timedwait): Fix prototypes.
7326 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7327 __lll_lock_timedwait): Likewise.
7328 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7329 macros, add __builtin_expect.
7330 (lll_mutex_timedlock): Likewise. Fix return value.
7331 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7332 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7333 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7334 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7335 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7336 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7337 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7338 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7340 2003-09-22 Ulrich Drepper <drepper@redhat.com>
7342 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7343 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7344 operation if possible.
7346 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7347 like jumping over the lock prefix.
7349 2003-09-21 Ulrich Drepper <drepper@redhat.com>
7351 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7352 locking macros. No distinction between normal and mutex locking
7354 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7355 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7356 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7357 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7358 locking. Merge bits from lowlevelmutex.S we still need.
7359 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7360 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7361 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7362 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7363 * Makefile (routines): Remove libc-lowlevelmutex.
7364 (libpthread-rountines): Remove lowlevelmutex.
7365 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7366 for new mutex implementation.
7367 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7368 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7369 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7370 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7371 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7373 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7375 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7376 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7377 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7378 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7379 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7380 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7381 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7382 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7384 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7386 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7387 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7388 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7390 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7391 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7393 2003-09-20 Ulrich Drepper <drepper@redhat.com>
7395 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7396 in parameters of asm with output parameters.
7398 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7399 type of DECR parameter to int.
7400 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7402 2003-09-18 Jakub Jelinek <jakub@redhat.com>
7404 * tst-attr3.c (tf, do_test): Print stack start/end/size and
7405 guardsize for each thread.
7407 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7409 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7410 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7411 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7413 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7414 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7416 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7417 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7418 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7419 (pthread_getaffinity_np): Add hidden_def.
7421 * Makefile (tests): Add tst-attr3.
7422 * tst-attr3.c: New test.
7424 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7426 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7428 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7429 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7431 2003-09-17 Jakub Jelinek <jakub@redhat.com>
7433 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7434 * tst-align.c: Include tst-stack-align.h.
7435 (tf, do_test): Use TEST_STACK_ALIGN macro.
7437 2003-09-17 Ulrich Drepper <drepper@redhat.com>
7439 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7442 2003-09-16 Ulrich Drepper <drepper@redhat.com>
7444 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7445 stack-related values for the initial thread.
7447 2003-09-15 Jakub Jelinek <jakub@redhat.com>
7449 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7451 2003-09-11 Ulrich Drepper <drepper@redhat.com>
7453 * pthread_mutex_lock.c: Minor code rearrangements.
7455 2003-09-05 Roland McGrath <roland@redhat.com>
7457 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7458 Instead, include ../nptl_db/db_info.c to do its magic.
7459 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7460 (__pthread_pthread_key_2ndlevel_size): Likewise.
7461 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7462 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7463 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7464 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7465 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7466 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7467 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7468 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7469 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7470 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7471 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7472 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7473 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7474 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7475 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7476 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7477 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7479 2003-09-08 Ulrich Drepper <drepper@redhat.com>
7481 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7482 of pthread_t to be compatible with LT.
7483 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7484 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7485 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7486 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7487 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7488 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7489 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7491 2003-09-04 Ulrich Drepper <drepper@redhat.com>
7493 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7495 2003-09-04 Jakub Jelinek <jakub@redhat.com>
7497 * unwind-forcedunwind.c: Move to...
7498 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7499 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7500 * sysdeps/pthread/jmpbuf-unwind.h: New file.
7501 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7502 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7503 * unwind.c: Include jmpbuf-unwind.h.
7504 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7506 2003-09-02 Jakub Jelinek <jakub@redhat.com>
7508 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7509 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7510 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7511 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7512 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7513 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7514 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7515 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7516 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7517 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7518 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7520 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7521 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7522 * Makefile (tests): Add tst-stack2.
7523 * tst-stack2.c: New test.
7524 * tst-stack1.c: Include limits.h and sys/param.h.
7525 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7527 * pthread_condattr_setpshared.c: Include errno.h.
7528 (pthread_condattr_setpshared): Return EINVAL if pshared
7529 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7531 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7532 defined symbol for entry point to avoid cancellation.
7533 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7535 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7537 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7539 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7541 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7543 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7544 __close_nocancel, __read_nocancel, __write_nocancel,
7545 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
7546 libpthread.so or librt.so, define to corresponding function
7547 without _nocancel suffix.
7548 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7549 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7550 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7552 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7554 2003-09-02 Ulrich Drepper <drepper@redhat.com>
7556 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7557 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7559 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7560 in subsections has a symbol associated with it.
7562 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7563 defined symbol for entry point to avoid cancellation.
7564 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7566 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7568 * Makefile (tests): Add tst-tls5.
7569 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7570 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7571 ($(objpfx)tst-tls5): New.
7572 ($(objpfx)tst-tls6.out): Likewise.
7573 (tests): Depend on $(objpfx)tst-tls6.out.
7574 * tst-tls3.c: Include stdint.h and pthreaddef.h.
7575 (do_test): Check pthread_self () return value alignment.
7576 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7577 (tf): Check pthread_self () return value alignment.
7578 * tst-tls5.c: New test.
7580 * tst-tls5mod.c: New.
7581 * tst-tls5moda.c: New.
7582 * tst-tls5modb.c: New.
7583 * tst-tls5modc.c: New.
7584 * tst-tls5modd.c: New.
7585 * tst-tls5mode.c: New.
7586 * tst-tls5modf.c: New.
7587 * tst-tls6.sh: New test.
7589 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7590 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7591 * init.c (pthread_functions): Initialize them.
7592 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7593 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7594 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7595 pthread_cond_timedwait@@GLIBC_2.3.2.
7597 2003-09-01 Jakub Jelinek <jakub@redhat.com>
7599 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7600 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7601 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7602 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7603 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7604 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7606 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7608 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7609 _POSIX_THREAD_PRIORITY_SCHEDULING.
7610 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7612 2003-08-31 Ulrich Drepper <drepper@redhat.com>
7614 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7615 nested function, use static inline function from libio.h.
7616 Code by Richard Henderson.
7618 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7621 2003-08-30 Jakub Jelinek <jakub@redhat.com>
7623 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7624 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7625 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7626 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7627 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7628 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7629 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7630 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7631 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7632 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7633 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7634 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7635 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7636 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7637 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7638 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7639 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7640 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7641 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7642 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7643 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7644 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7645 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7646 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7647 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7648 * sysdeps/sparc/tls.h: New file.
7649 * sysdeps/sparc/tcb-offsets.sym: New file.
7650 * sysdeps/sparc/Makefile: New file.
7651 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7652 * init.c [__sparc__] (__NR_set_tid_address): Define.
7654 2003-08-29 Jakub Jelinek <jakub@redhat.com>
7656 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7657 _IO_release_lock): Define.
7659 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
7661 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7662 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
7664 2003-08-27 Ulrich Drepper <drepper@redhat.com>
7666 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
7667 (__pthread_cleanup_class): Add missing return types of member
7670 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
7672 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7673 (lll_mutex_unlock_force): Add memory barrier between store and futex
7676 2003-08-25 Ulrich Drepper <drepper@redhat.com>
7678 * tst-cancel4.c (do_test): Also unlink tempfname and remove
7679 tempmsg in first loop.
7681 2003-08-18 Ulrich Drepper <drepper@redhat.com>
7683 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7684 _POSIX_THREAD_PRIORITY_SCHEDULING.
7685 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7687 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7689 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
7690 (__rtld_lock_default_lock_recursive,
7691 __rtld_lock_default_unlock_recursive): Define.
7692 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
7693 __rtld_lock_unlock_recursive): Define using
7694 GL(_dl_rtld_*lock_recursive).
7695 * init.c (__pthread_initialize_minimal_internal): Initialize
7696 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
7697 Lock GL(_dl_load_lock) the same number of times as
7698 GL(_dl_load_lock) using non-mt implementation was nested.
7700 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
7701 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
7703 2003-08-06 Jakub Jelinek <jakub@redhat.com>
7705 * tst-cancel17.c (do_test): Make len2 maximum of page size and
7708 2003-08-07 Jakub Jelinek <jakub@redhat.com>
7710 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
7712 2003-08-03 Jakub Jelinek <jakub@redhat.com>
7714 * sysdeps/pthread/createthread.c (do_clone): Move error handling
7715 to first syscall error check. Move syscall error check for tkill
7716 into __ASSUME_CLONE_STOPPED #ifdef.
7718 2003-08-02 Ulrich Drepper <drepper@redhat.com>
7720 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
7721 is not defined, do explicit synchronization.
7722 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
7723 is not defined also unlock pd->lock for non-debugging case in case
7725 * pthread_create.c (start_thread): Always get and release pd->lock
7726 if __ASSUME_CLONE_STOPPED is not defined.
7727 (start_thread_debug): Removed. Adjust users.
7728 * allocatestack.c (allocate_stack): Always initialize lock if
7729 __ASSUME_CLONE_STOPPED is not defined.
7730 * Makefile (tests): Add tst-sched1.
7731 * tst-sched1.c: New file.
7733 * sysdeps/pthread/createthread.c (do_clone): Only use
7734 sched_setschduler and pass correct parameters.
7736 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7738 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7739 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7740 PTHREAD_STACK_MIN in comments.
7742 2003-07-31 Jakub Jelinek <jakub@redhat.com>
7744 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7745 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7747 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7748 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7749 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7750 (__pthread_cleanup_upto): Fix prototype.
7751 (_longjmp_unwind): Adjust caller.
7752 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7753 Change second argument to const struct pointer.
7754 * tst-sem8.c (main): Remove unused s2 and s3 variables.
7755 * tst-sem9.c (main): Likewise.
7756 * unwind.c: Include string.h for strlen prototype.
7758 2003-07-31 Ulrich Drepper <drepper@redhat.com>
7760 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7761 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7762 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7764 Patch by Nicholas Miell <nmiell@attbi.com>.
7766 2003-07-30 Jakub Jelinek <jakub@redhat.com>
7768 * init.c (__pthread_initialize_minimal_internal): Initialize
7769 GL(dl_init_static_tls).
7770 * pthreadP.h (__pthread_init_static_tls): New prototype.
7771 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7773 * Makefile (tests): Add tst-tls4.
7774 (modules-names): Add tst-tls4moda and tst-tls4modb.
7775 ($(objpfx)tst-tls4): Link against libdl and libpthread.
7776 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7778 * tst-tls4.c: New file.
7779 * tst-tls4moda.c: New file.
7780 * tst-tls4modb.c: New file.
7782 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
7784 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7785 before __timer_dealloc.
7786 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7787 Don't call list_unlink.
7789 2003-07-29 Roland McGrath <roland@redhat.com>
7791 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7793 2003-07-25 Jakub Jelinek <jakub@redhat.com>
7795 * tst-cancel17.c (do_test): Check if aio_cancel failed.
7796 Don't reuse struct aiocb A if it failed.
7797 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7798 not just one byte, as that does not block.
7800 2003-07-22 Jakub Jelinek <jakub@redhat.com>
7802 * sysdeps/pthread/unwind-resume.c: New file.
7803 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7804 unwind-resume in csu subdir.
7805 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7807 (librt-sysdep_routines, librt-shared-only-routines): Add
7809 * sysdeps/pthread/rt-unwind-resume.c: New file.
7810 * unwind-forcedunwind.c: New file.
7811 * Makefile (libpthread-routines): Add unwind-forcedunwind.
7812 (libpthread-shared-only-routines): Likewise.
7813 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7814 * pthreadP.h (pthread_cancel_init): New prototype.
7815 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7817 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7818 attr argument const struct pthread_attr *.
7820 * res.c (__res_state): Return __resp.
7821 * descr.h: Include resolv.h.
7822 (struct pthread): Add res field.
7823 * pthread_create.c: Include resolv.h.
7824 (start_thread): Initialize __resp.
7825 * Makefile (tests): Add tst-_res1.
7826 (module-names): Add tst-_res1mod1, tst-_res1mod2.
7827 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7828 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7830 * tst-_res1.c: New file.
7831 * tst-_res1mod1.c: New file.
7832 * tst-_res1mod2.c: New file.
7834 2003-07-21 Ulrich Drepper <drepper@redhat.com>
7836 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7838 * Makefile: Define various *-no-z-defs variables for test DSOs
7839 which has undefined symbols.
7841 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
7843 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7844 Retry if the stwcx fails to store once_control.
7846 2003-07-20 Ulrich Drepper <drepper@redhat.com>
7848 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7849 pthread_attr_setaffinity.
7850 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7851 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7852 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7853 * pthread_attr_destroy.c: Free cpuset element if allocated.
7854 * pthread_create.c: Pass iattr as additional parameter to
7856 * sysdeps/pthread/createthread.c: If attribute is provided and
7857 a new thread is created with affinity set or scheduling parameters,
7858 start thread with CLONE_STOPPED.
7859 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7860 pthread_attr_setaffinity.
7861 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7864 2003-07-15 Ulrich Drepper <drepper@redhat.com>
7866 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7868 2003-07-14 Ulrich Drepper <drepper@redhat.com>
7870 * sysdeps/pthread/configure.in: Require CFI directives also for
7873 2003-07-15 Jakub Jelinek <jakub@redhat.com>
7875 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7878 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7880 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7882 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7883 registers as variables. Call __pthread_mutex_unlock_usercnt.
7884 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7885 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7886 not self pointer in __writer. Compare with TID to determine
7888 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7889 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7891 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7893 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7894 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7895 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7896 macros also when compiling librt.
7898 2003-07-11 Jakub Jelinek <jakub@redhat.com>
7900 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7901 -fasynchronous-unwind-tables.
7902 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7903 (PSEUDO): Add cfi directives.
7904 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7906 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7909 2003-07-08 Jakub Jelinek <jakub@redhat.com>
7911 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7912 __pthread_unregister_cancel): Add prototypes and hidden_proto.
7913 * unwind.c (__pthread_unwind_next): Add hidden_def.
7914 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7916 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7917 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7918 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7920 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7921 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7923 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7924 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7925 __pthread_unregister_cancel and __pthread_unwind_next.
7927 2003-07-04 Jakub Jelinek <jakub@redhat.com>
7929 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7930 different symbol for the cancellation syscall wrapper and
7931 non-cancellation syscall wrapper.
7932 (PSEUDO_END): Define.
7934 2003-07-05 Richard Henderson <rth@redhat.com>
7936 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7937 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7938 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7939 return actual return value from the syscall, not 0.
7941 2003-07-07 Ulrich Drepper <drepper@redhat.com>
7943 * descr.h (struct pthread): Add pid field.
7944 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7945 (__reclaim_stacks): Likewise.
7946 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7947 also check for PID of the signal source.
7948 (__pthread_initialize_minimal_internal): Also initialize pid field
7949 of initial thread's descriptor.
7950 * pthread_cancel.c: Use tgkill instead of tkill if possible.
7951 * sysdeps/unix/sysv/linux/fork.c: Likewise.
7952 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7953 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7954 * sysdeps/unix/sysv/linux/raise.c: Likewise.
7956 2003-07-05 Ulrich Drepper <drepper@redhat.com>
7958 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7959 Fix use of parameter.
7960 (__libc_cleanup_pop): Likewise.
7962 2003-07-04 Ulrich Drepper <drepper@redhat.com>
7964 * init.c (sigcancel_handler): Change parameters to match handler
7965 for SA_SIGACTION. Check signal number and code to recognize
7966 invalid invocations.
7968 2003-07-03 Roland McGrath <roland@redhat.com>
7970 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7971 Apply sizeof (struct pthread) bias to r13 value.
7973 2003-07-03 Ulrich Drepper <drepper@redhat.com>
7975 * sysdeps/pthread/configure.in: Require CFI directives.
7977 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7979 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7980 libpthread compilation.
7981 * unwind.c (__pthread_unwind): Add hidden_def.
7982 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7984 2003-07-01 Ulrich Drepper <drepper@redhat.com>
7986 * libc-cancellation.c (__libc_cleanup_routine): Define.
7987 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7988 (__pthread_cleanup_pop): Define.
7990 2003-07-01 Richard Henderson <rth@redhat.com>
7992 * sysdeps/alpha/elf/pt-initfini.c: New file.
7993 * sysdeps/alpha/pthread_spin_lock.S: New file.
7994 * sysdeps/alpha/pthread_spin_trylock.S: New file.
7995 * sysdeps/alpha/pthreaddef.h: New file.
7996 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7997 * sysdeps/alpha/tls.h: New file.
7998 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7999 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8000 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8001 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8002 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8003 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8004 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8005 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8006 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8007 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8009 2003-07-01 Ulrich Drepper <drepper@redhat.com>
8011 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8012 cleanup support and unwind info.
8014 2003-06-30 Ulrich Drepper <drepper@redhat.com>
8016 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8017 Use correct cleanup handler registration. Add unwind info.
8018 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8019 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8020 * tst-once3.c: Add cleanup handler and check it is called.
8021 * tst-once4.c: Likewise.
8022 * tst-oncex3.c: New file.
8023 * tst-oncex4.c: New file.
8024 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8026 2003-06-29 Ulrich Drepper <drepper@redhat.com>
8028 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8030 2003-06-27 Ulrich Drepper <drepper@redhat.com>
8032 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8033 (tf_msgsnd): Likewise.
8035 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8036 premature returns a bit more.
8038 2003-06-26 Ulrich Drepper <drepper@redhat.com>
8040 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8041 definition to the front.
8043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8044 the cleanup functions to make the names unique. Fix dwarf opcode
8046 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8047 functions to make the names unique. Fix CFA offset for two blocks.
8049 2003-06-25 Ulrich Drepper <drepper@redhat.com>
8051 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8052 missing closing braces.
8053 Patch by Christophe Saout <christophe@saout.de>.
8055 2003-06-24 Roland McGrath <roland@redhat.com>
8057 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8059 2003-06-24 Ulrich Drepper <drepper@redhat.com>
8061 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8062 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8064 * pthreadP.h: Declare __find_thread_by_id.
8065 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8066 * pthread_clock_gettime.c: Allow using other thread's clock.
8067 * pthread_clock_settime.c: Likewise.
8068 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8069 * Makefile: Add rules to build and run tst-clock2.
8070 * tst-clock2.c: New file.
8072 2003-06-23 Ulrich Drepper <drepper@redhat.com>
8074 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8075 to use exception-based cleanup handler.
8076 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8078 * tst-cond8.c (ch): Announce that we are done.
8080 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8082 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8083 Also test aio_suspend with timeout value.
8085 2003-06-22 Ulrich Drepper <drepper@redhat.com>
8087 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8088 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8091 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8092 (__pthread_mutex_lock_internal): Likewise.
8093 (__pthread_mutex_unlock_internal): Likewise.
8094 (__pthread_mutex_unlock_usercnt): Declare.
8095 * pthread_mutex_destroy.c: Always fail if used in any way.
8096 * pthread_mutex_init.c: Update comment.
8097 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8098 * pthread_mutex_timedlock.c: Adjust __nusers.
8099 * pthread_mutex_trylock.c: Adjust __nusers.
8100 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8101 and public interfaces are wrapper with pass additional parameter.
8102 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8104 * tst-mutex8.c: New file.
8105 * Makefile (tests): Add tst-mutex8.
8106 * sysdeps/pthread/pthread_cond_timedwait.c: Call
8107 __pthread_mutex_unlock_usercnt.
8108 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8109 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8110 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8111 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8112 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8113 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8114 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8116 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8117 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8118 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8119 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8120 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8122 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8123 * pthread_mutex_timedlock.c: Likewise.
8124 * pthread_mutex_trylock.c: Adjust __nusers.
8125 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8126 * tst-mutex9.c: New file.
8127 * Makefile (tests): Add tst-mutex9.
8128 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8129 * sysdeps/ia64/tls.h: Likewise.
8130 * sysdeps/powerpc/tls.h: Likewise.
8131 * sysdeps/s390/tls.h: Likewise.
8132 * sysdeps/sh/tls.h: Likewise.
8133 * sysdeps/x86_64/tls.h: Likewise.
8134 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8135 Change type of __owner.
8136 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8137 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8138 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8139 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8140 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8142 2003-06-19 Jakub Jelinek <jakub@redhat.com>
8144 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8145 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8147 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8148 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
8149 instead of nr to lll_futex_wake. Only set errno and return -1
8152 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8153 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8154 return actual return value from the syscall, not 0.
8156 2003-06-18 Ulrich Drepper <drepper@redhat.com>
8158 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8159 find a random value.
8160 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
8163 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8164 compat_timer_settime.
8165 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8166 compat_timer_gettime.
8167 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8168 compat_timer_getoverrun.
8169 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8170 compat_timer_delete.
8172 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8173 error-checking mutex detect busy mutexes.
8175 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8177 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8178 Add ax to clobber list.
8179 (lll_mutex_cond_lock): Likewise.
8180 (lll_mutex_unlock): Likewise.
8181 (lll_lock): Likewise.
8182 (lll_unlock): Likewise.
8184 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8185 * tst-cancel18.c: New file.
8186 * tst-cancelx18.c: New file.
8188 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8191 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8192 * tst-cancel17.c: New file.
8193 * tst-cancelx17.c: New file.
8195 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8196 * sysdeps/unix/sysv/linux/sigwait.c: New file.
8197 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8199 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8201 2003-06-16 Jakub Jelinek <jakub@redhat.com>
8203 * sysdeps/pthread/createthread.c (create_thread): Set
8204 header.multiple_threads unconditionally.
8205 * allocatestack.c (allocate_stack): Likewise.
8206 * descr.h (struct pthread): Add header.multiple_threads
8208 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8209 Define for librt. #error if neither libpthread, libc nor librt.
8210 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8212 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8213 CDISABLE): Likewise.
8214 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8215 CDISABLE): Likewise.
8216 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8217 CDISABLE): Likewise.
8218 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8219 CDISABLE): Likewise. Access header.multiple_threads outside of
8220 libc and libpthread.
8221 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8223 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8224 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8226 2003-06-17 Ulrich Drepper <drepper@redhat.com>
8228 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8229 Also test early cancellation before the thread reaches the cancellation
8232 * Makefile: Compile forward.c with exceptions.
8234 * sysdeps/unix/sysv/linux/sleep.c: New file.
8236 2003-06-16 Ulrich Drepper <drepper@redhat.com>
8238 * Makefile: Add CFLAGS definition to compile function wrappers
8239 duplicated from libc with exceptions.
8240 * tst-cancel4.c: Also check cancellation handlers.
8242 * Makefile: Add rules to build and run tst-cancel16 and
8243 tst-cancelx16. Add missing CFLAGS definitions.
8244 * tst-cancel16.c: New file.
8245 * tst-cancelx16.c: New file.
8247 2003-06-15 Ulrich Drepper <drepper@redhat.com>
8249 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8250 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8251 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8252 (DL_SYSINFO_IMPLEMENTATION): Likewise.
8254 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8255 (LIBC_CANCEL_RESET): Likewise.
8256 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8257 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8259 (CFLAGS-libcrt-cancellation.c): Define.
8260 * sysdeps/pthread/librt-cancellation.c: New file.
8261 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8262 macros also when compiling librt.
8263 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8264 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8265 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8266 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8267 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8268 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8269 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8271 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8272 compat_timer_create.
8274 2003-06-14 Ulrich Drepper <drepper@redhat.com>
8276 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8278 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8280 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8281 Add libc_hidden_def.
8283 2003-06-13 Roland McGrath <roland@redhat.com>
8285 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8286 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8288 2003-06-11 Ulrich Drepper <drepper@redhat.com>
8290 * allocatestack.c (queue_stack): Always inline.
8291 * ptreadhP.h (__do_cancel): Likewise.
8293 2003-06-10 Jakub Jelinek <jakub@redhat.com>
8295 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8298 2003-06-10 Ulrich Drepper <drepper@redhat.com>
8300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8301 (__pthread_cond_signal): Remove incorrect second addition for
8304 2003-06-09 Ulrich Drepper <drepper@redhat.com>
8306 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8307 (__pthread_cond_signal): Use correct futex pointer in
8308 __lll_mutex_lock_wait call.
8310 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8311 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8313 2003-06-08 Ulrich Drepper <drepper@redhat.com>
8315 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8317 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8320 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8321 hand-written CFI generation code. Since ENTRY/END also initiated
8322 CFI frames this caused two CFI sets to be generated.
8324 2003-06-07 Ulrich Drepper <drepper@redhat.com>
8326 * cleanup_routine.c: New file.
8327 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8328 * sysdeps/pthread/pthread.h: Add support for fully exception-based
8330 * Makefile (libpthread-routines): Add cleanup_routine.
8331 Add more CFLAGS variables to compile with exceptions. Add comments
8332 why which file needs unwind tables.
8333 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8335 * tst-cancelx1.c: New file.
8336 * tst-cancelx2.c: New file.
8337 * tst-cancelx3.c: New file.
8338 * tst-cancelx4.c: New file.
8339 * tst-cancelx5.c: New file.
8340 * tst-cancelx6.c: New file.
8341 * tst-cancelx7.c: New file.
8342 * tst-cancelx8.c: New file.
8343 * tst-cancelx9.c: New file.
8344 * tst-cancelx10.c: New file.
8345 * tst-cancelx11.c: New file.
8346 * tst-cancelx12.c: New file.
8347 * tst-cancelx13.c: New file.
8348 * tst-cancelx14.c: New file.
8349 * tst-cancelx15.c: New file.
8350 * tst-cleanupx0.c: New file.
8351 * tst-cleanupx0.expect: New file.
8352 * tst-cleanupx1.c: New file.
8353 * tst-cleanupx2.c: New file.
8354 * tst-cleanupx3.c: New file.
8356 * tst-cleanup0.c: Make standard compliant.
8357 * tst-cleanup1.c: Likewise.
8359 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8360 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8361 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8362 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8363 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8364 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8365 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8367 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8368 * tst-cancel12.c: New file.
8369 * tst-cancel13.c: New file.
8370 * tst-cancel14.c: New file.
8371 * tst-cancel15.c: New file.
8372 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8375 * tst-cancel1.c: Add some comments.
8377 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8380 2003-06-06 Ulrich Drepper <drepper@redhat.com>
8382 * Makefile (CFLAGS-pthread_cancel.c): Define.
8384 2003-06-05 Ulrich Drepper <drepper@redhat.com>
8386 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8387 Change type of __writer element to int.
8388 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8389 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8390 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8391 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8392 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8393 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8394 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8395 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8396 Compare with TID to determine deadlocks.
8397 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8398 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8399 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8400 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8401 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8402 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8404 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8406 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8407 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8408 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8410 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8412 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8413 * Makefile (tests): Add tst-rwlock12.
8414 * tst-rwlock12.c: New file.
8416 2003-06-05 Jakub Jelinek <jakub@redhat.com>
8418 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8419 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8420 Remove bogus hidden_proto.
8421 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8423 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8424 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8425 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8426 ___lll_mutex_timedlock): Likewise.
8428 2003-06-04 Ulrich Drepper <drepper@redhat.com>
8430 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8431 (__pthread_cond_signal): Add some code to eventually handle
8434 2003-06-01 Ulrich Drepper <drepper@redhat.com>
8436 * Makefile (tests): Add tst-exec4.
8437 (tst-exec4-ARGS): Define.
8438 * tst-exec4.c: New file.
8440 2003-05-31 Ulrich Drepper <drepper@redhat.com>
8442 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8443 Also fail if tv_nsec < 0.
8444 (__lll_timedwait_tid): Likewise.
8445 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8446 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8448 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8450 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8452 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8454 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8456 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8459 * Makefile (tests): Add tst-sem8 and tst-sem9.
8460 * tst-sem8.c: New file.
8461 * tst-sem9.c: New file.
8462 * sem_open.c: Fix creation of in_use record if the file exists but
8465 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8468 * sysdeps/pthread/timer_create.c (timer_create): In case
8469 evp==NULL, assign timer ID to sival_ptr.
8471 * descr.h (struct pthread_unwind_buf): Change type of prev element to
8472 struct pthread_unwind_buf *.
8473 (struct pthread): Likewise for cleanup_jmp_buf element.
8475 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8476 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8477 * unwind.c (__pthread_unwind_next): Likewise.
8479 2003-05-30 Ulrich Drepper <drepper@redhat.com>
8481 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8482 (lll_futex_timed_wait): Use int for futex value parameter.
8483 (lll_futex_wake): Likewise.
8484 (lll_futex_requeue): Likewise.
8486 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8487 Replace one memory operation with one register operation.
8489 * tst-join4.c (do_test): Fix error message.
8491 * tst-rwlock6.c (do_test): Use correct format specifier.
8493 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8494 (__lll_mutex_lock_wait): Replace one memory operation with one
8496 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8497 (__lll_mutex_lock_wait): Likewise.
8499 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8500 (__lll_mutex_cond_lock): Add one to value parameter of
8501 __lll_lock_wait to reflect reality in the futex syscall.
8502 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8503 (lll_mutex_cond_lock): Likewise.
8505 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8507 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8509 (lll_mutex_cond_lock): Define.
8511 2003-05-29 Ulrich Drepper <drepper@redhat.com>
8513 * Makefile (tests): Add tst-signal6.
8514 * tst-signal6.c: New file.
8516 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8517 (__lll_mutex_unlock_force): New function
8518 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8520 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8521 (__lll_mutex_unlock_force): New function.
8522 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8524 * tst-rwlock7.c (do_test): Use correct format specifier.
8526 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8527 Find break parameter in correct asm argument.
8529 2003-05-27 Jakub Jelinek <jakub@redhat.com>
8531 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8533 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8535 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8537 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8538 lll_futex_requeue, lll_mutex_unlock_force): Define.
8540 2003-05-30 Jakub Jelinek <jakub@redhat.com>
8542 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8543 (pthread_cond_t): Add __mutex.
8544 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8545 lll_futex_requeue, lll_mutex_unlock_force): Define.
8547 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8549 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8550 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8552 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8554 (lll_futex_wait, lll_futex_wake): Define.
8555 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8556 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8557 FUTEX_REQUEUE instead of FUTEX_WAIT.
8558 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8559 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8560 mutex which was used in condvar structure. Call
8561 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8562 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8564 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8565 include tcb-offsets.h. Read wakeup value in locked region.
8566 Use the value of gbr register as THREAD_ID.
8567 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8568 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8569 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8571 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8574 2003-05-28 Ulrich Drepper <drepper@redhat.com>
8576 * sysdeps/pthread/pthread_cond_broadcast.c
8577 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8579 2003-05-26 Ulrich Drepper <drepper@redhat.com>
8581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8582 typo in register name.
8583 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8584 correctly. Actually use requeue. Little optimization.
8585 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8586 mutex address early. Handle cancellation state as 32-bit value.
8587 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8588 Remove unnecessary label.
8590 2003-05-25 Ulrich Drepper <drepper@redhat.com>
8592 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8593 instead of FUTEX_WAIT.
8594 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8595 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8596 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8597 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8599 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8600 used in condvar structure. Call __pthread_mutex_cond_lock instead
8601 of __pthread_mutex_lock_internal.
8602 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8603 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8604 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8605 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8606 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8607 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8608 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8609 Add pthread_mutex_cond_lock.
8610 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8611 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8612 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8613 lll_mutex_cond_lock.
8614 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8615 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8616 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8618 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8619 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8621 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8622 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8624 * pthreadP.h: Declare __pthread_mutex_cond_lock.
8625 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8626 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
8627 macro don't define aliases.
8629 * cancellation.c: Remove __pthread_enable_asynccancel_2.
8630 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8631 * sysdeps/pthread/pthread_cond_timedwait.c: Use
8632 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8633 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8634 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8635 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8636 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8637 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8639 2003-05-17 Ulrich Drepper <drepper@redhat.com>
8641 * sem_open.c: Fix one endless loop. Implement correct semantics
8642 wrt opening the same semaphore more then once.
8643 * sem_close.c: Adjust for sem_open change.
8644 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
8645 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8646 * Makefile (tests): Add tst-sem7.
8647 * tst-sem7.c: New file.
8649 2003-05-16 Roland McGrath <roland@redhat.com>
8651 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8652 uninitialized variable braino.
8654 2003-05-16 Ulrich Drepper <drepper@redhat.com>
8656 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8657 test for syscall availability.
8659 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8660 __no_posix_timers to -1 if the syscalls don't exist.
8662 * pthread_join.c (pthread_join): Set tid field of the joined
8663 thread to -1. This isn't necessary but helps to recognize some
8664 error conditions with almost no cost.
8666 * allocatestack.c (FREE_P): Also negative values indicate an
8669 * unwind.c: Include <unistd.h>.
8671 2003-05-14 Ulrich Drepper <drepper@redhat.com>
8673 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
8675 2003-05-14 Jakub Jelinek <jakub@redhat.com>
8677 * Makefile (crti-objs, crtn-objs): New variables.
8678 (omit-deps, extra-objs): Add crtn.
8679 ($(objpfx)libpthread.so): Depend on both crti and crtn
8680 and links to them in multidir.
8681 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
8683 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
8685 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8686 (lll_mutex_unlock): Use atomic_exchange_rel.
8688 2003-05-11 Ulrich Drepper <drepper@redhat.com>
8690 * cond-perf.c (cons): Add missing locking around setting of alldone.
8692 2003-05-10 Ulrich Drepper <drepper@redhat.com>
8694 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
8696 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8698 2003-05-09 Ulrich Drepper <drepper@redhat.com>
8700 * tst-sem6.c: New file.
8701 * Makefile (tests): Add tst-sem6.
8703 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
8704 Use atomic_exchange_rel instead of atomic_exchange.
8705 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
8708 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
8709 code for lll_futex_wait and lll_futex_wake in static apps. Use
8710 vsyscall is possible.
8712 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
8713 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
8714 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
8715 pthread_setaffinity_np.
8716 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
8717 and pthread_setaffinity_np.
8718 * Makefile (libpthread-routines): Add pthread_getaffinity and
8719 pthread_setaffinity.
8721 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
8722 use it in case mmap to allocate the stack fails.
8723 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
8724 ARCH_MAP_FLAGS here.
8725 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
8728 2003-05-08 Ulrich Drepper <drepper@redhat.com>
8730 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
8731 handler implementation. It is now lockless in fork().
8732 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
8733 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
8734 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
8735 declare the __fork_*_lists.
8736 (struct fork_handler): Include pointers to all three functions.
8737 Add next, refcntr and need_signal elements.
8738 (__fork_handlers): New declaration.
8739 (__register_atfork_malloc): Remove declaration.
8740 (HAVE_register_atfork_malloc): Remove definition.
8741 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8742 __pthread_child_handler variable.
8743 (__libc_pthread_init): Use __register_atfork instead of explicitly
8745 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8747 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8749 * unwind.c (unwind_cleanup): Print error message and then abort. This
8750 function must never be reached.
8752 * cond-perf.c: New file.
8754 2003-05-05 Ulrich Drepper <drepper@redhat.com>
8756 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8758 2003-05-04 Roland McGrath <roland@redhat.com>
8760 * Makefile ($(objpfx)../libc.so): New target.
8762 2003-05-02 Ulrich Drepper <drepper@redhat.com>
8764 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8765 (pthread_condattr_t): Size is only an int, don't use long for
8767 (pthread_mutexattr_t): Likewise.
8768 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8769 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8770 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8772 2003-05-01 Ulrich Drepper <drepper@redhat.com>
8774 * sysdeps/i386/tls.h: Define THREAD_ID.
8775 * sysdeps/ia64/tls.h: Likewise.
8776 * sysdeps/powerpc/tls.h: Likewise.
8777 * sysdeps/s390/tls.h: Likewise.
8778 * sysdeps/sh/tls.h: Likewise.
8779 * sysdeps/x86_64/tls.h: Likewise.
8780 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8782 * pthread_mutex_timedlock.c: Likewise.
8783 * pthread_mutex_trylock.c: Likewise.
8784 * pthread_mutex_unlock.c: Likewise.
8785 * pthread_rwlock_trywrlock.c: Likewise.
8786 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8787 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8788 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8789 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8791 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8794 2003-04-29 Jakub Jelinek <jakub@redhat.com>
8796 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8797 (__SIZEOF_PTHREAD_COND_T): Define to 48.
8798 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8799 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8800 Make __align long long instead of long.
8801 (pthread_rwlock_t): Formatting.
8802 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8803 (pthread_rwlock_t): Formatting.
8804 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8805 (pthread_cond_t): Make __align long long instead of long.
8806 (pthread_rwlock_t): Move __flags field to the same position as in
8809 2003-04-30 Ulrich Drepper <drepper@redhat.com>
8811 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8812 * tst-rwlock7.c (do_test): Likewise.
8814 2003-04-26 Roland McGrath <roland@redhat.com>
8816 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8818 2003-04-22 Jakub Jelinek <jakub@redhat.com>
8820 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8821 sizeof (struct pthread).
8822 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8824 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8826 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8828 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8830 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8832 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8834 (NO_TLS_OFFSET): Define.
8835 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8836 add TLS_TCB_SIZE unnecessarily.
8838 2003-04-22 Roland McGrath <roland@redhat.com>
8840 * Makeconfig (shared-thread-library): Reverse link order to work
8843 2003-04-22 Ulrich Drepper <drepper@redhat.com>
8845 * semaphore.h: Fix typo in comment.
8847 2003-04-21 Ulrich Drepper <drepper@redhat.com>
8849 * sysdeps/pthread/sigfillset.c: New file.
8851 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8852 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8853 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8854 * sysdeps/pthread/sigaction.c: Likewise.
8855 * sysdeps/pthread/sigprocmask.c: New file.
8856 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8858 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8859 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
8862 2003-04-19 Ulrich Drepper <drepper@redhat.com>
8864 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8865 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8867 * sysdeps/unix/sysv/linux/unregister-atfork.c
8868 (__unregister_atfork): Don't free memory not allocated dynamically.
8870 * semaphore.h: Remove __THROW marker from cancellation points.
8871 * nptl/sysdeps/pthread/pthread.h: Likewise.
8873 2003-04-18 Ulrich Drepper <drepper@redhat.com>
8875 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8876 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8879 2003-04-16 Jakub Jelinek <jakub@redhat.com>
8881 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8883 2003-04-15 Roland McGrath <roland@redhat.com>
8885 * forward.c (__pthread_unwind): Tweak to avoid warning.
8887 2003-04-15 Ulrich Drepper <drepper@redhat.com>
8889 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8891 2003-04-14 Ulrich Drepper <drepper@redhat.com>
8893 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8894 overflow CFA advance instructions.
8895 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8897 2003-04-14 Jakub Jelinek <jakub@redhat.com>
8899 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8900 * sysdeps/i386/pthread_spin_lock.c: Likewise.
8901 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
8904 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8905 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8906 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8907 DW_CFA_advance_loc for .Laddl-.Lsubl.
8909 2003-04-13 Ulrich Drepper <drepper@redhat.com>
8911 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8912 position-independent unwind data for static libraries.
8913 Add missing unwind info. Add comments.
8915 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8916 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8917 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8918 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8920 2003-04-12 Ulrich Drepper <drepper@redhat.com>
8922 * Makefile: Make sure all cancellation points are compiled with
8923 exception and asynchronous unwind tables.
8925 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8926 which mishandles loading of global object addresses in PIC.
8927 (THREAD_SETMEM_NC): Likewise.
8929 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8931 * pthread.h: Define new data structure for cleanup buffer. Declare
8932 new cleanup handler interfaces.
8933 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
8934 (struct pthread): Add cleanup_jmp_buf pointer. Define
8935 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8936 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
8937 it. Declare old cleanup handler installation functions.
8938 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
8940 * cleanup_defer.c: Likewise.
8941 * cleanup_compat.c: New file. Old cleanup code.
8942 * cleanup_def_compat.c: New file. Old cleanup code.
8943 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8944 if own thread descriptor.
8945 * unwind.c: New file.
8946 * forward.c: Add __pthread_unwind.
8947 * init.c (pthread_functions): Add __pthread_unwind.
8948 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8949 Add ptr___pthread_unwind.
8950 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8951 and unwind function.
8952 * Makefile (libpthread-routines): Add cleanup_compat,
8953 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
8954 table generation if necessary.
8955 * version.c: Record whether unwind support is compiled in.
8956 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8957 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8959 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8960 complication to generate unwind information for syscall wrappers.
8961 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8962 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8963 __cleanup_fct_attribute.
8965 * Makefile: Add rules to build and run tst-cleanup0.
8966 * tst-cleanup0.c: New file.
8967 * tst-cleanup0.expect: New file.
8969 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
8970 caller. Optimize to avoid often unecessary local variable.
8972 2003-04-11 Roland McGrath <roland@redhat.com>
8974 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8975 sets variable `multidir'; include that.
8976 (generated): Add it.
8977 ($(objpfx)$(multidir)/crti.o): New target.
8978 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8980 2003-04-11 Ulrich Drepper <drepper@redhat.com>
8982 * tst-attr2.c (do_test): Add cast to avoid warning.
8983 * tst-mutex4.c (do_test): Likewise.
8985 2003-04-10 Ulrich Drepper <drepper@redhat.com>
8987 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8990 2003-04-09 Ulrich Drepper <drepper@redhat.com>
8992 * Makefile (tests): Add tst-detach1.
8993 * tst-detach1.c: New file.
8995 2003-04-08 Ulrich Drepper <drepper@redhat.com>
8997 * sysdeps/pthread/pthread.h: Remove duplicate
8998 pthread_cleanup_{push,pop} definitions.
9000 * tst-barrier2.c: Eliminate warnings.
9001 * tst-cancel4.c: Likewise.
9002 * tst-cond4.c: Likewise.
9003 * tst-cond6.c: Likewise.
9004 * tst-detach1.c: Likewise.
9005 * tst-rwlock4.c: Likewise.
9006 * tst-rwlock6.c: Likewise.
9007 * tst-rwlock7.c: Likewise.
9008 * tst-sem3.c: Likewise.
9009 * tst-spin2.c: Likewise.
9010 * tst-umask1.c: Likewise.
9012 2003-04-07 Ulrich Drepper <drepper@redhat.com>
9014 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9016 2003-04-06 Ulrich Drepper <drepper@redhat.com>
9018 * descr.h (struct pthread): Move cancelhandling member to the front.
9020 2003-04-05 Ulrich Drepper <drepper@redhat.com>
9022 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9023 malloc_parent, and malloc_child statically.
9024 (__register_atfork_malloc): New function.
9025 (free_mem): Don't free any of the malloc_* variables on the list.
9026 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9027 Define HAVE_register_atfork_malloc.
9029 2003-04-04 Ulrich Drepper <drepper@redhat.com>
9031 * sysdeps/pthread/createthread.c (create_thread): Add some more
9032 comments explaining when to set multiple_threads and when not.
9034 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9035 THREAD_ATOMIC_BIT_SET if not already defined.
9036 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9037 THREAD_ATOMIC_BIT_SET:
9038 * sysdeps/x86_64/tls.h: Likewise.
9039 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9040 THREAD_ATOMIC_CMPXCHG_VAL.
9041 (_pthread_cleanup_pop_restore): Likewise.
9042 * cancellation.c (__pthread_enable_asynccancel): Likewise.
9043 (__pthread_enable_asynccancel_2): Likewise.
9044 (__pthread_disable_asynccancel): Likewise.
9045 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9046 (__libc_disable_asynccancel): Likewise.
9047 * init.c (sigcancel_handler): Likewise.
9048 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9049 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9051 2003-04-03 Ulrich Drepper <drepper@redhat.com>
9053 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9054 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9055 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9056 * Makefile (tests): Add tst-cancel11.
9057 * tst-cancel11.c: New file.
9059 2003-04-01 Ulrich Drepper <drepper@redhat.com>
9061 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9062 round, not the first. Use specific_used flag instead of local
9063 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
9064 (__free_tcb): Don't call deallocate_tsd here.
9065 (start_thread): Call deallocate_tsd here.
9066 * pthread_setspecific.c: Set specific_used flag really only when
9068 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9069 * tst-tsd3.c: New file.
9070 * tst-tsd4.c: New file.
9072 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9074 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9075 Use atomic_exchange_and_add instead of __lll_add.
9076 (__lll_mutex_timedlock): Likewise.
9077 Patch by Ian Wienand.
9079 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
9081 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9082 (SINGLE_THREAD_P): Fix typo.
9083 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9085 2003-03-31 Ulrich Drepper <drepper@redhat.com>
9087 * Makefile (tests): Add tst-align.
9088 * tst-align.c: New file.
9089 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9091 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9094 * tst-tsd2.c: Add casts to avoid warnings.
9096 2003-03-30 Ulrich Drepper <drepper@redhat.com>
9098 * descr.h (struct pthread): Move most often used elements to the front.
9100 2003-03-29 Ulrich Drepper <drepper@redhat.com>
9102 * Makefile (libpthread-routines): Add pthread_atfork.
9103 (libpthread-static-only-routines): Add pthread_atfork.
9105 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
9107 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9109 (INSTALL_DTV): Add parens.
9110 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9111 Use passed descr instead of THREAD_SELF.
9112 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9113 (__lll_mutex_timedlock_wait): Correct expected value after
9115 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9116 Release lock before waking up the waiters.
9117 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9118 criteria. Reorderstruct passed to cleanup handler. Fix
9119 handling of cancellation and failung pthread_mutex_unlock call.
9120 Use __pthread_enable_asynccancel_2 instead of
9121 __pthread_enable_asynccancel.
9122 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9123 Return result of lock re-get if it fails.
9124 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9125 for __pthread_cleanup_push.
9126 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9127 completely broken rwlock implementation.
9128 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9129 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9130 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9131 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9132 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9133 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
9134 versioned_symbol macro.
9135 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9136 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9138 2003-03-27 Ulrich Drepper <drepper@redhat.com>
9140 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9141 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
9143 (struct timer): Remove th and bar field.
9144 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9145 debugging code. Create only one helper thread.
9146 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9148 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9149 Renamed. Define statically. Use thread info from siginfo.
9150 (__helper_once): New variable.
9151 (__helper_tid): New variable.
9152 (__reset_helper_control): New function.
9153 (__start_helper_thread): New function.
9155 * pthread_create.c (start_thread): Don't use setjmp inside
9156 __builtin_expect to work around gcc bug.
9158 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9159 timer_delete syscall fails, but not with ENOSYS, set
9162 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9163 (timer_settime): Fix typo.
9164 * sysdeps/unix/sysv/linux/timer_getoverr.c
9165 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9167 2003-03-27 Jakub Jelinek <jakub@redhat.com>
9169 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9170 offset of cleanupbuf.__prev.
9172 2003-03-26 Jakub Jelinek <jakub@redhat.com>
9174 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9177 2003-03-26 Ulrich Drepper <drepper@redhat.com>
9179 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9180 NULL provide default definition to syscall.
9182 2003-03-25 Roland McGrath <roland@redhat.com>
9184 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9185 (timer_id2ptr): Fix typo.
9187 2003-03-25 Ulrich Drepper <drepper@redhat.com>
9189 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9190 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9191 * sysdeps/ia64/pthreaddef.h: Likewise.
9192 * sysdeps/powerpc/pthreaddef.h: Likewise.
9193 * sysdeps/s390/pthreaddef.h: Likewise.
9194 * sysdeps/sh/pthreaddef.h: Likewise.
9195 * sysdeps/x86_64/pthreaddef.h: Likewise.
9196 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9197 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9199 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9200 SIGTIMER is not unblocked.
9201 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9203 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9205 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9206 pass pointer through as ID.
9207 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9208 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9209 * sysdeps/unix/sysv/linux/timer_create.c: New file.
9210 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9211 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9212 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9213 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9214 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9215 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9216 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9217 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9218 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9219 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9220 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9221 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9222 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9223 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9224 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9225 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9226 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9227 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9228 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9229 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9230 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9231 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9232 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9233 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9234 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9235 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9236 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9237 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9238 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9239 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9241 * pthreadP.h: Remove FRAME_LEFT definition.
9242 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9243 already left frame. Programs which have this problem are not POSIX
9245 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9247 2003-03-24 Ulrich Drepper <drepper@redhat.com>
9249 * sysdeps/pthread/tst-timer.c: Check return values of the
9252 2003-03-23 Roland McGrath <roland@redhat.com>
9254 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9255 * tst-tls3mod.c: Likewise.
9256 * tst-tls1.c: Likewise.
9257 * tst-tls2.c: Likewise.
9259 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9262 * tst-join5.c (tf1, tf2): Add a cast.
9264 * Makeconfig (includes): Append -I$(..)nptl to this variable.
9266 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9267 Don't test anything.
9268 * tst-cond4.c: Likewise.
9269 * tst-cond6.c: Likewise.
9270 * tst-flock2.c: Likewise.
9271 * tst-mutex4.c: Likewise.
9272 * tst-rwlock4.c: Likewise.
9273 * tst-signal1.c: Likewise.
9274 * tst-spin2.c: Likewise.
9275 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9277 * tst-mutex4.c: Use test-skeleton.c.
9278 * tst-spin2.c: Likewise.
9279 * tst-sysconf.c: Likewise.
9280 * tst-barrier2.c: Likewise.
9281 * tst-cond4.c: Likewise.
9282 * tst-cond6.c: Likewise.
9283 * tst-rwlock4.c: Likewise.
9284 * tst-unload.c: Likewise.
9285 * tst-flock2.c (do_test): Use return instead of exit.
9287 2003-03-22 Jakub Jelinek <jakub@redhat.com>
9289 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9291 2003-03-21 Ulrich Drepper <drepper@redhat.com>
9293 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9294 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9295 instead of __lll_compare_and_swap.
9296 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9298 Removed definition if __lll_compare_and_swap.
9300 * cancellation.c: Adjust for new form of compare&exchange macros.
9301 * cleanup_defer.c: Likewise.
9303 * libc-cancellation.c: Likewise.
9304 * old_pthread_cond_broadcast.c: Likewise.
9305 * old_pthread_cond_signal.c: Likewise.
9306 * old_pthread_cond_timedwait.c: Likewise.
9307 * old_pthread_cond_wait.c: Likewise.
9308 * pthread_cancel.c: Likewise.
9309 * pthread_create.c: Likewise.
9310 * pthread_detach.c: Likewise.
9311 * pthread_join.c: Likewise.
9312 * pthread_key_delete.c: Likewise.
9313 * pthread_setcancelstate.c: Likewise.
9314 * pthread_setcanceltype.c: Likewise.
9315 * pthread_timedjoin.c: Likewise.
9316 * pthread_tryjoin.c: Likewise.
9317 * sysdeps/pthread/createthread.c: Likewise.
9319 2003-03-20 Ulrich Drepper <drepper@redhat.com>
9321 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9322 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9323 definitions. Replace uses with calls to atomic_* functions.
9324 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9325 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9326 __lll_test_and_set calls with atomic_exchange_and_add and
9327 atomic_exchange calls respectively.
9328 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9329 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9330 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9331 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9332 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9333 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9334 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9336 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9337 returns the old value.
9339 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
9341 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9342 int for variable OLDVAL and correct inline assembler contraint.
9343 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9344 type int for variable OLD.
9346 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9348 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9349 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9350 instead of multiple_threads field in the TCB.
9352 2003-03-19 Ulrich Drepper <drepper@redhat.com>
9354 * sysdeps/i386/i686/bits/atomic.h: Removed.
9355 * sysdeps/i386/i586/bits/atomic.h: Removed.
9356 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
9357 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
9358 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
9359 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
9360 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
9361 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
9362 * atomic.h: Removed. Moved to glibc.
9364 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9365 support for clock selection.
9367 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9370 2003-03-18 Roland McGrath <roland@redhat.com>
9372 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9373 Add __lll_rel_instr first. Add memory clobber.
9374 (lll_mutex_unlock): Use __lll_test_and_set.
9375 From Paul Mackerras <paulus@samba.org>.
9377 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9379 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9380 (SINGLE_THREAD_P): Add `header.' prefix.
9381 From Paul Mackerras <paulus@samba.org>.
9383 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9384 pthread_timedjoin_np to ...
9385 (libpthread: GLIBC_2.3.3): ... here.
9386 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9388 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9389 Avoid shadowing VAL variable.
9391 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9394 2003-03-18 Ulrich Drepper <drepper@redhat.com>
9396 * Makefile (tests): Add tst-cond11.
9397 * tst-cond11.c: New file.
9399 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9400 struct passed to cleanup handler to eliminate one more
9402 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9404 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9405 (pthrad_cond_t): Replace __unused field with __clock.
9407 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9408 waken all waiters in cleanup handler.
9409 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9410 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9412 * pthread_condattr_getclock.c: New file.
9413 * pthread_condattr_setclock.c: New file.
9414 * sysdeps/pthread/pthread.h: Declare these new functions.
9415 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9416 * Makefile (libpthread-routines): Add the new functions.
9417 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9418 Renamed field to value. Document use of the bits.
9419 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9421 * pthread_condattr_setpshared.c: Likewise.
9422 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9423 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9424 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9426 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9427 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9428 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9429 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9430 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9431 Implement clock selection.
9432 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9433 * pthread-errnos.sym: Add ENOSYS.
9434 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9435 _POSIX_CLOCK_SELECTION.
9436 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9438 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9439 invalid .size directive.
9441 2003-03-17 Roland McGrath <roland@redhat.com>
9443 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9446 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9448 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9449 Use __lll_add instead of spelling it out. Use protected symbol names.
9450 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9452 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9453 Renamed from lll_compare_and_swap. Use new name where necessary.
9454 (__lll_add): Defined.
9455 (__lll_dec_if_positive): Defined.
9456 (__lll_test_and_set): Defined.
9457 * sysdeps/ia64/pthread_spin_init.c: Removed.
9458 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9459 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9460 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9461 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9462 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9463 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9464 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9465 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9466 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9467 __sync_lock_release_si.
9468 Patch by Jakub Jelinek.
9470 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9471 Fix timeout handling.
9472 (__lll_timedwait_tid): Likewise.
9473 (lll_unlock_wake_cb): Wake up other waiters if necessary.
9474 Patch by Jakub Jelinek.
9476 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9478 2003-03-17 Roland McGrath <roland@redhat.com>
9480 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9481 * sysdeps/pthread/pthread_spin_init.c: New file.
9482 * sysdeps/pthread/pthread_spin_unlock.c: New file.
9483 * sysdeps/powerpc/Makefile: New file.
9484 * sysdeps/powerpc/pthread_spin_lock.c: New file.
9485 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9486 * sysdeps/powerpc/pthreaddef.h: New file.
9487 * sysdeps/powerpc/tcb-offsets.sym: New file.
9488 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9489 * sysdeps/powerpc/tls.h: New file.
9490 * sysdeps/powerpc/bits/atomic.h: New file.
9491 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9492 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9493 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9495 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9496 * sysdeps/unix/sysv/linux/sem_post.c: New file.
9497 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9498 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9499 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9500 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9501 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9502 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9503 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9504 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9505 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9506 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9507 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9508 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9509 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9511 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9513 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9514 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9515 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9516 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9517 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9519 2003-03-17 Ulrich Drepper <drepper@redhat.com>
9521 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9522 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9523 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9524 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9525 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9527 2003-03-16 Roland McGrath <roland@redhat.com>
9529 * tst-fork4.c: Include <string.h>.
9530 * tst-signal2.c: Likewise.
9531 * tst-mutex5.c (do_test): exit -> return.
9532 * tst-mutex2.c: Include <stdlib.h>.
9534 2003-03-16 Ulrich Drepper <drepper@redhat.com>
9536 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9537 (__lll_mutex_timedlock_wait): Correct expected value after
9538 spurious wakeup. Otherwise we would never wait again.
9540 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9541 zone versus inline asm stupidity. Use correct instructions.
9543 * tst-rwlock6.c: Add some more status output.
9545 2003-03-15 Roland McGrath <roland@redhat.com>
9547 * sysdeps/pthread/configure.in: New file.
9548 * sysdeps/pthread/configure: New file (generated).
9550 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9552 * allocatestack.c (allocate_stack): Store the exact stack size of
9553 user allocated stacks.
9555 2003-03-15 Jakub Jelinek <jakub@redhat.com>
9557 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9558 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9559 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9560 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9561 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9562 Use `header.' prefix.
9563 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9565 2003-03-15 Ulrich Drepper <drepper@redhat.com>
9567 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9568 __builtin_frame_address, use stack pointer.
9570 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9571 instead of __builtin_frame_pointer.
9573 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9575 * tst-basic1.c (do_test): Add cast to avoid warning.
9576 * tst-basic2.c (do_test): Likewise.
9578 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9579 amount of stack correction.
9581 * tst-fork4.c: Use test-skeleton.c.
9583 2003-03-14 Roland McGrath <roland@redhat.com>
9585 * init.c: Fix typo "#eli" for "#else".
9587 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
9589 * allocatestack.c (__stack_user): Use hidden_data_def.
9590 * pthread_create.c (__pthread_keys): Likewise.
9592 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9594 2003-03-14 Roland McGrath <roland@redhat.com>
9596 * tst-fork4.c: New file.
9597 * Makefile (tests): Add it.
9599 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9600 we always define the padding space.
9601 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9602 stopped supporting its own extensions fully.
9603 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9604 struct also called `header', so `header.multiple_threads' is the field
9605 name to use on all machines.
9606 * allocatestack.c (allocate_stack): Use `header.' prefix.
9607 * sysdeps/pthread/createthread.c (create_thread): Likewise.
9608 * pthread_create.c (__pthread_create_2_1): Likewise.
9609 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9610 (THREAD_SELF): Likewise.
9611 * sysdeps/x86_64/tls.h: Likewise.
9612 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9613 (SINGLE_THREAD_P): Likewise.
9614 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9615 (SINGLE_THREAD_P): Likewise.
9616 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9617 (SINGLE_THREAD_P): Likewise.
9619 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9622 2003-03-14 Ulrich Drepper <drepper@redhat.com>
9624 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9625 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9627 * pthread_create.c (start_thread): setjmp is expected to return 0.
9629 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9630 (THREAD_GETMEM_NC): Likewise.
9632 2003-03-13 Ulrich Drepper <drepper@redhat.com>
9634 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9635 and the size of the stack which must be allocated is a multiple,
9636 allocate one more page.
9637 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9638 MULTI_PAGE_ALIASING.
9640 2003-03-13 Roland McGrath <roland@redhat.com>
9642 * pthread_create.c (start_thread): Set EXITING_BIT after the
9643 event-reporting (and destructors), not before.
9645 2003-03-13 Jakub Jelinek <jakub@redhat.com>
9647 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9648 lll_futex_wake): Declare register variables as long int instead of
9649 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9650 Make syscall arguments clobbered by the syscall.
9651 (lll_futex_wait): Define using lll_futex_timed_wait.
9653 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9656 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9659 * allocatestack.c (nptl_ncreated): Only declare if
9660 COLORING_INCREMENT != 0.
9662 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9663 (__libc_enable_asynccancel_2): Remove prototype.
9665 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9666 ctid to match kernel.
9668 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9670 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
9671 libc_multiple_threads.
9672 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
9673 __libc_multiple_threads to...
9674 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
9676 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
9678 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9679 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9681 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
9682 (__pthread_once_internal): Define.
9684 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
9685 macros instead of .symver directly.
9686 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9687 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9689 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
9690 * sysdeps/x86_64/tcb-offsets.sym: New file.
9691 * sysdeps/x86_64/Makefile: New file.
9693 * sysdeps/i386/tcb-offsets.sym: Add SELF.
9694 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
9695 to access own pthread_t in TCB.
9696 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9698 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9700 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9702 2003-03-12 Roland McGrath <roland@redhat.com>
9704 * pthread-errnos.sym: New file.
9705 * Makefile (gen-as-const-headers): New variable, list that file.
9706 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
9707 header <pthread-errnos.h> instead of defining errno values here.
9708 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
9709 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9710 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9711 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9712 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9714 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9716 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9717 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9718 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9719 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9720 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9721 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9722 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9723 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9724 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9725 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9726 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
9727 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
9728 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
9729 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
9730 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9731 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9732 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9733 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9734 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9735 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
9736 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9737 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9738 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9739 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9740 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9741 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9742 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9744 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9745 CLONE_CHILD_SETTID worked.
9747 2003-03-12 Ulrich Drepper <drepper@redhat.com>
9749 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9751 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9754 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9755 (pthread_cond_t): Add padding.
9757 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9758 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9759 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9761 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9762 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9763 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9764 (__pthread_rwlock_timedrdlock): Likewise.
9765 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9766 (__pthread_rwlock_wrlock): Likewise.
9767 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9768 (__pthread_rwlock_rdlock): Likewise.
9770 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9772 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9773 result of lock re-get if it fails.
9775 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9777 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9778 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9779 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9780 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9781 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9782 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9783 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9784 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9785 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9786 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9788 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9789 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9791 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9792 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9793 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9794 (create_thread): Likewise.
9795 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9796 * init.c (__pthread_initialize_minimal_internal): Initialize
9797 __libc_multiple_threads_ptr if necessary.
9798 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
9799 __pthread_multiple_threads and __libc_multiple_threads_ptr.
9800 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9801 __libc_multiple_threads.
9802 (__libc_pthread_init): Return pointer to __libc_pthread_init if
9805 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9806 (THREAD_SETMEM_NC): Likewise.
9808 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9809 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9810 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9811 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9813 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9814 Eliminate one entire instruction.
9816 * cancellation.c (__pthread_enable_asynccancel_2): New function.
9817 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9818 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9819 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9820 instead of __pthread_enable_asynccancel.
9821 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9822 (__pthread_cond_wait): Likewise.
9823 * sysdeps/pthread/pthread_cond_timedwait.c
9824 (__pthread_cond_timedwait): Likewise.
9825 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9827 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9828 (__condvar_cleanup): Wake up all waiters in case we got signaled
9829 after being woken up but before disabling asynchronous
9831 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9832 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9833 (__condvar_cleanup): Likewise.
9835 * init.c (__NR_set_tid_address): If already defined, don't redefine.
9836 Make it an error if architecture has no #if case. Add x86-64.
9838 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9839 pt-initfini.s generation.
9841 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9842 (TLS_INIT_TP): Fix typo.
9844 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9846 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9847 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9849 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9850 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9851 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9852 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9853 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9854 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9855 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9856 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9858 2003-03-11 Ulrich Drepper <drepper@redhat.com>
9860 * sysdeps/pthread/pthread_cond_timedwait.c
9861 (__pthread_cond_timedwait): Return the result of the final
9862 locking. If it succeeds, the regular function return value.
9864 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9865 Return result of the final locking.
9866 * version.c (__nptl_main): Work around problems with the strange
9867 INTERNAL_SYSCALL macro on ppc32.
9868 * init.c (__pthread_initialize_minimal_internal): Unblock
9869 SIGCANCEL in case the parent blocked it.
9870 Reported by Paul Mackerras <paulus@samba.org>.
9872 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9873 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9874 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9876 2003-03-11 Jakub Jelinek <jakub@redhat.com>
9878 * sysdeps/pthread/pthread_cond_timedwait.c
9879 (__pthread_cond_timedwait): Unlock and fail if
9880 __pthread_mutex_unlock_internal failed.
9882 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9883 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9885 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9886 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9887 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9888 ALLOCATE_STACK): New macros.
9889 (TLS_TPADJ): New macro.
9890 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9891 (allocate_stack): Handle TLS_DTV_AT_TP and
9892 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
9893 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9895 * init.c [__ia64__] (__NR_set_tid_address): Define.
9897 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9898 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9899 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9900 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9901 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9902 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9903 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9904 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9905 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9906 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9907 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9908 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9909 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9910 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9911 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9912 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9913 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9914 * sysdeps/ia64/bits/atomic.h: New file.
9915 * sysdeps/ia64/Makefile: New file.
9916 * sysdeps/ia64/pthread_spin_init.c: New file.
9917 * sysdeps/ia64/pthread_spin_lock.c: New file.
9918 * sysdeps/ia64/pthread_spin_trylock.c: New file.
9919 * sysdeps/ia64/pthread_spin_unlock.c: New file.
9920 * sysdeps/ia64/pthreaddef.h: New file.
9921 * sysdeps/ia64/tcb-offsets.sym: New file.
9922 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9923 * sysdeps/ia64/tls.h: New file.
9925 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9926 to syscall instead of no arguments.
9928 2003-03-10 Ulrich Drepper <drepper@redhat.com>
9930 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9931 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9932 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9933 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9935 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9938 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9940 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9941 lowlevelbarrier.sym.
9942 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9943 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9944 Include lowlevelbarrier.h and don't define offsets locally.
9945 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9947 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9948 (__lll_mutex_lock_wait): Reverse order of first two parameters.
9949 (__lll_mutex_timedlock_wait): Likewise.
9950 (lll_mutex_lock): Adjust asm for that.
9951 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
9952 (lll_lock): Adjust asm for operand order change.
9953 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9954 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9956 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9957 Reverse order of parameters.
9958 (__lll_timedwait_tid): Remove regparms attribute.
9959 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9960 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9962 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9963 (__lll_timedwait_tid): Remove one unnecessary instruction.
9965 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9966 __lll_mutex_timedlock_wait only for NOT_IN_libc.
9967 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9970 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9971 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9973 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9976 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9977 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
9979 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9980 define LOCK here (if UP is not defined). The actual code is in
9983 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9984 LOCK is already defined. Don't define lll_unlock_wake_cb and
9985 __lll_timedwait_tid for libc.so.
9986 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9987 define LOCK here (if UP is not defined). The actual code is in
9990 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9991 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9992 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9993 instead of lowlevelsem.h.
9994 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9995 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9996 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9998 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10000 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10001 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10002 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10004 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10006 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10007 last changed. D'oh.
10009 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10011 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10012 of __libc_locking_needed.
10013 (lll_trylock): Initialize %eax to zero.
10015 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10016 pthread_cond_t definition.
10018 2003-03-10 Roland McGrath <roland@redhat.com>
10020 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10021 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10022 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10023 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10024 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10026 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10027 Instead of setting PD->multiple_threads, set globals
10028 __pthread_multiple_threads and __libc_multiple_threads.
10029 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10030 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10031 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10033 * descr.h (struct pthread): Conditionalize first member on
10034 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
10035 containing an anonymous tcbhead_t. Move `list' member out.
10036 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10037 * allocatestack.c: Remove use of `header.data.' prefix.
10038 * pthread_create.c: Likewise.
10039 * init.c (__pthread_initialize_minimal_internal): Likewise.
10040 * sysdeps/pthread/createthread.c (create_thread): Likewise.
10041 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10042 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10043 * sysdeps/x86_64/tls.h: Likewise.
10044 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10045 (SINGLE_THREAD_P): Likewise.
10046 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10047 (SINGLE_THREAD_P): Likewise.
10048 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10049 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10051 2003-03-09 Ulrich Drepper <drepper@redhat.com>
10053 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10055 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10056 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10058 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10059 leftovers from the ia32 code.
10061 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10063 (clear_once_control): Don't load %esi.
10065 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10068 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10070 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10071 * sysdeps/unix/sysv/linux/createthread.c: ...here.
10073 * Makefile (tests): Add tst-cond10.
10074 * tst-cond10.c: New file.
10076 2003-03-08 Ulrich Drepper <drepper@redhat.com>
10078 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10079 * tst-signal3.c (do_test): Likewise.
10080 * tst-sem5.c (do_test): Likewise.
10081 * tst-kill6.c (do_test): Likewise.
10082 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
10084 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10086 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10087 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10088 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10089 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10090 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10091 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10092 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10094 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10096 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10097 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10098 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10099 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10100 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10101 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10102 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10103 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10105 * allocatestack.c (allocate_stack): If mprotect() fails free the
10108 2003-03-07 Ulrich Drepper <drepper@redhat.com>
10110 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10112 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10113 lll_wake_tid. This was used only to work around kernel limits in
10115 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10116 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10117 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10118 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10120 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10121 (__pthread_initialize_minimal_internal): Change initialization of
10122 __static_tls_align_m1 appropriately.
10123 * pthreadP.h (__static_tls_align_m1): Renamed from
10124 __static_tls_align.
10125 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10126 instead of __static_tls_align-1.
10128 2003-03-04 Ulrich Drepper <drepper@redhat.com>
10130 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10132 * pthread_create.c: Define __pthread_keys using nocommon
10133 attribute, not by placing it explicitly in bss.
10134 Remove DEFINE_DEALLOC definition. Not needed anymore.
10136 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10137 Use it in mmap call to allocate stacks.
10139 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10141 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10142 result of the thread function.
10144 2003-03-03 Ulrich Drepper <drepper@redhat.com>
10146 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
10147 version is just fine.
10149 * sysdeps/unix/sysv/linux/libc_pthread_init.c
10150 (__pthread_child_handler): Renamed from pthread_child_handler,
10151 exported, and marked hidden. Change all users.
10152 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10153 free __pthread_child_handler from child list.
10155 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
10157 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10159 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10160 Fix handling of cancellation and failing pthread_mutex_unlock call.
10161 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10162 (__pthread_cond_wait): Likewise.
10164 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10165 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10166 lll_futex_timed_wait call.
10167 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10168 (pthread_rwlock_timedwrlock): Likewise.
10170 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10171 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10172 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10174 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10175 check of lll_futex_wake return value.
10177 2003-03-03 Roland McGrath <roland@redhat.com>
10179 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10181 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10182 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10183 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10185 2003-03-02 Ulrich Drepper <drepper@redhat.com>
10187 * sysdeps/pthread/timer_create.c (timer_create): Return correct
10188 error for CPU clocks.
10190 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10191 _POSIX_MONOTONIC_CLOCK.
10192 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10194 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10197 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10199 * descr.h (struct pthread): Move cleanup field to the front.
10201 2003-03-01 Roland McGrath <roland@redhat.com>
10203 * sem_open.c (sem_open): Braino fix.
10205 2003-03-01 Ulrich Drepper <drepper@redhat.com>
10207 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10208 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10209 __pthread_cleanup_pop functionality.
10210 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10212 * descr.h (struct pthread): Move tid field to the front now that
10215 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10216 (__lll_mutex_timedlock_wait): Remove.
10217 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10218 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10219 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10220 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10221 (lll_unlock_wake_cb): Don't save and restore %esi.
10222 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10224 (__lll_timedwait_tid): Add alignment.
10225 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10226 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
10228 (__lll_timedwait_tid): Removed.
10229 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10230 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10231 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10232 (pthread_barrier_wait): Don't save, load, and restore %esi for
10234 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10235 (__pthread_cond_signal): Don't save, load, and restore %esi.
10236 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10237 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10238 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10239 Don't save, load, and restore %esi.
10241 2003-02-27 Ulrich Drepper <drepper@redhat.com>
10243 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10244 Release lock before waking up the waiters.
10246 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10248 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10249 (reader_thread): Likewise.
10251 * sysdeps/pthread/pthread_rwlock_unlock.c
10252 (__pthread_rwlock_unlock): Release internal lock early. Don't try
10253 to wake up readers if there are none.
10255 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10256 Release internal lock before wake threads.
10258 2003-02-26 Ulrich Drepper <drepper@redhat.com>
10260 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10261 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
10263 * tst-rwlock9.c: Likewise.
10264 * tst-rwlock10.c: New file.
10265 * tst-rwlock11.c: New file.
10267 * Makefile (tests): Add tst-dlsym1.
10268 * tst-dlsym1.c: New file.
10270 * init.c (__pthread_initialize_minimal_internal): Set
10271 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10272 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10274 2003-02-24 Ulrich Drepper <drepper@redhat.com>
10276 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10278 * tst-cond2.c: Fix sychronization with child.
10280 * tst-rwlock8.c (reader_thread): Remove unused variable.
10282 * Makefile: Add rules to build and run tst-tls3.
10283 * tst-tls3.c: New file.
10284 * tst-tls3mod.c: New file.
10286 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10287 * tst-rwlock8.c: New file.
10288 * tst-rwlock9.c: New file.
10289 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10290 complete broken rwlock implementation.
10291 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10293 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10295 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10296 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10297 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10298 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10299 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10300 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10301 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10303 2003-02-23 Roland McGrath <roland@redhat.com>
10305 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10307 2003-02-23 Ulrich Drepper <drepper@redhat.com>
10309 * Makefile (tests): Add tst-context1.
10310 * tst-context1.c: New file.
10312 * Makefile (tests): Add tst-tls1 and tst-tls2.
10313 * tst-tls1.c: New file.
10314 * tst-tls2.c: New file.
10316 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10317 for failed cmpxchg.
10319 * pthread_create.c (start_thread): Set EXITING_BIT early.
10321 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10322 (THREAD_GETMEM_NC): Likewise.
10324 2003-02-22 Ulrich Drepper <drepper@redhat.com>
10326 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10327 off 3 more bytes by using offset-less instructions when possible.
10329 * Makefile: Add dependency for $(objpfx)version.d.
10331 * eintr.c (eintr_source): Add unnecessary return but the compiler
10334 * tst-kill3.c: Include <unistd.h>.
10336 2003-02-21 Roland McGrath <roland@redhat.com>
10338 * pthread_create.c (start_thread): Call __libc_thread_freeres.
10340 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10342 * Makefile (tests): Add tst-eintr1.
10343 (distribute): Add eintr.c.
10344 * tst-eintr1.c: New file.
10345 * eintr.c: New file.
10347 * pthread_cancel.c (pthread_cancel): Use tkill directly.
10349 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10350 Disallow sending SIGCANCEL.
10352 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
10353 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10354 * tst-kill1.c: New file.
10355 * tst-kill2.c: New file.
10356 * tst-kill3.c: New file.
10357 * tst-kill5.c: New file.
10358 * tst-kill6.c: New file.
10359 * tst-basic7.c: Renamed to...
10360 * tst-kill4.c: ...this.
10362 2003-02-21 Roland McGrath <roland@redhat.com>
10364 * Makefile (install-lib-ldscripts): New variable.
10366 2003-02-21 Ulrich Drepper <drepper@redhat.com>
10368 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10369 * pthread_cancel.c: Use INVALID_TD_P.
10370 * pthread_detach.c: Likewise.
10371 * pthread_getschedparam.c: Likewise.
10372 * pthread_setschedparam.c: Likewise.
10373 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10374 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10375 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10376 * pthread_timedjoin.c: Likewise.
10378 * tst-basic7.c: Include <signal.h>.
10380 * pthread_join.c (pthread_join): Limited checking for invalid
10382 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10384 2003-02-20 Ulrich Drepper <drepper@redhat.com>
10386 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10387 beginning of the loop. Clear the entire first block of TSD.
10388 * Makefile (tests): Add tst-key4.
10389 * tst-key4.c: New file.
10391 2003-02-18 Ulrich Drepper <drepper@redhat.com>
10393 * Makefile (tests): Add tst-basic7.
10394 * tst-basic7.c: New file.
10396 * pthread_create.c (deallocate_tsd): Mark as internal_function.
10397 Add some more __builtin_expect.
10399 * pthreadP.h: Define dummy version of DEBUGGING_P.
10401 2003-02-17 Ulrich Drepper <drepper@redhat.com>
10403 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10404 _POSIX_THREAD_PRIORITY_SCHEDULING.
10405 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10406 _XOPEN_REALTIME_THREADS.
10407 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10409 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10410 kernel returns EINVAL for PID <= 0, work around it.
10412 * Makefile (tests): Add tst-signal5.
10413 * tst-signal5.c: New file.
10415 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10416 and LOGIN_NAME_MAX.
10418 * tst-cancel1.c (tf): Block all signals.
10420 * Makefile (tests): Add tst-basic6.
10421 * tst-basic6.c: New file.
10423 * tst-basic1.c: Add test for process ID.
10425 * Makefile (tests): Add tst-cancel10.
10426 * tst-cancel10.c: New file.
10428 * Makefile (tests): Add tst-signal4.
10429 * tst-signal4.c: New file.
10431 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10432 __sigismember instead of sigismember. Add __builtin_expect.
10434 2003-02-16 Ulrich Drepper <drepper@redhat.com>
10436 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10437 pthread_setcancelstate, and pthread_rwlock_setpshared.
10439 * tst-cancel7.c (do_test): Make sure the pid file exists before
10440 canceling the thread.
10442 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10443 pthread_rwlock_timedrdlock tests.
10444 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10445 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10446 Check for invalid tv_nsec field.
10447 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10450 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10451 recursive mutex of overflow.
10453 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10455 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10456 going into an endless loop.
10457 * Makefile (tests): Add tst-cancel9.
10458 * tst-cancel9.c: New file.
10460 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10462 2003-02-15 Ulrich Drepper <drepper@redhat.com>
10464 * tst-mutex5.c (do_test): Add more timedlock tests.
10466 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10467 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10469 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10470 use INLINE_SYSCALL. Error number is returned, not -1.
10472 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10473 and __deallocate_stack with internal_function.
10474 * pthread_create.c: Adjust definitions appropriately.
10475 * allocatestack.c: Likewise.
10477 * pthread_join.c: Add one more __builtin_expect.
10478 * pthread_timedjoin.c: Likewise.
10480 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10481 not data of sequence number does not match.
10482 Add one __builtin_expect.
10484 * Makefile (tests): Add tst-clock1.
10485 * tst-clock1.c: New file.
10487 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10488 negative arguments.
10489 * Makefile (tests): Add tst-basic5.
10490 * tst-basic5.c: New file.
10492 2003-02-14 Ulrich Drepper <drepper@redhat.com>
10494 * Makefile (tests): Add tst-basic4.
10495 * tst-basic4.c: New file.
10497 * pthreadP.h: Add declaraction for __nptl_nthreads.
10498 * pthread_create.c: Define __nptl_nthreads
10499 (start_thread): Increment __nptl_nthreads at beginning. Decrement
10500 after thread is done. If then zero, call exit(0).
10501 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10502 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
10503 * init.c (pthread_functions): Initialize ptr_nthreads.
10504 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10505 (__reclaim_stacks): Decrement __nptl_nthreads.
10506 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10508 * Makefile (tests): Add tst-basic3.
10509 * tst-basic3.c: New file.
10511 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
10512 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
10513 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10514 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
10515 if asynchronous canceling is enabled.
10516 * pthread_join.c (pthread_join): When recognizing circular joins,
10517 take into account the other thread might be already canceled.
10518 * Makefile (tests): Add tst-join5.
10519 * tst-join5.c: New file.
10521 * Makefile (tests): Add tst-join4.
10522 * tst-join4.c: New file.
10524 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10526 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10528 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
10530 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10531 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10532 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10534 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10536 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10537 error if lll_futex_wake failed.
10539 2003-02-13 Ulrich Drepper <drepper@redhat.com>
10541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10542 handling of cancellation and failung pthread_mutex_unlock call.
10543 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10544 * Makefile (tests): Add tst-cond8 and tst-cond9.
10545 * tst-cond8.c: New file.
10546 * tst-cond9.c: New file.
10548 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10550 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
10551 non-standard initializers with __USE_GNU.
10553 * Makefile (tests): Add tst-cleanup3.
10554 * tst-cleanup3.c: New file.
10556 2003-02-12 Ulrich Drepper <drepper@redhat.com>
10558 * Makefile (tests): Add tst-attr1 and tst-attr2.
10559 * tst-attr1.c: New file.
10560 * tst-attr2.c: New file.
10562 * Makefile: Add rules to build and run tst-atfork2 test.
10563 * tst-atfork2.c: New file.
10564 * tst-atfork2mod.c: New file.
10566 * sysdeps/unix/sysv/linux/unregister-atfork.c
10567 (__unregister_atfork): Free the memory allocated for the handlers
10568 after removing them from the lists.
10570 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10573 * tst-atfork1.c (do_test): Wait for the child we forked.
10574 Report error in child.
10576 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10578 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10580 2003-02-10 Ulrich Drepper <drepper@redhat.com>
10582 * Makefile (tests): Add tst-cancel8.
10583 * tst-cancel8.c: New file.
10585 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10586 clearing of control variable.
10587 * Makefile (tests): Add tst-once3 and tst-once4.
10588 * tst-once3.c: New file.
10589 * tst-once4.c: New file.
10591 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
10593 * sysdeps/sh/Makefile: New file.
10594 * sysdeps/sh/bits/atomic.h: New file.
10595 * sysdeps/sh/pthread_spin_init.c: New file.
10596 * sysdeps/sh/pthread_spin_lock.c: New file.
10597 * sysdeps/sh/pthread_spin_trylock.S: New file.
10598 * sysdeps/sh/pthread_spin_unlock.S: New file.
10599 * sysdeps/sh/pthreaddef.h: New file.
10600 * sysdeps/sh/tcb-offsets.sym: New file.
10601 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10602 * sysdeps/sh/tls.h: New file.
10603 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10604 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10605 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10606 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10607 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10608 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10609 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10610 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10611 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10612 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10613 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10614 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10615 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10616 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10617 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10618 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10619 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10620 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10621 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10622 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10623 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10624 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10625 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10626 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10627 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10628 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10629 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10630 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10631 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10632 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10634 2003-02-08 Ulrich Drepper <drepper@redhat.com>
10636 * tst-cond2.c: Rearrange code to not rely on behavior undefined
10637 according to POSIX.
10639 * tst-basic2.c (do_test): Lock mutex before creating the thread.
10641 2003-02-07 Ulrich Drepper <drepper@redhat.com>
10643 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10644 (TLS_GET_FS): New #define.
10645 (TLS_SET_FS): New #define.
10646 Correct value of __NR_set_thread_area.
10648 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10650 2003-02-06 Ulrich Drepper <drepper@redhat.com>
10652 * Makefile (tests): Add tst-popen1.
10653 * tst-popen1.c: New file.
10655 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10656 but inactive generalization.
10657 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10658 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10659 Minor optimization, remove one instruction.
10660 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10662 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
10664 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10666 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
10668 * init.c (__NR_set_tid_address): Add #ifdef for s390.
10669 * sysdeps/pthread/pthread_barrier_wait.c: New file.
10670 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
10671 * sysdeps/pthread/pthread_cond_signal.c: New file.
10672 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
10673 * sysdeps/pthread/pthread_cond_wait.c: New file.
10674 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
10675 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
10676 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
10677 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
10678 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
10679 * sysdeps/s390/Makefile: New file.
10680 * sysdeps/s390/bits/atomic.h: New file.
10681 * sysdeps/s390/pthread_spin_init.c: New file.
10682 * sysdeps/s390/pthread_spin_lock.c: New file.
10683 * sysdeps/s390/pthread_spin_trylock.c: New file.
10684 * sysdeps/s390/pthread_spin_unlock.c: New file.
10685 * sysdeps/s390/pthreaddef.h: New file.
10686 * sysdeps/s390/tcb-offsets.sym: New file.
10687 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
10688 * sysdeps/s390/tls.h: New file.
10689 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
10690 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
10691 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
10692 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
10693 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
10694 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
10695 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10696 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
10697 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
10698 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
10699 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
10700 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
10701 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
10702 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
10703 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
10704 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
10705 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
10706 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
10707 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
10708 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
10709 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
10710 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
10711 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
10713 2003-02-04 Ulrich Drepper <drepper@redhat.com>
10715 * atomic.h: Add a couple more default implementations.
10716 (atomic_compare_and_exchange_acq): Use
10717 __arch_compare_and_exchange_32_acq in return value definition. It
10719 (atomic_bit_set): Renamed from atomic_set_bit.
10720 Add missing atomic_ prefixes.
10722 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
10723 thread library is available, use correct value to mark initialized
10726 2003-02-03 Ulrich Drepper <drepper@redhat.com>
10728 * allocatestack.c (allocate_stack): Use __getpagesize instead of
10729 __sysconf to determine pagesize.
10731 * pthread_create.c: Include <atomic.h>.
10732 * allocatestack.c (allocate_stack): Implement coloring of the
10733 allocated stack memory. Rename pagesize to pagesize_m1. It's the
10734 size minus one. Adjust users.
10735 * sysdeps/i386/i686/Makefile: New file.
10737 2003-02-02 Ulrich Drepper <drepper@redhat.com>
10739 * allocatestack.c: Improve comment throughout the file.
10741 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10742 (__lll_lock_wait): Add branch prediction.
10743 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10744 (__lll_lock_wait): Likewise.
10745 (lll_unlock_wake_cb): Removed.
10747 2003-01-31 Ulrich Drepper <drepper@redhat.com>
10749 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10750 _POSIX_THREAD_PRIORITY_SCHEDULING.
10752 2003-01-30 Jakub Jelinek <jakub@redhat.com>
10754 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10755 Fix return type of ptr___pthread_getspecific.
10757 2003-01-29 Ulrich Drepper <drepper@redhat.com>
10759 * Makefile (tests): Add tst-umask1.
10760 (tst-umask1-ARGS): Define.
10761 * tst-umask1.c: New file.
10763 2003-01-28 Ulrich Drepper <drepper@redhat.com>
10765 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
10766 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10767 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10768 pthread_rwlock_unlock.
10769 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10770 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10771 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10772 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10773 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10775 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10776 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10778 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10779 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10780 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10782 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10783 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10785 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10786 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10787 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10789 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10790 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10792 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10794 * Makefile (libpthread-routines): Remove lowlevelcond and
10795 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10796 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10797 and pthread_cond_broadcast.
10798 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10799 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10800 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10801 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10802 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10803 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10804 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10805 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10806 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10807 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10808 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10809 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10811 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10812 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10813 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10814 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10815 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10816 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10817 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10818 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10819 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10820 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10821 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10822 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10823 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10824 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10825 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10826 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10827 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10828 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10830 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10831 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
10832 of the code is moved to ...
10833 * sysdeps/pthread/createthread.c: ...here. New file.
10835 2003-01-27 Ulrich Drepper <drepper@redhat.com>
10837 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10838 (__new_sem_post): Clear %eax before returning.
10839 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10841 * Makefile (tests): Add tst-cleanup2.
10842 * tst-cleanup2.c: New file.
10844 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10845 Interpret first parameter correctly.
10847 2003-01-17 Ulrich Drepper <drepper@redhat.com>
10849 * Makefile (headers): Add bits/semaphore.h.
10851 2003-01-16 Jakub Jelinek <jakub@redhat.com>
10853 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10856 2003-01-14 Ulrich Drepper <drepper@redhat.com>
10858 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10859 must be used and mapping failed.
10860 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10862 * Makefile (CFLAGS-pthread_self.os): Define this, not
10863 CFLAGS-pthread_self.c.
10865 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10867 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10868 lll_unlock_wake_cb.
10870 * Makefile (libpthread-routines): Add version. Add rules to build
10871 version.os and banner.h.
10872 * version.c: New file.
10874 2003-01-13 Jakub Jelinek <jakub@redhat.com>
10876 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10877 the alias unconditional.
10878 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
10880 2003-01-13 Ulrich Drepper <drepper@redhat.com>
10882 * Makefile (CFLAGS-pthread_self.c): New definition.
10884 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10886 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10887 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10888 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10889 * init.c (__pthread_initialize_minimal_internal): Likewise.
10891 2003-01-07 Jakub Jelinek <jakub@redhat.com>
10893 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10895 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10896 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10897 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10898 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10899 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10900 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10902 2003-01-06 Jakub Jelinek <jakub@redhat.com>
10904 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10905 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10906 * tst-cancel-wrappers.sh: Remove all exceptions.
10908 2003-01-05 Ulrich Drepper <drepper@redhat.com>
10910 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10911 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
10913 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10914 Use __libc_pthread_functions array if SHARED.
10916 * pthreadP.h: Move pthread_cond_2_0_t definition to...
10917 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10919 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10920 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10921 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10922 __libc_ptf_call instead of __libc_maybe_call.
10923 (PTF): New #define.
10924 (__libc_cleanup_region_start): Wrap function name with PTF call.
10925 (__libc_cleanup_region_end): Likewise.
10926 (__libc_cleanup_end): Likewise.
10928 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10929 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10930 * pthread_key_create.c: Add __pthread_key_create_internal alias.
10931 * pthreadP.h: Add prototypes.
10933 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10934 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10935 __pthread_rwlock_unlock aliases.
10936 * pthreadP.h: Add prototypes for new aliases.
10938 * pthreadP.h (struct pthead_functions): Moved to...
10939 * sysdeps/pthread/pthread-functions.h: ...here. New file.
10940 * init.c (pthread_functions): Add initializers for new elements.
10942 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10943 __pthread_cleanup_pop_restore aliases.
10944 * pthreadP.h: Add prototypes.
10946 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10947 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10948 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10949 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10950 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10951 * pthreadP.h: Adjust prototypes and callers.
10953 2003-01-04 Ulrich Drepper <drepper@redhat.com>
10955 * Makefile (tests): Add tst-cancel7.
10956 (tst-cancel7-ARGS): New variable.
10957 * tst-cancel7.c: New file.
10959 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10960 around gcc defficiencies.
10961 * old_pthread_cond_signal.c: Likewise.
10962 * old_pthread_cond_timedwait.c: Likewise.
10963 * old_pthread_cond_wait.c: Likewise.
10965 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10967 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10969 * Makefile (tests): Add tst-cond7.
10970 * tst-cond7.c: New file.
10972 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10973 (condvar_cleanup): Get condvar address from the right place.
10975 * atomic.h: Correct definitions of atomic_full_barrier,
10976 atomic_read_barrier, atomic_write_barrier.
10978 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10980 * old_pthread_cond_signal.c: Likewise.
10981 * old_pthread_cond_timedwait.c: Likewise.
10982 * old_pthread_cond_wait.c: Likewise.
10984 2003-01-03 Jakub Jelinek <jakub@redhat.com>
10986 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10988 2003-01-03 Ulrich Drepper <drepper@redhat.com>
10990 * pthreadP.h (pthread_cond_2_0_t): New type.
10991 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10992 Use new type for the 2.0 condvar function prototypes.
10993 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10994 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10996 * old_pthread_cond_destroy.c: Likewise.
10997 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
10998 * old_pthread_cond_signal.c: Likewise.
10999 * old_pthread_cond_timedwait.c: Likewise.
11000 * old_pthread_cond_wait.c: Likewise.
11002 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11003 (__pthread_cond_wait): Don't save cancellation mode and seq value
11006 * herrno.c (__h_errno_location): Don't define as weak.
11008 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11010 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11011 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11012 and pthread_cond_wait.
11013 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11015 (__pthread_cond_broadcast_2_0): ... this.
11016 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11018 (__pthread_cond_destroy_2_0): ... this.
11019 * old_pthread_cond_init.c (__old_pthread_cond_init):
11021 (__pthread_cond_init_2_0): ... this.
11022 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11024 (__pthread_cond_signal_2_0): ... this.
11025 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11027 (__pthread_cond_wait_2_0): ... this.
11028 * pthread_cond_destroy.c: Include shlib-compat.h.
11029 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11030 * pthread_cond_init.c: Include shlib-compat.h.
11031 (pthread_cond_init): Change strong_alias into versioned_symbol.
11032 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11033 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11035 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11036 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11037 __pthread_cond_wait_2_0): New prototypes.
11038 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11039 __old_pthread_cond_init, __old_pthread_cond_signal,
11040 __old_pthread_cond_wait): Removed.
11041 * init.c: Include shlib-compat.h.
11042 (pthread_functions): Guard ptr___pthread_attr_init_2_0
11043 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11044 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11045 ptr___pthread_cond_*_2_0 fields.
11046 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11047 pthread_cond_*@GLIBC_2.0 compatibility symbols.
11049 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11050 LIBC_SIGACTION was not yet defined.
11051 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11052 [!defined LIBC_SIGACTION] (__sigaction): New function and
11054 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11055 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11057 2003-01-02 Jakub Jelinek <jakub@redhat.com>
11059 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11061 2003-01-02 Ulrich Drepper <drepper@redhat.com>
11063 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11064 New, larger type definition.
11065 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11067 * Versions [libpthread]: Add definitions for new pthread_cond_*
11068 interfaces for version GLIBC_2.3.2.
11069 * pthread_cond_init.c: Update initialization for new type definition.
11070 * Makefile (libpthread-routines): Remove pthread_cond_wait,
11071 pthread_cond_timedwait, pthread_cond_signal, and
11072 pthread_cond_broadcast. Add old_pthread_cond_init,
11073 old_pthread_cond_destroy, old_pthread_cond_wait,
11074 old_pthread_cond_timedwait, old_pthread_cond_signal, and
11075 old_pthread_cond_broadcast.
11076 * old_pthread_cond_broadcast.c: New file.
11077 * old_pthread_cond_destroy.c: New file.
11078 * old_pthread_cond_init.c: New file.
11079 * old_pthread_cond_signal.c: New file.
11080 * old_pthread_cond_timedwait.c: New file.
11081 * old_pthread_cond_wait.c: New file.
11082 * pthreadP.h: Add prototypes for the compatibility interfaces.
11084 * pthread_cond_destroy.c: Don't include <errno.h>.
11086 2003-01-01 Ulrich Drepper <drepper@redhat.com>
11088 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11089 unnecessary zero offset when addressing MUTEX.
11091 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11093 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11095 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11096 for __register_atfork.
11098 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11100 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11101 instead of ASSEMBLER test macro.
11103 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11104 __libc_current_sigrtmax): Add libc_hidden_def.
11106 * sysdeps/pthread/list.h: Remove assert.h include.
11108 2002-12-31 Ulrich Drepper <drepper@redhat.com>
11110 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11111 __pthread_initialize_minimal_internal not
11112 __pthread_initialize_minimal.
11114 2002-12-30 Ulrich Drepper <drepper@redhat.com>
11116 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11117 __pthread_initialize_minimal as hidden.
11119 * init.c (__pthread_initialize_minimal_internal): Don't mark as
11122 2002-12-31 Jakub Jelinek <jakub@redhat.com>
11124 * Makefile ($(inst_libdir)/libpthread.so): Depend on
11125 $(common-objpfx)format.lds, include that into the output script.
11127 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11129 2002-12-28 Andreas Jaeger <aj@suse.de>
11131 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11132 nsec resolution changes.
11133 (xstat64_conv): Likewise.
11134 (xstat32_conv): Likewise.
11135 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11136 struct kernel_stat.
11137 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11138 structs stat and stat64.
11139 * time/time.h (__timespec_defined): Define for __USE_MISC.
11140 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11142 2002-12-30 Jakub Jelinek <jakub@redhat.com>
11144 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
11146 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11147 (pthread_exit): Use strong_alias to avoid warnings.
11148 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11149 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11150 ptr___pthread_attr_init_2_*.
11151 * init.c (pthread_functions): Adjust.
11153 2002-12-29 Ulrich Drepper <drepper@redhat.com>
11155 * forward.c: Make all functions available by default again. It
11156 caused too much trouble.
11158 * pt-siglongjmp.c: Removed.
11160 2002-12-28 Jakub Jelinek <jakub@redhat.com>
11162 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11163 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11164 * sysdeps/i386/Makefile: New file.
11165 * sysdeps/i386/tcb-offsets.sym: New file.
11166 * sysdeps/pthread/tcb-offsets.h: New file.
11167 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11168 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11170 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11171 __register_atfork...
11172 (GLIBC_2.3.2): ...here.
11174 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11176 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11177 pthread_attr_setstackaddr with __attribute_deprecated__.
11179 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11181 * pt-system.c (system): Remove cancellation handling.
11182 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11183 cancellation routines.
11185 2002-12-28 Ulrich Drepper <drepper@redhat.com>
11187 * descr.h: Include <dl-sysdep.h>.
11188 (struct pthread): Move header.data.list to the back of the struct.
11189 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11190 (MULTIPLE_THREADS_OFFSET): Adjust offset.
11191 (SYSINFO_OFFSEET): Likewise.
11193 2002-12-27 Jakub Jelinek <jakub@redhat.com>
11195 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11197 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11198 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11199 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11200 (USE_DL_SYSINFO): Undef.
11202 2002-12-22 Jakub Jelinek <jakub@redhat.com>
11204 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11205 $(common-objpfx)libc.so.
11206 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11207 it is bigger than pipe buffer size even on arches with bigger
11209 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11211 2002-12-25 Ulrich Drepper <drepper@redhat.com>
11213 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11214 correct errno access for case that USE___THREAD is not defined.
11216 2002-12-24 Ulrich Drepper <drepper@redhat.com>
11218 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11219 Patch by Marijn Ros <marijn@mad.scientist.com>.
11221 2002-12-22 Roland McGrath <roland@redhat.com>
11223 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11225 2002-12-20 Ulrich Drepper <drepper@redhat.com>
11227 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11229 2002-12-19 Ulrich Drepper <drepper@redhat.com>
11231 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11232 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11233 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11235 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11237 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11238 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11239 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11240 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11241 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11242 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11243 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11244 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11246 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11248 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11250 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11252 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11254 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11255 that sysinfo is properly initialized.
11256 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11257 to 1 only for ld.so.
11259 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11260 RTLD_CORRECT_DYNAMIC_WEAK.
11262 2002-12-19 Jakub Jelinek <jakub@redhat.com>
11264 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11265 Use return 0 as 6th argument to FORWARD4.
11266 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11268 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11270 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11271 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11272 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11273 (INIT_SYSINFO): New #define.
11274 (TLS_TP_INIT): Use INIT_SYSINFO.
11275 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11276 At test to make sure SYSINFO_OFFSET value is correct.
11277 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11279 2002-12-18 Jakub Jelinek <jakub@redhat.com>
11281 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11282 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11283 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11284 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11285 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11286 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11287 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11289 2002-12-18 Ulrich Drepper <drepper@redhat.com>
11291 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11292 macro instead of using int $0x80 directly.
11294 * sysdeps/pthread/bits/stdio-lock.h: New file.
11295 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11296 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11297 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11298 * Makefile (routines): Add libc-lowlevelmutex.
11300 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11301 __i686.get_pc_thunk.dx.
11303 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11305 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11306 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11307 ($(objpfx)tst-cancel-wrappers.out): New rule.
11308 * tst-cancel-wrappers.sh: New test.
11309 * tst-locale1.c: Include signal.h.
11310 (uselocale): Test static linking of __libc_current_sigrt*.
11312 2002-12-17 Ulrich Drepper <drepper@redhat.com>
11314 * Makefile (tests): Add tst-cancel6.
11315 * tst-cancel6.c: New file
11317 2002-12-17 Jakub Jelinek <jakub@redhat.com>
11319 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11320 Define meaningfully for assembler as well.
11321 * pthreadP.h (struct pthread_functions): Remove
11322 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
11323 and ptr_pthread_attr_init_2_1 fields.
11324 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11325 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11326 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11327 (FORWARD3): Define using FORWARD4.
11328 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11330 * pt-system.c: Remove duplicate stdlib.h include.
11332 2002-12-16 Ulrich Drepper <drepper@redhat.com>
11334 * sem_init.c: Define sem_init@GLIBC_2.0.
11335 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11336 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11338 * flockfile.c: Moved to...
11339 * sysdeps/pthread/flockfile.c: ...here. New file.
11340 * funlockfile.c: Moved to...
11341 * sysdeps/pthread/funlockfile.c: ...here. New file.
11342 * ftrylockfile.c: Moved to...
11343 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
11345 2002-12-16 Jakub Jelinek <jakub@redhat.com>
11347 * libc-cancellation.c: Guard both function with
11348 #if !defined NOT_IN_libc.
11349 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11350 automatically provided pthread wrappers.
11351 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11352 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11354 * pt-open.c: Removed.
11355 * pt-fcntl.c: Removed.
11356 * pt-fsync.c: Removed.
11357 * pt-lseek.c: Removed.
11358 * pt-msgrcv.c: Removed.
11359 * pt-msgsnd.c: Removed.
11360 * pt-msync.c: Removed.
11361 * pt-nanosleep.c: Removed.
11362 * pt-open64.c: Removed.
11363 * pt-pause.c: Removed.
11364 * pt-pread.c: Removed.
11365 * pt-pread64.c: Removed.
11366 * pt-pwrite.c: Removed.
11367 * pt-pwrite64.c: Removed.
11368 * pt-read.c: Removed.
11369 * pt-recv.c: Removed.
11370 * pt-recvfrom.c: Removed.
11371 * pt-recvmsg.c: Removed.
11372 * pt-send.c: Removed.
11373 * pt-sendto.c: Removed.
11374 * pt-sigtimedwait.c: Removed.
11375 * pt-sigwait.c: Removed.
11376 * pt-wait.c: Removed.
11377 * pt-waitpid.c: Removed.
11378 * pt-write.c: Removed.
11379 * pt-accept.c: Removed.
11380 * pt-close.c: Removed.
11381 * pt-connect.c: Removed.
11382 * pt-lseek64.c: Removed.
11383 * pt-sendmsg.c: Removed.
11384 * pt-tcdrain.c: Removed.
11386 2002-12-15 Ulrich Drepper <drepper@redhat.com>
11388 * init.c (__pthread_initialize_minimal_internal): Renamed from
11389 __pthread_initialize_minimal. Make old name an alias. This
11390 converts a normal relocation into a relative relocation.
11392 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11394 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11395 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11396 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11397 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11398 pt-sigwaitinfo, pt-waitid, and pt-writev.
11399 * pt-creat.c: Removed.
11400 * pt-poll.c: Removed.
11401 * pt-pselect.c: Removed.
11402 * pt-readv.c: Removed.
11403 * pt-select.c: Removed.
11404 * pt-sigpause.c: Removed.
11405 * pt-sigsuspend.c: Removed.
11406 * pt-sigwaitinfo.c: Removed.
11407 * pt-waitid.c: Removed.
11408 * pt-writev.c: Removed.
11410 * init.c (pthread_functions): New variable.
11411 (__pthread_initialize_minimal): Pass pointer to pthread_functions
11412 (or NULL) to __libc_pthread_init.
11413 * forward.c: Rewrite to use __libc:pthread_functions array to get
11414 function addresses.
11415 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11417 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11418 Take new parameter. Copy content of variable pointed to by it
11419 to __libc_pthread_init.
11421 * pthreadP.h (struct pthread_functions): New type.
11422 (__libc_pthread_init): Declare.
11424 * pthread_attr_destroy.c: Add namespace protected alias.
11425 * pthread_attr_getdetachstate.c: Likewise.
11426 * pthread_attr_getinheritsched.c: Likewise.
11427 * pthread_attr_getschedparam.c: Likewise.
11428 * pthread_attr_getschedpolicy.c: Likewise.
11429 * pthread_attr_getscope.c: Likewise.
11430 * pthread_attr_setdetachstate.c: Likewise.
11431 * pthread_attr_setinheritsched.c: Likewise.
11432 * pthread_attr_setschedparam.c: Likewise.
11433 * pthread_attr_setschedpolicy.c: Likewise.
11434 * pthread_attr_setscope.c: Likewise.
11435 * pthread_cond_broadcast.c: Likewise.
11436 * pthread_cond_destroy.c: Likewise.
11437 * pthread_cond_init.c: Likewise.
11438 * pthread_cond_signal.c: Likewise.
11439 * pthread_cond_wait.c: Likewise.
11440 * pthread_condattr_destroy.c: Likewise.
11441 * pthread_condattr_init.c: Likewise.
11442 * pthread_equal.c: Likewise.
11443 * pthread_exit.c: Likewise.
11444 * pthread_getschedparam.c: Likewise.
11445 * pthread_self.c: Likewise.
11446 * pthread_setcancelstate.c: Likewise.
11447 * pthread_setschedparam.c: Likewise.
11448 * pthread_mutex_destroy.c: Likewise.
11449 * pthread_mutex_init.c: Likewise.
11450 * pthreadP.h: Add prototypes for the aliases.
11452 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11453 multiple_threads member in correct TCB to 1.
11455 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11456 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
11457 member of thread decriptor, otherwise return unconditionally 1.
11459 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11461 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11462 regular Linux version. Remove file.
11463 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
11464 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
11465 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
11466 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
11467 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
11468 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
11469 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
11470 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
11471 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
11472 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
11473 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
11474 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
11475 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
11476 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
11477 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
11478 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
11479 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
11480 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
11481 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
11482 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
11483 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
11484 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
11485 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
11486 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
11487 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
11488 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
11489 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
11490 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
11491 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
11492 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
11494 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11496 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11497 * sysdeps/unix/sysv/linux/open.c: Removed.
11498 * sysdeps/unix/sysv/linux/fsync.c: Removed.
11499 * sysdeps/unix/sysv/linux/lseek.c: Removed.
11500 * sysdeps/unix/sysv/linux/msync.c: Removed.
11501 * sysdeps/unix/sysv/linux/read.c: Removed.
11502 * sysdeps/unix/sysv/linux/close.c: Removed.
11503 * sysdeps/unix/sysv/linux/creat.c: Removed.
11504 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11505 * sysdeps/unix/sysv/linux/pause.c: Removed.
11506 * sysdeps/unix/sysv/linux/select.c: Removed.
11507 * sysdeps/unix/sysv/linux/write.c: Removed.
11509 2002-12-14 Ulrich Drepper <drepper@redhat.com>
11511 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11512 element in TCB to see whether locking is needed.
11514 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11515 MULTIPLE_THREADS_OFFSET value is correct.
11517 * sysdeps/unix/sysv/linux/close.c: New file.
11518 * sysdeps/unix/sysv/linux/connect.S: New file.
11519 * sysdeps/unix/sysv/linux/creat.c: New file.
11520 * sysdeps/unix/sysv/linux/fsync.c: New file.
11521 * sysdeps/unix/sysv/linux/llseek.c: New file.
11522 * sysdeps/unix/sysv/linux/lseek.c: New file.
11523 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11524 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11525 * sysdeps/unix/sysv/linux/msync.c: New file.
11526 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11527 * sysdeps/unix/sysv/linux/open.c: New file.
11528 * sysdeps/unix/sysv/linux/open64.c: New file.
11529 * sysdeps/unix/sysv/linux/pause.c: New file.
11530 * sysdeps/unix/sysv/linux/poll.c: New file.
11531 * sysdeps/unix/sysv/linux/pread.c: New file.
11532 * sysdeps/unix/sysv/linux/pread64.c: New file.
11533 * sysdeps/unix/sysv/linux/pselect.c: New file.
11534 * sysdeps/unix/sysv/linux/pwrite.c: New file.
11535 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11536 * sysdeps/unix/sysv/linux/readv.c: New file.
11537 * sysdeps/unix/sysv/linux/recv.S: New file.
11538 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11539 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11540 * sysdeps/unix/sysv/linux/select.c: New file.
11541 * sysdeps/unix/sysv/linux/send.S: New file.
11542 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11543 * sysdeps/unix/sysv/linux/sendto.S: New file.
11544 * sysdeps/unix/sysv/linux/sigpause.c: New file.
11545 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11546 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11547 * sysdeps/unix/sysv/linux/sigwait.c: New file.
11548 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11549 * sysdeps/unix/sysv/linux/system.c: New file.
11550 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11551 * sysdeps/unix/sysv/linux/wait.c: New file.
11552 * sysdeps/unix/sysv/linux/waitid.c: New file.
11553 * sysdeps/unix/sysv/linux/waitpid.c: New file.
11554 * sysdeps/unix/sysv/linux/writev.c: New file.
11555 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11557 * pt-readv.c: Fix comment.
11559 2002-12-14 Jakub Jelinek <jakub@redhat.com>
11561 * tst-cleanup1.c: Include stdlib.h.
11563 * tst-cancel5.c: New test.
11564 * Makefile (tests): Add tst-cancel5.
11565 (tst-cancel5): Link against libc.so libpthread.so in that order.
11567 2002-12-13 Ulrich Drepper <drepper@redhat.com>
11569 * forward.c (test_loaded): Prevent recursive calls.
11571 * Makefile (routines): Add libc-cancellation.
11572 * libc-cancellation.c: New file.
11573 * descr.h (struct pthread): Add multiple_threads field.
11574 * allocatestack.c (allocate_stack): Initialize multiple_header field of
11575 new thread descriptor to 1.
11576 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11577 Initialize multiple_thread field after successful thread creation.
11578 * cancellation.c (__do_cancel): Move to pthreadP.h.
11579 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11580 (__pthread_disable_asynccancel): Add internal_function attribute.
11581 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11582 * pthread_setcancelstate.c: Likewise.
11583 * pthread_setcanceltype.c: Likewise.
11584 * pthread_exit.c: Likewise.
11585 * pthreadP.h (CANCELLATION_P): Likewise.
11586 (__do_cancel): Define as static inline.
11587 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11588 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11590 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11591 fields. Define MULTIPLE_THREADS_OFFSET.
11592 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11594 * sysdeps/unix/sysv/linux/accept.S: New file.
11595 * sysdeps/unix/sysv/linux/read.c: New file.
11596 * sysdeps/unix/sysv/linux/write.c: New file.
11597 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11598 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11599 initialization of __libc_locking_needed.
11600 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11601 __libc_locking_needed, use multiple_threads field in TCB.
11602 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11604 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11606 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11608 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11610 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11611 access to __libc_locking_needed for PIC.
11613 2002-12-12 Jakub Jelinek <jakub@redhat.com>
11615 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11616 declare for libc.so.
11617 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11619 (__libc_lock_lock): Put into statement expression.
11620 (__libc_lock_unlock): Remove trailing semicolon.
11621 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11623 2002-12-12 Roland McGrath <roland@redhat.com>
11625 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11626 "m" constraint to refer to __libc_locking_needed. Declare it here.
11628 2002-12-12 Ulrich Drepper <drepper@redhat.com>
11630 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11631 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11632 Initialize __libc_locking_needed.
11633 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11634 instead of __register_pthread_fork_handler.
11635 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11636 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11637 fork-gen with libc_pthread_init.
11638 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11639 of __register_pthread_fork_handler.
11640 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11641 of __register_pthread_fork_handler.
11642 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11643 __libc_locking_needed to determine whether lock prefix can be avoided.
11644 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11646 2002-12-11 Ulrich Drepper <drepper@redhat.com>
11648 * Makefile (tests): Add tst-cleanup1.
11649 * tst-cleanup1.c: New file.
11650 * cancellation.c (__cleanup_thread): Removed.
11651 (__do_cancel): Remove call to __cleanup_thread.
11652 * pthreadP.h: Remove __cleanup_thread prorotype.
11654 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11655 Remember function and argument even if cancellation handler
11656 function is not available.
11657 (__libc_cleanup_region_end): Execute registered function directly if
11658 pthread functions are not available.
11659 (__libc_cleanup_end): Likewise.
11661 * init.c (__pthread_initialize_minimal): Fix initialization in
11662 static lib by preventing gcc from being too clever.
11664 2002-12-10 Ulrich Drepper <drepper@redhat.com>
11666 * init.c (__pthread_initialize_minimal): Remove unneccesary
11669 * Makefile (tests): We can run tst-locale2 now.
11671 2002-12-09 Ulrich Drepper <drepper@redhat.com>
11673 * Versions: Remove duplicated sigwait entry.
11675 2002-12-08 Ulrich Drepper <drepper@redhat.com>
11677 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
11680 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
11682 * pthreadP.h: Declare __pthread_enable_asynccancel and
11683 __pthread_disable_asynccancel.
11684 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
11685 (CANCEL_RESET): Use __pthread_disable_asynccancel.
11686 * cancellation.c (__pthread_enable_asynccancel): New function.
11687 (__pthread_disable_asynccancel): New function.
11688 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
11689 * pt-close.c: Likewise.
11690 * pt-connect.c: Likewise.
11691 * pt-creat.c: Likewise.
11692 * pt-fcntl.c: Likewise.
11693 * pt-fsync.c: Likewise.
11694 * pt-lseek.c: Likewise.
11695 * pt-lseek64.c: Likewise.
11696 * pt-msgrcv.c: Likewise.
11697 * pt-msgsnd.c: Likewise.
11698 * pt-msync.c: Likewise.
11699 * pt-nanosleep.c: Likewise.
11700 * pt-open.c: Likewise.
11701 * pt-open64.c: Likewise.
11702 * pt-pause.c: Likewise.
11703 * pt-poll.c: Likewise.
11704 * pt-pread.c: Likewise.
11705 * pt-pread64.c: Likewise.
11706 * pt-pselect.c: Likewise.
11707 * pt-pwrite.c: Likewise.
11708 * pt-pwrite64.c: Likewise.
11709 * pt-read.c: Likewise.
11710 * pt-readv.c: Likewise.
11711 * pt-recv.c: Likewise.
11712 * pt-recvfrom.c: Likewise.
11713 * pt-recvmsg.c: Likewise.
11714 * pt-select.c: Likewise.
11715 * pt-send.c: Likewise.
11716 * pt-sendmsg.c: Likewise.
11717 * pt-sendto.c: Likewise.
11718 * pt-sigpause.c: Likewise.
11719 * pt-sigsuspend.c: Likewise.
11720 * pt-sigtimedwait.c: Likewise.
11721 * pt-sigwait.c: Likewise.
11722 * pt-sigwaitinfo.c: Likewise.
11723 * pt-system.c: Likewise.
11724 * pt-tcdrain.c: Likewise.
11725 * pt-wait.c: Likewise.
11726 * pt-waitid.c: Likewise.
11727 * pt-waitpid.c: Likewise.
11728 * pt-write.c: Likewise.
11729 * pt-writev.c: Likewise.
11730 * pthread_join.c: Likewise.
11731 * pthread_timedjoin.c: Likewise.
11733 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
11734 (__xpg_sigpause): New function.
11735 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11737 2002-12-07 Ulrich Drepper <drepper@redhat.com>
11739 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11741 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11742 _GI_pthread_cleanup_pop to pthreadP.h.
11744 * ftrylockfile.c: Use _IO_lock_trylock instead of
11745 pthread_mutex_trylock.
11747 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11748 (CANCEL_RESET): Likewise.
11749 (__pthread_setcanceltype_): Declare.
11750 (__pthread_mutex_lock_internal): Declare.
11751 (__pthread_mutex_unlock_internal): Declare.
11752 (__pthread_once_internal): Declare.
11753 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11754 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11756 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11757 and pthread_mutex_unlock.
11758 * pthread_cond_wait.c: Likewise.
11759 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11760 * pthread_mutex_unlock.c: Likewise.
11762 * pthread_setcanceltype.c: Add additional alias
11763 __pthread_setcanceltype.
11765 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11766 * sem_open.c (sem_open): Likewise.
11767 Use __libc_open, __libc_write, and __libc_close instead of
11768 open, write, and close respectively.
11770 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11771 Rewrite as statement expression since it must return a value.
11773 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11774 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11777 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11778 alias __pthread_once_internal.
11780 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11782 2002-12-06 Ulrich Drepper <drepper@redhat.com>
11784 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11785 * tst-stdio1.c: New file.
11786 * tst-stdio2.c: New file.
11788 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11790 * Makefile (tests): Comment out tst-locale2 for now.
11791 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11793 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11795 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11796 Use _IO_lock_init instead of explicit assignment.
11798 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11799 Define __libc_lock_* and __libc_lock_recursive macros with
11800 lowlevellock macros, not pthread mutexes.
11802 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
11803 of pthread_mutex_lock.
11804 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
11805 instead of pthread_mutex_unlock.
11807 2002-12-06 Roland McGrath <roland@redhat.com>
11809 * allocatestack.c (__stack_user): Use uninitialized defn.
11810 * init.c (__pthread_initialize_minimal): Initialize it here.
11812 2002-12-05 Roland McGrath <roland@redhat.com>
11814 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11816 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11818 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11819 missing & here too.
11821 2002-12-05 Ulrich Drepper <drepper@redhat.com>
11823 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11825 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11826 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11827 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11828 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11829 for __libc_lock_* macros.
11830 * Makefile (routines): Add libc-lowlevellock.
11832 2002-10-09 Roland McGrath <roland@redhat.com>
11834 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11835 Under [__PIC__], call the function via the pointer fetched for
11836 comparison rather than a call by name that uses the PLT.
11837 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11838 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11839 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11840 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11841 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11843 2002-12-04 Roland McGrath <roland@redhat.com>
11845 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11847 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11848 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11850 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11852 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11854 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11855 a completely opaque, non-integer type.
11856 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11858 2002-12-05 Jakub Jelinek <jakub@redhat.com>
11860 * sysdeps/i386/tls.h: Include stdlib.h.
11861 * sysdeps/x86_64/tls.h: Likewise.
11863 2002-12-04 Ulrich Drepper <drepper@redhat.com>
11865 * Makefile (tests): Add tst-locale2.
11866 (tests-static): Likewise.
11867 * tst-locale2.c: New file.
11869 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11870 volatile and add memory clobbers to lock operations.
11872 2002-12-03 Ulrich Drepper <drepper@redhat.com>
11874 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11875 * sysdeps/i386/i486/bits/atomic.h: New file.
11876 * sysdeps/i386/i586/bits/atomic.h: New file.
11877 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11878 include i486 version.
11879 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11880 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11881 Patch by Marijn Ros <marijn@mad.scientist.com>.
11883 * allocatestack.c (get_cached_stack): Don't crash if we first
11884 found a stack with a larger size then needed.
11885 Reported by Hui Huang <hui.huang@sun.com>.
11887 * Makefile (tests): Add tst-sysconf.
11888 * tst-sysconf.c: New file.
11890 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11891 PTHREAD_THREADS_MAX.
11893 2002-12-02 Roland McGrath <roland@redhat.com>
11895 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11896 Declare using hidden_proto instead of attribute_hidden, so there are
11897 non-.hidden static symbols for gdb to find.
11898 (__pthread_keys): Likewise.
11899 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11900 * allocatestack.c (__stack_user): Likewise.
11901 * pthread_create.c (__pthread_keys): Likewise.
11902 (__nptl_threads_events, __nptl_last_event): Make these static instead
11904 * pthread_key_create.c (__pthread_pthread_keys_max,
11905 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11907 2002-12-02 Ulrich Drepper <drepper@redhat.com>
11909 * Makefile (tests): Add tst-locale1. If buid-static is yes link
11911 * tst-locale1.c: New file.
11913 * pthread_cond_timedwait.c: Include <stdlib.h>.
11915 * Makefile (tests): Add tst-fork2 and tst-fork3.
11916 * tst-fork2.c: New file.
11917 * tst-fork3.c: New file.
11919 2002-11-28 Ulrich Drepper <drepper@redhat.com>
11921 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11923 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11924 require it to 200112L.
11926 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11927 instruction only if HAVE_CMOV is defined.
11928 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11930 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11932 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11934 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11936 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11938 2002-11-27 Ulrich Drepper <drepper@redhat.com>
11940 * sysdeps/x86_64/bits/atomic.h: New file.
11942 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11945 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11946 possible since gettid cannot fail.
11948 * sysdeps/x86_64/pthreaddef.h: New file.
11950 * sysdeps/i386/pthreaddef.h (gettid): Removed.
11952 * sysdeps/x86_64/pthread_spin_init.c: New file.
11953 * sysdeps/x86_64/pthread_spin_lock.c: New file.
11954 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11955 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11957 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11958 Add missing lock prefix. Minute optimization.
11960 * tst-spin2.c (main): Also check successful trylock call.
11962 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11963 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
11965 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11966 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
11968 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
11969 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11970 value in case of an error. Add support for INTERNAL_SYSCALL.
11972 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11973 value in case of an error.
11975 * sysdeps/x86_64/tls.h: New file.
11977 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11979 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
11980 takes the array member name and the index as parameters.
11981 (THREAD_SETMEM_NC): Likewise.
11982 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11983 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11986 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11987 to decide which code to use.
11988 (THREAD_SETMEM_NC): Likewise.
11990 * allocatestack.c (queue_stack): Don't remove stack from list here.
11991 Do it in the caller. Correct condition to prematurely terminate
11992 loop to free stacks.
11993 (__deallocate_stack): Remove stack from list here.
11995 2002-11-26 Ulrich Drepper <drepper@redhat.com>
11997 * Makefile (tests): Add tst-stack1.
11998 * tst-stack1.c: New file.
12000 * allocatestack.c (allocate_stack): Initialize the TCB on a user
12003 * pthread_attr_getstack.c: Return bottom of the thread area.
12005 2002-11-25 Ulrich Drepper <drepper@redhat.com>
12007 * Makefile (libpthread-routines): Add pt-allocrtsig and
12008 pthread_kill_other_threads.
12009 * pt-allocrtsig.c: New file.
12010 * pthread_kill_other_threads.c: New file.
12011 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12012 all three functions.
12013 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12015 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12016 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12017 and __libc_allocate_rtsig_private.
12018 * Versions (libpthread): Export pthread_kill_other_threads_np,
12019 __libc_current_sigrtmin, and __libc_current_sigrtmax.
12021 2002-11-24 Ulrich Drepper <drepper@redhat.com>
12023 * allocatestack.c (allocate_stack): stackaddr in attribute points to
12024 the end of the stack. Adjust computations.
12025 When mprotect call fails dequeue stack and free it.
12026 * pthread_attr_setstack.c: Store top of the stack in stackaddr
12028 * pthread_getattr_np.c: Likewise.
12030 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12033 2002-11-23 Ulrich Drepper <drepper@redhat.com>
12035 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12036 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12038 2002-11-22 Ulrich Drepper <drepper@redhat.com>
12040 * pthread_getspecific.c: Optimize access to first 2nd-level array.
12041 * pthread_setspecific.c: Likewise.
12043 2002-11-21 Ulrich Drepper <drepper@redhat.com>
12045 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12046 definitions. Get them from the official place.
12047 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12049 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12050 Use new CLONE_ flags in clone() calls.
12052 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12053 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12055 * Versions: Add pthread_* functions for libc.
12056 * forward.c: New file.
12058 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12060 * herrno.c: New file.
12063 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12064 sem_trywait, and sem_timedwait. Add herrno and res.
12065 * sem_init.c: Don't initialize lock and waiters members.
12066 * sem_open.c: Likewise.
12067 * sem_post.c: Removed.
12068 * sem_wait.c: Removed.
12069 * sem_trywait.c: Removed.
12070 * sem_timedwait.c: Removed.
12071 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12072 Includes full implementations of sem_post, sem_wait, sem_trywait,
12074 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12075 for new implementation.
12076 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12077 and waiters fields.
12079 * tst-sem3.c: Improve error message.
12080 * tst-signal3.c: Likewise.
12082 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12083 to tell the kernel about the termination futex and to initialize tid
12084 member. Don't initialize main_thread.
12085 * descr.h (struct pthread): Remove main_thread member.
12086 * cancelllation.c (__do_cancel): Remove code handling main thread.
12087 The main thread is not special anymore.
12089 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
12090 size of the stacks to stack_cache_actsize.
12092 * pt-readv.c: Add missing "defined".
12093 * pt-sigwait.c: Likewise.
12094 * pt-writev.c: Likewise.
12096 2002-11-09 Ulrich Drepper <drepper@redhat.com>
12098 * Versions: Export __connect from libpthread.
12099 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12101 * Makefile (libpthread-routines): Add pt-raise.
12102 * sysdeps/unix/sysv/linux/raise.c: New file.
12103 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12104 * sysdeps/generic/pt-raise.c: New file.
12106 * pthread_cond_init.c: Initialize all data elements of the condvar
12107 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
12109 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12110 * pthread_create.c: Likewise.
12112 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12113 * tst-key1.c: New file.
12114 * tst-key2.c: New file.
12115 * tst-key3.c: New file.
12117 * Versions: Export pthread_detach for version GLIBC_2.0.
12118 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12120 2002-11-08 Ulrich Drepper <drepper@redhat.com>
12122 * pthread_key_create.c: Terminate search after an unused key was found.
12123 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12125 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12126 Patch by Luca Barbieri <ldb@ldb.ods.org>.
12128 2002-10-10 Ulrich Drepper <drepper@redhat.com>
12130 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12131 dynamic lookup for errno in PIC.
12133 * allocatestack.c (get_cached_stack): Rearrange code slightly to
12134 release the stack lock as soon as possible.
12135 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12136 the static TLS block.
12137 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12139 * cancellation.c: Renamed from cancelation.c.
12140 * Makefile: Adjust accordingly.
12141 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12142 * cleanup_defer.c: Use CANCELLATION_P.
12143 * pthread_testcancel.c: Likewise.
12144 * descr.h: Fix spelling in comments.
12145 * init.c: Likewise.
12146 * pthread_getattr_np.c: Likewise.
12147 * pthread_getschedparam.c: Likewise.
12148 * pthread_setschedparam.c: Likewise.
12149 * Versions: Likewise.
12151 * pt-pselect.c: New file.
12152 * Makefile (libpthread-routines): Add pt-pselect.
12153 * Versions: Add pselect.
12155 * tst-cancel4.c: New file.
12156 * Makefile (tests): Add tst-cancel4.
12158 2002-10-09 Ulrich Drepper <drepper@redhat.com>
12160 * pthread_mutex_lock.c: Always record lock ownership.
12161 * pthread_mutex_timedlock.c: Likewise.
12162 * pthread_mutex_trylock.c: Likewise.
12164 * pt-readv.c: New file.
12165 * pt-writev.c: New file.
12166 * pt-creat.c: New file.
12167 * pt-msgrcv.c: New file.
12168 * pt-msgsnd.c: New file.
12169 * pt-poll.c: New file.
12170 * pt-select.c: New file.
12171 * pt-sigpause.c: New file.
12172 * pt-sigsuspend.c: New file.
12173 * pt-sigwait.c: New file.
12174 * pt-sigwaitinfo.c: New file.
12175 * pt-waitid.c: New file.
12176 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12177 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12178 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12179 * Versions: Add all the new functions.
12181 * tst-exit1.c: New file.
12182 * Makefile (tests): Add tst-exit1.
12184 * sem_timedwait.c: Minor optimization for more optimal fastpath.
12186 2002-10-08 Ulrich Drepper <drepper@redhat.com>
12188 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12190 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12191 call. pthread_join is an official cancellation point.
12192 * pthread_timedjoin.c: Likewise.
12194 * pthread_cond_wait.c: Revert order in which internal lock are dropped
12195 and the condvar's mutex are retrieved.
12196 * pthread_cond_timedwait.c: Likewise.
12197 Reported by dice@saros.East.Sun.COM.
12199 2002-10-07 Ulrich Drepper <drepper@redhat.com>
12201 * pthreadP.h: Cut out all type definitions and move them...
12202 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
12203 * pthreadP.h: Include <internaltypes.h>.
12205 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12206 performance tweaks.
12208 * sem_trywait.c: Shuffle #includes around to get right order.
12209 * sem_timedwait.c: Likewise.
12210 * sem_post.c: Likewise.
12211 * sem_wait.c: Likewise.
12213 * nptl 0.3 released.
12215 * Makefile (tests): Add tst-signal3.
12216 * tst-signal3.c: New file.
12218 2002-10-05 Ulrich Drepper <drepper@redhat.com>
12220 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12221 the asms modify the sem object.
12222 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12224 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12225 the actual members.
12226 * pthreadP.h (struct sem): New type. Actual semaphore type.
12227 * semaphoreP.h: Include pthreadP.h.
12228 * sem_getvalue.c: Adjust to sem_t change.
12229 * sem_init.c: Likewise.
12230 * sem_open.c: Likewise.
12231 * sem_post.c: Likewise.
12232 * sem_timedwait.c: Likewise.
12233 * sem_trywait.c: Likewise.
12234 * sem_wait.c: Likewise.
12236 2002-10-04 Ulrich Drepper <drepper@redhat.com>
12238 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12239 * tst-basic2.c: New file.
12240 * tst-exec1.c: New file.
12241 * tst-exec2.c: New file.
12242 * tst-exec3.c: New file.
12244 * tst-fork1.c: Remove extra */.
12246 * nptl 0.2 released. The API for IA-32 is complete.