1 2006-08-31 Ulrich Drepper <drepper@redhat.com>
3 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4 change because it can disturb too much existing code. If real hard
5 reader preference is needed we'll introduce another type.
6 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
7 (pthread_rwlock_timedwrlock): Likewise.
8 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
11 2006-08-30 Ulrich Drepper <drepper@redhat.com>
13 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
15 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
16 (pthread_rwlock_timedwrlock): Likewise.
17 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
20 2006-08-25 Jakub Jelinek <jakub@redhat.com>
22 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
23 Only define ifdef SHARED.
25 2006-08-23 Ulrich Drepper <drepper@redhat.com>
27 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
28 (free_stacks): ...here.
29 (__free_stack_cache): New function.
30 * pthreadP.h: Declare __free_stack_cache.
31 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
33 * init.c (pthread_functions): Initialize ptr_freeres.
34 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
37 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
40 * Makefile (extra-objs): Add modules to extra-test-objs instead.
42 2006-08-20 Ulrich Drepper <drepper@redhat.com>
44 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
45 _XOPEN_REALTIME_THREADS.
47 2006-08-15 Jakub Jelinek <jakub@redhat.com>
49 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
50 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
51 HAVE_CLOCK_GETTIME_VSYSCALL.
52 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
54 2006-08-14 Jakub Jelinek <jakub@redhat.com>
56 * sysdeps/unix/sysv/linux/bits/posix_opt.h
57 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
58 * descr.h (struct priority_protection_data): New type.
59 (struct pthread): Add tpp field.
60 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
61 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
62 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
63 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
65 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
66 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
67 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
68 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
70 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
72 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
73 * pthread_mutexattr_getprioceiling.c
74 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
75 in the SCHED_FIFO priority range.
76 * pthread_mutexattr_setprioceiling.c
77 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
78 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
79 if mutex is not TPP. Ceiling is now in __data.__lock.
80 * pthread_mutex_setprioceiling.c: Include stdbool.h.
81 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
82 is now in __data.__lock. Add locking.
83 * pthread_create.c (__free_tcb): Free pd->tpp structure.
84 * Makefile (libpthread-routines): Add tpp.
85 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
86 * tst-tpp.h: New file.
87 * tst-mutexpp1.c: New file.
88 * tst-mutexpp6.c: New file.
89 * tst-mutexpp10.c: New file.
90 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
91 * tst-mutex6.c (TEST_FUNCTION): Likewise.
93 2006-08-12 Ulrich Drepper <drepper@redhat.com>
96 * pthread_join.c (pthread_join): Account for self being canceled
97 when checking for deadlocks.
98 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
99 (tf1): Don't print anything after pthread_join returns, this would be
100 another cancellation point.
102 * tst-join6.c: New file.
103 * Makefile (tests): Add tst-join6.
105 2006-08-03 Ulrich Drepper <drepper@redhat.com>
108 * pthread_setspecific.c (__pthread_setspecific): Check
109 out-of-range index before checking for unused key.
111 * sysdeps/pthread/gai_misc.h: New file.
113 2006-08-01 Ulrich Drepper <drepper@redhat.com>
115 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
116 file. Don't use sysctl.
117 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
118 overwrite the file if this is likely not true.
120 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
122 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
123 * Makefile (tests): Add tst-getpid3.
124 * tst-getpid3.c: New file.
126 2006-07-30 Roland McGrath <roland@redhat.com>
128 * Makefile (libpthread-routines): Add ptw-sigsuspend.
130 * sysdeps/unix/sysv/linux/i386/not-cancel.h
131 (pause_not_cancel): New macro.
132 (nanosleep_not_cancel): New macro.
133 (sigsuspend_not_cancel): New macro.
134 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
135 nanosleep_not_cancel macro from <not-cancel.h>.
136 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
137 macro from <not-cancel.h>.
139 2006-07-28 Ulrich Drepper <drepper@redhat.com>
140 Jakub Jelinek <jakub@redhat.com>
142 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
143 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
144 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
145 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
146 * pthread_mutex_init.c: Add support for priority inheritance mutex.
147 * pthread_mutex_lock.c: Likewise.
148 * pthread_mutex_timedlock.c: Likewise.
149 * pthread_mutex_trylock.c: Likewise.
150 * pthread_mutex_unlock.c: Likewise.
151 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
154 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
155 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
156 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
157 pthread-pi-defines.sym.
158 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
159 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
160 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
161 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
162 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
163 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
164 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
165 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
166 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
167 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
168 _POSIX_THREAD_PRIO_INHERIT to 200112L.
169 * tst-mutex1.c: Adjust to allow use in PI mutex test.
170 * tst-mutex2.c: Likewise.
171 * tst-mutex3.c: Likewise.
172 * tst-mutex4.c: Likewise.
173 * tst-mutex5.c: Likewise.
174 * tst-mutex6.c: Likewise.
175 * tst-mutex7.c: Likewise.
176 * tst-mutex7a.c: Likewise.
177 * tst-mutex8.c: Likewise.
178 * tst-mutex9.c: Likewise.
179 * tst-robust1.c: Likewise.
180 * tst-robust7.c: Likewise.
181 * tst-robust8.c: Likewise.
182 * tst-mutexpi1.c: New file.
183 * tst-mutexpi2.c: New file.
184 * tst-mutexpi3.c: New file.
185 * tst-mutexpi4.c: New file.
186 * tst-mutexpi5.c: New file.
187 * tst-mutexpi6.c: New file.
188 * tst-mutexpi7.c: New file.
189 * tst-mutexpi7a.c: New file.
190 * tst-mutexpi8.c: New file.
191 * tst-mutexpi9.c: New file.
192 * tst-robust1.c: New file.
193 * tst-robust2.c: New file.
194 * tst-robust3.c: New file.
195 * tst-robust4.c: New file.
196 * tst-robust5.c: New file.
197 * tst-robust6.c: New file.
198 * tst-robust7.c: New file.
199 * tst-robust8.c: New file.
200 * Makefile (tests): Add the new tests.
202 * pthread_create.c (start_thread): Add some casts to avoid warnings.
203 * pthread_mutex_destroy.c: Remove unneeded label.
205 2006-07-01 Ulrich Drepper <drepper@redhat.com>
207 * pthread_mutex_init.c (__pthread_mutex_init): Move some
208 computations to compile time.
210 2006-06-04 Ulrich Drepper <drepper@redhat.com>
212 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
214 2006-05-15 Ulrich Drepper <drepper@redhat.com>
216 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
218 2006-05-11 Ulrich Drepper <drepper@redhat.com>
220 * pthread_key_create.c (__pthread_key_create): Do away with
223 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
224 (__kernel_cpumask_size): Mark as hidden.
225 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
227 * sem_open.c (__sem_mappings_lock): Mark as hidden.
228 * semaphoreP.h (__sem_mappings_lock): Likewise.
230 2006-05-10 Ulrich Drepper <drepper@redhat.com>
232 * pthread_atfork.c: Mark __dso_handle as hidden.
234 2006-05-09 Ulrich Drepper <drepper@redhat.com>
237 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
238 the reload problem. Change the one path in pthread_cancel_init
239 which causes the problem. Force gcc to reload. Simplify callers.
240 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
241 (_Unwind_GetBSP): Undo last patch.
243 2006-05-07 Ulrich Drepper <drepper@redhat.com>
245 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
246 function pointer is reloaded after pthread_cancel_init calls.
249 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
250 pointers are reloaded after pthread_cancel_init calls.
252 2006-05-01 Ulrich Drepper <drepper@redhat.com>
254 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
257 2006-04-27 Ulrich Drepper <drepper@redhat.com>
259 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
260 Allocate new object which is passed to timer_sigev_thread so that
261 the timer can be deleted before the new thread is scheduled.
263 2006-04-26 Roland McGrath <roland@redhat.com>
265 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
267 2006-04-08 Ulrich Drepper <drepper@redhat.com>
269 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
270 suffix for conditional jumps.
271 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
272 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
273 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
274 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
275 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
276 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
278 * init.c (sigcancel_handler): Compare with correct PID even if the
279 thread is in the middle of a fork call.
280 (sighandler_setxid): Likewise.
281 Reported by Suzuki K P <suzuki@in.ibm.com> .
283 2006-04-07 Jakub Jelinek <jakub@redhat.com>
285 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
287 2006-04-06 Ulrich Drepper <drepper@redhat.com>
289 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
290 fails [Coverity CID 105].
292 2006-04-05 Ulrich Drepper <drepper@redhat.com>
294 * sysdeps/pthread/pthread.h: Add nonnull attributes.
296 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
299 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
300 Define __lll_rel_instr using lwsync.
302 2006-03-27 Ulrich Drepper <drepper@redhat.com>
304 * allocatestack.c (allocate_stack): Always initialize robust_head.
305 * descr.h: Define struct robust_list_head.
306 (struct pthread): Use robust_list_head in robust mutex list definition.
307 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
308 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
309 (__pthread_initialize_minimal_internal): Register robust_list with
311 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
312 Declare __set_robust_list_avail.
313 * pthread_create.c (start_thread): Register robust_list of new thread.
314 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
316 * pthread_mutex_destroy.c: For robust mutexes don't look at the
317 number of users, it's unreliable.
318 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
319 set_robust_list syscall is available.
320 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
321 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
322 Set robust_head.list_op_pending before trying to lock a robust mutex.
323 * pthread_mutex_timedlock.c: Likewise.
324 * pthread_mutex_trylock.c: Likewise.
325 * pthread_mutex_unlock.c: Likewise for unlocking.
326 * Makefile (tests): Add tst-robust8.
327 * tst-robust8.c: New file.
329 2006-03-08 Andreas Schwab <schwab@suse.de>
331 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
332 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
334 2006-03-05 Roland McGrath <roland@redhat.com>
336 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
337 and $config_os doesn't match *linux*.
339 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
341 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
343 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
344 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
345 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
346 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
347 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
348 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
350 2006-03-02 Ulrich Drepper <drepper@redhat.com>
352 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
354 2006-03-01 Ulrich Drepper <drepper@redhat.com>
356 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
357 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
359 (__lll_robust_timedlock_wait): Likewise.
360 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
361 (__lll_robust_lock_wait): Likewise.
362 (__lll_robust_timedlock_wait): Likewise.
363 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
364 (__lll_robust_lock_wait): Likewise.
365 (__lll_robust_timedlock_wait): Likewise.
367 2006-03-01 Jakub Jelinek <jakub@redhat.com>
369 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
370 lll_robust_mutex_trylock, lll_robust_mutex_lock,
371 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
372 lll_robust_mutex_unlock): Define.
373 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
375 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
377 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
378 instead of <clone.S>.
380 2006-02-27 Jakub Jelinek <jakub@redhat.com>
382 * Makefile (libpthread-routines): Add
383 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
384 and pthread_mutex_[sg]etprioceiling.
385 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
386 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
387 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
388 pthread_mutex_setprioceiling.
389 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
390 PTHREAD_PRIO_PROTECT): New enum values.
391 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
392 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
393 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
395 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
396 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
397 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
399 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
400 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
401 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
402 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
403 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
404 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
405 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
407 * pthread_mutex_getprioceiling.c: New file.
408 * pthread_mutex_setprioceiling.c: New file.
409 * pthread_mutexattr_getprioceiling.c: New file.
410 * pthread_mutexattr_setprioceiling.c: New file.
411 * pthread_mutexattr_getprotocol.c: New file.
412 * pthread_mutexattr_setprotocol.c: New file.
414 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
416 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
418 2006-02-27 Roland McGrath <roland@redhat.com>
420 * sysdeps/pthread/Subdirs: List nptl here too.
421 * configure (libc_add_on_canonical): New variable.
423 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
425 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
426 self to get main source tree's file.
427 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
428 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
429 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
430 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
431 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
432 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
433 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
434 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
435 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
436 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
437 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
438 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
439 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
441 * Makefile: Use $(sysdirs) in vpath directive.
443 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
444 (CPPFLAGS-timer_routines.c): Likewise.
446 * Makeconfig (includes): Variable removed.
448 2006-02-26 Roland McGrath <roland@redhat.com>
450 * sysdeps/generic/pt-raise.c: Moved to ...
451 * pt-raise.c: ... here.
452 * sysdeps/generic/lowlevellock.h: Moved to ...
453 * lowlevellock.h: ... here.
455 2006-02-23 Roland McGrath <roland@redhat.com>
457 * descr.h (struct pthread): Add final member `end_padding'.
458 (PTHREAD_STRUCT_END_PADDING): Use it.
460 2006-02-20 Roland McGrath <roland@redhat.com>
462 * sysdeps/mips: Directory removed, saved in ports repository.
463 * sysdeps/unix/sysv/linux/mips: Likewise.
465 2006-02-18 Ulrich Drepper <drepper@redhat.com>
467 * tst-robust1.c: Add second mutex to check that the mutex list is
470 2006-02-17 Jakub Jelinek <jakub@redhat.com>
472 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
473 lll_robust_mutex_trylock, lll_robust_mutex_lock,
474 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
475 lll_robust_mutex_unlock): New macros.
476 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
477 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
478 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
479 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
480 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
482 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
484 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
486 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
488 2006-02-17 Ulrich Drepper <drepper@redhat.com>
490 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
491 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
492 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
493 (lll_robust_mutex_unlock): Likewise.
495 2006-02-13 Jakub Jelinek <jakub@redhat.com>
497 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
498 Set robust_list.__next rather than robust_list.
499 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
500 (__pthread_list_t): New typedef.
501 (pthread_mutex_t): Replace __next and __prev fields with __list.
502 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
503 (__pthread_list_t): New typedef.
504 (pthread_mutex_t): Replace __next and __prev fields with __list.
505 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
506 (__pthread_list_t, __pthread_slist_t): New typedefs.
507 (pthread_mutex_t): Replace __next and __prev fields with __list.
508 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
509 (__pthread_list_t, __pthread_slist_t): New typedefs.
510 (pthread_mutex_t): Replace __next and __prev fields with __list.
511 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
512 (__pthread_list_t, __pthread_slist_t): New typedefs.
513 (pthread_mutex_t): Replace __next and __prev fields with __list.
514 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
515 (__pthread_slist_t): New typedef.
516 (pthread_mutex_t): Replace __next field with __list.
518 2006-02-15 Ulrich Drepper <drepper@redhat.com>
520 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
521 PTHREAD_MUTEX_OWNERDEAD.
522 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
523 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
524 * Makefile (libpthread-routines): Add lowlevelrobustlock.
525 * pthread_create.c (start_thread): Very much simplify robust_list loop.
526 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
527 to PTHREAD_MUTEX_INCONSISTENT.
528 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
529 * pthread_mutex_lock.c: Reimplement robust mutex handling.
530 * pthread_mutex_trylock.c: Likewise.
531 * pthread_mutex_timedlock.c: Likewise.
532 * pthread_mutex_unlock.c: Likewise.
533 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
534 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
535 lowlevelrobustlock.sym.
536 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
537 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
539 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
540 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
541 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
542 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
543 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
545 2006-02-12 Ulrich Drepper <drepper@redhat.com>
547 * allocatestack.c (allocate_stack): Initialize robust_list.
548 * init.c (__pthread_initialize_minimal_internal): Likewise.
549 * descr.h (struct xid_command): Pretty printing.
550 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
551 robust_list. Adjust macros.
552 * pthread_create.c (start_thread): Adjust robust_list handling.
553 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
554 but the owner for all robust mutex types.
555 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
556 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
557 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
558 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
560 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
561 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
563 2006-02-08 Jakub Jelinek <jakub@redhat.com>
565 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
566 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
568 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
570 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
572 (lll_futex_timed_wait): Define.
574 2006-01-19 Ulrich Drepper <drepper@redhat.com>
576 * tst-cancel4.c: Test ppoll.
578 2006-01-18 Andreas Jaeger <aj@suse.de>
581 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
582 (pthread_mutex_t): Follow changes for other archs. Based on patch
583 by Jim Gifford <patches@jg555.com>.
585 2006-01-13 Richard Henderson <rth@redhat.com>
587 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
589 2006-01-10 Roland McGrath <roland@redhat.com>
591 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
592 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
593 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
594 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
595 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
596 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
597 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
598 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
599 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
600 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
602 2006-01-09 Roland McGrath <roland@redhat.com>
604 * tst-initializers1-c89.c: New file.
605 * tst-initializers1-c99.c: New file.
606 * tst-initializers1-gnu89.c: New file.
607 * tst-initializers1-gnu99.c: New file.
608 * Makefile (tests): Add them.
609 (CFLAGS-tst-initializers1-c89.c): New variable.
610 (CFLAGS-tst-initializers1-c99.c): New variable.
611 (CFLAGS-tst-initializers1-gnu89.c): New variable.
612 (CFLAGS-tst-initializers1-gnu99.c): New variable.
614 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
615 Use __extension__ on anonymous union definition.
616 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
617 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
618 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
619 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
620 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
622 2006-01-08 Jakub Jelinek <jakub@redhat.com>
624 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
625 Don't give the union a name because it changes the mangled name.
626 Instead name the struct for __data.
627 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
629 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
632 2006-01-09 Jakub Jelinek <jakub@redhat.com>
634 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
635 stack bias to mc_ftp field.
637 2006-01-07 Ulrich Drepper <drepper@redhat.com>
639 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
640 being too clever and reloading the futex value where it shouldn't.
642 2006-01-06 Ulrich Drepper <drepper@redhat.com>
644 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
647 2006-01-06 Jakub Jelinek <jakub@redhat.com>
649 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
652 2006-01-06 Ulrich Drepper <drepper@redhat.com>
654 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
655 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
658 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
659 Don't give the union a name because it changes the mangled name.
660 Instead name the struct for __data.
661 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
662 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
663 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
664 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
665 * pthread_create.c (start_thread): Adjust robust mutex free loop.
666 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
668 2006-01-05 Ulrich Drepper <drepper@redhat.com>
670 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
672 (lll_futex_timed_wait): Define.
673 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
674 * sysdeps/pthread/aio_misc.h: New file.
676 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
678 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
680 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
682 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
683 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
684 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
686 2006-01-04 Ulrich Drepper <drepper@redhat.com>
688 * tst-cancel24.cc: Use C headers instead of C++ headers.
690 2006-01-03 Jakub Jelinek <jakub@redhat.com>
692 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
693 sparc-linux configured glibc.
694 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
695 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
696 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
697 atomic_compare_and_exchange_val_24_acq instead of
698 atomic_compare_and_exchange_val_acq.
699 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
700 instead of atomic_exchange_rel.
701 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
702 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
704 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
706 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
707 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
708 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
709 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
710 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
711 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
713 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
715 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
716 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
717 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
719 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
721 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
723 2006-01-03 Ulrich Drepper <drepper@redhat.com>
725 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
728 2006-01-02 Jakub Jelinek <jakub@redhat.com>
730 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
731 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
732 THREAD_COPY_POINTER_GUARD): Define.
733 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
734 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
736 2006-01-01 Ulrich Drepper <drepper@redhat.com>
738 * version.c: Update copyright year.
740 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
742 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
743 .eh_frame section, use cfi_* directives.
744 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
746 2005-12-30 Ulrich Drepper <drepper@redhat.com>
748 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
751 2005-12-29 Ulrich Drepper <drepper@redhat.com>
753 * sysdeps/pthread/sigaction.c: Removed.
754 * sigaction.c: New file.
755 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
757 2005-12-28 Ulrich Drepper <drepper@redhat.com>
759 * Makefile (tests): Add tst-signal7.
760 * tst-signal7.c: New file.
762 2005-12-27 Roland McGrath <roland@redhat.com>
764 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
765 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
766 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
767 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
768 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
769 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
770 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
771 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
772 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
773 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
774 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
776 2005-12-27 Jakub Jelinek <jakub@redhat.com>
778 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
779 and __prev field to pthread_mutex_t.
780 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
781 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
782 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
783 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
784 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
787 2005-12-26 Ulrich Drepper <drepper@redhat.com>
789 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
790 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
791 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
792 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
793 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
794 and PTHREAD_MUTEXATTR_FLAG_BITS.
795 * descr.h (struct pthread): Add robust_list field and define
796 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
797 * pthread_mutexattr_getrobust.c: New file.
798 * pthread_mutexattr_setrobust.c: New file.
799 * pthread_mutex_consistent.c: New file.
800 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
801 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
802 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
803 Adjust pthread_mutex_t initializers.
804 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
805 field to pthread_mutex_t.
806 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
807 and __prev field to pthread_mutex_t.
808 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
809 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
810 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
811 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
812 * pthread_mutexattr_gettype.c: Likewise.
813 * pthread_mutexattr_setpshared.c: Likewise.
814 * pthread_mutexattr_settype.c: Likewise.
815 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
816 Initialize mutex kind according to robust flag.
817 * pthread_mutex_lock.c: Implement local robust mutex.
818 * pthread_mutex_timedlock.c: Likewise.
819 * pthread_mutex_trylock.c: Likewise.
820 * pthread_mutex_unlock.c: Likewise.
821 * pthread_create.c (start_thread): Mark robust mutexes which remained
823 * tst-robust1.c: New file.
824 * tst-robust2.c: New file.
825 * tst-robust3.c: New file.
826 * tst-robust4.c: New file.
827 * tst-robust5.c: New file.
828 * tst-robust6.c: New file.
829 * tst-robust7.c: New file.
830 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
831 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
832 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
833 tst-robust5, tst-robust6, and tst-robust7.
835 * tst-typesizes.c: New file.
836 * Makefile (tests): Add tst-typesizes.
838 * tst-once3.c: More debug output.
840 2005-12-24 Ulrich Drepper <drepper@redhat.com>
842 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
843 missing after last change.
845 * version.c: Update copyright year.
847 2005-12-23 Ulrich Drepper <drepper@redhat.com>
849 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
850 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
851 * pthread_mutex_trylock.c: Likewise.
852 * pthread_mutex_timedlock.c: Likewise.
853 * pthread_mutex_unlock.c: Likewise.
855 2005-12-22 Roland McGrath <roland@redhat.com>
857 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
858 so that #include_next's search location is not reset to the -I..
859 directory where <nptl/...> can be found.
861 2005-12-22 Ulrich Drepper <drepper@redhat.com>
864 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
865 Fix unwind info. Remove useless branch prediction prefix.
866 * tst-cancel24.cc: New file.
867 * Makefile: Add rules to build and run tst-cancel24.
869 2005-12-21 Roland McGrath <roland@redhat.com>
871 * libc-cancellation.c: Use <> rather than "" #includes.
872 * pt-cleanup.c: Likewise.
873 * pthread_create.c: Likewise.
874 * pthread_join.c: Likewise.
875 * pthread_timedjoin.c: Likewise.
876 * pthread_tryjoin.c: Likewise.
877 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
878 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
879 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
880 * unwind.c: Likewise.
882 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
884 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
885 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
886 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
887 THREAD_COPY_POINTER_GUARD): Define.
889 2005-12-19 Jakub Jelinek <jakub@redhat.com>
891 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
893 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
894 THREAD_COPY_POINTER_GUARD): Define.
895 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
896 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
897 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
898 THREAD_COPY_POINTER_GUARD): Define.
899 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
900 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
901 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
902 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
903 Use PTR_DEMANGLE for B0 if defined.
905 2005-12-17 Ulrich Drepper <drepper@redhat.com>
907 * pthread_create.c (__pthread_create_2_1): Use
908 THREAD_COPY_POINTER_GUARD if available.
909 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
910 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
911 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
912 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
913 * sysdeps/x86_64/tls.h: Likewise.
915 2005-12-15 Roland McGrath <roland@redhat.com>
917 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
919 2005-12-13 Ulrich Drepper <drepper@redhat.com>
921 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
923 * errno-loc.c: New file.
925 2005-12-12 Roland McGrath <roland@redhat.com>
927 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
928 adjustments before choosing stack size. Update minimum stack size
929 calculation to match allocate_stack change.
931 2005-12-12 Ulrich Drepper <drepper@redhat.com>
933 * allocatestack.c (allocate_stack): Don't demand that there is an
934 additional full page available on the stack beside guard, TLS, the
937 2005-11-24 Ulrich Drepper <drepper@redhat.com>
939 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
940 (__cleanup_fct_attribute): Use __regparm__ not regparm.
942 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
943 compiling 32-bit code we must define __cleanup_fct_attribute.
945 005-11-24 Jakub Jelinek <jakub@redhat.com>
948 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
949 __attribute__ instead of __attribute.
950 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
951 (__cleanup_fct_attribute): Likewise.
953 2005-11-17 Jakub Jelinek <jakub@redhat.com>
955 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
956 a write barrier before writing libgcc_s_getcfa.
958 2005-11-06 Ulrich Drepper <drepper@redhat.com>
960 * sysdeps/unix/sysv/linux/configure: Removed.
962 2005-11-05 Ulrich Drepper <drepper@redhat.com>
964 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
965 optional init_array/fini_array support.
967 2005-10-24 Roland McGrath <roland@redhat.com>
969 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
970 versioned_symbol use.
972 2005-10-16 Roland McGrath <roland@redhat.com>
974 * init.c (__pthread_initialize_minimal_internal): Even when using a
975 compile-time default stack size, apply the minimum that allocate_stack
976 will require, and round up to page size.
978 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
980 * Makefile ($(test-modules)): Remove static pattern rule.
982 2005-10-14 Jakub Jelinek <jakub@redhat.com>
983 Ulrich Drepper <drepper@redhat.com>
985 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
986 alignment in callback function.
987 * Makefile: Add rules to build and run tst-align3.
988 * tst-align3.c: New file.
990 2005-10-03 Jakub Jelinek <jakub@redhat.com>
992 * allocatestack.c (setxid_signal_thread): Add
993 INTERNAL_SYSCALL_DECL (err).
995 2005-10-02 Jakub Jelinek <jakub@redhat.com>
997 * allocatestack.c (setxid_signal_thread): Need to use
998 atomic_compare_and_exchange_bool_acq.
1000 2005-10-01 Ulrich Drepper <drepper@redhat.com>
1001 Jakub Jelinek <jakub@redhat.com>
1003 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
1005 (struct pthread): Move specific_used field to avoid padding.
1006 Add setxid_futex field.
1007 * init.c (sighandler_setxid): Reset setxid flag and release the
1009 * allocatestack.c (setxid_signal_thread): New function. Broken
1010 out of the bodies of the two loops in __nptl_setxid. For undetached
1011 threads check whether they are exiting and if yes, don't send a signal.
1012 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
1013 * pthread_create.c (start_thread): For undetached threads, check
1014 whether setxid bit is set. If yes, wait until signal has been
1017 * allocatestack.c (STACK_VARIABLES): Initialize them.
1018 * pthread_create.c (__pthread_create_2_1): Initialize pd.
1020 2004-09-02 Jakub Jelinek <jakub@redhat.com>
1022 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1023 waiters, awake all waiters on the associated mutex.
1025 2005-09-22 Roland McGrath <roland@redhat.com>
1027 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
1028 ../sysdeps/x86_64/hp-timing.h).
1030 2005-08-29 Jakub Jelinek <jakub@redhat.com>
1032 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
1033 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1034 (lll_futex_wake_unlock): Define.
1035 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
1036 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1037 (lll_futex_wake_unlock): Define.
1038 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
1039 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1040 (lll_futex_wake_unlock): Define.
1041 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
1042 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1043 (lll_futex_wake_unlock): Define.
1044 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
1045 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1046 (lll_futex_wake_unlock): Define.
1047 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
1048 lll_futex_wake_unlock.
1049 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1050 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1051 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1052 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1053 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1054 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1056 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1058 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1059 Fix typo in register name.
1061 2005-08-23 Ulrich Drepper <drepper@redhat.com>
1063 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1064 Use __sigfillset. Document that sigfillset does the right thing wrt
1067 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1070 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
1071 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
1072 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
1073 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
1074 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
1075 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
1077 * Makefile (tests): Add tst-initializers1.
1078 (CFLAGS-tst-initializers1.c): Set.
1079 * tst-initializers1.c: New test.
1081 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1083 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
1084 Make sure __flags are located at offset 48 from the start of the
1087 2005-07-02 Roland McGrath <roland@redhat.com>
1089 * Makeconfig: Comment fix.
1091 2005-07-05 Jakub Jelinek <jakub@redhat.com>
1093 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
1094 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
1095 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
1096 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
1097 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1098 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1099 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
1100 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
1101 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
1102 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1104 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1106 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
1107 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1108 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
1110 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1111 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
1112 field. Put in sysinfo field unconditionally.
1113 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1114 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
1115 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1116 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
1118 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1119 * pthread_create.c (__pthread_create_2_1): Use
1120 THREAD_COPY_STACK_GUARD macro.
1121 * Makefile: Add rules to build and run tst-stackguard1{,-static}
1123 * tst-stackguard1.c: New file.
1124 * tst-stackguard1-static.c: New file.
1126 2005-06-14 Alan Modra <amodra@bigpond.net.au>
1128 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1129 Invoke CGOTSETUP and CGOTRESTORE.
1130 (CGOTSETUP, CGOTRESTORE): Define.
1132 2005-05-29 Richard Henderson <rth@redhat.com>
1134 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
1135 (tf_write, tf_writev): Use it.
1136 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
1139 2005-05-23 Jakub Jelinek <jakub@redhat.com>
1141 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1142 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1143 __librt_*_asynccancel@local.
1145 2005-05-17 Alan Modra <amodra@bigpond.net.au>
1147 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1148 all occurrences of JUMPTARGET. Instead append @local to labels.
1150 2005-05-20 Jakub Jelinek <jakub@redhat.com>
1152 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1153 size/alignment of struct pthread rather than tcbhead_t.
1154 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1156 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1158 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1161 2005-05-19 Richard Henderson <rth@redhat.com>
1163 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1164 __sync_val_compare_and_swap, not explicit _si variant.
1165 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1167 2005-05-03 Ulrich Drepper <drepper@redhat.com>
1170 * sysdeps/pthread/pthread.h: Avoid empty initializers.
1172 2005-05-03 Jakub Jelinek <jakub@redhat.com>
1174 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1175 .eh_frame section, use cfi_* directives.
1177 2005-04-27 Jakub Jelinek <jakub@redhat.com>
1179 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1182 2005-04-27 Ulrich Drepper <drepper@redhat.com>
1185 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1188 2005-04-27 Roland McGrath <roland@redhat.com>
1190 * Makefile (tests): Remove tst-clock2.
1192 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1193 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1194 translating to the kernel clockid_t for our own process/thread clock.
1196 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1198 2005-04-15 Jakub Jelinek <jakub@redhat.com>
1200 * old_pthread_cond_init.c: Include <errno.h>.
1201 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1202 process shared or uses clock other than CLOCK_REALTIME.
1203 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1205 2005-04-13 David S. Miller <davem@davemloft.net>
1207 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1208 * sysdeps/sparc/sparc64/clone.S: New file.
1210 2005-04-05 Jakub Jelinek <jakub@redhat.com>
1213 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1214 __inline instead of inline.
1215 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1217 2005-03-31 Jakub Jelinek <jakub@redhat.com>
1219 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1220 functionally equivalent, but shorter instructions.
1221 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1222 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1223 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1225 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1226 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1227 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1228 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1229 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1230 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1231 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1233 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1234 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1235 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1236 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1237 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1239 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
1241 * sysdeps/mips/Makefile: New file.
1242 * sysdeps/mips/nptl-sysdep.S: New file.
1243 * sysdeps/mips/tcb-offsets.sym: New file.
1244 * sysdeps/mips/pthread_spin_lock.S: New file.
1245 * sysdeps/mips/pthread_spin_trylock.S: New file.
1246 * sysdeps/mips/pthreaddef.h: New file.
1247 * sysdeps/mips/tls.h: New file.
1248 * sysdeps/mips/jmpbuf-unwind.h: New file.
1249 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1250 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1251 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1252 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1253 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1254 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1255 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1256 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1257 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1258 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1260 2005-03-23 Ulrich Drepper <drepper@redhat.com>
1263 * pthread_create.c (__pthread_create_2_1): Rename syscall error
1266 2005-03-10 Jakub Jelinek <jakub@redhat.com>
1268 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1270 2005-02-25 Roland McGrath <roland@redhat.com>
1272 * alloca_cutoff.c: Correct license text.
1273 * tst-unload.c: Likewise.
1274 * sysdeps/pthread/allocalim.h: Likewise.
1275 * sysdeps/pthread/pt-initfini.c: Likewise.
1276 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1277 * sysdeps/pthread/bits/sigthread.h: Likewise.
1278 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1279 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1281 2005-02-16 Roland McGrath <roland@redhat.com>
1283 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1284 Use unsigned int * for ptr_nthreads.
1286 2005-02-14 Alan Modra <amodra@bigpond.net.au>
1289 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1292 2005-02-07 Richard Henderson <rth@redhat.com>
1295 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1298 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
1300 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1301 order of arguments in invocation of atomic_add_zero.
1303 2005-01-26 Jakub Jelinek <jakub@redhat.com>
1306 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1307 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1308 at least gotntpoff relocation and addition.
1309 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1311 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1313 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1316 2005-01-06 Ulrich Drepper <drepper@redhat.com>
1318 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1319 entry for static tls deallocation fix.
1320 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1321 also contains information whether the memory pointed to is static
1323 * sysdeps/i386/tls.h: Likewise.
1324 * sysdeps/ia64/tls.h: Likewise.
1325 * sysdeps/powerpc/tls.h: Likewise.
1326 * sysdeps/s390/tls.h: Likewise.
1327 * sysdeps/sh/tls.h: Likewise.
1328 * sysdeps/sparc/tls.h: Likewise.
1329 * sysdeps/x86_64/tls.h: Likewise.
1331 2004-12-27 Ulrich Drepper <drepper@redhat.com>
1333 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1335 2004-12-21 Jakub Jelinek <jakub@redhat.com>
1337 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1339 * Makefile (tests): Add tst-align2.
1340 * tst-align2.c: New test.
1341 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1342 -mpreferred-stack-boundary=4.
1344 2004-12-18 Roland McGrath <roland@redhat.com>
1346 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1347 New file removed withdrawn for the moment.
1349 2004-12-17 Richard Henderson <rth@redhat.com>
1351 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1352 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1354 2004-12-16 Ulrich Drepper <drepper@redhat.com>
1356 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1357 Increased PTHREAD_STACK_MIN.
1359 * tst-context1.c (stacks): Use bigger stack size.
1361 2004-12-16 Jakub Jelinek <jakub@redhat.com>
1363 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1364 * sysdeps/sparc/tcb-offsets.sym: Add TID.
1366 2004-12-15 Jakub Jelinek <jakub@redhat.com>
1368 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1369 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1370 * sysdeps/s390/tcb-offsets.sym (TID): Add.
1372 2004-12-15 Ulrich Drepper <drepper@redhat.com>
1374 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1376 2004-12-14 Ulrich Drepper <drepper@redhat.com>
1378 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1379 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1381 * tst-getpid1.c: If child crashes, report this first. Print which
1384 2004-12-09 Ulrich Drepper <drepper@redhat.com>
1386 * init.c (__pthread_initialize_minimal_internal): Also unblock
1389 2004-12-01 Jakub Jelinek <jakub@redhat.com>
1391 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1392 _POSIX_THREAD_CPUTIME): Define to 0.
1393 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1394 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1395 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1396 __timer_signal_thread_tclk): Remove.
1397 (init_module): Remove their initialization.
1398 (thread_cleanup): Remove their cleanup assertions.
1399 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1400 __timer_signal_thread_tclk): Remove.
1401 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1402 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1403 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1405 2004-12-07 Jakub Jelinek <jakub@redhat.com>
1407 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1408 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1410 * Makefile (tests): Add tst-getpid2.
1411 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1412 (do_test): Use it. Use __clone2 instead of clone on ia64.
1413 * tst-getpid2.c: New test.
1415 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1417 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1419 2004-12-04 Ulrich Drepper <drepper@redhat.com>
1421 * Makefile (tests): Add tst-getpid1.
1422 * tst-getpid1.c: New file.
1423 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1424 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1426 2004-12-02 Roland McGrath <roland@redhat.com>
1428 * Makefile (libpthread-nonshared): Variable removed.
1429 ($(objpfx)libpthread_nonshared.a): Target removed.
1430 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1431 These are now handled by generic magic from
1432 libpthread-static-only-routines being set.
1434 2004-11-27 Ulrich Drepper <drepper@redhat.com>
1436 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1437 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1438 _POSIX_THREAD_PRIO_PROTECT): Define.
1439 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1440 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1441 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1443 2004-11-26 Jakub Jelinek <jakub@redhat.com>
1445 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1446 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1447 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1448 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1449 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1450 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1451 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1453 2004-11-24 Ulrich Drepper <drepper@redhat.com>
1455 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1457 * Makefile (libpthread-routines): Add pthread_setschedprio.
1458 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1459 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1460 * pthread_setschedprio.c: New file.
1462 2004-11-20 Jakub Jelinek <jakub@redhat.com>
1464 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1465 * pthread_cancel.c (pthread_create): Likewise.
1467 * Makefile (libpthread-routines): Add vars.
1468 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1469 * init.c (__default_stacksize, __is_smp): Remove.
1471 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1472 and define a wrapper macro.
1473 (PTHREAD_STATIC_FN_REQUIRE): Define.
1474 * allocatestack.c (__find_thread_by_id): Undefine.
1475 * pthread_create (__pthread_keys): Remove.
1476 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1477 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1478 PTHREAD_STATIC_FN_REQUIRE.
1480 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1482 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1483 parameter to REGISTER macro.
1485 2004-11-17 Roland McGrath <roland@redhat.com>
1487 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1488 Make sure SIGCANCEL is blocked as well.
1490 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1492 * sysdeps/pthread/setxid.h: New file.
1493 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1494 (struct xid_command): Add forward decl.
1495 (struct pthread_functions): Change return type of __nptl_setxid hook
1497 * pthreadP.h (__nptl_setxid): Change return type to int.
1498 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1499 calling thread, return its return value and set errno on failure.
1500 * descr.h (struct xid_command): Change id type to long array.
1502 * Makefile: Add rules to build and test tst-setuid1 and
1504 * tst-setuid1.c: New test.
1505 * tst-setuid1-static.c: New test.
1507 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1509 * Makefile (tests): Add tst-exit3.
1510 * tst-exit3.c: New test.
1512 2004-11-09 Ulrich Drepper <drepper@redhat.com>
1514 * Makefile (tests): Add tst-exit2.
1515 * tst-exit2.c: New file.
1517 2004-11-09 Roland McGrath <roland@redhat.com>
1520 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1521 here, before calling clone.
1522 * pthread_create.c (start_thread): Don't do it here.
1524 2004-11-02 Jakub Jelinek <jakub@redhat.com>
1526 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1528 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1530 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1531 Set ETIMEDOUT to errno when time is up. Tweak to avoid
1534 2004-10-28 Jakub Jelinek <jakub@redhat.com>
1536 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1537 if sched_priority is not between minprio and maxprio.
1539 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1541 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1542 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1544 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1545 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1547 2004-10-24 Ulrich Drepper <drepper@redhat.com>
1549 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1550 not-cancelable I/O functions.
1552 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1554 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1555 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1556 make sure 2 is stored in the futex and we looked at the old value.
1557 Fix a few other problems to return the correct value.
1559 2004-10-14 Richard Henderson <rth@redhat.com>
1561 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1564 2004-10-06 Jakub Jelinek <jakub@redhat.com>
1566 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1567 of pthread-functions.h and pthreaddef.h.
1568 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1570 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1571 Change __data.__nwaiters from int to unsigned int.
1573 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1574 sysconf (_SC_THREAD_CPUTIME) returns negative value.
1576 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1579 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1580 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1582 2004-10-06 Ulrich Drepper <drepper@redhat.com>
1584 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
1585 test fails, remove message queue.
1586 (tf_msgsnd): Likewise.
1588 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1590 * tst-clock1.c: Change #ifdef to #if defined.
1591 * tst-clock2.c: Likewise.
1592 * tst-cond11.c: Likewise.
1594 * sysdeps/pthread/timer_create.c (timer_create): Use
1595 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1596 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1599 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1601 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1602 _POSIX_THREAD_CPUTIME): Define to 0.
1604 2004-10-04 Ulrich Drepper <drepper@redhat.com>
1606 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1607 and _POSIX_THREAD_CPUTIME to zero.
1608 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1609 * tst-barrier2.c: Fix testing for POSIX feature.
1610 * tst-clock1.c: Likewise.
1611 * tst-clock2.c: Likewise.
1612 * tst-cond11.c: Likewise.
1613 * tst-cond4.c: Likewise.
1614 * tst-cond6.c: Likewise.
1615 * tst-flock2.c: Likewise.
1616 * tst-mutex4.c: Likewise.
1617 * tst-mutex9.c: Likewise.
1618 * tst-rwlock12.c: Likewise.
1619 * tst-rwlock4.c: Likewise.
1620 * tst-signal1.c: Likewise.
1621 * tst-spin2.c: Likewise.
1622 * sysdeps/pthread/posix-timer.h: Likewise.
1623 * sysdeps/pthread/timer_create.c: Likewise.
1624 * sysdeps/pthread/timer_routines.c: Likewise.
1626 2004-10-01 Ulrich Drepper <drepper@redhat.com>
1628 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1629 (__lll_mutex_timedlock_wait): Address futex correctly.
1631 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1632 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1633 make sure 2 is stored in the futex and we looked at the old value.
1634 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1635 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
1636 which might very well made the code not working at all before.
1639 2004-09-28 Ulrich Drepper <drepper@redhat.com>
1641 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1642 allow SIGSETXID to be sent.
1643 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1644 for SIGSETXID to be defined.
1645 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1646 SIGSETXID cannot be blocked.
1648 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1649 Add __extension__ to long long types.
1650 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1651 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1652 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1653 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1654 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1655 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1656 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1658 2004-09-25 Ulrich Drepper <drepper@redhat.com>
1660 * descr.h (struct pthread): Add stopped_start field.
1661 * sysdeps/pthread/createthread.c (create_thread): Set
1662 start_stopped flag in descriptor for new thread appropriately.
1663 * pthread_create.c (start_thread): Only take lock to be stopped on
1664 startup if stopped_start flag says so.
1666 2004-09-24 Ulrich Drepper <drepper@redhat.com>
1668 * pthread_create.c (__pthread_create_2_1): Remember whether thread
1669 is created detached and if yes, do not try to free the stack in case
1670 the thread creation failed.
1671 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1672 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1673 case there has been no error. [BZ #405]
1675 * pthread_create.c (start_thread): Don't wait for scheduler data
1676 etc to be set at the beginning of the function. The cancellation
1677 infrastructure must have been set up. And enable async
1678 cancellation before potentially going to sleep. [BZ #401]
1680 2004-09-20 Ulrich Drepper <drepper@redhat.com>
1682 * Versions: Remove exports for pthread_set*id_np functions.
1683 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1685 * Makefile: Don't build pthread_set*id code for now.
1687 2004-09-19 Ulrich Drepper <drepper@redhat.com>
1689 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1691 * allocatestack.c (__nptl_setxid): New function.
1692 * descr.h (struct xid_command): Define type.
1693 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1694 (sighandler_setxid): New function.
1695 (__pthread_initialize_minimal): Register sighandler_setxid for
1697 * pt-allocrtsig.c: Update comment.
1698 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
1699 Declare __nptl_setxid.
1700 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1701 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1702 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1703 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1704 and pthread_setresuid_np.
1705 * pthread_setgid_np.c: New file.
1706 * pthread_setuid_np.c: New file.
1707 * pthread_setegid_np.c: New file.
1708 * pthread_seteuid_np.c: New file.
1709 * pthread_setregid_np.c: New file.
1710 * pthread_setreuid_np.c: New file.
1711 * pthread_setresgid_np.c: New file.
1712 * pthread_setresuid_np.c: New file.
1713 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
1714 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1715 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1716 and pthread_setresuid_np.
1717 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1718 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1719 pthread_setregid, and pthread_setresgid.
1721 2004-09-18 Ulrich Drepper <drepper@redhat.com>
1723 * allocatestack.c (allocate_stack): Return EAGAIN instead of
1724 ENOMEM when out of memory.
1726 2004-09-10 Roland McGrath <roland@redhat.com>
1729 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1730 code, since we don't try to use the broken CLONE_STOPPED any more.
1731 * pthread_create.c (start_thread): Likewise.
1733 2004-09-15 Richard Henderson <rth@redhat.com>
1735 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1737 2004-09-01 David Mosberger <davidm@hpl.hp.com>
1739 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1740 (__libc_unwind_longjmp): Delete macro and declare as function.
1741 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1742 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1744 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1745 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1746 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1748 2004-09-12 Ulrich Drepper <drepper@redhat.com>
1750 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1752 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1753 types also for __USE_XOPEN2K.
1754 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1755 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1756 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1757 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1758 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1759 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1760 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1763 2004-09-08 Ulrich Drepper <drepper@redhat.com>
1765 * sysdeps/pthread/pthread.h
1766 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
1767 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1768 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1769 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
1772 2004-09-07 Ulrich Drepper <drepper@redhat.com>
1774 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1775 PSEUDO to be used with . prefix.
1777 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1778 Use atomic_increment instead of atomic_exchange_and_add.
1779 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1781 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1783 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1786 * allocatestack.c (allocate_stack): Use atomic_increment_val
1787 instead of atomic_exchange_and_add.
1788 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1789 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1791 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1794 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1795 the initialization function might throw.
1797 2005-09-05 Richard Henderson <rth@redhat.com>
1799 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1800 Move definition inside libpthread, libc, librt check. Provide
1801 definition for rtld.
1803 2004-09-02 Ulrich Drepper <drepper@redhat.com>
1805 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1806 * sysdeps/i386/jmpbuf-unwind.h: Likewise
1807 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1808 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1809 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1810 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1811 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1812 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1815 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1816 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1817 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1819 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1820 Decrement __nwaiters. If pthread_cond_destroy has been called and
1821 this is the last waiter, signal pthread_cond_destroy caller and
1822 avoid using the pthread_cond_t structure after unlock.
1823 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1825 Read clock type from the least significant bits of __nwaiters instead
1827 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1828 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1830 2004-08-31 Jakub Jelinek <jakub@redhat.com>
1833 * Makefile (tests): Add tst-cond20 and tst-cond21.
1834 * tst-cond20.c: New test.
1835 * tst-cond21.c: New test.
1836 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1837 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1839 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1841 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1842 (pthread_cond_t): Likewise.
1843 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1845 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1847 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1849 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1850 (cond_nwaiters): New.
1852 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1853 if there are waiters not signalled yet.
1854 Wait until all already signalled waiters wake up.
1855 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1856 __nwaiters. If pthread_cond_destroy has been called and this is the
1857 last waiter, signal pthread_cond_destroy caller and avoid using
1858 the pthread_cond_t structure after unlock.
1859 (__pthread_cond_wait): Increment __nwaiters in the beginning,
1860 decrement it when leaving. If pthread_cond_destroy has been called
1861 and this is the last waiter, signal pthread_cond_destroy caller.
1862 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1863 Likewise. Read clock type from the least significant bits of
1864 __nwaiters instead of __clock.
1865 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1866 whether clock ID can be encoded in COND_CLOCK_BITS bits.
1867 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1868 clock type just from the last COND_CLOCK_BITS bits of value.
1869 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1870 instead of __clock, just from second bit of condattr's value.
1872 2004-08-30 Jakub Jelinek <jakub@redhat.com>
1874 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1875 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
1877 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1879 2004-08-15 Roland McGrath <roland@frob.com>
1881 * pthread_atfork.c: Update copyright terms including special exception
1882 for these trivial files, which are statically linked into executables
1883 that use dynamic linking for the significant library code.
1885 2004-08-09 Jakub Jelinek <jakub@redhat.com>
1887 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1888 pthread_rwlock_rdlock.
1889 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1890 Decrease __nr_readers_queued after reacquiring lock.
1891 * sysdeps/pthread/pthread_rwlock_timedrdlock
1892 (pthread_rwlock_timedrdlock): Likewise.
1893 Reported by Bob Cook <bobcook47@hotmail.com>.
1895 2004-08-11 Jakub Jelinek <jakub@redhat.com>
1897 * tst-rwlock14.c (tf): Read main thread handle from *ARG
1898 before pthread_barrier_wait.
1900 2004-08-07 Ulrich Drepper <drepper@redhat.com>
1902 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1903 Remove unnecessary exception handling data.
1905 2004-07-23 Jakub Jelinek <jakub@redhat.com>
1908 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1909 instead of clockid_t.
1911 2004-07-21 Roland McGrath <roland@redhat.com>
1913 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1915 2004-07-19 Roland McGrath <roland@redhat.com>
1917 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1919 2004-07-02 Roland McGrath <roland@redhat.com>
1921 * configure: Don't exit.
1923 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1925 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1926 (__pthread_cond_timedwait): Check for invalid nanosecond in
1929 2004-07-07 Ulrich Drepper <drepper@redhat.com>
1931 * Makefile: Add rules to build and run tst-fini1.
1932 * tst-fini1.c: New file.
1933 * tst-fini1mod.c: New file.
1935 2004-07-05 Ulrich Drepper <drepper@redhat.com>
1937 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
1938 if no cancellation support is needed.
1939 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1940 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1941 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1942 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1943 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1944 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1945 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1946 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1947 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1949 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
1950 only if not already defined.
1952 2004-07-05 Jakub Jelinek <jakub@redhat.com>
1954 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
1955 constraint "m" instead of "0" for futex.
1957 * shlib-versions: Add powerpc64-.*-linux.*.
1959 2004-07-04 Jakub Jelinek <jakub@redhat.com>
1961 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1962 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
1964 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
1965 1 billion and 64-bit tv_nsec which is valid when truncated to 32
1968 2004-06-29 Roland McGrath <roland@redhat.com>
1970 * Banner: NPTL no longer has its own version number.
1971 * Makefile (nptl-version): Variable removed.
1972 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
1973 using $(version), the glibc version number.
1975 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1977 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1978 Fix branch offset for a PLT entry.
1979 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1981 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1983 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1985 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
1988 2004-06-28 Jakub Jelinek <jakub@redhat.com>
1990 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
1993 2004-06-28 Jakub Jelinek <jakub@redhat.com>
1995 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1996 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
1998 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1999 (pthread_rwlock_timedrdlock): Likewise.
2001 2004-06-22 Jakub Jelinek <jakub@redhat.com>
2003 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2004 Set __r7 to val, not mutex.
2006 2004-06-27 Ulrich Drepper <drepper@redhat.com>
2008 * Makefile: Add rules to build tst-rwlock14.
2009 * tst-rwlock14.c: New file.
2011 2004-06-24 Boris Hu <boris.hu@intel.com>
2013 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
2015 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2017 2004-06-19 Andreas Jaeger <aj@suse.de>
2019 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
2020 assembler in last patch.
2022 2004-06-17 Ulrich Drepper <drepper@redhat.com>
2024 * sysdeps/pthread/pthread_cond_timedwait.c
2025 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
2026 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2027 (__pthread_cond_timedwait): Check for invalid nanosecond in
2029 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2030 * tst-cond19.c: New file.
2031 * Makefile: Add rules to build and run tst-cond19.
2033 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
2035 * tst-context1.c (GUARD_PATTERN): Defined.
2036 (tst_context_t): Define struct containing ucontext_t & guard words.
2037 (ctx): Declare as an array of tst_context_t.
2038 (fct): Verify uc_link & guard words are still valid.
2039 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
2041 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2043 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2044 Add __data.__futex field, reshuffle __data.__clock.
2045 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
2046 (__pthread_cond_signal): Increment __futex at the same time as
2047 __wakeup_seq or __total_seq. Pass address of __futex instead of
2048 address of low 32-bits of __wakeup_seq to futex syscall.
2049 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2050 (__pthread_cond_wait): Likewise. Pass __futex value from before
2051 releasing internal lock to FUTEX_WAIT.
2052 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2053 (__pthread_cond_timedwait): Likewise.
2054 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2055 (FUTEX_CMP_REQUEUE): Define.
2056 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2057 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2058 Pass __futex value from before the unlock and __futex address instead
2059 of address of low 32-bits of __wakeup_seq to futex syscall.
2060 Fallback to FUTEX_WAKE all on any errors.
2062 2004-06-08 Jakub Jelinek <jakub@redhat.com>
2064 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
2066 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
2067 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
2068 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
2069 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
2070 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
2072 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2074 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
2075 Add memory clobber to inline assembly.
2076 (__lll_mutex_trylock): Likewise.
2077 (__lll_mutex_cond_trylock): Likewise.
2079 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
2081 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2082 Pass val argument as 6th system call argument in %r7.
2084 2004-05-21 Jakub Jelinek <jakub@redhat.com>
2086 * Makefile (tests): Add tst-cond16.
2087 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
2088 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
2089 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2090 Add __data.__futex field, reshuffle __data.__clock.
2091 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
2092 (__pthread_cond_signal): Increment __futex at the same time as
2093 __wakeup_seq or __total_seq. Pass address of __futex instead of
2094 address of low 32-bits of __wakeup_seq to futex syscall.
2095 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
2096 (__pthread_cond_wait): Likewise. Pass __futex value from before
2097 releasing internal lock to FUTEX_WAIT.
2098 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
2099 (__pthread_cond_timedwait): Likewise.
2100 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
2101 (FUTEX_CMP_REQUEUE): Define.
2102 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2103 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2104 Pass __futex value from before the unlock and __futex address instead
2105 of address of low 32-bits of __wakeup_seq to futex syscall.
2106 Fallback to FUTEX_WAKE all on any errors.
2107 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
2109 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2110 internally. Return non-zero if error, zero if success.
2111 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2112 Add __data.__futex field, reshuffle __data.__clock.
2113 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
2115 (lll_futex_requeue): Add val argument, return 1 unconditionally
2117 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2118 Add __data.__futex field, reshuffle __data.__clock.
2119 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2121 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2122 internally. Return non-zero if error, zero if success.
2123 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2124 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
2125 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2127 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2128 internally. Return non-zero if error, zero if success.
2129 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2130 Add __data.__futex field, reshuffle __data.__clock.
2131 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
2133 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2134 internally. Return non-zero if error, zero if success.
2135 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2136 Add __data.__futex field, reshuffle __data.__clock.
2137 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2138 Add __data.__futex field, reshuffle __data.__clock.
2139 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2140 Increment __futex at the same time as __wakeup_seq or __total_seq.
2141 Pass address of __futex instead of address of low 32-bits of
2142 __wakeup_seq to futex syscall.
2143 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2144 Pass __futex value from before releasing internal lock
2146 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2147 Likewise. Avoid unnecessary shadowing of variables.
2148 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2149 Set __futex to 2 * __total_seq. Pass __futex value from before the
2150 unlock and __futex address instead of address of low 32-bits of
2151 __wakeup_seq to futex_requeue macro, adjust for new return value
2153 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2154 (__pthread_cond_signal): Increment __futex at the same time as
2155 __wakeup_seq or __total_seq. Pass address of __futex instead of
2156 address of low 32-bits of __wakeup_seq to futex syscall.
2157 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2158 (__pthread_cond_wait): Likewise. Pass __futex value from before
2159 releasing internal lock to FUTEX_WAIT.
2160 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2161 (__pthread_cond_timedwait): Likewise.
2162 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2163 (FUTEX_CMP_REQUEUE): Define.
2164 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2165 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2166 Pass __futex value from before the unlock and __futex address instead
2167 of address of low 32-bits of __wakeup_seq to futex syscall.
2168 Fallback to FUTEX_WAKE all on any errors.
2170 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2172 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2173 Add nop to align the end of critical section.
2174 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2176 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2178 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2179 Add __broadcast_seq field.
2180 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2181 all waiters as woken with woken_seq and bump broadcast counter.
2182 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2183 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
2184 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2185 Comment typo fixes. Avoid returning -ETIMEDOUT.
2187 2004-06-01 Ulrich Drepper <drepper@redhat.com>
2189 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2190 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2191 Reported by Kaz Kojima.
2193 2004-05-25 Jakub Jelinek <jakub@redhat.com>
2195 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2197 2004-05-21 Jakub Jelinek <jakub@redhat.com>
2199 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2200 __broadcast_seq with bc_seq after acquiring internal lock instead of
2203 2004-05-18 Jakub Jelinek <jakub@redhat.com>
2205 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2207 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2208 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2209 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2210 (pthread_cond_t): Add __data.__broadcast_seq field.
2211 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2212 (FRAME_SIZE): Define.
2213 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
2215 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2217 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
2219 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2220 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
2223 2004-05-18 Ulrich Drepper <drepper@redhat.com>
2225 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2226 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2227 Add __broadcast_seq field.
2228 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2229 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2230 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2231 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2232 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2233 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2234 all waiters as woken with woken_seq and bump broadcast counter.
2235 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2236 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2237 __broadcast_seq field.
2238 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2239 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2240 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2241 * pthread_cond_init.c: Initialize __broadcast_seq field.
2242 * Makefile (tests): Add tst-cond17 and tst-cond18.
2243 Add .NOTPARALLEL goal.
2244 * tst-cond16.c: New file. From Jakub.
2245 * tst-cond17.c: New file. From Jakub.
2246 * tst-cond18.c: New file. From Jakub.
2248 2004-05-16 Ulrich Drepper <drepper@redhat.com>
2250 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2253 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2254 Parametrize frame size. Correct some unwind info.
2255 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2257 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2259 * tst-stack3.c: Note testing functionality beyond POSIX.
2261 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2263 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2264 Change conditional from ifdef to if.
2266 2004-04-23 Jakub Jelinek <jakub@redhat.com>
2268 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2269 SYSDEP_CANCEL_ERROR): Define.
2272 2004-05-01 Jakub Jelinek <jakub@redhat.com>
2274 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2276 2004-04-20 Jakub Jelinek <jakub@redhat.com>
2278 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2280 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2282 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2283 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2284 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2285 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2287 2004-04-19 Ulrich Drepper <drepper@redhat.com>
2289 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2290 thread has all signals blocked.
2292 2004-04-18 Andreas Jaeger <aj@suse.de>
2294 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2295 (SEM_VALUE_MAX): Add missing brace.
2297 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2299 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2301 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2302 * sysdeps/pthread/tst-mqueue8x.c: New test.
2303 * tst-cancel4.c: Update comment about message queues.
2305 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2306 return it_value { 0, 0 }.
2307 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2309 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2310 assertion for SIGEV_NONE.
2311 (thread_attr_compare): Compare all attributes, not just a partial
2314 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2316 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2318 2004-04-17 Ulrich Drepper <drepper@redhat.com>
2320 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2321 Just use a plain number.
2322 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2323 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2324 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2325 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2326 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2327 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2328 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2330 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2332 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2334 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2336 2004-04-15 Jakub Jelinek <jakub@redhat.com>
2338 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2339 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2340 of calling sigwaitinfo.
2342 2004-04-16 Ulrich Drepper <drepper@redhat.com>
2344 * allocatestack.c (allocate_stack): Set reported_guardsize
2346 * pthread_getattr_np.c (pthread_getattr_np): Use
2347 reported_guardsize instead of guardsize.
2348 * descr.h (struct pthread): Add reported_guardsize field.
2350 2004-04-13 Jakub Jelinek <jakub@redhat.com>
2352 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2354 2004-04-12 Ulrich Drepper <drepper@redhat.com>
2356 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2358 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2360 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2361 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2362 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2363 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2364 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2366 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2367 (_POSIX_MESSAGE_PASSING): Define.
2368 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2369 (_POSIX_MESSAGE_PASSING): Define.
2370 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2371 (_POSIX_MESSAGE_PASSING): Define.
2373 2004-04-04 Ulrich Drepper <drepper@redhat.com>
2375 * tst-context1.c (fct): Check whether correct stack is used.
2377 2004-04-03 Ulrich Drepper <drepper@redhat.com>
2379 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2380 matching constraints for asm mem parameters.
2382 * tst-clock2.c (tf): Don't define unless needed.
2384 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
2386 * Makefile (link-libc-static): Use $(static-gnulib) instead of
2389 2004-03-30 Ulrich Drepper <drepper@redhat.com>
2391 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2392 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2393 * pthreadP.h: Declare __nptl_deallocate_tsd.
2394 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2397 * Makefile (tests): Add tst-tsd5.
2398 * tst-tsd5.c: New file.
2400 2004-03-29 Ulrich Drepper <drepper@redhat.com>
2402 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2403 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2404 is SHLIB_COMPAT check.
2405 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2406 (__pthread_attr_getaffinity_old): Likewise.
2407 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2408 (__pthread_getaffinity_old): Likewise.
2409 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2410 (__pthread_setaffinity_old): Likewise.
2412 2004-03-26 Ulrich Drepper <drepper@redhat.com>
2414 * allocatestack.c (_make_stacks_executable): Call
2415 _dl_make_stack_executable first.
2417 2004-03-24 Roland McGrath <roland@redhat.com>
2419 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2420 constraint instead of "0".
2422 2004-03-24 Ulrich Drepper <drepper@redhat.com>
2424 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2425 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2427 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2428 code to avoid warning.
2430 2004-03-24 Andreas Jaeger <aj@suse.de>
2432 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2433 (__pthread_attr_setaffinity_old): Remove const.
2435 2004-03-23 Ulrich Drepper <drepper@redhat.com>
2437 * sysdeps/unix/sysv/linux/smp.h: New file.
2438 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2439 * init.c: Define __is_smp.
2440 (__pthread_initialize_minimal_internal): Call is_smp_system to
2441 initialize __is_smp.
2442 * pthreadP.h: Declare __is_smp.
2443 Define MAX_ADAPTIVE_COUNT is necessary.
2444 * pthread_mutex_init.c: Add comment regarding __spins field.
2445 * pthread_mutex_lock.c: Implement adaptive mutex type.
2446 * pthread_mutex_timedlock.c: Likewise.
2447 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2448 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2450 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2451 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2452 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2453 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2454 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2455 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2456 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2457 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2458 lll_mutex_cond_trylock.
2459 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2460 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2461 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2462 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2463 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2464 Define BUSY_WAIT_NOP.
2465 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2466 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2468 * tst-mutex5.c: Add support for testing adaptive mutexes.
2469 * tst-mutex7.c: Likewise.
2470 * tst-mutex5a.c: New file.
2471 * tst-mutex7a.c: New file.
2472 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2474 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2475 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2476 vgettimeofday call might destroy the content.
2478 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2481 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2482 No need to restrict type of ret. Make it int. Add comment.
2484 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2485 Remove unnecessary setne instruction.
2487 2004-03-22 Jakub Jelinek <jakub@redhat.com>
2489 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2490 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2491 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2492 If realloc fails, break out of the loop.
2494 2004-03-20 Andreas Jaeger <aj@suse.de>
2496 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2497 (__pthread_setaffinity_old): Fix interface.
2498 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2499 (__pthread_getaffinity_old): Likewise.
2501 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2502 (__pthread_setaffinity_new): Remove duplicate declaration.
2504 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2506 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2507 the return value to a safe register.
2508 (CDISABLE): Set the function argument correctly.
2510 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2512 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2513 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2514 Rewrite so that only one locked memory operation per round is needed.
2515 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2516 (pthread_barrier_wait): After wakeup, release lock only when the
2517 last thread stopped using the barrier object.
2518 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2519 (__pthread_cond_wait): Don't store mutex address if the current
2520 value is ~0l. Add correct cleanup support and unwind info.
2521 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2522 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2523 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2524 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2525 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2526 Add correct cleanup support and unwind info.
2527 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2528 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2529 information for syscall wrappers.
2531 2004-03-18 Ulrich Drepper <drepper@redhat.com>
2533 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2534 cpusetsize field, remove next.
2535 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2536 parameter for size of the CPU set.
2537 (pthread_setaffinity_np): Likewise.
2538 (pthread_attr_getaffinity_np): Likewise.
2539 (pthread_attr_setaffinity_np): Likewise.
2540 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2541 interface change, keep compatibility code.
2542 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2543 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2544 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2545 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
2546 __pthread_getaffinity_np.
2547 * Versions: Add version for changed interfaces.
2548 * tst-attr3.c: Adjust test for interface change.
2549 * pthread_getattr_np.c: Query the kernel about the affinity mask with
2550 increasing buffer sizes.
2551 * pthread_attr_destroy.c: Remove unused list handling.
2552 * pthread_attr_init.c: Likewise.
2554 2004-03-17 Roland McGrath <roland@redhat.com>
2556 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2557 first argument to clock_getres so we ever enable kernel timers.
2559 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
2561 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2563 2004-03-12 Richard Henderson <rth@redhat.com>
2565 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2566 oldvalue from CENABLE to CDISABLE.
2568 2004-03-12 Ulrich Drepper <drepper@redhat.com>
2570 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2571 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2572 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2573 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2575 2004-03-11 Richard Henderson <rth@redhat.com>
2577 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2578 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2579 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2581 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2583 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2584 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2585 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2587 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2589 * forward.c (__pthread_cond_broadcast_2_0,
2590 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2591 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2592 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2594 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2596 * sysdeps/sh/tcb-offsets.sym: Add PID.
2597 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2598 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2600 2004-03-10 Ulrich Drepper <drepper@redhat.com>
2602 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2603 include <sysdep-cancel.h>, vfork is no cancellation point.
2604 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2605 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2606 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2608 2004-03-10 Jakub Jelinek <jakub@redhat.com>
2610 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2612 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2613 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2615 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2617 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2618 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2619 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2620 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2621 of DO_CALL_VIA_BREAK. Work around a gas problem.
2623 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2624 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2625 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2626 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2627 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2628 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2630 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2631 a local register for saving old PID. Negate PID in parent upon exit.
2633 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2635 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2636 before syscall, set to the old value in the parent afterwards.
2637 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2638 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2640 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2641 before syscall, set to the old value in the parent afterwards.
2642 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2643 * sysdeps/s390/tcb-offsets.sym: Add PID.
2645 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2646 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2647 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2648 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2649 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2650 * sysdeps/sparc/tcb-offsets.sym: Add PID.
2652 2004-03-10 Andreas Schwab <schwab@suse.de>
2654 * sysdeps/ia64/tcb-offsets.sym: Add PID.
2655 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2656 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2658 2004-03-09 Jakub Jelinek <jakub@redhat.com>
2660 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2661 * tst-cancel21.c (do_one_test): Likewise.
2662 Reported by Gordon Jin <gordon.jin@intel.com>.
2664 2004-02-09 Jakub Jelinek <jakub@redhat.com>
2666 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2667 if non-zero and set to INT_MIN if zero.
2668 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2669 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2670 (SAVE_PID, RESTORE_PID): Define.
2672 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2673 Use relative path to avoid including NPTL i386/vfork.S.
2674 (SAVE_PID, RESTORE_PID): Define.
2675 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2676 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2677 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2679 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2680 * tst-vfork1.c: New test.
2681 * tst-vfork2.c: New test.
2682 * tst-vfork1x.c: New test.
2683 * tst-vfork2x.c: New test.
2685 2004-03-08 Ulrich Drepper <drepper@redhat.com>
2687 * sysdeps/i386/tcb-offsets.sym: Add PID.
2688 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2689 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2690 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2692 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
2694 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2696 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
2698 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2701 2004-03-07 Ulrich Drepper <drepper@redhat.com>
2703 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2706 * tst-once4.c: Remove unnecessary macro definition.
2708 * tst-mutex7.c (do_test): Limit thread stack size.
2709 * tst-once2.c (do_test): Likewise.
2710 * tst-tls3.c (do_test): Likewise.
2711 * tst-tls1.c (do_test): Likewise.
2712 * tst-signal3.c (do_test): Likewise.
2713 * tst-kill6.c (do_test): Likewise.
2714 * tst-key4.c (do_test): Likewise.
2715 * tst-join4.c (do_test): Likewise.
2716 * tst-fork1.c (do_test): Likewise.
2717 * tst-context1.c (do_test): Likewise.
2718 * tst-cond2.c (do_test): Likewise.
2719 * tst-cond10.c (do_test): Likewise.
2720 * tst-clock2.c (do_test): Likewise.
2721 * tst-cancel10.c (do_test): Likewise.
2722 * tst-basic2.c (do_test): Likewise.
2723 * tst-barrier4.c (do_test): Likewise.
2725 2004-03-05 Ulrich Drepper <drepper@redhat.com>
2727 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2729 2004-03-01 Ulrich Drepper <drepper@redhat.com>
2731 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2732 (__pthread_cond_timedwait): Optimize wakeup test.
2733 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2734 (__pthread_cond_wait): Likewise.
2735 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2736 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2739 2004-02-29 Ulrich Drepper <drepper@redhat.com>
2741 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2742 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
2743 the atomic instruction needed.
2744 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2745 (__lll_mutex_lock_wait): Likewise.
2747 2004-02-28 Ulrich Drepper <drepper@redhat.com>
2749 * Makefile (tests): Add tst-cond14 and tst-cond15.
2750 * tst-cond14.c: New file.
2751 * tst-cond15.c: New file.
2753 2004-02-27 Ulrich Drepper <drepper@redhat.com>
2755 * sysdeps/pthread/createthread.c (create_thread): Remove use of
2756 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
2757 needs to be implemented differently to be useful.
2759 2004-02-26 Ulrich Drepper <drepper@redhat.com>
2761 * pthread_attr_setschedparam.c: Don't test priority against limits
2762 here. Set ATTR_FLAG_SCHED_SET flag.
2763 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
2764 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
2765 from parent thread to child. If attribute is used and scheduling
2766 parameters are not inherited, copy parameters from attribute or
2767 compute them. Check priority value.
2768 * pthread_getschedparam.c: If the parameters aren't known yet get
2769 them from the kernel.
2770 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
2771 ATTR_FLAG_POLICY_SET flag for thread.
2772 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
2773 and ATTR_FLAG_POLICY_SET.
2775 * sysdeps/pthread/createthread.c: Use tgkill if possible.
2777 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2778 fail if stack address hasn't been set. Just return 0.
2780 2004-02-25 Ulrich Drepper <drepper@redhat.com>
2782 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
2783 libpthread for the files in this list.
2784 (CFLAGS-tst-unload): Removed.
2785 * tst-unload.c (do_test): Don't use complete path for
2788 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2791 2004-02-22 Ulrich Drepper <drepper@redhat.com>
2793 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2794 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2795 operation per round is needed.
2796 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2797 (__lll_mutex_lock_wait): Likewise.
2799 2004-02-20 Ulrich Drepper <drepper@redhat.com>
2801 * tst-cancel9.c (cleanup): Don't print to stderr.
2803 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2805 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2807 2004-02-20 Jakub Jelinek <jakub@redhat.com>
2809 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2810 (__syscall_error_handler2): Call CDISABLE.
2811 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2812 (__syscall_error_handler2): Call CDISABLE.
2814 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2815 Release lock before the loop, don't reacquire it.
2817 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2819 2004-02-19 Andreas Schwab <schwab@suse.de>
2821 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2824 2004-02-18 Ulrich Drepper <drepper@redhat.com>
2826 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2827 (pthread_barrier_wait): After wakeup, release lock only when the
2828 last thread stopped using the barrier object.
2829 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2830 (pthread_barrier_wait): Likewise.
2831 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2833 * Makefile (tests): Add tst-barrier4.
2834 * tst-barrier4.c: New file.
2836 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2837 (__pthread_cond_timedwait): Perform timeout test while holding
2838 internal lock to prevent wakeup race.
2839 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2840 * sysdeps/pthread/pthread_cond_timedwait.c
2841 (__pthread_cond_timedwait): Likewise.
2842 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2843 (__pthread_cond_timedwait): Likewise.
2845 2004-02-18 Jakub Jelinek <jakub@redhat.com>
2847 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2848 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2849 * Makefile (tests): Add tst-rwlock13.
2850 * tst-rwlock13.c: New test.
2852 2004-02-16 Ulrich Drepper <drepper@redhat.com>
2854 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2855 (__condvar_tw_cleanup): Little optimization.
2856 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2858 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
2860 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2861 libpthread as "lib" parameter to SHLIB_COMPAT.
2862 (__novmx_siglongjmp): Fix typo in function name.
2863 (__novmx_longjmp): Fix typo in function name.
2865 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2867 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2870 * sysdeps/generic/pt-longjmp.c: Moved to...
2871 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
2873 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
2875 * Makefile (libpthread-routines): Add pt-cleanup.
2876 * pt-longjmp.c: Removed.
2877 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2878 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2879 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2880 Version longjmp, siglongjmp for GLIBC_2.3.4.
2881 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2883 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2885 * sysdeps/pthread/pthread_cond_timedwait.c
2886 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
2887 Reuse code. Add __builtin_expects.
2889 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2890 (__pthread_cond_timedwait): Get internal lock in case timeout has
2891 passed before the futex syscall.
2892 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2894 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2896 * allocatestack.c: Pretty printing.
2898 * sysdeps/pthread/createthread.c (create_thread): Don't add
2899 CLONE_DETACHED bit if it is not necessary.
2901 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2903 * pthread_getattr_np.c: Include ldsodefs.h.
2905 2004-01-16 Richard Henderson <rth@redhat.com>
2907 * allocatestack.c: Don't declare __libc_stack_end.
2908 * init.c (__pthread_initialize_minimal_internal): Likewise.
2909 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
2911 2004-01-15 Richard Henderson <rth@redhat.com>
2913 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2914 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2915 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2916 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2917 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2918 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2919 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2920 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
2922 2004-01-14 Ulrich Drepper <drepper@redhat.com>
2924 * init.c (pthread_functions): Make array const.
2926 2004-01-13 Ulrich Drepper <drepper@redhat.com>
2928 * allocatestack.c (__make_stacks_executable): Change interface.
2929 Check parameters. Pass parameter on to libc counterpart.
2930 * pthreadP.h: Change declaration.
2932 2004-01-13 Richard Henderson <rth@redhat.com>
2934 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
2936 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
2939 * sysdeps/alpha/Makefile: New file.
2940 * sysdeps/alpha/tcb-offsets.sym: New file.
2941 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2942 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
2944 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
2947 2004-01-08 Jakub Jelinek <jakub@redhat.com>
2949 * Makefile (tests): Add tst-backtrace1.
2950 * tst-backtrace1.c: New test.
2952 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
2954 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
2955 register as second parameter to the REGISTER macro.
2956 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
2957 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
2958 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
2959 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
2960 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
2961 of thread register as second parameter to REGISTER macro in 64 case.
2963 2004-01-03 Ulrich Drepper <drepper@redhat.com>
2965 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
2966 (CFLAGS-getpid.o): Defined.
2967 (CFLAGS-getpid.os): Defined.
2969 2003-12-31 Ulrich Drepper <drepper@redhat.com>
2971 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
2972 returned for main thread does not overlap with any other VMA.
2973 Patch by Jakub Jelinek.
2975 2003-12-29 Jakub Jelinek <jakub@redhat.com>
2977 * tst-raise1.c: Include stdio.h.
2979 2003-12-23 Jakub Jelinek <jakub@redhat.com>
2981 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
2982 setting with __ASSUME_TGKILL || defined __NR_tgkill.
2983 If pid is 0, set it to selftid.
2984 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
2985 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
2986 != 0, return self->tid without doing a syscall.
2987 * descr.h (struct pthread): Move pid field after tid.
2989 * Makefile (tests): Add tst-raise1.
2990 * tst-raise1.c: New file.
2992 2003-12-23 Roland McGrath <roland@redhat.com>
2994 * tst-oddstacklimit.c: New file.
2995 * Makefile (tests): Add it.
2996 (tst-oddstacklimit-ENV): New variable.
2998 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
2999 value up to page size for __default_stacksize.
3001 2003-12-21 Ulrich Drepper <drepper@redhat.com>
3003 * Makefile (tests): Add tst-eintr5.
3004 * tst-eintr5.c: New file.
3006 * eintr.c (eintr_source): Prevent sending signal to self.
3008 * tst-eintr2.c (tf1): Improve error message.
3010 2003-12-20 Ulrich Drepper <drepper@redhat.com>
3012 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
3013 * sysdeps/unix/sysv/linux/getpid.c: New file.
3014 * pthread_cancel.c: Add comment explaining use of PID field.
3015 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3016 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
3017 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
3018 temporarily to signal the field must not be relied on and updated
3020 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
3021 temporarily negative.
3022 * sysdeps/unix/sysv/linux/raise.c: Likewise.
3024 2003-12-19 Ulrich Drepper <drepper@redhat.com>
3026 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
3027 (eintr_source): If ARG != NULL, use pthread_kill.
3028 * tst-eintr1.c: Adjust for this change.
3029 * tst-eintr2.c: Likewise.
3030 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
3031 * tst-eintr3.c: New file.
3032 * tst-eintr4.c: New file.
3034 2003-12-19 Jakub Jelinek <jakub@redhat.com>
3036 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
3037 if CANCELSTATE_BITMASK is set.
3038 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
3041 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
3042 (tests-reverse): Add tst-cancel23.
3043 * tst-cancel22.c: New test.
3044 * tst-cancel23.c: New test.
3046 2003-12-18 Ulrich Drepper <drepper@redhat.com>
3048 * tst-eintr1.c: Better error messages.
3050 * Makefile (tests): Add tst-eintr2.
3051 * tst-eintr2.c: New file.
3053 2003-12-18 Jakub Jelinek <jakub@redhat.com>
3055 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
3056 (CFLAGS-tst-cancelx21.c): Set.
3057 * tst-cancel21.c: New test.
3058 * tst-cancelx21.c: New test.
3060 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
3062 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
3063 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
3064 * pt-longjmp.c: Include jmpbuf-unwind.h.
3065 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
3066 _JMPBUF_UNWINDS. Adjust compared pointers.
3067 * init.c (__pthread_initialize_minimal_internal): Initialize
3068 pd->stackblock_size.
3069 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
3070 * sysdeps/alpha/jmpbuf-unwind.h: New file.
3071 * sysdeps/i386/jmpbuf-unwind.h: New file.
3072 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
3073 * sysdeps/s390/jmpbuf-unwind.h: New file.
3074 * sysdeps/sh/jmpbuf-unwind.h: New file.
3075 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
3076 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
3077 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
3078 (_JMPBUF_CFA_UNWINDS): Remove.
3079 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
3081 2003-12-12 Jakub Jelinek <jakub@redhat.com>
3083 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
3084 (CFLAGS-tst-cancelx20.c): Set.
3085 * tst-cancel20.c: New test.
3086 * tst-cancelx20.c: New test.
3088 2003-12-17 Ulrich Drepper <drepper@redhat.com>
3090 * init.c (__pthread_initialize_minimal_internal): Don't treat
3091 architectures with separate register stack special here when
3092 computing default stack size.
3094 2003-12-17 Roland McGrath <roland@redhat.com>
3096 * Makefile (tst-cancelx7-ARGS): New variable.
3097 Reportd by Greg Schafer <gschafer@zip.com.au>.
3099 2003-12-17 Jakub Jelinek <jakub@redhat.com>
3101 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
3102 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
3103 (tst-stack3-ENV): Set.
3104 ($(objpfx)tst-stack3-mem): New.
3105 * tst-stack3.c: New test.
3107 2003-12-10 David Mosberger <davidm@hpl.hp.com>
3109 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
3110 Add unwind directives. Drop unused .regstk directive.
3111 (_fini_EPILOG_BEGINS): Add unwind directives.
3113 2003-12-11 Ulrich Drepper <drepper@redhat.com>
3115 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3116 Assume parameter is a pointer.
3117 (lll_futex_wake): Likewise.
3118 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
3120 (lll_futex_wake): Likewise.
3121 Reported by Boris Hu.
3122 * sysdeps/unix/sysv/linux/unregister-atfork.c
3123 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
3125 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
3127 2003-12-10 Ulrich Drepper <drepper@redhat.com>
3129 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
3130 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
3131 __rtld_lock_initialize for ld.so lock.
3132 Patch in part by Adam Li <adam.li@intel.com>.
3134 2003-12-02 David Mosberger <davidm@hpl.hp.com>
3136 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
3137 in $(gnulib). Also, remove stale comment.
3139 2003-11-12 David Mosberger <davidm@hpl.hp.com>
3141 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3142 advantage of new syscall stub and optimize accordingly.
3144 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3145 from SYS_futex, to match expectations of
3146 sysdep.h:DO_INLINE_SYSCALL.
3147 (lll_futex_clobbers): Remove.
3148 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3149 (lll_futex_wake): Likewise.
3150 (lll_futex_requeue): Likewise.
3151 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3152 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3154 (__lll_mutex_lock): Likewise.
3155 (__lll_mutex_cond_lock): Likewise.
3156 (__lll_mutex_timed_lock): Likewise.
3157 (__lll_mutex_unlock): Likewise.
3158 (__lll_mutex_unlock_force): Likewise.
3160 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3161 comes before the include of <sysdep.h>.
3162 (THREAD_SELF_SYSINFO): New macro.
3163 (THREAD_SYSINFO): Likewise.
3164 (INIT_SYSINFO): New macro.
3165 (TLS_INIT_TP): Call INIT_SYSINFO.
3167 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3169 * sysdeps/pthread/createthread.c (create_thread): Use
3170 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3171 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3172 THREAD_SELF_SYSINFO instead of open code.
3173 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3174 (THREAD_SYSINFO): Likewise.
3176 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3178 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3180 2003-12-06 Ulrich Drepper <drepper@redhat.com>
3182 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3183 instead of .init. Patch by David Mosberger.
3185 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
3187 * sysdeps/pthread/configure.in: Remove broken declaration in C
3188 cleanup handling check.
3190 2003-11-30 Andreas Jaeger <aj@suse.de>
3192 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
3193 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
3196 2003-11-27 Jakub Jelinek <jakub@redhat.com>
3198 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3199 * pthread_attr_destroy.c: Include shlib-compat.h.
3200 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3201 is set in iattr->flags.
3202 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3204 2003-11-21 Jakub Jelinek <jakub@redhat.com>
3206 * Makefile (distribute): Add tst-cleanup4aux.c.
3208 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
3211 2003-11-21 Ulrich Drepper <drepper@redhat.com>
3213 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3214 pthread_cond_signal.
3216 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3217 store mutex address if the current value is ~0l.
3218 * sysdeps/pthread/pthread_cond_timedwait.c
3219 (__pthread_cond_timedwait): Likewise.
3220 * sysdeps/pthread/pthread_cond_broadcast.c
3221 (__pthread_cond_broadcast): Don't use requeue for pshared
3224 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3225 (__pthread_cond_wait): Don't store mutex address if the current
3227 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3228 (__pthread_cond_timedwait): Likewise.
3229 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3230 (__pthread_cond_broadcast): Don't use requeue for pshared
3233 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3234 element with ~0l for pshared condvars, with NULL otherwise.
3236 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3237 (__pthread_cond_wait): Don't store mutex address if the current
3239 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3240 (__pthread_cond_timedwait): Likewise.
3241 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3242 (__pthread_cond_broadcast): Don't use requeue for pshared
3245 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3246 * tst-cond12.c: New file.
3247 * tst-cond13.c: New file.
3249 2003-11-17 Ulrich Drepper <drepper@redhat.com>
3251 * sysdeps/pthread/configure.in: Make missing forced unwind support
3254 2003-11-11 Ulrich Drepper <drepper@redhat.com>
3256 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3258 2003-11-06 Ulrich Drepper <drepper@redhat.com>
3260 * Makefile: Add magic to clean up correctly.
3262 2003-11-05 Jakub Jelinek <jakub@redhat.com>
3264 * unwind.c (FRAME_LEFT): Define.
3265 (unwind_stop): Handle old style cleanups here.
3266 (__pthread_unwind): Handle old style cleanups only if
3267 !HAVE_FORCED_UNWIND.
3268 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3269 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3270 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3271 ($(objpfx)tst-cleanupx4): Likewise.
3272 * tst-cleanup4.c: New test.
3273 * tst-cleanup4aux.c: New.
3274 * tst-cleanupx4.c: New test.
3276 2003-11-04 Ulrich Drepper <drepper@redhat.com>
3278 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3279 lll_mutex_*lock macros to skip atomic operations on some archs.
3281 2003-11-03 Ulrich Drepper <drepper@redhat.com>
3283 * sysdeps/pthread/tst-timer.c (main): Initialize
3284 sigev2.sigev_value as well.
3286 2003-10-15 Roland McGrath <roland@redhat.com>
3288 * sysdeps/pthread/configure.in: Barf if visibility attribute support
3290 * sysdeps/pthread/configure: Regenerated.
3292 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3294 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3295 locking macros. No distinction between normal and mutex locking
3297 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3298 Merge bits from lowlevelmutex.S we still need.
3299 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3300 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3301 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3302 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3303 new mutex implementation.
3304 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3305 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3306 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3307 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3308 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3309 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3310 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3311 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3312 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3313 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3314 symbol for entry point to avoid cancellation.
3316 2003-10-07 Jakub Jelinek <jakub@redhat.com>
3318 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3320 (SAVE_OLDTYPE_0): Fix a typo.
3322 2003-10-03 Ulrich Drepper <drepper@redhat.com>
3324 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3325 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
3327 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3329 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3332 2003-10-02 Jakub Jelinek <jakub@redhat.com>
3334 * Makefile (tests): Add tst-cancel19.
3335 * tst-cancel19.c: New test.
3337 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3339 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3340 restoring of the old cancellation type.
3342 2003-09-30 Jakub Jelinek <jakub@redhat.com>
3344 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3346 2003-09-27 Wolfram Gloger <wg@malloc.de>
3348 * sysdeps/pthread/malloc-machine.h: New file
3350 2003-09-24 Roland McGrath <roland@redhat.com>
3352 * allocatestack.c (__make_stacks_executable): Don't ignore return
3353 value from _dl_make_stack_executable.
3355 2003-09-24 Ulrich Drepper <drepper@redhat.com>
3357 * allocatestack.c (__make_stacks_executable): Also change
3358 permission of the currently unused stacks.
3360 * allocatestack.c (change_stack_perm): Split out from
3361 __make_stacks_executable.
3362 (allocate_stack): If the required permission changed between the time
3363 we started preparing the stack and queueing it, change the permission.
3364 (__make_stacks_executable): Call change_stack_perm.
3366 * Makefile: Build tst-execstack-mod locally.
3367 * tst-execstack-mod.c: New file.
3369 2003-09-23 Jakub Jelinek <jakub@redhat.com>
3371 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3373 2003-09-23 Roland McGrath <roland@redhat.com>
3375 * tst-execstack.c: New file.
3376 * Makefile (tests): Add it.
3377 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3378 (LDFLAGS-tst-execstack): New variable.
3380 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3381 whether to use PROT_EXEC for stack mmap.
3382 (__make_stacks_executable): New function.
3383 * pthreadP.h: Declare it.
3384 * init.c (__pthread_initialize_minimal_internal): Set
3385 GL(dl_make_stack_executable_hook) to that.
3387 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3389 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3390 recommendation from AMD re avoidance of lock prefix.
3392 2003-09-22 Jakub Jelinek <jakub@redhat.com>
3394 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3395 lll_futex_timed_wait instead of lll_futex_wait.
3396 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3397 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3398 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3399 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3400 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3401 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3402 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3403 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3404 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3405 Completely revamp the locking macros. No distinction between
3406 normal and mutex locking anymore.
3407 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3408 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3409 __lll_lock_timedwait): Fix prototypes.
3410 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3411 __lll_lock_timedwait): Likewise.
3412 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3413 macros, add __builtin_expect.
3414 (lll_mutex_timedlock): Likewise. Fix return value.
3415 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3416 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3417 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3418 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3419 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3420 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3421 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3422 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3424 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3426 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3427 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3428 operation if possible.
3430 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3431 like jumping over the lock prefix.
3433 2003-09-21 Ulrich Drepper <drepper@redhat.com>
3435 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3436 locking macros. No distinction between normal and mutex locking
3438 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3439 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3440 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3441 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3442 locking. Merge bits from lowlevelmutex.S we still need.
3443 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3444 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3445 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3446 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3447 * Makefile (routines): Remove libc-lowlevelmutex.
3448 (libpthread-rountines): Remove lowlevelmutex.
3449 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3450 for new mutex implementation.
3451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3452 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3453 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3454 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3455 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3457 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3459 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3460 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3461 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3462 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3463 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3464 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3465 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3466 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3468 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3470 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3471 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3472 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3474 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3475 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3477 2003-09-20 Ulrich Drepper <drepper@redhat.com>
3479 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3480 in parameters of asm with output parameters.
3482 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3483 type of DECR parameter to int.
3484 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3486 2003-09-18 Jakub Jelinek <jakub@redhat.com>
3488 * tst-attr3.c (tf, do_test): Print stack start/end/size and
3489 guardsize for each thread.
3491 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3493 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3494 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3495 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3497 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3498 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3500 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3501 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3502 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3503 (pthread_getaffinity_np): Add hidden_def.
3505 * Makefile (tests): Add tst-attr3.
3506 * tst-attr3.c: New test.
3508 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3510 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3512 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3513 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3515 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3517 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3518 * tst-align.c: Include tst-stack-align.h.
3519 (tf, do_test): Use TEST_STACK_ALIGN macro.
3521 2003-09-17 Ulrich Drepper <drepper@redhat.com>
3523 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3526 2003-09-16 Ulrich Drepper <drepper@redhat.com>
3528 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3529 stack-related values for the initial thread.
3531 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3533 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3535 2003-09-11 Ulrich Drepper <drepper@redhat.com>
3537 * pthread_mutex_lock.c: Minor code rearrangements.
3539 2003-09-05 Roland McGrath <roland@redhat.com>
3541 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3542 Instead, include ../nptl_db/db_info.c to do its magic.
3543 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3544 (__pthread_pthread_key_2ndlevel_size): Likewise.
3545 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3546 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3547 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3548 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3549 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3550 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3551 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3552 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3553 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3554 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3555 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3556 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3557 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3558 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3559 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3560 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3561 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3563 2003-09-08 Ulrich Drepper <drepper@redhat.com>
3565 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3566 of pthread_t to be compatible with LT.
3567 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3568 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3569 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3570 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3571 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3572 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3573 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3575 2003-09-04 Ulrich Drepper <drepper@redhat.com>
3577 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3579 2003-09-04 Jakub Jelinek <jakub@redhat.com>
3581 * unwind-forcedunwind.c: Move to...
3582 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3583 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3584 * sysdeps/pthread/jmpbuf-unwind.h: New file.
3585 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3586 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3587 * unwind.c: Include jmpbuf-unwind.h.
3588 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3590 2003-09-02 Jakub Jelinek <jakub@redhat.com>
3592 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3593 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3594 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3595 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3596 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3597 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3598 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3599 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3600 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3601 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3602 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3604 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3605 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3606 * Makefile (tests): Add tst-stack2.
3607 * tst-stack2.c: New test.
3608 * tst-stack1.c: Include limits.h and sys/param.h.
3609 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3611 * pthread_condattr_setpshared.c: Include errno.h.
3612 (pthread_condattr_setpshared): Return EINVAL if pshared
3613 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3615 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3616 defined symbol for entry point to avoid cancellation.
3617 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3619 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3621 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3623 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3625 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3627 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3628 __close_nocancel, __read_nocancel, __write_nocancel,
3629 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
3630 libpthread.so or librt.so, define to corresponding function
3631 without _nocancel suffix.
3632 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3633 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3634 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3636 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3638 2003-09-02 Ulrich Drepper <drepper@redhat.com>
3640 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3641 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3643 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3644 in subsections has a symbol associated with it.
3646 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3647 defined symbol for entry point to avoid cancellation.
3648 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3650 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3652 * Makefile (tests): Add tst-tls5.
3653 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3654 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3655 ($(objpfx)tst-tls5): New.
3656 ($(objpfx)tst-tls6.out): Likewise.
3657 (tests): Depend on $(objpfx)tst-tls6.out.
3658 * tst-tls3.c: Include stdint.h and pthreaddef.h.
3659 (do_test): Check pthread_self () return value alignment.
3660 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3661 (tf): Check pthread_self () return value alignment.
3662 * tst-tls5.c: New test.
3664 * tst-tls5mod.c: New.
3665 * tst-tls5moda.c: New.
3666 * tst-tls5modb.c: New.
3667 * tst-tls5modc.c: New.
3668 * tst-tls5modd.c: New.
3669 * tst-tls5mode.c: New.
3670 * tst-tls5modf.c: New.
3671 * tst-tls6.sh: New test.
3673 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3674 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3675 * init.c (pthread_functions): Initialize them.
3676 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3677 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3678 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3679 pthread_cond_timedwait@@GLIBC_2.3.2.
3681 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3683 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3684 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3685 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3686 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3687 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3688 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3690 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3692 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3693 _POSIX_THREAD_PRIORITY_SCHEDULING.
3694 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3696 2003-08-31 Ulrich Drepper <drepper@redhat.com>
3698 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3699 nested function, use static inline function from libio.h.
3700 Code by Richard Henderson.
3702 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3705 2003-08-30 Jakub Jelinek <jakub@redhat.com>
3707 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3708 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3709 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3710 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3711 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3712 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3713 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3714 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3715 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3716 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3717 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3718 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3719 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3720 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3721 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3722 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3723 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3724 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3725 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3726 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3727 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3728 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3729 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3730 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3731 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3732 * sysdeps/sparc/tls.h: New file.
3733 * sysdeps/sparc/tcb-offsets.sym: New file.
3734 * sysdeps/sparc/Makefile: New file.
3735 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3736 * init.c [__sparc__] (__NR_set_tid_address): Define.
3738 2003-08-29 Jakub Jelinek <jakub@redhat.com>
3740 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3741 _IO_release_lock): Define.
3743 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
3745 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3746 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
3748 2003-08-27 Ulrich Drepper <drepper@redhat.com>
3750 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3751 (__pthread_cleanup_class): Add missing return types of member
3754 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
3756 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3757 (lll_mutex_unlock_force): Add memory barrier between store and futex
3760 2003-08-25 Ulrich Drepper <drepper@redhat.com>
3762 * tst-cancel4.c (do_test): Also unlink tempfname and remove
3763 tempmsg in first loop.
3765 2003-08-18 Ulrich Drepper <drepper@redhat.com>
3767 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3768 _POSIX_THREAD_PRIORITY_SCHEDULING.
3769 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3771 2003-08-07 Jakub Jelinek <jakub@redhat.com>
3773 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
3774 (__rtld_lock_default_lock_recursive,
3775 __rtld_lock_default_unlock_recursive): Define.
3776 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3777 __rtld_lock_unlock_recursive): Define using
3778 GL(_dl_rtld_*lock_recursive).
3779 * init.c (__pthread_initialize_minimal_internal): Initialize
3780 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3781 Lock GL(_dl_load_lock) the same number of times as
3782 GL(_dl_load_lock) using non-mt implementation was nested.
3784 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3785 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3787 2003-08-06 Jakub Jelinek <jakub@redhat.com>
3789 * tst-cancel17.c (do_test): Make len2 maximum of page size and
3792 2003-08-07 Jakub Jelinek <jakub@redhat.com>
3794 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3796 2003-08-03 Jakub Jelinek <jakub@redhat.com>
3798 * sysdeps/pthread/createthread.c (do_clone): Move error handling
3799 to first syscall error check. Move syscall error check for tkill
3800 into __ASSUME_CLONE_STOPPED #ifdef.
3802 2003-08-02 Ulrich Drepper <drepper@redhat.com>
3804 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3805 is not defined, do explicit synchronization.
3806 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
3807 is not defined also unlock pd->lock for non-debugging case in case
3809 * pthread_create.c (start_thread): Always get and release pd->lock
3810 if __ASSUME_CLONE_STOPPED is not defined.
3811 (start_thread_debug): Removed. Adjust users.
3812 * allocatestack.c (allocate_stack): Always initialize lock if
3813 __ASSUME_CLONE_STOPPED is not defined.
3814 * Makefile (tests): Add tst-sched1.
3815 * tst-sched1.c: New file.
3817 * sysdeps/pthread/createthread.c (do_clone): Only use
3818 sched_setschduler and pass correct parameters.
3820 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3822 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3823 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3824 PTHREAD_STACK_MIN in comments.
3826 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3828 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3829 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3831 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3832 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3833 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3834 (__pthread_cleanup_upto): Fix prototype.
3835 (_longjmp_unwind): Adjust caller.
3836 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3837 Change second argument to const struct pointer.
3838 * tst-sem8.c (main): Remove unused s2 and s3 variables.
3839 * tst-sem9.c (main): Likewise.
3840 * unwind.c: Include string.h for strlen prototype.
3842 2003-07-31 Ulrich Drepper <drepper@redhat.com>
3844 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3845 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3846 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3848 Patch by Nicholas Miell <nmiell@attbi.com>.
3850 2003-07-30 Jakub Jelinek <jakub@redhat.com>
3852 * init.c (__pthread_initialize_minimal_internal): Initialize
3853 GL(dl_init_static_tls).
3854 * pthreadP.h (__pthread_init_static_tls): New prototype.
3855 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3857 * Makefile (tests): Add tst-tls4.
3858 (modules-names): Add tst-tls4moda and tst-tls4modb.
3859 ($(objpfx)tst-tls4): Link against libdl and libpthread.
3860 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3862 * tst-tls4.c: New file.
3863 * tst-tls4moda.c: New file.
3864 * tst-tls4modb.c: New file.
3866 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
3868 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3869 before __timer_dealloc.
3870 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3871 Don't call list_unlink.
3873 2003-07-29 Roland McGrath <roland@redhat.com>
3875 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3877 2003-07-25 Jakub Jelinek <jakub@redhat.com>
3879 * tst-cancel17.c (do_test): Check if aio_cancel failed.
3880 Don't reuse struct aiocb A if it failed.
3881 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3882 not just one byte, as that does not block.
3884 2003-07-22 Jakub Jelinek <jakub@redhat.com>
3886 * sysdeps/pthread/unwind-resume.c: New file.
3887 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3888 unwind-resume in csu subdir.
3889 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3891 (librt-sysdep_routines, librt-shared-only-routines): Add
3893 * sysdeps/pthread/rt-unwind-resume.c: New file.
3894 * unwind-forcedunwind.c: New file.
3895 * Makefile (libpthread-routines): Add unwind-forcedunwind.
3896 (libpthread-shared-only-routines): Likewise.
3897 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3898 * pthreadP.h (pthread_cancel_init): New prototype.
3899 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3901 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3902 attr argument const struct pthread_attr *.
3904 * res.c (__res_state): Return __resp.
3905 * descr.h: Include resolv.h.
3906 (struct pthread): Add res field.
3907 * pthread_create.c: Include resolv.h.
3908 (start_thread): Initialize __resp.
3909 * Makefile (tests): Add tst-_res1.
3910 (module-names): Add tst-_res1mod1, tst-_res1mod2.
3911 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3912 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3914 * tst-_res1.c: New file.
3915 * tst-_res1mod1.c: New file.
3916 * tst-_res1mod2.c: New file.
3918 2003-07-21 Ulrich Drepper <drepper@redhat.com>
3920 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
3922 * Makefile: Define various *-no-z-defs variables for test DSOs
3923 which has undefined symbols.
3925 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
3927 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3928 Retry if the stwcx fails to store once_control.
3930 2003-07-20 Ulrich Drepper <drepper@redhat.com>
3932 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
3933 pthread_attr_setaffinity.
3934 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
3935 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
3936 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
3937 * pthread_attr_destroy.c: Free cpuset element if allocated.
3938 * pthread_create.c: Pass iattr as additional parameter to
3940 * sysdeps/pthread/createthread.c: If attribute is provided and
3941 a new thread is created with affinity set or scheduling parameters,
3942 start thread with CLONE_STOPPED.
3943 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
3944 pthread_attr_setaffinity.
3945 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
3948 2003-07-15 Ulrich Drepper <drepper@redhat.com>
3950 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
3952 2003-07-14 Ulrich Drepper <drepper@redhat.com>
3954 * sysdeps/pthread/configure.in: Require CFI directives also for
3957 2003-07-15 Jakub Jelinek <jakub@redhat.com>
3959 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3962 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3964 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
3966 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
3967 registers as variables. Call __pthread_mutex_unlock_usercnt.
3968 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3969 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
3970 not self pointer in __writer. Compare with TID to determine
3972 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3973 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3975 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3977 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
3978 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
3979 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
3980 macros also when compiling librt.
3982 2003-07-11 Jakub Jelinek <jakub@redhat.com>
3984 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
3985 -fasynchronous-unwind-tables.
3986 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3987 (PSEUDO): Add cfi directives.
3988 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
3990 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3993 2003-07-08 Jakub Jelinek <jakub@redhat.com>
3995 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
3996 __pthread_unregister_cancel): Add prototypes and hidden_proto.
3997 * unwind.c (__pthread_unwind_next): Add hidden_def.
3998 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
4000 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4001 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4002 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4004 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
4005 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4007 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
4008 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
4009 __pthread_unregister_cancel and __pthread_unwind_next.
4011 2003-07-04 Jakub Jelinek <jakub@redhat.com>
4013 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
4014 different symbol for the cancellation syscall wrapper and
4015 non-cancellation syscall wrapper.
4016 (PSEUDO_END): Define.
4018 2003-07-05 Richard Henderson <rth@redhat.com>
4020 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
4021 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
4022 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4023 return actual return value from the syscall, not 0.
4025 2003-07-07 Ulrich Drepper <drepper@redhat.com>
4027 * descr.h (struct pthread): Add pid field.
4028 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
4029 (__reclaim_stacks): Likewise.
4030 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
4031 also check for PID of the signal source.
4032 (__pthread_initialize_minimal_internal): Also initialize pid field
4033 of initial thread's descriptor.
4034 * pthread_cancel.c: Use tgkill instead of tkill if possible.
4035 * sysdeps/unix/sysv/linux/fork.c: Likewise.
4036 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
4037 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4038 * sysdeps/unix/sysv/linux/raise.c: Likewise.
4040 2003-07-05 Ulrich Drepper <drepper@redhat.com>
4042 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
4043 Fix use of parameter.
4044 (__libc_cleanup_pop): Likewise.
4046 2003-07-04 Ulrich Drepper <drepper@redhat.com>
4048 * init.c (sigcancel_handler): Change parameters to match handler
4049 for SA_SIGACTION. Check signal number and code to recognize
4050 invalid invocations.
4052 2003-07-03 Roland McGrath <roland@redhat.com>
4054 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
4055 Apply sizeof (struct pthread) bias to r13 value.
4057 2003-07-03 Ulrich Drepper <drepper@redhat.com>
4059 * sysdeps/pthread/configure.in: Require CFI directives.
4061 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
4063 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
4064 libpthread compilation.
4065 * unwind.c (__pthread_unwind): Add hidden_def.
4066 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
4068 2003-07-01 Ulrich Drepper <drepper@redhat.com>
4070 * libc-cancellation.c (__libc_cleanup_routine): Define.
4071 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
4072 (__pthread_cleanup_pop): Define.
4074 2003-07-01 Richard Henderson <rth@redhat.com>
4076 * sysdeps/alpha/elf/pt-initfini.c: New file.
4077 * sysdeps/alpha/pthread_spin_lock.S: New file.
4078 * sysdeps/alpha/pthread_spin_trylock.S: New file.
4079 * sysdeps/alpha/pthreaddef.h: New file.
4080 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
4081 * sysdeps/alpha/tls.h: New file.
4082 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
4083 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
4084 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
4085 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
4086 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
4087 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
4088 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
4089 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
4090 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
4091 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
4093 2003-07-01 Ulrich Drepper <drepper@redhat.com>
4095 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
4096 cleanup support and unwind info.
4098 2003-06-30 Ulrich Drepper <drepper@redhat.com>
4100 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4101 Use correct cleanup handler registration. Add unwind info.
4102 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
4103 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
4104 * tst-once3.c: Add cleanup handler and check it is called.
4105 * tst-once4.c: Likewise.
4106 * tst-oncex3.c: New file.
4107 * tst-oncex4.c: New file.
4108 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
4110 2003-06-29 Ulrich Drepper <drepper@redhat.com>
4112 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
4114 2003-06-27 Ulrich Drepper <drepper@redhat.com>
4116 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
4117 (tf_msgsnd): Likewise.
4119 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
4120 premature returns a bit more.
4122 2003-06-26 Ulrich Drepper <drepper@redhat.com>
4124 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
4125 definition to the front.
4127 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
4128 the cleanup functions to make the names unique. Fix dwarf opcode
4130 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
4131 functions to make the names unique. Fix CFA offset for two blocks.
4133 2003-06-25 Ulrich Drepper <drepper@redhat.com>
4135 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
4136 missing closing braces.
4137 Patch by Christophe Saout <christophe@saout.de>.
4139 2003-06-24 Roland McGrath <roland@redhat.com>
4141 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
4143 2003-06-24 Ulrich Drepper <drepper@redhat.com>
4145 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
4146 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
4148 * pthreadP.h: Declare __find_thread_by_id.
4149 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
4150 * pthread_clock_gettime.c: Allow using other thread's clock.
4151 * pthread_clock_settime.c: Likewise.
4152 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4153 * Makefile: Add rules to build and run tst-clock2.
4154 * tst-clock2.c: New file.
4156 2003-06-23 Ulrich Drepper <drepper@redhat.com>
4158 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
4159 to use exception-based cleanup handler.
4160 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4162 * tst-cond8.c (ch): Announce that we are done.
4164 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
4166 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
4167 Also test aio_suspend with timeout value.
4169 2003-06-22 Ulrich Drepper <drepper@redhat.com>
4171 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
4172 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
4175 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
4176 (__pthread_mutex_lock_internal): Likewise.
4177 (__pthread_mutex_unlock_internal): Likewise.
4178 (__pthread_mutex_unlock_usercnt): Declare.
4179 * pthread_mutex_destroy.c: Always fail if used in any way.
4180 * pthread_mutex_init.c: Update comment.
4181 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
4182 * pthread_mutex_timedlock.c: Adjust __nusers.
4183 * pthread_mutex_trylock.c: Adjust __nusers.
4184 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
4185 and public interfaces are wrapper with pass additional parameter.
4186 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
4188 * tst-mutex8.c: New file.
4189 * Makefile (tests): Add tst-mutex8.
4190 * sysdeps/pthread/pthread_cond_timedwait.c: Call
4191 __pthread_mutex_unlock_usercnt.
4192 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4193 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4195 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4196 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4197 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
4198 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4200 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4201 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4202 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4203 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4204 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4206 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
4207 * pthread_mutex_timedlock.c: Likewise.
4208 * pthread_mutex_trylock.c: Adjust __nusers.
4209 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
4210 * tst-mutex9.c: New file.
4211 * Makefile (tests): Add tst-mutex9.
4212 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
4213 * sysdeps/ia64/tls.h: Likewise.
4214 * sysdeps/powerpc/tls.h: Likewise.
4215 * sysdeps/s390/tls.h: Likewise.
4216 * sysdeps/sh/tls.h: Likewise.
4217 * sysdeps/x86_64/tls.h: Likewise.
4218 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4219 Change type of __owner.
4220 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4221 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4222 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4223 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4224 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4226 2003-06-19 Jakub Jelinek <jakub@redhat.com>
4228 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
4229 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
4231 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
4232 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
4233 instead of nr to lll_futex_wake. Only set errno and return -1
4236 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
4237 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4238 return actual return value from the syscall, not 0.
4240 2003-06-18 Ulrich Drepper <drepper@redhat.com>
4242 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
4243 find a random value.
4244 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
4247 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
4248 compat_timer_settime.
4249 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
4250 compat_timer_gettime.
4251 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4252 compat_timer_getoverrun.
4253 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4254 compat_timer_delete.
4256 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4257 error-checking mutex detect busy mutexes.
4259 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4261 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4262 Add ax to clobber list.
4263 (lll_mutex_cond_lock): Likewise.
4264 (lll_mutex_unlock): Likewise.
4265 (lll_lock): Likewise.
4266 (lll_unlock): Likewise.
4268 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4269 * tst-cancel18.c: New file.
4270 * tst-cancelx18.c: New file.
4272 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4275 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4276 * tst-cancel17.c: New file.
4277 * tst-cancelx17.c: New file.
4279 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4280 * sysdeps/unix/sysv/linux/sigwait.c: New file.
4281 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4283 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4285 2003-06-16 Jakub Jelinek <jakub@redhat.com>
4287 * sysdeps/pthread/createthread.c (create_thread): Set
4288 header.multiple_threads unconditionally.
4289 * allocatestack.c (allocate_stack): Likewise.
4290 * descr.h (struct pthread): Add header.multiple_threads
4292 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4293 Define for librt. #error if neither libpthread, libc nor librt.
4294 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4296 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4297 CDISABLE): Likewise.
4298 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4299 CDISABLE): Likewise.
4300 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4301 CDISABLE): Likewise.
4302 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4303 CDISABLE): Likewise. Access header.multiple_threads outside of
4304 libc and libpthread.
4305 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4307 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4308 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4310 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4312 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4313 Also test early cancellation before the thread reaches the cancellation
4316 * Makefile: Compile forward.c with exceptions.
4318 * sysdeps/unix/sysv/linux/sleep.c: New file.
4320 2003-06-16 Ulrich Drepper <drepper@redhat.com>
4322 * Makefile: Add CFLAGS definition to compile function wrappers
4323 duplicated from libc with exceptions.
4324 * tst-cancel4.c: Also check cancellation handlers.
4326 * Makefile: Add rules to build and run tst-cancel16 and
4327 tst-cancelx16. Add missing CFLAGS definitions.
4328 * tst-cancel16.c: New file.
4329 * tst-cancelx16.c: New file.
4331 2003-06-15 Ulrich Drepper <drepper@redhat.com>
4333 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4334 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4335 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4336 (DL_SYSINFO_IMPLEMENTATION): Likewise.
4338 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4339 (LIBC_CANCEL_RESET): Likewise.
4340 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4341 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4343 (CFLAGS-libcrt-cancellation.c): Define.
4344 * sysdeps/pthread/librt-cancellation.c: New file.
4345 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4346 macros also when compiling librt.
4347 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4348 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4349 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4350 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4351 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4352 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4353 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4355 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4356 compat_timer_create.
4358 2003-06-14 Ulrich Drepper <drepper@redhat.com>
4360 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4362 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4364 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4365 Add libc_hidden_def.
4367 2003-06-13 Roland McGrath <roland@redhat.com>
4369 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4370 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4372 2003-06-11 Ulrich Drepper <drepper@redhat.com>
4374 * allocatestack.c (queue_stack): Always inline.
4375 * ptreadhP.h (__do_cancel): Likewise.
4377 2003-06-10 Jakub Jelinek <jakub@redhat.com>
4379 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4382 2003-06-10 Ulrich Drepper <drepper@redhat.com>
4384 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4385 (__pthread_cond_signal): Remove incorrect second addition for
4388 2003-06-09 Ulrich Drepper <drepper@redhat.com>
4390 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4391 (__pthread_cond_signal): Use correct futex pointer in
4392 __lll_mutex_lock_wait call.
4394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4395 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4397 2003-06-08 Ulrich Drepper <drepper@redhat.com>
4399 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4401 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4404 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4405 hand-written CFI generation code. Since ENTRY/END also initiated
4406 CFI frames this caused two CFI sets to be generated.
4408 2003-06-07 Ulrich Drepper <drepper@redhat.com>
4410 * cleanup_routine.c: New file.
4411 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4412 * sysdeps/pthread/pthread.h: Add support for fully exception-based
4414 * Makefile (libpthread-routines): Add cleanup_routine.
4415 Add more CFLAGS variables to compile with exceptions. Add comments
4416 why which file needs unwind tables.
4417 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4419 * tst-cancelx1.c: New file.
4420 * tst-cancelx2.c: New file.
4421 * tst-cancelx3.c: New file.
4422 * tst-cancelx4.c: New file.
4423 * tst-cancelx5.c: New file.
4424 * tst-cancelx6.c: New file.
4425 * tst-cancelx7.c: New file.
4426 * tst-cancelx8.c: New file.
4427 * tst-cancelx9.c: New file.
4428 * tst-cancelx10.c: New file.
4429 * tst-cancelx11.c: New file.
4430 * tst-cancelx12.c: New file.
4431 * tst-cancelx13.c: New file.
4432 * tst-cancelx14.c: New file.
4433 * tst-cancelx15.c: New file.
4434 * tst-cleanupx0.c: New file.
4435 * tst-cleanupx0.expect: New file.
4436 * tst-cleanupx1.c: New file.
4437 * tst-cleanupx2.c: New file.
4438 * tst-cleanupx3.c: New file.
4440 * tst-cleanup0.c: Make standard compliant.
4441 * tst-cleanup1.c: Likewise.
4443 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4444 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4445 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4446 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4447 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4448 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4449 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4451 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4452 * tst-cancel12.c: New file.
4453 * tst-cancel13.c: New file.
4454 * tst-cancel14.c: New file.
4455 * tst-cancel15.c: New file.
4456 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4459 * tst-cancel1.c: Add some comments.
4461 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4464 2003-06-06 Ulrich Drepper <drepper@redhat.com>
4466 * Makefile (CFLAGS-pthread_cancel.c): Define.
4468 2003-06-05 Ulrich Drepper <drepper@redhat.com>
4470 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4471 Change type of __writer element to int.
4472 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4473 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4474 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4475 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4476 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4477 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4478 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4479 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4480 Compare with TID to determine deadlocks.
4481 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4482 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4483 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4484 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4485 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4486 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4488 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4490 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4491 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4492 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4494 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4496 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4497 * Makefile (tests): Add tst-rwlock12.
4498 * tst-rwlock12.c: New file.
4500 2003-06-05 Jakub Jelinek <jakub@redhat.com>
4502 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4503 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4504 Remove bogus hidden_proto.
4505 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4507 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4508 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4509 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4510 ___lll_mutex_timedlock): Likewise.
4512 2003-06-04 Ulrich Drepper <drepper@redhat.com>
4514 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4515 (__pthread_cond_signal): Add some code to eventually handle
4518 2003-06-01 Ulrich Drepper <drepper@redhat.com>
4520 * Makefile (tests): Add tst-exec4.
4521 (tst-exec4-ARGS): Define.
4522 * tst-exec4.c: New file.
4524 2003-05-31 Ulrich Drepper <drepper@redhat.com>
4526 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4527 Also fail if tv_nsec < 0.
4528 (__lll_timedwait_tid): Likewise.
4529 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4530 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4532 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4534 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4536 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4538 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4540 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4543 * Makefile (tests): Add tst-sem8 and tst-sem9.
4544 * tst-sem8.c: New file.
4545 * tst-sem9.c: New file.
4546 * sem_open.c: Fix creation of in_use record if the file exists but
4549 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4552 * sysdeps/pthread/timer_create.c (timer_create): In case
4553 evp==NULL, assign timer ID to sival_ptr.
4555 * descr.h (struct pthread_unwind_buf): Change type of prev element to
4556 struct pthread_unwind_buf *.
4557 (struct pthread): Likewise for cleanup_jmp_buf element.
4559 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4560 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4561 * unwind.c (__pthread_unwind_next): Likewise.
4563 2003-05-30 Ulrich Drepper <drepper@redhat.com>
4565 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4566 (lll_futex_timed_wait): Use int for futex value parameter.
4567 (lll_futex_wake): Likewise.
4568 (lll_futex_requeue): Likewise.
4570 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4571 Replace one memory operation with one register operation.
4573 * tst-join4.c (do_test): Fix error message.
4575 * tst-rwlock6.c (do_test): Use correct format specifier.
4577 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4578 (__lll_mutex_lock_wait): Replace one memory operation with one
4580 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4581 (__lll_mutex_lock_wait): Likewise.
4583 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4584 (__lll_mutex_cond_lock): Add one to value parameter of
4585 __lll_lock_wait to reflect reality in the futex syscall.
4586 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4587 (lll_mutex_cond_lock): Likewise.
4589 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4591 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4593 (lll_mutex_cond_lock): Define.
4595 2003-05-29 Ulrich Drepper <drepper@redhat.com>
4597 * Makefile (tests): Add tst-signal6.
4598 * tst-signal6.c: New file.
4600 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4601 (__lll_mutex_unlock_force): New function
4602 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4604 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4605 (__lll_mutex_unlock_force): New function.
4606 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4608 * tst-rwlock7.c (do_test): Use correct format specifier.
4610 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4611 Find break parameter in correct asm argument.
4613 2003-05-27 Jakub Jelinek <jakub@redhat.com>
4615 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4617 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4619 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4621 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4622 lll_futex_requeue, lll_mutex_unlock_force): Define.
4624 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4626 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4627 (pthread_cond_t): Add __mutex.
4628 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4629 lll_futex_requeue, lll_mutex_unlock_force): Define.
4631 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4633 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4634 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4636 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4638 (lll_futex_wait, lll_futex_wake): Define.
4639 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4640 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4641 FUTEX_REQUEUE instead of FUTEX_WAIT.
4642 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4643 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4644 mutex which was used in condvar structure. Call
4645 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4646 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4648 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4649 include tcb-offsets.h. Read wakeup value in locked region.
4650 Use the value of gbr register as THREAD_ID.
4651 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4652 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4653 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4655 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4658 2003-05-28 Ulrich Drepper <drepper@redhat.com>
4660 * sysdeps/pthread/pthread_cond_broadcast.c
4661 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4663 2003-05-26 Ulrich Drepper <drepper@redhat.com>
4665 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4666 typo in register name.
4667 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4668 correctly. Actually use requeue. Little optimization.
4669 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4670 mutex address early. Handle cancellation state as 32-bit value.
4671 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4672 Remove unnecessary label.
4674 2003-05-25 Ulrich Drepper <drepper@redhat.com>
4676 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4677 instead of FUTEX_WAIT.
4678 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4679 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4680 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4681 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4682 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4683 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
4684 used in condvar structure. Call __pthread_mutex_cond_lock instead
4685 of __pthread_mutex_lock_internal.
4686 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4687 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4688 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4689 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
4690 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4691 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4692 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
4693 Add pthread_mutex_cond_lock.
4694 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
4695 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
4696 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
4697 lll_mutex_cond_lock.
4698 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4699 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4700 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4702 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4703 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4705 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
4706 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4708 * pthreadP.h: Declare __pthread_mutex_cond_lock.
4709 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
4710 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
4711 macro don't define aliases.
4713 * cancellation.c: Remove __pthread_enable_asynccancel_2.
4714 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
4715 * sysdeps/pthread/pthread_cond_timedwait.c: Use
4716 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
4717 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4718 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4719 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4720 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4721 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4723 2003-05-17 Ulrich Drepper <drepper@redhat.com>
4725 * sem_open.c: Fix one endless loop. Implement correct semantics
4726 wrt opening the same semaphore more then once.
4727 * sem_close.c: Adjust for sem_open change.
4728 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
4729 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
4730 * Makefile (tests): Add tst-sem7.
4731 * tst-sem7.c: New file.
4733 2003-05-16 Roland McGrath <roland@redhat.com>
4735 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
4736 uninitialized variable braino.
4738 2003-05-16 Ulrich Drepper <drepper@redhat.com>
4740 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
4741 test for syscall availability.
4743 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
4744 __no_posix_timers to -1 if the syscalls don't exist.
4746 * pthread_join.c (pthread_join): Set tid field of the joined
4747 thread to -1. This isn't necessary but helps to recognize some
4748 error conditions with almost no cost.
4750 * allocatestack.c (FREE_P): Also negative values indicate an
4753 * unwind.c: Include <unistd.h>.
4755 2003-05-14 Ulrich Drepper <drepper@redhat.com>
4757 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
4759 2003-05-14 Jakub Jelinek <jakub@redhat.com>
4761 * Makefile (crti-objs, crtn-objs): New variables.
4762 (omit-deps, extra-objs): Add crtn.
4763 ($(objpfx)libpthread.so): Depend on both crti and crtn
4764 and links to them in multidir.
4765 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
4767 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
4769 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4770 (lll_mutex_unlock): Use atomic_exchange_rel.
4772 2003-05-11 Ulrich Drepper <drepper@redhat.com>
4774 * cond-perf.c (cons): Add missing locking around setting of alldone.
4776 2003-05-10 Ulrich Drepper <drepper@redhat.com>
4778 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4780 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4782 2003-05-09 Ulrich Drepper <drepper@redhat.com>
4784 * tst-sem6.c: New file.
4785 * Makefile (tests): Add tst-sem6.
4787 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4788 Use atomic_exchange_rel instead of atomic_exchange.
4789 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4792 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4793 code for lll_futex_wait and lll_futex_wake in static apps. Use
4794 vsyscall is possible.
4796 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4797 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4798 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4799 pthread_setaffinity_np.
4800 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4801 and pthread_setaffinity_np.
4802 * Makefile (libpthread-routines): Add pthread_getaffinity and
4803 pthread_setaffinity.
4805 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4806 use it in case mmap to allocate the stack fails.
4807 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4808 ARCH_MAP_FLAGS here.
4809 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4812 2003-05-08 Ulrich Drepper <drepper@redhat.com>
4814 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4815 handler implementation. It is now lockless in fork().
4816 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4817 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4818 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
4819 declare the __fork_*_lists.
4820 (struct fork_handler): Include pointers to all three functions.
4821 Add next, refcntr and need_signal elements.
4822 (__fork_handlers): New declaration.
4823 (__register_atfork_malloc): Remove declaration.
4824 (HAVE_register_atfork_malloc): Remove definition.
4825 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4826 __pthread_child_handler variable.
4827 (__libc_pthread_init): Use __register_atfork instead of explicitly
4829 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4831 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4833 * unwind.c (unwind_cleanup): Print error message and then abort. This
4834 function must never be reached.
4836 * cond-perf.c: New file.
4838 2003-05-05 Ulrich Drepper <drepper@redhat.com>
4840 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4842 2003-05-04 Roland McGrath <roland@redhat.com>
4844 * Makefile ($(objpfx)../libc.so): New target.
4846 2003-05-02 Ulrich Drepper <drepper@redhat.com>
4848 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4849 (pthread_condattr_t): Size is only an int, don't use long for
4851 (pthread_mutexattr_t): Likewise.
4852 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4853 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4854 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4856 2003-05-01 Ulrich Drepper <drepper@redhat.com>
4858 * sysdeps/i386/tls.h: Define THREAD_ID.
4859 * sysdeps/ia64/tls.h: Likewise.
4860 * sysdeps/powerpc/tls.h: Likewise.
4861 * sysdeps/s390/tls.h: Likewise.
4862 * sysdeps/sh/tls.h: Likewise.
4863 * sysdeps/x86_64/tls.h: Likewise.
4864 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4866 * pthread_mutex_timedlock.c: Likewise.
4867 * pthread_mutex_trylock.c: Likewise.
4868 * pthread_mutex_unlock.c: Likewise.
4869 * pthread_rwlock_trywrlock.c: Likewise.
4870 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4871 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4872 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4873 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4875 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4878 2003-04-29 Jakub Jelinek <jakub@redhat.com>
4880 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4881 (__SIZEOF_PTHREAD_COND_T): Define to 48.
4882 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4883 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4884 Make __align long long instead of long.
4885 (pthread_rwlock_t): Formatting.
4886 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4887 (pthread_rwlock_t): Formatting.
4888 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4889 (pthread_cond_t): Make __align long long instead of long.
4890 (pthread_rwlock_t): Move __flags field to the same position as in
4893 2003-04-30 Ulrich Drepper <drepper@redhat.com>
4895 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4896 * tst-rwlock7.c (do_test): Likewise.
4898 2003-04-26 Roland McGrath <roland@redhat.com>
4900 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4902 2003-04-22 Jakub Jelinek <jakub@redhat.com>
4904 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4905 sizeof (struct pthread).
4906 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
4908 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
4910 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
4912 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
4914 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
4916 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
4918 (NO_TLS_OFFSET): Define.
4919 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
4920 add TLS_TCB_SIZE unnecessarily.
4922 2003-04-22 Roland McGrath <roland@redhat.com>
4924 * Makeconfig (shared-thread-library): Reverse link order to work
4927 2003-04-22 Ulrich Drepper <drepper@redhat.com>
4929 * semaphore.h: Fix typo in comment.
4931 2003-04-21 Ulrich Drepper <drepper@redhat.com>
4933 * sysdeps/pthread/sigfillset.c: New file.
4935 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
4936 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
4937 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
4938 * sysdeps/pthread/sigaction.c: Likewise.
4939 * sysdeps/pthread/sigprocmask.c: New file.
4940 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
4942 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4943 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
4946 2003-04-19 Ulrich Drepper <drepper@redhat.com>
4948 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4949 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
4951 * sysdeps/unix/sysv/linux/unregister-atfork.c
4952 (__unregister_atfork): Don't free memory not allocated dynamically.
4954 * semaphore.h: Remove __THROW marker from cancellation points.
4955 * nptl/sysdeps/pthread/pthread.h: Likewise.
4957 2003-04-18 Ulrich Drepper <drepper@redhat.com>
4959 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
4960 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
4963 2003-04-16 Jakub Jelinek <jakub@redhat.com>
4965 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
4967 2003-04-15 Roland McGrath <roland@redhat.com>
4969 * forward.c (__pthread_unwind): Tweak to avoid warning.
4971 2003-04-15 Ulrich Drepper <drepper@redhat.com>
4973 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
4975 2003-04-14 Ulrich Drepper <drepper@redhat.com>
4977 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
4978 overflow CFA advance instructions.
4979 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4981 2003-04-14 Jakub Jelinek <jakub@redhat.com>
4983 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
4984 * sysdeps/i386/pthread_spin_lock.c: Likewise.
4985 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
4988 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
4989 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
4990 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
4991 DW_CFA_advance_loc for .Laddl-.Lsubl.
4993 2003-04-13 Ulrich Drepper <drepper@redhat.com>
4995 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
4996 position-independent unwind data for static libraries.
4997 Add missing unwind info. Add comments.
4999 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
5000 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5002 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5004 2003-04-12 Ulrich Drepper <drepper@redhat.com>
5006 * Makefile: Make sure all cancellation points are compiled with
5007 exception and asynchronous unwind tables.
5009 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
5010 which mishandles loading of global object addresses in PIC.
5011 (THREAD_SETMEM_NC): Likewise.
5013 2003-04-11 Ulrich Drepper <drepper@redhat.com>
5015 * pthread.h: Define new data structure for cleanup buffer. Declare
5016 new cleanup handler interfaces.
5017 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
5018 (struct pthread): Add cleanup_jmp_buf pointer. Define
5019 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
5020 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
5021 it. Declare old cleanup handler installation functions.
5022 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
5024 * cleanup_defer.c: Likewise.
5025 * cleanup_compat.c: New file. Old cleanup code.
5026 * cleanup_def_compat.c: New file. Old cleanup code.
5027 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
5028 if own thread descriptor.
5029 * unwind.c: New file.
5030 * forward.c: Add __pthread_unwind.
5031 * init.c (pthread_functions): Add __pthread_unwind.
5032 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
5033 Add ptr___pthread_unwind.
5034 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
5035 and unwind function.
5036 * Makefile (libpthread-routines): Add cleanup_compat,
5037 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
5038 table generation if necessary.
5039 * version.c: Record whether unwind support is compiled in.
5040 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
5041 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
5043 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
5044 complication to generate unwind information for syscall wrappers.
5045 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5046 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5047 __cleanup_fct_attribute.
5049 * Makefile: Add rules to build and run tst-cleanup0.
5050 * tst-cleanup0.c: New file.
5051 * tst-cleanup0.expect: New file.
5053 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
5054 caller. Optimize to avoid often unecessary local variable.
5056 2003-04-11 Roland McGrath <roland@redhat.com>
5058 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
5059 sets variable `multidir'; include that.
5060 (generated): Add it.
5061 ($(objpfx)$(multidir)/crti.o): New target.
5062 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
5064 2003-04-11 Ulrich Drepper <drepper@redhat.com>
5066 * tst-attr2.c (do_test): Add cast to avoid warning.
5067 * tst-mutex4.c (do_test): Likewise.
5069 2003-04-10 Ulrich Drepper <drepper@redhat.com>
5071 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
5074 2003-04-09 Ulrich Drepper <drepper@redhat.com>
5076 * Makefile (tests): Add tst-detach1.
5077 * tst-detach1.c: New file.
5079 2003-04-08 Ulrich Drepper <drepper@redhat.com>
5081 * sysdeps/pthread/pthread.h: Remove duplicate
5082 pthread_cleanup_{push,pop} definitions.
5084 * tst-barrier2.c: Eliminate warnings.
5085 * tst-cancel4.c: Likewise.
5086 * tst-cond4.c: Likewise.
5087 * tst-cond6.c: Likewise.
5088 * tst-detach1.c: Likewise.
5089 * tst-rwlock4.c: Likewise.
5090 * tst-rwlock6.c: Likewise.
5091 * tst-rwlock7.c: Likewise.
5092 * tst-sem3.c: Likewise.
5093 * tst-spin2.c: Likewise.
5094 * tst-umask1.c: Likewise.
5096 2003-04-07 Ulrich Drepper <drepper@redhat.com>
5098 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
5100 2003-04-06 Ulrich Drepper <drepper@redhat.com>
5102 * descr.h (struct pthread): Move cancelhandling member to the front.
5104 2003-04-05 Ulrich Drepper <drepper@redhat.com>
5106 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
5107 malloc_parent, and malloc_child statically.
5108 (__register_atfork_malloc): New function.
5109 (free_mem): Don't free any of the malloc_* variables on the list.
5110 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
5111 Define HAVE_register_atfork_malloc.
5113 2003-04-04 Ulrich Drepper <drepper@redhat.com>
5115 * sysdeps/pthread/createthread.c (create_thread): Add some more
5116 comments explaining when to set multiple_threads and when not.
5118 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5119 THREAD_ATOMIC_BIT_SET if not already defined.
5120 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5121 THREAD_ATOMIC_BIT_SET:
5122 * sysdeps/x86_64/tls.h: Likewise.
5123 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
5124 THREAD_ATOMIC_CMPXCHG_VAL.
5125 (_pthread_cleanup_pop_restore): Likewise.
5126 * cancellation.c (__pthread_enable_asynccancel): Likewise.
5127 (__pthread_enable_asynccancel_2): Likewise.
5128 (__pthread_disable_asynccancel): Likewise.
5129 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5130 (__libc_disable_asynccancel): Likewise.
5131 * init.c (sigcancel_handler): Likewise.
5132 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
5133 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
5135 2003-04-03 Ulrich Drepper <drepper@redhat.com>
5137 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
5138 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5139 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
5140 * Makefile (tests): Add tst-cancel11.
5141 * tst-cancel11.c: New file.
5143 2003-04-01 Ulrich Drepper <drepper@redhat.com>
5145 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
5146 round, not the first. Use specific_used flag instead of local
5147 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
5148 (__free_tcb): Don't call deallocate_tsd here.
5149 (start_thread): Call deallocate_tsd here.
5150 * pthread_setspecific.c: Set specific_used flag really only when
5152 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
5153 * tst-tsd3.c: New file.
5154 * tst-tsd4.c: New file.
5156 2003-03-31 Ulrich Drepper <drepper@redhat.com>
5158 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
5159 Use atomic_exchange_and_add instead of __lll_add.
5160 (__lll_mutex_timedlock): Likewise.
5161 Patch by Ian Wienand.
5163 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
5165 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5166 (SINGLE_THREAD_P): Fix typo.
5167 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
5169 2003-03-31 Ulrich Drepper <drepper@redhat.com>
5171 * Makefile (tests): Add tst-align.
5172 * tst-align.c: New file.
5173 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
5175 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
5178 * tst-tsd2.c: Add casts to avoid warnings.
5180 2003-03-30 Ulrich Drepper <drepper@redhat.com>
5182 * descr.h (struct pthread): Move most often used elements to the front.
5184 2003-03-29 Ulrich Drepper <drepper@redhat.com>
5186 * Makefile (libpthread-routines): Add pthread_atfork.
5187 (libpthread-static-only-routines): Add pthread_atfork.
5189 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5191 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
5193 (INSTALL_DTV): Add parens.
5194 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
5195 Use passed descr instead of THREAD_SELF.
5196 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
5197 (__lll_mutex_timedlock_wait): Correct expected value after
5199 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
5200 Release lock before waking up the waiters.
5201 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
5202 criteria. Reorderstruct passed to cleanup handler. Fix
5203 handling of cancellation and failung pthread_mutex_unlock call.
5204 Use __pthread_enable_asynccancel_2 instead of
5205 __pthread_enable_asynccancel.
5206 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5207 Return result of lock re-get if it fails.
5208 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
5209 for __pthread_cleanup_push.
5210 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
5211 completely broken rwlock implementation.
5212 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5213 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5214 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5215 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5216 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5217 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
5218 versioned_symbol macro.
5219 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
5220 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5222 2003-03-27 Ulrich Drepper <drepper@redhat.com>
5224 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
5225 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
5227 (struct timer): Remove th and bar field.
5228 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
5229 debugging code. Create only one helper thread.
5230 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
5232 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5233 Renamed. Define statically. Use thread info from siginfo.
5234 (__helper_once): New variable.
5235 (__helper_tid): New variable.
5236 (__reset_helper_control): New function.
5237 (__start_helper_thread): New function.
5239 * pthread_create.c (start_thread): Don't use setjmp inside
5240 __builtin_expect to work around gcc bug.
5242 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
5243 timer_delete syscall fails, but not with ENOSYS, set
5246 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
5247 (timer_settime): Fix typo.
5248 * sysdeps/unix/sysv/linux/timer_getoverr.c
5249 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5251 2003-03-27 Jakub Jelinek <jakub@redhat.com>
5253 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5254 offset of cleanupbuf.__prev.
5256 2003-03-26 Jakub Jelinek <jakub@redhat.com>
5258 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5261 2003-03-26 Ulrich Drepper <drepper@redhat.com>
5263 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5264 NULL provide default definition to syscall.
5266 2003-03-25 Roland McGrath <roland@redhat.com>
5268 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5269 (timer_id2ptr): Fix typo.
5271 2003-03-25 Ulrich Drepper <drepper@redhat.com>
5273 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5274 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5275 * sysdeps/ia64/pthreaddef.h: Likewise.
5276 * sysdeps/powerpc/pthreaddef.h: Likewise.
5277 * sysdeps/s390/pthreaddef.h: Likewise.
5278 * sysdeps/sh/pthreaddef.h: Likewise.
5279 * sysdeps/x86_64/pthreaddef.h: Likewise.
5280 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5281 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5283 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5284 SIGTIMER is not unblocked.
5285 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5287 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5289 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5290 pass pointer through as ID.
5291 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5292 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5293 * sysdeps/unix/sysv/linux/timer_create.c: New file.
5294 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5295 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5296 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5297 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5298 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5299 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5300 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5301 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5302 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5303 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5304 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5305 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5306 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5307 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5308 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5309 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5310 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5311 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5312 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5313 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5314 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5315 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5316 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5317 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5318 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5319 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5320 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5321 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5322 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5323 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5325 * pthreadP.h: Remove FRAME_LEFT definition.
5326 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5327 already left frame. Programs which have this problem are not POSIX
5329 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5331 2003-03-24 Ulrich Drepper <drepper@redhat.com>
5333 * sysdeps/pthread/tst-timer.c: Check return values of the
5336 2003-03-23 Roland McGrath <roland@redhat.com>
5338 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5339 * tst-tls3mod.c: Likewise.
5340 * tst-tls1.c: Likewise.
5341 * tst-tls2.c: Likewise.
5343 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5346 * tst-join5.c (tf1, tf2): Add a cast.
5348 * Makeconfig (includes): Append -I$(..)nptl to this variable.
5350 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5351 Don't test anything.
5352 * tst-cond4.c: Likewise.
5353 * tst-cond6.c: Likewise.
5354 * tst-flock2.c: Likewise.
5355 * tst-mutex4.c: Likewise.
5356 * tst-rwlock4.c: Likewise.
5357 * tst-signal1.c: Likewise.
5358 * tst-spin2.c: Likewise.
5359 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5361 * tst-mutex4.c: Use test-skeleton.c.
5362 * tst-spin2.c: Likewise.
5363 * tst-sysconf.c: Likewise.
5364 * tst-barrier2.c: Likewise.
5365 * tst-cond4.c: Likewise.
5366 * tst-cond6.c: Likewise.
5367 * tst-rwlock4.c: Likewise.
5368 * tst-unload.c: Likewise.
5369 * tst-flock2.c (do_test): Use return instead of exit.
5371 2003-03-22 Jakub Jelinek <jakub@redhat.com>
5373 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5375 2003-03-21 Ulrich Drepper <drepper@redhat.com>
5377 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5378 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5379 instead of __lll_compare_and_swap.
5380 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5382 Removed definition if __lll_compare_and_swap.
5384 * cancellation.c: Adjust for new form of compare&exchange macros.
5385 * cleanup_defer.c: Likewise.
5387 * libc-cancellation.c: Likewise.
5388 * old_pthread_cond_broadcast.c: Likewise.
5389 * old_pthread_cond_signal.c: Likewise.
5390 * old_pthread_cond_timedwait.c: Likewise.
5391 * old_pthread_cond_wait.c: Likewise.
5392 * pthread_cancel.c: Likewise.
5393 * pthread_create.c: Likewise.
5394 * pthread_detach.c: Likewise.
5395 * pthread_join.c: Likewise.
5396 * pthread_key_delete.c: Likewise.
5397 * pthread_setcancelstate.c: Likewise.
5398 * pthread_setcanceltype.c: Likewise.
5399 * pthread_timedjoin.c: Likewise.
5400 * pthread_tryjoin.c: Likewise.
5401 * sysdeps/pthread/createthread.c: Likewise.
5403 2003-03-20 Ulrich Drepper <drepper@redhat.com>
5405 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5406 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5407 definitions. Replace uses with calls to atomic_* functions.
5408 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5409 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5410 __lll_test_and_set calls with atomic_exchange_and_add and
5411 atomic_exchange calls respectively.
5412 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5413 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5414 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5415 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5416 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5417 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5418 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5420 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5421 returns the old value.
5423 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
5425 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5426 int for variable OLDVAL and correct inline assembler contraint.
5427 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5428 type int for variable OLD.
5430 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5432 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5433 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5434 instead of multiple_threads field in the TCB.
5436 2003-03-19 Ulrich Drepper <drepper@redhat.com>
5438 * sysdeps/i386/i686/bits/atomic.h: Removed.
5439 * sysdeps/i386/i586/bits/atomic.h: Removed.
5440 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
5441 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
5442 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
5443 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
5444 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
5445 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
5446 * atomic.h: Removed. Moved to glibc.
5448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5449 support for clock selection.
5451 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5454 2003-03-18 Roland McGrath <roland@redhat.com>
5456 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5457 Add __lll_rel_instr first. Add memory clobber.
5458 (lll_mutex_unlock): Use __lll_test_and_set.
5459 From Paul Mackerras <paulus@samba.org>.
5461 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5463 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5464 (SINGLE_THREAD_P): Add `header.' prefix.
5465 From Paul Mackerras <paulus@samba.org>.
5467 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5468 pthread_timedjoin_np to ...
5469 (libpthread: GLIBC_2.3.3): ... here.
5470 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5472 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5473 Avoid shadowing VAL variable.
5475 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5478 2003-03-18 Ulrich Drepper <drepper@redhat.com>
5480 * Makefile (tests): Add tst-cond11.
5481 * tst-cond11.c: New file.
5483 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5484 struct passed to cleanup handler to eliminate one more
5486 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5488 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5489 (pthrad_cond_t): Replace __unused field with __clock.
5491 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5492 waken all waiters in cleanup handler.
5493 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5494 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5496 * pthread_condattr_getclock.c: New file.
5497 * pthread_condattr_setclock.c: New file.
5498 * sysdeps/pthread/pthread.h: Declare these new functions.
5499 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5500 * Makefile (libpthread-routines): Add the new functions.
5501 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5502 Renamed field to value. Document use of the bits.
5503 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5505 * pthread_condattr_setpshared.c: Likewise.
5506 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5507 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5508 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5510 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5511 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5512 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5513 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5514 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5515 Implement clock selection.
5516 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5517 * pthread-errnos.sym: Add ENOSYS.
5518 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5519 _POSIX_CLOCK_SELECTION.
5520 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5522 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5523 invalid .size directive.
5525 2003-03-17 Roland McGrath <roland@redhat.com>
5527 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5530 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5532 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5533 Use __lll_add instead of spelling it out. Use protected symbol names.
5534 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5536 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5537 Renamed from lll_compare_and_swap. Use new name where necessary.
5538 (__lll_add): Defined.
5539 (__lll_dec_if_positive): Defined.
5540 (__lll_test_and_set): Defined.
5541 * sysdeps/ia64/pthread_spin_init.c: Removed.
5542 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5543 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5544 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5545 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5546 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5547 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5548 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5549 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5550 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5551 __sync_lock_release_si.
5552 Patch by Jakub Jelinek.
5554 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5555 Fix timeout handling.
5556 (__lll_timedwait_tid): Likewise.
5557 (lll_unlock_wake_cb): Wake up other waiters if necessary.
5558 Patch by Jakub Jelinek.
5560 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5562 2003-03-17 Roland McGrath <roland@redhat.com>
5564 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5565 * sysdeps/pthread/pthread_spin_init.c: New file.
5566 * sysdeps/pthread/pthread_spin_unlock.c: New file.
5567 * sysdeps/powerpc/Makefile: New file.
5568 * sysdeps/powerpc/pthread_spin_lock.c: New file.
5569 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5570 * sysdeps/powerpc/pthreaddef.h: New file.
5571 * sysdeps/powerpc/tcb-offsets.sym: New file.
5572 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5573 * sysdeps/powerpc/tls.h: New file.
5574 * sysdeps/powerpc/bits/atomic.h: New file.
5575 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5576 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5577 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5579 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5580 * sysdeps/unix/sysv/linux/sem_post.c: New file.
5581 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5582 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5583 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5584 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5585 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5586 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5587 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5588 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5589 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5590 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5591 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5592 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5593 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5595 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5597 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5598 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5599 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5600 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5601 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5603 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5605 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5606 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5607 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5608 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5609 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5611 2003-03-16 Roland McGrath <roland@redhat.com>
5613 * tst-fork4.c: Include <string.h>.
5614 * tst-signal2.c: Likewise.
5615 * tst-mutex5.c (do_test): exit -> return.
5616 * tst-mutex2.c: Include <stdlib.h>.
5618 2003-03-16 Ulrich Drepper <drepper@redhat.com>
5620 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5621 (__lll_mutex_timedlock_wait): Correct expected value after
5622 spurious wakeup. Otherwise we would never wait again.
5624 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5625 zone versus inline asm stupidity. Use correct instructions.
5627 * tst-rwlock6.c: Add some more status output.
5629 2003-03-15 Roland McGrath <roland@redhat.com>
5631 * sysdeps/pthread/configure.in: New file.
5632 * sysdeps/pthread/configure: New file (generated).
5634 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5636 * allocatestack.c (allocate_stack): Store the exact stack size of
5637 user allocated stacks.
5639 2003-03-15 Jakub Jelinek <jakub@redhat.com>
5641 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5642 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5643 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5644 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5645 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5646 Use `header.' prefix.
5647 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5649 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5651 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5652 __builtin_frame_address, use stack pointer.
5654 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5655 instead of __builtin_frame_pointer.
5657 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5659 * tst-basic1.c (do_test): Add cast to avoid warning.
5660 * tst-basic2.c (do_test): Likewise.
5662 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5663 amount of stack correction.
5665 * tst-fork4.c: Use test-skeleton.c.
5667 2003-03-14 Roland McGrath <roland@redhat.com>
5669 * init.c: Fix typo "#eli" for "#else".
5671 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
5673 * allocatestack.c (__stack_user): Use hidden_data_def.
5674 * pthread_create.c (__pthread_keys): Likewise.
5676 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5678 2003-03-14 Roland McGrath <roland@redhat.com>
5680 * tst-fork4.c: New file.
5681 * Makefile (tests): Add it.
5683 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
5684 we always define the padding space.
5685 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
5686 stopped supporting its own extensions fully.
5687 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
5688 struct also called `header', so `header.multiple_threads' is the field
5689 name to use on all machines.
5690 * allocatestack.c (allocate_stack): Use `header.' prefix.
5691 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5692 * pthread_create.c (__pthread_create_2_1): Likewise.
5693 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
5694 (THREAD_SELF): Likewise.
5695 * sysdeps/x86_64/tls.h: Likewise.
5696 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5697 (SINGLE_THREAD_P): Likewise.
5698 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5699 (SINGLE_THREAD_P): Likewise.
5700 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5701 (SINGLE_THREAD_P): Likewise.
5703 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
5706 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5708 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
5709 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
5711 * pthread_create.c (start_thread): setjmp is expected to return 0.
5713 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
5714 (THREAD_GETMEM_NC): Likewise.
5716 2003-03-13 Ulrich Drepper <drepper@redhat.com>
5718 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
5719 and the size of the stack which must be allocated is a multiple,
5720 allocate one more page.
5721 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
5722 MULTI_PAGE_ALIASING.
5724 2003-03-13 Roland McGrath <roland@redhat.com>
5726 * pthread_create.c (start_thread): Set EXITING_BIT after the
5727 event-reporting (and destructors), not before.
5729 2003-03-13 Jakub Jelinek <jakub@redhat.com>
5731 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
5732 lll_futex_wake): Declare register variables as long int instead of
5733 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
5734 Make syscall arguments clobbered by the syscall.
5735 (lll_futex_wait): Define using lll_futex_timed_wait.
5737 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
5740 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
5743 * allocatestack.c (nptl_ncreated): Only declare if
5744 COLORING_INCREMENT != 0.
5746 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
5747 (__libc_enable_asynccancel_2): Remove prototype.
5749 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
5750 ctid to match kernel.
5752 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5754 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
5755 libc_multiple_threads.
5756 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
5757 __libc_multiple_threads to...
5758 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
5760 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
5762 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5763 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5765 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
5766 (__pthread_once_internal): Define.
5768 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
5769 macros instead of .symver directly.
5770 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5771 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5773 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
5774 * sysdeps/x86_64/tcb-offsets.sym: New file.
5775 * sysdeps/x86_64/Makefile: New file.
5777 * sysdeps/i386/tcb-offsets.sym: Add SELF.
5778 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5779 to access own pthread_t in TCB.
5780 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5782 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5784 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5786 2003-03-12 Roland McGrath <roland@redhat.com>
5788 * pthread-errnos.sym: New file.
5789 * Makefile (gen-as-const-headers): New variable, list that file.
5790 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5791 header <pthread-errnos.h> instead of defining errno values here.
5792 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5793 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5794 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5795 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5796 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5798 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5800 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5801 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5802 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5803 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5804 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5805 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5806 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5807 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5808 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5809 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5810 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5811 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5812 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5813 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5814 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5815 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5816 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5817 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5818 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5819 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5820 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5821 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5822 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5823 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5824 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5825 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5826 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5828 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5829 CLONE_CHILD_SETTID worked.
5831 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5833 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5835 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5838 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5839 (pthread_cond_t): Add padding.
5841 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5842 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5843 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5845 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5846 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5847 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5848 (__pthread_rwlock_timedrdlock): Likewise.
5849 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5850 (__pthread_rwlock_wrlock): Likewise.
5851 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5852 (__pthread_rwlock_rdlock): Likewise.
5854 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5856 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5857 result of lock re-get if it fails.
5859 2003-03-11 Ulrich Drepper <drepper@redhat.com>
5861 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5862 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5863 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5864 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5865 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5866 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5867 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5868 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5869 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5870 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5872 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5873 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5875 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5876 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5877 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5878 (create_thread): Likewise.
5879 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5880 * init.c (__pthread_initialize_minimal_internal): Initialize
5881 __libc_multiple_threads_ptr if necessary.
5882 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
5883 __pthread_multiple_threads and __libc_multiple_threads_ptr.
5884 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5885 __libc_multiple_threads.
5886 (__libc_pthread_init): Return pointer to __libc_pthread_init if
5889 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5890 (THREAD_SETMEM_NC): Likewise.
5892 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5893 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5894 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5895 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5897 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5898 Eliminate one entire instruction.
5900 * cancellation.c (__pthread_enable_asynccancel_2): New function.
5901 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5902 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5903 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5904 instead of __pthread_enable_asynccancel.
5905 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5906 (__pthread_cond_wait): Likewise.
5907 * sysdeps/pthread/pthread_cond_timedwait.c
5908 (__pthread_cond_timedwait): Likewise.
5909 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5911 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5912 (__condvar_cleanup): Wake up all waiters in case we got signaled
5913 after being woken up but before disabling asynchronous
5915 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5916 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5917 (__condvar_cleanup): Likewise.
5919 * init.c (__NR_set_tid_address): If already defined, don't redefine.
5920 Make it an error if architecture has no #if case. Add x86-64.
5922 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
5923 pt-initfini.s generation.
5925 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
5926 (TLS_INIT_TP): Fix typo.
5928 2003-03-11 Jakub Jelinek <jakub@redhat.com>
5930 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
5931 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
5933 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
5934 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5935 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
5936 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
5937 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
5938 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5939 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5940 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5942 2003-03-11 Ulrich Drepper <drepper@redhat.com>
5944 * sysdeps/pthread/pthread_cond_timedwait.c
5945 (__pthread_cond_timedwait): Return the result of the final
5946 locking. If it succeeds, the regular function return value.
5948 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
5949 Return result of the final locking.
5950 * version.c (__nptl_main): Work around problems with the strange
5951 INTERNAL_SYSCALL macro on ppc32.
5952 * init.c (__pthread_initialize_minimal_internal): Unblock
5953 SIGCANCEL in case the parent blocked it.
5954 Reported by Paul Mackerras <paulus@samba.org>.
5956 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
5957 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
5958 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
5960 2003-03-11 Jakub Jelinek <jakub@redhat.com>
5962 * sysdeps/pthread/pthread_cond_timedwait.c
5963 (__pthread_cond_timedwait): Unlock and fail if
5964 __pthread_mutex_unlock_internal failed.
5966 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
5967 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
5969 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
5970 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
5971 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
5972 ALLOCATE_STACK): New macros.
5973 (TLS_TPADJ): New macro.
5974 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
5975 (allocate_stack): Handle TLS_DTV_AT_TP and
5976 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
5977 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
5979 * init.c [__ia64__] (__NR_set_tid_address): Define.
5981 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
5982 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
5983 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
5984 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
5985 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
5986 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
5987 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
5988 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
5989 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
5990 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
5991 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
5992 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
5993 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
5994 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
5995 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
5996 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
5997 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
5998 * sysdeps/ia64/bits/atomic.h: New file.
5999 * sysdeps/ia64/Makefile: New file.
6000 * sysdeps/ia64/pthread_spin_init.c: New file.
6001 * sysdeps/ia64/pthread_spin_lock.c: New file.
6002 * sysdeps/ia64/pthread_spin_trylock.c: New file.
6003 * sysdeps/ia64/pthread_spin_unlock.c: New file.
6004 * sysdeps/ia64/pthreaddef.h: New file.
6005 * sysdeps/ia64/tcb-offsets.sym: New file.
6006 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
6007 * sysdeps/ia64/tls.h: New file.
6009 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
6010 to syscall instead of no arguments.
6012 2003-03-10 Ulrich Drepper <drepper@redhat.com>
6014 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
6015 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
6016 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
6017 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
6019 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
6022 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
6024 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6025 lowlevelbarrier.sym.
6026 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
6027 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
6028 Include lowlevelbarrier.h and don't define offsets locally.
6029 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
6031 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
6032 (__lll_mutex_lock_wait): Reverse order of first two parameters.
6033 (__lll_mutex_timedlock_wait): Likewise.
6034 (lll_mutex_lock): Adjust asm for that.
6035 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
6036 (lll_lock): Adjust asm for operand order change.
6037 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
6038 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
6040 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
6041 Reverse order of parameters.
6042 (__lll_timedwait_tid): Remove regparms attribute.
6043 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
6044 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
6046 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6047 (__lll_timedwait_tid): Remove one unnecessary instruction.
6049 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
6050 __lll_mutex_timedlock_wait only for NOT_IN_libc.
6051 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
6054 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
6055 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
6057 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
6060 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
6061 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
6063 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
6064 define LOCK here (if UP is not defined). The actual code is in
6067 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
6068 LOCK is already defined. Don't define lll_unlock_wake_cb and
6069 __lll_timedwait_tid for libc.so.
6070 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
6071 define LOCK here (if UP is not defined). The actual code is in
6074 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
6075 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
6076 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
6077 instead of lowlevelsem.h.
6078 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6079 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6080 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6082 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6084 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
6085 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
6086 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
6088 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
6090 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
6093 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
6095 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
6096 of __libc_locking_needed.
6097 (lll_trylock): Initialize %eax to zero.
6099 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
6100 pthread_cond_t definition.
6102 2003-03-10 Roland McGrath <roland@redhat.com>
6104 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
6105 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
6106 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
6107 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
6108 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
6110 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
6111 Instead of setting PD->multiple_threads, set globals
6112 __pthread_multiple_threads and __libc_multiple_threads.
6113 * sysdeps/pthread/createthread.c (create_thread): Likewise.
6114 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
6115 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
6117 * descr.h (struct pthread): Conditionalize first member on
6118 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
6119 containing an anonymous tcbhead_t. Move `list' member out.
6120 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
6121 * allocatestack.c: Remove use of `header.data.' prefix.
6122 * pthread_create.c: Likewise.
6123 * init.c (__pthread_initialize_minimal_internal): Likewise.
6124 * sysdeps/pthread/createthread.c (create_thread): Likewise.
6125 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
6126 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
6127 * sysdeps/x86_64/tls.h: Likewise.
6128 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6129 (SINGLE_THREAD_P): Likewise.
6130 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6131 (SINGLE_THREAD_P): Likewise.
6132 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
6133 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
6135 2003-03-09 Ulrich Drepper <drepper@redhat.com>
6137 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
6139 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
6140 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6142 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
6143 leftovers from the ia32 code.
6145 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
6147 (clear_once_control): Don't load %esi.
6149 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
6152 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6154 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
6155 * sysdeps/unix/sysv/linux/createthread.c: ...here.
6157 * Makefile (tests): Add tst-cond10.
6158 * tst-cond10.c: New file.
6160 2003-03-08 Ulrich Drepper <drepper@redhat.com>
6162 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
6163 * tst-signal3.c (do_test): Likewise.
6164 * tst-sem5.c (do_test): Likewise.
6165 * tst-kill6.c (do_test): Likewise.
6166 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
6168 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
6170 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6171 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
6172 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6173 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6174 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6175 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6176 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6178 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6180 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6181 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6183 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6184 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6185 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6186 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6187 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6189 * allocatestack.c (allocate_stack): If mprotect() fails free the
6192 2003-03-07 Ulrich Drepper <drepper@redhat.com>
6194 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
6196 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
6197 lll_wake_tid. This was used only to work around kernel limits in
6199 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
6200 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
6201 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6202 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
6204 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
6205 (__pthread_initialize_minimal_internal): Change initialization of
6206 __static_tls_align_m1 appropriately.
6207 * pthreadP.h (__static_tls_align_m1): Renamed from
6209 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
6210 instead of __static_tls_align-1.
6212 2003-03-04 Ulrich Drepper <drepper@redhat.com>
6214 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6216 * pthread_create.c: Define __pthread_keys using nocommon
6217 attribute, not by placing it explicitly in bss.
6218 Remove DEFINE_DEALLOC definition. Not needed anymore.
6220 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
6221 Use it in mmap call to allocate stacks.
6223 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
6225 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
6226 result of the thread function.
6228 2003-03-03 Ulrich Drepper <drepper@redhat.com>
6230 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
6231 version is just fine.
6233 * sysdeps/unix/sysv/linux/libc_pthread_init.c
6234 (__pthread_child_handler): Renamed from pthread_child_handler,
6235 exported, and marked hidden. Change all users.
6236 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
6237 free __pthread_child_handler from child list.
6239 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
6241 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
6243 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6244 Fix handling of cancellation and failing pthread_mutex_unlock call.
6245 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6246 (__pthread_cond_wait): Likewise.
6248 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6249 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
6250 lll_futex_timed_wait call.
6251 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6252 (pthread_rwlock_timedwrlock): Likewise.
6254 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6255 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6256 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6258 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6259 check of lll_futex_wake return value.
6261 2003-03-03 Roland McGrath <roland@redhat.com>
6263 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6265 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6266 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6267 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6269 2003-03-02 Ulrich Drepper <drepper@redhat.com>
6271 * sysdeps/pthread/timer_create.c (timer_create): Return correct
6272 error for CPU clocks.
6274 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6275 _POSIX_MONOTONIC_CLOCK.
6276 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6278 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6281 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6283 * descr.h (struct pthread): Move cleanup field to the front.
6285 2003-03-01 Roland McGrath <roland@redhat.com>
6287 * sem_open.c (sem_open): Braino fix.
6289 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6291 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6292 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6293 __pthread_cleanup_pop functionality.
6294 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6296 * descr.h (struct pthread): Move tid field to the front now that
6299 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6300 (__lll_mutex_timedlock_wait): Remove.
6301 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6302 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6303 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6304 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6305 (lll_unlock_wake_cb): Don't save and restore %esi.
6306 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6308 (__lll_timedwait_tid): Add alignment.
6309 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6310 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6312 (__lll_timedwait_tid): Removed.
6313 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6314 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6315 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6316 (pthread_barrier_wait): Don't save, load, and restore %esi for
6318 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6319 (__pthread_cond_signal): Don't save, load, and restore %esi.
6320 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6321 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6322 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6323 Don't save, load, and restore %esi.
6325 2003-02-27 Ulrich Drepper <drepper@redhat.com>
6327 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6328 Release lock before waking up the waiters.
6330 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6332 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6333 (reader_thread): Likewise.
6335 * sysdeps/pthread/pthread_rwlock_unlock.c
6336 (__pthread_rwlock_unlock): Release internal lock early. Don't try
6337 to wake up readers if there are none.
6339 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6340 Release internal lock before wake threads.
6342 2003-02-26 Ulrich Drepper <drepper@redhat.com>
6344 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6345 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
6347 * tst-rwlock9.c: Likewise.
6348 * tst-rwlock10.c: New file.
6349 * tst-rwlock11.c: New file.
6351 * Makefile (tests): Add tst-dlsym1.
6352 * tst-dlsym1.c: New file.
6354 * init.c (__pthread_initialize_minimal_internal): Set
6355 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6356 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6358 2003-02-24 Ulrich Drepper <drepper@redhat.com>
6360 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6362 * tst-cond2.c: Fix sychronization with child.
6364 * tst-rwlock8.c (reader_thread): Remove unused variable.
6366 * Makefile: Add rules to build and run tst-tls3.
6367 * tst-tls3.c: New file.
6368 * tst-tls3mod.c: New file.
6370 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6371 * tst-rwlock8.c: New file.
6372 * tst-rwlock9.c: New file.
6373 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6374 complete broken rwlock implementation.
6375 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6377 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6379 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6380 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6381 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6382 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6383 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6384 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6385 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6387 2003-02-23 Roland McGrath <roland@redhat.com>
6389 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6391 2003-02-23 Ulrich Drepper <drepper@redhat.com>
6393 * Makefile (tests): Add tst-context1.
6394 * tst-context1.c: New file.
6396 * Makefile (tests): Add tst-tls1 and tst-tls2.
6397 * tst-tls1.c: New file.
6398 * tst-tls2.c: New file.
6400 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6403 * pthread_create.c (start_thread): Set EXITING_BIT early.
6405 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6406 (THREAD_GETMEM_NC): Likewise.
6408 2003-02-22 Ulrich Drepper <drepper@redhat.com>
6410 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6411 off 3 more bytes by using offset-less instructions when possible.
6413 * Makefile: Add dependency for $(objpfx)version.d.
6415 * eintr.c (eintr_source): Add unnecessary return but the compiler
6418 * tst-kill3.c: Include <unistd.h>.
6420 2003-02-21 Roland McGrath <roland@redhat.com>
6422 * pthread_create.c (start_thread): Call __libc_thread_freeres.
6424 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6426 * Makefile (tests): Add tst-eintr1.
6427 (distribute): Add eintr.c.
6428 * tst-eintr1.c: New file.
6429 * eintr.c: New file.
6431 * pthread_cancel.c (pthread_cancel): Use tkill directly.
6433 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6434 Disallow sending SIGCANCEL.
6436 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
6437 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6438 * tst-kill1.c: New file.
6439 * tst-kill2.c: New file.
6440 * tst-kill3.c: New file.
6441 * tst-kill5.c: New file.
6442 * tst-kill6.c: New file.
6443 * tst-basic7.c: Renamed to...
6444 * tst-kill4.c: ...this.
6446 2003-02-21 Roland McGrath <roland@redhat.com>
6448 * Makefile (install-lib-ldscripts): New variable.
6450 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6452 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6453 * pthread_cancel.c: Use INVALID_TD_P.
6454 * pthread_detach.c: Likewise.
6455 * pthread_getschedparam.c: Likewise.
6456 * pthread_setschedparam.c: Likewise.
6457 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6458 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6459 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6460 * pthread_timedjoin.c: Likewise.
6462 * tst-basic7.c: Include <signal.h>.
6464 * pthread_join.c (pthread_join): Limited checking for invalid
6466 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6468 2003-02-20 Ulrich Drepper <drepper@redhat.com>
6470 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6471 beginning of the loop. Clear the entire first block of TSD.
6472 * Makefile (tests): Add tst-key4.
6473 * tst-key4.c: New file.
6475 2003-02-18 Ulrich Drepper <drepper@redhat.com>
6477 * Makefile (tests): Add tst-basic7.
6478 * tst-basic7.c: New file.
6480 * pthread_create.c (deallocate_tsd): Mark as internal_function.
6481 Add some more __builtin_expect.
6483 * pthreadP.h: Define dummy version of DEBUGGING_P.
6485 2003-02-17 Ulrich Drepper <drepper@redhat.com>
6487 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6488 _POSIX_THREAD_PRIORITY_SCHEDULING.
6489 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6490 _XOPEN_REALTIME_THREADS.
6491 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6493 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6494 kernel returns EINVAL for PID <= 0, work around it.
6496 * Makefile (tests): Add tst-signal5.
6497 * tst-signal5.c: New file.
6499 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6502 * tst-cancel1.c (tf): Block all signals.
6504 * Makefile (tests): Add tst-basic6.
6505 * tst-basic6.c: New file.
6507 * tst-basic1.c: Add test for process ID.
6509 * Makefile (tests): Add tst-cancel10.
6510 * tst-cancel10.c: New file.
6512 * Makefile (tests): Add tst-signal4.
6513 * tst-signal4.c: New file.
6515 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6516 __sigismember instead of sigismember. Add __builtin_expect.
6518 2003-02-16 Ulrich Drepper <drepper@redhat.com>
6520 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6521 pthread_setcancelstate, and pthread_rwlock_setpshared.
6523 * tst-cancel7.c (do_test): Make sure the pid file exists before
6524 canceling the thread.
6526 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6527 pthread_rwlock_timedrdlock tests.
6528 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6529 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6530 Check for invalid tv_nsec field.
6531 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6534 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6535 recursive mutex of overflow.
6537 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6539 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6540 going into an endless loop.
6541 * Makefile (tests): Add tst-cancel9.
6542 * tst-cancel9.c: New file.
6544 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6546 2003-02-15 Ulrich Drepper <drepper@redhat.com>
6548 * tst-mutex5.c (do_test): Add more timedlock tests.
6550 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6551 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6553 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6554 use INLINE_SYSCALL. Error number is returned, not -1.
6556 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6557 and __deallocate_stack with internal_function.
6558 * pthread_create.c: Adjust definitions appropriately.
6559 * allocatestack.c: Likewise.
6561 * pthread_join.c: Add one more __builtin_expect.
6562 * pthread_timedjoin.c: Likewise.
6564 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6565 not data of sequence number does not match.
6566 Add one __builtin_expect.
6568 * Makefile (tests): Add tst-clock1.
6569 * tst-clock1.c: New file.
6571 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6573 * Makefile (tests): Add tst-basic5.
6574 * tst-basic5.c: New file.
6576 2003-02-14 Ulrich Drepper <drepper@redhat.com>
6578 * Makefile (tests): Add tst-basic4.
6579 * tst-basic4.c: New file.
6581 * pthreadP.h: Add declaraction for __nptl_nthreads.
6582 * pthread_create.c: Define __nptl_nthreads
6583 (start_thread): Increment __nptl_nthreads at beginning. Decrement
6584 after thread is done. If then zero, call exit(0).
6585 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6586 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
6587 * init.c (pthread_functions): Initialize ptr_nthreads.
6588 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6589 (__reclaim_stacks): Decrement __nptl_nthreads.
6590 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6592 * Makefile (tests): Add tst-basic3.
6593 * tst-basic3.c: New file.
6595 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
6596 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
6597 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6598 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
6599 if asynchronous canceling is enabled.
6600 * pthread_join.c (pthread_join): When recognizing circular joins,
6601 take into account the other thread might be already canceled.
6602 * Makefile (tests): Add tst-join5.
6603 * tst-join5.c: New file.
6605 * Makefile (tests): Add tst-join4.
6606 * tst-join4.c: New file.
6608 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6610 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6612 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
6614 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6615 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6616 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6618 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6620 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6621 error if lll_futex_wake failed.
6623 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6625 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6626 handling of cancellation and failung pthread_mutex_unlock call.
6627 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6628 * Makefile (tests): Add tst-cond8 and tst-cond9.
6629 * tst-cond8.c: New file.
6630 * tst-cond9.c: New file.
6632 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6634 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
6635 non-standard initializers with __USE_GNU.
6637 * Makefile (tests): Add tst-cleanup3.
6638 * tst-cleanup3.c: New file.
6640 2003-02-12 Ulrich Drepper <drepper@redhat.com>
6642 * Makefile (tests): Add tst-attr1 and tst-attr2.
6643 * tst-attr1.c: New file.
6644 * tst-attr2.c: New file.
6646 * Makefile: Add rules to build and run tst-atfork2 test.
6647 * tst-atfork2.c: New file.
6648 * tst-atfork2mod.c: New file.
6650 * sysdeps/unix/sysv/linux/unregister-atfork.c
6651 (__unregister_atfork): Free the memory allocated for the handlers
6652 after removing them from the lists.
6654 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6657 * tst-atfork1.c (do_test): Wait for the child we forked.
6658 Report error in child.
6660 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6662 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6664 2003-02-10 Ulrich Drepper <drepper@redhat.com>
6666 * Makefile (tests): Add tst-cancel8.
6667 * tst-cancel8.c: New file.
6669 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6670 clearing of control variable.
6671 * Makefile (tests): Add tst-once3 and tst-once4.
6672 * tst-once3.c: New file.
6673 * tst-once4.c: New file.
6675 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
6677 * sysdeps/sh/Makefile: New file.
6678 * sysdeps/sh/bits/atomic.h: New file.
6679 * sysdeps/sh/pthread_spin_init.c: New file.
6680 * sysdeps/sh/pthread_spin_lock.c: New file.
6681 * sysdeps/sh/pthread_spin_trylock.S: New file.
6682 * sysdeps/sh/pthread_spin_unlock.S: New file.
6683 * sysdeps/sh/pthreaddef.h: New file.
6684 * sysdeps/sh/tcb-offsets.sym: New file.
6685 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
6686 * sysdeps/sh/tls.h: New file.
6687 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
6688 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
6689 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
6690 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
6691 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
6692 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
6693 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
6694 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
6695 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
6696 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
6697 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
6698 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
6699 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
6700 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
6701 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
6702 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
6703 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
6704 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
6705 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
6706 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
6707 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
6708 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
6709 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
6710 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
6711 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
6712 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
6713 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
6714 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
6715 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
6716 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
6718 2003-02-08 Ulrich Drepper <drepper@redhat.com>
6720 * tst-cond2.c: Rearrange code to not rely on behavior undefined
6723 * tst-basic2.c (do_test): Lock mutex before creating the thread.
6725 2003-02-07 Ulrich Drepper <drepper@redhat.com>
6727 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
6728 (TLS_GET_FS): New #define.
6729 (TLS_SET_FS): New #define.
6730 Correct value of __NR_set_thread_area.
6732 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
6734 2003-02-06 Ulrich Drepper <drepper@redhat.com>
6736 * Makefile (tests): Add tst-popen1.
6737 * tst-popen1.c: New file.
6739 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
6740 but inactive generalization.
6741 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6742 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6743 Minor optimization, remove one instruction.
6744 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6746 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
6748 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
6750 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
6752 * init.c (__NR_set_tid_address): Add #ifdef for s390.
6753 * sysdeps/pthread/pthread_barrier_wait.c: New file.
6754 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
6755 * sysdeps/pthread/pthread_cond_signal.c: New file.
6756 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
6757 * sysdeps/pthread/pthread_cond_wait.c: New file.
6758 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
6759 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
6760 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
6761 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
6762 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
6763 * sysdeps/s390/Makefile: New file.
6764 * sysdeps/s390/bits/atomic.h: New file.
6765 * sysdeps/s390/pthread_spin_init.c: New file.
6766 * sysdeps/s390/pthread_spin_lock.c: New file.
6767 * sysdeps/s390/pthread_spin_trylock.c: New file.
6768 * sysdeps/s390/pthread_spin_unlock.c: New file.
6769 * sysdeps/s390/pthreaddef.h: New file.
6770 * sysdeps/s390/tcb-offsets.sym: New file.
6771 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
6772 * sysdeps/s390/tls.h: New file.
6773 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
6774 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6775 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6776 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6777 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6778 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6779 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6780 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6781 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6782 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6783 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6784 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6785 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6786 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6787 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6788 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6789 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6790 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6791 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6792 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6793 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6794 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6795 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6797 2003-02-04 Ulrich Drepper <drepper@redhat.com>
6799 * atomic.h: Add a couple more default implementations.
6800 (atomic_compare_and_exchange_acq): Use
6801 __arch_compare_and_exchange_32_acq in return value definition. It
6803 (atomic_bit_set): Renamed from atomic_set_bit.
6804 Add missing atomic_ prefixes.
6806 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6807 thread library is available, use correct value to mark initialized
6810 2003-02-03 Ulrich Drepper <drepper@redhat.com>
6812 * allocatestack.c (allocate_stack): Use __getpagesize instead of
6813 __sysconf to determine pagesize.
6815 * pthread_create.c: Include <atomic.h>.
6816 * allocatestack.c (allocate_stack): Implement coloring of the
6817 allocated stack memory. Rename pagesize to pagesize_m1. It's the
6818 size minus one. Adjust users.
6819 * sysdeps/i386/i686/Makefile: New file.
6821 2003-02-02 Ulrich Drepper <drepper@redhat.com>
6823 * allocatestack.c: Improve comment throughout the file.
6825 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6826 (__lll_lock_wait): Add branch prediction.
6827 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6828 (__lll_lock_wait): Likewise.
6829 (lll_unlock_wake_cb): Removed.
6831 2003-01-31 Ulrich Drepper <drepper@redhat.com>
6833 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6834 _POSIX_THREAD_PRIORITY_SCHEDULING.
6836 2003-01-30 Jakub Jelinek <jakub@redhat.com>
6838 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6839 Fix return type of ptr___pthread_getspecific.
6841 2003-01-29 Ulrich Drepper <drepper@redhat.com>
6843 * Makefile (tests): Add tst-umask1.
6844 (tst-umask1-ARGS): Define.
6845 * tst-umask1.c: New file.
6847 2003-01-28 Ulrich Drepper <drepper@redhat.com>
6849 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
6850 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6851 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6852 pthread_rwlock_unlock.
6853 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6854 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6855 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6856 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6857 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6859 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6860 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6862 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6863 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6864 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6866 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6867 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6869 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6870 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6871 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6873 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6874 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6876 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6878 * Makefile (libpthread-routines): Remove lowlevelcond and
6879 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6880 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6881 and pthread_cond_broadcast.
6882 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6883 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6884 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6885 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6886 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6887 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6888 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6889 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6890 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6891 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6892 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6893 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6894 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6895 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6896 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6897 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6898 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6899 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6900 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6901 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6902 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6903 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6904 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6905 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6906 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6907 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
6908 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
6909 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
6910 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
6911 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
6912 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
6914 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
6915 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
6916 of the code is moved to ...
6917 * sysdeps/pthread/createthread.c: ...here. New file.
6919 2003-01-27 Ulrich Drepper <drepper@redhat.com>
6921 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
6922 (__new_sem_post): Clear %eax before returning.
6923 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
6925 * Makefile (tests): Add tst-cleanup2.
6926 * tst-cleanup2.c: New file.
6928 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6929 Interpret first parameter correctly.
6931 2003-01-17 Ulrich Drepper <drepper@redhat.com>
6933 * Makefile (headers): Add bits/semaphore.h.
6935 2003-01-16 Jakub Jelinek <jakub@redhat.com>
6937 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
6940 2003-01-14 Ulrich Drepper <drepper@redhat.com>
6942 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
6943 must be used and mapping failed.
6944 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
6946 * Makefile (CFLAGS-pthread_self.os): Define this, not
6947 CFLAGS-pthread_self.c.
6949 2003-01-13 Ulrich Drepper <drepper@redhat.com>
6951 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
6954 * Makefile (libpthread-routines): Add version. Add rules to build
6955 version.os and banner.h.
6956 * version.c: New file.
6958 2003-01-13 Jakub Jelinek <jakub@redhat.com>
6960 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
6961 the alias unconditional.
6962 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
6964 2003-01-13 Ulrich Drepper <drepper@redhat.com>
6966 * Makefile (CFLAGS-pthread_self.c): New definition.
6968 2003-01-06 Jakub Jelinek <jakub@redhat.com>
6970 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
6971 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
6972 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
6973 * init.c (__pthread_initialize_minimal_internal): Likewise.
6975 2003-01-07 Jakub Jelinek <jakub@redhat.com>
6977 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
6979 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6980 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6981 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6982 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6983 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6984 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6986 2003-01-06 Jakub Jelinek <jakub@redhat.com>
6988 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
6989 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
6990 * tst-cancel-wrappers.sh: Remove all exceptions.
6992 2003-01-05 Ulrich Drepper <drepper@redhat.com>
6994 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
6995 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
6997 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
6998 Use __libc_pthread_functions array if SHARED.
7000 * pthreadP.h: Move pthread_cond_2_0_t definition to...
7001 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
7003 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
7004 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
7005 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
7006 __libc_ptf_call instead of __libc_maybe_call.
7008 (__libc_cleanup_region_start): Wrap function name with PTF call.
7009 (__libc_cleanup_region_end): Likewise.
7010 (__libc_cleanup_end): Likewise.
7012 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
7013 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
7014 * pthread_key_create.c: Add __pthread_key_create_internal alias.
7015 * pthreadP.h: Add prototypes.
7017 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
7018 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
7019 __pthread_rwlock_unlock aliases.
7020 * pthreadP.h: Add prototypes for new aliases.
7022 * pthreadP.h (struct pthead_functions): Moved to...
7023 * sysdeps/pthread/pthread-functions.h: ...here. New file.
7024 * init.c (pthread_functions): Add initializers for new elements.
7026 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
7027 __pthread_cleanup_pop_restore aliases.
7028 * pthreadP.h: Add prototypes.
7030 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
7031 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
7032 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
7033 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
7034 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7035 * pthreadP.h: Adjust prototypes and callers.
7037 2003-01-04 Ulrich Drepper <drepper@redhat.com>
7039 * Makefile (tests): Add tst-cancel7.
7040 (tst-cancel7-ARGS): New variable.
7041 * tst-cancel7.c: New file.
7043 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
7044 around gcc defficiencies.
7045 * old_pthread_cond_signal.c: Likewise.
7046 * old_pthread_cond_timedwait.c: Likewise.
7047 * old_pthread_cond_wait.c: Likewise.
7049 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
7051 2003-01-03 Ulrich Drepper <drepper@redhat.com>
7053 * Makefile (tests): Add tst-cond7.
7054 * tst-cond7.c: New file.
7056 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7057 (condvar_cleanup): Get condvar address from the right place.
7059 * atomic.h: Correct definitions of atomic_full_barrier,
7060 atomic_read_barrier, atomic_write_barrier.
7062 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
7064 * old_pthread_cond_signal.c: Likewise.
7065 * old_pthread_cond_timedwait.c: Likewise.
7066 * old_pthread_cond_wait.c: Likewise.
7068 2003-01-03 Jakub Jelinek <jakub@redhat.com>
7070 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
7072 2003-01-03 Ulrich Drepper <drepper@redhat.com>
7074 * pthreadP.h (pthread_cond_2_0_t): New type.
7075 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
7076 Use new type for the 2.0 condvar function prototypes.
7077 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
7078 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
7080 * old_pthread_cond_destroy.c: Likewise.
7081 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
7082 * old_pthread_cond_signal.c: Likewise.
7083 * old_pthread_cond_timedwait.c: Likewise.
7084 * old_pthread_cond_wait.c: Likewise.
7086 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7087 (__pthread_cond_wait): Don't save cancellation mode and seq value
7090 * herrno.c (__h_errno_location): Don't define as weak.
7092 2003-01-02 Jakub Jelinek <jakub@redhat.com>
7094 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
7095 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
7096 and pthread_cond_wait.
7097 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
7099 (__pthread_cond_broadcast_2_0): ... this.
7100 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
7102 (__pthread_cond_destroy_2_0): ... this.
7103 * old_pthread_cond_init.c (__old_pthread_cond_init):
7105 (__pthread_cond_init_2_0): ... this.
7106 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
7108 (__pthread_cond_signal_2_0): ... this.
7109 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
7111 (__pthread_cond_wait_2_0): ... this.
7112 * pthread_cond_destroy.c: Include shlib-compat.h.
7113 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
7114 * pthread_cond_init.c: Include shlib-compat.h.
7115 (pthread_cond_init): Change strong_alias into versioned_symbol.
7116 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
7117 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
7119 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
7120 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
7121 __pthread_cond_wait_2_0): New prototypes.
7122 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
7123 __old_pthread_cond_init, __old_pthread_cond_signal,
7124 __old_pthread_cond_wait): Removed.
7125 * init.c: Include shlib-compat.h.
7126 (pthread_functions): Guard ptr___pthread_attr_init_2_0
7127 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
7128 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
7129 ptr___pthread_cond_*_2_0 fields.
7130 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
7131 pthread_cond_*@GLIBC_2.0 compatibility symbols.
7133 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
7134 LIBC_SIGACTION was not yet defined.
7135 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
7136 [!defined LIBC_SIGACTION] (__sigaction): New function and
7138 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
7139 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
7141 2003-01-02 Jakub Jelinek <jakub@redhat.com>
7143 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
7145 2003-01-02 Ulrich Drepper <drepper@redhat.com>
7147 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7148 New, larger type definition.
7149 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
7151 * Versions [libpthread]: Add definitions for new pthread_cond_*
7152 interfaces for version GLIBC_2.3.2.
7153 * pthread_cond_init.c: Update initialization for new type definition.
7154 * Makefile (libpthread-routines): Remove pthread_cond_wait,
7155 pthread_cond_timedwait, pthread_cond_signal, and
7156 pthread_cond_broadcast. Add old_pthread_cond_init,
7157 old_pthread_cond_destroy, old_pthread_cond_wait,
7158 old_pthread_cond_timedwait, old_pthread_cond_signal, and
7159 old_pthread_cond_broadcast.
7160 * old_pthread_cond_broadcast.c: New file.
7161 * old_pthread_cond_destroy.c: New file.
7162 * old_pthread_cond_init.c: New file.
7163 * old_pthread_cond_signal.c: New file.
7164 * old_pthread_cond_timedwait.c: New file.
7165 * old_pthread_cond_wait.c: New file.
7166 * pthreadP.h: Add prototypes for the compatibility interfaces.
7168 * pthread_cond_destroy.c: Don't include <errno.h>.
7170 2003-01-01 Ulrich Drepper <drepper@redhat.com>
7172 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
7173 unnecessary zero offset when addressing MUTEX.
7175 2002-12-31 Ulrich Drepper <drepper@redhat.com>
7177 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7179 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
7180 for __register_atfork.
7182 2002-12-31 Jakub Jelinek <jakub@redhat.com>
7184 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
7185 instead of ASSEMBLER test macro.
7187 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
7188 __libc_current_sigrtmax): Add libc_hidden_def.
7190 * sysdeps/pthread/list.h: Remove assert.h include.
7192 2002-12-31 Ulrich Drepper <drepper@redhat.com>
7194 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
7195 __pthread_initialize_minimal_internal not
7196 __pthread_initialize_minimal.
7198 2002-12-30 Ulrich Drepper <drepper@redhat.com>
7200 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
7201 __pthread_initialize_minimal as hidden.
7203 * init.c (__pthread_initialize_minimal_internal): Don't mark as
7206 2002-12-31 Jakub Jelinek <jakub@redhat.com>
7208 * Makefile ($(inst_libdir)/libpthread.so): Depend on
7209 $(common-objpfx)format.lds, include that into the output script.
7211 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
7213 2002-12-28 Andreas Jaeger <aj@suse.de>
7215 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
7216 nsec resolution changes.
7217 (xstat64_conv): Likewise.
7218 (xstat32_conv): Likewise.
7219 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
7221 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
7222 structs stat and stat64.
7223 * time/time.h (__timespec_defined): Define for __USE_MISC.
7224 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
7226 2002-12-30 Jakub Jelinek <jakub@redhat.com>
7228 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
7230 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
7231 (pthread_exit): Use strong_alias to avoid warnings.
7232 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
7233 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
7234 ptr___pthread_attr_init_2_*.
7235 * init.c (pthread_functions): Adjust.
7237 2002-12-29 Ulrich Drepper <drepper@redhat.com>
7239 * forward.c: Make all functions available by default again. It
7240 caused too much trouble.
7242 * pt-siglongjmp.c: Removed.
7244 2002-12-28 Jakub Jelinek <jakub@redhat.com>
7246 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
7247 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
7248 * sysdeps/i386/Makefile: New file.
7249 * sysdeps/i386/tcb-offsets.sym: New file.
7250 * sysdeps/pthread/tcb-offsets.h: New file.
7251 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7252 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7254 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7255 __register_atfork...
7256 (GLIBC_2.3.2): ...here.
7258 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7260 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7261 pthread_attr_setstackaddr with __attribute_deprecated__.
7263 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7265 * pt-system.c (system): Remove cancellation handling.
7266 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7267 cancellation routines.
7269 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7271 * descr.h: Include <dl-sysdep.h>.
7272 (struct pthread): Move header.data.list to the back of the struct.
7273 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7274 (MULTIPLE_THREADS_OFFSET): Adjust offset.
7275 (SYSINFO_OFFSEET): Likewise.
7277 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7279 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7281 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7282 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7283 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7284 (USE_DL_SYSINFO): Undef.
7286 2002-12-22 Jakub Jelinek <jakub@redhat.com>
7288 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7289 $(common-objpfx)libc.so.
7290 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7291 it is bigger than pipe buffer size even on arches with bigger
7293 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7295 2002-12-25 Ulrich Drepper <drepper@redhat.com>
7297 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7298 correct errno access for case that USE___THREAD is not defined.
7300 2002-12-24 Ulrich Drepper <drepper@redhat.com>
7302 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7303 Patch by Marijn Ros <marijn@mad.scientist.com>.
7305 2002-12-22 Roland McGrath <roland@redhat.com>
7307 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7309 2002-12-20 Ulrich Drepper <drepper@redhat.com>
7311 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7313 2002-12-19 Ulrich Drepper <drepper@redhat.com>
7315 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7316 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7317 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7319 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7321 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7322 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7323 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7324 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7325 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7326 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7327 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7328 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7330 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7332 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7334 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7336 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7338 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7339 that sysinfo is properly initialized.
7340 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7341 to 1 only for ld.so.
7343 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7344 RTLD_CORRECT_DYNAMIC_WEAK.
7346 2002-12-19 Jakub Jelinek <jakub@redhat.com>
7348 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7349 Use return 0 as 6th argument to FORWARD4.
7350 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7352 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7354 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7355 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7356 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7357 (INIT_SYSINFO): New #define.
7358 (TLS_TP_INIT): Use INIT_SYSINFO.
7359 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7360 At test to make sure SYSINFO_OFFSET value is correct.
7361 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7363 2002-12-18 Jakub Jelinek <jakub@redhat.com>
7365 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7366 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7367 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7368 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7369 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7370 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7371 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7373 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7375 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7376 macro instead of using int $0x80 directly.
7378 * sysdeps/pthread/bits/stdio-lock.h: New file.
7379 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7380 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7381 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7382 * Makefile (routines): Add libc-lowlevelmutex.
7384 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7385 __i686.get_pc_thunk.dx.
7387 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7389 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7390 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7391 ($(objpfx)tst-cancel-wrappers.out): New rule.
7392 * tst-cancel-wrappers.sh: New test.
7393 * tst-locale1.c: Include signal.h.
7394 (uselocale): Test static linking of __libc_current_sigrt*.
7396 2002-12-17 Ulrich Drepper <drepper@redhat.com>
7398 * Makefile (tests): Add tst-cancel6.
7399 * tst-cancel6.c: New file
7401 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7403 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7404 Define meaningfully for assembler as well.
7405 * pthreadP.h (struct pthread_functions): Remove
7406 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
7407 and ptr_pthread_attr_init_2_1 fields.
7408 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7409 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7410 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7411 (FORWARD3): Define using FORWARD4.
7412 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7414 * pt-system.c: Remove duplicate stdlib.h include.
7416 2002-12-16 Ulrich Drepper <drepper@redhat.com>
7418 * sem_init.c: Define sem_init@GLIBC_2.0.
7419 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7420 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7422 * flockfile.c: Moved to...
7423 * sysdeps/pthread/flockfile.c: ...here. New file.
7424 * funlockfile.c: Moved to...
7425 * sysdeps/pthread/funlockfile.c: ...here. New file.
7426 * ftrylockfile.c: Moved to...
7427 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
7429 2002-12-16 Jakub Jelinek <jakub@redhat.com>
7431 * libc-cancellation.c: Guard both function with
7432 #if !defined NOT_IN_libc.
7433 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7434 automatically provided pthread wrappers.
7435 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7436 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7438 * pt-open.c: Removed.
7439 * pt-fcntl.c: Removed.
7440 * pt-fsync.c: Removed.
7441 * pt-lseek.c: Removed.
7442 * pt-msgrcv.c: Removed.
7443 * pt-msgsnd.c: Removed.
7444 * pt-msync.c: Removed.
7445 * pt-nanosleep.c: Removed.
7446 * pt-open64.c: Removed.
7447 * pt-pause.c: Removed.
7448 * pt-pread.c: Removed.
7449 * pt-pread64.c: Removed.
7450 * pt-pwrite.c: Removed.
7451 * pt-pwrite64.c: Removed.
7452 * pt-read.c: Removed.
7453 * pt-recv.c: Removed.
7454 * pt-recvfrom.c: Removed.
7455 * pt-recvmsg.c: Removed.
7456 * pt-send.c: Removed.
7457 * pt-sendto.c: Removed.
7458 * pt-sigtimedwait.c: Removed.
7459 * pt-sigwait.c: Removed.
7460 * pt-wait.c: Removed.
7461 * pt-waitpid.c: Removed.
7462 * pt-write.c: Removed.
7463 * pt-accept.c: Removed.
7464 * pt-close.c: Removed.
7465 * pt-connect.c: Removed.
7466 * pt-lseek64.c: Removed.
7467 * pt-sendmsg.c: Removed.
7468 * pt-tcdrain.c: Removed.
7470 2002-12-15 Ulrich Drepper <drepper@redhat.com>
7472 * init.c (__pthread_initialize_minimal_internal): Renamed from
7473 __pthread_initialize_minimal. Make old name an alias. This
7474 converts a normal relocation into a relative relocation.
7476 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7478 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7479 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7480 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7481 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7482 pt-sigwaitinfo, pt-waitid, and pt-writev.
7483 * pt-creat.c: Removed.
7484 * pt-poll.c: Removed.
7485 * pt-pselect.c: Removed.
7486 * pt-readv.c: Removed.
7487 * pt-select.c: Removed.
7488 * pt-sigpause.c: Removed.
7489 * pt-sigsuspend.c: Removed.
7490 * pt-sigwaitinfo.c: Removed.
7491 * pt-waitid.c: Removed.
7492 * pt-writev.c: Removed.
7494 * init.c (pthread_functions): New variable.
7495 (__pthread_initialize_minimal): Pass pointer to pthread_functions
7496 (or NULL) to __libc_pthread_init.
7497 * forward.c: Rewrite to use __libc:pthread_functions array to get
7499 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7501 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7502 Take new parameter. Copy content of variable pointed to by it
7503 to __libc_pthread_init.
7505 * pthreadP.h (struct pthread_functions): New type.
7506 (__libc_pthread_init): Declare.
7508 * pthread_attr_destroy.c: Add namespace protected alias.
7509 * pthread_attr_getdetachstate.c: Likewise.
7510 * pthread_attr_getinheritsched.c: Likewise.
7511 * pthread_attr_getschedparam.c: Likewise.
7512 * pthread_attr_getschedpolicy.c: Likewise.
7513 * pthread_attr_getscope.c: Likewise.
7514 * pthread_attr_setdetachstate.c: Likewise.
7515 * pthread_attr_setinheritsched.c: Likewise.
7516 * pthread_attr_setschedparam.c: Likewise.
7517 * pthread_attr_setschedpolicy.c: Likewise.
7518 * pthread_attr_setscope.c: Likewise.
7519 * pthread_cond_broadcast.c: Likewise.
7520 * pthread_cond_destroy.c: Likewise.
7521 * pthread_cond_init.c: Likewise.
7522 * pthread_cond_signal.c: Likewise.
7523 * pthread_cond_wait.c: Likewise.
7524 * pthread_condattr_destroy.c: Likewise.
7525 * pthread_condattr_init.c: Likewise.
7526 * pthread_equal.c: Likewise.
7527 * pthread_exit.c: Likewise.
7528 * pthread_getschedparam.c: Likewise.
7529 * pthread_self.c: Likewise.
7530 * pthread_setcancelstate.c: Likewise.
7531 * pthread_setschedparam.c: Likewise.
7532 * pthread_mutex_destroy.c: Likewise.
7533 * pthread_mutex_init.c: Likewise.
7534 * pthreadP.h: Add prototypes for the aliases.
7536 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7537 multiple_threads member in correct TCB to 1.
7539 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7540 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
7541 member of thread decriptor, otherwise return unconditionally 1.
7543 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7545 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7546 regular Linux version. Remove file.
7547 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
7548 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
7549 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
7550 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
7551 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
7552 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
7553 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
7554 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
7555 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
7556 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
7557 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
7558 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
7559 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
7560 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
7561 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
7562 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
7563 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
7564 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
7565 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
7566 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
7567 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
7568 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
7569 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
7570 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
7571 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
7572 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
7573 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
7574 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
7575 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
7576 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
7578 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7580 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7581 * sysdeps/unix/sysv/linux/open.c: Removed.
7582 * sysdeps/unix/sysv/linux/fsync.c: Removed.
7583 * sysdeps/unix/sysv/linux/lseek.c: Removed.
7584 * sysdeps/unix/sysv/linux/msync.c: Removed.
7585 * sysdeps/unix/sysv/linux/read.c: Removed.
7586 * sysdeps/unix/sysv/linux/close.c: Removed.
7587 * sysdeps/unix/sysv/linux/creat.c: Removed.
7588 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7589 * sysdeps/unix/sysv/linux/pause.c: Removed.
7590 * sysdeps/unix/sysv/linux/select.c: Removed.
7591 * sysdeps/unix/sysv/linux/write.c: Removed.
7593 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7595 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7596 element in TCB to see whether locking is needed.
7598 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7599 MULTIPLE_THREADS_OFFSET value is correct.
7601 * sysdeps/unix/sysv/linux/close.c: New file.
7602 * sysdeps/unix/sysv/linux/connect.S: New file.
7603 * sysdeps/unix/sysv/linux/creat.c: New file.
7604 * sysdeps/unix/sysv/linux/fsync.c: New file.
7605 * sysdeps/unix/sysv/linux/llseek.c: New file.
7606 * sysdeps/unix/sysv/linux/lseek.c: New file.
7607 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7608 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7609 * sysdeps/unix/sysv/linux/msync.c: New file.
7610 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7611 * sysdeps/unix/sysv/linux/open.c: New file.
7612 * sysdeps/unix/sysv/linux/open64.c: New file.
7613 * sysdeps/unix/sysv/linux/pause.c: New file.
7614 * sysdeps/unix/sysv/linux/poll.c: New file.
7615 * sysdeps/unix/sysv/linux/pread.c: New file.
7616 * sysdeps/unix/sysv/linux/pread64.c: New file.
7617 * sysdeps/unix/sysv/linux/pselect.c: New file.
7618 * sysdeps/unix/sysv/linux/pwrite.c: New file.
7619 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7620 * sysdeps/unix/sysv/linux/readv.c: New file.
7621 * sysdeps/unix/sysv/linux/recv.S: New file.
7622 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7623 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7624 * sysdeps/unix/sysv/linux/select.c: New file.
7625 * sysdeps/unix/sysv/linux/send.S: New file.
7626 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7627 * sysdeps/unix/sysv/linux/sendto.S: New file.
7628 * sysdeps/unix/sysv/linux/sigpause.c: New file.
7629 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7630 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7631 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7632 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7633 * sysdeps/unix/sysv/linux/system.c: New file.
7634 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7635 * sysdeps/unix/sysv/linux/wait.c: New file.
7636 * sysdeps/unix/sysv/linux/waitid.c: New file.
7637 * sysdeps/unix/sysv/linux/waitpid.c: New file.
7638 * sysdeps/unix/sysv/linux/writev.c: New file.
7639 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7641 * pt-readv.c: Fix comment.
7643 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7645 * tst-cleanup1.c: Include stdlib.h.
7647 * tst-cancel5.c: New test.
7648 * Makefile (tests): Add tst-cancel5.
7649 (tst-cancel5): Link against libc.so libpthread.so in that order.
7651 2002-12-13 Ulrich Drepper <drepper@redhat.com>
7653 * forward.c (test_loaded): Prevent recursive calls.
7655 * Makefile (routines): Add libc-cancellation.
7656 * libc-cancellation.c: New file.
7657 * descr.h (struct pthread): Add multiple_threads field.
7658 * allocatestack.c (allocate_stack): Initialize multiple_header field of
7659 new thread descriptor to 1.
7660 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7661 Initialize multiple_thread field after successful thread creation.
7662 * cancellation.c (__do_cancel): Move to pthreadP.h.
7663 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7664 (__pthread_disable_asynccancel): Add internal_function attribute.
7665 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7666 * pthread_setcancelstate.c: Likewise.
7667 * pthread_setcanceltype.c: Likewise.
7668 * pthread_exit.c: Likewise.
7669 * pthreadP.h (CANCELLATION_P): Likewise.
7670 (__do_cancel): Define as static inline.
7671 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7672 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7674 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7675 fields. Define MULTIPLE_THREADS_OFFSET.
7676 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7678 * sysdeps/unix/sysv/linux/accept.S: New file.
7679 * sysdeps/unix/sysv/linux/read.c: New file.
7680 * sysdeps/unix/sysv/linux/write.c: New file.
7681 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7682 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7683 initialization of __libc_locking_needed.
7684 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
7685 __libc_locking_needed, use multiple_threads field in TCB.
7686 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7688 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7690 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
7692 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
7694 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
7695 access to __libc_locking_needed for PIC.
7697 2002-12-12 Jakub Jelinek <jakub@redhat.com>
7699 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
7700 declare for libc.so.
7701 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
7703 (__libc_lock_lock): Put into statement expression.
7704 (__libc_lock_unlock): Remove trailing semicolon.
7705 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
7707 2002-12-12 Roland McGrath <roland@redhat.com>
7709 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
7710 "m" constraint to refer to __libc_locking_needed. Declare it here.
7712 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7714 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
7715 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
7716 Initialize __libc_locking_needed.
7717 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
7718 instead of __register_pthread_fork_handler.
7719 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
7720 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
7721 fork-gen with libc_pthread_init.
7722 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
7723 of __register_pthread_fork_handler.
7724 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
7725 of __register_pthread_fork_handler.
7726 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
7727 __libc_locking_needed to determine whether lock prefix can be avoided.
7728 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7730 2002-12-11 Ulrich Drepper <drepper@redhat.com>
7732 * Makefile (tests): Add tst-cleanup1.
7733 * tst-cleanup1.c: New file.
7734 * cancellation.c (__cleanup_thread): Removed.
7735 (__do_cancel): Remove call to __cleanup_thread.
7736 * pthreadP.h: Remove __cleanup_thread prorotype.
7738 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7739 Remember function and argument even if cancellation handler
7740 function is not available.
7741 (__libc_cleanup_region_end): Execute registered function directly if
7742 pthread functions are not available.
7743 (__libc_cleanup_end): Likewise.
7745 * init.c (__pthread_initialize_minimal): Fix initialization in
7746 static lib by preventing gcc from being too clever.
7748 2002-12-10 Ulrich Drepper <drepper@redhat.com>
7750 * init.c (__pthread_initialize_minimal): Remove unneccesary
7753 * Makefile (tests): We can run tst-locale2 now.
7755 2002-12-09 Ulrich Drepper <drepper@redhat.com>
7757 * Versions: Remove duplicated sigwait entry.
7759 2002-12-08 Ulrich Drepper <drepper@redhat.com>
7761 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
7764 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
7766 * pthreadP.h: Declare __pthread_enable_asynccancel and
7767 __pthread_disable_asynccancel.
7768 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
7769 (CANCEL_RESET): Use __pthread_disable_asynccancel.
7770 * cancellation.c (__pthread_enable_asynccancel): New function.
7771 (__pthread_disable_asynccancel): New function.
7772 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
7773 * pt-close.c: Likewise.
7774 * pt-connect.c: Likewise.
7775 * pt-creat.c: Likewise.
7776 * pt-fcntl.c: Likewise.
7777 * pt-fsync.c: Likewise.
7778 * pt-lseek.c: Likewise.
7779 * pt-lseek64.c: Likewise.
7780 * pt-msgrcv.c: Likewise.
7781 * pt-msgsnd.c: Likewise.
7782 * pt-msync.c: Likewise.
7783 * pt-nanosleep.c: Likewise.
7784 * pt-open.c: Likewise.
7785 * pt-open64.c: Likewise.
7786 * pt-pause.c: Likewise.
7787 * pt-poll.c: Likewise.
7788 * pt-pread.c: Likewise.
7789 * pt-pread64.c: Likewise.
7790 * pt-pselect.c: Likewise.
7791 * pt-pwrite.c: Likewise.
7792 * pt-pwrite64.c: Likewise.
7793 * pt-read.c: Likewise.
7794 * pt-readv.c: Likewise.
7795 * pt-recv.c: Likewise.
7796 * pt-recvfrom.c: Likewise.
7797 * pt-recvmsg.c: Likewise.
7798 * pt-select.c: Likewise.
7799 * pt-send.c: Likewise.
7800 * pt-sendmsg.c: Likewise.
7801 * pt-sendto.c: Likewise.
7802 * pt-sigpause.c: Likewise.
7803 * pt-sigsuspend.c: Likewise.
7804 * pt-sigtimedwait.c: Likewise.
7805 * pt-sigwait.c: Likewise.
7806 * pt-sigwaitinfo.c: Likewise.
7807 * pt-system.c: Likewise.
7808 * pt-tcdrain.c: Likewise.
7809 * pt-wait.c: Likewise.
7810 * pt-waitid.c: Likewise.
7811 * pt-waitpid.c: Likewise.
7812 * pt-write.c: Likewise.
7813 * pt-writev.c: Likewise.
7814 * pthread_join.c: Likewise.
7815 * pthread_timedjoin.c: Likewise.
7817 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7818 (__xpg_sigpause): New function.
7819 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7821 2002-12-07 Ulrich Drepper <drepper@redhat.com>
7823 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7825 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7826 _GI_pthread_cleanup_pop to pthreadP.h.
7828 * ftrylockfile.c: Use _IO_lock_trylock instead of
7829 pthread_mutex_trylock.
7831 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7832 (CANCEL_RESET): Likewise.
7833 (__pthread_setcanceltype_): Declare.
7834 (__pthread_mutex_lock_internal): Declare.
7835 (__pthread_mutex_unlock_internal): Declare.
7836 (__pthread_once_internal): Declare.
7837 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7838 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7840 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7841 and pthread_mutex_unlock.
7842 * pthread_cond_wait.c: Likewise.
7843 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7844 * pthread_mutex_unlock.c: Likewise.
7846 * pthread_setcanceltype.c: Add additional alias
7847 __pthread_setcanceltype.
7849 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7850 * sem_open.c (sem_open): Likewise.
7851 Use __libc_open, __libc_write, and __libc_close instead of
7852 open, write, and close respectively.
7854 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7855 Rewrite as statement expression since it must return a value.
7857 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7858 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7861 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7862 alias __pthread_once_internal.
7864 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7866 2002-12-06 Ulrich Drepper <drepper@redhat.com>
7868 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7869 * tst-stdio1.c: New file.
7870 * tst-stdio2.c: New file.
7872 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7874 * Makefile (tests): Comment out tst-locale2 for now.
7875 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7877 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7879 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7880 Use _IO_lock_init instead of explicit assignment.
7882 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7883 Define __libc_lock_* and __libc_lock_recursive macros with
7884 lowlevellock macros, not pthread mutexes.
7886 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
7887 of pthread_mutex_lock.
7888 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
7889 instead of pthread_mutex_unlock.
7891 2002-12-06 Roland McGrath <roland@redhat.com>
7893 * allocatestack.c (__stack_user): Use uninitialized defn.
7894 * init.c (__pthread_initialize_minimal): Initialize it here.
7896 2002-12-05 Roland McGrath <roland@redhat.com>
7898 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7900 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7902 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7905 2002-12-05 Ulrich Drepper <drepper@redhat.com>
7907 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7909 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
7910 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
7911 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
7912 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
7913 for __libc_lock_* macros.
7914 * Makefile (routines): Add libc-lowlevellock.
7916 2002-10-09 Roland McGrath <roland@redhat.com>
7918 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
7919 Under [__PIC__], call the function via the pointer fetched for
7920 comparison rather than a call by name that uses the PLT.
7921 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
7922 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
7923 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
7924 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
7925 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
7927 2002-12-04 Roland McGrath <roland@redhat.com>
7929 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
7931 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
7932 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
7934 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
7936 2002-12-04 Ulrich Drepper <drepper@redhat.com>
7938 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
7939 a completely opaque, non-integer type.
7940 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7942 2002-12-05 Jakub Jelinek <jakub@redhat.com>
7944 * sysdeps/i386/tls.h: Include stdlib.h.
7945 * sysdeps/x86_64/tls.h: Likewise.
7947 2002-12-04 Ulrich Drepper <drepper@redhat.com>
7949 * Makefile (tests): Add tst-locale2.
7950 (tests-static): Likewise.
7951 * tst-locale2.c: New file.
7953 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
7954 volatile and add memory clobbers to lock operations.
7956 2002-12-03 Ulrich Drepper <drepper@redhat.com>
7958 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
7959 * sysdeps/i386/i486/bits/atomic.h: New file.
7960 * sysdeps/i386/i586/bits/atomic.h: New file.
7961 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
7962 include i486 version.
7963 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
7964 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
7965 Patch by Marijn Ros <marijn@mad.scientist.com>.
7967 * allocatestack.c (get_cached_stack): Don't crash if we first
7968 found a stack with a larger size then needed.
7969 Reported by Hui Huang <hui.huang@sun.com>.
7971 * Makefile (tests): Add tst-sysconf.
7972 * tst-sysconf.c: New file.
7974 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
7975 PTHREAD_THREADS_MAX.
7977 2002-12-02 Roland McGrath <roland@redhat.com>
7979 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
7980 Declare using hidden_proto instead of attribute_hidden, so there are
7981 non-.hidden static symbols for gdb to find.
7982 (__pthread_keys): Likewise.
7983 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
7984 * allocatestack.c (__stack_user): Likewise.
7985 * pthread_create.c (__pthread_keys): Likewise.
7986 (__nptl_threads_events, __nptl_last_event): Make these static instead
7988 * pthread_key_create.c (__pthread_pthread_keys_max,
7989 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
7991 2002-12-02 Ulrich Drepper <drepper@redhat.com>
7993 * Makefile (tests): Add tst-locale1. If buid-static is yes link
7995 * tst-locale1.c: New file.
7997 * pthread_cond_timedwait.c: Include <stdlib.h>.
7999 * Makefile (tests): Add tst-fork2 and tst-fork3.
8000 * tst-fork2.c: New file.
8001 * tst-fork3.c: New file.
8003 2002-11-28 Ulrich Drepper <drepper@redhat.com>
8005 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
8007 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
8008 require it to 200112L.
8010 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
8011 instruction only if HAVE_CMOV is defined.
8012 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
8014 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
8016 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
8018 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
8020 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
8022 2002-11-27 Ulrich Drepper <drepper@redhat.com>
8024 * sysdeps/x86_64/bits/atomic.h: New file.
8026 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
8029 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
8030 possible since gettid cannot fail.
8032 * sysdeps/x86_64/pthreaddef.h: New file.
8034 * sysdeps/i386/pthreaddef.h (gettid): Removed.
8036 * sysdeps/x86_64/pthread_spin_init.c: New file.
8037 * sysdeps/x86_64/pthread_spin_lock.c: New file.
8038 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
8039 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
8041 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
8042 Add missing lock prefix. Minute optimization.
8044 * tst-spin2.c (main): Also check successful trylock call.
8046 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
8047 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
8049 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
8050 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
8052 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
8053 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
8054 value in case of an error. Add support for INTERNAL_SYSCALL.
8056 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
8057 value in case of an error.
8059 * sysdeps/x86_64/tls.h: New file.
8061 2002-11-26 Ulrich Drepper <drepper@redhat.com>
8063 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
8064 takes the array member name and the index as parameters.
8065 (THREAD_SETMEM_NC): Likewise.
8066 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
8067 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
8070 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
8071 to decide which code to use.
8072 (THREAD_SETMEM_NC): Likewise.
8074 * allocatestack.c (queue_stack): Don't remove stack from list here.
8075 Do it in the caller. Correct condition to prematurely terminate
8076 loop to free stacks.
8077 (__deallocate_stack): Remove stack from list here.
8079 2002-11-26 Ulrich Drepper <drepper@redhat.com>
8081 * Makefile (tests): Add tst-stack1.
8082 * tst-stack1.c: New file.
8084 * allocatestack.c (allocate_stack): Initialize the TCB on a user
8087 * pthread_attr_getstack.c: Return bottom of the thread area.
8089 2002-11-25 Ulrich Drepper <drepper@redhat.com>
8091 * Makefile (libpthread-routines): Add pt-allocrtsig and
8092 pthread_kill_other_threads.
8093 * pt-allocrtsig.c: New file.
8094 * pthread_kill_other_threads.c: New file.
8095 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
8096 all three functions.
8097 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8099 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
8100 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
8101 and __libc_allocate_rtsig_private.
8102 * Versions (libpthread): Export pthread_kill_other_threads_np,
8103 __libc_current_sigrtmin, and __libc_current_sigrtmax.
8105 2002-11-24 Ulrich Drepper <drepper@redhat.com>
8107 * allocatestack.c (allocate_stack): stackaddr in attribute points to
8108 the end of the stack. Adjust computations.
8109 When mprotect call fails dequeue stack and free it.
8110 * pthread_attr_setstack.c: Store top of the stack in stackaddr
8112 * pthread_getattr_np.c: Likewise.
8114 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
8117 2002-11-23 Ulrich Drepper <drepper@redhat.com>
8119 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
8120 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
8122 2002-11-22 Ulrich Drepper <drepper@redhat.com>
8124 * pthread_getspecific.c: Optimize access to first 2nd-level array.
8125 * pthread_setspecific.c: Likewise.
8127 2002-11-21 Ulrich Drepper <drepper@redhat.com>
8129 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
8130 definitions. Get them from the official place.
8131 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
8133 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
8134 Use new CLONE_ flags in clone() calls.
8136 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
8137 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
8139 * Versions: Add pthread_* functions for libc.
8140 * forward.c: New file.
8142 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
8144 * herrno.c: New file.
8147 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
8148 sem_trywait, and sem_timedwait. Add herrno and res.
8149 * sem_init.c: Don't initialize lock and waiters members.
8150 * sem_open.c: Likewise.
8151 * sem_post.c: Removed.
8152 * sem_wait.c: Removed.
8153 * sem_trywait.c: Removed.
8154 * sem_timedwait.c: Removed.
8155 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
8156 Includes full implementations of sem_post, sem_wait, sem_trywait,
8158 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
8159 for new implementation.
8160 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
8163 * tst-sem3.c: Improve error message.
8164 * tst-signal3.c: Likewise.
8166 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
8167 to tell the kernel about the termination futex and to initialize tid
8168 member. Don't initialize main_thread.
8169 * descr.h (struct pthread): Remove main_thread member.
8170 * cancelllation.c (__do_cancel): Remove code handling main thread.
8171 The main thread is not special anymore.
8173 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
8174 size of the stacks to stack_cache_actsize.
8176 * pt-readv.c: Add missing "defined".
8177 * pt-sigwait.c: Likewise.
8178 * pt-writev.c: Likewise.
8180 2002-11-09 Ulrich Drepper <drepper@redhat.com>
8182 * Versions: Export __connect from libpthread.
8183 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8185 * Makefile (libpthread-routines): Add pt-raise.
8186 * sysdeps/unix/sysv/linux/raise.c: New file.
8187 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
8188 * sysdeps/generic/pt-raise.c: New file.
8190 * pthread_cond_init.c: Initialize all data elements of the condvar
8191 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
8193 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
8194 * pthread_create.c: Likewise.
8196 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
8197 * tst-key1.c: New file.
8198 * tst-key2.c: New file.
8199 * tst-key3.c: New file.
8201 * Versions: Export pthread_detach for version GLIBC_2.0.
8202 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
8204 2002-11-08 Ulrich Drepper <drepper@redhat.com>
8206 * pthread_key_create.c: Terminate search after an unused key was found.
8207 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8209 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
8210 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8212 2002-10-10 Ulrich Drepper <drepper@redhat.com>
8214 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
8215 dynamic lookup for errno in PIC.
8217 * allocatestack.c (get_cached_stack): Rearrange code slightly to
8218 release the stack lock as soon as possible.
8219 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
8220 the static TLS block.
8221 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
8223 * cancellation.c: Renamed from cancelation.c.
8224 * Makefile: Adjust accordingly.
8225 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
8226 * cleanup_defer.c: Use CANCELLATION_P.
8227 * pthread_testcancel.c: Likewise.
8228 * descr.h: Fix spelling in comments.
8230 * pthread_getattr_np.c: Likewise.
8231 * pthread_getschedparam.c: Likewise.
8232 * pthread_setschedparam.c: Likewise.
8233 * Versions: Likewise.
8235 * pt-pselect.c: New file.
8236 * Makefile (libpthread-routines): Add pt-pselect.
8237 * Versions: Add pselect.
8239 * tst-cancel4.c: New file.
8240 * Makefile (tests): Add tst-cancel4.
8242 2002-10-09 Ulrich Drepper <drepper@redhat.com>
8244 * pthread_mutex_lock.c: Always record lock ownership.
8245 * pthread_mutex_timedlock.c: Likewise.
8246 * pthread_mutex_trylock.c: Likewise.
8248 * pt-readv.c: New file.
8249 * pt-writev.c: New file.
8250 * pt-creat.c: New file.
8251 * pt-msgrcv.c: New file.
8252 * pt-msgsnd.c: New file.
8253 * pt-poll.c: New file.
8254 * pt-select.c: New file.
8255 * pt-sigpause.c: New file.
8256 * pt-sigsuspend.c: New file.
8257 * pt-sigwait.c: New file.
8258 * pt-sigwaitinfo.c: New file.
8259 * pt-waitid.c: New file.
8260 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8261 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8262 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8263 * Versions: Add all the new functions.
8265 * tst-exit1.c: New file.
8266 * Makefile (tests): Add tst-exit1.
8268 * sem_timedwait.c: Minor optimization for more optimal fastpath.
8270 2002-10-08 Ulrich Drepper <drepper@redhat.com>
8272 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8274 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8275 call. pthread_join is an official cancellation point.
8276 * pthread_timedjoin.c: Likewise.
8278 * pthread_cond_wait.c: Revert order in which internal lock are dropped
8279 and the condvar's mutex are retrieved.
8280 * pthread_cond_timedwait.c: Likewise.
8281 Reported by dice@saros.East.Sun.COM.
8283 2002-10-07 Ulrich Drepper <drepper@redhat.com>
8285 * pthreadP.h: Cut out all type definitions and move them...
8286 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
8287 * pthreadP.h: Include <internaltypes.h>.
8289 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8292 * sem_trywait.c: Shuffle #includes around to get right order.
8293 * sem_timedwait.c: Likewise.
8294 * sem_post.c: Likewise.
8295 * sem_wait.c: Likewise.
8297 * nptl 0.3 released.
8299 * Makefile (tests): Add tst-signal3.
8300 * tst-signal3.c: New file.
8302 2002-10-05 Ulrich Drepper <drepper@redhat.com>
8304 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8305 the asms modify the sem object.
8306 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8308 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8310 * pthreadP.h (struct sem): New type. Actual semaphore type.
8311 * semaphoreP.h: Include pthreadP.h.
8312 * sem_getvalue.c: Adjust to sem_t change.
8313 * sem_init.c: Likewise.
8314 * sem_open.c: Likewise.
8315 * sem_post.c: Likewise.
8316 * sem_timedwait.c: Likewise.
8317 * sem_trywait.c: Likewise.
8318 * sem_wait.c: Likewise.
8320 2002-10-04 Ulrich Drepper <drepper@redhat.com>
8322 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8323 * tst-basic2.c: New file.
8324 * tst-exec1.c: New file.
8325 * tst-exec2.c: New file.
8326 * tst-exec3.c: New file.
8328 * tst-fork1.c: Remove extra */.
8330 * nptl 0.2 released. The API for IA-32 is complete.