1 2006-12-09 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4 (__rtld_mrlock_initialize): Add missing closing parenthesis.
6 2006-10-30 Jakub Jelinek <jakub@redhat.com>
8 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9 __sync_lock_release instead of __sync_lock_release_si.
11 2006-10-29 Jakub Jelinek <jakub@redhat.com>
13 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
15 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
16 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
17 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
18 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
19 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
20 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
21 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
22 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
23 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
24 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
25 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
27 2006-10-27 Ulrich Drepper <drepper@redhat.com>
29 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
30 * pthread_barrier_wait.c: ...here.
31 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
32 * pthread_cond_broadcast.c: ...here.
33 * sysdeps/pthread/pthread_cond_signal.c: Move to...
34 * pthread_cond_signal.c: ...here.
35 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
36 * pthread_cond_timedwait.c: ...here.
37 * sysdeps/pthread/pthread_cond_wait.c: Move to...
38 * pthread_cond_wait.c: ...here.
39 * sysdeps/pthread/pthread_once.c: Move to...
40 * pthread_once.c: ...here.
41 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
42 * pthread_rwlock_rdlock.c: ...here.
43 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
44 * pthread_rwlock_timedrdlock.c: ...here.
45 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
46 * pthread_rwlock_timedwrlock.c: ...here.
47 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
48 * pthread_rwlock_unlock.c: ...here.
49 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
50 * pthread_rwlock_wrlock.c: ...here.
51 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
52 * pthread_spin_destroy.c: ...here.
53 * sysdeps/pthread/pthread_spin_init.c: Move to...
54 * pthread_spin_init.c: ...here.
55 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
56 * pthread_spin_unlock.c: ...here.
57 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
58 * pthread_getcpuclockid.c: ...here.
60 * init.c: USE_TLS support is now default.
61 * tst-tls5.h: Likewise.
62 * sysdeps/alpha/tls.h: Likewise.
63 * sysdeps/i386/tls.h: Likewise.
64 * sysdeps/ia64/tls.h: Likewise.
65 * sysdeps/powerpc/tls.h: Likewise.
66 * sysdeps/s390/tls.h: Likewise.
67 * sysdeps/sh/tls.h: Likewise.
68 * sysdeps/sparc/tls.h: Likewise.
69 * sysdeps/x86_64/tls.h: Likewise.
71 2006-10-27 Jakub Jelinek <jakub@redhat.com>
73 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
74 __rtld_mrlock_change): Update oldval if atomic compare and exchange
77 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
78 Define to THREAD_SELF->header.multiple_threads.
79 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
81 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
83 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
84 (SINGLE_THREAD_P): Likewise.
85 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
86 (SINGLE_THREAD_P): Likewise.
87 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
88 (SINGLE_THREAD_P): Likewise.
89 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
90 (SINGLE_THREAD_P): Likewise.
91 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
93 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
94 (SINGLE_THREAD_P): Likewise.
95 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
96 (SINGLE_THREAD_P): Likewise.
97 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
100 2006-10-26 Jakub Jelinek <jakub@redhat.com>
102 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
103 by default rather than 2_3_3.
105 2006-10-17 Jakub Jelinek <jakub@redhat.com>
107 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
108 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
109 atomic_* instead of catomic_* macros.
111 2006-10-12 Ulrich Drepper <drepper@redhat.com>
114 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
115 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
116 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
117 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
118 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
119 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
120 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
121 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
122 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
123 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
124 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
125 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
126 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
128 2006-10-11 Ulrich Drepper <drepper@redhat.com>
130 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
131 cancelable syscalls with six parameters.
133 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
134 operations instead of atomic_*.
136 2006-10-09 Ulrich Drepper <drepper@redhat.com>
138 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
140 2006-10-07 Ulrich Drepper <drepper@redhat.com>
142 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
143 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
144 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
146 * pthread_attr_setstack.c: Allow overwriting the version number of the
148 * pthread_attr_setstacksize.c: Likewise.
149 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
151 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
152 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
154 2006-09-24 Ulrich Drepper <drepper@redhat.com>
157 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
158 Patch by Petr Baudis.
160 2006-09-18 Jakub Jelinek <jakub@redhat.com>
162 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
164 * tst-cancel2.c (tf): Loop as long as something was written.
166 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
168 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
169 mutexes wake all mutexes.
170 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
171 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
172 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
174 2006-09-12 Ulrich Drepper <drepper@redhat.com>
176 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
177 to guarantee the thread is always canceled.
179 2006-09-08 Jakub Jelinek <jakub@redhat.com>
181 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
183 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
184 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
185 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
186 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
187 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
189 2006-09-08 Ulrich Drepper <drepper@redhat.com>
192 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
193 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
195 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
196 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
197 * Makefile (tests): Add tst-cond22.
198 * tst-cond22.c: New file.
200 2006-09-05 Ulrich Drepper <drepper@redhat.com>
203 * descr.h (struct pthread): Add parent_cancelhandling.
204 * sysdeps/pthread/createthread.c (create_thread): Pass parent
205 cancelhandling value to child.
206 * pthread_create.c (start_thread): If parent thread was canceled
207 reset the SIGCANCEL mask.
208 * Makefile (tests): Add tst-cancel25.
209 * tst-cancel25.c: New file.
211 2006-09-05 Jakub Jelinek <jakub@redhat.com>
212 Ulrich Drepper <drepper@redhat.com>
214 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
215 counterp if it is already zero.
216 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
218 2006-03-04 Jakub Jelinek <jakub@redhat.com>
219 Roland McGrath <roland@redhat.com>
221 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
222 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
223 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
224 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
225 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
226 lll_robust_mutex_timedlock, lll_mutex_unlock,
227 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
228 Add _L_*_ symbols around the subsection.
229 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
230 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
232 2006-03-03 Jakub Jelinek <jakub@redhat.com>
233 Roland McGrath <roland@redhat.com>
235 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
236 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
237 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
238 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
239 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
240 lll_robust_mutex_timedlock, lll_mutex_unlock,
241 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
242 Add _L_*_ symbols around the subsection.
243 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
244 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
246 2006-08-31 Ulrich Drepper <drepper@redhat.com>
248 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
249 change because it can disturb too much existing code. If real hard
250 reader preference is needed we'll introduce another type.
251 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
252 (pthread_rwlock_timedwrlock): Likewise.
253 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
256 2006-08-30 Ulrich Drepper <drepper@redhat.com>
258 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
260 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
261 (pthread_rwlock_timedwrlock): Likewise.
262 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
265 2006-08-25 Jakub Jelinek <jakub@redhat.com>
267 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
268 Only define ifdef SHARED.
270 2006-08-23 Ulrich Drepper <drepper@redhat.com>
272 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
273 (free_stacks): ...here.
274 (__free_stack_cache): New function.
275 * pthreadP.h: Declare __free_stack_cache.
276 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
278 * init.c (pthread_functions): Initialize ptr_freeres.
279 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
280 New freeres function.
282 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
285 * Makefile (extra-objs): Add modules to extra-test-objs instead.
287 2006-08-20 Ulrich Drepper <drepper@redhat.com>
289 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
290 _XOPEN_REALTIME_THREADS.
292 2006-08-15 Jakub Jelinek <jakub@redhat.com>
294 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
295 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
296 HAVE_CLOCK_GETTIME_VSYSCALL.
297 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
299 2006-08-14 Jakub Jelinek <jakub@redhat.com>
301 * sysdeps/unix/sysv/linux/bits/posix_opt.h
302 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
303 * descr.h (struct priority_protection_data): New type.
304 (struct pthread): Add tpp field.
305 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
306 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
307 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
308 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
310 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
311 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
312 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
313 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
315 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
317 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
318 * pthread_mutexattr_getprioceiling.c
319 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
320 in the SCHED_FIFO priority range.
321 * pthread_mutexattr_setprioceiling.c
322 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
323 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
324 if mutex is not TPP. Ceiling is now in __data.__lock.
325 * pthread_mutex_setprioceiling.c: Include stdbool.h.
326 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
327 is now in __data.__lock. Add locking.
328 * pthread_create.c (__free_tcb): Free pd->tpp structure.
329 * Makefile (libpthread-routines): Add tpp.
330 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
331 * tst-tpp.h: New file.
332 * tst-mutexpp1.c: New file.
333 * tst-mutexpp6.c: New file.
334 * tst-mutexpp10.c: New file.
335 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
336 * tst-mutex6.c (TEST_FUNCTION): Likewise.
338 2006-08-12 Ulrich Drepper <drepper@redhat.com>
341 * pthread_join.c (pthread_join): Account for self being canceled
342 when checking for deadlocks.
343 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
344 (tf1): Don't print anything after pthread_join returns, this would be
345 another cancellation point.
347 * tst-join6.c: New file.
348 * Makefile (tests): Add tst-join6.
350 2006-08-03 Ulrich Drepper <drepper@redhat.com>
353 * pthread_setspecific.c (__pthread_setspecific): Check
354 out-of-range index before checking for unused key.
356 * sysdeps/pthread/gai_misc.h: New file.
358 2006-08-01 Ulrich Drepper <drepper@redhat.com>
360 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
361 file. Don't use sysctl.
362 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
363 overwrite the file if this is likely not true.
365 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
367 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
368 * Makefile (tests): Add tst-getpid3.
369 * tst-getpid3.c: New file.
371 2006-07-30 Roland McGrath <roland@redhat.com>
373 * Makefile (libpthread-routines): Add ptw-sigsuspend.
375 * sysdeps/unix/sysv/linux/i386/not-cancel.h
376 (pause_not_cancel): New macro.
377 (nanosleep_not_cancel): New macro.
378 (sigsuspend_not_cancel): New macro.
379 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
380 nanosleep_not_cancel macro from <not-cancel.h>.
381 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
382 macro from <not-cancel.h>.
384 2006-07-28 Ulrich Drepper <drepper@redhat.com>
385 Jakub Jelinek <jakub@redhat.com>
387 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
388 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
389 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
390 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
391 * pthread_mutex_init.c: Add support for priority inheritance mutex.
392 * pthread_mutex_lock.c: Likewise.
393 * pthread_mutex_timedlock.c: Likewise.
394 * pthread_mutex_trylock.c: Likewise.
395 * pthread_mutex_unlock.c: Likewise.
396 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
398 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
399 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
400 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
401 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
402 pthread-pi-defines.sym.
403 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
404 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
405 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
406 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
407 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
408 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
409 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
410 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
411 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
412 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
413 _POSIX_THREAD_PRIO_INHERIT to 200112L.
414 * tst-mutex1.c: Adjust to allow use in PI mutex test.
415 * tst-mutex2.c: Likewise.
416 * tst-mutex3.c: Likewise.
417 * tst-mutex4.c: Likewise.
418 * tst-mutex5.c: Likewise.
419 * tst-mutex6.c: Likewise.
420 * tst-mutex7.c: Likewise.
421 * tst-mutex7a.c: Likewise.
422 * tst-mutex8.c: Likewise.
423 * tst-mutex9.c: Likewise.
424 * tst-robust1.c: Likewise.
425 * tst-robust7.c: Likewise.
426 * tst-robust8.c: Likewise.
427 * tst-mutexpi1.c: New file.
428 * tst-mutexpi2.c: New file.
429 * tst-mutexpi3.c: New file.
430 * tst-mutexpi4.c: New file.
431 * tst-mutexpi5.c: New file.
432 * tst-mutexpi6.c: New file.
433 * tst-mutexpi7.c: New file.
434 * tst-mutexpi7a.c: New file.
435 * tst-mutexpi8.c: New file.
436 * tst-mutexpi9.c: New file.
437 * tst-robust1.c: New file.
438 * tst-robust2.c: New file.
439 * tst-robust3.c: New file.
440 * tst-robust4.c: New file.
441 * tst-robust5.c: New file.
442 * tst-robust6.c: New file.
443 * tst-robust7.c: New file.
444 * tst-robust8.c: New file.
445 * Makefile (tests): Add the new tests.
447 * pthread_create.c (start_thread): Add some casts to avoid warnings.
448 * pthread_mutex_destroy.c: Remove unneeded label.
450 2006-07-01 Ulrich Drepper <drepper@redhat.com>
452 * pthread_mutex_init.c (__pthread_mutex_init): Move some
453 computations to compile time.
455 2006-06-04 Ulrich Drepper <drepper@redhat.com>
457 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
459 2006-05-15 Ulrich Drepper <drepper@redhat.com>
461 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
463 2006-05-11 Ulrich Drepper <drepper@redhat.com>
465 * pthread_key_create.c (__pthread_key_create): Do away with
468 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
469 (__kernel_cpumask_size): Mark as hidden.
470 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
472 * sem_open.c (__sem_mappings_lock): Mark as hidden.
473 * semaphoreP.h (__sem_mappings_lock): Likewise.
475 2006-05-10 Ulrich Drepper <drepper@redhat.com>
477 * pthread_atfork.c: Mark __dso_handle as hidden.
479 2006-05-09 Ulrich Drepper <drepper@redhat.com>
482 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
483 the reload problem. Change the one path in pthread_cancel_init
484 which causes the problem. Force gcc to reload. Simplify callers.
485 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
486 (_Unwind_GetBSP): Undo last patch.
488 2006-05-07 Ulrich Drepper <drepper@redhat.com>
490 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
491 function pointer is reloaded after pthread_cancel_init calls.
494 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
495 pointers are reloaded after pthread_cancel_init calls.
497 2006-05-01 Ulrich Drepper <drepper@redhat.com>
499 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
502 2006-04-27 Ulrich Drepper <drepper@redhat.com>
504 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
505 Allocate new object which is passed to timer_sigev_thread so that
506 the timer can be deleted before the new thread is scheduled.
508 2006-04-26 Roland McGrath <roland@redhat.com>
510 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
512 2006-04-08 Ulrich Drepper <drepper@redhat.com>
514 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
515 suffix for conditional jumps.
516 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
517 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
518 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
519 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
520 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
521 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
523 * init.c (sigcancel_handler): Compare with correct PID even if the
524 thread is in the middle of a fork call.
525 (sighandler_setxid): Likewise.
526 Reported by Suzuki K P <suzuki@in.ibm.com> .
528 2006-04-07 Jakub Jelinek <jakub@redhat.com>
530 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
532 2006-04-06 Ulrich Drepper <drepper@redhat.com>
534 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
535 fails [Coverity CID 105].
537 2006-04-05 Ulrich Drepper <drepper@redhat.com>
539 * sysdeps/pthread/pthread.h: Add nonnull attributes.
541 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
544 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
545 Define __lll_rel_instr using lwsync.
547 2006-03-27 Ulrich Drepper <drepper@redhat.com>
549 * allocatestack.c (allocate_stack): Always initialize robust_head.
550 * descr.h: Define struct robust_list_head.
551 (struct pthread): Use robust_list_head in robust mutex list definition.
552 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
553 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
554 (__pthread_initialize_minimal_internal): Register robust_list with
556 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
557 Declare __set_robust_list_avail.
558 * pthread_create.c (start_thread): Register robust_list of new thread.
559 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
561 * pthread_mutex_destroy.c: For robust mutexes don't look at the
562 number of users, it's unreliable.
563 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
564 set_robust_list syscall is available.
565 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
566 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
567 Set robust_head.list_op_pending before trying to lock a robust mutex.
568 * pthread_mutex_timedlock.c: Likewise.
569 * pthread_mutex_trylock.c: Likewise.
570 * pthread_mutex_unlock.c: Likewise for unlocking.
571 * Makefile (tests): Add tst-robust8.
572 * tst-robust8.c: New file.
574 2006-03-08 Andreas Schwab <schwab@suse.de>
576 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
577 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
579 2006-03-05 Roland McGrath <roland@redhat.com>
581 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
582 and $config_os doesn't match *linux*.
584 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
586 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
588 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
589 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
590 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
591 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
592 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
593 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
595 2006-03-02 Ulrich Drepper <drepper@redhat.com>
597 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
599 2006-03-01 Ulrich Drepper <drepper@redhat.com>
601 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
602 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
604 (__lll_robust_timedlock_wait): Likewise.
605 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
606 (__lll_robust_lock_wait): Likewise.
607 (__lll_robust_timedlock_wait): Likewise.
608 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
609 (__lll_robust_lock_wait): Likewise.
610 (__lll_robust_timedlock_wait): Likewise.
612 2006-03-01 Jakub Jelinek <jakub@redhat.com>
614 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
615 lll_robust_mutex_trylock, lll_robust_mutex_lock,
616 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
617 lll_robust_mutex_unlock): Define.
618 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
620 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
622 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
623 instead of <clone.S>.
625 2006-02-27 Jakub Jelinek <jakub@redhat.com>
627 * Makefile (libpthread-routines): Add
628 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
629 and pthread_mutex_[sg]etprioceiling.
630 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
631 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
632 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
633 pthread_mutex_setprioceiling.
634 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
635 PTHREAD_PRIO_PROTECT): New enum values.
636 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
637 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
638 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
640 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
641 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
642 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
644 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
645 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
646 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
647 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
648 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
649 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
650 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
652 * pthread_mutex_getprioceiling.c: New file.
653 * pthread_mutex_setprioceiling.c: New file.
654 * pthread_mutexattr_getprioceiling.c: New file.
655 * pthread_mutexattr_setprioceiling.c: New file.
656 * pthread_mutexattr_getprotocol.c: New file.
657 * pthread_mutexattr_setprotocol.c: New file.
659 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
661 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
663 2006-02-27 Roland McGrath <roland@redhat.com>
665 * sysdeps/pthread/Subdirs: List nptl here too.
666 * configure (libc_add_on_canonical): New variable.
668 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
670 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
671 self to get main source tree's file.
672 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
673 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
674 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
675 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
676 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
677 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
678 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
679 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
680 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
681 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
682 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
683 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
684 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
686 * Makefile: Use $(sysdirs) in vpath directive.
688 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
689 (CPPFLAGS-timer_routines.c): Likewise.
691 * Makeconfig (includes): Variable removed.
693 2006-02-26 Roland McGrath <roland@redhat.com>
695 * sysdeps/generic/pt-raise.c: Moved to ...
696 * pt-raise.c: ... here.
697 * sysdeps/generic/lowlevellock.h: Moved to ...
698 * lowlevellock.h: ... here.
700 2006-02-23 Roland McGrath <roland@redhat.com>
702 * descr.h (struct pthread): Add final member `end_padding'.
703 (PTHREAD_STRUCT_END_PADDING): Use it.
705 2006-02-20 Roland McGrath <roland@redhat.com>
707 * sysdeps/mips: Directory removed, saved in ports repository.
708 * sysdeps/unix/sysv/linux/mips: Likewise.
710 2006-02-18 Ulrich Drepper <drepper@redhat.com>
712 * tst-robust1.c: Add second mutex to check that the mutex list is
715 2006-02-17 Jakub Jelinek <jakub@redhat.com>
717 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
718 lll_robust_mutex_trylock, lll_robust_mutex_lock,
719 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
720 lll_robust_mutex_unlock): New macros.
721 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
722 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
723 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
724 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
725 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
727 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
729 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
731 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
733 2006-02-17 Ulrich Drepper <drepper@redhat.com>
735 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
736 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
737 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
738 (lll_robust_mutex_unlock): Likewise.
740 2006-02-13 Jakub Jelinek <jakub@redhat.com>
742 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
743 Set robust_list.__next rather than robust_list.
744 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
745 (__pthread_list_t): New typedef.
746 (pthread_mutex_t): Replace __next and __prev fields with __list.
747 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
748 (__pthread_list_t): New typedef.
749 (pthread_mutex_t): Replace __next and __prev fields with __list.
750 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
751 (__pthread_list_t, __pthread_slist_t): New typedefs.
752 (pthread_mutex_t): Replace __next and __prev fields with __list.
753 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
754 (__pthread_list_t, __pthread_slist_t): New typedefs.
755 (pthread_mutex_t): Replace __next and __prev fields with __list.
756 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
757 (__pthread_list_t, __pthread_slist_t): New typedefs.
758 (pthread_mutex_t): Replace __next and __prev fields with __list.
759 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
760 (__pthread_slist_t): New typedef.
761 (pthread_mutex_t): Replace __next field with __list.
763 2006-02-15 Ulrich Drepper <drepper@redhat.com>
765 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
766 PTHREAD_MUTEX_OWNERDEAD.
767 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
768 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
769 * Makefile (libpthread-routines): Add lowlevelrobustlock.
770 * pthread_create.c (start_thread): Very much simplify robust_list loop.
771 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
772 to PTHREAD_MUTEX_INCONSISTENT.
773 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
774 * pthread_mutex_lock.c: Reimplement robust mutex handling.
775 * pthread_mutex_trylock.c: Likewise.
776 * pthread_mutex_timedlock.c: Likewise.
777 * pthread_mutex_unlock.c: Likewise.
778 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
779 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
780 lowlevelrobustlock.sym.
781 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
782 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
784 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
785 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
786 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
787 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
788 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
790 2006-02-12 Ulrich Drepper <drepper@redhat.com>
792 * allocatestack.c (allocate_stack): Initialize robust_list.
793 * init.c (__pthread_initialize_minimal_internal): Likewise.
794 * descr.h (struct xid_command): Pretty printing.
795 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
796 robust_list. Adjust macros.
797 * pthread_create.c (start_thread): Adjust robust_list handling.
798 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
799 but the owner for all robust mutex types.
800 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
801 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
802 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
803 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
805 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
806 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
808 2006-02-08 Jakub Jelinek <jakub@redhat.com>
810 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
811 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
813 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
815 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
817 (lll_futex_timed_wait): Define.
819 2006-01-19 Ulrich Drepper <drepper@redhat.com>
821 * tst-cancel4.c: Test ppoll.
823 2006-01-18 Andreas Jaeger <aj@suse.de>
826 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
827 (pthread_mutex_t): Follow changes for other archs. Based on patch
828 by Jim Gifford <patches@jg555.com>.
830 2006-01-13 Richard Henderson <rth@redhat.com>
832 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
834 2006-01-10 Roland McGrath <roland@redhat.com>
836 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
837 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
838 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
839 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
840 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
841 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
842 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
843 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
844 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
845 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
847 2006-01-09 Roland McGrath <roland@redhat.com>
849 * tst-initializers1-c89.c: New file.
850 * tst-initializers1-c99.c: New file.
851 * tst-initializers1-gnu89.c: New file.
852 * tst-initializers1-gnu99.c: New file.
853 * Makefile (tests): Add them.
854 (CFLAGS-tst-initializers1-c89.c): New variable.
855 (CFLAGS-tst-initializers1-c99.c): New variable.
856 (CFLAGS-tst-initializers1-gnu89.c): New variable.
857 (CFLAGS-tst-initializers1-gnu99.c): New variable.
859 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
860 Use __extension__ on anonymous union definition.
861 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
862 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
863 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
864 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
865 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
867 2006-01-08 Jakub Jelinek <jakub@redhat.com>
869 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
870 Don't give the union a name because it changes the mangled name.
871 Instead name the struct for __data.
872 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
874 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
877 2006-01-09 Jakub Jelinek <jakub@redhat.com>
879 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
880 stack bias to mc_ftp field.
882 2006-01-07 Ulrich Drepper <drepper@redhat.com>
884 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
885 being too clever and reloading the futex value where it shouldn't.
887 2006-01-06 Ulrich Drepper <drepper@redhat.com>
889 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
892 2006-01-06 Jakub Jelinek <jakub@redhat.com>
894 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
897 2006-01-06 Ulrich Drepper <drepper@redhat.com>
899 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
900 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
903 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
904 Don't give the union a name because it changes the mangled name.
905 Instead name the struct for __data.
906 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
907 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
908 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
909 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
910 * pthread_create.c (start_thread): Adjust robust mutex free loop.
911 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
913 2006-01-05 Ulrich Drepper <drepper@redhat.com>
915 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
917 (lll_futex_timed_wait): Define.
918 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
919 * sysdeps/pthread/aio_misc.h: New file.
921 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
923 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
925 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
927 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
928 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
929 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
931 2006-01-04 Ulrich Drepper <drepper@redhat.com>
933 * tst-cancel24.cc: Use C headers instead of C++ headers.
935 2006-01-03 Jakub Jelinek <jakub@redhat.com>
937 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
938 sparc-linux configured glibc.
939 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
940 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
941 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
942 atomic_compare_and_exchange_val_24_acq instead of
943 atomic_compare_and_exchange_val_acq.
944 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
945 instead of atomic_exchange_rel.
946 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
947 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
949 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
951 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
952 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
953 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
954 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
955 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
956 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
958 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
960 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
961 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
962 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
964 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
966 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
968 2006-01-03 Ulrich Drepper <drepper@redhat.com>
970 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
973 2006-01-02 Jakub Jelinek <jakub@redhat.com>
975 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
976 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
977 THREAD_COPY_POINTER_GUARD): Define.
978 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
979 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
981 2006-01-01 Ulrich Drepper <drepper@redhat.com>
983 * version.c: Update copyright year.
985 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
987 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
988 .eh_frame section, use cfi_* directives.
989 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
991 2005-12-30 Ulrich Drepper <drepper@redhat.com>
993 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
996 2005-12-29 Ulrich Drepper <drepper@redhat.com>
998 * sysdeps/pthread/sigaction.c: Removed.
999 * sigaction.c: New file.
1000 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
1002 2005-12-28 Ulrich Drepper <drepper@redhat.com>
1004 * Makefile (tests): Add tst-signal7.
1005 * tst-signal7.c: New file.
1007 2005-12-27 Roland McGrath <roland@redhat.com>
1009 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
1010 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
1011 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
1012 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
1013 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
1014 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1015 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1016 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1017 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1018 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
1019 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1021 2005-12-27 Jakub Jelinek <jakub@redhat.com>
1023 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
1024 and __prev field to pthread_mutex_t.
1025 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1026 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1027 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1028 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1029 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
1032 2005-12-26 Ulrich Drepper <drepper@redhat.com>
1034 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
1035 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
1036 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
1037 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
1038 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
1039 and PTHREAD_MUTEXATTR_FLAG_BITS.
1040 * descr.h (struct pthread): Add robust_list field and define
1041 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
1042 * pthread_mutexattr_getrobust.c: New file.
1043 * pthread_mutexattr_setrobust.c: New file.
1044 * pthread_mutex_consistent.c: New file.
1045 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
1046 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1047 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
1048 Adjust pthread_mutex_t initializers.
1049 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
1050 field to pthread_mutex_t.
1051 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
1052 and __prev field to pthread_mutex_t.
1053 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
1054 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
1055 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
1056 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
1057 * pthread_mutexattr_gettype.c: Likewise.
1058 * pthread_mutexattr_setpshared.c: Likewise.
1059 * pthread_mutexattr_settype.c: Likewise.
1060 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
1061 Initialize mutex kind according to robust flag.
1062 * pthread_mutex_lock.c: Implement local robust mutex.
1063 * pthread_mutex_timedlock.c: Likewise.
1064 * pthread_mutex_trylock.c: Likewise.
1065 * pthread_mutex_unlock.c: Likewise.
1066 * pthread_create.c (start_thread): Mark robust mutexes which remained
1068 * tst-robust1.c: New file.
1069 * tst-robust2.c: New file.
1070 * tst-robust3.c: New file.
1071 * tst-robust4.c: New file.
1072 * tst-robust5.c: New file.
1073 * tst-robust6.c: New file.
1074 * tst-robust7.c: New file.
1075 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
1076 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1077 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
1078 tst-robust5, tst-robust6, and tst-robust7.
1080 * tst-typesizes.c: New file.
1081 * Makefile (tests): Add tst-typesizes.
1083 * tst-once3.c: More debug output.
1085 2005-12-24 Ulrich Drepper <drepper@redhat.com>
1087 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
1088 missing after last change.
1090 * version.c: Update copyright year.
1092 2005-12-23 Ulrich Drepper <drepper@redhat.com>
1094 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
1095 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
1096 * pthread_mutex_trylock.c: Likewise.
1097 * pthread_mutex_timedlock.c: Likewise.
1098 * pthread_mutex_unlock.c: Likewise.
1100 2005-12-22 Roland McGrath <roland@redhat.com>
1102 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
1103 so that #include_next's search location is not reset to the -I..
1104 directory where <nptl/...> can be found.
1106 2005-12-22 Ulrich Drepper <drepper@redhat.com>
1109 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1110 Fix unwind info. Remove useless branch prediction prefix.
1111 * tst-cancel24.cc: New file.
1112 * Makefile: Add rules to build and run tst-cancel24.
1114 2005-12-21 Roland McGrath <roland@redhat.com>
1116 * libc-cancellation.c: Use <> rather than "" #includes.
1117 * pt-cleanup.c: Likewise.
1118 * pthread_create.c: Likewise.
1119 * pthread_join.c: Likewise.
1120 * pthread_timedjoin.c: Likewise.
1121 * pthread_tryjoin.c: Likewise.
1122 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
1123 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
1124 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1125 * unwind.c: Likewise.
1127 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1129 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
1130 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
1131 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1132 THREAD_COPY_POINTER_GUARD): Define.
1134 2005-12-19 Jakub Jelinek <jakub@redhat.com>
1136 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
1138 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1139 THREAD_COPY_POINTER_GUARD): Define.
1140 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
1141 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
1142 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1143 THREAD_COPY_POINTER_GUARD): Define.
1144 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
1145 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
1146 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
1147 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
1148 Use PTR_DEMANGLE for B0 if defined.
1150 2005-12-17 Ulrich Drepper <drepper@redhat.com>
1152 * pthread_create.c (__pthread_create_2_1): Use
1153 THREAD_COPY_POINTER_GUARD if available.
1154 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
1155 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1156 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
1157 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
1158 * sysdeps/x86_64/tls.h: Likewise.
1160 2005-12-15 Roland McGrath <roland@redhat.com>
1162 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
1164 2005-12-13 Ulrich Drepper <drepper@redhat.com>
1166 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
1168 * errno-loc.c: New file.
1170 2005-12-12 Roland McGrath <roland@redhat.com>
1172 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
1173 adjustments before choosing stack size. Update minimum stack size
1174 calculation to match allocate_stack change.
1176 2005-12-12 Ulrich Drepper <drepper@redhat.com>
1178 * allocatestack.c (allocate_stack): Don't demand that there is an
1179 additional full page available on the stack beside guard, TLS, the
1182 2005-11-24 Ulrich Drepper <drepper@redhat.com>
1184 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1185 (__cleanup_fct_attribute): Use __regparm__ not regparm.
1187 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
1188 compiling 32-bit code we must define __cleanup_fct_attribute.
1190 005-11-24 Jakub Jelinek <jakub@redhat.com>
1193 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
1194 __attribute__ instead of __attribute.
1195 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1196 (__cleanup_fct_attribute): Likewise.
1198 2005-11-17 Jakub Jelinek <jakub@redhat.com>
1200 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
1201 a write barrier before writing libgcc_s_getcfa.
1203 2005-11-06 Ulrich Drepper <drepper@redhat.com>
1205 * sysdeps/unix/sysv/linux/configure: Removed.
1207 2005-11-05 Ulrich Drepper <drepper@redhat.com>
1209 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
1210 optional init_array/fini_array support.
1212 2005-10-24 Roland McGrath <roland@redhat.com>
1214 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
1215 versioned_symbol use.
1217 2005-10-16 Roland McGrath <roland@redhat.com>
1219 * init.c (__pthread_initialize_minimal_internal): Even when using a
1220 compile-time default stack size, apply the minimum that allocate_stack
1221 will require, and round up to page size.
1223 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
1225 * Makefile ($(test-modules)): Remove static pattern rule.
1227 2005-10-14 Jakub Jelinek <jakub@redhat.com>
1228 Ulrich Drepper <drepper@redhat.com>
1230 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
1231 alignment in callback function.
1232 * Makefile: Add rules to build and run tst-align3.
1233 * tst-align3.c: New file.
1235 2005-10-03 Jakub Jelinek <jakub@redhat.com>
1237 * allocatestack.c (setxid_signal_thread): Add
1238 INTERNAL_SYSCALL_DECL (err).
1240 2005-10-02 Jakub Jelinek <jakub@redhat.com>
1242 * allocatestack.c (setxid_signal_thread): Need to use
1243 atomic_compare_and_exchange_bool_acq.
1245 2005-10-01 Ulrich Drepper <drepper@redhat.com>
1246 Jakub Jelinek <jakub@redhat.com>
1248 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
1250 (struct pthread): Move specific_used field to avoid padding.
1251 Add setxid_futex field.
1252 * init.c (sighandler_setxid): Reset setxid flag and release the
1254 * allocatestack.c (setxid_signal_thread): New function. Broken
1255 out of the bodies of the two loops in __nptl_setxid. For undetached
1256 threads check whether they are exiting and if yes, don't send a signal.
1257 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
1258 * pthread_create.c (start_thread): For undetached threads, check
1259 whether setxid bit is set. If yes, wait until signal has been
1262 * allocatestack.c (STACK_VARIABLES): Initialize them.
1263 * pthread_create.c (__pthread_create_2_1): Initialize pd.
1265 2004-09-02 Jakub Jelinek <jakub@redhat.com>
1267 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1268 waiters, awake all waiters on the associated mutex.
1270 2005-09-22 Roland McGrath <roland@redhat.com>
1272 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
1273 ../sysdeps/x86_64/hp-timing.h).
1275 2005-08-29 Jakub Jelinek <jakub@redhat.com>
1277 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
1278 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1279 (lll_futex_wake_unlock): Define.
1280 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
1281 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1282 (lll_futex_wake_unlock): Define.
1283 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
1284 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1285 (lll_futex_wake_unlock): Define.
1286 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
1287 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1288 (lll_futex_wake_unlock): Define.
1289 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
1290 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1291 (lll_futex_wake_unlock): Define.
1292 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
1293 lll_futex_wake_unlock.
1294 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1295 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1296 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1297 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1298 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1299 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1301 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1303 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1304 Fix typo in register name.
1306 2005-08-23 Ulrich Drepper <drepper@redhat.com>
1308 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1309 Use __sigfillset. Document that sigfillset does the right thing wrt
1312 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1315 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
1316 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
1317 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
1318 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
1319 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
1320 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
1322 * Makefile (tests): Add tst-initializers1.
1323 (CFLAGS-tst-initializers1.c): Set.
1324 * tst-initializers1.c: New test.
1326 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1328 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
1329 Make sure __flags are located at offset 48 from the start of the
1332 2005-07-02 Roland McGrath <roland@redhat.com>
1334 * Makeconfig: Comment fix.
1336 2005-07-05 Jakub Jelinek <jakub@redhat.com>
1338 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
1339 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
1340 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
1341 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
1342 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1343 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1344 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
1345 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
1346 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
1347 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1349 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1351 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
1352 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1353 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
1355 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1356 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
1357 field. Put in sysinfo field unconditionally.
1358 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1359 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
1360 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1361 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
1363 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1364 * pthread_create.c (__pthread_create_2_1): Use
1365 THREAD_COPY_STACK_GUARD macro.
1366 * Makefile: Add rules to build and run tst-stackguard1{,-static}
1368 * tst-stackguard1.c: New file.
1369 * tst-stackguard1-static.c: New file.
1371 2005-06-14 Alan Modra <amodra@bigpond.net.au>
1373 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1374 Invoke CGOTSETUP and CGOTRESTORE.
1375 (CGOTSETUP, CGOTRESTORE): Define.
1377 2005-05-29 Richard Henderson <rth@redhat.com>
1379 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
1380 (tf_write, tf_writev): Use it.
1381 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
1384 2005-05-23 Jakub Jelinek <jakub@redhat.com>
1386 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1387 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1388 __librt_*_asynccancel@local.
1390 2005-05-17 Alan Modra <amodra@bigpond.net.au>
1392 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1393 all occurrences of JUMPTARGET. Instead append @local to labels.
1395 2005-05-20 Jakub Jelinek <jakub@redhat.com>
1397 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1398 size/alignment of struct pthread rather than tcbhead_t.
1399 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1401 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1403 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1406 2005-05-19 Richard Henderson <rth@redhat.com>
1408 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1409 __sync_val_compare_and_swap, not explicit _si variant.
1410 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1412 2005-05-03 Ulrich Drepper <drepper@redhat.com>
1415 * sysdeps/pthread/pthread.h: Avoid empty initializers.
1417 2005-05-03 Jakub Jelinek <jakub@redhat.com>
1419 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1420 .eh_frame section, use cfi_* directives.
1422 2005-04-27 Jakub Jelinek <jakub@redhat.com>
1424 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1427 2005-04-27 Ulrich Drepper <drepper@redhat.com>
1430 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1433 2005-04-27 Roland McGrath <roland@redhat.com>
1435 * Makefile (tests): Remove tst-clock2.
1437 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1438 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1439 translating to the kernel clockid_t for our own process/thread clock.
1441 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1443 2005-04-15 Jakub Jelinek <jakub@redhat.com>
1445 * old_pthread_cond_init.c: Include <errno.h>.
1446 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1447 process shared or uses clock other than CLOCK_REALTIME.
1448 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1450 2005-04-13 David S. Miller <davem@davemloft.net>
1452 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1453 * sysdeps/sparc/sparc64/clone.S: New file.
1455 2005-04-05 Jakub Jelinek <jakub@redhat.com>
1458 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1459 __inline instead of inline.
1460 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1462 2005-03-31 Jakub Jelinek <jakub@redhat.com>
1464 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1465 functionally equivalent, but shorter instructions.
1466 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1467 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1468 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1470 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1471 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1472 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1473 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1474 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1475 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1476 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1478 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1479 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1480 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1481 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1482 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1484 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
1486 * sysdeps/mips/Makefile: New file.
1487 * sysdeps/mips/nptl-sysdep.S: New file.
1488 * sysdeps/mips/tcb-offsets.sym: New file.
1489 * sysdeps/mips/pthread_spin_lock.S: New file.
1490 * sysdeps/mips/pthread_spin_trylock.S: New file.
1491 * sysdeps/mips/pthreaddef.h: New file.
1492 * sysdeps/mips/tls.h: New file.
1493 * sysdeps/mips/jmpbuf-unwind.h: New file.
1494 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1495 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1496 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1497 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1498 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1499 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1500 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1501 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1502 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1503 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1505 2005-03-23 Ulrich Drepper <drepper@redhat.com>
1508 * pthread_create.c (__pthread_create_2_1): Rename syscall error
1511 2005-03-10 Jakub Jelinek <jakub@redhat.com>
1513 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1515 2005-02-25 Roland McGrath <roland@redhat.com>
1517 * alloca_cutoff.c: Correct license text.
1518 * tst-unload.c: Likewise.
1519 * sysdeps/pthread/allocalim.h: Likewise.
1520 * sysdeps/pthread/pt-initfini.c: Likewise.
1521 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1522 * sysdeps/pthread/bits/sigthread.h: Likewise.
1523 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1524 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1526 2005-02-16 Roland McGrath <roland@redhat.com>
1528 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1529 Use unsigned int * for ptr_nthreads.
1531 2005-02-14 Alan Modra <amodra@bigpond.net.au>
1534 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1537 2005-02-07 Richard Henderson <rth@redhat.com>
1540 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1543 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
1545 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1546 order of arguments in invocation of atomic_add_zero.
1548 2005-01-26 Jakub Jelinek <jakub@redhat.com>
1551 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1552 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1553 at least gotntpoff relocation and addition.
1554 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1556 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1558 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1561 2005-01-06 Ulrich Drepper <drepper@redhat.com>
1563 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1564 entry for static tls deallocation fix.
1565 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1566 also contains information whether the memory pointed to is static
1568 * sysdeps/i386/tls.h: Likewise.
1569 * sysdeps/ia64/tls.h: Likewise.
1570 * sysdeps/powerpc/tls.h: Likewise.
1571 * sysdeps/s390/tls.h: Likewise.
1572 * sysdeps/sh/tls.h: Likewise.
1573 * sysdeps/sparc/tls.h: Likewise.
1574 * sysdeps/x86_64/tls.h: Likewise.
1576 2004-12-27 Ulrich Drepper <drepper@redhat.com>
1578 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1580 2004-12-21 Jakub Jelinek <jakub@redhat.com>
1582 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1584 * Makefile (tests): Add tst-align2.
1585 * tst-align2.c: New test.
1586 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1587 -mpreferred-stack-boundary=4.
1589 2004-12-18 Roland McGrath <roland@redhat.com>
1591 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1592 New file removed withdrawn for the moment.
1594 2004-12-17 Richard Henderson <rth@redhat.com>
1596 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1597 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1599 2004-12-16 Ulrich Drepper <drepper@redhat.com>
1601 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1602 Increased PTHREAD_STACK_MIN.
1604 * tst-context1.c (stacks): Use bigger stack size.
1606 2004-12-16 Jakub Jelinek <jakub@redhat.com>
1608 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1609 * sysdeps/sparc/tcb-offsets.sym: Add TID.
1611 2004-12-15 Jakub Jelinek <jakub@redhat.com>
1613 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1614 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1615 * sysdeps/s390/tcb-offsets.sym (TID): Add.
1617 2004-12-15 Ulrich Drepper <drepper@redhat.com>
1619 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1621 2004-12-14 Ulrich Drepper <drepper@redhat.com>
1623 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1624 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1626 * tst-getpid1.c: If child crashes, report this first. Print which
1629 2004-12-09 Ulrich Drepper <drepper@redhat.com>
1631 * init.c (__pthread_initialize_minimal_internal): Also unblock
1634 2004-12-01 Jakub Jelinek <jakub@redhat.com>
1636 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1637 _POSIX_THREAD_CPUTIME): Define to 0.
1638 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1639 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1640 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1641 __timer_signal_thread_tclk): Remove.
1642 (init_module): Remove their initialization.
1643 (thread_cleanup): Remove their cleanup assertions.
1644 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1645 __timer_signal_thread_tclk): Remove.
1646 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1647 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1648 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1650 2004-12-07 Jakub Jelinek <jakub@redhat.com>
1652 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1653 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1655 * Makefile (tests): Add tst-getpid2.
1656 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1657 (do_test): Use it. Use __clone2 instead of clone on ia64.
1658 * tst-getpid2.c: New test.
1660 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1662 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1664 2004-12-04 Ulrich Drepper <drepper@redhat.com>
1666 * Makefile (tests): Add tst-getpid1.
1667 * tst-getpid1.c: New file.
1668 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1669 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1671 2004-12-02 Roland McGrath <roland@redhat.com>
1673 * Makefile (libpthread-nonshared): Variable removed.
1674 ($(objpfx)libpthread_nonshared.a): Target removed.
1675 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1676 These are now handled by generic magic from
1677 libpthread-static-only-routines being set.
1679 2004-11-27 Ulrich Drepper <drepper@redhat.com>
1681 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1682 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1683 _POSIX_THREAD_PRIO_PROTECT): Define.
1684 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1685 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1686 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1688 2004-11-26 Jakub Jelinek <jakub@redhat.com>
1690 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1691 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1692 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1693 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1694 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1695 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1696 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1698 2004-11-24 Ulrich Drepper <drepper@redhat.com>
1700 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1702 * Makefile (libpthread-routines): Add pthread_setschedprio.
1703 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1704 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1705 * pthread_setschedprio.c: New file.
1707 2004-11-20 Jakub Jelinek <jakub@redhat.com>
1709 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1710 * pthread_cancel.c (pthread_create): Likewise.
1712 * Makefile (libpthread-routines): Add vars.
1713 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1714 * init.c (__default_stacksize, __is_smp): Remove.
1716 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1717 and define a wrapper macro.
1718 (PTHREAD_STATIC_FN_REQUIRE): Define.
1719 * allocatestack.c (__find_thread_by_id): Undefine.
1720 * pthread_create (__pthread_keys): Remove.
1721 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1722 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1723 PTHREAD_STATIC_FN_REQUIRE.
1725 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1727 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1728 parameter to REGISTER macro.
1730 2004-11-17 Roland McGrath <roland@redhat.com>
1732 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1733 Make sure SIGCANCEL is blocked as well.
1735 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1737 * sysdeps/pthread/setxid.h: New file.
1738 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1739 (struct xid_command): Add forward decl.
1740 (struct pthread_functions): Change return type of __nptl_setxid hook
1742 * pthreadP.h (__nptl_setxid): Change return type to int.
1743 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1744 calling thread, return its return value and set errno on failure.
1745 * descr.h (struct xid_command): Change id type to long array.
1747 * Makefile: Add rules to build and test tst-setuid1 and
1749 * tst-setuid1.c: New test.
1750 * tst-setuid1-static.c: New test.
1752 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1754 * Makefile (tests): Add tst-exit3.
1755 * tst-exit3.c: New test.
1757 2004-11-09 Ulrich Drepper <drepper@redhat.com>
1759 * Makefile (tests): Add tst-exit2.
1760 * tst-exit2.c: New file.
1762 2004-11-09 Roland McGrath <roland@redhat.com>
1765 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1766 here, before calling clone.
1767 * pthread_create.c (start_thread): Don't do it here.
1769 2004-11-02 Jakub Jelinek <jakub@redhat.com>
1771 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1773 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1775 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1776 Set ETIMEDOUT to errno when time is up. Tweak to avoid
1779 2004-10-28 Jakub Jelinek <jakub@redhat.com>
1781 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1782 if sched_priority is not between minprio and maxprio.
1784 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1786 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1787 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1789 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1790 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1792 2004-10-24 Ulrich Drepper <drepper@redhat.com>
1794 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1795 not-cancelable I/O functions.
1797 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1799 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1800 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1801 make sure 2 is stored in the futex and we looked at the old value.
1802 Fix a few other problems to return the correct value.
1804 2004-10-14 Richard Henderson <rth@redhat.com>
1806 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1809 2004-10-06 Jakub Jelinek <jakub@redhat.com>
1811 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1812 of pthread-functions.h and pthreaddef.h.
1813 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1815 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1816 Change __data.__nwaiters from int to unsigned int.
1818 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1819 sysconf (_SC_THREAD_CPUTIME) returns negative value.
1821 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1824 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1825 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1827 2004-10-06 Ulrich Drepper <drepper@redhat.com>
1829 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
1830 test fails, remove message queue.
1831 (tf_msgsnd): Likewise.
1833 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1835 * tst-clock1.c: Change #ifdef to #if defined.
1836 * tst-clock2.c: Likewise.
1837 * tst-cond11.c: Likewise.
1839 * sysdeps/pthread/timer_create.c (timer_create): Use
1840 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1841 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1844 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1846 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1847 _POSIX_THREAD_CPUTIME): Define to 0.
1849 2004-10-04 Ulrich Drepper <drepper@redhat.com>
1851 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1852 and _POSIX_THREAD_CPUTIME to zero.
1853 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1854 * tst-barrier2.c: Fix testing for POSIX feature.
1855 * tst-clock1.c: Likewise.
1856 * tst-clock2.c: Likewise.
1857 * tst-cond11.c: Likewise.
1858 * tst-cond4.c: Likewise.
1859 * tst-cond6.c: Likewise.
1860 * tst-flock2.c: Likewise.
1861 * tst-mutex4.c: Likewise.
1862 * tst-mutex9.c: Likewise.
1863 * tst-rwlock12.c: Likewise.
1864 * tst-rwlock4.c: Likewise.
1865 * tst-signal1.c: Likewise.
1866 * tst-spin2.c: Likewise.
1867 * sysdeps/pthread/posix-timer.h: Likewise.
1868 * sysdeps/pthread/timer_create.c: Likewise.
1869 * sysdeps/pthread/timer_routines.c: Likewise.
1871 2004-10-01 Ulrich Drepper <drepper@redhat.com>
1873 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1874 (__lll_mutex_timedlock_wait): Address futex correctly.
1876 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1877 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1878 make sure 2 is stored in the futex and we looked at the old value.
1879 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1880 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
1881 which might very well made the code not working at all before.
1884 2004-09-28 Ulrich Drepper <drepper@redhat.com>
1886 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1887 allow SIGSETXID to be sent.
1888 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1889 for SIGSETXID to be defined.
1890 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1891 SIGSETXID cannot be blocked.
1893 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1894 Add __extension__ to long long types.
1895 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1896 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1897 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1898 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1899 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1900 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1901 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1903 2004-09-25 Ulrich Drepper <drepper@redhat.com>
1905 * descr.h (struct pthread): Add stopped_start field.
1906 * sysdeps/pthread/createthread.c (create_thread): Set
1907 start_stopped flag in descriptor for new thread appropriately.
1908 * pthread_create.c (start_thread): Only take lock to be stopped on
1909 startup if stopped_start flag says so.
1911 2004-09-24 Ulrich Drepper <drepper@redhat.com>
1913 * pthread_create.c (__pthread_create_2_1): Remember whether thread
1914 is created detached and if yes, do not try to free the stack in case
1915 the thread creation failed.
1916 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1917 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1918 case there has been no error. [BZ #405]
1920 * pthread_create.c (start_thread): Don't wait for scheduler data
1921 etc to be set at the beginning of the function. The cancellation
1922 infrastructure must have been set up. And enable async
1923 cancellation before potentially going to sleep. [BZ #401]
1925 2004-09-20 Ulrich Drepper <drepper@redhat.com>
1927 * Versions: Remove exports for pthread_set*id_np functions.
1928 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1930 * Makefile: Don't build pthread_set*id code for now.
1932 2004-09-19 Ulrich Drepper <drepper@redhat.com>
1934 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1936 * allocatestack.c (__nptl_setxid): New function.
1937 * descr.h (struct xid_command): Define type.
1938 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1939 (sighandler_setxid): New function.
1940 (__pthread_initialize_minimal): Register sighandler_setxid for
1942 * pt-allocrtsig.c: Update comment.
1943 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
1944 Declare __nptl_setxid.
1945 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1946 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1947 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1948 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1949 and pthread_setresuid_np.
1950 * pthread_setgid_np.c: New file.
1951 * pthread_setuid_np.c: New file.
1952 * pthread_setegid_np.c: New file.
1953 * pthread_seteuid_np.c: New file.
1954 * pthread_setregid_np.c: New file.
1955 * pthread_setreuid_np.c: New file.
1956 * pthread_setresgid_np.c: New file.
1957 * pthread_setresuid_np.c: New file.
1958 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
1959 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1960 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1961 and pthread_setresuid_np.
1962 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1963 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1964 pthread_setregid, and pthread_setresgid.
1966 2004-09-18 Ulrich Drepper <drepper@redhat.com>
1968 * allocatestack.c (allocate_stack): Return EAGAIN instead of
1969 ENOMEM when out of memory.
1971 2004-09-10 Roland McGrath <roland@redhat.com>
1974 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1975 code, since we don't try to use the broken CLONE_STOPPED any more.
1976 * pthread_create.c (start_thread): Likewise.
1978 2004-09-15 Richard Henderson <rth@redhat.com>
1980 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1982 2004-09-01 David Mosberger <davidm@hpl.hp.com>
1984 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1985 (__libc_unwind_longjmp): Delete macro and declare as function.
1986 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1987 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1989 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1990 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1991 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1993 2004-09-12 Ulrich Drepper <drepper@redhat.com>
1995 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1997 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1998 types also for __USE_XOPEN2K.
1999 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2000 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2001 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2002 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2003 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2004 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2005 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2008 2004-09-08 Ulrich Drepper <drepper@redhat.com>
2010 * sysdeps/pthread/pthread.h
2011 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
2012 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
2013 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
2014 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
2017 2004-09-07 Ulrich Drepper <drepper@redhat.com>
2019 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
2020 PSEUDO to be used with . prefix.
2022 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
2023 Use atomic_increment instead of atomic_exchange_and_add.
2024 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
2026 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
2028 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2031 * allocatestack.c (allocate_stack): Use atomic_increment_val
2032 instead of atomic_exchange_and_add.
2033 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
2034 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2036 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2039 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
2040 the initialization function might throw.
2042 2005-09-05 Richard Henderson <rth@redhat.com>
2044 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2045 Move definition inside libpthread, libc, librt check. Provide
2046 definition for rtld.
2048 2004-09-02 Ulrich Drepper <drepper@redhat.com>
2050 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
2051 * sysdeps/i386/jmpbuf-unwind.h: Likewise
2052 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2053 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2054 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2055 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2056 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2057 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2060 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2061 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
2062 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2064 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2065 Decrement __nwaiters. If pthread_cond_destroy has been called and
2066 this is the last waiter, signal pthread_cond_destroy caller and
2067 avoid using the pthread_cond_t structure after unlock.
2068 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2069 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2070 Read clock type from the least significant bits of __nwaiters instead
2072 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2073 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
2075 2004-08-31 Jakub Jelinek <jakub@redhat.com>
2078 * Makefile (tests): Add tst-cond20 and tst-cond21.
2079 * tst-cond20.c: New test.
2080 * tst-cond21.c: New test.
2081 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2082 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
2084 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2086 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2087 (pthread_cond_t): Likewise.
2088 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2090 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2092 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2094 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
2095 (cond_nwaiters): New.
2097 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
2098 if there are waiters not signalled yet.
2099 Wait until all already signalled waiters wake up.
2100 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
2101 __nwaiters. If pthread_cond_destroy has been called and this is the
2102 last waiter, signal pthread_cond_destroy caller and avoid using
2103 the pthread_cond_t structure after unlock.
2104 (__pthread_cond_wait): Increment __nwaiters in the beginning,
2105 decrement it when leaving. If pthread_cond_destroy has been called
2106 and this is the last waiter, signal pthread_cond_destroy caller.
2107 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2108 Likewise. Read clock type from the least significant bits of
2109 __nwaiters instead of __clock.
2110 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
2111 whether clock ID can be encoded in COND_CLOCK_BITS bits.
2112 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
2113 clock type just from the last COND_CLOCK_BITS bits of value.
2114 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
2115 instead of __clock, just from second bit of condattr's value.
2117 2004-08-30 Jakub Jelinek <jakub@redhat.com>
2119 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
2120 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
2122 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2124 2004-08-15 Roland McGrath <roland@frob.com>
2126 * pthread_atfork.c: Update copyright terms including special exception
2127 for these trivial files, which are statically linked into executables
2128 that use dynamic linking for the significant library code.
2130 2004-08-09 Jakub Jelinek <jakub@redhat.com>
2132 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
2133 pthread_rwlock_rdlock.
2134 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
2135 Decrease __nr_readers_queued after reacquiring lock.
2136 * sysdeps/pthread/pthread_rwlock_timedrdlock
2137 (pthread_rwlock_timedrdlock): Likewise.
2138 Reported by Bob Cook <bobcook47@hotmail.com>.
2140 2004-08-11 Jakub Jelinek <jakub@redhat.com>
2142 * tst-rwlock14.c (tf): Read main thread handle from *ARG
2143 before pthread_barrier_wait.
2145 2004-08-07 Ulrich Drepper <drepper@redhat.com>
2147 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2148 Remove unnecessary exception handling data.
2150 2004-07-23 Jakub Jelinek <jakub@redhat.com>
2153 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
2154 instead of clockid_t.
2156 2004-07-21 Roland McGrath <roland@redhat.com>
2158 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
2160 2004-07-19 Roland McGrath <roland@redhat.com>
2162 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
2164 2004-07-02 Roland McGrath <roland@redhat.com>
2166 * configure: Don't exit.
2168 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2170 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2171 (__pthread_cond_timedwait): Check for invalid nanosecond in
2174 2004-07-07 Ulrich Drepper <drepper@redhat.com>
2176 * Makefile: Add rules to build and run tst-fini1.
2177 * tst-fini1.c: New file.
2178 * tst-fini1mod.c: New file.
2180 2004-07-05 Ulrich Drepper <drepper@redhat.com>
2182 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
2183 if no cancellation support is needed.
2184 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2185 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2186 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2187 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2188 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2189 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2190 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2191 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2192 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2194 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
2195 only if not already defined.
2197 2004-07-05 Jakub Jelinek <jakub@redhat.com>
2199 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
2200 constraint "m" instead of "0" for futex.
2202 * shlib-versions: Add powerpc64-.*-linux.*.
2204 2004-07-04 Jakub Jelinek <jakub@redhat.com>
2206 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2207 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
2209 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
2210 1 billion and 64-bit tv_nsec which is valid when truncated to 32
2213 2004-06-29 Roland McGrath <roland@redhat.com>
2215 * Banner: NPTL no longer has its own version number.
2216 * Makefile (nptl-version): Variable removed.
2217 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
2218 using $(version), the glibc version number.
2220 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2222 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2223 Fix branch offset for a PLT entry.
2224 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2226 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2228 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
2230 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
2233 2004-06-28 Jakub Jelinek <jakub@redhat.com>
2235 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
2238 2004-06-28 Jakub Jelinek <jakub@redhat.com>
2240 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2241 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
2243 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2244 (pthread_rwlock_timedrdlock): Likewise.
2246 2004-06-22 Jakub Jelinek <jakub@redhat.com>
2248 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2249 Set __r7 to val, not mutex.
2251 2004-06-27 Ulrich Drepper <drepper@redhat.com>
2253 * Makefile: Add rules to build tst-rwlock14.
2254 * tst-rwlock14.c: New file.
2256 2004-06-24 Boris Hu <boris.hu@intel.com>
2258 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
2260 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2262 2004-06-19 Andreas Jaeger <aj@suse.de>
2264 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
2265 assembler in last patch.
2267 2004-06-17 Ulrich Drepper <drepper@redhat.com>
2269 * sysdeps/pthread/pthread_cond_timedwait.c
2270 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
2271 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2272 (__pthread_cond_timedwait): Check for invalid nanosecond in
2274 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2275 * tst-cond19.c: New file.
2276 * Makefile: Add rules to build and run tst-cond19.
2278 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
2280 * tst-context1.c (GUARD_PATTERN): Defined.
2281 (tst_context_t): Define struct containing ucontext_t & guard words.
2282 (ctx): Declare as an array of tst_context_t.
2283 (fct): Verify uc_link & guard words are still valid.
2284 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
2286 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2288 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2289 Add __data.__futex field, reshuffle __data.__clock.
2290 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
2291 (__pthread_cond_signal): Increment __futex at the same time as
2292 __wakeup_seq or __total_seq. Pass address of __futex instead of
2293 address of low 32-bits of __wakeup_seq to futex syscall.
2294 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2295 (__pthread_cond_wait): Likewise. Pass __futex value from before
2296 releasing internal lock to FUTEX_WAIT.
2297 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2298 (__pthread_cond_timedwait): Likewise.
2299 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2300 (FUTEX_CMP_REQUEUE): Define.
2301 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2302 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2303 Pass __futex value from before the unlock and __futex address instead
2304 of address of low 32-bits of __wakeup_seq to futex syscall.
2305 Fallback to FUTEX_WAKE all on any errors.
2307 2004-06-08 Jakub Jelinek <jakub@redhat.com>
2309 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
2311 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
2312 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
2313 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
2314 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
2315 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
2317 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2319 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
2320 Add memory clobber to inline assembly.
2321 (__lll_mutex_trylock): Likewise.
2322 (__lll_mutex_cond_trylock): Likewise.
2324 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
2326 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2327 Pass val argument as 6th system call argument in %r7.
2329 2004-05-21 Jakub Jelinek <jakub@redhat.com>
2331 * Makefile (tests): Add tst-cond16.
2332 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
2333 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
2334 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2335 Add __data.__futex field, reshuffle __data.__clock.
2336 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
2337 (__pthread_cond_signal): Increment __futex at the same time as
2338 __wakeup_seq or __total_seq. Pass address of __futex instead of
2339 address of low 32-bits of __wakeup_seq to futex syscall.
2340 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
2341 (__pthread_cond_wait): Likewise. Pass __futex value from before
2342 releasing internal lock to FUTEX_WAIT.
2343 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
2344 (__pthread_cond_timedwait): Likewise.
2345 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
2346 (FUTEX_CMP_REQUEUE): Define.
2347 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2348 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2349 Pass __futex value from before the unlock and __futex address instead
2350 of address of low 32-bits of __wakeup_seq to futex syscall.
2351 Fallback to FUTEX_WAKE all on any errors.
2352 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
2354 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2355 internally. Return non-zero if error, zero if success.
2356 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2357 Add __data.__futex field, reshuffle __data.__clock.
2358 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
2360 (lll_futex_requeue): Add val argument, return 1 unconditionally
2362 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2363 Add __data.__futex field, reshuffle __data.__clock.
2364 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2366 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2367 internally. Return non-zero if error, zero if success.
2368 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2369 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
2370 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2372 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2373 internally. Return non-zero if error, zero if success.
2374 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2375 Add __data.__futex field, reshuffle __data.__clock.
2376 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
2378 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2379 internally. Return non-zero if error, zero if success.
2380 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2381 Add __data.__futex field, reshuffle __data.__clock.
2382 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2383 Add __data.__futex field, reshuffle __data.__clock.
2384 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2385 Increment __futex at the same time as __wakeup_seq or __total_seq.
2386 Pass address of __futex instead of address of low 32-bits of
2387 __wakeup_seq to futex syscall.
2388 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2389 Pass __futex value from before releasing internal lock
2391 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2392 Likewise. Avoid unnecessary shadowing of variables.
2393 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2394 Set __futex to 2 * __total_seq. Pass __futex value from before the
2395 unlock and __futex address instead of address of low 32-bits of
2396 __wakeup_seq to futex_requeue macro, adjust for new return value
2398 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2399 (__pthread_cond_signal): Increment __futex at the same time as
2400 __wakeup_seq or __total_seq. Pass address of __futex instead of
2401 address of low 32-bits of __wakeup_seq to futex syscall.
2402 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2403 (__pthread_cond_wait): Likewise. Pass __futex value from before
2404 releasing internal lock to FUTEX_WAIT.
2405 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2406 (__pthread_cond_timedwait): Likewise.
2407 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2408 (FUTEX_CMP_REQUEUE): Define.
2409 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2410 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2411 Pass __futex value from before the unlock and __futex address instead
2412 of address of low 32-bits of __wakeup_seq to futex syscall.
2413 Fallback to FUTEX_WAKE all on any errors.
2415 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2417 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2418 Add nop to align the end of critical section.
2419 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2421 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2423 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2424 Add __broadcast_seq field.
2425 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2426 all waiters as woken with woken_seq and bump broadcast counter.
2427 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2428 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
2429 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2430 Comment typo fixes. Avoid returning -ETIMEDOUT.
2432 2004-06-01 Ulrich Drepper <drepper@redhat.com>
2434 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2435 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2436 Reported by Kaz Kojima.
2438 2004-05-25 Jakub Jelinek <jakub@redhat.com>
2440 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2442 2004-05-21 Jakub Jelinek <jakub@redhat.com>
2444 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2445 __broadcast_seq with bc_seq after acquiring internal lock instead of
2448 2004-05-18 Jakub Jelinek <jakub@redhat.com>
2450 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2452 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2453 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2454 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2455 (pthread_cond_t): Add __data.__broadcast_seq field.
2456 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2457 (FRAME_SIZE): Define.
2458 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
2460 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2462 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
2464 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2465 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
2468 2004-05-18 Ulrich Drepper <drepper@redhat.com>
2470 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2471 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2472 Add __broadcast_seq field.
2473 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2474 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2475 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2476 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2477 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2478 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2479 all waiters as woken with woken_seq and bump broadcast counter.
2480 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2481 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2482 __broadcast_seq field.
2483 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2484 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2485 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2486 * pthread_cond_init.c: Initialize __broadcast_seq field.
2487 * Makefile (tests): Add tst-cond17 and tst-cond18.
2488 Add .NOTPARALLEL goal.
2489 * tst-cond16.c: New file. From Jakub.
2490 * tst-cond17.c: New file. From Jakub.
2491 * tst-cond18.c: New file. From Jakub.
2493 2004-05-16 Ulrich Drepper <drepper@redhat.com>
2495 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2499 Parametrize frame size. Correct some unwind info.
2500 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2502 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2504 * tst-stack3.c: Note testing functionality beyond POSIX.
2506 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2508 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2509 Change conditional from ifdef to if.
2511 2004-04-23 Jakub Jelinek <jakub@redhat.com>
2513 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2514 SYSDEP_CANCEL_ERROR): Define.
2517 2004-05-01 Jakub Jelinek <jakub@redhat.com>
2519 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2521 2004-04-20 Jakub Jelinek <jakub@redhat.com>
2523 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2525 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2527 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2528 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2529 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2530 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2532 2004-04-19 Ulrich Drepper <drepper@redhat.com>
2534 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2535 thread has all signals blocked.
2537 2004-04-18 Andreas Jaeger <aj@suse.de>
2539 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2540 (SEM_VALUE_MAX): Add missing brace.
2542 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2544 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2546 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2547 * sysdeps/pthread/tst-mqueue8x.c: New test.
2548 * tst-cancel4.c: Update comment about message queues.
2550 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2551 return it_value { 0, 0 }.
2552 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2554 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2555 assertion for SIGEV_NONE.
2556 (thread_attr_compare): Compare all attributes, not just a partial
2559 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2561 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2563 2004-04-17 Ulrich Drepper <drepper@redhat.com>
2565 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2566 Just use a plain number.
2567 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2568 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2569 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2570 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2571 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2572 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2573 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2575 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2577 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2579 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2581 2004-04-15 Jakub Jelinek <jakub@redhat.com>
2583 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2584 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2585 of calling sigwaitinfo.
2587 2004-04-16 Ulrich Drepper <drepper@redhat.com>
2589 * allocatestack.c (allocate_stack): Set reported_guardsize
2591 * pthread_getattr_np.c (pthread_getattr_np): Use
2592 reported_guardsize instead of guardsize.
2593 * descr.h (struct pthread): Add reported_guardsize field.
2595 2004-04-13 Jakub Jelinek <jakub@redhat.com>
2597 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2599 2004-04-12 Ulrich Drepper <drepper@redhat.com>
2601 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2603 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2605 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2606 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2607 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2608 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2609 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2611 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2612 (_POSIX_MESSAGE_PASSING): Define.
2613 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2614 (_POSIX_MESSAGE_PASSING): Define.
2615 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2616 (_POSIX_MESSAGE_PASSING): Define.
2618 2004-04-04 Ulrich Drepper <drepper@redhat.com>
2620 * tst-context1.c (fct): Check whether correct stack is used.
2622 2004-04-03 Ulrich Drepper <drepper@redhat.com>
2624 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2625 matching constraints for asm mem parameters.
2627 * tst-clock2.c (tf): Don't define unless needed.
2629 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
2631 * Makefile (link-libc-static): Use $(static-gnulib) instead of
2634 2004-03-30 Ulrich Drepper <drepper@redhat.com>
2636 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2637 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2638 * pthreadP.h: Declare __nptl_deallocate_tsd.
2639 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2642 * Makefile (tests): Add tst-tsd5.
2643 * tst-tsd5.c: New file.
2645 2004-03-29 Ulrich Drepper <drepper@redhat.com>
2647 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2648 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2649 is SHLIB_COMPAT check.
2650 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2651 (__pthread_attr_getaffinity_old): Likewise.
2652 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2653 (__pthread_getaffinity_old): Likewise.
2654 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2655 (__pthread_setaffinity_old): Likewise.
2657 2004-03-26 Ulrich Drepper <drepper@redhat.com>
2659 * allocatestack.c (_make_stacks_executable): Call
2660 _dl_make_stack_executable first.
2662 2004-03-24 Roland McGrath <roland@redhat.com>
2664 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2665 constraint instead of "0".
2667 2004-03-24 Ulrich Drepper <drepper@redhat.com>
2669 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2670 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2672 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2673 code to avoid warning.
2675 2004-03-24 Andreas Jaeger <aj@suse.de>
2677 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2678 (__pthread_attr_setaffinity_old): Remove const.
2680 2004-03-23 Ulrich Drepper <drepper@redhat.com>
2682 * sysdeps/unix/sysv/linux/smp.h: New file.
2683 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2684 * init.c: Define __is_smp.
2685 (__pthread_initialize_minimal_internal): Call is_smp_system to
2686 initialize __is_smp.
2687 * pthreadP.h: Declare __is_smp.
2688 Define MAX_ADAPTIVE_COUNT is necessary.
2689 * pthread_mutex_init.c: Add comment regarding __spins field.
2690 * pthread_mutex_lock.c: Implement adaptive mutex type.
2691 * pthread_mutex_timedlock.c: Likewise.
2692 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2693 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2695 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2696 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2697 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2698 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2699 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2700 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2701 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2702 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2703 lll_mutex_cond_trylock.
2704 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2705 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2706 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2707 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2708 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2709 Define BUSY_WAIT_NOP.
2710 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2711 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2713 * tst-mutex5.c: Add support for testing adaptive mutexes.
2714 * tst-mutex7.c: Likewise.
2715 * tst-mutex5a.c: New file.
2716 * tst-mutex7a.c: New file.
2717 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2719 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2720 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2721 vgettimeofday call might destroy the content.
2723 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2726 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2727 No need to restrict type of ret. Make it int. Add comment.
2729 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2730 Remove unnecessary setne instruction.
2732 2004-03-22 Jakub Jelinek <jakub@redhat.com>
2734 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2735 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2736 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2737 If realloc fails, break out of the loop.
2739 2004-03-20 Andreas Jaeger <aj@suse.de>
2741 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2742 (__pthread_setaffinity_old): Fix interface.
2743 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2744 (__pthread_getaffinity_old): Likewise.
2746 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2747 (__pthread_setaffinity_new): Remove duplicate declaration.
2749 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2751 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2752 the return value to a safe register.
2753 (CDISABLE): Set the function argument correctly.
2755 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2757 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2758 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2759 Rewrite so that only one locked memory operation per round is needed.
2760 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2761 (pthread_barrier_wait): After wakeup, release lock only when the
2762 last thread stopped using the barrier object.
2763 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2764 (__pthread_cond_wait): Don't store mutex address if the current
2765 value is ~0l. Add correct cleanup support and unwind info.
2766 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2767 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2768 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2769 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2770 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2771 Add correct cleanup support and unwind info.
2772 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2773 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2774 information for syscall wrappers.
2776 2004-03-18 Ulrich Drepper <drepper@redhat.com>
2778 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2779 cpusetsize field, remove next.
2780 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2781 parameter for size of the CPU set.
2782 (pthread_setaffinity_np): Likewise.
2783 (pthread_attr_getaffinity_np): Likewise.
2784 (pthread_attr_setaffinity_np): Likewise.
2785 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2786 interface change, keep compatibility code.
2787 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2788 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2789 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2790 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
2791 __pthread_getaffinity_np.
2792 * Versions: Add version for changed interfaces.
2793 * tst-attr3.c: Adjust test for interface change.
2794 * pthread_getattr_np.c: Query the kernel about the affinity mask with
2795 increasing buffer sizes.
2796 * pthread_attr_destroy.c: Remove unused list handling.
2797 * pthread_attr_init.c: Likewise.
2799 2004-03-17 Roland McGrath <roland@redhat.com>
2801 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2802 first argument to clock_getres so we ever enable kernel timers.
2804 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
2806 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2808 2004-03-12 Richard Henderson <rth@redhat.com>
2810 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2811 oldvalue from CENABLE to CDISABLE.
2813 2004-03-12 Ulrich Drepper <drepper@redhat.com>
2815 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2816 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2817 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2818 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2820 2004-03-11 Richard Henderson <rth@redhat.com>
2822 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2823 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2824 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2826 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2828 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2829 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2830 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2832 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2834 * forward.c (__pthread_cond_broadcast_2_0,
2835 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2836 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2837 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2839 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2841 * sysdeps/sh/tcb-offsets.sym: Add PID.
2842 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2843 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2845 2004-03-10 Ulrich Drepper <drepper@redhat.com>
2847 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2848 include <sysdep-cancel.h>, vfork is no cancellation point.
2849 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2850 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2851 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2853 2004-03-10 Jakub Jelinek <jakub@redhat.com>
2855 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2857 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2858 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2860 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2862 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2863 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2864 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2865 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2866 of DO_CALL_VIA_BREAK. Work around a gas problem.
2868 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2869 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2870 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2871 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2872 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2873 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2875 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2876 a local register for saving old PID. Negate PID in parent upon exit.
2878 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2880 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2881 before syscall, set to the old value in the parent afterwards.
2882 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2883 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2885 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2886 before syscall, set to the old value in the parent afterwards.
2887 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2888 * sysdeps/s390/tcb-offsets.sym: Add PID.
2890 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2891 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2892 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2893 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2894 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2895 * sysdeps/sparc/tcb-offsets.sym: Add PID.
2897 2004-03-10 Andreas Schwab <schwab@suse.de>
2899 * sysdeps/ia64/tcb-offsets.sym: Add PID.
2900 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2901 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2903 2004-03-09 Jakub Jelinek <jakub@redhat.com>
2905 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2906 * tst-cancel21.c (do_one_test): Likewise.
2907 Reported by Gordon Jin <gordon.jin@intel.com>.
2909 2004-02-09 Jakub Jelinek <jakub@redhat.com>
2911 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2912 if non-zero and set to INT_MIN if zero.
2913 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2914 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2915 (SAVE_PID, RESTORE_PID): Define.
2917 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2918 Use relative path to avoid including NPTL i386/vfork.S.
2919 (SAVE_PID, RESTORE_PID): Define.
2920 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2921 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2922 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2924 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2925 * tst-vfork1.c: New test.
2926 * tst-vfork2.c: New test.
2927 * tst-vfork1x.c: New test.
2928 * tst-vfork2x.c: New test.
2930 2004-03-08 Ulrich Drepper <drepper@redhat.com>
2932 * sysdeps/i386/tcb-offsets.sym: Add PID.
2933 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2934 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2935 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2937 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
2939 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2941 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
2943 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2946 2004-03-07 Ulrich Drepper <drepper@redhat.com>
2948 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2951 * tst-once4.c: Remove unnecessary macro definition.
2953 * tst-mutex7.c (do_test): Limit thread stack size.
2954 * tst-once2.c (do_test): Likewise.
2955 * tst-tls3.c (do_test): Likewise.
2956 * tst-tls1.c (do_test): Likewise.
2957 * tst-signal3.c (do_test): Likewise.
2958 * tst-kill6.c (do_test): Likewise.
2959 * tst-key4.c (do_test): Likewise.
2960 * tst-join4.c (do_test): Likewise.
2961 * tst-fork1.c (do_test): Likewise.
2962 * tst-context1.c (do_test): Likewise.
2963 * tst-cond2.c (do_test): Likewise.
2964 * tst-cond10.c (do_test): Likewise.
2965 * tst-clock2.c (do_test): Likewise.
2966 * tst-cancel10.c (do_test): Likewise.
2967 * tst-basic2.c (do_test): Likewise.
2968 * tst-barrier4.c (do_test): Likewise.
2970 2004-03-05 Ulrich Drepper <drepper@redhat.com>
2972 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2974 2004-03-01 Ulrich Drepper <drepper@redhat.com>
2976 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2977 (__pthread_cond_timedwait): Optimize wakeup test.
2978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2979 (__pthread_cond_wait): Likewise.
2980 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2981 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2984 2004-02-29 Ulrich Drepper <drepper@redhat.com>
2986 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2987 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
2988 the atomic instruction needed.
2989 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2990 (__lll_mutex_lock_wait): Likewise.
2992 2004-02-28 Ulrich Drepper <drepper@redhat.com>
2994 * Makefile (tests): Add tst-cond14 and tst-cond15.
2995 * tst-cond14.c: New file.
2996 * tst-cond15.c: New file.
2998 2004-02-27 Ulrich Drepper <drepper@redhat.com>
3000 * sysdeps/pthread/createthread.c (create_thread): Remove use of
3001 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
3002 needs to be implemented differently to be useful.
3004 2004-02-26 Ulrich Drepper <drepper@redhat.com>
3006 * pthread_attr_setschedparam.c: Don't test priority against limits
3007 here. Set ATTR_FLAG_SCHED_SET flag.
3008 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
3009 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
3010 from parent thread to child. If attribute is used and scheduling
3011 parameters are not inherited, copy parameters from attribute or
3012 compute them. Check priority value.
3013 * pthread_getschedparam.c: If the parameters aren't known yet get
3014 them from the kernel.
3015 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
3016 ATTR_FLAG_POLICY_SET flag for thread.
3017 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
3018 and ATTR_FLAG_POLICY_SET.
3020 * sysdeps/pthread/createthread.c: Use tgkill if possible.
3022 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
3023 fail if stack address hasn't been set. Just return 0.
3025 2004-02-25 Ulrich Drepper <drepper@redhat.com>
3027 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
3028 libpthread for the files in this list.
3029 (CFLAGS-tst-unload): Removed.
3030 * tst-unload.c (do_test): Don't use complete path for
3033 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
3036 2004-02-22 Ulrich Drepper <drepper@redhat.com>
3038 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3039 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
3040 operation per round is needed.
3041 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3042 (__lll_mutex_lock_wait): Likewise.
3044 2004-02-20 Ulrich Drepper <drepper@redhat.com>
3046 * tst-cancel9.c (cleanup): Don't print to stderr.
3048 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3050 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
3052 2004-02-20 Jakub Jelinek <jakub@redhat.com>
3054 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3055 (__syscall_error_handler2): Call CDISABLE.
3056 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3057 (__syscall_error_handler2): Call CDISABLE.
3059 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3060 Release lock before the loop, don't reacquire it.
3062 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
3064 2004-02-19 Andreas Schwab <schwab@suse.de>
3066 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3069 2004-02-18 Ulrich Drepper <drepper@redhat.com>
3071 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
3072 (pthread_barrier_wait): After wakeup, release lock only when the
3073 last thread stopped using the barrier object.
3074 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
3075 (pthread_barrier_wait): Likewise.
3076 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3078 * Makefile (tests): Add tst-barrier4.
3079 * tst-barrier4.c: New file.
3081 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3082 (__pthread_cond_timedwait): Perform timeout test while holding
3083 internal lock to prevent wakeup race.
3084 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3085 * sysdeps/pthread/pthread_cond_timedwait.c
3086 (__pthread_cond_timedwait): Likewise.
3087 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3088 (__pthread_cond_timedwait): Likewise.
3090 2004-02-18 Jakub Jelinek <jakub@redhat.com>
3092 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
3093 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
3094 * Makefile (tests): Add tst-rwlock13.
3095 * tst-rwlock13.c: New test.
3097 2004-02-16 Ulrich Drepper <drepper@redhat.com>
3099 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3100 (__condvar_tw_cleanup): Little optimization.
3101 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3103 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
3105 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
3106 libpthread as "lib" parameter to SHLIB_COMPAT.
3107 (__novmx_siglongjmp): Fix typo in function name.
3108 (__novmx_longjmp): Fix typo in function name.
3110 2004-02-13 Ulrich Drepper <drepper@redhat.com>
3112 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
3115 * sysdeps/generic/pt-longjmp.c: Moved to...
3116 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
3118 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
3120 * Makefile (libpthread-routines): Add pt-cleanup.
3121 * pt-longjmp.c: Removed.
3122 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
3123 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
3124 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
3125 Version longjmp, siglongjmp for GLIBC_2.3.4.
3126 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
3128 2004-02-13 Ulrich Drepper <drepper@redhat.com>
3130 * sysdeps/pthread/pthread_cond_timedwait.c
3131 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
3132 Reuse code. Add __builtin_expects.
3134 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3135 (__pthread_cond_timedwait): Get internal lock in case timeout has
3136 passed before the futex syscall.
3137 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3139 2004-01-20 Ulrich Drepper <drepper@redhat.com>
3141 * allocatestack.c: Pretty printing.
3143 * sysdeps/pthread/createthread.c (create_thread): Don't add
3144 CLONE_DETACHED bit if it is not necessary.
3146 2004-01-16 Ulrich Drepper <drepper@redhat.com>
3148 * pthread_getattr_np.c: Include ldsodefs.h.
3150 2004-01-16 Richard Henderson <rth@redhat.com>
3152 * allocatestack.c: Don't declare __libc_stack_end.
3153 * init.c (__pthread_initialize_minimal_internal): Likewise.
3154 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
3156 2004-01-15 Richard Henderson <rth@redhat.com>
3158 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
3159 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
3160 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
3161 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
3162 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
3163 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
3164 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
3165 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
3167 2004-01-14 Ulrich Drepper <drepper@redhat.com>
3169 * init.c (pthread_functions): Make array const.
3171 2004-01-13 Ulrich Drepper <drepper@redhat.com>
3173 * allocatestack.c (__make_stacks_executable): Change interface.
3174 Check parameters. Pass parameter on to libc counterpart.
3175 * pthreadP.h: Change declaration.
3177 2004-01-13 Richard Henderson <rth@redhat.com>
3179 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
3181 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
3184 * sysdeps/alpha/Makefile: New file.
3185 * sysdeps/alpha/tcb-offsets.sym: New file.
3186 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3187 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
3189 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
3192 2004-01-08 Jakub Jelinek <jakub@redhat.com>
3194 * Makefile (tests): Add tst-backtrace1.
3195 * tst-backtrace1.c: New test.
3197 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
3199 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
3200 register as second parameter to the REGISTER macro.
3201 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
3202 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
3203 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
3204 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
3205 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
3206 of thread register as second parameter to REGISTER macro in 64 case.
3208 2004-01-03 Ulrich Drepper <drepper@redhat.com>
3210 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
3211 (CFLAGS-getpid.o): Defined.
3212 (CFLAGS-getpid.os): Defined.
3214 2003-12-31 Ulrich Drepper <drepper@redhat.com>
3216 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
3217 returned for main thread does not overlap with any other VMA.
3218 Patch by Jakub Jelinek.
3220 2003-12-29 Jakub Jelinek <jakub@redhat.com>
3222 * tst-raise1.c: Include stdio.h.
3224 2003-12-23 Jakub Jelinek <jakub@redhat.com>
3226 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
3227 setting with __ASSUME_TGKILL || defined __NR_tgkill.
3228 If pid is 0, set it to selftid.
3229 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
3230 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
3231 != 0, return self->tid without doing a syscall.
3232 * descr.h (struct pthread): Move pid field after tid.
3234 * Makefile (tests): Add tst-raise1.
3235 * tst-raise1.c: New file.
3237 2003-12-23 Roland McGrath <roland@redhat.com>
3239 * tst-oddstacklimit.c: New file.
3240 * Makefile (tests): Add it.
3241 (tst-oddstacklimit-ENV): New variable.
3243 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
3244 value up to page size for __default_stacksize.
3246 2003-12-21 Ulrich Drepper <drepper@redhat.com>
3248 * Makefile (tests): Add tst-eintr5.
3249 * tst-eintr5.c: New file.
3251 * eintr.c (eintr_source): Prevent sending signal to self.
3253 * tst-eintr2.c (tf1): Improve error message.
3255 2003-12-20 Ulrich Drepper <drepper@redhat.com>
3257 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
3258 * sysdeps/unix/sysv/linux/getpid.c: New file.
3259 * pthread_cancel.c: Add comment explaining use of PID field.
3260 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3261 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
3262 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
3263 temporarily to signal the field must not be relied on and updated
3265 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
3266 temporarily negative.
3267 * sysdeps/unix/sysv/linux/raise.c: Likewise.
3269 2003-12-19 Ulrich Drepper <drepper@redhat.com>
3271 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
3272 (eintr_source): If ARG != NULL, use pthread_kill.
3273 * tst-eintr1.c: Adjust for this change.
3274 * tst-eintr2.c: Likewise.
3275 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
3276 * tst-eintr3.c: New file.
3277 * tst-eintr4.c: New file.
3279 2003-12-19 Jakub Jelinek <jakub@redhat.com>
3281 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
3282 if CANCELSTATE_BITMASK is set.
3283 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
3286 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
3287 (tests-reverse): Add tst-cancel23.
3288 * tst-cancel22.c: New test.
3289 * tst-cancel23.c: New test.
3291 2003-12-18 Ulrich Drepper <drepper@redhat.com>
3293 * tst-eintr1.c: Better error messages.
3295 * Makefile (tests): Add tst-eintr2.
3296 * tst-eintr2.c: New file.
3298 2003-12-18 Jakub Jelinek <jakub@redhat.com>
3300 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
3301 (CFLAGS-tst-cancelx21.c): Set.
3302 * tst-cancel21.c: New test.
3303 * tst-cancelx21.c: New test.
3305 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
3307 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
3308 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
3309 * pt-longjmp.c: Include jmpbuf-unwind.h.
3310 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
3311 _JMPBUF_UNWINDS. Adjust compared pointers.
3312 * init.c (__pthread_initialize_minimal_internal): Initialize
3313 pd->stackblock_size.
3314 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
3315 * sysdeps/alpha/jmpbuf-unwind.h: New file.
3316 * sysdeps/i386/jmpbuf-unwind.h: New file.
3317 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
3318 * sysdeps/s390/jmpbuf-unwind.h: New file.
3319 * sysdeps/sh/jmpbuf-unwind.h: New file.
3320 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
3321 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
3322 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
3323 (_JMPBUF_CFA_UNWINDS): Remove.
3324 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
3326 2003-12-12 Jakub Jelinek <jakub@redhat.com>
3328 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
3329 (CFLAGS-tst-cancelx20.c): Set.
3330 * tst-cancel20.c: New test.
3331 * tst-cancelx20.c: New test.
3333 2003-12-17 Ulrich Drepper <drepper@redhat.com>
3335 * init.c (__pthread_initialize_minimal_internal): Don't treat
3336 architectures with separate register stack special here when
3337 computing default stack size.
3339 2003-12-17 Roland McGrath <roland@redhat.com>
3341 * Makefile (tst-cancelx7-ARGS): New variable.
3342 Reportd by Greg Schafer <gschafer@zip.com.au>.
3344 2003-12-17 Jakub Jelinek <jakub@redhat.com>
3346 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
3347 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
3348 (tst-stack3-ENV): Set.
3349 ($(objpfx)tst-stack3-mem): New.
3350 * tst-stack3.c: New test.
3352 2003-12-10 David Mosberger <davidm@hpl.hp.com>
3354 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
3355 Add unwind directives. Drop unused .regstk directive.
3356 (_fini_EPILOG_BEGINS): Add unwind directives.
3358 2003-12-11 Ulrich Drepper <drepper@redhat.com>
3360 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3361 Assume parameter is a pointer.
3362 (lll_futex_wake): Likewise.
3363 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
3365 (lll_futex_wake): Likewise.
3366 Reported by Boris Hu.
3367 * sysdeps/unix/sysv/linux/unregister-atfork.c
3368 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
3370 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
3372 2003-12-10 Ulrich Drepper <drepper@redhat.com>
3374 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
3375 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
3376 __rtld_lock_initialize for ld.so lock.
3377 Patch in part by Adam Li <adam.li@intel.com>.
3379 2003-12-02 David Mosberger <davidm@hpl.hp.com>
3381 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
3382 in $(gnulib). Also, remove stale comment.
3384 2003-11-12 David Mosberger <davidm@hpl.hp.com>
3386 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3387 advantage of new syscall stub and optimize accordingly.
3389 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3390 from SYS_futex, to match expectations of
3391 sysdep.h:DO_INLINE_SYSCALL.
3392 (lll_futex_clobbers): Remove.
3393 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3394 (lll_futex_wake): Likewise.
3395 (lll_futex_requeue): Likewise.
3396 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3397 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3399 (__lll_mutex_lock): Likewise.
3400 (__lll_mutex_cond_lock): Likewise.
3401 (__lll_mutex_timed_lock): Likewise.
3402 (__lll_mutex_unlock): Likewise.
3403 (__lll_mutex_unlock_force): Likewise.
3405 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3406 comes before the include of <sysdep.h>.
3407 (THREAD_SELF_SYSINFO): New macro.
3408 (THREAD_SYSINFO): Likewise.
3409 (INIT_SYSINFO): New macro.
3410 (TLS_INIT_TP): Call INIT_SYSINFO.
3412 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3414 * sysdeps/pthread/createthread.c (create_thread): Use
3415 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3416 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3417 THREAD_SELF_SYSINFO instead of open code.
3418 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3419 (THREAD_SYSINFO): Likewise.
3421 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3423 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3425 2003-12-06 Ulrich Drepper <drepper@redhat.com>
3427 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3428 instead of .init. Patch by David Mosberger.
3430 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
3432 * sysdeps/pthread/configure.in: Remove broken declaration in C
3433 cleanup handling check.
3435 2003-11-30 Andreas Jaeger <aj@suse.de>
3437 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
3438 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
3441 2003-11-27 Jakub Jelinek <jakub@redhat.com>
3443 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3444 * pthread_attr_destroy.c: Include shlib-compat.h.
3445 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3446 is set in iattr->flags.
3447 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3449 2003-11-21 Jakub Jelinek <jakub@redhat.com>
3451 * Makefile (distribute): Add tst-cleanup4aux.c.
3453 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
3456 2003-11-21 Ulrich Drepper <drepper@redhat.com>
3458 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3459 pthread_cond_signal.
3461 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3462 store mutex address if the current value is ~0l.
3463 * sysdeps/pthread/pthread_cond_timedwait.c
3464 (__pthread_cond_timedwait): Likewise.
3465 * sysdeps/pthread/pthread_cond_broadcast.c
3466 (__pthread_cond_broadcast): Don't use requeue for pshared
3469 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3470 (__pthread_cond_wait): Don't store mutex address if the current
3472 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3473 (__pthread_cond_timedwait): Likewise.
3474 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3475 (__pthread_cond_broadcast): Don't use requeue for pshared
3478 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3479 element with ~0l for pshared condvars, with NULL otherwise.
3481 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3482 (__pthread_cond_wait): Don't store mutex address if the current
3484 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3485 (__pthread_cond_timedwait): Likewise.
3486 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3487 (__pthread_cond_broadcast): Don't use requeue for pshared
3490 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3491 * tst-cond12.c: New file.
3492 * tst-cond13.c: New file.
3494 2003-11-17 Ulrich Drepper <drepper@redhat.com>
3496 * sysdeps/pthread/configure.in: Make missing forced unwind support
3499 2003-11-11 Ulrich Drepper <drepper@redhat.com>
3501 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3503 2003-11-06 Ulrich Drepper <drepper@redhat.com>
3505 * Makefile: Add magic to clean up correctly.
3507 2003-11-05 Jakub Jelinek <jakub@redhat.com>
3509 * unwind.c (FRAME_LEFT): Define.
3510 (unwind_stop): Handle old style cleanups here.
3511 (__pthread_unwind): Handle old style cleanups only if
3512 !HAVE_FORCED_UNWIND.
3513 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3514 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3515 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3516 ($(objpfx)tst-cleanupx4): Likewise.
3517 * tst-cleanup4.c: New test.
3518 * tst-cleanup4aux.c: New.
3519 * tst-cleanupx4.c: New test.
3521 2003-11-04 Ulrich Drepper <drepper@redhat.com>
3523 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3524 lll_mutex_*lock macros to skip atomic operations on some archs.
3526 2003-11-03 Ulrich Drepper <drepper@redhat.com>
3528 * sysdeps/pthread/tst-timer.c (main): Initialize
3529 sigev2.sigev_value as well.
3531 2003-10-15 Roland McGrath <roland@redhat.com>
3533 * sysdeps/pthread/configure.in: Barf if visibility attribute support
3535 * sysdeps/pthread/configure: Regenerated.
3537 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3539 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3540 locking macros. No distinction between normal and mutex locking
3542 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3543 Merge bits from lowlevelmutex.S we still need.
3544 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3545 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3546 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3547 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3548 new mutex implementation.
3549 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3550 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3551 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3552 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3553 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3554 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3555 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3556 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3557 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3558 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3559 symbol for entry point to avoid cancellation.
3561 2003-10-07 Jakub Jelinek <jakub@redhat.com>
3563 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3565 (SAVE_OLDTYPE_0): Fix a typo.
3567 2003-10-03 Ulrich Drepper <drepper@redhat.com>
3569 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3570 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
3572 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3574 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3577 2003-10-02 Jakub Jelinek <jakub@redhat.com>
3579 * Makefile (tests): Add tst-cancel19.
3580 * tst-cancel19.c: New test.
3582 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3584 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3585 restoring of the old cancellation type.
3587 2003-09-30 Jakub Jelinek <jakub@redhat.com>
3589 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3591 2003-09-27 Wolfram Gloger <wg@malloc.de>
3593 * sysdeps/pthread/malloc-machine.h: New file
3595 2003-09-24 Roland McGrath <roland@redhat.com>
3597 * allocatestack.c (__make_stacks_executable): Don't ignore return
3598 value from _dl_make_stack_executable.
3600 2003-09-24 Ulrich Drepper <drepper@redhat.com>
3602 * allocatestack.c (__make_stacks_executable): Also change
3603 permission of the currently unused stacks.
3605 * allocatestack.c (change_stack_perm): Split out from
3606 __make_stacks_executable.
3607 (allocate_stack): If the required permission changed between the time
3608 we started preparing the stack and queueing it, change the permission.
3609 (__make_stacks_executable): Call change_stack_perm.
3611 * Makefile: Build tst-execstack-mod locally.
3612 * tst-execstack-mod.c: New file.
3614 2003-09-23 Jakub Jelinek <jakub@redhat.com>
3616 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3618 2003-09-23 Roland McGrath <roland@redhat.com>
3620 * tst-execstack.c: New file.
3621 * Makefile (tests): Add it.
3622 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3623 (LDFLAGS-tst-execstack): New variable.
3625 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3626 whether to use PROT_EXEC for stack mmap.
3627 (__make_stacks_executable): New function.
3628 * pthreadP.h: Declare it.
3629 * init.c (__pthread_initialize_minimal_internal): Set
3630 GL(dl_make_stack_executable_hook) to that.
3632 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3634 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3635 recommendation from AMD re avoidance of lock prefix.
3637 2003-09-22 Jakub Jelinek <jakub@redhat.com>
3639 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3640 lll_futex_timed_wait instead of lll_futex_wait.
3641 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3642 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3643 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3644 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3645 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3646 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3647 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3648 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3649 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3650 Completely revamp the locking macros. No distinction between
3651 normal and mutex locking anymore.
3652 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3653 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3654 __lll_lock_timedwait): Fix prototypes.
3655 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3656 __lll_lock_timedwait): Likewise.
3657 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3658 macros, add __builtin_expect.
3659 (lll_mutex_timedlock): Likewise. Fix return value.
3660 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3661 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3662 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3663 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3664 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3665 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3666 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3667 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3669 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3671 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3672 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3673 operation if possible.
3675 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3676 like jumping over the lock prefix.
3678 2003-09-21 Ulrich Drepper <drepper@redhat.com>
3680 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3681 locking macros. No distinction between normal and mutex locking
3683 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3684 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3685 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3686 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3687 locking. Merge bits from lowlevelmutex.S we still need.
3688 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3689 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3690 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3691 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3692 * Makefile (routines): Remove libc-lowlevelmutex.
3693 (libpthread-rountines): Remove lowlevelmutex.
3694 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3695 for new mutex implementation.
3696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3699 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3700 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3702 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3704 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3705 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3706 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3707 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3708 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3709 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3710 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3711 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3713 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3715 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3716 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3717 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3719 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3720 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3722 2003-09-20 Ulrich Drepper <drepper@redhat.com>
3724 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3725 in parameters of asm with output parameters.
3727 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3728 type of DECR parameter to int.
3729 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3731 2003-09-18 Jakub Jelinek <jakub@redhat.com>
3733 * tst-attr3.c (tf, do_test): Print stack start/end/size and
3734 guardsize for each thread.
3736 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3738 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3739 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3740 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3742 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3743 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3745 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3746 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3747 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3748 (pthread_getaffinity_np): Add hidden_def.
3750 * Makefile (tests): Add tst-attr3.
3751 * tst-attr3.c: New test.
3753 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3755 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3757 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3758 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3760 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3762 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3763 * tst-align.c: Include tst-stack-align.h.
3764 (tf, do_test): Use TEST_STACK_ALIGN macro.
3766 2003-09-17 Ulrich Drepper <drepper@redhat.com>
3768 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3771 2003-09-16 Ulrich Drepper <drepper@redhat.com>
3773 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3774 stack-related values for the initial thread.
3776 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3778 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3780 2003-09-11 Ulrich Drepper <drepper@redhat.com>
3782 * pthread_mutex_lock.c: Minor code rearrangements.
3784 2003-09-05 Roland McGrath <roland@redhat.com>
3786 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3787 Instead, include ../nptl_db/db_info.c to do its magic.
3788 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3789 (__pthread_pthread_key_2ndlevel_size): Likewise.
3790 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3791 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3792 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3793 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3794 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3795 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3796 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3797 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3798 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3799 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3800 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3801 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3802 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3803 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3804 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3805 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3806 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3808 2003-09-08 Ulrich Drepper <drepper@redhat.com>
3810 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3811 of pthread_t to be compatible with LT.
3812 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3813 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3814 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3815 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3816 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3817 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3818 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3820 2003-09-04 Ulrich Drepper <drepper@redhat.com>
3822 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3824 2003-09-04 Jakub Jelinek <jakub@redhat.com>
3826 * unwind-forcedunwind.c: Move to...
3827 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3828 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3829 * sysdeps/pthread/jmpbuf-unwind.h: New file.
3830 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3831 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3832 * unwind.c: Include jmpbuf-unwind.h.
3833 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3835 2003-09-02 Jakub Jelinek <jakub@redhat.com>
3837 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3838 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3839 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3840 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3841 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3842 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3843 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3844 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3845 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3846 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3847 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3849 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3850 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3851 * Makefile (tests): Add tst-stack2.
3852 * tst-stack2.c: New test.
3853 * tst-stack1.c: Include limits.h and sys/param.h.
3854 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3856 * pthread_condattr_setpshared.c: Include errno.h.
3857 (pthread_condattr_setpshared): Return EINVAL if pshared
3858 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3860 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3861 defined symbol for entry point to avoid cancellation.
3862 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3864 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3866 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3868 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3870 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3872 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3873 __close_nocancel, __read_nocancel, __write_nocancel,
3874 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
3875 libpthread.so or librt.so, define to corresponding function
3876 without _nocancel suffix.
3877 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3878 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3879 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3881 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3883 2003-09-02 Ulrich Drepper <drepper@redhat.com>
3885 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3886 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3888 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3889 in subsections has a symbol associated with it.
3891 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3892 defined symbol for entry point to avoid cancellation.
3893 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3895 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3897 * Makefile (tests): Add tst-tls5.
3898 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3899 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3900 ($(objpfx)tst-tls5): New.
3901 ($(objpfx)tst-tls6.out): Likewise.
3902 (tests): Depend on $(objpfx)tst-tls6.out.
3903 * tst-tls3.c: Include stdint.h and pthreaddef.h.
3904 (do_test): Check pthread_self () return value alignment.
3905 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3906 (tf): Check pthread_self () return value alignment.
3907 * tst-tls5.c: New test.
3909 * tst-tls5mod.c: New.
3910 * tst-tls5moda.c: New.
3911 * tst-tls5modb.c: New.
3912 * tst-tls5modc.c: New.
3913 * tst-tls5modd.c: New.
3914 * tst-tls5mode.c: New.
3915 * tst-tls5modf.c: New.
3916 * tst-tls6.sh: New test.
3918 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3919 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3920 * init.c (pthread_functions): Initialize them.
3921 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3922 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3923 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3924 pthread_cond_timedwait@@GLIBC_2.3.2.
3926 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3928 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3929 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3930 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3931 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3932 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3933 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3935 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3937 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3938 _POSIX_THREAD_PRIORITY_SCHEDULING.
3939 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3941 2003-08-31 Ulrich Drepper <drepper@redhat.com>
3943 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3944 nested function, use static inline function from libio.h.
3945 Code by Richard Henderson.
3947 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3950 2003-08-30 Jakub Jelinek <jakub@redhat.com>
3952 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3953 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3954 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3955 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3956 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3957 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3958 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3959 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3960 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3961 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3962 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3963 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3964 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3965 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3966 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3967 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3968 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3969 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3970 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3971 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3972 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3973 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3974 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3975 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3976 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3977 * sysdeps/sparc/tls.h: New file.
3978 * sysdeps/sparc/tcb-offsets.sym: New file.
3979 * sysdeps/sparc/Makefile: New file.
3980 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3981 * init.c [__sparc__] (__NR_set_tid_address): Define.
3983 2003-08-29 Jakub Jelinek <jakub@redhat.com>
3985 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3986 _IO_release_lock): Define.
3988 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
3990 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3991 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
3993 2003-08-27 Ulrich Drepper <drepper@redhat.com>
3995 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3996 (__pthread_cleanup_class): Add missing return types of member
3999 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
4001 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4002 (lll_mutex_unlock_force): Add memory barrier between store and futex
4005 2003-08-25 Ulrich Drepper <drepper@redhat.com>
4007 * tst-cancel4.c (do_test): Also unlink tempfname and remove
4008 tempmsg in first loop.
4010 2003-08-18 Ulrich Drepper <drepper@redhat.com>
4012 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4013 _POSIX_THREAD_PRIORITY_SCHEDULING.
4014 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4016 2003-08-07 Jakub Jelinek <jakub@redhat.com>
4018 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
4019 (__rtld_lock_default_lock_recursive,
4020 __rtld_lock_default_unlock_recursive): Define.
4021 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
4022 __rtld_lock_unlock_recursive): Define using
4023 GL(_dl_rtld_*lock_recursive).
4024 * init.c (__pthread_initialize_minimal_internal): Initialize
4025 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
4026 Lock GL(_dl_load_lock) the same number of times as
4027 GL(_dl_load_lock) using non-mt implementation was nested.
4029 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
4030 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
4032 2003-08-06 Jakub Jelinek <jakub@redhat.com>
4034 * tst-cancel17.c (do_test): Make len2 maximum of page size and
4037 2003-08-07 Jakub Jelinek <jakub@redhat.com>
4039 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
4041 2003-08-03 Jakub Jelinek <jakub@redhat.com>
4043 * sysdeps/pthread/createthread.c (do_clone): Move error handling
4044 to first syscall error check. Move syscall error check for tkill
4045 into __ASSUME_CLONE_STOPPED #ifdef.
4047 2003-08-02 Ulrich Drepper <drepper@redhat.com>
4049 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
4050 is not defined, do explicit synchronization.
4051 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
4052 is not defined also unlock pd->lock for non-debugging case in case
4054 * pthread_create.c (start_thread): Always get and release pd->lock
4055 if __ASSUME_CLONE_STOPPED is not defined.
4056 (start_thread_debug): Removed. Adjust users.
4057 * allocatestack.c (allocate_stack): Always initialize lock if
4058 __ASSUME_CLONE_STOPPED is not defined.
4059 * Makefile (tests): Add tst-sched1.
4060 * tst-sched1.c: New file.
4062 * sysdeps/pthread/createthread.c (do_clone): Only use
4063 sched_setschduler and pass correct parameters.
4065 2003-07-31 Jakub Jelinek <jakub@redhat.com>
4067 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
4068 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
4069 PTHREAD_STACK_MIN in comments.
4071 2003-07-31 Jakub Jelinek <jakub@redhat.com>
4073 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4074 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
4076 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
4077 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
4078 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
4079 (__pthread_cleanup_upto): Fix prototype.
4080 (_longjmp_unwind): Adjust caller.
4081 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
4082 Change second argument to const struct pointer.
4083 * tst-sem8.c (main): Remove unused s2 and s3 variables.
4084 * tst-sem9.c (main): Likewise.
4085 * unwind.c: Include string.h for strlen prototype.
4087 2003-07-31 Ulrich Drepper <drepper@redhat.com>
4089 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4090 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
4091 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
4093 Patch by Nicholas Miell <nmiell@attbi.com>.
4095 2003-07-30 Jakub Jelinek <jakub@redhat.com>
4097 * init.c (__pthread_initialize_minimal_internal): Initialize
4098 GL(dl_init_static_tls).
4099 * pthreadP.h (__pthread_init_static_tls): New prototype.
4100 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
4102 * Makefile (tests): Add tst-tls4.
4103 (modules-names): Add tst-tls4moda and tst-tls4modb.
4104 ($(objpfx)tst-tls4): Link against libdl and libpthread.
4105 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
4107 * tst-tls4.c: New file.
4108 * tst-tls4moda.c: New file.
4109 * tst-tls4modb.c: New file.
4111 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
4113 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
4114 before __timer_dealloc.
4115 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
4116 Don't call list_unlink.
4118 2003-07-29 Roland McGrath <roland@redhat.com>
4120 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
4122 2003-07-25 Jakub Jelinek <jakub@redhat.com>
4124 * tst-cancel17.c (do_test): Check if aio_cancel failed.
4125 Don't reuse struct aiocb A if it failed.
4126 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
4127 not just one byte, as that does not block.
4129 2003-07-22 Jakub Jelinek <jakub@redhat.com>
4131 * sysdeps/pthread/unwind-resume.c: New file.
4132 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
4133 unwind-resume in csu subdir.
4134 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
4136 (librt-sysdep_routines, librt-shared-only-routines): Add
4138 * sysdeps/pthread/rt-unwind-resume.c: New file.
4139 * unwind-forcedunwind.c: New file.
4140 * Makefile (libpthread-routines): Add unwind-forcedunwind.
4141 (libpthread-shared-only-routines): Likewise.
4142 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
4143 * pthreadP.h (pthread_cancel_init): New prototype.
4144 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
4146 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
4147 attr argument const struct pthread_attr *.
4149 * res.c (__res_state): Return __resp.
4150 * descr.h: Include resolv.h.
4151 (struct pthread): Add res field.
4152 * pthread_create.c: Include resolv.h.
4153 (start_thread): Initialize __resp.
4154 * Makefile (tests): Add tst-_res1.
4155 (module-names): Add tst-_res1mod1, tst-_res1mod2.
4156 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
4157 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
4159 * tst-_res1.c: New file.
4160 * tst-_res1mod1.c: New file.
4161 * tst-_res1mod2.c: New file.
4163 2003-07-21 Ulrich Drepper <drepper@redhat.com>
4165 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
4167 * Makefile: Define various *-no-z-defs variables for test DSOs
4168 which has undefined symbols.
4170 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
4172 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4173 Retry if the stwcx fails to store once_control.
4175 2003-07-20 Ulrich Drepper <drepper@redhat.com>
4177 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
4178 pthread_attr_setaffinity.
4179 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
4180 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
4181 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
4182 * pthread_attr_destroy.c: Free cpuset element if allocated.
4183 * pthread_create.c: Pass iattr as additional parameter to
4185 * sysdeps/pthread/createthread.c: If attribute is provided and
4186 a new thread is created with affinity set or scheduling parameters,
4187 start thread with CLONE_STOPPED.
4188 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
4189 pthread_attr_setaffinity.
4190 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4193 2003-07-15 Ulrich Drepper <drepper@redhat.com>
4195 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
4197 2003-07-14 Ulrich Drepper <drepper@redhat.com>
4199 * sysdeps/pthread/configure.in: Require CFI directives also for
4202 2003-07-15 Jakub Jelinek <jakub@redhat.com>
4204 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
4207 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4209 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
4211 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
4212 registers as variables. Call __pthread_mutex_unlock_usercnt.
4213 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4214 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
4215 not self pointer in __writer. Compare with TID to determine
4217 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4218 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4220 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4222 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
4223 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4224 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
4225 macros also when compiling librt.
4227 2003-07-11 Jakub Jelinek <jakub@redhat.com>
4229 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
4230 -fasynchronous-unwind-tables.
4231 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4232 (PSEUDO): Add cfi directives.
4233 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
4235 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
4238 2003-07-08 Jakub Jelinek <jakub@redhat.com>
4240 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
4241 __pthread_unregister_cancel): Add prototypes and hidden_proto.
4242 * unwind.c (__pthread_unwind_next): Add hidden_def.
4243 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
4245 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4246 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4247 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4249 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
4250 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4252 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
4253 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
4254 __pthread_unregister_cancel and __pthread_unwind_next.
4256 2003-07-04 Jakub Jelinek <jakub@redhat.com>
4258 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
4259 different symbol for the cancellation syscall wrapper and
4260 non-cancellation syscall wrapper.
4261 (PSEUDO_END): Define.
4263 2003-07-05 Richard Henderson <rth@redhat.com>
4265 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
4266 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
4267 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4268 return actual return value from the syscall, not 0.
4270 2003-07-07 Ulrich Drepper <drepper@redhat.com>
4272 * descr.h (struct pthread): Add pid field.
4273 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
4274 (__reclaim_stacks): Likewise.
4275 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
4276 also check for PID of the signal source.
4277 (__pthread_initialize_minimal_internal): Also initialize pid field
4278 of initial thread's descriptor.
4279 * pthread_cancel.c: Use tgkill instead of tkill if possible.
4280 * sysdeps/unix/sysv/linux/fork.c: Likewise.
4281 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
4282 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4283 * sysdeps/unix/sysv/linux/raise.c: Likewise.
4285 2003-07-05 Ulrich Drepper <drepper@redhat.com>
4287 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
4288 Fix use of parameter.
4289 (__libc_cleanup_pop): Likewise.
4291 2003-07-04 Ulrich Drepper <drepper@redhat.com>
4293 * init.c (sigcancel_handler): Change parameters to match handler
4294 for SA_SIGACTION. Check signal number and code to recognize
4295 invalid invocations.
4297 2003-07-03 Roland McGrath <roland@redhat.com>
4299 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
4300 Apply sizeof (struct pthread) bias to r13 value.
4302 2003-07-03 Ulrich Drepper <drepper@redhat.com>
4304 * sysdeps/pthread/configure.in: Require CFI directives.
4306 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
4308 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
4309 libpthread compilation.
4310 * unwind.c (__pthread_unwind): Add hidden_def.
4311 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
4313 2003-07-01 Ulrich Drepper <drepper@redhat.com>
4315 * libc-cancellation.c (__libc_cleanup_routine): Define.
4316 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
4317 (__pthread_cleanup_pop): Define.
4319 2003-07-01 Richard Henderson <rth@redhat.com>
4321 * sysdeps/alpha/elf/pt-initfini.c: New file.
4322 * sysdeps/alpha/pthread_spin_lock.S: New file.
4323 * sysdeps/alpha/pthread_spin_trylock.S: New file.
4324 * sysdeps/alpha/pthreaddef.h: New file.
4325 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
4326 * sysdeps/alpha/tls.h: New file.
4327 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
4328 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
4329 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
4330 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
4331 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
4332 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
4333 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
4334 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
4335 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
4336 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
4338 2003-07-01 Ulrich Drepper <drepper@redhat.com>
4340 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
4341 cleanup support and unwind info.
4343 2003-06-30 Ulrich Drepper <drepper@redhat.com>
4345 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4346 Use correct cleanup handler registration. Add unwind info.
4347 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
4348 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
4349 * tst-once3.c: Add cleanup handler and check it is called.
4350 * tst-once4.c: Likewise.
4351 * tst-oncex3.c: New file.
4352 * tst-oncex4.c: New file.
4353 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
4355 2003-06-29 Ulrich Drepper <drepper@redhat.com>
4357 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
4359 2003-06-27 Ulrich Drepper <drepper@redhat.com>
4361 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
4362 (tf_msgsnd): Likewise.
4364 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
4365 premature returns a bit more.
4367 2003-06-26 Ulrich Drepper <drepper@redhat.com>
4369 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
4370 definition to the front.
4372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
4373 the cleanup functions to make the names unique. Fix dwarf opcode
4375 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
4376 functions to make the names unique. Fix CFA offset for two blocks.
4378 2003-06-25 Ulrich Drepper <drepper@redhat.com>
4380 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
4381 missing closing braces.
4382 Patch by Christophe Saout <christophe@saout.de>.
4384 2003-06-24 Roland McGrath <roland@redhat.com>
4386 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
4388 2003-06-24 Ulrich Drepper <drepper@redhat.com>
4390 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
4391 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
4393 * pthreadP.h: Declare __find_thread_by_id.
4394 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
4395 * pthread_clock_gettime.c: Allow using other thread's clock.
4396 * pthread_clock_settime.c: Likewise.
4397 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4398 * Makefile: Add rules to build and run tst-clock2.
4399 * tst-clock2.c: New file.
4401 2003-06-23 Ulrich Drepper <drepper@redhat.com>
4403 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
4404 to use exception-based cleanup handler.
4405 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4407 * tst-cond8.c (ch): Announce that we are done.
4409 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
4411 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
4412 Also test aio_suspend with timeout value.
4414 2003-06-22 Ulrich Drepper <drepper@redhat.com>
4416 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
4417 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
4420 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
4421 (__pthread_mutex_lock_internal): Likewise.
4422 (__pthread_mutex_unlock_internal): Likewise.
4423 (__pthread_mutex_unlock_usercnt): Declare.
4424 * pthread_mutex_destroy.c: Always fail if used in any way.
4425 * pthread_mutex_init.c: Update comment.
4426 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
4427 * pthread_mutex_timedlock.c: Adjust __nusers.
4428 * pthread_mutex_trylock.c: Adjust __nusers.
4429 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
4430 and public interfaces are wrapper with pass additional parameter.
4431 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
4433 * tst-mutex8.c: New file.
4434 * Makefile (tests): Add tst-mutex8.
4435 * sysdeps/pthread/pthread_cond_timedwait.c: Call
4436 __pthread_mutex_unlock_usercnt.
4437 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4438 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4439 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4440 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4441 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4442 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
4443 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4445 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4446 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4447 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4448 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4449 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4451 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
4452 * pthread_mutex_timedlock.c: Likewise.
4453 * pthread_mutex_trylock.c: Adjust __nusers.
4454 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
4455 * tst-mutex9.c: New file.
4456 * Makefile (tests): Add tst-mutex9.
4457 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
4458 * sysdeps/ia64/tls.h: Likewise.
4459 * sysdeps/powerpc/tls.h: Likewise.
4460 * sysdeps/s390/tls.h: Likewise.
4461 * sysdeps/sh/tls.h: Likewise.
4462 * sysdeps/x86_64/tls.h: Likewise.
4463 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4464 Change type of __owner.
4465 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4466 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4467 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4468 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4469 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4471 2003-06-19 Jakub Jelinek <jakub@redhat.com>
4473 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
4474 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
4476 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
4477 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
4478 instead of nr to lll_futex_wake. Only set errno and return -1
4481 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
4482 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4483 return actual return value from the syscall, not 0.
4485 2003-06-18 Ulrich Drepper <drepper@redhat.com>
4487 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
4488 find a random value.
4489 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
4492 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
4493 compat_timer_settime.
4494 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
4495 compat_timer_gettime.
4496 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4497 compat_timer_getoverrun.
4498 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4499 compat_timer_delete.
4501 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4502 error-checking mutex detect busy mutexes.
4504 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4506 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4507 Add ax to clobber list.
4508 (lll_mutex_cond_lock): Likewise.
4509 (lll_mutex_unlock): Likewise.
4510 (lll_lock): Likewise.
4511 (lll_unlock): Likewise.
4513 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4514 * tst-cancel18.c: New file.
4515 * tst-cancelx18.c: New file.
4517 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4520 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4521 * tst-cancel17.c: New file.
4522 * tst-cancelx17.c: New file.
4524 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4525 * sysdeps/unix/sysv/linux/sigwait.c: New file.
4526 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4528 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4530 2003-06-16 Jakub Jelinek <jakub@redhat.com>
4532 * sysdeps/pthread/createthread.c (create_thread): Set
4533 header.multiple_threads unconditionally.
4534 * allocatestack.c (allocate_stack): Likewise.
4535 * descr.h (struct pthread): Add header.multiple_threads
4537 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4538 Define for librt. #error if neither libpthread, libc nor librt.
4539 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4541 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4542 CDISABLE): Likewise.
4543 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4544 CDISABLE): Likewise.
4545 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4546 CDISABLE): Likewise.
4547 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4548 CDISABLE): Likewise. Access header.multiple_threads outside of
4549 libc and libpthread.
4550 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4552 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4553 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4555 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4557 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4558 Also test early cancellation before the thread reaches the cancellation
4561 * Makefile: Compile forward.c with exceptions.
4563 * sysdeps/unix/sysv/linux/sleep.c: New file.
4565 2003-06-16 Ulrich Drepper <drepper@redhat.com>
4567 * Makefile: Add CFLAGS definition to compile function wrappers
4568 duplicated from libc with exceptions.
4569 * tst-cancel4.c: Also check cancellation handlers.
4571 * Makefile: Add rules to build and run tst-cancel16 and
4572 tst-cancelx16. Add missing CFLAGS definitions.
4573 * tst-cancel16.c: New file.
4574 * tst-cancelx16.c: New file.
4576 2003-06-15 Ulrich Drepper <drepper@redhat.com>
4578 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4579 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4580 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4581 (DL_SYSINFO_IMPLEMENTATION): Likewise.
4583 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4584 (LIBC_CANCEL_RESET): Likewise.
4585 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4586 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4588 (CFLAGS-libcrt-cancellation.c): Define.
4589 * sysdeps/pthread/librt-cancellation.c: New file.
4590 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4591 macros also when compiling librt.
4592 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4593 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4594 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4595 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4596 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4597 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4598 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4600 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4601 compat_timer_create.
4603 2003-06-14 Ulrich Drepper <drepper@redhat.com>
4605 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4607 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4609 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4610 Add libc_hidden_def.
4612 2003-06-13 Roland McGrath <roland@redhat.com>
4614 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4615 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4617 2003-06-11 Ulrich Drepper <drepper@redhat.com>
4619 * allocatestack.c (queue_stack): Always inline.
4620 * ptreadhP.h (__do_cancel): Likewise.
4622 2003-06-10 Jakub Jelinek <jakub@redhat.com>
4624 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4627 2003-06-10 Ulrich Drepper <drepper@redhat.com>
4629 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4630 (__pthread_cond_signal): Remove incorrect second addition for
4633 2003-06-09 Ulrich Drepper <drepper@redhat.com>
4635 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4636 (__pthread_cond_signal): Use correct futex pointer in
4637 __lll_mutex_lock_wait call.
4639 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4640 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4642 2003-06-08 Ulrich Drepper <drepper@redhat.com>
4644 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4646 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4649 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4650 hand-written CFI generation code. Since ENTRY/END also initiated
4651 CFI frames this caused two CFI sets to be generated.
4653 2003-06-07 Ulrich Drepper <drepper@redhat.com>
4655 * cleanup_routine.c: New file.
4656 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4657 * sysdeps/pthread/pthread.h: Add support for fully exception-based
4659 * Makefile (libpthread-routines): Add cleanup_routine.
4660 Add more CFLAGS variables to compile with exceptions. Add comments
4661 why which file needs unwind tables.
4662 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4664 * tst-cancelx1.c: New file.
4665 * tst-cancelx2.c: New file.
4666 * tst-cancelx3.c: New file.
4667 * tst-cancelx4.c: New file.
4668 * tst-cancelx5.c: New file.
4669 * tst-cancelx6.c: New file.
4670 * tst-cancelx7.c: New file.
4671 * tst-cancelx8.c: New file.
4672 * tst-cancelx9.c: New file.
4673 * tst-cancelx10.c: New file.
4674 * tst-cancelx11.c: New file.
4675 * tst-cancelx12.c: New file.
4676 * tst-cancelx13.c: New file.
4677 * tst-cancelx14.c: New file.
4678 * tst-cancelx15.c: New file.
4679 * tst-cleanupx0.c: New file.
4680 * tst-cleanupx0.expect: New file.
4681 * tst-cleanupx1.c: New file.
4682 * tst-cleanupx2.c: New file.
4683 * tst-cleanupx3.c: New file.
4685 * tst-cleanup0.c: Make standard compliant.
4686 * tst-cleanup1.c: Likewise.
4688 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4689 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4690 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4691 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4692 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4693 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4694 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4696 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4697 * tst-cancel12.c: New file.
4698 * tst-cancel13.c: New file.
4699 * tst-cancel14.c: New file.
4700 * tst-cancel15.c: New file.
4701 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4704 * tst-cancel1.c: Add some comments.
4706 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4709 2003-06-06 Ulrich Drepper <drepper@redhat.com>
4711 * Makefile (CFLAGS-pthread_cancel.c): Define.
4713 2003-06-05 Ulrich Drepper <drepper@redhat.com>
4715 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4716 Change type of __writer element to int.
4717 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4718 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4719 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4720 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4721 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4722 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4723 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4724 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4725 Compare with TID to determine deadlocks.
4726 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4727 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4728 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4729 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4730 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4731 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4733 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4735 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4736 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4737 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4739 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4741 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4742 * Makefile (tests): Add tst-rwlock12.
4743 * tst-rwlock12.c: New file.
4745 2003-06-05 Jakub Jelinek <jakub@redhat.com>
4747 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4748 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4749 Remove bogus hidden_proto.
4750 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4752 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4753 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4754 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4755 ___lll_mutex_timedlock): Likewise.
4757 2003-06-04 Ulrich Drepper <drepper@redhat.com>
4759 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4760 (__pthread_cond_signal): Add some code to eventually handle
4763 2003-06-01 Ulrich Drepper <drepper@redhat.com>
4765 * Makefile (tests): Add tst-exec4.
4766 (tst-exec4-ARGS): Define.
4767 * tst-exec4.c: New file.
4769 2003-05-31 Ulrich Drepper <drepper@redhat.com>
4771 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4772 Also fail if tv_nsec < 0.
4773 (__lll_timedwait_tid): Likewise.
4774 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4775 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4777 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4779 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4781 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4783 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4785 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4788 * Makefile (tests): Add tst-sem8 and tst-sem9.
4789 * tst-sem8.c: New file.
4790 * tst-sem9.c: New file.
4791 * sem_open.c: Fix creation of in_use record if the file exists but
4794 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4797 * sysdeps/pthread/timer_create.c (timer_create): In case
4798 evp==NULL, assign timer ID to sival_ptr.
4800 * descr.h (struct pthread_unwind_buf): Change type of prev element to
4801 struct pthread_unwind_buf *.
4802 (struct pthread): Likewise for cleanup_jmp_buf element.
4804 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4805 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4806 * unwind.c (__pthread_unwind_next): Likewise.
4808 2003-05-30 Ulrich Drepper <drepper@redhat.com>
4810 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4811 (lll_futex_timed_wait): Use int for futex value parameter.
4812 (lll_futex_wake): Likewise.
4813 (lll_futex_requeue): Likewise.
4815 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4816 Replace one memory operation with one register operation.
4818 * tst-join4.c (do_test): Fix error message.
4820 * tst-rwlock6.c (do_test): Use correct format specifier.
4822 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4823 (__lll_mutex_lock_wait): Replace one memory operation with one
4825 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4826 (__lll_mutex_lock_wait): Likewise.
4828 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4829 (__lll_mutex_cond_lock): Add one to value parameter of
4830 __lll_lock_wait to reflect reality in the futex syscall.
4831 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4832 (lll_mutex_cond_lock): Likewise.
4834 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4836 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4838 (lll_mutex_cond_lock): Define.
4840 2003-05-29 Ulrich Drepper <drepper@redhat.com>
4842 * Makefile (tests): Add tst-signal6.
4843 * tst-signal6.c: New file.
4845 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4846 (__lll_mutex_unlock_force): New function
4847 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4849 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4850 (__lll_mutex_unlock_force): New function.
4851 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4853 * tst-rwlock7.c (do_test): Use correct format specifier.
4855 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4856 Find break parameter in correct asm argument.
4858 2003-05-27 Jakub Jelinek <jakub@redhat.com>
4860 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4862 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4864 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4866 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4867 lll_futex_requeue, lll_mutex_unlock_force): Define.
4869 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4871 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4872 (pthread_cond_t): Add __mutex.
4873 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4874 lll_futex_requeue, lll_mutex_unlock_force): Define.
4876 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4878 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4879 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4881 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4883 (lll_futex_wait, lll_futex_wake): Define.
4884 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4885 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4886 FUTEX_REQUEUE instead of FUTEX_WAIT.
4887 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4888 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4889 mutex which was used in condvar structure. Call
4890 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4891 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4893 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4894 include tcb-offsets.h. Read wakeup value in locked region.
4895 Use the value of gbr register as THREAD_ID.
4896 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4897 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4898 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4900 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4903 2003-05-28 Ulrich Drepper <drepper@redhat.com>
4905 * sysdeps/pthread/pthread_cond_broadcast.c
4906 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4908 2003-05-26 Ulrich Drepper <drepper@redhat.com>
4910 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4911 typo in register name.
4912 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4913 correctly. Actually use requeue. Little optimization.
4914 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4915 mutex address early. Handle cancellation state as 32-bit value.
4916 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4917 Remove unnecessary label.
4919 2003-05-25 Ulrich Drepper <drepper@redhat.com>
4921 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4922 instead of FUTEX_WAIT.
4923 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4924 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4925 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4926 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4927 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4928 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
4929 used in condvar structure. Call __pthread_mutex_cond_lock instead
4930 of __pthread_mutex_lock_internal.
4931 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4932 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4933 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4934 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
4935 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4936 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4937 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
4938 Add pthread_mutex_cond_lock.
4939 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
4940 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
4941 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
4942 lll_mutex_cond_lock.
4943 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4944 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4945 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4947 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4948 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4950 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
4951 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4953 * pthreadP.h: Declare __pthread_mutex_cond_lock.
4954 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
4955 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
4956 macro don't define aliases.
4958 * cancellation.c: Remove __pthread_enable_asynccancel_2.
4959 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
4960 * sysdeps/pthread/pthread_cond_timedwait.c: Use
4961 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
4962 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4964 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4965 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4966 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4968 2003-05-17 Ulrich Drepper <drepper@redhat.com>
4970 * sem_open.c: Fix one endless loop. Implement correct semantics
4971 wrt opening the same semaphore more then once.
4972 * sem_close.c: Adjust for sem_open change.
4973 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
4974 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
4975 * Makefile (tests): Add tst-sem7.
4976 * tst-sem7.c: New file.
4978 2003-05-16 Roland McGrath <roland@redhat.com>
4980 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
4981 uninitialized variable braino.
4983 2003-05-16 Ulrich Drepper <drepper@redhat.com>
4985 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
4986 test for syscall availability.
4988 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
4989 __no_posix_timers to -1 if the syscalls don't exist.
4991 * pthread_join.c (pthread_join): Set tid field of the joined
4992 thread to -1. This isn't necessary but helps to recognize some
4993 error conditions with almost no cost.
4995 * allocatestack.c (FREE_P): Also negative values indicate an
4998 * unwind.c: Include <unistd.h>.
5000 2003-05-14 Ulrich Drepper <drepper@redhat.com>
5002 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
5004 2003-05-14 Jakub Jelinek <jakub@redhat.com>
5006 * Makefile (crti-objs, crtn-objs): New variables.
5007 (omit-deps, extra-objs): Add crtn.
5008 ($(objpfx)libpthread.so): Depend on both crti and crtn
5009 and links to them in multidir.
5010 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
5012 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
5014 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5015 (lll_mutex_unlock): Use atomic_exchange_rel.
5017 2003-05-11 Ulrich Drepper <drepper@redhat.com>
5019 * cond-perf.c (cons): Add missing locking around setting of alldone.
5021 2003-05-10 Ulrich Drepper <drepper@redhat.com>
5023 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
5025 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5027 2003-05-09 Ulrich Drepper <drepper@redhat.com>
5029 * tst-sem6.c: New file.
5030 * Makefile (tests): Add tst-sem6.
5032 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
5033 Use atomic_exchange_rel instead of atomic_exchange.
5034 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
5037 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
5038 code for lll_futex_wait and lll_futex_wake in static apps. Use
5039 vsyscall is possible.
5041 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
5042 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
5043 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
5044 pthread_setaffinity_np.
5045 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
5046 and pthread_setaffinity_np.
5047 * Makefile (libpthread-routines): Add pthread_getaffinity and
5048 pthread_setaffinity.
5050 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
5051 use it in case mmap to allocate the stack fails.
5052 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
5053 ARCH_MAP_FLAGS here.
5054 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
5057 2003-05-08 Ulrich Drepper <drepper@redhat.com>
5059 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
5060 handler implementation. It is now lockless in fork().
5061 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5062 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5063 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
5064 declare the __fork_*_lists.
5065 (struct fork_handler): Include pointers to all three functions.
5066 Add next, refcntr and need_signal elements.
5067 (__fork_handlers): New declaration.
5068 (__register_atfork_malloc): Remove declaration.
5069 (HAVE_register_atfork_malloc): Remove definition.
5070 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
5071 __pthread_child_handler variable.
5072 (__libc_pthread_init): Use __register_atfork instead of explicitly
5074 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
5076 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5078 * unwind.c (unwind_cleanup): Print error message and then abort. This
5079 function must never be reached.
5081 * cond-perf.c: New file.
5083 2003-05-05 Ulrich Drepper <drepper@redhat.com>
5085 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
5087 2003-05-04 Roland McGrath <roland@redhat.com>
5089 * Makefile ($(objpfx)../libc.so): New target.
5091 2003-05-02 Ulrich Drepper <drepper@redhat.com>
5093 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5094 (pthread_condattr_t): Size is only an int, don't use long for
5096 (pthread_mutexattr_t): Likewise.
5097 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5098 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5099 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5101 2003-05-01 Ulrich Drepper <drepper@redhat.com>
5103 * sysdeps/i386/tls.h: Define THREAD_ID.
5104 * sysdeps/ia64/tls.h: Likewise.
5105 * sysdeps/powerpc/tls.h: Likewise.
5106 * sysdeps/s390/tls.h: Likewise.
5107 * sysdeps/sh/tls.h: Likewise.
5108 * sysdeps/x86_64/tls.h: Likewise.
5109 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
5111 * pthread_mutex_timedlock.c: Likewise.
5112 * pthread_mutex_trylock.c: Likewise.
5113 * pthread_mutex_unlock.c: Likewise.
5114 * pthread_rwlock_trywrlock.c: Likewise.
5115 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
5116 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
5117 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5118 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
5120 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
5123 2003-04-29 Jakub Jelinek <jakub@redhat.com>
5125 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5126 (__SIZEOF_PTHREAD_COND_T): Define to 48.
5127 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
5128 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5129 Make __align long long instead of long.
5130 (pthread_rwlock_t): Formatting.
5131 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5132 (pthread_rwlock_t): Formatting.
5133 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5134 (pthread_cond_t): Make __align long long instead of long.
5135 (pthread_rwlock_t): Move __flags field to the same position as in
5138 2003-04-30 Ulrich Drepper <drepper@redhat.com>
5140 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
5141 * tst-rwlock7.c (do_test): Likewise.
5143 2003-04-26 Roland McGrath <roland@redhat.com>
5145 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
5147 2003-04-22 Jakub Jelinek <jakub@redhat.com>
5149 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
5150 sizeof (struct pthread).
5151 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
5153 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
5155 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
5157 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
5159 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
5161 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
5163 (NO_TLS_OFFSET): Define.
5164 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
5165 add TLS_TCB_SIZE unnecessarily.
5167 2003-04-22 Roland McGrath <roland@redhat.com>
5169 * Makeconfig (shared-thread-library): Reverse link order to work
5172 2003-04-22 Ulrich Drepper <drepper@redhat.com>
5174 * semaphore.h: Fix typo in comment.
5176 2003-04-21 Ulrich Drepper <drepper@redhat.com>
5178 * sysdeps/pthread/sigfillset.c: New file.
5180 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
5181 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
5182 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
5183 * sysdeps/pthread/sigaction.c: Likewise.
5184 * sysdeps/pthread/sigprocmask.c: New file.
5185 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
5187 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5188 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
5191 2003-04-19 Ulrich Drepper <drepper@redhat.com>
5193 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5194 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
5196 * sysdeps/unix/sysv/linux/unregister-atfork.c
5197 (__unregister_atfork): Don't free memory not allocated dynamically.
5199 * semaphore.h: Remove __THROW marker from cancellation points.
5200 * nptl/sysdeps/pthread/pthread.h: Likewise.
5202 2003-04-18 Ulrich Drepper <drepper@redhat.com>
5204 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
5205 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
5208 2003-04-16 Jakub Jelinek <jakub@redhat.com>
5210 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
5212 2003-04-15 Roland McGrath <roland@redhat.com>
5214 * forward.c (__pthread_unwind): Tweak to avoid warning.
5216 2003-04-15 Ulrich Drepper <drepper@redhat.com>
5218 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
5220 2003-04-14 Ulrich Drepper <drepper@redhat.com>
5222 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
5223 overflow CFA advance instructions.
5224 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5226 2003-04-14 Jakub Jelinek <jakub@redhat.com>
5228 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
5229 * sysdeps/i386/pthread_spin_lock.c: Likewise.
5230 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
5233 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
5234 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
5235 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
5236 DW_CFA_advance_loc for .Laddl-.Lsubl.
5238 2003-04-13 Ulrich Drepper <drepper@redhat.com>
5240 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
5241 position-independent unwind data for static libraries.
5242 Add missing unwind info. Add comments.
5244 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
5245 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5246 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5247 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5249 2003-04-12 Ulrich Drepper <drepper@redhat.com>
5251 * Makefile: Make sure all cancellation points are compiled with
5252 exception and asynchronous unwind tables.
5254 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
5255 which mishandles loading of global object addresses in PIC.
5256 (THREAD_SETMEM_NC): Likewise.
5258 2003-04-11 Ulrich Drepper <drepper@redhat.com>
5260 * pthread.h: Define new data structure for cleanup buffer. Declare
5261 new cleanup handler interfaces.
5262 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
5263 (struct pthread): Add cleanup_jmp_buf pointer. Define
5264 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
5265 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
5266 it. Declare old cleanup handler installation functions.
5267 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
5269 * cleanup_defer.c: Likewise.
5270 * cleanup_compat.c: New file. Old cleanup code.
5271 * cleanup_def_compat.c: New file. Old cleanup code.
5272 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
5273 if own thread descriptor.
5274 * unwind.c: New file.
5275 * forward.c: Add __pthread_unwind.
5276 * init.c (pthread_functions): Add __pthread_unwind.
5277 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
5278 Add ptr___pthread_unwind.
5279 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
5280 and unwind function.
5281 * Makefile (libpthread-routines): Add cleanup_compat,
5282 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
5283 table generation if necessary.
5284 * version.c: Record whether unwind support is compiled in.
5285 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
5286 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
5288 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
5289 complication to generate unwind information for syscall wrappers.
5290 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5291 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5292 __cleanup_fct_attribute.
5294 * Makefile: Add rules to build and run tst-cleanup0.
5295 * tst-cleanup0.c: New file.
5296 * tst-cleanup0.expect: New file.
5298 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
5299 caller. Optimize to avoid often unecessary local variable.
5301 2003-04-11 Roland McGrath <roland@redhat.com>
5303 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
5304 sets variable `multidir'; include that.
5305 (generated): Add it.
5306 ($(objpfx)$(multidir)/crti.o): New target.
5307 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
5309 2003-04-11 Ulrich Drepper <drepper@redhat.com>
5311 * tst-attr2.c (do_test): Add cast to avoid warning.
5312 * tst-mutex4.c (do_test): Likewise.
5314 2003-04-10 Ulrich Drepper <drepper@redhat.com>
5316 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
5319 2003-04-09 Ulrich Drepper <drepper@redhat.com>
5321 * Makefile (tests): Add tst-detach1.
5322 * tst-detach1.c: New file.
5324 2003-04-08 Ulrich Drepper <drepper@redhat.com>
5326 * sysdeps/pthread/pthread.h: Remove duplicate
5327 pthread_cleanup_{push,pop} definitions.
5329 * tst-barrier2.c: Eliminate warnings.
5330 * tst-cancel4.c: Likewise.
5331 * tst-cond4.c: Likewise.
5332 * tst-cond6.c: Likewise.
5333 * tst-detach1.c: Likewise.
5334 * tst-rwlock4.c: Likewise.
5335 * tst-rwlock6.c: Likewise.
5336 * tst-rwlock7.c: Likewise.
5337 * tst-sem3.c: Likewise.
5338 * tst-spin2.c: Likewise.
5339 * tst-umask1.c: Likewise.
5341 2003-04-07 Ulrich Drepper <drepper@redhat.com>
5343 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
5345 2003-04-06 Ulrich Drepper <drepper@redhat.com>
5347 * descr.h (struct pthread): Move cancelhandling member to the front.
5349 2003-04-05 Ulrich Drepper <drepper@redhat.com>
5351 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
5352 malloc_parent, and malloc_child statically.
5353 (__register_atfork_malloc): New function.
5354 (free_mem): Don't free any of the malloc_* variables on the list.
5355 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
5356 Define HAVE_register_atfork_malloc.
5358 2003-04-04 Ulrich Drepper <drepper@redhat.com>
5360 * sysdeps/pthread/createthread.c (create_thread): Add some more
5361 comments explaining when to set multiple_threads and when not.
5363 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5364 THREAD_ATOMIC_BIT_SET if not already defined.
5365 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5366 THREAD_ATOMIC_BIT_SET:
5367 * sysdeps/x86_64/tls.h: Likewise.
5368 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
5369 THREAD_ATOMIC_CMPXCHG_VAL.
5370 (_pthread_cleanup_pop_restore): Likewise.
5371 * cancellation.c (__pthread_enable_asynccancel): Likewise.
5372 (__pthread_enable_asynccancel_2): Likewise.
5373 (__pthread_disable_asynccancel): Likewise.
5374 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5375 (__libc_disable_asynccancel): Likewise.
5376 * init.c (sigcancel_handler): Likewise.
5377 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
5378 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
5380 2003-04-03 Ulrich Drepper <drepper@redhat.com>
5382 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
5383 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5384 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
5385 * Makefile (tests): Add tst-cancel11.
5386 * tst-cancel11.c: New file.
5388 2003-04-01 Ulrich Drepper <drepper@redhat.com>
5390 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
5391 round, not the first. Use specific_used flag instead of local
5392 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
5393 (__free_tcb): Don't call deallocate_tsd here.
5394 (start_thread): Call deallocate_tsd here.
5395 * pthread_setspecific.c: Set specific_used flag really only when
5397 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
5398 * tst-tsd3.c: New file.
5399 * tst-tsd4.c: New file.
5401 2003-03-31 Ulrich Drepper <drepper@redhat.com>
5403 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
5404 Use atomic_exchange_and_add instead of __lll_add.
5405 (__lll_mutex_timedlock): Likewise.
5406 Patch by Ian Wienand.
5408 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
5410 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5411 (SINGLE_THREAD_P): Fix typo.
5412 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
5414 2003-03-31 Ulrich Drepper <drepper@redhat.com>
5416 * Makefile (tests): Add tst-align.
5417 * tst-align.c: New file.
5418 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
5420 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
5423 * tst-tsd2.c: Add casts to avoid warnings.
5425 2003-03-30 Ulrich Drepper <drepper@redhat.com>
5427 * descr.h (struct pthread): Move most often used elements to the front.
5429 2003-03-29 Ulrich Drepper <drepper@redhat.com>
5431 * Makefile (libpthread-routines): Add pthread_atfork.
5432 (libpthread-static-only-routines): Add pthread_atfork.
5434 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5436 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
5438 (INSTALL_DTV): Add parens.
5439 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
5440 Use passed descr instead of THREAD_SELF.
5441 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
5442 (__lll_mutex_timedlock_wait): Correct expected value after
5444 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
5445 Release lock before waking up the waiters.
5446 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
5447 criteria. Reorderstruct passed to cleanup handler. Fix
5448 handling of cancellation and failung pthread_mutex_unlock call.
5449 Use __pthread_enable_asynccancel_2 instead of
5450 __pthread_enable_asynccancel.
5451 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5452 Return result of lock re-get if it fails.
5453 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
5454 for __pthread_cleanup_push.
5455 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
5456 completely broken rwlock implementation.
5457 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5458 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5459 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5460 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5461 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5462 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
5463 versioned_symbol macro.
5464 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
5465 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5467 2003-03-27 Ulrich Drepper <drepper@redhat.com>
5469 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
5470 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
5472 (struct timer): Remove th and bar field.
5473 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
5474 debugging code. Create only one helper thread.
5475 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
5477 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5478 Renamed. Define statically. Use thread info from siginfo.
5479 (__helper_once): New variable.
5480 (__helper_tid): New variable.
5481 (__reset_helper_control): New function.
5482 (__start_helper_thread): New function.
5484 * pthread_create.c (start_thread): Don't use setjmp inside
5485 __builtin_expect to work around gcc bug.
5487 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
5488 timer_delete syscall fails, but not with ENOSYS, set
5491 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
5492 (timer_settime): Fix typo.
5493 * sysdeps/unix/sysv/linux/timer_getoverr.c
5494 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5496 2003-03-27 Jakub Jelinek <jakub@redhat.com>
5498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5499 offset of cleanupbuf.__prev.
5501 2003-03-26 Jakub Jelinek <jakub@redhat.com>
5503 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5506 2003-03-26 Ulrich Drepper <drepper@redhat.com>
5508 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5509 NULL provide default definition to syscall.
5511 2003-03-25 Roland McGrath <roland@redhat.com>
5513 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5514 (timer_id2ptr): Fix typo.
5516 2003-03-25 Ulrich Drepper <drepper@redhat.com>
5518 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5519 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5520 * sysdeps/ia64/pthreaddef.h: Likewise.
5521 * sysdeps/powerpc/pthreaddef.h: Likewise.
5522 * sysdeps/s390/pthreaddef.h: Likewise.
5523 * sysdeps/sh/pthreaddef.h: Likewise.
5524 * sysdeps/x86_64/pthreaddef.h: Likewise.
5525 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5526 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5528 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5529 SIGTIMER is not unblocked.
5530 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5532 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5534 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5535 pass pointer through as ID.
5536 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5537 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5538 * sysdeps/unix/sysv/linux/timer_create.c: New file.
5539 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5540 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5541 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5542 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5543 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5544 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5545 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5546 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5547 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5548 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5549 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5550 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5551 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5552 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5553 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5554 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5555 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5556 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5557 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5558 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5559 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5560 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5561 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5562 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5563 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5564 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5565 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5566 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5567 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5568 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5570 * pthreadP.h: Remove FRAME_LEFT definition.
5571 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5572 already left frame. Programs which have this problem are not POSIX
5574 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5576 2003-03-24 Ulrich Drepper <drepper@redhat.com>
5578 * sysdeps/pthread/tst-timer.c: Check return values of the
5581 2003-03-23 Roland McGrath <roland@redhat.com>
5583 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5584 * tst-tls3mod.c: Likewise.
5585 * tst-tls1.c: Likewise.
5586 * tst-tls2.c: Likewise.
5588 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5591 * tst-join5.c (tf1, tf2): Add a cast.
5593 * Makeconfig (includes): Append -I$(..)nptl to this variable.
5595 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5596 Don't test anything.
5597 * tst-cond4.c: Likewise.
5598 * tst-cond6.c: Likewise.
5599 * tst-flock2.c: Likewise.
5600 * tst-mutex4.c: Likewise.
5601 * tst-rwlock4.c: Likewise.
5602 * tst-signal1.c: Likewise.
5603 * tst-spin2.c: Likewise.
5604 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5606 * tst-mutex4.c: Use test-skeleton.c.
5607 * tst-spin2.c: Likewise.
5608 * tst-sysconf.c: Likewise.
5609 * tst-barrier2.c: Likewise.
5610 * tst-cond4.c: Likewise.
5611 * tst-cond6.c: Likewise.
5612 * tst-rwlock4.c: Likewise.
5613 * tst-unload.c: Likewise.
5614 * tst-flock2.c (do_test): Use return instead of exit.
5616 2003-03-22 Jakub Jelinek <jakub@redhat.com>
5618 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5620 2003-03-21 Ulrich Drepper <drepper@redhat.com>
5622 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5623 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5624 instead of __lll_compare_and_swap.
5625 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5627 Removed definition if __lll_compare_and_swap.
5629 * cancellation.c: Adjust for new form of compare&exchange macros.
5630 * cleanup_defer.c: Likewise.
5632 * libc-cancellation.c: Likewise.
5633 * old_pthread_cond_broadcast.c: Likewise.
5634 * old_pthread_cond_signal.c: Likewise.
5635 * old_pthread_cond_timedwait.c: Likewise.
5636 * old_pthread_cond_wait.c: Likewise.
5637 * pthread_cancel.c: Likewise.
5638 * pthread_create.c: Likewise.
5639 * pthread_detach.c: Likewise.
5640 * pthread_join.c: Likewise.
5641 * pthread_key_delete.c: Likewise.
5642 * pthread_setcancelstate.c: Likewise.
5643 * pthread_setcanceltype.c: Likewise.
5644 * pthread_timedjoin.c: Likewise.
5645 * pthread_tryjoin.c: Likewise.
5646 * sysdeps/pthread/createthread.c: Likewise.
5648 2003-03-20 Ulrich Drepper <drepper@redhat.com>
5650 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5651 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5652 definitions. Replace uses with calls to atomic_* functions.
5653 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5654 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5655 __lll_test_and_set calls with atomic_exchange_and_add and
5656 atomic_exchange calls respectively.
5657 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5658 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5659 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5660 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5661 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5662 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5663 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5665 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5666 returns the old value.
5668 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
5670 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5671 int for variable OLDVAL and correct inline assembler contraint.
5672 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5673 type int for variable OLD.
5675 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5677 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5678 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5679 instead of multiple_threads field in the TCB.
5681 2003-03-19 Ulrich Drepper <drepper@redhat.com>
5683 * sysdeps/i386/i686/bits/atomic.h: Removed.
5684 * sysdeps/i386/i586/bits/atomic.h: Removed.
5685 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
5686 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
5687 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
5688 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
5689 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
5690 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
5691 * atomic.h: Removed. Moved to glibc.
5693 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5694 support for clock selection.
5696 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5699 2003-03-18 Roland McGrath <roland@redhat.com>
5701 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5702 Add __lll_rel_instr first. Add memory clobber.
5703 (lll_mutex_unlock): Use __lll_test_and_set.
5704 From Paul Mackerras <paulus@samba.org>.
5706 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5708 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5709 (SINGLE_THREAD_P): Add `header.' prefix.
5710 From Paul Mackerras <paulus@samba.org>.
5712 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5713 pthread_timedjoin_np to ...
5714 (libpthread: GLIBC_2.3.3): ... here.
5715 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5717 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5718 Avoid shadowing VAL variable.
5720 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5723 2003-03-18 Ulrich Drepper <drepper@redhat.com>
5725 * Makefile (tests): Add tst-cond11.
5726 * tst-cond11.c: New file.
5728 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5729 struct passed to cleanup handler to eliminate one more
5731 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5733 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5734 (pthrad_cond_t): Replace __unused field with __clock.
5736 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5737 waken all waiters in cleanup handler.
5738 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5739 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5741 * pthread_condattr_getclock.c: New file.
5742 * pthread_condattr_setclock.c: New file.
5743 * sysdeps/pthread/pthread.h: Declare these new functions.
5744 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5745 * Makefile (libpthread-routines): Add the new functions.
5746 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5747 Renamed field to value. Document use of the bits.
5748 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5750 * pthread_condattr_setpshared.c: Likewise.
5751 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5752 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5753 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5755 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5756 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5757 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5758 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5759 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5760 Implement clock selection.
5761 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5762 * pthread-errnos.sym: Add ENOSYS.
5763 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5764 _POSIX_CLOCK_SELECTION.
5765 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5767 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5768 invalid .size directive.
5770 2003-03-17 Roland McGrath <roland@redhat.com>
5772 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5775 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5777 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5778 Use __lll_add instead of spelling it out. Use protected symbol names.
5779 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5781 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5782 Renamed from lll_compare_and_swap. Use new name where necessary.
5783 (__lll_add): Defined.
5784 (__lll_dec_if_positive): Defined.
5785 (__lll_test_and_set): Defined.
5786 * sysdeps/ia64/pthread_spin_init.c: Removed.
5787 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5788 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5789 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5790 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5791 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5792 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5793 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5794 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5795 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5796 __sync_lock_release_si.
5797 Patch by Jakub Jelinek.
5799 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5800 Fix timeout handling.
5801 (__lll_timedwait_tid): Likewise.
5802 (lll_unlock_wake_cb): Wake up other waiters if necessary.
5803 Patch by Jakub Jelinek.
5805 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5807 2003-03-17 Roland McGrath <roland@redhat.com>
5809 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5810 * sysdeps/pthread/pthread_spin_init.c: New file.
5811 * sysdeps/pthread/pthread_spin_unlock.c: New file.
5812 * sysdeps/powerpc/Makefile: New file.
5813 * sysdeps/powerpc/pthread_spin_lock.c: New file.
5814 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5815 * sysdeps/powerpc/pthreaddef.h: New file.
5816 * sysdeps/powerpc/tcb-offsets.sym: New file.
5817 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5818 * sysdeps/powerpc/tls.h: New file.
5819 * sysdeps/powerpc/bits/atomic.h: New file.
5820 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5821 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5822 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5824 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5825 * sysdeps/unix/sysv/linux/sem_post.c: New file.
5826 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5827 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5828 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5829 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5830 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5831 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5832 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5833 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5834 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5835 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5836 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5837 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5838 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5840 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5842 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5843 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5844 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5845 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5846 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5848 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5850 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5851 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5852 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5853 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5854 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5856 2003-03-16 Roland McGrath <roland@redhat.com>
5858 * tst-fork4.c: Include <string.h>.
5859 * tst-signal2.c: Likewise.
5860 * tst-mutex5.c (do_test): exit -> return.
5861 * tst-mutex2.c: Include <stdlib.h>.
5863 2003-03-16 Ulrich Drepper <drepper@redhat.com>
5865 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5866 (__lll_mutex_timedlock_wait): Correct expected value after
5867 spurious wakeup. Otherwise we would never wait again.
5869 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5870 zone versus inline asm stupidity. Use correct instructions.
5872 * tst-rwlock6.c: Add some more status output.
5874 2003-03-15 Roland McGrath <roland@redhat.com>
5876 * sysdeps/pthread/configure.in: New file.
5877 * sysdeps/pthread/configure: New file (generated).
5879 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5881 * allocatestack.c (allocate_stack): Store the exact stack size of
5882 user allocated stacks.
5884 2003-03-15 Jakub Jelinek <jakub@redhat.com>
5886 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5887 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5888 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5889 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5890 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5891 Use `header.' prefix.
5892 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5894 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5896 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5897 __builtin_frame_address, use stack pointer.
5899 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5900 instead of __builtin_frame_pointer.
5902 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5904 * tst-basic1.c (do_test): Add cast to avoid warning.
5905 * tst-basic2.c (do_test): Likewise.
5907 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5908 amount of stack correction.
5910 * tst-fork4.c: Use test-skeleton.c.
5912 2003-03-14 Roland McGrath <roland@redhat.com>
5914 * init.c: Fix typo "#eli" for "#else".
5916 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
5918 * allocatestack.c (__stack_user): Use hidden_data_def.
5919 * pthread_create.c (__pthread_keys): Likewise.
5921 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5923 2003-03-14 Roland McGrath <roland@redhat.com>
5925 * tst-fork4.c: New file.
5926 * Makefile (tests): Add it.
5928 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
5929 we always define the padding space.
5930 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
5931 stopped supporting its own extensions fully.
5932 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
5933 struct also called `header', so `header.multiple_threads' is the field
5934 name to use on all machines.
5935 * allocatestack.c (allocate_stack): Use `header.' prefix.
5936 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5937 * pthread_create.c (__pthread_create_2_1): Likewise.
5938 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
5939 (THREAD_SELF): Likewise.
5940 * sysdeps/x86_64/tls.h: Likewise.
5941 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5942 (SINGLE_THREAD_P): Likewise.
5943 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5944 (SINGLE_THREAD_P): Likewise.
5945 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5946 (SINGLE_THREAD_P): Likewise.
5948 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
5951 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5953 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
5954 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
5956 * pthread_create.c (start_thread): setjmp is expected to return 0.
5958 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
5959 (THREAD_GETMEM_NC): Likewise.
5961 2003-03-13 Ulrich Drepper <drepper@redhat.com>
5963 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
5964 and the size of the stack which must be allocated is a multiple,
5965 allocate one more page.
5966 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
5967 MULTI_PAGE_ALIASING.
5969 2003-03-13 Roland McGrath <roland@redhat.com>
5971 * pthread_create.c (start_thread): Set EXITING_BIT after the
5972 event-reporting (and destructors), not before.
5974 2003-03-13 Jakub Jelinek <jakub@redhat.com>
5976 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
5977 lll_futex_wake): Declare register variables as long int instead of
5978 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
5979 Make syscall arguments clobbered by the syscall.
5980 (lll_futex_wait): Define using lll_futex_timed_wait.
5982 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
5985 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
5988 * allocatestack.c (nptl_ncreated): Only declare if
5989 COLORING_INCREMENT != 0.
5991 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
5992 (__libc_enable_asynccancel_2): Remove prototype.
5994 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
5995 ctid to match kernel.
5997 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5999 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
6000 libc_multiple_threads.
6001 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
6002 __libc_multiple_threads to...
6003 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
6005 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
6007 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6008 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6010 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
6011 (__pthread_once_internal): Define.
6013 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
6014 macros instead of .symver directly.
6015 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
6016 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6018 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
6019 * sysdeps/x86_64/tcb-offsets.sym: New file.
6020 * sysdeps/x86_64/Makefile: New file.
6022 * sysdeps/i386/tcb-offsets.sym: Add SELF.
6023 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
6024 to access own pthread_t in TCB.
6025 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6027 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6029 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6031 2003-03-12 Roland McGrath <roland@redhat.com>
6033 * pthread-errnos.sym: New file.
6034 * Makefile (gen-as-const-headers): New variable, list that file.
6035 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
6036 header <pthread-errnos.h> instead of defining errno values here.
6037 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
6038 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6039 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6040 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6041 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6043 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6045 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6046 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6047 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6048 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6049 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6050 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6051 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6052 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6053 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6054 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
6055 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6056 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
6057 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6058 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
6059 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
6060 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6061 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6062 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6063 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6064 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6065 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6066 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6067 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
6068 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
6069 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
6070 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6071 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6073 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
6074 CLONE_CHILD_SETTID worked.
6076 2003-03-12 Ulrich Drepper <drepper@redhat.com>
6078 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
6080 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
6083 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6084 (pthread_cond_t): Add padding.
6086 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
6087 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
6088 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
6090 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
6091 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
6092 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
6093 (__pthread_rwlock_timedrdlock): Likewise.
6094 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
6095 (__pthread_rwlock_wrlock): Likewise.
6096 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
6097 (__pthread_rwlock_rdlock): Likewise.
6099 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
6101 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
6102 result of lock re-get if it fails.
6104 2003-03-11 Ulrich Drepper <drepper@redhat.com>
6106 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
6107 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6108 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
6109 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6110 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6111 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6112 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6113 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6114 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6115 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6117 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
6118 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
6120 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
6121 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
6122 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
6123 (create_thread): Likewise.
6124 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
6125 * init.c (__pthread_initialize_minimal_internal): Initialize
6126 __libc_multiple_threads_ptr if necessary.
6127 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
6128 __pthread_multiple_threads and __libc_multiple_threads_ptr.
6129 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
6130 __libc_multiple_threads.
6131 (__libc_pthread_init): Return pointer to __libc_pthread_init if
6134 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
6135 (THREAD_SETMEM_NC): Likewise.
6137 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
6138 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
6139 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
6140 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
6142 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
6143 Eliminate one entire instruction.
6145 * cancellation.c (__pthread_enable_asynccancel_2): New function.
6146 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
6147 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6148 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
6149 instead of __pthread_enable_asynccancel.
6150 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6151 (__pthread_cond_wait): Likewise.
6152 * sysdeps/pthread/pthread_cond_timedwait.c
6153 (__pthread_cond_timedwait): Likewise.
6154 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6156 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6157 (__condvar_cleanup): Wake up all waiters in case we got signaled
6158 after being woken up but before disabling asynchronous
6160 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6161 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6162 (__condvar_cleanup): Likewise.
6164 * init.c (__NR_set_tid_address): If already defined, don't redefine.
6165 Make it an error if architecture has no #if case. Add x86-64.
6167 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
6168 pt-initfini.s generation.
6170 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
6171 (TLS_INIT_TP): Fix typo.
6173 2003-03-11 Jakub Jelinek <jakub@redhat.com>
6175 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
6176 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
6178 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
6179 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
6180 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
6181 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
6182 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
6183 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6184 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6185 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6187 2003-03-11 Ulrich Drepper <drepper@redhat.com>
6189 * sysdeps/pthread/pthread_cond_timedwait.c
6190 (__pthread_cond_timedwait): Return the result of the final
6191 locking. If it succeeds, the regular function return value.
6193 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
6194 Return result of the final locking.
6195 * version.c (__nptl_main): Work around problems with the strange
6196 INTERNAL_SYSCALL macro on ppc32.
6197 * init.c (__pthread_initialize_minimal_internal): Unblock
6198 SIGCANCEL in case the parent blocked it.
6199 Reported by Paul Mackerras <paulus@samba.org>.
6201 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
6202 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
6203 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
6205 2003-03-11 Jakub Jelinek <jakub@redhat.com>
6207 * sysdeps/pthread/pthread_cond_timedwait.c
6208 (__pthread_cond_timedwait): Unlock and fail if
6209 __pthread_mutex_unlock_internal failed.
6211 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
6212 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
6214 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
6215 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
6216 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
6217 ALLOCATE_STACK): New macros.
6218 (TLS_TPADJ): New macro.
6219 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
6220 (allocate_stack): Handle TLS_DTV_AT_TP and
6221 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
6222 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
6224 * init.c [__ia64__] (__NR_set_tid_address): Define.
6226 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
6227 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
6228 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
6229 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
6230 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
6231 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
6232 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
6233 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
6234 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
6235 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
6236 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
6237 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
6238 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
6239 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
6240 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
6241 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
6242 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
6243 * sysdeps/ia64/bits/atomic.h: New file.
6244 * sysdeps/ia64/Makefile: New file.
6245 * sysdeps/ia64/pthread_spin_init.c: New file.
6246 * sysdeps/ia64/pthread_spin_lock.c: New file.
6247 * sysdeps/ia64/pthread_spin_trylock.c: New file.
6248 * sysdeps/ia64/pthread_spin_unlock.c: New file.
6249 * sysdeps/ia64/pthreaddef.h: New file.
6250 * sysdeps/ia64/tcb-offsets.sym: New file.
6251 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
6252 * sysdeps/ia64/tls.h: New file.
6254 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
6255 to syscall instead of no arguments.
6257 2003-03-10 Ulrich Drepper <drepper@redhat.com>
6259 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
6260 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
6261 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
6262 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
6264 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
6267 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
6269 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6270 lowlevelbarrier.sym.
6271 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
6272 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
6273 Include lowlevelbarrier.h and don't define offsets locally.
6274 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
6276 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
6277 (__lll_mutex_lock_wait): Reverse order of first two parameters.
6278 (__lll_mutex_timedlock_wait): Likewise.
6279 (lll_mutex_lock): Adjust asm for that.
6280 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
6281 (lll_lock): Adjust asm for operand order change.
6282 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
6283 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
6285 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
6286 Reverse order of parameters.
6287 (__lll_timedwait_tid): Remove regparms attribute.
6288 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
6289 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
6291 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6292 (__lll_timedwait_tid): Remove one unnecessary instruction.
6294 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
6295 __lll_mutex_timedlock_wait only for NOT_IN_libc.
6296 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
6299 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
6300 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
6302 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
6305 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
6306 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
6308 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
6309 define LOCK here (if UP is not defined). The actual code is in
6312 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
6313 LOCK is already defined. Don't define lll_unlock_wake_cb and
6314 __lll_timedwait_tid for libc.so.
6315 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
6316 define LOCK here (if UP is not defined). The actual code is in
6319 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
6320 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
6321 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
6322 instead of lowlevelsem.h.
6323 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6324 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6325 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6327 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6329 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
6330 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
6331 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
6333 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
6335 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
6338 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
6340 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
6341 of __libc_locking_needed.
6342 (lll_trylock): Initialize %eax to zero.
6344 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
6345 pthread_cond_t definition.
6347 2003-03-10 Roland McGrath <roland@redhat.com>
6349 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
6350 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
6351 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
6352 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
6353 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
6355 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
6356 Instead of setting PD->multiple_threads, set globals
6357 __pthread_multiple_threads and __libc_multiple_threads.
6358 * sysdeps/pthread/createthread.c (create_thread): Likewise.
6359 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
6360 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
6362 * descr.h (struct pthread): Conditionalize first member on
6363 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
6364 containing an anonymous tcbhead_t. Move `list' member out.
6365 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
6366 * allocatestack.c: Remove use of `header.data.' prefix.
6367 * pthread_create.c: Likewise.
6368 * init.c (__pthread_initialize_minimal_internal): Likewise.
6369 * sysdeps/pthread/createthread.c (create_thread): Likewise.
6370 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
6371 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
6372 * sysdeps/x86_64/tls.h: Likewise.
6373 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6374 (SINGLE_THREAD_P): Likewise.
6375 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6376 (SINGLE_THREAD_P): Likewise.
6377 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
6378 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
6380 2003-03-09 Ulrich Drepper <drepper@redhat.com>
6382 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
6384 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
6385 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6387 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
6388 leftovers from the ia32 code.
6390 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
6392 (clear_once_control): Don't load %esi.
6394 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
6397 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6399 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
6400 * sysdeps/unix/sysv/linux/createthread.c: ...here.
6402 * Makefile (tests): Add tst-cond10.
6403 * tst-cond10.c: New file.
6405 2003-03-08 Ulrich Drepper <drepper@redhat.com>
6407 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
6408 * tst-signal3.c (do_test): Likewise.
6409 * tst-sem5.c (do_test): Likewise.
6410 * tst-kill6.c (do_test): Likewise.
6411 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
6413 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
6415 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6416 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
6417 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6418 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6419 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6420 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6421 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6423 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6425 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6426 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6427 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6428 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6429 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6430 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6431 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6432 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6434 * allocatestack.c (allocate_stack): If mprotect() fails free the
6437 2003-03-07 Ulrich Drepper <drepper@redhat.com>
6439 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
6441 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
6442 lll_wake_tid. This was used only to work around kernel limits in
6444 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
6445 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
6446 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6447 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
6449 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
6450 (__pthread_initialize_minimal_internal): Change initialization of
6451 __static_tls_align_m1 appropriately.
6452 * pthreadP.h (__static_tls_align_m1): Renamed from
6454 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
6455 instead of __static_tls_align-1.
6457 2003-03-04 Ulrich Drepper <drepper@redhat.com>
6459 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6461 * pthread_create.c: Define __pthread_keys using nocommon
6462 attribute, not by placing it explicitly in bss.
6463 Remove DEFINE_DEALLOC definition. Not needed anymore.
6465 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
6466 Use it in mmap call to allocate stacks.
6468 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
6470 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
6471 result of the thread function.
6473 2003-03-03 Ulrich Drepper <drepper@redhat.com>
6475 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
6476 version is just fine.
6478 * sysdeps/unix/sysv/linux/libc_pthread_init.c
6479 (__pthread_child_handler): Renamed from pthread_child_handler,
6480 exported, and marked hidden. Change all users.
6481 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
6482 free __pthread_child_handler from child list.
6484 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
6486 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
6488 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6489 Fix handling of cancellation and failing pthread_mutex_unlock call.
6490 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6491 (__pthread_cond_wait): Likewise.
6493 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6494 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
6495 lll_futex_timed_wait call.
6496 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6497 (pthread_rwlock_timedwrlock): Likewise.
6499 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6500 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6501 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6503 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6504 check of lll_futex_wake return value.
6506 2003-03-03 Roland McGrath <roland@redhat.com>
6508 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6510 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6511 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6512 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6514 2003-03-02 Ulrich Drepper <drepper@redhat.com>
6516 * sysdeps/pthread/timer_create.c (timer_create): Return correct
6517 error for CPU clocks.
6519 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6520 _POSIX_MONOTONIC_CLOCK.
6521 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6523 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6526 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6528 * descr.h (struct pthread): Move cleanup field to the front.
6530 2003-03-01 Roland McGrath <roland@redhat.com>
6532 * sem_open.c (sem_open): Braino fix.
6534 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6536 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6537 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6538 __pthread_cleanup_pop functionality.
6539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6541 * descr.h (struct pthread): Move tid field to the front now that
6544 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6545 (__lll_mutex_timedlock_wait): Remove.
6546 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6547 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6548 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6549 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6550 (lll_unlock_wake_cb): Don't save and restore %esi.
6551 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6553 (__lll_timedwait_tid): Add alignment.
6554 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6555 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6557 (__lll_timedwait_tid): Removed.
6558 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6559 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6560 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6561 (pthread_barrier_wait): Don't save, load, and restore %esi for
6563 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6564 (__pthread_cond_signal): Don't save, load, and restore %esi.
6565 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6566 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6567 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6568 Don't save, load, and restore %esi.
6570 2003-02-27 Ulrich Drepper <drepper@redhat.com>
6572 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6573 Release lock before waking up the waiters.
6575 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6577 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6578 (reader_thread): Likewise.
6580 * sysdeps/pthread/pthread_rwlock_unlock.c
6581 (__pthread_rwlock_unlock): Release internal lock early. Don't try
6582 to wake up readers if there are none.
6584 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6585 Release internal lock before wake threads.
6587 2003-02-26 Ulrich Drepper <drepper@redhat.com>
6589 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6590 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
6592 * tst-rwlock9.c: Likewise.
6593 * tst-rwlock10.c: New file.
6594 * tst-rwlock11.c: New file.
6596 * Makefile (tests): Add tst-dlsym1.
6597 * tst-dlsym1.c: New file.
6599 * init.c (__pthread_initialize_minimal_internal): Set
6600 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6601 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6603 2003-02-24 Ulrich Drepper <drepper@redhat.com>
6605 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6607 * tst-cond2.c: Fix sychronization with child.
6609 * tst-rwlock8.c (reader_thread): Remove unused variable.
6611 * Makefile: Add rules to build and run tst-tls3.
6612 * tst-tls3.c: New file.
6613 * tst-tls3mod.c: New file.
6615 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6616 * tst-rwlock8.c: New file.
6617 * tst-rwlock9.c: New file.
6618 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6619 complete broken rwlock implementation.
6620 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6622 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6624 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6625 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6626 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6627 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6628 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6629 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6630 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6632 2003-02-23 Roland McGrath <roland@redhat.com>
6634 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6636 2003-02-23 Ulrich Drepper <drepper@redhat.com>
6638 * Makefile (tests): Add tst-context1.
6639 * tst-context1.c: New file.
6641 * Makefile (tests): Add tst-tls1 and tst-tls2.
6642 * tst-tls1.c: New file.
6643 * tst-tls2.c: New file.
6645 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6648 * pthread_create.c (start_thread): Set EXITING_BIT early.
6650 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6651 (THREAD_GETMEM_NC): Likewise.
6653 2003-02-22 Ulrich Drepper <drepper@redhat.com>
6655 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6656 off 3 more bytes by using offset-less instructions when possible.
6658 * Makefile: Add dependency for $(objpfx)version.d.
6660 * eintr.c (eintr_source): Add unnecessary return but the compiler
6663 * tst-kill3.c: Include <unistd.h>.
6665 2003-02-21 Roland McGrath <roland@redhat.com>
6667 * pthread_create.c (start_thread): Call __libc_thread_freeres.
6669 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6671 * Makefile (tests): Add tst-eintr1.
6672 (distribute): Add eintr.c.
6673 * tst-eintr1.c: New file.
6674 * eintr.c: New file.
6676 * pthread_cancel.c (pthread_cancel): Use tkill directly.
6678 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6679 Disallow sending SIGCANCEL.
6681 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
6682 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6683 * tst-kill1.c: New file.
6684 * tst-kill2.c: New file.
6685 * tst-kill3.c: New file.
6686 * tst-kill5.c: New file.
6687 * tst-kill6.c: New file.
6688 * tst-basic7.c: Renamed to...
6689 * tst-kill4.c: ...this.
6691 2003-02-21 Roland McGrath <roland@redhat.com>
6693 * Makefile (install-lib-ldscripts): New variable.
6695 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6697 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6698 * pthread_cancel.c: Use INVALID_TD_P.
6699 * pthread_detach.c: Likewise.
6700 * pthread_getschedparam.c: Likewise.
6701 * pthread_setschedparam.c: Likewise.
6702 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6703 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6704 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6705 * pthread_timedjoin.c: Likewise.
6707 * tst-basic7.c: Include <signal.h>.
6709 * pthread_join.c (pthread_join): Limited checking for invalid
6711 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6713 2003-02-20 Ulrich Drepper <drepper@redhat.com>
6715 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6716 beginning of the loop. Clear the entire first block of TSD.
6717 * Makefile (tests): Add tst-key4.
6718 * tst-key4.c: New file.
6720 2003-02-18 Ulrich Drepper <drepper@redhat.com>
6722 * Makefile (tests): Add tst-basic7.
6723 * tst-basic7.c: New file.
6725 * pthread_create.c (deallocate_tsd): Mark as internal_function.
6726 Add some more __builtin_expect.
6728 * pthreadP.h: Define dummy version of DEBUGGING_P.
6730 2003-02-17 Ulrich Drepper <drepper@redhat.com>
6732 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6733 _POSIX_THREAD_PRIORITY_SCHEDULING.
6734 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6735 _XOPEN_REALTIME_THREADS.
6736 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6738 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6739 kernel returns EINVAL for PID <= 0, work around it.
6741 * Makefile (tests): Add tst-signal5.
6742 * tst-signal5.c: New file.
6744 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6747 * tst-cancel1.c (tf): Block all signals.
6749 * Makefile (tests): Add tst-basic6.
6750 * tst-basic6.c: New file.
6752 * tst-basic1.c: Add test for process ID.
6754 * Makefile (tests): Add tst-cancel10.
6755 * tst-cancel10.c: New file.
6757 * Makefile (tests): Add tst-signal4.
6758 * tst-signal4.c: New file.
6760 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6761 __sigismember instead of sigismember. Add __builtin_expect.
6763 2003-02-16 Ulrich Drepper <drepper@redhat.com>
6765 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6766 pthread_setcancelstate, and pthread_rwlock_setpshared.
6768 * tst-cancel7.c (do_test): Make sure the pid file exists before
6769 canceling the thread.
6771 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6772 pthread_rwlock_timedrdlock tests.
6773 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6774 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6775 Check for invalid tv_nsec field.
6776 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6779 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6780 recursive mutex of overflow.
6782 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6784 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6785 going into an endless loop.
6786 * Makefile (tests): Add tst-cancel9.
6787 * tst-cancel9.c: New file.
6789 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6791 2003-02-15 Ulrich Drepper <drepper@redhat.com>
6793 * tst-mutex5.c (do_test): Add more timedlock tests.
6795 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6796 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6798 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6799 use INLINE_SYSCALL. Error number is returned, not -1.
6801 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6802 and __deallocate_stack with internal_function.
6803 * pthread_create.c: Adjust definitions appropriately.
6804 * allocatestack.c: Likewise.
6806 * pthread_join.c: Add one more __builtin_expect.
6807 * pthread_timedjoin.c: Likewise.
6809 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6810 not data of sequence number does not match.
6811 Add one __builtin_expect.
6813 * Makefile (tests): Add tst-clock1.
6814 * tst-clock1.c: New file.
6816 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6818 * Makefile (tests): Add tst-basic5.
6819 * tst-basic5.c: New file.
6821 2003-02-14 Ulrich Drepper <drepper@redhat.com>
6823 * Makefile (tests): Add tst-basic4.
6824 * tst-basic4.c: New file.
6826 * pthreadP.h: Add declaraction for __nptl_nthreads.
6827 * pthread_create.c: Define __nptl_nthreads
6828 (start_thread): Increment __nptl_nthreads at beginning. Decrement
6829 after thread is done. If then zero, call exit(0).
6830 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6831 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
6832 * init.c (pthread_functions): Initialize ptr_nthreads.
6833 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6834 (__reclaim_stacks): Decrement __nptl_nthreads.
6835 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6837 * Makefile (tests): Add tst-basic3.
6838 * tst-basic3.c: New file.
6840 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
6841 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
6842 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6843 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
6844 if asynchronous canceling is enabled.
6845 * pthread_join.c (pthread_join): When recognizing circular joins,
6846 take into account the other thread might be already canceled.
6847 * Makefile (tests): Add tst-join5.
6848 * tst-join5.c: New file.
6850 * Makefile (tests): Add tst-join4.
6851 * tst-join4.c: New file.
6853 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6855 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6857 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
6859 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6860 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6861 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6863 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6865 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6866 error if lll_futex_wake failed.
6868 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6870 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6871 handling of cancellation and failung pthread_mutex_unlock call.
6872 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6873 * Makefile (tests): Add tst-cond8 and tst-cond9.
6874 * tst-cond8.c: New file.
6875 * tst-cond9.c: New file.
6877 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6879 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
6880 non-standard initializers with __USE_GNU.
6882 * Makefile (tests): Add tst-cleanup3.
6883 * tst-cleanup3.c: New file.
6885 2003-02-12 Ulrich Drepper <drepper@redhat.com>
6887 * Makefile (tests): Add tst-attr1 and tst-attr2.
6888 * tst-attr1.c: New file.
6889 * tst-attr2.c: New file.
6891 * Makefile: Add rules to build and run tst-atfork2 test.
6892 * tst-atfork2.c: New file.
6893 * tst-atfork2mod.c: New file.
6895 * sysdeps/unix/sysv/linux/unregister-atfork.c
6896 (__unregister_atfork): Free the memory allocated for the handlers
6897 after removing them from the lists.
6899 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6902 * tst-atfork1.c (do_test): Wait for the child we forked.
6903 Report error in child.
6905 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6907 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6909 2003-02-10 Ulrich Drepper <drepper@redhat.com>
6911 * Makefile (tests): Add tst-cancel8.
6912 * tst-cancel8.c: New file.
6914 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6915 clearing of control variable.
6916 * Makefile (tests): Add tst-once3 and tst-once4.
6917 * tst-once3.c: New file.
6918 * tst-once4.c: New file.
6920 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
6922 * sysdeps/sh/Makefile: New file.
6923 * sysdeps/sh/bits/atomic.h: New file.
6924 * sysdeps/sh/pthread_spin_init.c: New file.
6925 * sysdeps/sh/pthread_spin_lock.c: New file.
6926 * sysdeps/sh/pthread_spin_trylock.S: New file.
6927 * sysdeps/sh/pthread_spin_unlock.S: New file.
6928 * sysdeps/sh/pthreaddef.h: New file.
6929 * sysdeps/sh/tcb-offsets.sym: New file.
6930 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
6931 * sysdeps/sh/tls.h: New file.
6932 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
6933 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
6934 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
6935 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
6936 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
6937 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
6938 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
6939 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
6940 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
6941 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
6942 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
6943 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
6944 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
6945 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
6946 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
6947 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
6948 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
6949 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
6950 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
6951 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
6952 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
6953 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
6954 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
6955 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
6956 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
6957 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
6958 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
6959 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
6960 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
6961 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
6963 2003-02-08 Ulrich Drepper <drepper@redhat.com>
6965 * tst-cond2.c: Rearrange code to not rely on behavior undefined
6968 * tst-basic2.c (do_test): Lock mutex before creating the thread.
6970 2003-02-07 Ulrich Drepper <drepper@redhat.com>
6972 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
6973 (TLS_GET_FS): New #define.
6974 (TLS_SET_FS): New #define.
6975 Correct value of __NR_set_thread_area.
6977 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
6979 2003-02-06 Ulrich Drepper <drepper@redhat.com>
6981 * Makefile (tests): Add tst-popen1.
6982 * tst-popen1.c: New file.
6984 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
6985 but inactive generalization.
6986 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6987 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6988 Minor optimization, remove one instruction.
6989 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6991 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
6993 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
6995 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
6997 * init.c (__NR_set_tid_address): Add #ifdef for s390.
6998 * sysdeps/pthread/pthread_barrier_wait.c: New file.
6999 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
7000 * sysdeps/pthread/pthread_cond_signal.c: New file.
7001 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
7002 * sysdeps/pthread/pthread_cond_wait.c: New file.
7003 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
7004 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
7005 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
7006 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
7007 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
7008 * sysdeps/s390/Makefile: New file.
7009 * sysdeps/s390/bits/atomic.h: New file.
7010 * sysdeps/s390/pthread_spin_init.c: New file.
7011 * sysdeps/s390/pthread_spin_lock.c: New file.
7012 * sysdeps/s390/pthread_spin_trylock.c: New file.
7013 * sysdeps/s390/pthread_spin_unlock.c: New file.
7014 * sysdeps/s390/pthreaddef.h: New file.
7015 * sysdeps/s390/tcb-offsets.sym: New file.
7016 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
7017 * sysdeps/s390/tls.h: New file.
7018 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
7019 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
7020 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
7021 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
7022 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
7023 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
7024 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
7025 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
7026 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
7027 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
7028 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
7029 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
7030 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
7031 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
7032 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
7033 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
7034 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
7035 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
7036 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
7037 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
7038 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
7039 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
7040 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
7042 2003-02-04 Ulrich Drepper <drepper@redhat.com>
7044 * atomic.h: Add a couple more default implementations.
7045 (atomic_compare_and_exchange_acq): Use
7046 __arch_compare_and_exchange_32_acq in return value definition. It
7048 (atomic_bit_set): Renamed from atomic_set_bit.
7049 Add missing atomic_ prefixes.
7051 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
7052 thread library is available, use correct value to mark initialized
7055 2003-02-03 Ulrich Drepper <drepper@redhat.com>
7057 * allocatestack.c (allocate_stack): Use __getpagesize instead of
7058 __sysconf to determine pagesize.
7060 * pthread_create.c: Include <atomic.h>.
7061 * allocatestack.c (allocate_stack): Implement coloring of the
7062 allocated stack memory. Rename pagesize to pagesize_m1. It's the
7063 size minus one. Adjust users.
7064 * sysdeps/i386/i686/Makefile: New file.
7066 2003-02-02 Ulrich Drepper <drepper@redhat.com>
7068 * allocatestack.c: Improve comment throughout the file.
7070 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7071 (__lll_lock_wait): Add branch prediction.
7072 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
7073 (__lll_lock_wait): Likewise.
7074 (lll_unlock_wake_cb): Removed.
7076 2003-01-31 Ulrich Drepper <drepper@redhat.com>
7078 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
7079 _POSIX_THREAD_PRIORITY_SCHEDULING.
7081 2003-01-30 Jakub Jelinek <jakub@redhat.com>
7083 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
7084 Fix return type of ptr___pthread_getspecific.
7086 2003-01-29 Ulrich Drepper <drepper@redhat.com>
7088 * Makefile (tests): Add tst-umask1.
7089 (tst-umask1-ARGS): Define.
7090 * tst-umask1.c: New file.
7092 2003-01-28 Ulrich Drepper <drepper@redhat.com>
7094 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
7095 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
7096 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
7097 pthread_rwlock_unlock.
7098 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
7099 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
7100 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
7101 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
7102 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7104 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
7105 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7107 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
7108 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
7109 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
7111 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
7112 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
7114 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
7115 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
7116 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
7118 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
7119 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
7121 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
7123 * Makefile (libpthread-routines): Remove lowlevelcond and
7124 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
7125 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
7126 and pthread_cond_broadcast.
7127 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
7128 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
7129 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
7130 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
7131 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
7132 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
7133 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
7134 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
7135 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
7136 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
7137 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
7138 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
7139 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
7140 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
7141 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
7142 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
7143 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
7144 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
7145 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
7146 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
7147 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
7148 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
7149 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
7150 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
7151 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
7152 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
7153 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
7154 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
7155 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
7156 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
7157 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
7159 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
7160 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
7161 of the code is moved to ...
7162 * sysdeps/pthread/createthread.c: ...here. New file.
7164 2003-01-27 Ulrich Drepper <drepper@redhat.com>
7166 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
7167 (__new_sem_post): Clear %eax before returning.
7168 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
7170 * Makefile (tests): Add tst-cleanup2.
7171 * tst-cleanup2.c: New file.
7173 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7174 Interpret first parameter correctly.
7176 2003-01-17 Ulrich Drepper <drepper@redhat.com>
7178 * Makefile (headers): Add bits/semaphore.h.
7180 2003-01-16 Jakub Jelinek <jakub@redhat.com>
7182 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
7185 2003-01-14 Ulrich Drepper <drepper@redhat.com>
7187 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
7188 must be used and mapping failed.
7189 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
7191 * Makefile (CFLAGS-pthread_self.os): Define this, not
7192 CFLAGS-pthread_self.c.
7194 2003-01-13 Ulrich Drepper <drepper@redhat.com>
7196 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
7199 * Makefile (libpthread-routines): Add version. Add rules to build
7200 version.os and banner.h.
7201 * version.c: New file.
7203 2003-01-13 Jakub Jelinek <jakub@redhat.com>
7205 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
7206 the alias unconditional.
7207 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
7209 2003-01-13 Ulrich Drepper <drepper@redhat.com>
7211 * Makefile (CFLAGS-pthread_self.c): New definition.
7213 2003-01-06 Jakub Jelinek <jakub@redhat.com>
7215 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
7216 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
7217 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
7218 * init.c (__pthread_initialize_minimal_internal): Likewise.
7220 2003-01-07 Jakub Jelinek <jakub@redhat.com>
7222 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
7224 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7225 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7226 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7227 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7228 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7229 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7231 2003-01-06 Jakub Jelinek <jakub@redhat.com>
7233 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
7234 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
7235 * tst-cancel-wrappers.sh: Remove all exceptions.
7237 2003-01-05 Ulrich Drepper <drepper@redhat.com>
7239 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
7240 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
7242 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
7243 Use __libc_pthread_functions array if SHARED.
7245 * pthreadP.h: Move pthread_cond_2_0_t definition to...
7246 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
7248 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
7249 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
7250 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
7251 __libc_ptf_call instead of __libc_maybe_call.
7253 (__libc_cleanup_region_start): Wrap function name with PTF call.
7254 (__libc_cleanup_region_end): Likewise.
7255 (__libc_cleanup_end): Likewise.
7257 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
7258 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
7259 * pthread_key_create.c: Add __pthread_key_create_internal alias.
7260 * pthreadP.h: Add prototypes.
7262 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
7263 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
7264 __pthread_rwlock_unlock aliases.
7265 * pthreadP.h: Add prototypes for new aliases.
7267 * pthreadP.h (struct pthead_functions): Moved to...
7268 * sysdeps/pthread/pthread-functions.h: ...here. New file.
7269 * init.c (pthread_functions): Add initializers for new elements.
7271 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
7272 __pthread_cleanup_pop_restore aliases.
7273 * pthreadP.h: Add prototypes.
7275 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
7276 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
7277 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
7278 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
7279 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7280 * pthreadP.h: Adjust prototypes and callers.
7282 2003-01-04 Ulrich Drepper <drepper@redhat.com>
7284 * Makefile (tests): Add tst-cancel7.
7285 (tst-cancel7-ARGS): New variable.
7286 * tst-cancel7.c: New file.
7288 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
7289 around gcc defficiencies.
7290 * old_pthread_cond_signal.c: Likewise.
7291 * old_pthread_cond_timedwait.c: Likewise.
7292 * old_pthread_cond_wait.c: Likewise.
7294 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
7296 2003-01-03 Ulrich Drepper <drepper@redhat.com>
7298 * Makefile (tests): Add tst-cond7.
7299 * tst-cond7.c: New file.
7301 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7302 (condvar_cleanup): Get condvar address from the right place.
7304 * atomic.h: Correct definitions of atomic_full_barrier,
7305 atomic_read_barrier, atomic_write_barrier.
7307 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
7309 * old_pthread_cond_signal.c: Likewise.
7310 * old_pthread_cond_timedwait.c: Likewise.
7311 * old_pthread_cond_wait.c: Likewise.
7313 2003-01-03 Jakub Jelinek <jakub@redhat.com>
7315 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
7317 2003-01-03 Ulrich Drepper <drepper@redhat.com>
7319 * pthreadP.h (pthread_cond_2_0_t): New type.
7320 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
7321 Use new type for the 2.0 condvar function prototypes.
7322 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
7323 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
7325 * old_pthread_cond_destroy.c: Likewise.
7326 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
7327 * old_pthread_cond_signal.c: Likewise.
7328 * old_pthread_cond_timedwait.c: Likewise.
7329 * old_pthread_cond_wait.c: Likewise.
7331 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7332 (__pthread_cond_wait): Don't save cancellation mode and seq value
7335 * herrno.c (__h_errno_location): Don't define as weak.
7337 2003-01-02 Jakub Jelinek <jakub@redhat.com>
7339 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
7340 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
7341 and pthread_cond_wait.
7342 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
7344 (__pthread_cond_broadcast_2_0): ... this.
7345 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
7347 (__pthread_cond_destroy_2_0): ... this.
7348 * old_pthread_cond_init.c (__old_pthread_cond_init):
7350 (__pthread_cond_init_2_0): ... this.
7351 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
7353 (__pthread_cond_signal_2_0): ... this.
7354 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
7356 (__pthread_cond_wait_2_0): ... this.
7357 * pthread_cond_destroy.c: Include shlib-compat.h.
7358 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
7359 * pthread_cond_init.c: Include shlib-compat.h.
7360 (pthread_cond_init): Change strong_alias into versioned_symbol.
7361 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
7362 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
7364 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
7365 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
7366 __pthread_cond_wait_2_0): New prototypes.
7367 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
7368 __old_pthread_cond_init, __old_pthread_cond_signal,
7369 __old_pthread_cond_wait): Removed.
7370 * init.c: Include shlib-compat.h.
7371 (pthread_functions): Guard ptr___pthread_attr_init_2_0
7372 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
7373 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
7374 ptr___pthread_cond_*_2_0 fields.
7375 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
7376 pthread_cond_*@GLIBC_2.0 compatibility symbols.
7378 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
7379 LIBC_SIGACTION was not yet defined.
7380 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
7381 [!defined LIBC_SIGACTION] (__sigaction): New function and
7383 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
7384 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
7386 2003-01-02 Jakub Jelinek <jakub@redhat.com>
7388 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
7390 2003-01-02 Ulrich Drepper <drepper@redhat.com>
7392 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7393 New, larger type definition.
7394 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
7396 * Versions [libpthread]: Add definitions for new pthread_cond_*
7397 interfaces for version GLIBC_2.3.2.
7398 * pthread_cond_init.c: Update initialization for new type definition.
7399 * Makefile (libpthread-routines): Remove pthread_cond_wait,
7400 pthread_cond_timedwait, pthread_cond_signal, and
7401 pthread_cond_broadcast. Add old_pthread_cond_init,
7402 old_pthread_cond_destroy, old_pthread_cond_wait,
7403 old_pthread_cond_timedwait, old_pthread_cond_signal, and
7404 old_pthread_cond_broadcast.
7405 * old_pthread_cond_broadcast.c: New file.
7406 * old_pthread_cond_destroy.c: New file.
7407 * old_pthread_cond_init.c: New file.
7408 * old_pthread_cond_signal.c: New file.
7409 * old_pthread_cond_timedwait.c: New file.
7410 * old_pthread_cond_wait.c: New file.
7411 * pthreadP.h: Add prototypes for the compatibility interfaces.
7413 * pthread_cond_destroy.c: Don't include <errno.h>.
7415 2003-01-01 Ulrich Drepper <drepper@redhat.com>
7417 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
7418 unnecessary zero offset when addressing MUTEX.
7420 2002-12-31 Ulrich Drepper <drepper@redhat.com>
7422 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7424 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
7425 for __register_atfork.
7427 2002-12-31 Jakub Jelinek <jakub@redhat.com>
7429 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
7430 instead of ASSEMBLER test macro.
7432 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
7433 __libc_current_sigrtmax): Add libc_hidden_def.
7435 * sysdeps/pthread/list.h: Remove assert.h include.
7437 2002-12-31 Ulrich Drepper <drepper@redhat.com>
7439 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
7440 __pthread_initialize_minimal_internal not
7441 __pthread_initialize_minimal.
7443 2002-12-30 Ulrich Drepper <drepper@redhat.com>
7445 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
7446 __pthread_initialize_minimal as hidden.
7448 * init.c (__pthread_initialize_minimal_internal): Don't mark as
7451 2002-12-31 Jakub Jelinek <jakub@redhat.com>
7453 * Makefile ($(inst_libdir)/libpthread.so): Depend on
7454 $(common-objpfx)format.lds, include that into the output script.
7456 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
7458 2002-12-28 Andreas Jaeger <aj@suse.de>
7460 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
7461 nsec resolution changes.
7462 (xstat64_conv): Likewise.
7463 (xstat32_conv): Likewise.
7464 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
7466 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
7467 structs stat and stat64.
7468 * time/time.h (__timespec_defined): Define for __USE_MISC.
7469 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
7471 2002-12-30 Jakub Jelinek <jakub@redhat.com>
7473 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
7475 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
7476 (pthread_exit): Use strong_alias to avoid warnings.
7477 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
7478 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
7479 ptr___pthread_attr_init_2_*.
7480 * init.c (pthread_functions): Adjust.
7482 2002-12-29 Ulrich Drepper <drepper@redhat.com>
7484 * forward.c: Make all functions available by default again. It
7485 caused too much trouble.
7487 * pt-siglongjmp.c: Removed.
7489 2002-12-28 Jakub Jelinek <jakub@redhat.com>
7491 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
7492 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
7493 * sysdeps/i386/Makefile: New file.
7494 * sysdeps/i386/tcb-offsets.sym: New file.
7495 * sysdeps/pthread/tcb-offsets.h: New file.
7496 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7497 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7499 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7500 __register_atfork...
7501 (GLIBC_2.3.2): ...here.
7503 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7505 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7506 pthread_attr_setstackaddr with __attribute_deprecated__.
7508 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7510 * pt-system.c (system): Remove cancellation handling.
7511 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7512 cancellation routines.
7514 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7516 * descr.h: Include <dl-sysdep.h>.
7517 (struct pthread): Move header.data.list to the back of the struct.
7518 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7519 (MULTIPLE_THREADS_OFFSET): Adjust offset.
7520 (SYSINFO_OFFSEET): Likewise.
7522 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7524 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7526 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7527 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7528 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7529 (USE_DL_SYSINFO): Undef.
7531 2002-12-22 Jakub Jelinek <jakub@redhat.com>
7533 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7534 $(common-objpfx)libc.so.
7535 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7536 it is bigger than pipe buffer size even on arches with bigger
7538 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7540 2002-12-25 Ulrich Drepper <drepper@redhat.com>
7542 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7543 correct errno access for case that USE___THREAD is not defined.
7545 2002-12-24 Ulrich Drepper <drepper@redhat.com>
7547 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7548 Patch by Marijn Ros <marijn@mad.scientist.com>.
7550 2002-12-22 Roland McGrath <roland@redhat.com>
7552 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7554 2002-12-20 Ulrich Drepper <drepper@redhat.com>
7556 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7558 2002-12-19 Ulrich Drepper <drepper@redhat.com>
7560 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7561 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7562 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7564 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7566 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7567 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7568 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7569 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7570 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7571 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7572 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7573 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7575 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7577 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7579 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7581 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7583 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7584 that sysinfo is properly initialized.
7585 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7586 to 1 only for ld.so.
7588 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7589 RTLD_CORRECT_DYNAMIC_WEAK.
7591 2002-12-19 Jakub Jelinek <jakub@redhat.com>
7593 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7594 Use return 0 as 6th argument to FORWARD4.
7595 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7597 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7599 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7600 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7601 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7602 (INIT_SYSINFO): New #define.
7603 (TLS_TP_INIT): Use INIT_SYSINFO.
7604 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7605 At test to make sure SYSINFO_OFFSET value is correct.
7606 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7608 2002-12-18 Jakub Jelinek <jakub@redhat.com>
7610 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7611 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7612 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7613 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7614 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7615 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7616 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7618 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7620 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7621 macro instead of using int $0x80 directly.
7623 * sysdeps/pthread/bits/stdio-lock.h: New file.
7624 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7625 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7626 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7627 * Makefile (routines): Add libc-lowlevelmutex.
7629 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7630 __i686.get_pc_thunk.dx.
7632 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7634 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7635 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7636 ($(objpfx)tst-cancel-wrappers.out): New rule.
7637 * tst-cancel-wrappers.sh: New test.
7638 * tst-locale1.c: Include signal.h.
7639 (uselocale): Test static linking of __libc_current_sigrt*.
7641 2002-12-17 Ulrich Drepper <drepper@redhat.com>
7643 * Makefile (tests): Add tst-cancel6.
7644 * tst-cancel6.c: New file
7646 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7648 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7649 Define meaningfully for assembler as well.
7650 * pthreadP.h (struct pthread_functions): Remove
7651 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
7652 and ptr_pthread_attr_init_2_1 fields.
7653 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7654 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7655 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7656 (FORWARD3): Define using FORWARD4.
7657 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7659 * pt-system.c: Remove duplicate stdlib.h include.
7661 2002-12-16 Ulrich Drepper <drepper@redhat.com>
7663 * sem_init.c: Define sem_init@GLIBC_2.0.
7664 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7665 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7667 * flockfile.c: Moved to...
7668 * sysdeps/pthread/flockfile.c: ...here. New file.
7669 * funlockfile.c: Moved to...
7670 * sysdeps/pthread/funlockfile.c: ...here. New file.
7671 * ftrylockfile.c: Moved to...
7672 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
7674 2002-12-16 Jakub Jelinek <jakub@redhat.com>
7676 * libc-cancellation.c: Guard both function with
7677 #if !defined NOT_IN_libc.
7678 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7679 automatically provided pthread wrappers.
7680 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7681 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7683 * pt-open.c: Removed.
7684 * pt-fcntl.c: Removed.
7685 * pt-fsync.c: Removed.
7686 * pt-lseek.c: Removed.
7687 * pt-msgrcv.c: Removed.
7688 * pt-msgsnd.c: Removed.
7689 * pt-msync.c: Removed.
7690 * pt-nanosleep.c: Removed.
7691 * pt-open64.c: Removed.
7692 * pt-pause.c: Removed.
7693 * pt-pread.c: Removed.
7694 * pt-pread64.c: Removed.
7695 * pt-pwrite.c: Removed.
7696 * pt-pwrite64.c: Removed.
7697 * pt-read.c: Removed.
7698 * pt-recv.c: Removed.
7699 * pt-recvfrom.c: Removed.
7700 * pt-recvmsg.c: Removed.
7701 * pt-send.c: Removed.
7702 * pt-sendto.c: Removed.
7703 * pt-sigtimedwait.c: Removed.
7704 * pt-sigwait.c: Removed.
7705 * pt-wait.c: Removed.
7706 * pt-waitpid.c: Removed.
7707 * pt-write.c: Removed.
7708 * pt-accept.c: Removed.
7709 * pt-close.c: Removed.
7710 * pt-connect.c: Removed.
7711 * pt-lseek64.c: Removed.
7712 * pt-sendmsg.c: Removed.
7713 * pt-tcdrain.c: Removed.
7715 2002-12-15 Ulrich Drepper <drepper@redhat.com>
7717 * init.c (__pthread_initialize_minimal_internal): Renamed from
7718 __pthread_initialize_minimal. Make old name an alias. This
7719 converts a normal relocation into a relative relocation.
7721 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7723 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7724 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7725 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7726 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7727 pt-sigwaitinfo, pt-waitid, and pt-writev.
7728 * pt-creat.c: Removed.
7729 * pt-poll.c: Removed.
7730 * pt-pselect.c: Removed.
7731 * pt-readv.c: Removed.
7732 * pt-select.c: Removed.
7733 * pt-sigpause.c: Removed.
7734 * pt-sigsuspend.c: Removed.
7735 * pt-sigwaitinfo.c: Removed.
7736 * pt-waitid.c: Removed.
7737 * pt-writev.c: Removed.
7739 * init.c (pthread_functions): New variable.
7740 (__pthread_initialize_minimal): Pass pointer to pthread_functions
7741 (or NULL) to __libc_pthread_init.
7742 * forward.c: Rewrite to use __libc:pthread_functions array to get
7744 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7746 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7747 Take new parameter. Copy content of variable pointed to by it
7748 to __libc_pthread_init.
7750 * pthreadP.h (struct pthread_functions): New type.
7751 (__libc_pthread_init): Declare.
7753 * pthread_attr_destroy.c: Add namespace protected alias.
7754 * pthread_attr_getdetachstate.c: Likewise.
7755 * pthread_attr_getinheritsched.c: Likewise.
7756 * pthread_attr_getschedparam.c: Likewise.
7757 * pthread_attr_getschedpolicy.c: Likewise.
7758 * pthread_attr_getscope.c: Likewise.
7759 * pthread_attr_setdetachstate.c: Likewise.
7760 * pthread_attr_setinheritsched.c: Likewise.
7761 * pthread_attr_setschedparam.c: Likewise.
7762 * pthread_attr_setschedpolicy.c: Likewise.
7763 * pthread_attr_setscope.c: Likewise.
7764 * pthread_cond_broadcast.c: Likewise.
7765 * pthread_cond_destroy.c: Likewise.
7766 * pthread_cond_init.c: Likewise.
7767 * pthread_cond_signal.c: Likewise.
7768 * pthread_cond_wait.c: Likewise.
7769 * pthread_condattr_destroy.c: Likewise.
7770 * pthread_condattr_init.c: Likewise.
7771 * pthread_equal.c: Likewise.
7772 * pthread_exit.c: Likewise.
7773 * pthread_getschedparam.c: Likewise.
7774 * pthread_self.c: Likewise.
7775 * pthread_setcancelstate.c: Likewise.
7776 * pthread_setschedparam.c: Likewise.
7777 * pthread_mutex_destroy.c: Likewise.
7778 * pthread_mutex_init.c: Likewise.
7779 * pthreadP.h: Add prototypes for the aliases.
7781 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7782 multiple_threads member in correct TCB to 1.
7784 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7785 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
7786 member of thread decriptor, otherwise return unconditionally 1.
7788 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7790 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7791 regular Linux version. Remove file.
7792 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
7793 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
7794 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
7795 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
7796 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
7797 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
7798 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
7799 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
7800 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
7801 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
7802 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
7803 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
7804 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
7805 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
7806 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
7807 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
7808 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
7809 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
7810 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
7811 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
7812 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
7813 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
7814 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
7815 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
7816 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
7817 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
7818 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
7819 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
7820 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
7821 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
7823 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7825 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7826 * sysdeps/unix/sysv/linux/open.c: Removed.
7827 * sysdeps/unix/sysv/linux/fsync.c: Removed.
7828 * sysdeps/unix/sysv/linux/lseek.c: Removed.
7829 * sysdeps/unix/sysv/linux/msync.c: Removed.
7830 * sysdeps/unix/sysv/linux/read.c: Removed.
7831 * sysdeps/unix/sysv/linux/close.c: Removed.
7832 * sysdeps/unix/sysv/linux/creat.c: Removed.
7833 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7834 * sysdeps/unix/sysv/linux/pause.c: Removed.
7835 * sysdeps/unix/sysv/linux/select.c: Removed.
7836 * sysdeps/unix/sysv/linux/write.c: Removed.
7838 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7840 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7841 element in TCB to see whether locking is needed.
7843 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7844 MULTIPLE_THREADS_OFFSET value is correct.
7846 * sysdeps/unix/sysv/linux/close.c: New file.
7847 * sysdeps/unix/sysv/linux/connect.S: New file.
7848 * sysdeps/unix/sysv/linux/creat.c: New file.
7849 * sysdeps/unix/sysv/linux/fsync.c: New file.
7850 * sysdeps/unix/sysv/linux/llseek.c: New file.
7851 * sysdeps/unix/sysv/linux/lseek.c: New file.
7852 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7853 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7854 * sysdeps/unix/sysv/linux/msync.c: New file.
7855 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7856 * sysdeps/unix/sysv/linux/open.c: New file.
7857 * sysdeps/unix/sysv/linux/open64.c: New file.
7858 * sysdeps/unix/sysv/linux/pause.c: New file.
7859 * sysdeps/unix/sysv/linux/poll.c: New file.
7860 * sysdeps/unix/sysv/linux/pread.c: New file.
7861 * sysdeps/unix/sysv/linux/pread64.c: New file.
7862 * sysdeps/unix/sysv/linux/pselect.c: New file.
7863 * sysdeps/unix/sysv/linux/pwrite.c: New file.
7864 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7865 * sysdeps/unix/sysv/linux/readv.c: New file.
7866 * sysdeps/unix/sysv/linux/recv.S: New file.
7867 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7868 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7869 * sysdeps/unix/sysv/linux/select.c: New file.
7870 * sysdeps/unix/sysv/linux/send.S: New file.
7871 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7872 * sysdeps/unix/sysv/linux/sendto.S: New file.
7873 * sysdeps/unix/sysv/linux/sigpause.c: New file.
7874 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7875 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7876 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7877 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7878 * sysdeps/unix/sysv/linux/system.c: New file.
7879 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7880 * sysdeps/unix/sysv/linux/wait.c: New file.
7881 * sysdeps/unix/sysv/linux/waitid.c: New file.
7882 * sysdeps/unix/sysv/linux/waitpid.c: New file.
7883 * sysdeps/unix/sysv/linux/writev.c: New file.
7884 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7886 * pt-readv.c: Fix comment.
7888 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7890 * tst-cleanup1.c: Include stdlib.h.
7892 * tst-cancel5.c: New test.
7893 * Makefile (tests): Add tst-cancel5.
7894 (tst-cancel5): Link against libc.so libpthread.so in that order.
7896 2002-12-13 Ulrich Drepper <drepper@redhat.com>
7898 * forward.c (test_loaded): Prevent recursive calls.
7900 * Makefile (routines): Add libc-cancellation.
7901 * libc-cancellation.c: New file.
7902 * descr.h (struct pthread): Add multiple_threads field.
7903 * allocatestack.c (allocate_stack): Initialize multiple_header field of
7904 new thread descriptor to 1.
7905 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7906 Initialize multiple_thread field after successful thread creation.
7907 * cancellation.c (__do_cancel): Move to pthreadP.h.
7908 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7909 (__pthread_disable_asynccancel): Add internal_function attribute.
7910 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7911 * pthread_setcancelstate.c: Likewise.
7912 * pthread_setcanceltype.c: Likewise.
7913 * pthread_exit.c: Likewise.
7914 * pthreadP.h (CANCELLATION_P): Likewise.
7915 (__do_cancel): Define as static inline.
7916 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7917 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7919 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7920 fields. Define MULTIPLE_THREADS_OFFSET.
7921 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7923 * sysdeps/unix/sysv/linux/accept.S: New file.
7924 * sysdeps/unix/sysv/linux/read.c: New file.
7925 * sysdeps/unix/sysv/linux/write.c: New file.
7926 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7927 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7928 initialization of __libc_locking_needed.
7929 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
7930 __libc_locking_needed, use multiple_threads field in TCB.
7931 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7933 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7935 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
7937 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
7939 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
7940 access to __libc_locking_needed for PIC.
7942 2002-12-12 Jakub Jelinek <jakub@redhat.com>
7944 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
7945 declare for libc.so.
7946 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
7948 (__libc_lock_lock): Put into statement expression.
7949 (__libc_lock_unlock): Remove trailing semicolon.
7950 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
7952 2002-12-12 Roland McGrath <roland@redhat.com>
7954 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
7955 "m" constraint to refer to __libc_locking_needed. Declare it here.
7957 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7959 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
7960 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
7961 Initialize __libc_locking_needed.
7962 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
7963 instead of __register_pthread_fork_handler.
7964 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
7965 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
7966 fork-gen with libc_pthread_init.
7967 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
7968 of __register_pthread_fork_handler.
7969 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
7970 of __register_pthread_fork_handler.
7971 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
7972 __libc_locking_needed to determine whether lock prefix can be avoided.
7973 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7975 2002-12-11 Ulrich Drepper <drepper@redhat.com>
7977 * Makefile (tests): Add tst-cleanup1.
7978 * tst-cleanup1.c: New file.
7979 * cancellation.c (__cleanup_thread): Removed.
7980 (__do_cancel): Remove call to __cleanup_thread.
7981 * pthreadP.h: Remove __cleanup_thread prorotype.
7983 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7984 Remember function and argument even if cancellation handler
7985 function is not available.
7986 (__libc_cleanup_region_end): Execute registered function directly if
7987 pthread functions are not available.
7988 (__libc_cleanup_end): Likewise.
7990 * init.c (__pthread_initialize_minimal): Fix initialization in
7991 static lib by preventing gcc from being too clever.
7993 2002-12-10 Ulrich Drepper <drepper@redhat.com>
7995 * init.c (__pthread_initialize_minimal): Remove unneccesary
7998 * Makefile (tests): We can run tst-locale2 now.
8000 2002-12-09 Ulrich Drepper <drepper@redhat.com>
8002 * Versions: Remove duplicated sigwait entry.
8004 2002-12-08 Ulrich Drepper <drepper@redhat.com>
8006 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
8009 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
8011 * pthreadP.h: Declare __pthread_enable_asynccancel and
8012 __pthread_disable_asynccancel.
8013 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
8014 (CANCEL_RESET): Use __pthread_disable_asynccancel.
8015 * cancellation.c (__pthread_enable_asynccancel): New function.
8016 (__pthread_disable_asynccancel): New function.
8017 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
8018 * pt-close.c: Likewise.
8019 * pt-connect.c: Likewise.
8020 * pt-creat.c: Likewise.
8021 * pt-fcntl.c: Likewise.
8022 * pt-fsync.c: Likewise.
8023 * pt-lseek.c: Likewise.
8024 * pt-lseek64.c: Likewise.
8025 * pt-msgrcv.c: Likewise.
8026 * pt-msgsnd.c: Likewise.
8027 * pt-msync.c: Likewise.
8028 * pt-nanosleep.c: Likewise.
8029 * pt-open.c: Likewise.
8030 * pt-open64.c: Likewise.
8031 * pt-pause.c: Likewise.
8032 * pt-poll.c: Likewise.
8033 * pt-pread.c: Likewise.
8034 * pt-pread64.c: Likewise.
8035 * pt-pselect.c: Likewise.
8036 * pt-pwrite.c: Likewise.
8037 * pt-pwrite64.c: Likewise.
8038 * pt-read.c: Likewise.
8039 * pt-readv.c: Likewise.
8040 * pt-recv.c: Likewise.
8041 * pt-recvfrom.c: Likewise.
8042 * pt-recvmsg.c: Likewise.
8043 * pt-select.c: Likewise.
8044 * pt-send.c: Likewise.
8045 * pt-sendmsg.c: Likewise.
8046 * pt-sendto.c: Likewise.
8047 * pt-sigpause.c: Likewise.
8048 * pt-sigsuspend.c: Likewise.
8049 * pt-sigtimedwait.c: Likewise.
8050 * pt-sigwait.c: Likewise.
8051 * pt-sigwaitinfo.c: Likewise.
8052 * pt-system.c: Likewise.
8053 * pt-tcdrain.c: Likewise.
8054 * pt-wait.c: Likewise.
8055 * pt-waitid.c: Likewise.
8056 * pt-waitpid.c: Likewise.
8057 * pt-write.c: Likewise.
8058 * pt-writev.c: Likewise.
8059 * pthread_join.c: Likewise.
8060 * pthread_timedjoin.c: Likewise.
8062 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
8063 (__xpg_sigpause): New function.
8064 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
8066 2002-12-07 Ulrich Drepper <drepper@redhat.com>
8068 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
8070 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
8071 _GI_pthread_cleanup_pop to pthreadP.h.
8073 * ftrylockfile.c: Use _IO_lock_trylock instead of
8074 pthread_mutex_trylock.
8076 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
8077 (CANCEL_RESET): Likewise.
8078 (__pthread_setcanceltype_): Declare.
8079 (__pthread_mutex_lock_internal): Declare.
8080 (__pthread_mutex_unlock_internal): Declare.
8081 (__pthread_once_internal): Declare.
8082 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
8083 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
8085 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
8086 and pthread_mutex_unlock.
8087 * pthread_cond_wait.c: Likewise.
8088 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
8089 * pthread_mutex_unlock.c: Likewise.
8091 * pthread_setcanceltype.c: Add additional alias
8092 __pthread_setcanceltype.
8094 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
8095 * sem_open.c (sem_open): Likewise.
8096 Use __libc_open, __libc_write, and __libc_close instead of
8097 open, write, and close respectively.
8099 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
8100 Rewrite as statement expression since it must return a value.
8102 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
8103 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
8106 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
8107 alias __pthread_once_internal.
8109 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
8111 2002-12-06 Ulrich Drepper <drepper@redhat.com>
8113 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
8114 * tst-stdio1.c: New file.
8115 * tst-stdio2.c: New file.
8117 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
8119 * Makefile (tests): Comment out tst-locale2 for now.
8120 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
8122 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
8124 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
8125 Use _IO_lock_init instead of explicit assignment.
8127 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
8128 Define __libc_lock_* and __libc_lock_recursive macros with
8129 lowlevellock macros, not pthread mutexes.
8131 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
8132 of pthread_mutex_lock.
8133 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
8134 instead of pthread_mutex_unlock.
8136 2002-12-06 Roland McGrath <roland@redhat.com>
8138 * allocatestack.c (__stack_user): Use uninitialized defn.
8139 * init.c (__pthread_initialize_minimal): Initialize it here.
8141 2002-12-05 Roland McGrath <roland@redhat.com>
8143 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
8145 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
8147 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
8150 2002-12-05 Ulrich Drepper <drepper@redhat.com>
8152 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8154 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
8155 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
8156 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
8157 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
8158 for __libc_lock_* macros.
8159 * Makefile (routines): Add libc-lowlevellock.
8161 2002-10-09 Roland McGrath <roland@redhat.com>
8163 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
8164 Under [__PIC__], call the function via the pointer fetched for
8165 comparison rather than a call by name that uses the PLT.
8166 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
8167 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
8168 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
8169 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
8170 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
8172 2002-12-04 Roland McGrath <roland@redhat.com>
8174 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
8176 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
8177 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
8179 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
8181 2002-12-04 Ulrich Drepper <drepper@redhat.com>
8183 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
8184 a completely opaque, non-integer type.
8185 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8187 2002-12-05 Jakub Jelinek <jakub@redhat.com>
8189 * sysdeps/i386/tls.h: Include stdlib.h.
8190 * sysdeps/x86_64/tls.h: Likewise.
8192 2002-12-04 Ulrich Drepper <drepper@redhat.com>
8194 * Makefile (tests): Add tst-locale2.
8195 (tests-static): Likewise.
8196 * tst-locale2.c: New file.
8198 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
8199 volatile and add memory clobbers to lock operations.
8201 2002-12-03 Ulrich Drepper <drepper@redhat.com>
8203 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
8204 * sysdeps/i386/i486/bits/atomic.h: New file.
8205 * sysdeps/i386/i586/bits/atomic.h: New file.
8206 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
8207 include i486 version.
8208 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
8209 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
8210 Patch by Marijn Ros <marijn@mad.scientist.com>.
8212 * allocatestack.c (get_cached_stack): Don't crash if we first
8213 found a stack with a larger size then needed.
8214 Reported by Hui Huang <hui.huang@sun.com>.
8216 * Makefile (tests): Add tst-sysconf.
8217 * tst-sysconf.c: New file.
8219 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
8220 PTHREAD_THREADS_MAX.
8222 2002-12-02 Roland McGrath <roland@redhat.com>
8224 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
8225 Declare using hidden_proto instead of attribute_hidden, so there are
8226 non-.hidden static symbols for gdb to find.
8227 (__pthread_keys): Likewise.
8228 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
8229 * allocatestack.c (__stack_user): Likewise.
8230 * pthread_create.c (__pthread_keys): Likewise.
8231 (__nptl_threads_events, __nptl_last_event): Make these static instead
8233 * pthread_key_create.c (__pthread_pthread_keys_max,
8234 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
8236 2002-12-02 Ulrich Drepper <drepper@redhat.com>
8238 * Makefile (tests): Add tst-locale1. If buid-static is yes link
8240 * tst-locale1.c: New file.
8242 * pthread_cond_timedwait.c: Include <stdlib.h>.
8244 * Makefile (tests): Add tst-fork2 and tst-fork3.
8245 * tst-fork2.c: New file.
8246 * tst-fork3.c: New file.
8248 2002-11-28 Ulrich Drepper <drepper@redhat.com>
8250 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
8252 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
8253 require it to 200112L.
8255 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
8256 instruction only if HAVE_CMOV is defined.
8257 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
8259 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
8261 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
8263 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
8265 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
8267 2002-11-27 Ulrich Drepper <drepper@redhat.com>
8269 * sysdeps/x86_64/bits/atomic.h: New file.
8271 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
8274 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
8275 possible since gettid cannot fail.
8277 * sysdeps/x86_64/pthreaddef.h: New file.
8279 * sysdeps/i386/pthreaddef.h (gettid): Removed.
8281 * sysdeps/x86_64/pthread_spin_init.c: New file.
8282 * sysdeps/x86_64/pthread_spin_lock.c: New file.
8283 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
8284 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
8286 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
8287 Add missing lock prefix. Minute optimization.
8289 * tst-spin2.c (main): Also check successful trylock call.
8291 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
8292 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
8294 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
8295 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
8297 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
8298 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
8299 value in case of an error. Add support for INTERNAL_SYSCALL.
8301 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
8302 value in case of an error.
8304 * sysdeps/x86_64/tls.h: New file.
8306 2002-11-26 Ulrich Drepper <drepper@redhat.com>
8308 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
8309 takes the array member name and the index as parameters.
8310 (THREAD_SETMEM_NC): Likewise.
8311 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
8312 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
8315 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
8316 to decide which code to use.
8317 (THREAD_SETMEM_NC): Likewise.
8319 * allocatestack.c (queue_stack): Don't remove stack from list here.
8320 Do it in the caller. Correct condition to prematurely terminate
8321 loop to free stacks.
8322 (__deallocate_stack): Remove stack from list here.
8324 2002-11-26 Ulrich Drepper <drepper@redhat.com>
8326 * Makefile (tests): Add tst-stack1.
8327 * tst-stack1.c: New file.
8329 * allocatestack.c (allocate_stack): Initialize the TCB on a user
8332 * pthread_attr_getstack.c: Return bottom of the thread area.
8334 2002-11-25 Ulrich Drepper <drepper@redhat.com>
8336 * Makefile (libpthread-routines): Add pt-allocrtsig and
8337 pthread_kill_other_threads.
8338 * pt-allocrtsig.c: New file.
8339 * pthread_kill_other_threads.c: New file.
8340 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
8341 all three functions.
8342 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8344 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
8345 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
8346 and __libc_allocate_rtsig_private.
8347 * Versions (libpthread): Export pthread_kill_other_threads_np,
8348 __libc_current_sigrtmin, and __libc_current_sigrtmax.
8350 2002-11-24 Ulrich Drepper <drepper@redhat.com>
8352 * allocatestack.c (allocate_stack): stackaddr in attribute points to
8353 the end of the stack. Adjust computations.
8354 When mprotect call fails dequeue stack and free it.
8355 * pthread_attr_setstack.c: Store top of the stack in stackaddr
8357 * pthread_getattr_np.c: Likewise.
8359 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
8362 2002-11-23 Ulrich Drepper <drepper@redhat.com>
8364 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
8365 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
8367 2002-11-22 Ulrich Drepper <drepper@redhat.com>
8369 * pthread_getspecific.c: Optimize access to first 2nd-level array.
8370 * pthread_setspecific.c: Likewise.
8372 2002-11-21 Ulrich Drepper <drepper@redhat.com>
8374 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
8375 definitions. Get them from the official place.
8376 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
8378 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
8379 Use new CLONE_ flags in clone() calls.
8381 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
8382 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
8384 * Versions: Add pthread_* functions for libc.
8385 * forward.c: New file.
8387 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
8389 * herrno.c: New file.
8392 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
8393 sem_trywait, and sem_timedwait. Add herrno and res.
8394 * sem_init.c: Don't initialize lock and waiters members.
8395 * sem_open.c: Likewise.
8396 * sem_post.c: Removed.
8397 * sem_wait.c: Removed.
8398 * sem_trywait.c: Removed.
8399 * sem_timedwait.c: Removed.
8400 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
8401 Includes full implementations of sem_post, sem_wait, sem_trywait,
8403 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
8404 for new implementation.
8405 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
8408 * tst-sem3.c: Improve error message.
8409 * tst-signal3.c: Likewise.
8411 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
8412 to tell the kernel about the termination futex and to initialize tid
8413 member. Don't initialize main_thread.
8414 * descr.h (struct pthread): Remove main_thread member.
8415 * cancelllation.c (__do_cancel): Remove code handling main thread.
8416 The main thread is not special anymore.
8418 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
8419 size of the stacks to stack_cache_actsize.
8421 * pt-readv.c: Add missing "defined".
8422 * pt-sigwait.c: Likewise.
8423 * pt-writev.c: Likewise.
8425 2002-11-09 Ulrich Drepper <drepper@redhat.com>
8427 * Versions: Export __connect from libpthread.
8428 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8430 * Makefile (libpthread-routines): Add pt-raise.
8431 * sysdeps/unix/sysv/linux/raise.c: New file.
8432 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
8433 * sysdeps/generic/pt-raise.c: New file.
8435 * pthread_cond_init.c: Initialize all data elements of the condvar
8436 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
8438 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
8439 * pthread_create.c: Likewise.
8441 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
8442 * tst-key1.c: New file.
8443 * tst-key2.c: New file.
8444 * tst-key3.c: New file.
8446 * Versions: Export pthread_detach for version GLIBC_2.0.
8447 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
8449 2002-11-08 Ulrich Drepper <drepper@redhat.com>
8451 * pthread_key_create.c: Terminate search after an unused key was found.
8452 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8454 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
8455 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8457 2002-10-10 Ulrich Drepper <drepper@redhat.com>
8459 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
8460 dynamic lookup for errno in PIC.
8462 * allocatestack.c (get_cached_stack): Rearrange code slightly to
8463 release the stack lock as soon as possible.
8464 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
8465 the static TLS block.
8466 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
8468 * cancellation.c: Renamed from cancelation.c.
8469 * Makefile: Adjust accordingly.
8470 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
8471 * cleanup_defer.c: Use CANCELLATION_P.
8472 * pthread_testcancel.c: Likewise.
8473 * descr.h: Fix spelling in comments.
8475 * pthread_getattr_np.c: Likewise.
8476 * pthread_getschedparam.c: Likewise.
8477 * pthread_setschedparam.c: Likewise.
8478 * Versions: Likewise.
8480 * pt-pselect.c: New file.
8481 * Makefile (libpthread-routines): Add pt-pselect.
8482 * Versions: Add pselect.
8484 * tst-cancel4.c: New file.
8485 * Makefile (tests): Add tst-cancel4.
8487 2002-10-09 Ulrich Drepper <drepper@redhat.com>
8489 * pthread_mutex_lock.c: Always record lock ownership.
8490 * pthread_mutex_timedlock.c: Likewise.
8491 * pthread_mutex_trylock.c: Likewise.
8493 * pt-readv.c: New file.
8494 * pt-writev.c: New file.
8495 * pt-creat.c: New file.
8496 * pt-msgrcv.c: New file.
8497 * pt-msgsnd.c: New file.
8498 * pt-poll.c: New file.
8499 * pt-select.c: New file.
8500 * pt-sigpause.c: New file.
8501 * pt-sigsuspend.c: New file.
8502 * pt-sigwait.c: New file.
8503 * pt-sigwaitinfo.c: New file.
8504 * pt-waitid.c: New file.
8505 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8506 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8507 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8508 * Versions: Add all the new functions.
8510 * tst-exit1.c: New file.
8511 * Makefile (tests): Add tst-exit1.
8513 * sem_timedwait.c: Minor optimization for more optimal fastpath.
8515 2002-10-08 Ulrich Drepper <drepper@redhat.com>
8517 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8519 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8520 call. pthread_join is an official cancellation point.
8521 * pthread_timedjoin.c: Likewise.
8523 * pthread_cond_wait.c: Revert order in which internal lock are dropped
8524 and the condvar's mutex are retrieved.
8525 * pthread_cond_timedwait.c: Likewise.
8526 Reported by dice@saros.East.Sun.COM.
8528 2002-10-07 Ulrich Drepper <drepper@redhat.com>
8530 * pthreadP.h: Cut out all type definitions and move them...
8531 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
8532 * pthreadP.h: Include <internaltypes.h>.
8534 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8537 * sem_trywait.c: Shuffle #includes around to get right order.
8538 * sem_timedwait.c: Likewise.
8539 * sem_post.c: Likewise.
8540 * sem_wait.c: Likewise.
8542 * nptl 0.3 released.
8544 * Makefile (tests): Add tst-signal3.
8545 * tst-signal3.c: New file.
8547 2002-10-05 Ulrich Drepper <drepper@redhat.com>
8549 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8550 the asms modify the sem object.
8551 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8553 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8555 * pthreadP.h (struct sem): New type. Actual semaphore type.
8556 * semaphoreP.h: Include pthreadP.h.
8557 * sem_getvalue.c: Adjust to sem_t change.
8558 * sem_init.c: Likewise.
8559 * sem_open.c: Likewise.
8560 * sem_post.c: Likewise.
8561 * sem_timedwait.c: Likewise.
8562 * sem_trywait.c: Likewise.
8563 * sem_wait.c: Likewise.
8565 2002-10-04 Ulrich Drepper <drepper@redhat.com>
8567 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8568 * tst-basic2.c: New file.
8569 * tst-exec1.c: New file.
8570 * tst-exec2.c: New file.
8571 * tst-exec3.c: New file.
8573 * tst-fork1.c: Remove extra */.
8575 * nptl 0.2 released. The API for IA-32 is complete.