1 2006-09-05 Ulrich Drepper <drepper@redhat.com>
4 * descr.h (struct pthread): Add parent_cancelhandling.
5 * sysdeps/pthread/createthread.c (create_thread): Pass parent
6 cancelhandling value to child.
7 * pthread_create.c (start_thread): If parent thread was canceled
8 reset the SIGCANCEL mask.
9 * Makefile (tests): Add tst-cancel25.
10 * tst-cancel25.c: New file.
12 2006-09-05 Jakub Jelinek <jakub@redhat.com>
13 Ulrich Drepper <drepper@redhat.com>
15 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
16 counterp if it is already zero.
17 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
19 2006-03-04 Jakub Jelinek <jakub@redhat.com>
20 Roland McGrath <roland@redhat.com>
22 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
23 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
24 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
25 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
26 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
27 lll_robust_mutex_timedlock, lll_mutex_unlock,
28 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
29 Add _L_*_ symbols around the subsection.
30 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
31 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
33 2006-03-03 Jakub Jelinek <jakub@redhat.com>
34 Roland McGrath <roland@redhat.com>
36 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
37 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
38 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
39 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
40 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
41 lll_robust_mutex_timedlock, lll_mutex_unlock,
42 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
43 Add _L_*_ symbols around the subsection.
44 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
45 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
47 2006-08-31 Ulrich Drepper <drepper@redhat.com>
49 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
50 change because it can disturb too much existing code. If real hard
51 reader preference is needed we'll introduce another type.
52 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
53 (pthread_rwlock_timedwrlock): Likewise.
54 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
57 2006-08-30 Ulrich Drepper <drepper@redhat.com>
59 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
61 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
62 (pthread_rwlock_timedwrlock): Likewise.
63 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
66 2006-08-25 Jakub Jelinek <jakub@redhat.com>
68 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
69 Only define ifdef SHARED.
71 2006-08-23 Ulrich Drepper <drepper@redhat.com>
73 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
74 (free_stacks): ...here.
75 (__free_stack_cache): New function.
76 * pthreadP.h: Declare __free_stack_cache.
77 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
79 * init.c (pthread_functions): Initialize ptr_freeres.
80 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
83 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
86 * Makefile (extra-objs): Add modules to extra-test-objs instead.
88 2006-08-20 Ulrich Drepper <drepper@redhat.com>
90 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
91 _XOPEN_REALTIME_THREADS.
93 2006-08-15 Jakub Jelinek <jakub@redhat.com>
95 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
96 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
97 HAVE_CLOCK_GETTIME_VSYSCALL.
98 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
100 2006-08-14 Jakub Jelinek <jakub@redhat.com>
102 * sysdeps/unix/sysv/linux/bits/posix_opt.h
103 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
104 * descr.h (struct priority_protection_data): New type.
105 (struct pthread): Add tpp field.
106 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
107 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
108 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
109 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
111 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
112 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
113 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
114 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
116 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
118 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
119 * pthread_mutexattr_getprioceiling.c
120 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
121 in the SCHED_FIFO priority range.
122 * pthread_mutexattr_setprioceiling.c
123 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
124 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
125 if mutex is not TPP. Ceiling is now in __data.__lock.
126 * pthread_mutex_setprioceiling.c: Include stdbool.h.
127 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
128 is now in __data.__lock. Add locking.
129 * pthread_create.c (__free_tcb): Free pd->tpp structure.
130 * Makefile (libpthread-routines): Add tpp.
131 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
132 * tst-tpp.h: New file.
133 * tst-mutexpp1.c: New file.
134 * tst-mutexpp6.c: New file.
135 * tst-mutexpp10.c: New file.
136 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
137 * tst-mutex6.c (TEST_FUNCTION): Likewise.
139 2006-08-12 Ulrich Drepper <drepper@redhat.com>
142 * pthread_join.c (pthread_join): Account for self being canceled
143 when checking for deadlocks.
144 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
145 (tf1): Don't print anything after pthread_join returns, this would be
146 another cancellation point.
148 * tst-join6.c: New file.
149 * Makefile (tests): Add tst-join6.
151 2006-08-03 Ulrich Drepper <drepper@redhat.com>
154 * pthread_setspecific.c (__pthread_setspecific): Check
155 out-of-range index before checking for unused key.
157 * sysdeps/pthread/gai_misc.h: New file.
159 2006-08-01 Ulrich Drepper <drepper@redhat.com>
161 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
162 file. Don't use sysctl.
163 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
164 overwrite the file if this is likely not true.
166 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
168 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
169 * Makefile (tests): Add tst-getpid3.
170 * tst-getpid3.c: New file.
172 2006-07-30 Roland McGrath <roland@redhat.com>
174 * Makefile (libpthread-routines): Add ptw-sigsuspend.
176 * sysdeps/unix/sysv/linux/i386/not-cancel.h
177 (pause_not_cancel): New macro.
178 (nanosleep_not_cancel): New macro.
179 (sigsuspend_not_cancel): New macro.
180 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
181 nanosleep_not_cancel macro from <not-cancel.h>.
182 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
183 macro from <not-cancel.h>.
185 2006-07-28 Ulrich Drepper <drepper@redhat.com>
186 Jakub Jelinek <jakub@redhat.com>
188 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
189 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
190 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
191 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
192 * pthread_mutex_init.c: Add support for priority inheritance mutex.
193 * pthread_mutex_lock.c: Likewise.
194 * pthread_mutex_timedlock.c: Likewise.
195 * pthread_mutex_trylock.c: Likewise.
196 * pthread_mutex_unlock.c: Likewise.
197 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
199 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
200 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
201 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
202 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
203 pthread-pi-defines.sym.
204 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
205 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
206 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
207 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
208 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
209 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
210 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
211 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
212 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
213 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
214 _POSIX_THREAD_PRIO_INHERIT to 200112L.
215 * tst-mutex1.c: Adjust to allow use in PI mutex test.
216 * tst-mutex2.c: Likewise.
217 * tst-mutex3.c: Likewise.
218 * tst-mutex4.c: Likewise.
219 * tst-mutex5.c: Likewise.
220 * tst-mutex6.c: Likewise.
221 * tst-mutex7.c: Likewise.
222 * tst-mutex7a.c: Likewise.
223 * tst-mutex8.c: Likewise.
224 * tst-mutex9.c: Likewise.
225 * tst-robust1.c: Likewise.
226 * tst-robust7.c: Likewise.
227 * tst-robust8.c: Likewise.
228 * tst-mutexpi1.c: New file.
229 * tst-mutexpi2.c: New file.
230 * tst-mutexpi3.c: New file.
231 * tst-mutexpi4.c: New file.
232 * tst-mutexpi5.c: New file.
233 * tst-mutexpi6.c: New file.
234 * tst-mutexpi7.c: New file.
235 * tst-mutexpi7a.c: New file.
236 * tst-mutexpi8.c: New file.
237 * tst-mutexpi9.c: New file.
238 * tst-robust1.c: New file.
239 * tst-robust2.c: New file.
240 * tst-robust3.c: New file.
241 * tst-robust4.c: New file.
242 * tst-robust5.c: New file.
243 * tst-robust6.c: New file.
244 * tst-robust7.c: New file.
245 * tst-robust8.c: New file.
246 * Makefile (tests): Add the new tests.
248 * pthread_create.c (start_thread): Add some casts to avoid warnings.
249 * pthread_mutex_destroy.c: Remove unneeded label.
251 2006-07-01 Ulrich Drepper <drepper@redhat.com>
253 * pthread_mutex_init.c (__pthread_mutex_init): Move some
254 computations to compile time.
256 2006-06-04 Ulrich Drepper <drepper@redhat.com>
258 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
260 2006-05-15 Ulrich Drepper <drepper@redhat.com>
262 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
264 2006-05-11 Ulrich Drepper <drepper@redhat.com>
266 * pthread_key_create.c (__pthread_key_create): Do away with
269 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
270 (__kernel_cpumask_size): Mark as hidden.
271 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
273 * sem_open.c (__sem_mappings_lock): Mark as hidden.
274 * semaphoreP.h (__sem_mappings_lock): Likewise.
276 2006-05-10 Ulrich Drepper <drepper@redhat.com>
278 * pthread_atfork.c: Mark __dso_handle as hidden.
280 2006-05-09 Ulrich Drepper <drepper@redhat.com>
283 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
284 the reload problem. Change the one path in pthread_cancel_init
285 which causes the problem. Force gcc to reload. Simplify callers.
286 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
287 (_Unwind_GetBSP): Undo last patch.
289 2006-05-07 Ulrich Drepper <drepper@redhat.com>
291 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
292 function pointer is reloaded after pthread_cancel_init calls.
295 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
296 pointers are reloaded after pthread_cancel_init calls.
298 2006-05-01 Ulrich Drepper <drepper@redhat.com>
300 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
303 2006-04-27 Ulrich Drepper <drepper@redhat.com>
305 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
306 Allocate new object which is passed to timer_sigev_thread so that
307 the timer can be deleted before the new thread is scheduled.
309 2006-04-26 Roland McGrath <roland@redhat.com>
311 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
313 2006-04-08 Ulrich Drepper <drepper@redhat.com>
315 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
316 suffix for conditional jumps.
317 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
318 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
319 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
320 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
321 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
322 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
324 * init.c (sigcancel_handler): Compare with correct PID even if the
325 thread is in the middle of a fork call.
326 (sighandler_setxid): Likewise.
327 Reported by Suzuki K P <suzuki@in.ibm.com> .
329 2006-04-07 Jakub Jelinek <jakub@redhat.com>
331 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
333 2006-04-06 Ulrich Drepper <drepper@redhat.com>
335 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
336 fails [Coverity CID 105].
338 2006-04-05 Ulrich Drepper <drepper@redhat.com>
340 * sysdeps/pthread/pthread.h: Add nonnull attributes.
342 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
345 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
346 Define __lll_rel_instr using lwsync.
348 2006-03-27 Ulrich Drepper <drepper@redhat.com>
350 * allocatestack.c (allocate_stack): Always initialize robust_head.
351 * descr.h: Define struct robust_list_head.
352 (struct pthread): Use robust_list_head in robust mutex list definition.
353 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
354 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
355 (__pthread_initialize_minimal_internal): Register robust_list with
357 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
358 Declare __set_robust_list_avail.
359 * pthread_create.c (start_thread): Register robust_list of new thread.
360 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
362 * pthread_mutex_destroy.c: For robust mutexes don't look at the
363 number of users, it's unreliable.
364 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
365 set_robust_list syscall is available.
366 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
367 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
368 Set robust_head.list_op_pending before trying to lock a robust mutex.
369 * pthread_mutex_timedlock.c: Likewise.
370 * pthread_mutex_trylock.c: Likewise.
371 * pthread_mutex_unlock.c: Likewise for unlocking.
372 * Makefile (tests): Add tst-robust8.
373 * tst-robust8.c: New file.
375 2006-03-08 Andreas Schwab <schwab@suse.de>
377 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
378 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
380 2006-03-05 Roland McGrath <roland@redhat.com>
382 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
383 and $config_os doesn't match *linux*.
385 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
387 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
389 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
390 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
391 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
392 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
393 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
394 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
396 2006-03-02 Ulrich Drepper <drepper@redhat.com>
398 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
400 2006-03-01 Ulrich Drepper <drepper@redhat.com>
402 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
403 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
405 (__lll_robust_timedlock_wait): Likewise.
406 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
407 (__lll_robust_lock_wait): Likewise.
408 (__lll_robust_timedlock_wait): Likewise.
409 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
410 (__lll_robust_lock_wait): Likewise.
411 (__lll_robust_timedlock_wait): Likewise.
413 2006-03-01 Jakub Jelinek <jakub@redhat.com>
415 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
416 lll_robust_mutex_trylock, lll_robust_mutex_lock,
417 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
418 lll_robust_mutex_unlock): Define.
419 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
421 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
423 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
424 instead of <clone.S>.
426 2006-02-27 Jakub Jelinek <jakub@redhat.com>
428 * Makefile (libpthread-routines): Add
429 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
430 and pthread_mutex_[sg]etprioceiling.
431 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
432 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
433 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
434 pthread_mutex_setprioceiling.
435 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
436 PTHREAD_PRIO_PROTECT): New enum values.
437 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
438 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
439 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
441 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
442 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
443 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
445 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
446 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
447 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
448 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
449 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
450 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
451 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
453 * pthread_mutex_getprioceiling.c: New file.
454 * pthread_mutex_setprioceiling.c: New file.
455 * pthread_mutexattr_getprioceiling.c: New file.
456 * pthread_mutexattr_setprioceiling.c: New file.
457 * pthread_mutexattr_getprotocol.c: New file.
458 * pthread_mutexattr_setprotocol.c: New file.
460 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
462 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
464 2006-02-27 Roland McGrath <roland@redhat.com>
466 * sysdeps/pthread/Subdirs: List nptl here too.
467 * configure (libc_add_on_canonical): New variable.
469 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
471 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
472 self to get main source tree's file.
473 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
474 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
475 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
476 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
477 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
478 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
479 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
480 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
481 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
482 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
483 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
484 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
485 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
487 * Makefile: Use $(sysdirs) in vpath directive.
489 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
490 (CPPFLAGS-timer_routines.c): Likewise.
492 * Makeconfig (includes): Variable removed.
494 2006-02-26 Roland McGrath <roland@redhat.com>
496 * sysdeps/generic/pt-raise.c: Moved to ...
497 * pt-raise.c: ... here.
498 * sysdeps/generic/lowlevellock.h: Moved to ...
499 * lowlevellock.h: ... here.
501 2006-02-23 Roland McGrath <roland@redhat.com>
503 * descr.h (struct pthread): Add final member `end_padding'.
504 (PTHREAD_STRUCT_END_PADDING): Use it.
506 2006-02-20 Roland McGrath <roland@redhat.com>
508 * sysdeps/mips: Directory removed, saved in ports repository.
509 * sysdeps/unix/sysv/linux/mips: Likewise.
511 2006-02-18 Ulrich Drepper <drepper@redhat.com>
513 * tst-robust1.c: Add second mutex to check that the mutex list is
516 2006-02-17 Jakub Jelinek <jakub@redhat.com>
518 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
519 lll_robust_mutex_trylock, lll_robust_mutex_lock,
520 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
521 lll_robust_mutex_unlock): New macros.
522 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
523 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
524 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
525 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
526 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
528 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
530 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
532 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
534 2006-02-17 Ulrich Drepper <drepper@redhat.com>
536 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
537 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
538 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
539 (lll_robust_mutex_unlock): Likewise.
541 2006-02-13 Jakub Jelinek <jakub@redhat.com>
543 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
544 Set robust_list.__next rather than robust_list.
545 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
546 (__pthread_list_t): New typedef.
547 (pthread_mutex_t): Replace __next and __prev fields with __list.
548 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
549 (__pthread_list_t): New typedef.
550 (pthread_mutex_t): Replace __next and __prev fields with __list.
551 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
552 (__pthread_list_t, __pthread_slist_t): New typedefs.
553 (pthread_mutex_t): Replace __next and __prev fields with __list.
554 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
555 (__pthread_list_t, __pthread_slist_t): New typedefs.
556 (pthread_mutex_t): Replace __next and __prev fields with __list.
557 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
558 (__pthread_list_t, __pthread_slist_t): New typedefs.
559 (pthread_mutex_t): Replace __next and __prev fields with __list.
560 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
561 (__pthread_slist_t): New typedef.
562 (pthread_mutex_t): Replace __next field with __list.
564 2006-02-15 Ulrich Drepper <drepper@redhat.com>
566 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
567 PTHREAD_MUTEX_OWNERDEAD.
568 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
569 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
570 * Makefile (libpthread-routines): Add lowlevelrobustlock.
571 * pthread_create.c (start_thread): Very much simplify robust_list loop.
572 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
573 to PTHREAD_MUTEX_INCONSISTENT.
574 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
575 * pthread_mutex_lock.c: Reimplement robust mutex handling.
576 * pthread_mutex_trylock.c: Likewise.
577 * pthread_mutex_timedlock.c: Likewise.
578 * pthread_mutex_unlock.c: Likewise.
579 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
580 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
581 lowlevelrobustlock.sym.
582 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
583 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
585 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
586 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
587 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
588 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
589 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
591 2006-02-12 Ulrich Drepper <drepper@redhat.com>
593 * allocatestack.c (allocate_stack): Initialize robust_list.
594 * init.c (__pthread_initialize_minimal_internal): Likewise.
595 * descr.h (struct xid_command): Pretty printing.
596 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
597 robust_list. Adjust macros.
598 * pthread_create.c (start_thread): Adjust robust_list handling.
599 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
600 but the owner for all robust mutex types.
601 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
602 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
603 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
604 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
606 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
607 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
609 2006-02-08 Jakub Jelinek <jakub@redhat.com>
611 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
612 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
614 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
616 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
618 (lll_futex_timed_wait): Define.
620 2006-01-19 Ulrich Drepper <drepper@redhat.com>
622 * tst-cancel4.c: Test ppoll.
624 2006-01-18 Andreas Jaeger <aj@suse.de>
627 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
628 (pthread_mutex_t): Follow changes for other archs. Based on patch
629 by Jim Gifford <patches@jg555.com>.
631 2006-01-13 Richard Henderson <rth@redhat.com>
633 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
635 2006-01-10 Roland McGrath <roland@redhat.com>
637 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
638 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
639 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
640 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
641 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
642 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
643 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
644 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
645 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
646 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
648 2006-01-09 Roland McGrath <roland@redhat.com>
650 * tst-initializers1-c89.c: New file.
651 * tst-initializers1-c99.c: New file.
652 * tst-initializers1-gnu89.c: New file.
653 * tst-initializers1-gnu99.c: New file.
654 * Makefile (tests): Add them.
655 (CFLAGS-tst-initializers1-c89.c): New variable.
656 (CFLAGS-tst-initializers1-c99.c): New variable.
657 (CFLAGS-tst-initializers1-gnu89.c): New variable.
658 (CFLAGS-tst-initializers1-gnu99.c): New variable.
660 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
661 Use __extension__ on anonymous union definition.
662 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
663 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
664 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
665 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
666 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
668 2006-01-08 Jakub Jelinek <jakub@redhat.com>
670 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
671 Don't give the union a name because it changes the mangled name.
672 Instead name the struct for __data.
673 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
675 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
678 2006-01-09 Jakub Jelinek <jakub@redhat.com>
680 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
681 stack bias to mc_ftp field.
683 2006-01-07 Ulrich Drepper <drepper@redhat.com>
685 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
686 being too clever and reloading the futex value where it shouldn't.
688 2006-01-06 Ulrich Drepper <drepper@redhat.com>
690 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
693 2006-01-06 Jakub Jelinek <jakub@redhat.com>
695 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
698 2006-01-06 Ulrich Drepper <drepper@redhat.com>
700 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
701 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
704 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
705 Don't give the union a name because it changes the mangled name.
706 Instead name the struct for __data.
707 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
708 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
709 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
710 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
711 * pthread_create.c (start_thread): Adjust robust mutex free loop.
712 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
714 2006-01-05 Ulrich Drepper <drepper@redhat.com>
716 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
718 (lll_futex_timed_wait): Define.
719 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
720 * sysdeps/pthread/aio_misc.h: New file.
722 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
724 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
726 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
728 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
729 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
730 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
732 2006-01-04 Ulrich Drepper <drepper@redhat.com>
734 * tst-cancel24.cc: Use C headers instead of C++ headers.
736 2006-01-03 Jakub Jelinek <jakub@redhat.com>
738 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
739 sparc-linux configured glibc.
740 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
741 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
742 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
743 atomic_compare_and_exchange_val_24_acq instead of
744 atomic_compare_and_exchange_val_acq.
745 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
746 instead of atomic_exchange_rel.
747 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
748 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
750 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
752 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
753 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
754 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
755 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
756 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
757 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
759 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
761 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
762 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
763 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
765 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
767 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
769 2006-01-03 Ulrich Drepper <drepper@redhat.com>
771 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
774 2006-01-02 Jakub Jelinek <jakub@redhat.com>
776 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
777 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
778 THREAD_COPY_POINTER_GUARD): Define.
779 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
780 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
782 2006-01-01 Ulrich Drepper <drepper@redhat.com>
784 * version.c: Update copyright year.
786 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
788 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
789 .eh_frame section, use cfi_* directives.
790 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
792 2005-12-30 Ulrich Drepper <drepper@redhat.com>
794 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
797 2005-12-29 Ulrich Drepper <drepper@redhat.com>
799 * sysdeps/pthread/sigaction.c: Removed.
800 * sigaction.c: New file.
801 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
803 2005-12-28 Ulrich Drepper <drepper@redhat.com>
805 * Makefile (tests): Add tst-signal7.
806 * tst-signal7.c: New file.
808 2005-12-27 Roland McGrath <roland@redhat.com>
810 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
811 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
812 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
813 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
814 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
815 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
816 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
817 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
818 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
819 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
820 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
822 2005-12-27 Jakub Jelinek <jakub@redhat.com>
824 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
825 and __prev field to pthread_mutex_t.
826 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
827 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
828 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
829 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
830 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
833 2005-12-26 Ulrich Drepper <drepper@redhat.com>
835 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
836 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
837 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
838 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
839 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
840 and PTHREAD_MUTEXATTR_FLAG_BITS.
841 * descr.h (struct pthread): Add robust_list field and define
842 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
843 * pthread_mutexattr_getrobust.c: New file.
844 * pthread_mutexattr_setrobust.c: New file.
845 * pthread_mutex_consistent.c: New file.
846 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
847 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
848 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
849 Adjust pthread_mutex_t initializers.
850 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
851 field to pthread_mutex_t.
852 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
853 and __prev field to pthread_mutex_t.
854 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
855 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
856 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
857 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
858 * pthread_mutexattr_gettype.c: Likewise.
859 * pthread_mutexattr_setpshared.c: Likewise.
860 * pthread_mutexattr_settype.c: Likewise.
861 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
862 Initialize mutex kind according to robust flag.
863 * pthread_mutex_lock.c: Implement local robust mutex.
864 * pthread_mutex_timedlock.c: Likewise.
865 * pthread_mutex_trylock.c: Likewise.
866 * pthread_mutex_unlock.c: Likewise.
867 * pthread_create.c (start_thread): Mark robust mutexes which remained
869 * tst-robust1.c: New file.
870 * tst-robust2.c: New file.
871 * tst-robust3.c: New file.
872 * tst-robust4.c: New file.
873 * tst-robust5.c: New file.
874 * tst-robust6.c: New file.
875 * tst-robust7.c: New file.
876 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
877 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
878 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
879 tst-robust5, tst-robust6, and tst-robust7.
881 * tst-typesizes.c: New file.
882 * Makefile (tests): Add tst-typesizes.
884 * tst-once3.c: More debug output.
886 2005-12-24 Ulrich Drepper <drepper@redhat.com>
888 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
889 missing after last change.
891 * version.c: Update copyright year.
893 2005-12-23 Ulrich Drepper <drepper@redhat.com>
895 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
896 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
897 * pthread_mutex_trylock.c: Likewise.
898 * pthread_mutex_timedlock.c: Likewise.
899 * pthread_mutex_unlock.c: Likewise.
901 2005-12-22 Roland McGrath <roland@redhat.com>
903 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
904 so that #include_next's search location is not reset to the -I..
905 directory where <nptl/...> can be found.
907 2005-12-22 Ulrich Drepper <drepper@redhat.com>
910 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
911 Fix unwind info. Remove useless branch prediction prefix.
912 * tst-cancel24.cc: New file.
913 * Makefile: Add rules to build and run tst-cancel24.
915 2005-12-21 Roland McGrath <roland@redhat.com>
917 * libc-cancellation.c: Use <> rather than "" #includes.
918 * pt-cleanup.c: Likewise.
919 * pthread_create.c: Likewise.
920 * pthread_join.c: Likewise.
921 * pthread_timedjoin.c: Likewise.
922 * pthread_tryjoin.c: Likewise.
923 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
924 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
925 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
926 * unwind.c: Likewise.
928 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
930 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
931 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
932 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
933 THREAD_COPY_POINTER_GUARD): Define.
935 2005-12-19 Jakub Jelinek <jakub@redhat.com>
937 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
939 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
940 THREAD_COPY_POINTER_GUARD): Define.
941 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
942 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
943 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
944 THREAD_COPY_POINTER_GUARD): Define.
945 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
946 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
947 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
948 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
949 Use PTR_DEMANGLE for B0 if defined.
951 2005-12-17 Ulrich Drepper <drepper@redhat.com>
953 * pthread_create.c (__pthread_create_2_1): Use
954 THREAD_COPY_POINTER_GUARD if available.
955 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
956 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
957 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
958 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
959 * sysdeps/x86_64/tls.h: Likewise.
961 2005-12-15 Roland McGrath <roland@redhat.com>
963 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
965 2005-12-13 Ulrich Drepper <drepper@redhat.com>
967 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
969 * errno-loc.c: New file.
971 2005-12-12 Roland McGrath <roland@redhat.com>
973 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
974 adjustments before choosing stack size. Update minimum stack size
975 calculation to match allocate_stack change.
977 2005-12-12 Ulrich Drepper <drepper@redhat.com>
979 * allocatestack.c (allocate_stack): Don't demand that there is an
980 additional full page available on the stack beside guard, TLS, the
983 2005-11-24 Ulrich Drepper <drepper@redhat.com>
985 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
986 (__cleanup_fct_attribute): Use __regparm__ not regparm.
988 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
989 compiling 32-bit code we must define __cleanup_fct_attribute.
991 005-11-24 Jakub Jelinek <jakub@redhat.com>
994 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
995 __attribute__ instead of __attribute.
996 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
997 (__cleanup_fct_attribute): Likewise.
999 2005-11-17 Jakub Jelinek <jakub@redhat.com>
1001 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
1002 a write barrier before writing libgcc_s_getcfa.
1004 2005-11-06 Ulrich Drepper <drepper@redhat.com>
1006 * sysdeps/unix/sysv/linux/configure: Removed.
1008 2005-11-05 Ulrich Drepper <drepper@redhat.com>
1010 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
1011 optional init_array/fini_array support.
1013 2005-10-24 Roland McGrath <roland@redhat.com>
1015 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
1016 versioned_symbol use.
1018 2005-10-16 Roland McGrath <roland@redhat.com>
1020 * init.c (__pthread_initialize_minimal_internal): Even when using a
1021 compile-time default stack size, apply the minimum that allocate_stack
1022 will require, and round up to page size.
1024 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
1026 * Makefile ($(test-modules)): Remove static pattern rule.
1028 2005-10-14 Jakub Jelinek <jakub@redhat.com>
1029 Ulrich Drepper <drepper@redhat.com>
1031 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
1032 alignment in callback function.
1033 * Makefile: Add rules to build and run tst-align3.
1034 * tst-align3.c: New file.
1036 2005-10-03 Jakub Jelinek <jakub@redhat.com>
1038 * allocatestack.c (setxid_signal_thread): Add
1039 INTERNAL_SYSCALL_DECL (err).
1041 2005-10-02 Jakub Jelinek <jakub@redhat.com>
1043 * allocatestack.c (setxid_signal_thread): Need to use
1044 atomic_compare_and_exchange_bool_acq.
1046 2005-10-01 Ulrich Drepper <drepper@redhat.com>
1047 Jakub Jelinek <jakub@redhat.com>
1049 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
1051 (struct pthread): Move specific_used field to avoid padding.
1052 Add setxid_futex field.
1053 * init.c (sighandler_setxid): Reset setxid flag and release the
1055 * allocatestack.c (setxid_signal_thread): New function. Broken
1056 out of the bodies of the two loops in __nptl_setxid. For undetached
1057 threads check whether they are exiting and if yes, don't send a signal.
1058 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
1059 * pthread_create.c (start_thread): For undetached threads, check
1060 whether setxid bit is set. If yes, wait until signal has been
1063 * allocatestack.c (STACK_VARIABLES): Initialize them.
1064 * pthread_create.c (__pthread_create_2_1): Initialize pd.
1066 2004-09-02 Jakub Jelinek <jakub@redhat.com>
1068 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1069 waiters, awake all waiters on the associated mutex.
1071 2005-09-22 Roland McGrath <roland@redhat.com>
1073 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
1074 ../sysdeps/x86_64/hp-timing.h).
1076 2005-08-29 Jakub Jelinek <jakub@redhat.com>
1078 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
1079 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1080 (lll_futex_wake_unlock): Define.
1081 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
1082 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1083 (lll_futex_wake_unlock): Define.
1084 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
1085 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1086 (lll_futex_wake_unlock): Define.
1087 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
1088 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1089 (lll_futex_wake_unlock): Define.
1090 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
1091 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1092 (lll_futex_wake_unlock): Define.
1093 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
1094 lll_futex_wake_unlock.
1095 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1096 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1097 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1098 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1099 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1100 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1102 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1104 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1105 Fix typo in register name.
1107 2005-08-23 Ulrich Drepper <drepper@redhat.com>
1109 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1110 Use __sigfillset. Document that sigfillset does the right thing wrt
1113 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1116 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
1117 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
1118 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
1119 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
1120 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
1121 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
1123 * Makefile (tests): Add tst-initializers1.
1124 (CFLAGS-tst-initializers1.c): Set.
1125 * tst-initializers1.c: New test.
1127 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1129 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
1130 Make sure __flags are located at offset 48 from the start of the
1133 2005-07-02 Roland McGrath <roland@redhat.com>
1135 * Makeconfig: Comment fix.
1137 2005-07-05 Jakub Jelinek <jakub@redhat.com>
1139 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
1140 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
1141 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
1142 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
1143 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1144 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1145 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
1146 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
1147 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
1148 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1150 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1152 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
1153 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1154 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
1156 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1157 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
1158 field. Put in sysinfo field unconditionally.
1159 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1160 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
1161 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1162 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
1164 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1165 * pthread_create.c (__pthread_create_2_1): Use
1166 THREAD_COPY_STACK_GUARD macro.
1167 * Makefile: Add rules to build and run tst-stackguard1{,-static}
1169 * tst-stackguard1.c: New file.
1170 * tst-stackguard1-static.c: New file.
1172 2005-06-14 Alan Modra <amodra@bigpond.net.au>
1174 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1175 Invoke CGOTSETUP and CGOTRESTORE.
1176 (CGOTSETUP, CGOTRESTORE): Define.
1178 2005-05-29 Richard Henderson <rth@redhat.com>
1180 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
1181 (tf_write, tf_writev): Use it.
1182 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
1185 2005-05-23 Jakub Jelinek <jakub@redhat.com>
1187 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1188 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1189 __librt_*_asynccancel@local.
1191 2005-05-17 Alan Modra <amodra@bigpond.net.au>
1193 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1194 all occurrences of JUMPTARGET. Instead append @local to labels.
1196 2005-05-20 Jakub Jelinek <jakub@redhat.com>
1198 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1199 size/alignment of struct pthread rather than tcbhead_t.
1200 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1202 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1204 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1207 2005-05-19 Richard Henderson <rth@redhat.com>
1209 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1210 __sync_val_compare_and_swap, not explicit _si variant.
1211 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1213 2005-05-03 Ulrich Drepper <drepper@redhat.com>
1216 * sysdeps/pthread/pthread.h: Avoid empty initializers.
1218 2005-05-03 Jakub Jelinek <jakub@redhat.com>
1220 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1221 .eh_frame section, use cfi_* directives.
1223 2005-04-27 Jakub Jelinek <jakub@redhat.com>
1225 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1228 2005-04-27 Ulrich Drepper <drepper@redhat.com>
1231 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1234 2005-04-27 Roland McGrath <roland@redhat.com>
1236 * Makefile (tests): Remove tst-clock2.
1238 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1239 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1240 translating to the kernel clockid_t for our own process/thread clock.
1242 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1244 2005-04-15 Jakub Jelinek <jakub@redhat.com>
1246 * old_pthread_cond_init.c: Include <errno.h>.
1247 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1248 process shared or uses clock other than CLOCK_REALTIME.
1249 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1251 2005-04-13 David S. Miller <davem@davemloft.net>
1253 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1254 * sysdeps/sparc/sparc64/clone.S: New file.
1256 2005-04-05 Jakub Jelinek <jakub@redhat.com>
1259 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1260 __inline instead of inline.
1261 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1263 2005-03-31 Jakub Jelinek <jakub@redhat.com>
1265 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1266 functionally equivalent, but shorter instructions.
1267 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1268 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1269 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1271 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1272 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1273 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1274 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1275 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1276 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1277 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1279 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1280 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1281 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1282 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1283 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1285 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
1287 * sysdeps/mips/Makefile: New file.
1288 * sysdeps/mips/nptl-sysdep.S: New file.
1289 * sysdeps/mips/tcb-offsets.sym: New file.
1290 * sysdeps/mips/pthread_spin_lock.S: New file.
1291 * sysdeps/mips/pthread_spin_trylock.S: New file.
1292 * sysdeps/mips/pthreaddef.h: New file.
1293 * sysdeps/mips/tls.h: New file.
1294 * sysdeps/mips/jmpbuf-unwind.h: New file.
1295 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1296 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1297 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1298 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1299 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1300 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1301 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1302 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1303 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1304 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1306 2005-03-23 Ulrich Drepper <drepper@redhat.com>
1309 * pthread_create.c (__pthread_create_2_1): Rename syscall error
1312 2005-03-10 Jakub Jelinek <jakub@redhat.com>
1314 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1316 2005-02-25 Roland McGrath <roland@redhat.com>
1318 * alloca_cutoff.c: Correct license text.
1319 * tst-unload.c: Likewise.
1320 * sysdeps/pthread/allocalim.h: Likewise.
1321 * sysdeps/pthread/pt-initfini.c: Likewise.
1322 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1323 * sysdeps/pthread/bits/sigthread.h: Likewise.
1324 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1325 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1327 2005-02-16 Roland McGrath <roland@redhat.com>
1329 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1330 Use unsigned int * for ptr_nthreads.
1332 2005-02-14 Alan Modra <amodra@bigpond.net.au>
1335 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1338 2005-02-07 Richard Henderson <rth@redhat.com>
1341 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1344 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
1346 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1347 order of arguments in invocation of atomic_add_zero.
1349 2005-01-26 Jakub Jelinek <jakub@redhat.com>
1352 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1353 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1354 at least gotntpoff relocation and addition.
1355 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1357 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1359 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1362 2005-01-06 Ulrich Drepper <drepper@redhat.com>
1364 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1365 entry for static tls deallocation fix.
1366 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1367 also contains information whether the memory pointed to is static
1369 * sysdeps/i386/tls.h: Likewise.
1370 * sysdeps/ia64/tls.h: Likewise.
1371 * sysdeps/powerpc/tls.h: Likewise.
1372 * sysdeps/s390/tls.h: Likewise.
1373 * sysdeps/sh/tls.h: Likewise.
1374 * sysdeps/sparc/tls.h: Likewise.
1375 * sysdeps/x86_64/tls.h: Likewise.
1377 2004-12-27 Ulrich Drepper <drepper@redhat.com>
1379 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1381 2004-12-21 Jakub Jelinek <jakub@redhat.com>
1383 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1385 * Makefile (tests): Add tst-align2.
1386 * tst-align2.c: New test.
1387 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1388 -mpreferred-stack-boundary=4.
1390 2004-12-18 Roland McGrath <roland@redhat.com>
1392 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1393 New file removed withdrawn for the moment.
1395 2004-12-17 Richard Henderson <rth@redhat.com>
1397 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1398 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1400 2004-12-16 Ulrich Drepper <drepper@redhat.com>
1402 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1403 Increased PTHREAD_STACK_MIN.
1405 * tst-context1.c (stacks): Use bigger stack size.
1407 2004-12-16 Jakub Jelinek <jakub@redhat.com>
1409 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1410 * sysdeps/sparc/tcb-offsets.sym: Add TID.
1412 2004-12-15 Jakub Jelinek <jakub@redhat.com>
1414 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1415 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1416 * sysdeps/s390/tcb-offsets.sym (TID): Add.
1418 2004-12-15 Ulrich Drepper <drepper@redhat.com>
1420 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1422 2004-12-14 Ulrich Drepper <drepper@redhat.com>
1424 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1425 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1427 * tst-getpid1.c: If child crashes, report this first. Print which
1430 2004-12-09 Ulrich Drepper <drepper@redhat.com>
1432 * init.c (__pthread_initialize_minimal_internal): Also unblock
1435 2004-12-01 Jakub Jelinek <jakub@redhat.com>
1437 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1438 _POSIX_THREAD_CPUTIME): Define to 0.
1439 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1440 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1441 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1442 __timer_signal_thread_tclk): Remove.
1443 (init_module): Remove their initialization.
1444 (thread_cleanup): Remove their cleanup assertions.
1445 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1446 __timer_signal_thread_tclk): Remove.
1447 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1448 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1449 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1451 2004-12-07 Jakub Jelinek <jakub@redhat.com>
1453 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1454 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1456 * Makefile (tests): Add tst-getpid2.
1457 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1458 (do_test): Use it. Use __clone2 instead of clone on ia64.
1459 * tst-getpid2.c: New test.
1461 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1463 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1465 2004-12-04 Ulrich Drepper <drepper@redhat.com>
1467 * Makefile (tests): Add tst-getpid1.
1468 * tst-getpid1.c: New file.
1469 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1470 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1472 2004-12-02 Roland McGrath <roland@redhat.com>
1474 * Makefile (libpthread-nonshared): Variable removed.
1475 ($(objpfx)libpthread_nonshared.a): Target removed.
1476 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1477 These are now handled by generic magic from
1478 libpthread-static-only-routines being set.
1480 2004-11-27 Ulrich Drepper <drepper@redhat.com>
1482 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1483 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1484 _POSIX_THREAD_PRIO_PROTECT): Define.
1485 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1486 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1487 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1489 2004-11-26 Jakub Jelinek <jakub@redhat.com>
1491 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1492 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1493 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1494 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1495 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1496 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1497 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1499 2004-11-24 Ulrich Drepper <drepper@redhat.com>
1501 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1503 * Makefile (libpthread-routines): Add pthread_setschedprio.
1504 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1505 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1506 * pthread_setschedprio.c: New file.
1508 2004-11-20 Jakub Jelinek <jakub@redhat.com>
1510 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1511 * pthread_cancel.c (pthread_create): Likewise.
1513 * Makefile (libpthread-routines): Add vars.
1514 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1515 * init.c (__default_stacksize, __is_smp): Remove.
1517 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1518 and define a wrapper macro.
1519 (PTHREAD_STATIC_FN_REQUIRE): Define.
1520 * allocatestack.c (__find_thread_by_id): Undefine.
1521 * pthread_create (__pthread_keys): Remove.
1522 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1523 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1524 PTHREAD_STATIC_FN_REQUIRE.
1526 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1528 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1529 parameter to REGISTER macro.
1531 2004-11-17 Roland McGrath <roland@redhat.com>
1533 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1534 Make sure SIGCANCEL is blocked as well.
1536 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1538 * sysdeps/pthread/setxid.h: New file.
1539 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1540 (struct xid_command): Add forward decl.
1541 (struct pthread_functions): Change return type of __nptl_setxid hook
1543 * pthreadP.h (__nptl_setxid): Change return type to int.
1544 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1545 calling thread, return its return value and set errno on failure.
1546 * descr.h (struct xid_command): Change id type to long array.
1548 * Makefile: Add rules to build and test tst-setuid1 and
1550 * tst-setuid1.c: New test.
1551 * tst-setuid1-static.c: New test.
1553 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1555 * Makefile (tests): Add tst-exit3.
1556 * tst-exit3.c: New test.
1558 2004-11-09 Ulrich Drepper <drepper@redhat.com>
1560 * Makefile (tests): Add tst-exit2.
1561 * tst-exit2.c: New file.
1563 2004-11-09 Roland McGrath <roland@redhat.com>
1566 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1567 here, before calling clone.
1568 * pthread_create.c (start_thread): Don't do it here.
1570 2004-11-02 Jakub Jelinek <jakub@redhat.com>
1572 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1574 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1576 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1577 Set ETIMEDOUT to errno when time is up. Tweak to avoid
1580 2004-10-28 Jakub Jelinek <jakub@redhat.com>
1582 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1583 if sched_priority is not between minprio and maxprio.
1585 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1587 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1588 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1590 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1591 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1593 2004-10-24 Ulrich Drepper <drepper@redhat.com>
1595 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1596 not-cancelable I/O functions.
1598 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1600 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1601 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1602 make sure 2 is stored in the futex and we looked at the old value.
1603 Fix a few other problems to return the correct value.
1605 2004-10-14 Richard Henderson <rth@redhat.com>
1607 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1610 2004-10-06 Jakub Jelinek <jakub@redhat.com>
1612 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1613 of pthread-functions.h and pthreaddef.h.
1614 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1616 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1617 Change __data.__nwaiters from int to unsigned int.
1619 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1620 sysconf (_SC_THREAD_CPUTIME) returns negative value.
1622 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1625 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1626 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1628 2004-10-06 Ulrich Drepper <drepper@redhat.com>
1630 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
1631 test fails, remove message queue.
1632 (tf_msgsnd): Likewise.
1634 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1636 * tst-clock1.c: Change #ifdef to #if defined.
1637 * tst-clock2.c: Likewise.
1638 * tst-cond11.c: Likewise.
1640 * sysdeps/pthread/timer_create.c (timer_create): Use
1641 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1642 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1645 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1647 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1648 _POSIX_THREAD_CPUTIME): Define to 0.
1650 2004-10-04 Ulrich Drepper <drepper@redhat.com>
1652 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1653 and _POSIX_THREAD_CPUTIME to zero.
1654 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1655 * tst-barrier2.c: Fix testing for POSIX feature.
1656 * tst-clock1.c: Likewise.
1657 * tst-clock2.c: Likewise.
1658 * tst-cond11.c: Likewise.
1659 * tst-cond4.c: Likewise.
1660 * tst-cond6.c: Likewise.
1661 * tst-flock2.c: Likewise.
1662 * tst-mutex4.c: Likewise.
1663 * tst-mutex9.c: Likewise.
1664 * tst-rwlock12.c: Likewise.
1665 * tst-rwlock4.c: Likewise.
1666 * tst-signal1.c: Likewise.
1667 * tst-spin2.c: Likewise.
1668 * sysdeps/pthread/posix-timer.h: Likewise.
1669 * sysdeps/pthread/timer_create.c: Likewise.
1670 * sysdeps/pthread/timer_routines.c: Likewise.
1672 2004-10-01 Ulrich Drepper <drepper@redhat.com>
1674 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1675 (__lll_mutex_timedlock_wait): Address futex correctly.
1677 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1678 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1679 make sure 2 is stored in the futex and we looked at the old value.
1680 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1681 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
1682 which might very well made the code not working at all before.
1685 2004-09-28 Ulrich Drepper <drepper@redhat.com>
1687 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1688 allow SIGSETXID to be sent.
1689 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1690 for SIGSETXID to be defined.
1691 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1692 SIGSETXID cannot be blocked.
1694 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1695 Add __extension__ to long long types.
1696 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1697 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1698 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1699 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1700 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1701 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1702 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1704 2004-09-25 Ulrich Drepper <drepper@redhat.com>
1706 * descr.h (struct pthread): Add stopped_start field.
1707 * sysdeps/pthread/createthread.c (create_thread): Set
1708 start_stopped flag in descriptor for new thread appropriately.
1709 * pthread_create.c (start_thread): Only take lock to be stopped on
1710 startup if stopped_start flag says so.
1712 2004-09-24 Ulrich Drepper <drepper@redhat.com>
1714 * pthread_create.c (__pthread_create_2_1): Remember whether thread
1715 is created detached and if yes, do not try to free the stack in case
1716 the thread creation failed.
1717 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1718 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1719 case there has been no error. [BZ #405]
1721 * pthread_create.c (start_thread): Don't wait for scheduler data
1722 etc to be set at the beginning of the function. The cancellation
1723 infrastructure must have been set up. And enable async
1724 cancellation before potentially going to sleep. [BZ #401]
1726 2004-09-20 Ulrich Drepper <drepper@redhat.com>
1728 * Versions: Remove exports for pthread_set*id_np functions.
1729 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1731 * Makefile: Don't build pthread_set*id code for now.
1733 2004-09-19 Ulrich Drepper <drepper@redhat.com>
1735 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1737 * allocatestack.c (__nptl_setxid): New function.
1738 * descr.h (struct xid_command): Define type.
1739 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1740 (sighandler_setxid): New function.
1741 (__pthread_initialize_minimal): Register sighandler_setxid for
1743 * pt-allocrtsig.c: Update comment.
1744 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
1745 Declare __nptl_setxid.
1746 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1747 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1748 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1749 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1750 and pthread_setresuid_np.
1751 * pthread_setgid_np.c: New file.
1752 * pthread_setuid_np.c: New file.
1753 * pthread_setegid_np.c: New file.
1754 * pthread_seteuid_np.c: New file.
1755 * pthread_setregid_np.c: New file.
1756 * pthread_setreuid_np.c: New file.
1757 * pthread_setresgid_np.c: New file.
1758 * pthread_setresuid_np.c: New file.
1759 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
1760 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1761 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1762 and pthread_setresuid_np.
1763 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1764 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1765 pthread_setregid, and pthread_setresgid.
1767 2004-09-18 Ulrich Drepper <drepper@redhat.com>
1769 * allocatestack.c (allocate_stack): Return EAGAIN instead of
1770 ENOMEM when out of memory.
1772 2004-09-10 Roland McGrath <roland@redhat.com>
1775 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1776 code, since we don't try to use the broken CLONE_STOPPED any more.
1777 * pthread_create.c (start_thread): Likewise.
1779 2004-09-15 Richard Henderson <rth@redhat.com>
1781 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1783 2004-09-01 David Mosberger <davidm@hpl.hp.com>
1785 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1786 (__libc_unwind_longjmp): Delete macro and declare as function.
1787 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1788 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1790 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1791 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1792 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1794 2004-09-12 Ulrich Drepper <drepper@redhat.com>
1796 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1798 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1799 types also for __USE_XOPEN2K.
1800 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1801 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1802 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1803 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1804 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1805 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1806 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1809 2004-09-08 Ulrich Drepper <drepper@redhat.com>
1811 * sysdeps/pthread/pthread.h
1812 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
1813 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1814 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1815 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
1818 2004-09-07 Ulrich Drepper <drepper@redhat.com>
1820 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1821 PSEUDO to be used with . prefix.
1823 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1824 Use atomic_increment instead of atomic_exchange_and_add.
1825 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1827 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1829 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1832 * allocatestack.c (allocate_stack): Use atomic_increment_val
1833 instead of atomic_exchange_and_add.
1834 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1835 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1837 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1840 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1841 the initialization function might throw.
1843 2005-09-05 Richard Henderson <rth@redhat.com>
1845 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1846 Move definition inside libpthread, libc, librt check. Provide
1847 definition for rtld.
1849 2004-09-02 Ulrich Drepper <drepper@redhat.com>
1851 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1852 * sysdeps/i386/jmpbuf-unwind.h: Likewise
1853 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1854 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1855 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1856 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1857 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1858 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1861 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1862 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1863 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1865 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1866 Decrement __nwaiters. If pthread_cond_destroy has been called and
1867 this is the last waiter, signal pthread_cond_destroy caller and
1868 avoid using the pthread_cond_t structure after unlock.
1869 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1870 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1871 Read clock type from the least significant bits of __nwaiters instead
1873 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1874 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1876 2004-08-31 Jakub Jelinek <jakub@redhat.com>
1879 * Makefile (tests): Add tst-cond20 and tst-cond21.
1880 * tst-cond20.c: New test.
1881 * tst-cond21.c: New test.
1882 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1883 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1885 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1887 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1888 (pthread_cond_t): Likewise.
1889 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1891 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1893 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1895 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1896 (cond_nwaiters): New.
1898 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1899 if there are waiters not signalled yet.
1900 Wait until all already signalled waiters wake up.
1901 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1902 __nwaiters. If pthread_cond_destroy has been called and this is the
1903 last waiter, signal pthread_cond_destroy caller and avoid using
1904 the pthread_cond_t structure after unlock.
1905 (__pthread_cond_wait): Increment __nwaiters in the beginning,
1906 decrement it when leaving. If pthread_cond_destroy has been called
1907 and this is the last waiter, signal pthread_cond_destroy caller.
1908 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1909 Likewise. Read clock type from the least significant bits of
1910 __nwaiters instead of __clock.
1911 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1912 whether clock ID can be encoded in COND_CLOCK_BITS bits.
1913 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1914 clock type just from the last COND_CLOCK_BITS bits of value.
1915 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1916 instead of __clock, just from second bit of condattr's value.
1918 2004-08-30 Jakub Jelinek <jakub@redhat.com>
1920 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1921 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
1923 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1925 2004-08-15 Roland McGrath <roland@frob.com>
1927 * pthread_atfork.c: Update copyright terms including special exception
1928 for these trivial files, which are statically linked into executables
1929 that use dynamic linking for the significant library code.
1931 2004-08-09 Jakub Jelinek <jakub@redhat.com>
1933 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1934 pthread_rwlock_rdlock.
1935 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1936 Decrease __nr_readers_queued after reacquiring lock.
1937 * sysdeps/pthread/pthread_rwlock_timedrdlock
1938 (pthread_rwlock_timedrdlock): Likewise.
1939 Reported by Bob Cook <bobcook47@hotmail.com>.
1941 2004-08-11 Jakub Jelinek <jakub@redhat.com>
1943 * tst-rwlock14.c (tf): Read main thread handle from *ARG
1944 before pthread_barrier_wait.
1946 2004-08-07 Ulrich Drepper <drepper@redhat.com>
1948 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1949 Remove unnecessary exception handling data.
1951 2004-07-23 Jakub Jelinek <jakub@redhat.com>
1954 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1955 instead of clockid_t.
1957 2004-07-21 Roland McGrath <roland@redhat.com>
1959 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1961 2004-07-19 Roland McGrath <roland@redhat.com>
1963 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1965 2004-07-02 Roland McGrath <roland@redhat.com>
1967 * configure: Don't exit.
1969 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1971 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1972 (__pthread_cond_timedwait): Check for invalid nanosecond in
1975 2004-07-07 Ulrich Drepper <drepper@redhat.com>
1977 * Makefile: Add rules to build and run tst-fini1.
1978 * tst-fini1.c: New file.
1979 * tst-fini1mod.c: New file.
1981 2004-07-05 Ulrich Drepper <drepper@redhat.com>
1983 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
1984 if no cancellation support is needed.
1985 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1986 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1987 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1988 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1989 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1990 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1991 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1992 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1993 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1995 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
1996 only if not already defined.
1998 2004-07-05 Jakub Jelinek <jakub@redhat.com>
2000 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
2001 constraint "m" instead of "0" for futex.
2003 * shlib-versions: Add powerpc64-.*-linux.*.
2005 2004-07-04 Jakub Jelinek <jakub@redhat.com>
2007 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2008 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
2010 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
2011 1 billion and 64-bit tv_nsec which is valid when truncated to 32
2014 2004-06-29 Roland McGrath <roland@redhat.com>
2016 * Banner: NPTL no longer has its own version number.
2017 * Makefile (nptl-version): Variable removed.
2018 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
2019 using $(version), the glibc version number.
2021 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2023 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2024 Fix branch offset for a PLT entry.
2025 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2027 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2029 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
2031 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
2034 2004-06-28 Jakub Jelinek <jakub@redhat.com>
2036 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
2039 2004-06-28 Jakub Jelinek <jakub@redhat.com>
2041 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2042 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
2044 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2045 (pthread_rwlock_timedrdlock): Likewise.
2047 2004-06-22 Jakub Jelinek <jakub@redhat.com>
2049 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2050 Set __r7 to val, not mutex.
2052 2004-06-27 Ulrich Drepper <drepper@redhat.com>
2054 * Makefile: Add rules to build tst-rwlock14.
2055 * tst-rwlock14.c: New file.
2057 2004-06-24 Boris Hu <boris.hu@intel.com>
2059 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
2061 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2063 2004-06-19 Andreas Jaeger <aj@suse.de>
2065 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
2066 assembler in last patch.
2068 2004-06-17 Ulrich Drepper <drepper@redhat.com>
2070 * sysdeps/pthread/pthread_cond_timedwait.c
2071 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
2072 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2073 (__pthread_cond_timedwait): Check for invalid nanosecond in
2075 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2076 * tst-cond19.c: New file.
2077 * Makefile: Add rules to build and run tst-cond19.
2079 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
2081 * tst-context1.c (GUARD_PATTERN): Defined.
2082 (tst_context_t): Define struct containing ucontext_t & guard words.
2083 (ctx): Declare as an array of tst_context_t.
2084 (fct): Verify uc_link & guard words are still valid.
2085 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
2087 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2089 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2090 Add __data.__futex field, reshuffle __data.__clock.
2091 * sysdeps/unix/sysv/linux/sh/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/sh/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/sh/pthread_cond_timedwait.S
2099 (__pthread_cond_timedwait): Likewise.
2100 * sysdeps/unix/sysv/linux/sh/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.
2108 2004-06-08 Jakub Jelinek <jakub@redhat.com>
2110 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
2112 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
2113 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
2114 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
2115 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
2116 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
2118 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2120 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
2121 Add memory clobber to inline assembly.
2122 (__lll_mutex_trylock): Likewise.
2123 (__lll_mutex_cond_trylock): Likewise.
2125 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
2127 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2128 Pass val argument as 6th system call argument in %r7.
2130 2004-05-21 Jakub Jelinek <jakub@redhat.com>
2132 * Makefile (tests): Add tst-cond16.
2133 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
2134 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
2135 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2136 Add __data.__futex field, reshuffle __data.__clock.
2137 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
2138 (__pthread_cond_signal): Increment __futex at the same time as
2139 __wakeup_seq or __total_seq. Pass address of __futex instead of
2140 address of low 32-bits of __wakeup_seq to futex syscall.
2141 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
2142 (__pthread_cond_wait): Likewise. Pass __futex value from before
2143 releasing internal lock to FUTEX_WAIT.
2144 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
2145 (__pthread_cond_timedwait): Likewise.
2146 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
2147 (FUTEX_CMP_REQUEUE): Define.
2148 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2149 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2150 Pass __futex value from before the unlock and __futex address instead
2151 of address of low 32-bits of __wakeup_seq to futex syscall.
2152 Fallback to FUTEX_WAKE all on any errors.
2153 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
2155 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2156 internally. Return non-zero if error, zero if success.
2157 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2158 Add __data.__futex field, reshuffle __data.__clock.
2159 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
2161 (lll_futex_requeue): Add val argument, return 1 unconditionally
2163 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2164 Add __data.__futex field, reshuffle __data.__clock.
2165 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2167 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2168 internally. Return non-zero if error, zero if success.
2169 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2170 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
2171 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2173 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2174 internally. Return non-zero if error, zero if success.
2175 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2176 Add __data.__futex field, reshuffle __data.__clock.
2177 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
2179 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2180 internally. Return non-zero if error, zero if success.
2181 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2182 Add __data.__futex field, reshuffle __data.__clock.
2183 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2184 Add __data.__futex field, reshuffle __data.__clock.
2185 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2186 Increment __futex at the same time as __wakeup_seq or __total_seq.
2187 Pass address of __futex instead of address of low 32-bits of
2188 __wakeup_seq to futex syscall.
2189 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2190 Pass __futex value from before releasing internal lock
2192 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2193 Likewise. Avoid unnecessary shadowing of variables.
2194 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2195 Set __futex to 2 * __total_seq. Pass __futex value from before the
2196 unlock and __futex address instead of address of low 32-bits of
2197 __wakeup_seq to futex_requeue macro, adjust for new return value
2199 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2200 (__pthread_cond_signal): Increment __futex at the same time as
2201 __wakeup_seq or __total_seq. Pass address of __futex instead of
2202 address of low 32-bits of __wakeup_seq to futex syscall.
2203 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2204 (__pthread_cond_wait): Likewise. Pass __futex value from before
2205 releasing internal lock to FUTEX_WAIT.
2206 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2207 (__pthread_cond_timedwait): Likewise.
2208 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2209 (FUTEX_CMP_REQUEUE): Define.
2210 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2211 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2212 Pass __futex value from before the unlock and __futex address instead
2213 of address of low 32-bits of __wakeup_seq to futex syscall.
2214 Fallback to FUTEX_WAKE all on any errors.
2216 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2218 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2219 Add nop to align the end of critical section.
2220 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2222 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2224 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2225 Add __broadcast_seq field.
2226 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2227 all waiters as woken with woken_seq and bump broadcast counter.
2228 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2229 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
2230 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2231 Comment typo fixes. Avoid returning -ETIMEDOUT.
2233 2004-06-01 Ulrich Drepper <drepper@redhat.com>
2235 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2236 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2237 Reported by Kaz Kojima.
2239 2004-05-25 Jakub Jelinek <jakub@redhat.com>
2241 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2243 2004-05-21 Jakub Jelinek <jakub@redhat.com>
2245 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2246 __broadcast_seq with bc_seq after acquiring internal lock instead of
2249 2004-05-18 Jakub Jelinek <jakub@redhat.com>
2251 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2253 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2254 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2255 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2256 (pthread_cond_t): Add __data.__broadcast_seq field.
2257 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2258 (FRAME_SIZE): Define.
2259 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
2261 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2263 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
2265 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2266 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
2269 2004-05-18 Ulrich Drepper <drepper@redhat.com>
2271 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2272 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2273 Add __broadcast_seq field.
2274 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2275 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2276 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2277 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2278 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2279 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2280 all waiters as woken with woken_seq and bump broadcast counter.
2281 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2283 __broadcast_seq field.
2284 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2285 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2286 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2287 * pthread_cond_init.c: Initialize __broadcast_seq field.
2288 * Makefile (tests): Add tst-cond17 and tst-cond18.
2289 Add .NOTPARALLEL goal.
2290 * tst-cond16.c: New file. From Jakub.
2291 * tst-cond17.c: New file. From Jakub.
2292 * tst-cond18.c: New file. From Jakub.
2294 2004-05-16 Ulrich Drepper <drepper@redhat.com>
2296 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2299 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2300 Parametrize frame size. Correct some unwind info.
2301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2303 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2305 * tst-stack3.c: Note testing functionality beyond POSIX.
2307 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2309 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2310 Change conditional from ifdef to if.
2312 2004-04-23 Jakub Jelinek <jakub@redhat.com>
2314 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2315 SYSDEP_CANCEL_ERROR): Define.
2318 2004-05-01 Jakub Jelinek <jakub@redhat.com>
2320 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2322 2004-04-20 Jakub Jelinek <jakub@redhat.com>
2324 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2326 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2328 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2329 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2330 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2331 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2333 2004-04-19 Ulrich Drepper <drepper@redhat.com>
2335 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2336 thread has all signals blocked.
2338 2004-04-18 Andreas Jaeger <aj@suse.de>
2340 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2341 (SEM_VALUE_MAX): Add missing brace.
2343 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2345 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2347 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2348 * sysdeps/pthread/tst-mqueue8x.c: New test.
2349 * tst-cancel4.c: Update comment about message queues.
2351 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2352 return it_value { 0, 0 }.
2353 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2355 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2356 assertion for SIGEV_NONE.
2357 (thread_attr_compare): Compare all attributes, not just a partial
2360 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2362 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2364 2004-04-17 Ulrich Drepper <drepper@redhat.com>
2366 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2367 Just use a plain number.
2368 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2369 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2370 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2371 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2372 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2373 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2374 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2376 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2378 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2380 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2382 2004-04-15 Jakub Jelinek <jakub@redhat.com>
2384 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2385 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2386 of calling sigwaitinfo.
2388 2004-04-16 Ulrich Drepper <drepper@redhat.com>
2390 * allocatestack.c (allocate_stack): Set reported_guardsize
2392 * pthread_getattr_np.c (pthread_getattr_np): Use
2393 reported_guardsize instead of guardsize.
2394 * descr.h (struct pthread): Add reported_guardsize field.
2396 2004-04-13 Jakub Jelinek <jakub@redhat.com>
2398 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2400 2004-04-12 Ulrich Drepper <drepper@redhat.com>
2402 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2404 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2406 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2407 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2408 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2409 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2410 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2412 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2413 (_POSIX_MESSAGE_PASSING): Define.
2414 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2415 (_POSIX_MESSAGE_PASSING): Define.
2416 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2417 (_POSIX_MESSAGE_PASSING): Define.
2419 2004-04-04 Ulrich Drepper <drepper@redhat.com>
2421 * tst-context1.c (fct): Check whether correct stack is used.
2423 2004-04-03 Ulrich Drepper <drepper@redhat.com>
2425 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2426 matching constraints for asm mem parameters.
2428 * tst-clock2.c (tf): Don't define unless needed.
2430 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
2432 * Makefile (link-libc-static): Use $(static-gnulib) instead of
2435 2004-03-30 Ulrich Drepper <drepper@redhat.com>
2437 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2438 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2439 * pthreadP.h: Declare __nptl_deallocate_tsd.
2440 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2443 * Makefile (tests): Add tst-tsd5.
2444 * tst-tsd5.c: New file.
2446 2004-03-29 Ulrich Drepper <drepper@redhat.com>
2448 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2449 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2450 is SHLIB_COMPAT check.
2451 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2452 (__pthread_attr_getaffinity_old): Likewise.
2453 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2454 (__pthread_getaffinity_old): Likewise.
2455 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2456 (__pthread_setaffinity_old): Likewise.
2458 2004-03-26 Ulrich Drepper <drepper@redhat.com>
2460 * allocatestack.c (_make_stacks_executable): Call
2461 _dl_make_stack_executable first.
2463 2004-03-24 Roland McGrath <roland@redhat.com>
2465 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2466 constraint instead of "0".
2468 2004-03-24 Ulrich Drepper <drepper@redhat.com>
2470 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2471 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2473 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2474 code to avoid warning.
2476 2004-03-24 Andreas Jaeger <aj@suse.de>
2478 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2479 (__pthread_attr_setaffinity_old): Remove const.
2481 2004-03-23 Ulrich Drepper <drepper@redhat.com>
2483 * sysdeps/unix/sysv/linux/smp.h: New file.
2484 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2485 * init.c: Define __is_smp.
2486 (__pthread_initialize_minimal_internal): Call is_smp_system to
2487 initialize __is_smp.
2488 * pthreadP.h: Declare __is_smp.
2489 Define MAX_ADAPTIVE_COUNT is necessary.
2490 * pthread_mutex_init.c: Add comment regarding __spins field.
2491 * pthread_mutex_lock.c: Implement adaptive mutex type.
2492 * pthread_mutex_timedlock.c: Likewise.
2493 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2494 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2496 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2497 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2498 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2499 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2500 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2501 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2502 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2503 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2504 lll_mutex_cond_trylock.
2505 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2506 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2507 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2508 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2509 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2510 Define BUSY_WAIT_NOP.
2511 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2512 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2514 * tst-mutex5.c: Add support for testing adaptive mutexes.
2515 * tst-mutex7.c: Likewise.
2516 * tst-mutex5a.c: New file.
2517 * tst-mutex7a.c: New file.
2518 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2520 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2521 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2522 vgettimeofday call might destroy the content.
2524 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2527 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2528 No need to restrict type of ret. Make it int. Add comment.
2530 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2531 Remove unnecessary setne instruction.
2533 2004-03-22 Jakub Jelinek <jakub@redhat.com>
2535 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2536 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2537 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2538 If realloc fails, break out of the loop.
2540 2004-03-20 Andreas Jaeger <aj@suse.de>
2542 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2543 (__pthread_setaffinity_old): Fix interface.
2544 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2545 (__pthread_getaffinity_old): Likewise.
2547 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2548 (__pthread_setaffinity_new): Remove duplicate declaration.
2550 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2552 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2553 the return value to a safe register.
2554 (CDISABLE): Set the function argument correctly.
2556 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2558 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2559 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2560 Rewrite so that only one locked memory operation per round is needed.
2561 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2562 (pthread_barrier_wait): After wakeup, release lock only when the
2563 last thread stopped using the barrier object.
2564 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2565 (__pthread_cond_wait): Don't store mutex address if the current
2566 value is ~0l. Add correct cleanup support and unwind info.
2567 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2568 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2569 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2570 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2571 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2572 Add correct cleanup support and unwind info.
2573 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2574 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2575 information for syscall wrappers.
2577 2004-03-18 Ulrich Drepper <drepper@redhat.com>
2579 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2580 cpusetsize field, remove next.
2581 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2582 parameter for size of the CPU set.
2583 (pthread_setaffinity_np): Likewise.
2584 (pthread_attr_getaffinity_np): Likewise.
2585 (pthread_attr_setaffinity_np): Likewise.
2586 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2587 interface change, keep compatibility code.
2588 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2589 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2590 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2591 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
2592 __pthread_getaffinity_np.
2593 * Versions: Add version for changed interfaces.
2594 * tst-attr3.c: Adjust test for interface change.
2595 * pthread_getattr_np.c: Query the kernel about the affinity mask with
2596 increasing buffer sizes.
2597 * pthread_attr_destroy.c: Remove unused list handling.
2598 * pthread_attr_init.c: Likewise.
2600 2004-03-17 Roland McGrath <roland@redhat.com>
2602 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2603 first argument to clock_getres so we ever enable kernel timers.
2605 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
2607 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2609 2004-03-12 Richard Henderson <rth@redhat.com>
2611 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2612 oldvalue from CENABLE to CDISABLE.
2614 2004-03-12 Ulrich Drepper <drepper@redhat.com>
2616 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2617 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2618 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2619 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2621 2004-03-11 Richard Henderson <rth@redhat.com>
2623 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2624 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2625 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2627 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2629 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2630 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2631 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2633 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2635 * forward.c (__pthread_cond_broadcast_2_0,
2636 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2637 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2638 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2640 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2642 * sysdeps/sh/tcb-offsets.sym: Add PID.
2643 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2644 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2646 2004-03-10 Ulrich Drepper <drepper@redhat.com>
2648 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2649 include <sysdep-cancel.h>, vfork is no cancellation point.
2650 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2651 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2652 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2654 2004-03-10 Jakub Jelinek <jakub@redhat.com>
2656 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2658 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2659 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2661 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2663 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2664 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2665 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2666 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2667 of DO_CALL_VIA_BREAK. Work around a gas problem.
2669 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2670 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2671 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2672 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2673 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2674 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2676 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2677 a local register for saving old PID. Negate PID in parent upon exit.
2679 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2681 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2682 before syscall, set to the old value in the parent afterwards.
2683 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2684 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2686 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2687 before syscall, set to the old value in the parent afterwards.
2688 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2689 * sysdeps/s390/tcb-offsets.sym: Add PID.
2691 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2692 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2693 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2694 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2695 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2696 * sysdeps/sparc/tcb-offsets.sym: Add PID.
2698 2004-03-10 Andreas Schwab <schwab@suse.de>
2700 * sysdeps/ia64/tcb-offsets.sym: Add PID.
2701 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2702 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2704 2004-03-09 Jakub Jelinek <jakub@redhat.com>
2706 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2707 * tst-cancel21.c (do_one_test): Likewise.
2708 Reported by Gordon Jin <gordon.jin@intel.com>.
2710 2004-02-09 Jakub Jelinek <jakub@redhat.com>
2712 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2713 if non-zero and set to INT_MIN if zero.
2714 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2715 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2716 (SAVE_PID, RESTORE_PID): Define.
2718 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2719 Use relative path to avoid including NPTL i386/vfork.S.
2720 (SAVE_PID, RESTORE_PID): Define.
2721 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2722 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2723 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2725 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2726 * tst-vfork1.c: New test.
2727 * tst-vfork2.c: New test.
2728 * tst-vfork1x.c: New test.
2729 * tst-vfork2x.c: New test.
2731 2004-03-08 Ulrich Drepper <drepper@redhat.com>
2733 * sysdeps/i386/tcb-offsets.sym: Add PID.
2734 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2735 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2736 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2738 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
2740 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2742 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
2744 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2747 2004-03-07 Ulrich Drepper <drepper@redhat.com>
2749 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2752 * tst-once4.c: Remove unnecessary macro definition.
2754 * tst-mutex7.c (do_test): Limit thread stack size.
2755 * tst-once2.c (do_test): Likewise.
2756 * tst-tls3.c (do_test): Likewise.
2757 * tst-tls1.c (do_test): Likewise.
2758 * tst-signal3.c (do_test): Likewise.
2759 * tst-kill6.c (do_test): Likewise.
2760 * tst-key4.c (do_test): Likewise.
2761 * tst-join4.c (do_test): Likewise.
2762 * tst-fork1.c (do_test): Likewise.
2763 * tst-context1.c (do_test): Likewise.
2764 * tst-cond2.c (do_test): Likewise.
2765 * tst-cond10.c (do_test): Likewise.
2766 * tst-clock2.c (do_test): Likewise.
2767 * tst-cancel10.c (do_test): Likewise.
2768 * tst-basic2.c (do_test): Likewise.
2769 * tst-barrier4.c (do_test): Likewise.
2771 2004-03-05 Ulrich Drepper <drepper@redhat.com>
2773 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2775 2004-03-01 Ulrich Drepper <drepper@redhat.com>
2777 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2778 (__pthread_cond_timedwait): Optimize wakeup test.
2779 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2780 (__pthread_cond_wait): Likewise.
2781 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2782 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2785 2004-02-29 Ulrich Drepper <drepper@redhat.com>
2787 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2788 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
2789 the atomic instruction needed.
2790 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2791 (__lll_mutex_lock_wait): Likewise.
2793 2004-02-28 Ulrich Drepper <drepper@redhat.com>
2795 * Makefile (tests): Add tst-cond14 and tst-cond15.
2796 * tst-cond14.c: New file.
2797 * tst-cond15.c: New file.
2799 2004-02-27 Ulrich Drepper <drepper@redhat.com>
2801 * sysdeps/pthread/createthread.c (create_thread): Remove use of
2802 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
2803 needs to be implemented differently to be useful.
2805 2004-02-26 Ulrich Drepper <drepper@redhat.com>
2807 * pthread_attr_setschedparam.c: Don't test priority against limits
2808 here. Set ATTR_FLAG_SCHED_SET flag.
2809 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
2810 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
2811 from parent thread to child. If attribute is used and scheduling
2812 parameters are not inherited, copy parameters from attribute or
2813 compute them. Check priority value.
2814 * pthread_getschedparam.c: If the parameters aren't known yet get
2815 them from the kernel.
2816 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
2817 ATTR_FLAG_POLICY_SET flag for thread.
2818 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
2819 and ATTR_FLAG_POLICY_SET.
2821 * sysdeps/pthread/createthread.c: Use tgkill if possible.
2823 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2824 fail if stack address hasn't been set. Just return 0.
2826 2004-02-25 Ulrich Drepper <drepper@redhat.com>
2828 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
2829 libpthread for the files in this list.
2830 (CFLAGS-tst-unload): Removed.
2831 * tst-unload.c (do_test): Don't use complete path for
2834 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2837 2004-02-22 Ulrich Drepper <drepper@redhat.com>
2839 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2840 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2841 operation per round is needed.
2842 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2843 (__lll_mutex_lock_wait): Likewise.
2845 2004-02-20 Ulrich Drepper <drepper@redhat.com>
2847 * tst-cancel9.c (cleanup): Don't print to stderr.
2849 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2851 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2853 2004-02-20 Jakub Jelinek <jakub@redhat.com>
2855 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2856 (__syscall_error_handler2): Call CDISABLE.
2857 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2858 (__syscall_error_handler2): Call CDISABLE.
2860 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2861 Release lock before the loop, don't reacquire it.
2863 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2865 2004-02-19 Andreas Schwab <schwab@suse.de>
2867 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2870 2004-02-18 Ulrich Drepper <drepper@redhat.com>
2872 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2873 (pthread_barrier_wait): After wakeup, release lock only when the
2874 last thread stopped using the barrier object.
2875 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2876 (pthread_barrier_wait): Likewise.
2877 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2879 * Makefile (tests): Add tst-barrier4.
2880 * tst-barrier4.c: New file.
2882 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2883 (__pthread_cond_timedwait): Perform timeout test while holding
2884 internal lock to prevent wakeup race.
2885 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2886 * sysdeps/pthread/pthread_cond_timedwait.c
2887 (__pthread_cond_timedwait): Likewise.
2888 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2889 (__pthread_cond_timedwait): Likewise.
2891 2004-02-18 Jakub Jelinek <jakub@redhat.com>
2893 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2894 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2895 * Makefile (tests): Add tst-rwlock13.
2896 * tst-rwlock13.c: New test.
2898 2004-02-16 Ulrich Drepper <drepper@redhat.com>
2900 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2901 (__condvar_tw_cleanup): Little optimization.
2902 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2904 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
2906 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2907 libpthread as "lib" parameter to SHLIB_COMPAT.
2908 (__novmx_siglongjmp): Fix typo in function name.
2909 (__novmx_longjmp): Fix typo in function name.
2911 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2913 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2916 * sysdeps/generic/pt-longjmp.c: Moved to...
2917 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
2919 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
2921 * Makefile (libpthread-routines): Add pt-cleanup.
2922 * pt-longjmp.c: Removed.
2923 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2924 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2925 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2926 Version longjmp, siglongjmp for GLIBC_2.3.4.
2927 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2929 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2931 * sysdeps/pthread/pthread_cond_timedwait.c
2932 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
2933 Reuse code. Add __builtin_expects.
2935 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2936 (__pthread_cond_timedwait): Get internal lock in case timeout has
2937 passed before the futex syscall.
2938 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2940 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2942 * allocatestack.c: Pretty printing.
2944 * sysdeps/pthread/createthread.c (create_thread): Don't add
2945 CLONE_DETACHED bit if it is not necessary.
2947 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2949 * pthread_getattr_np.c: Include ldsodefs.h.
2951 2004-01-16 Richard Henderson <rth@redhat.com>
2953 * allocatestack.c: Don't declare __libc_stack_end.
2954 * init.c (__pthread_initialize_minimal_internal): Likewise.
2955 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
2957 2004-01-15 Richard Henderson <rth@redhat.com>
2959 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2960 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2961 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2962 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2963 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2964 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2965 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2966 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
2968 2004-01-14 Ulrich Drepper <drepper@redhat.com>
2970 * init.c (pthread_functions): Make array const.
2972 2004-01-13 Ulrich Drepper <drepper@redhat.com>
2974 * allocatestack.c (__make_stacks_executable): Change interface.
2975 Check parameters. Pass parameter on to libc counterpart.
2976 * pthreadP.h: Change declaration.
2978 2004-01-13 Richard Henderson <rth@redhat.com>
2980 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
2982 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
2985 * sysdeps/alpha/Makefile: New file.
2986 * sysdeps/alpha/tcb-offsets.sym: New file.
2987 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2988 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
2990 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
2993 2004-01-08 Jakub Jelinek <jakub@redhat.com>
2995 * Makefile (tests): Add tst-backtrace1.
2996 * tst-backtrace1.c: New test.
2998 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
3000 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
3001 register as second parameter to the REGISTER macro.
3002 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
3003 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
3004 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
3005 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
3006 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
3007 of thread register as second parameter to REGISTER macro in 64 case.
3009 2004-01-03 Ulrich Drepper <drepper@redhat.com>
3011 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
3012 (CFLAGS-getpid.o): Defined.
3013 (CFLAGS-getpid.os): Defined.
3015 2003-12-31 Ulrich Drepper <drepper@redhat.com>
3017 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
3018 returned for main thread does not overlap with any other VMA.
3019 Patch by Jakub Jelinek.
3021 2003-12-29 Jakub Jelinek <jakub@redhat.com>
3023 * tst-raise1.c: Include stdio.h.
3025 2003-12-23 Jakub Jelinek <jakub@redhat.com>
3027 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
3028 setting with __ASSUME_TGKILL || defined __NR_tgkill.
3029 If pid is 0, set it to selftid.
3030 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
3031 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
3032 != 0, return self->tid without doing a syscall.
3033 * descr.h (struct pthread): Move pid field after tid.
3035 * Makefile (tests): Add tst-raise1.
3036 * tst-raise1.c: New file.
3038 2003-12-23 Roland McGrath <roland@redhat.com>
3040 * tst-oddstacklimit.c: New file.
3041 * Makefile (tests): Add it.
3042 (tst-oddstacklimit-ENV): New variable.
3044 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
3045 value up to page size for __default_stacksize.
3047 2003-12-21 Ulrich Drepper <drepper@redhat.com>
3049 * Makefile (tests): Add tst-eintr5.
3050 * tst-eintr5.c: New file.
3052 * eintr.c (eintr_source): Prevent sending signal to self.
3054 * tst-eintr2.c (tf1): Improve error message.
3056 2003-12-20 Ulrich Drepper <drepper@redhat.com>
3058 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
3059 * sysdeps/unix/sysv/linux/getpid.c: New file.
3060 * pthread_cancel.c: Add comment explaining use of PID field.
3061 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3062 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
3063 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
3064 temporarily to signal the field must not be relied on and updated
3066 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
3067 temporarily negative.
3068 * sysdeps/unix/sysv/linux/raise.c: Likewise.
3070 2003-12-19 Ulrich Drepper <drepper@redhat.com>
3072 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
3073 (eintr_source): If ARG != NULL, use pthread_kill.
3074 * tst-eintr1.c: Adjust for this change.
3075 * tst-eintr2.c: Likewise.
3076 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
3077 * tst-eintr3.c: New file.
3078 * tst-eintr4.c: New file.
3080 2003-12-19 Jakub Jelinek <jakub@redhat.com>
3082 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
3083 if CANCELSTATE_BITMASK is set.
3084 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
3087 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
3088 (tests-reverse): Add tst-cancel23.
3089 * tst-cancel22.c: New test.
3090 * tst-cancel23.c: New test.
3092 2003-12-18 Ulrich Drepper <drepper@redhat.com>
3094 * tst-eintr1.c: Better error messages.
3096 * Makefile (tests): Add tst-eintr2.
3097 * tst-eintr2.c: New file.
3099 2003-12-18 Jakub Jelinek <jakub@redhat.com>
3101 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
3102 (CFLAGS-tst-cancelx21.c): Set.
3103 * tst-cancel21.c: New test.
3104 * tst-cancelx21.c: New test.
3106 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
3108 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
3109 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
3110 * pt-longjmp.c: Include jmpbuf-unwind.h.
3111 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
3112 _JMPBUF_UNWINDS. Adjust compared pointers.
3113 * init.c (__pthread_initialize_minimal_internal): Initialize
3114 pd->stackblock_size.
3115 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
3116 * sysdeps/alpha/jmpbuf-unwind.h: New file.
3117 * sysdeps/i386/jmpbuf-unwind.h: New file.
3118 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
3119 * sysdeps/s390/jmpbuf-unwind.h: New file.
3120 * sysdeps/sh/jmpbuf-unwind.h: New file.
3121 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
3122 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
3123 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
3124 (_JMPBUF_CFA_UNWINDS): Remove.
3125 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
3127 2003-12-12 Jakub Jelinek <jakub@redhat.com>
3129 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
3130 (CFLAGS-tst-cancelx20.c): Set.
3131 * tst-cancel20.c: New test.
3132 * tst-cancelx20.c: New test.
3134 2003-12-17 Ulrich Drepper <drepper@redhat.com>
3136 * init.c (__pthread_initialize_minimal_internal): Don't treat
3137 architectures with separate register stack special here when
3138 computing default stack size.
3140 2003-12-17 Roland McGrath <roland@redhat.com>
3142 * Makefile (tst-cancelx7-ARGS): New variable.
3143 Reportd by Greg Schafer <gschafer@zip.com.au>.
3145 2003-12-17 Jakub Jelinek <jakub@redhat.com>
3147 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
3148 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
3149 (tst-stack3-ENV): Set.
3150 ($(objpfx)tst-stack3-mem): New.
3151 * tst-stack3.c: New test.
3153 2003-12-10 David Mosberger <davidm@hpl.hp.com>
3155 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
3156 Add unwind directives. Drop unused .regstk directive.
3157 (_fini_EPILOG_BEGINS): Add unwind directives.
3159 2003-12-11 Ulrich Drepper <drepper@redhat.com>
3161 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3162 Assume parameter is a pointer.
3163 (lll_futex_wake): Likewise.
3164 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
3166 (lll_futex_wake): Likewise.
3167 Reported by Boris Hu.
3168 * sysdeps/unix/sysv/linux/unregister-atfork.c
3169 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
3171 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
3173 2003-12-10 Ulrich Drepper <drepper@redhat.com>
3175 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
3176 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
3177 __rtld_lock_initialize for ld.so lock.
3178 Patch in part by Adam Li <adam.li@intel.com>.
3180 2003-12-02 David Mosberger <davidm@hpl.hp.com>
3182 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
3183 in $(gnulib). Also, remove stale comment.
3185 2003-11-12 David Mosberger <davidm@hpl.hp.com>
3187 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3188 advantage of new syscall stub and optimize accordingly.
3190 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3191 from SYS_futex, to match expectations of
3192 sysdep.h:DO_INLINE_SYSCALL.
3193 (lll_futex_clobbers): Remove.
3194 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3195 (lll_futex_wake): Likewise.
3196 (lll_futex_requeue): Likewise.
3197 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3198 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3200 (__lll_mutex_lock): Likewise.
3201 (__lll_mutex_cond_lock): Likewise.
3202 (__lll_mutex_timed_lock): Likewise.
3203 (__lll_mutex_unlock): Likewise.
3204 (__lll_mutex_unlock_force): Likewise.
3206 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3207 comes before the include of <sysdep.h>.
3208 (THREAD_SELF_SYSINFO): New macro.
3209 (THREAD_SYSINFO): Likewise.
3210 (INIT_SYSINFO): New macro.
3211 (TLS_INIT_TP): Call INIT_SYSINFO.
3213 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3215 * sysdeps/pthread/createthread.c (create_thread): Use
3216 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3217 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3218 THREAD_SELF_SYSINFO instead of open code.
3219 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3220 (THREAD_SYSINFO): Likewise.
3222 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3224 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3226 2003-12-06 Ulrich Drepper <drepper@redhat.com>
3228 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3229 instead of .init. Patch by David Mosberger.
3231 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
3233 * sysdeps/pthread/configure.in: Remove broken declaration in C
3234 cleanup handling check.
3236 2003-11-30 Andreas Jaeger <aj@suse.de>
3238 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
3239 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
3242 2003-11-27 Jakub Jelinek <jakub@redhat.com>
3244 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3245 * pthread_attr_destroy.c: Include shlib-compat.h.
3246 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3247 is set in iattr->flags.
3248 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3250 2003-11-21 Jakub Jelinek <jakub@redhat.com>
3252 * Makefile (distribute): Add tst-cleanup4aux.c.
3254 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
3257 2003-11-21 Ulrich Drepper <drepper@redhat.com>
3259 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3260 pthread_cond_signal.
3262 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3263 store mutex address if the current value is ~0l.
3264 * sysdeps/pthread/pthread_cond_timedwait.c
3265 (__pthread_cond_timedwait): Likewise.
3266 * sysdeps/pthread/pthread_cond_broadcast.c
3267 (__pthread_cond_broadcast): Don't use requeue for pshared
3270 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3271 (__pthread_cond_wait): Don't store mutex address if the current
3273 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3274 (__pthread_cond_timedwait): Likewise.
3275 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3276 (__pthread_cond_broadcast): Don't use requeue for pshared
3279 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3280 element with ~0l for pshared condvars, with NULL otherwise.
3282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3283 (__pthread_cond_wait): Don't store mutex address if the current
3285 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3286 (__pthread_cond_timedwait): Likewise.
3287 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3288 (__pthread_cond_broadcast): Don't use requeue for pshared
3291 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3292 * tst-cond12.c: New file.
3293 * tst-cond13.c: New file.
3295 2003-11-17 Ulrich Drepper <drepper@redhat.com>
3297 * sysdeps/pthread/configure.in: Make missing forced unwind support
3300 2003-11-11 Ulrich Drepper <drepper@redhat.com>
3302 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3304 2003-11-06 Ulrich Drepper <drepper@redhat.com>
3306 * Makefile: Add magic to clean up correctly.
3308 2003-11-05 Jakub Jelinek <jakub@redhat.com>
3310 * unwind.c (FRAME_LEFT): Define.
3311 (unwind_stop): Handle old style cleanups here.
3312 (__pthread_unwind): Handle old style cleanups only if
3313 !HAVE_FORCED_UNWIND.
3314 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3315 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3316 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3317 ($(objpfx)tst-cleanupx4): Likewise.
3318 * tst-cleanup4.c: New test.
3319 * tst-cleanup4aux.c: New.
3320 * tst-cleanupx4.c: New test.
3322 2003-11-04 Ulrich Drepper <drepper@redhat.com>
3324 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3325 lll_mutex_*lock macros to skip atomic operations on some archs.
3327 2003-11-03 Ulrich Drepper <drepper@redhat.com>
3329 * sysdeps/pthread/tst-timer.c (main): Initialize
3330 sigev2.sigev_value as well.
3332 2003-10-15 Roland McGrath <roland@redhat.com>
3334 * sysdeps/pthread/configure.in: Barf if visibility attribute support
3336 * sysdeps/pthread/configure: Regenerated.
3338 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3340 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3341 locking macros. No distinction between normal and mutex locking
3343 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3344 Merge bits from lowlevelmutex.S we still need.
3345 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3346 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3347 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3348 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3349 new mutex implementation.
3350 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3351 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3352 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3353 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3354 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3355 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3356 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3357 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3358 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3359 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3360 symbol for entry point to avoid cancellation.
3362 2003-10-07 Jakub Jelinek <jakub@redhat.com>
3364 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3366 (SAVE_OLDTYPE_0): Fix a typo.
3368 2003-10-03 Ulrich Drepper <drepper@redhat.com>
3370 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3371 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
3373 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3375 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3378 2003-10-02 Jakub Jelinek <jakub@redhat.com>
3380 * Makefile (tests): Add tst-cancel19.
3381 * tst-cancel19.c: New test.
3383 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3385 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3386 restoring of the old cancellation type.
3388 2003-09-30 Jakub Jelinek <jakub@redhat.com>
3390 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3392 2003-09-27 Wolfram Gloger <wg@malloc.de>
3394 * sysdeps/pthread/malloc-machine.h: New file
3396 2003-09-24 Roland McGrath <roland@redhat.com>
3398 * allocatestack.c (__make_stacks_executable): Don't ignore return
3399 value from _dl_make_stack_executable.
3401 2003-09-24 Ulrich Drepper <drepper@redhat.com>
3403 * allocatestack.c (__make_stacks_executable): Also change
3404 permission of the currently unused stacks.
3406 * allocatestack.c (change_stack_perm): Split out from
3407 __make_stacks_executable.
3408 (allocate_stack): If the required permission changed between the time
3409 we started preparing the stack and queueing it, change the permission.
3410 (__make_stacks_executable): Call change_stack_perm.
3412 * Makefile: Build tst-execstack-mod locally.
3413 * tst-execstack-mod.c: New file.
3415 2003-09-23 Jakub Jelinek <jakub@redhat.com>
3417 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3419 2003-09-23 Roland McGrath <roland@redhat.com>
3421 * tst-execstack.c: New file.
3422 * Makefile (tests): Add it.
3423 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3424 (LDFLAGS-tst-execstack): New variable.
3426 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3427 whether to use PROT_EXEC for stack mmap.
3428 (__make_stacks_executable): New function.
3429 * pthreadP.h: Declare it.
3430 * init.c (__pthread_initialize_minimal_internal): Set
3431 GL(dl_make_stack_executable_hook) to that.
3433 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3435 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3436 recommendation from AMD re avoidance of lock prefix.
3438 2003-09-22 Jakub Jelinek <jakub@redhat.com>
3440 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3441 lll_futex_timed_wait instead of lll_futex_wait.
3442 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3443 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3444 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3445 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3446 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3447 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3448 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3449 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3450 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3451 Completely revamp the locking macros. No distinction between
3452 normal and mutex locking anymore.
3453 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3454 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3455 __lll_lock_timedwait): Fix prototypes.
3456 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3457 __lll_lock_timedwait): Likewise.
3458 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3459 macros, add __builtin_expect.
3460 (lll_mutex_timedlock): Likewise. Fix return value.
3461 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3462 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3463 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3464 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3465 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3466 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3467 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3468 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3470 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3472 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3473 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3474 operation if possible.
3476 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3477 like jumping over the lock prefix.
3479 2003-09-21 Ulrich Drepper <drepper@redhat.com>
3481 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3482 locking macros. No distinction between normal and mutex locking
3484 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3485 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3486 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3487 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3488 locking. Merge bits from lowlevelmutex.S we still need.
3489 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3490 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3491 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3492 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3493 * Makefile (routines): Remove libc-lowlevelmutex.
3494 (libpthread-rountines): Remove lowlevelmutex.
3495 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3496 for new mutex implementation.
3497 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3499 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3500 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3501 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3503 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3505 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3506 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3507 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3508 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3509 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3510 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3511 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3512 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3514 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3516 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3517 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3518 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3520 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3521 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3523 2003-09-20 Ulrich Drepper <drepper@redhat.com>
3525 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3526 in parameters of asm with output parameters.
3528 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3529 type of DECR parameter to int.
3530 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3532 2003-09-18 Jakub Jelinek <jakub@redhat.com>
3534 * tst-attr3.c (tf, do_test): Print stack start/end/size and
3535 guardsize for each thread.
3537 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3539 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3540 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3541 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3543 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3544 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3546 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3547 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3548 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3549 (pthread_getaffinity_np): Add hidden_def.
3551 * Makefile (tests): Add tst-attr3.
3552 * tst-attr3.c: New test.
3554 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3556 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3558 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3559 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3561 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3563 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3564 * tst-align.c: Include tst-stack-align.h.
3565 (tf, do_test): Use TEST_STACK_ALIGN macro.
3567 2003-09-17 Ulrich Drepper <drepper@redhat.com>
3569 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3572 2003-09-16 Ulrich Drepper <drepper@redhat.com>
3574 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3575 stack-related values for the initial thread.
3577 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3579 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3581 2003-09-11 Ulrich Drepper <drepper@redhat.com>
3583 * pthread_mutex_lock.c: Minor code rearrangements.
3585 2003-09-05 Roland McGrath <roland@redhat.com>
3587 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3588 Instead, include ../nptl_db/db_info.c to do its magic.
3589 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3590 (__pthread_pthread_key_2ndlevel_size): Likewise.
3591 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3592 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3593 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3594 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3595 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3596 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3597 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3598 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3599 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3600 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3601 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3602 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3603 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3604 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3605 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3606 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3607 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3609 2003-09-08 Ulrich Drepper <drepper@redhat.com>
3611 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3612 of pthread_t to be compatible with LT.
3613 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3614 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3615 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3616 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3617 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3618 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3619 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3621 2003-09-04 Ulrich Drepper <drepper@redhat.com>
3623 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3625 2003-09-04 Jakub Jelinek <jakub@redhat.com>
3627 * unwind-forcedunwind.c: Move to...
3628 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3629 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3630 * sysdeps/pthread/jmpbuf-unwind.h: New file.
3631 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3632 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3633 * unwind.c: Include jmpbuf-unwind.h.
3634 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3636 2003-09-02 Jakub Jelinek <jakub@redhat.com>
3638 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3639 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3640 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3641 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3642 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3643 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3644 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3645 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3646 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3647 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3648 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3650 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3651 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3652 * Makefile (tests): Add tst-stack2.
3653 * tst-stack2.c: New test.
3654 * tst-stack1.c: Include limits.h and sys/param.h.
3655 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3657 * pthread_condattr_setpshared.c: Include errno.h.
3658 (pthread_condattr_setpshared): Return EINVAL if pshared
3659 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3661 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3662 defined symbol for entry point to avoid cancellation.
3663 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3665 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3667 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3669 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3671 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3673 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3674 __close_nocancel, __read_nocancel, __write_nocancel,
3675 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
3676 libpthread.so or librt.so, define to corresponding function
3677 without _nocancel suffix.
3678 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3679 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3680 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3682 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3684 2003-09-02 Ulrich Drepper <drepper@redhat.com>
3686 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3687 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3689 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3690 in subsections has a symbol associated with it.
3692 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3693 defined symbol for entry point to avoid cancellation.
3694 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3696 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3698 * Makefile (tests): Add tst-tls5.
3699 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3700 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3701 ($(objpfx)tst-tls5): New.
3702 ($(objpfx)tst-tls6.out): Likewise.
3703 (tests): Depend on $(objpfx)tst-tls6.out.
3704 * tst-tls3.c: Include stdint.h and pthreaddef.h.
3705 (do_test): Check pthread_self () return value alignment.
3706 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3707 (tf): Check pthread_self () return value alignment.
3708 * tst-tls5.c: New test.
3710 * tst-tls5mod.c: New.
3711 * tst-tls5moda.c: New.
3712 * tst-tls5modb.c: New.
3713 * tst-tls5modc.c: New.
3714 * tst-tls5modd.c: New.
3715 * tst-tls5mode.c: New.
3716 * tst-tls5modf.c: New.
3717 * tst-tls6.sh: New test.
3719 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3720 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3721 * init.c (pthread_functions): Initialize them.
3722 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3723 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3724 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3725 pthread_cond_timedwait@@GLIBC_2.3.2.
3727 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3729 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3730 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3731 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3732 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3733 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3734 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3736 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3738 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3739 _POSIX_THREAD_PRIORITY_SCHEDULING.
3740 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3742 2003-08-31 Ulrich Drepper <drepper@redhat.com>
3744 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3745 nested function, use static inline function from libio.h.
3746 Code by Richard Henderson.
3748 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3751 2003-08-30 Jakub Jelinek <jakub@redhat.com>
3753 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3754 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3755 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3756 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3757 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3758 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3759 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3760 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3761 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3762 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3763 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3764 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3765 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3766 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3767 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3768 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3769 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3770 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3771 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3772 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3773 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3774 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3775 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3776 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3777 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3778 * sysdeps/sparc/tls.h: New file.
3779 * sysdeps/sparc/tcb-offsets.sym: New file.
3780 * sysdeps/sparc/Makefile: New file.
3781 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3782 * init.c [__sparc__] (__NR_set_tid_address): Define.
3784 2003-08-29 Jakub Jelinek <jakub@redhat.com>
3786 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3787 _IO_release_lock): Define.
3789 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
3791 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3792 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
3794 2003-08-27 Ulrich Drepper <drepper@redhat.com>
3796 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3797 (__pthread_cleanup_class): Add missing return types of member
3800 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
3802 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3803 (lll_mutex_unlock_force): Add memory barrier between store and futex
3806 2003-08-25 Ulrich Drepper <drepper@redhat.com>
3808 * tst-cancel4.c (do_test): Also unlink tempfname and remove
3809 tempmsg in first loop.
3811 2003-08-18 Ulrich Drepper <drepper@redhat.com>
3813 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3814 _POSIX_THREAD_PRIORITY_SCHEDULING.
3815 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3817 2003-08-07 Jakub Jelinek <jakub@redhat.com>
3819 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
3820 (__rtld_lock_default_lock_recursive,
3821 __rtld_lock_default_unlock_recursive): Define.
3822 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3823 __rtld_lock_unlock_recursive): Define using
3824 GL(_dl_rtld_*lock_recursive).
3825 * init.c (__pthread_initialize_minimal_internal): Initialize
3826 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3827 Lock GL(_dl_load_lock) the same number of times as
3828 GL(_dl_load_lock) using non-mt implementation was nested.
3830 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3831 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3833 2003-08-06 Jakub Jelinek <jakub@redhat.com>
3835 * tst-cancel17.c (do_test): Make len2 maximum of page size and
3838 2003-08-07 Jakub Jelinek <jakub@redhat.com>
3840 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3842 2003-08-03 Jakub Jelinek <jakub@redhat.com>
3844 * sysdeps/pthread/createthread.c (do_clone): Move error handling
3845 to first syscall error check. Move syscall error check for tkill
3846 into __ASSUME_CLONE_STOPPED #ifdef.
3848 2003-08-02 Ulrich Drepper <drepper@redhat.com>
3850 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3851 is not defined, do explicit synchronization.
3852 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
3853 is not defined also unlock pd->lock for non-debugging case in case
3855 * pthread_create.c (start_thread): Always get and release pd->lock
3856 if __ASSUME_CLONE_STOPPED is not defined.
3857 (start_thread_debug): Removed. Adjust users.
3858 * allocatestack.c (allocate_stack): Always initialize lock if
3859 __ASSUME_CLONE_STOPPED is not defined.
3860 * Makefile (tests): Add tst-sched1.
3861 * tst-sched1.c: New file.
3863 * sysdeps/pthread/createthread.c (do_clone): Only use
3864 sched_setschduler and pass correct parameters.
3866 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3868 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3869 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3870 PTHREAD_STACK_MIN in comments.
3872 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3874 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3875 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3877 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3878 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3879 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3880 (__pthread_cleanup_upto): Fix prototype.
3881 (_longjmp_unwind): Adjust caller.
3882 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3883 Change second argument to const struct pointer.
3884 * tst-sem8.c (main): Remove unused s2 and s3 variables.
3885 * tst-sem9.c (main): Likewise.
3886 * unwind.c: Include string.h for strlen prototype.
3888 2003-07-31 Ulrich Drepper <drepper@redhat.com>
3890 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3891 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3892 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3894 Patch by Nicholas Miell <nmiell@attbi.com>.
3896 2003-07-30 Jakub Jelinek <jakub@redhat.com>
3898 * init.c (__pthread_initialize_minimal_internal): Initialize
3899 GL(dl_init_static_tls).
3900 * pthreadP.h (__pthread_init_static_tls): New prototype.
3901 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3903 * Makefile (tests): Add tst-tls4.
3904 (modules-names): Add tst-tls4moda and tst-tls4modb.
3905 ($(objpfx)tst-tls4): Link against libdl and libpthread.
3906 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3908 * tst-tls4.c: New file.
3909 * tst-tls4moda.c: New file.
3910 * tst-tls4modb.c: New file.
3912 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
3914 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3915 before __timer_dealloc.
3916 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3917 Don't call list_unlink.
3919 2003-07-29 Roland McGrath <roland@redhat.com>
3921 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3923 2003-07-25 Jakub Jelinek <jakub@redhat.com>
3925 * tst-cancel17.c (do_test): Check if aio_cancel failed.
3926 Don't reuse struct aiocb A if it failed.
3927 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3928 not just one byte, as that does not block.
3930 2003-07-22 Jakub Jelinek <jakub@redhat.com>
3932 * sysdeps/pthread/unwind-resume.c: New file.
3933 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3934 unwind-resume in csu subdir.
3935 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3937 (librt-sysdep_routines, librt-shared-only-routines): Add
3939 * sysdeps/pthread/rt-unwind-resume.c: New file.
3940 * unwind-forcedunwind.c: New file.
3941 * Makefile (libpthread-routines): Add unwind-forcedunwind.
3942 (libpthread-shared-only-routines): Likewise.
3943 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3944 * pthreadP.h (pthread_cancel_init): New prototype.
3945 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3947 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3948 attr argument const struct pthread_attr *.
3950 * res.c (__res_state): Return __resp.
3951 * descr.h: Include resolv.h.
3952 (struct pthread): Add res field.
3953 * pthread_create.c: Include resolv.h.
3954 (start_thread): Initialize __resp.
3955 * Makefile (tests): Add tst-_res1.
3956 (module-names): Add tst-_res1mod1, tst-_res1mod2.
3957 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3958 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3960 * tst-_res1.c: New file.
3961 * tst-_res1mod1.c: New file.
3962 * tst-_res1mod2.c: New file.
3964 2003-07-21 Ulrich Drepper <drepper@redhat.com>
3966 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
3968 * Makefile: Define various *-no-z-defs variables for test DSOs
3969 which has undefined symbols.
3971 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
3973 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3974 Retry if the stwcx fails to store once_control.
3976 2003-07-20 Ulrich Drepper <drepper@redhat.com>
3978 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
3979 pthread_attr_setaffinity.
3980 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
3981 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
3982 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
3983 * pthread_attr_destroy.c: Free cpuset element if allocated.
3984 * pthread_create.c: Pass iattr as additional parameter to
3986 * sysdeps/pthread/createthread.c: If attribute is provided and
3987 a new thread is created with affinity set or scheduling parameters,
3988 start thread with CLONE_STOPPED.
3989 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
3990 pthread_attr_setaffinity.
3991 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
3994 2003-07-15 Ulrich Drepper <drepper@redhat.com>
3996 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
3998 2003-07-14 Ulrich Drepper <drepper@redhat.com>
4000 * sysdeps/pthread/configure.in: Require CFI directives also for
4003 2003-07-15 Jakub Jelinek <jakub@redhat.com>
4005 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
4008 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4010 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
4012 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
4013 registers as variables. Call __pthread_mutex_unlock_usercnt.
4014 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4015 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
4016 not self pointer in __writer. Compare with TID to determine
4018 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4019 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4021 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4023 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
4024 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4025 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
4026 macros also when compiling librt.
4028 2003-07-11 Jakub Jelinek <jakub@redhat.com>
4030 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
4031 -fasynchronous-unwind-tables.
4032 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4033 (PSEUDO): Add cfi directives.
4034 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
4036 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
4039 2003-07-08 Jakub Jelinek <jakub@redhat.com>
4041 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
4042 __pthread_unregister_cancel): Add prototypes and hidden_proto.
4043 * unwind.c (__pthread_unwind_next): Add hidden_def.
4044 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
4046 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4047 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4048 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4050 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
4051 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4053 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
4054 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
4055 __pthread_unregister_cancel and __pthread_unwind_next.
4057 2003-07-04 Jakub Jelinek <jakub@redhat.com>
4059 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
4060 different symbol for the cancellation syscall wrapper and
4061 non-cancellation syscall wrapper.
4062 (PSEUDO_END): Define.
4064 2003-07-05 Richard Henderson <rth@redhat.com>
4066 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
4067 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
4068 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4069 return actual return value from the syscall, not 0.
4071 2003-07-07 Ulrich Drepper <drepper@redhat.com>
4073 * descr.h (struct pthread): Add pid field.
4074 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
4075 (__reclaim_stacks): Likewise.
4076 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
4077 also check for PID of the signal source.
4078 (__pthread_initialize_minimal_internal): Also initialize pid field
4079 of initial thread's descriptor.
4080 * pthread_cancel.c: Use tgkill instead of tkill if possible.
4081 * sysdeps/unix/sysv/linux/fork.c: Likewise.
4082 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
4083 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4084 * sysdeps/unix/sysv/linux/raise.c: Likewise.
4086 2003-07-05 Ulrich Drepper <drepper@redhat.com>
4088 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
4089 Fix use of parameter.
4090 (__libc_cleanup_pop): Likewise.
4092 2003-07-04 Ulrich Drepper <drepper@redhat.com>
4094 * init.c (sigcancel_handler): Change parameters to match handler
4095 for SA_SIGACTION. Check signal number and code to recognize
4096 invalid invocations.
4098 2003-07-03 Roland McGrath <roland@redhat.com>
4100 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
4101 Apply sizeof (struct pthread) bias to r13 value.
4103 2003-07-03 Ulrich Drepper <drepper@redhat.com>
4105 * sysdeps/pthread/configure.in: Require CFI directives.
4107 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
4109 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
4110 libpthread compilation.
4111 * unwind.c (__pthread_unwind): Add hidden_def.
4112 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
4114 2003-07-01 Ulrich Drepper <drepper@redhat.com>
4116 * libc-cancellation.c (__libc_cleanup_routine): Define.
4117 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
4118 (__pthread_cleanup_pop): Define.
4120 2003-07-01 Richard Henderson <rth@redhat.com>
4122 * sysdeps/alpha/elf/pt-initfini.c: New file.
4123 * sysdeps/alpha/pthread_spin_lock.S: New file.
4124 * sysdeps/alpha/pthread_spin_trylock.S: New file.
4125 * sysdeps/alpha/pthreaddef.h: New file.
4126 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
4127 * sysdeps/alpha/tls.h: New file.
4128 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
4129 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
4130 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
4131 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
4132 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
4133 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
4134 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
4135 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
4136 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
4137 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
4139 2003-07-01 Ulrich Drepper <drepper@redhat.com>
4141 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
4142 cleanup support and unwind info.
4144 2003-06-30 Ulrich Drepper <drepper@redhat.com>
4146 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4147 Use correct cleanup handler registration. Add unwind info.
4148 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
4149 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
4150 * tst-once3.c: Add cleanup handler and check it is called.
4151 * tst-once4.c: Likewise.
4152 * tst-oncex3.c: New file.
4153 * tst-oncex4.c: New file.
4154 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
4156 2003-06-29 Ulrich Drepper <drepper@redhat.com>
4158 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
4160 2003-06-27 Ulrich Drepper <drepper@redhat.com>
4162 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
4163 (tf_msgsnd): Likewise.
4165 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
4166 premature returns a bit more.
4168 2003-06-26 Ulrich Drepper <drepper@redhat.com>
4170 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
4171 definition to the front.
4173 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
4174 the cleanup functions to make the names unique. Fix dwarf opcode
4176 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
4177 functions to make the names unique. Fix CFA offset for two blocks.
4179 2003-06-25 Ulrich Drepper <drepper@redhat.com>
4181 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
4182 missing closing braces.
4183 Patch by Christophe Saout <christophe@saout.de>.
4185 2003-06-24 Roland McGrath <roland@redhat.com>
4187 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
4189 2003-06-24 Ulrich Drepper <drepper@redhat.com>
4191 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
4192 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
4194 * pthreadP.h: Declare __find_thread_by_id.
4195 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
4196 * pthread_clock_gettime.c: Allow using other thread's clock.
4197 * pthread_clock_settime.c: Likewise.
4198 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4199 * Makefile: Add rules to build and run tst-clock2.
4200 * tst-clock2.c: New file.
4202 2003-06-23 Ulrich Drepper <drepper@redhat.com>
4204 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
4205 to use exception-based cleanup handler.
4206 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4208 * tst-cond8.c (ch): Announce that we are done.
4210 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
4212 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
4213 Also test aio_suspend with timeout value.
4215 2003-06-22 Ulrich Drepper <drepper@redhat.com>
4217 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
4218 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
4221 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
4222 (__pthread_mutex_lock_internal): Likewise.
4223 (__pthread_mutex_unlock_internal): Likewise.
4224 (__pthread_mutex_unlock_usercnt): Declare.
4225 * pthread_mutex_destroy.c: Always fail if used in any way.
4226 * pthread_mutex_init.c: Update comment.
4227 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
4228 * pthread_mutex_timedlock.c: Adjust __nusers.
4229 * pthread_mutex_trylock.c: Adjust __nusers.
4230 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
4231 and public interfaces are wrapper with pass additional parameter.
4232 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
4234 * tst-mutex8.c: New file.
4235 * Makefile (tests): Add tst-mutex8.
4236 * sysdeps/pthread/pthread_cond_timedwait.c: Call
4237 __pthread_mutex_unlock_usercnt.
4238 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4239 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4240 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4241 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4242 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4243 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
4244 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4246 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4247 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4248 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4249 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4250 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4252 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
4253 * pthread_mutex_timedlock.c: Likewise.
4254 * pthread_mutex_trylock.c: Adjust __nusers.
4255 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
4256 * tst-mutex9.c: New file.
4257 * Makefile (tests): Add tst-mutex9.
4258 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
4259 * sysdeps/ia64/tls.h: Likewise.
4260 * sysdeps/powerpc/tls.h: Likewise.
4261 * sysdeps/s390/tls.h: Likewise.
4262 * sysdeps/sh/tls.h: Likewise.
4263 * sysdeps/x86_64/tls.h: Likewise.
4264 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4265 Change type of __owner.
4266 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4267 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4268 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4269 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4270 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4272 2003-06-19 Jakub Jelinek <jakub@redhat.com>
4274 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
4275 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
4277 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
4278 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
4279 instead of nr to lll_futex_wake. Only set errno and return -1
4282 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
4283 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4284 return actual return value from the syscall, not 0.
4286 2003-06-18 Ulrich Drepper <drepper@redhat.com>
4288 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
4289 find a random value.
4290 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
4293 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
4294 compat_timer_settime.
4295 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
4296 compat_timer_gettime.
4297 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4298 compat_timer_getoverrun.
4299 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4300 compat_timer_delete.
4302 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4303 error-checking mutex detect busy mutexes.
4305 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4307 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4308 Add ax to clobber list.
4309 (lll_mutex_cond_lock): Likewise.
4310 (lll_mutex_unlock): Likewise.
4311 (lll_lock): Likewise.
4312 (lll_unlock): Likewise.
4314 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4315 * tst-cancel18.c: New file.
4316 * tst-cancelx18.c: New file.
4318 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4321 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4322 * tst-cancel17.c: New file.
4323 * tst-cancelx17.c: New file.
4325 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4326 * sysdeps/unix/sysv/linux/sigwait.c: New file.
4327 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4329 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4331 2003-06-16 Jakub Jelinek <jakub@redhat.com>
4333 * sysdeps/pthread/createthread.c (create_thread): Set
4334 header.multiple_threads unconditionally.
4335 * allocatestack.c (allocate_stack): Likewise.
4336 * descr.h (struct pthread): Add header.multiple_threads
4338 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4339 Define for librt. #error if neither libpthread, libc nor librt.
4340 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4342 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4343 CDISABLE): Likewise.
4344 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4345 CDISABLE): Likewise.
4346 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4347 CDISABLE): Likewise.
4348 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4349 CDISABLE): Likewise. Access header.multiple_threads outside of
4350 libc and libpthread.
4351 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4353 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4354 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4356 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4358 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4359 Also test early cancellation before the thread reaches the cancellation
4362 * Makefile: Compile forward.c with exceptions.
4364 * sysdeps/unix/sysv/linux/sleep.c: New file.
4366 2003-06-16 Ulrich Drepper <drepper@redhat.com>
4368 * Makefile: Add CFLAGS definition to compile function wrappers
4369 duplicated from libc with exceptions.
4370 * tst-cancel4.c: Also check cancellation handlers.
4372 * Makefile: Add rules to build and run tst-cancel16 and
4373 tst-cancelx16. Add missing CFLAGS definitions.
4374 * tst-cancel16.c: New file.
4375 * tst-cancelx16.c: New file.
4377 2003-06-15 Ulrich Drepper <drepper@redhat.com>
4379 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4380 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4381 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4382 (DL_SYSINFO_IMPLEMENTATION): Likewise.
4384 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4385 (LIBC_CANCEL_RESET): Likewise.
4386 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4387 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4389 (CFLAGS-libcrt-cancellation.c): Define.
4390 * sysdeps/pthread/librt-cancellation.c: New file.
4391 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4392 macros also when compiling librt.
4393 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4394 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4395 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4396 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4397 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4398 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4399 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4401 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4402 compat_timer_create.
4404 2003-06-14 Ulrich Drepper <drepper@redhat.com>
4406 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4408 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4410 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4411 Add libc_hidden_def.
4413 2003-06-13 Roland McGrath <roland@redhat.com>
4415 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4416 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4418 2003-06-11 Ulrich Drepper <drepper@redhat.com>
4420 * allocatestack.c (queue_stack): Always inline.
4421 * ptreadhP.h (__do_cancel): Likewise.
4423 2003-06-10 Jakub Jelinek <jakub@redhat.com>
4425 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4428 2003-06-10 Ulrich Drepper <drepper@redhat.com>
4430 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4431 (__pthread_cond_signal): Remove incorrect second addition for
4434 2003-06-09 Ulrich Drepper <drepper@redhat.com>
4436 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4437 (__pthread_cond_signal): Use correct futex pointer in
4438 __lll_mutex_lock_wait call.
4440 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4441 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4443 2003-06-08 Ulrich Drepper <drepper@redhat.com>
4445 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4447 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4450 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4451 hand-written CFI generation code. Since ENTRY/END also initiated
4452 CFI frames this caused two CFI sets to be generated.
4454 2003-06-07 Ulrich Drepper <drepper@redhat.com>
4456 * cleanup_routine.c: New file.
4457 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4458 * sysdeps/pthread/pthread.h: Add support for fully exception-based
4460 * Makefile (libpthread-routines): Add cleanup_routine.
4461 Add more CFLAGS variables to compile with exceptions. Add comments
4462 why which file needs unwind tables.
4463 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4465 * tst-cancelx1.c: New file.
4466 * tst-cancelx2.c: New file.
4467 * tst-cancelx3.c: New file.
4468 * tst-cancelx4.c: New file.
4469 * tst-cancelx5.c: New file.
4470 * tst-cancelx6.c: New file.
4471 * tst-cancelx7.c: New file.
4472 * tst-cancelx8.c: New file.
4473 * tst-cancelx9.c: New file.
4474 * tst-cancelx10.c: New file.
4475 * tst-cancelx11.c: New file.
4476 * tst-cancelx12.c: New file.
4477 * tst-cancelx13.c: New file.
4478 * tst-cancelx14.c: New file.
4479 * tst-cancelx15.c: New file.
4480 * tst-cleanupx0.c: New file.
4481 * tst-cleanupx0.expect: New file.
4482 * tst-cleanupx1.c: New file.
4483 * tst-cleanupx2.c: New file.
4484 * tst-cleanupx3.c: New file.
4486 * tst-cleanup0.c: Make standard compliant.
4487 * tst-cleanup1.c: Likewise.
4489 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4490 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4491 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4492 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4493 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4494 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4495 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4497 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4498 * tst-cancel12.c: New file.
4499 * tst-cancel13.c: New file.
4500 * tst-cancel14.c: New file.
4501 * tst-cancel15.c: New file.
4502 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4505 * tst-cancel1.c: Add some comments.
4507 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4510 2003-06-06 Ulrich Drepper <drepper@redhat.com>
4512 * Makefile (CFLAGS-pthread_cancel.c): Define.
4514 2003-06-05 Ulrich Drepper <drepper@redhat.com>
4516 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4517 Change type of __writer element to int.
4518 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4519 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4520 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4521 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4522 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4523 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4524 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4525 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4526 Compare with TID to determine deadlocks.
4527 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4528 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4529 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4530 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4531 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4532 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4534 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4536 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4537 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4538 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4540 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4542 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4543 * Makefile (tests): Add tst-rwlock12.
4544 * tst-rwlock12.c: New file.
4546 2003-06-05 Jakub Jelinek <jakub@redhat.com>
4548 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4549 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4550 Remove bogus hidden_proto.
4551 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4553 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4554 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4555 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4556 ___lll_mutex_timedlock): Likewise.
4558 2003-06-04 Ulrich Drepper <drepper@redhat.com>
4560 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4561 (__pthread_cond_signal): Add some code to eventually handle
4564 2003-06-01 Ulrich Drepper <drepper@redhat.com>
4566 * Makefile (tests): Add tst-exec4.
4567 (tst-exec4-ARGS): Define.
4568 * tst-exec4.c: New file.
4570 2003-05-31 Ulrich Drepper <drepper@redhat.com>
4572 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4573 Also fail if tv_nsec < 0.
4574 (__lll_timedwait_tid): Likewise.
4575 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4576 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4578 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4580 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4582 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4584 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4586 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4589 * Makefile (tests): Add tst-sem8 and tst-sem9.
4590 * tst-sem8.c: New file.
4591 * tst-sem9.c: New file.
4592 * sem_open.c: Fix creation of in_use record if the file exists but
4595 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4598 * sysdeps/pthread/timer_create.c (timer_create): In case
4599 evp==NULL, assign timer ID to sival_ptr.
4601 * descr.h (struct pthread_unwind_buf): Change type of prev element to
4602 struct pthread_unwind_buf *.
4603 (struct pthread): Likewise for cleanup_jmp_buf element.
4605 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4606 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4607 * unwind.c (__pthread_unwind_next): Likewise.
4609 2003-05-30 Ulrich Drepper <drepper@redhat.com>
4611 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4612 (lll_futex_timed_wait): Use int for futex value parameter.
4613 (lll_futex_wake): Likewise.
4614 (lll_futex_requeue): Likewise.
4616 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4617 Replace one memory operation with one register operation.
4619 * tst-join4.c (do_test): Fix error message.
4621 * tst-rwlock6.c (do_test): Use correct format specifier.
4623 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4624 (__lll_mutex_lock_wait): Replace one memory operation with one
4626 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4627 (__lll_mutex_lock_wait): Likewise.
4629 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4630 (__lll_mutex_cond_lock): Add one to value parameter of
4631 __lll_lock_wait to reflect reality in the futex syscall.
4632 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4633 (lll_mutex_cond_lock): Likewise.
4635 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4637 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4639 (lll_mutex_cond_lock): Define.
4641 2003-05-29 Ulrich Drepper <drepper@redhat.com>
4643 * Makefile (tests): Add tst-signal6.
4644 * tst-signal6.c: New file.
4646 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4647 (__lll_mutex_unlock_force): New function
4648 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4650 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4651 (__lll_mutex_unlock_force): New function.
4652 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4654 * tst-rwlock7.c (do_test): Use correct format specifier.
4656 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4657 Find break parameter in correct asm argument.
4659 2003-05-27 Jakub Jelinek <jakub@redhat.com>
4661 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4663 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4665 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4667 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4668 lll_futex_requeue, lll_mutex_unlock_force): Define.
4670 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4672 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4673 (pthread_cond_t): Add __mutex.
4674 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4675 lll_futex_requeue, lll_mutex_unlock_force): Define.
4677 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4679 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4680 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4682 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4684 (lll_futex_wait, lll_futex_wake): Define.
4685 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4686 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4687 FUTEX_REQUEUE instead of FUTEX_WAIT.
4688 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4689 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4690 mutex which was used in condvar structure. Call
4691 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4692 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4694 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4695 include tcb-offsets.h. Read wakeup value in locked region.
4696 Use the value of gbr register as THREAD_ID.
4697 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4698 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4699 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4701 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4704 2003-05-28 Ulrich Drepper <drepper@redhat.com>
4706 * sysdeps/pthread/pthread_cond_broadcast.c
4707 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4709 2003-05-26 Ulrich Drepper <drepper@redhat.com>
4711 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4712 typo in register name.
4713 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4714 correctly. Actually use requeue. Little optimization.
4715 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4716 mutex address early. Handle cancellation state as 32-bit value.
4717 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4718 Remove unnecessary label.
4720 2003-05-25 Ulrich Drepper <drepper@redhat.com>
4722 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4723 instead of FUTEX_WAIT.
4724 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4725 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4726 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4727 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4728 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4729 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
4730 used in condvar structure. Call __pthread_mutex_cond_lock instead
4731 of __pthread_mutex_lock_internal.
4732 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4733 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4734 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4735 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
4736 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4737 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4738 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
4739 Add pthread_mutex_cond_lock.
4740 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
4741 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
4742 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
4743 lll_mutex_cond_lock.
4744 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4745 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4746 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4748 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4749 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4751 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
4752 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4754 * pthreadP.h: Declare __pthread_mutex_cond_lock.
4755 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
4756 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
4757 macro don't define aliases.
4759 * cancellation.c: Remove __pthread_enable_asynccancel_2.
4760 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
4761 * sysdeps/pthread/pthread_cond_timedwait.c: Use
4762 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
4763 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4764 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4765 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4766 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4767 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4769 2003-05-17 Ulrich Drepper <drepper@redhat.com>
4771 * sem_open.c: Fix one endless loop. Implement correct semantics
4772 wrt opening the same semaphore more then once.
4773 * sem_close.c: Adjust for sem_open change.
4774 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
4775 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
4776 * Makefile (tests): Add tst-sem7.
4777 * tst-sem7.c: New file.
4779 2003-05-16 Roland McGrath <roland@redhat.com>
4781 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
4782 uninitialized variable braino.
4784 2003-05-16 Ulrich Drepper <drepper@redhat.com>
4786 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
4787 test for syscall availability.
4789 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
4790 __no_posix_timers to -1 if the syscalls don't exist.
4792 * pthread_join.c (pthread_join): Set tid field of the joined
4793 thread to -1. This isn't necessary but helps to recognize some
4794 error conditions with almost no cost.
4796 * allocatestack.c (FREE_P): Also negative values indicate an
4799 * unwind.c: Include <unistd.h>.
4801 2003-05-14 Ulrich Drepper <drepper@redhat.com>
4803 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
4805 2003-05-14 Jakub Jelinek <jakub@redhat.com>
4807 * Makefile (crti-objs, crtn-objs): New variables.
4808 (omit-deps, extra-objs): Add crtn.
4809 ($(objpfx)libpthread.so): Depend on both crti and crtn
4810 and links to them in multidir.
4811 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
4813 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
4815 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4816 (lll_mutex_unlock): Use atomic_exchange_rel.
4818 2003-05-11 Ulrich Drepper <drepper@redhat.com>
4820 * cond-perf.c (cons): Add missing locking around setting of alldone.
4822 2003-05-10 Ulrich Drepper <drepper@redhat.com>
4824 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4826 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4828 2003-05-09 Ulrich Drepper <drepper@redhat.com>
4830 * tst-sem6.c: New file.
4831 * Makefile (tests): Add tst-sem6.
4833 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4834 Use atomic_exchange_rel instead of atomic_exchange.
4835 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4838 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4839 code for lll_futex_wait and lll_futex_wake in static apps. Use
4840 vsyscall is possible.
4842 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4843 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4844 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4845 pthread_setaffinity_np.
4846 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4847 and pthread_setaffinity_np.
4848 * Makefile (libpthread-routines): Add pthread_getaffinity and
4849 pthread_setaffinity.
4851 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4852 use it in case mmap to allocate the stack fails.
4853 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4854 ARCH_MAP_FLAGS here.
4855 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4858 2003-05-08 Ulrich Drepper <drepper@redhat.com>
4860 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4861 handler implementation. It is now lockless in fork().
4862 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4863 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4864 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
4865 declare the __fork_*_lists.
4866 (struct fork_handler): Include pointers to all three functions.
4867 Add next, refcntr and need_signal elements.
4868 (__fork_handlers): New declaration.
4869 (__register_atfork_malloc): Remove declaration.
4870 (HAVE_register_atfork_malloc): Remove definition.
4871 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4872 __pthread_child_handler variable.
4873 (__libc_pthread_init): Use __register_atfork instead of explicitly
4875 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4877 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4879 * unwind.c (unwind_cleanup): Print error message and then abort. This
4880 function must never be reached.
4882 * cond-perf.c: New file.
4884 2003-05-05 Ulrich Drepper <drepper@redhat.com>
4886 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4888 2003-05-04 Roland McGrath <roland@redhat.com>
4890 * Makefile ($(objpfx)../libc.so): New target.
4892 2003-05-02 Ulrich Drepper <drepper@redhat.com>
4894 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4895 (pthread_condattr_t): Size is only an int, don't use long for
4897 (pthread_mutexattr_t): Likewise.
4898 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4899 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4900 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4902 2003-05-01 Ulrich Drepper <drepper@redhat.com>
4904 * sysdeps/i386/tls.h: Define THREAD_ID.
4905 * sysdeps/ia64/tls.h: Likewise.
4906 * sysdeps/powerpc/tls.h: Likewise.
4907 * sysdeps/s390/tls.h: Likewise.
4908 * sysdeps/sh/tls.h: Likewise.
4909 * sysdeps/x86_64/tls.h: Likewise.
4910 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4912 * pthread_mutex_timedlock.c: Likewise.
4913 * pthread_mutex_trylock.c: Likewise.
4914 * pthread_mutex_unlock.c: Likewise.
4915 * pthread_rwlock_trywrlock.c: Likewise.
4916 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4917 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4918 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4919 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4921 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4924 2003-04-29 Jakub Jelinek <jakub@redhat.com>
4926 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4927 (__SIZEOF_PTHREAD_COND_T): Define to 48.
4928 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4929 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4930 Make __align long long instead of long.
4931 (pthread_rwlock_t): Formatting.
4932 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4933 (pthread_rwlock_t): Formatting.
4934 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4935 (pthread_cond_t): Make __align long long instead of long.
4936 (pthread_rwlock_t): Move __flags field to the same position as in
4939 2003-04-30 Ulrich Drepper <drepper@redhat.com>
4941 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4942 * tst-rwlock7.c (do_test): Likewise.
4944 2003-04-26 Roland McGrath <roland@redhat.com>
4946 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4948 2003-04-22 Jakub Jelinek <jakub@redhat.com>
4950 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4951 sizeof (struct pthread).
4952 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
4954 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
4956 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
4958 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
4960 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
4962 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
4964 (NO_TLS_OFFSET): Define.
4965 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
4966 add TLS_TCB_SIZE unnecessarily.
4968 2003-04-22 Roland McGrath <roland@redhat.com>
4970 * Makeconfig (shared-thread-library): Reverse link order to work
4973 2003-04-22 Ulrich Drepper <drepper@redhat.com>
4975 * semaphore.h: Fix typo in comment.
4977 2003-04-21 Ulrich Drepper <drepper@redhat.com>
4979 * sysdeps/pthread/sigfillset.c: New file.
4981 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
4982 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
4983 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
4984 * sysdeps/pthread/sigaction.c: Likewise.
4985 * sysdeps/pthread/sigprocmask.c: New file.
4986 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
4988 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4989 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
4992 2003-04-19 Ulrich Drepper <drepper@redhat.com>
4994 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4995 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
4997 * sysdeps/unix/sysv/linux/unregister-atfork.c
4998 (__unregister_atfork): Don't free memory not allocated dynamically.
5000 * semaphore.h: Remove __THROW marker from cancellation points.
5001 * nptl/sysdeps/pthread/pthread.h: Likewise.
5003 2003-04-18 Ulrich Drepper <drepper@redhat.com>
5005 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
5006 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
5009 2003-04-16 Jakub Jelinek <jakub@redhat.com>
5011 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
5013 2003-04-15 Roland McGrath <roland@redhat.com>
5015 * forward.c (__pthread_unwind): Tweak to avoid warning.
5017 2003-04-15 Ulrich Drepper <drepper@redhat.com>
5019 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
5021 2003-04-14 Ulrich Drepper <drepper@redhat.com>
5023 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
5024 overflow CFA advance instructions.
5025 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5027 2003-04-14 Jakub Jelinek <jakub@redhat.com>
5029 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
5030 * sysdeps/i386/pthread_spin_lock.c: Likewise.
5031 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
5034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
5035 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
5036 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
5037 DW_CFA_advance_loc for .Laddl-.Lsubl.
5039 2003-04-13 Ulrich Drepper <drepper@redhat.com>
5041 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
5042 position-independent unwind data for static libraries.
5043 Add missing unwind info. Add comments.
5045 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
5046 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5047 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5048 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5050 2003-04-12 Ulrich Drepper <drepper@redhat.com>
5052 * Makefile: Make sure all cancellation points are compiled with
5053 exception and asynchronous unwind tables.
5055 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
5056 which mishandles loading of global object addresses in PIC.
5057 (THREAD_SETMEM_NC): Likewise.
5059 2003-04-11 Ulrich Drepper <drepper@redhat.com>
5061 * pthread.h: Define new data structure for cleanup buffer. Declare
5062 new cleanup handler interfaces.
5063 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
5064 (struct pthread): Add cleanup_jmp_buf pointer. Define
5065 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
5066 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
5067 it. Declare old cleanup handler installation functions.
5068 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
5070 * cleanup_defer.c: Likewise.
5071 * cleanup_compat.c: New file. Old cleanup code.
5072 * cleanup_def_compat.c: New file. Old cleanup code.
5073 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
5074 if own thread descriptor.
5075 * unwind.c: New file.
5076 * forward.c: Add __pthread_unwind.
5077 * init.c (pthread_functions): Add __pthread_unwind.
5078 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
5079 Add ptr___pthread_unwind.
5080 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
5081 and unwind function.
5082 * Makefile (libpthread-routines): Add cleanup_compat,
5083 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
5084 table generation if necessary.
5085 * version.c: Record whether unwind support is compiled in.
5086 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
5087 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
5089 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
5090 complication to generate unwind information for syscall wrappers.
5091 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5092 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5093 __cleanup_fct_attribute.
5095 * Makefile: Add rules to build and run tst-cleanup0.
5096 * tst-cleanup0.c: New file.
5097 * tst-cleanup0.expect: New file.
5099 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
5100 caller. Optimize to avoid often unecessary local variable.
5102 2003-04-11 Roland McGrath <roland@redhat.com>
5104 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
5105 sets variable `multidir'; include that.
5106 (generated): Add it.
5107 ($(objpfx)$(multidir)/crti.o): New target.
5108 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
5110 2003-04-11 Ulrich Drepper <drepper@redhat.com>
5112 * tst-attr2.c (do_test): Add cast to avoid warning.
5113 * tst-mutex4.c (do_test): Likewise.
5115 2003-04-10 Ulrich Drepper <drepper@redhat.com>
5117 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
5120 2003-04-09 Ulrich Drepper <drepper@redhat.com>
5122 * Makefile (tests): Add tst-detach1.
5123 * tst-detach1.c: New file.
5125 2003-04-08 Ulrich Drepper <drepper@redhat.com>
5127 * sysdeps/pthread/pthread.h: Remove duplicate
5128 pthread_cleanup_{push,pop} definitions.
5130 * tst-barrier2.c: Eliminate warnings.
5131 * tst-cancel4.c: Likewise.
5132 * tst-cond4.c: Likewise.
5133 * tst-cond6.c: Likewise.
5134 * tst-detach1.c: Likewise.
5135 * tst-rwlock4.c: Likewise.
5136 * tst-rwlock6.c: Likewise.
5137 * tst-rwlock7.c: Likewise.
5138 * tst-sem3.c: Likewise.
5139 * tst-spin2.c: Likewise.
5140 * tst-umask1.c: Likewise.
5142 2003-04-07 Ulrich Drepper <drepper@redhat.com>
5144 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
5146 2003-04-06 Ulrich Drepper <drepper@redhat.com>
5148 * descr.h (struct pthread): Move cancelhandling member to the front.
5150 2003-04-05 Ulrich Drepper <drepper@redhat.com>
5152 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
5153 malloc_parent, and malloc_child statically.
5154 (__register_atfork_malloc): New function.
5155 (free_mem): Don't free any of the malloc_* variables on the list.
5156 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
5157 Define HAVE_register_atfork_malloc.
5159 2003-04-04 Ulrich Drepper <drepper@redhat.com>
5161 * sysdeps/pthread/createthread.c (create_thread): Add some more
5162 comments explaining when to set multiple_threads and when not.
5164 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5165 THREAD_ATOMIC_BIT_SET if not already defined.
5166 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5167 THREAD_ATOMIC_BIT_SET:
5168 * sysdeps/x86_64/tls.h: Likewise.
5169 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
5170 THREAD_ATOMIC_CMPXCHG_VAL.
5171 (_pthread_cleanup_pop_restore): Likewise.
5172 * cancellation.c (__pthread_enable_asynccancel): Likewise.
5173 (__pthread_enable_asynccancel_2): Likewise.
5174 (__pthread_disable_asynccancel): Likewise.
5175 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5176 (__libc_disable_asynccancel): Likewise.
5177 * init.c (sigcancel_handler): Likewise.
5178 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
5179 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
5181 2003-04-03 Ulrich Drepper <drepper@redhat.com>
5183 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
5184 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5185 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
5186 * Makefile (tests): Add tst-cancel11.
5187 * tst-cancel11.c: New file.
5189 2003-04-01 Ulrich Drepper <drepper@redhat.com>
5191 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
5192 round, not the first. Use specific_used flag instead of local
5193 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
5194 (__free_tcb): Don't call deallocate_tsd here.
5195 (start_thread): Call deallocate_tsd here.
5196 * pthread_setspecific.c: Set specific_used flag really only when
5198 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
5199 * tst-tsd3.c: New file.
5200 * tst-tsd4.c: New file.
5202 2003-03-31 Ulrich Drepper <drepper@redhat.com>
5204 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
5205 Use atomic_exchange_and_add instead of __lll_add.
5206 (__lll_mutex_timedlock): Likewise.
5207 Patch by Ian Wienand.
5209 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
5211 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5212 (SINGLE_THREAD_P): Fix typo.
5213 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
5215 2003-03-31 Ulrich Drepper <drepper@redhat.com>
5217 * Makefile (tests): Add tst-align.
5218 * tst-align.c: New file.
5219 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
5221 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
5224 * tst-tsd2.c: Add casts to avoid warnings.
5226 2003-03-30 Ulrich Drepper <drepper@redhat.com>
5228 * descr.h (struct pthread): Move most often used elements to the front.
5230 2003-03-29 Ulrich Drepper <drepper@redhat.com>
5232 * Makefile (libpthread-routines): Add pthread_atfork.
5233 (libpthread-static-only-routines): Add pthread_atfork.
5235 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5237 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
5239 (INSTALL_DTV): Add parens.
5240 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
5241 Use passed descr instead of THREAD_SELF.
5242 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
5243 (__lll_mutex_timedlock_wait): Correct expected value after
5245 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
5246 Release lock before waking up the waiters.
5247 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
5248 criteria. Reorderstruct passed to cleanup handler. Fix
5249 handling of cancellation and failung pthread_mutex_unlock call.
5250 Use __pthread_enable_asynccancel_2 instead of
5251 __pthread_enable_asynccancel.
5252 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5253 Return result of lock re-get if it fails.
5254 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
5255 for __pthread_cleanup_push.
5256 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
5257 completely broken rwlock implementation.
5258 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5259 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5260 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5261 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5262 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5263 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
5264 versioned_symbol macro.
5265 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
5266 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5268 2003-03-27 Ulrich Drepper <drepper@redhat.com>
5270 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
5271 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
5273 (struct timer): Remove th and bar field.
5274 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
5275 debugging code. Create only one helper thread.
5276 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
5278 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5279 Renamed. Define statically. Use thread info from siginfo.
5280 (__helper_once): New variable.
5281 (__helper_tid): New variable.
5282 (__reset_helper_control): New function.
5283 (__start_helper_thread): New function.
5285 * pthread_create.c (start_thread): Don't use setjmp inside
5286 __builtin_expect to work around gcc bug.
5288 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
5289 timer_delete syscall fails, but not with ENOSYS, set
5292 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
5293 (timer_settime): Fix typo.
5294 * sysdeps/unix/sysv/linux/timer_getoverr.c
5295 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5297 2003-03-27 Jakub Jelinek <jakub@redhat.com>
5299 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5300 offset of cleanupbuf.__prev.
5302 2003-03-26 Jakub Jelinek <jakub@redhat.com>
5304 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5307 2003-03-26 Ulrich Drepper <drepper@redhat.com>
5309 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5310 NULL provide default definition to syscall.
5312 2003-03-25 Roland McGrath <roland@redhat.com>
5314 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5315 (timer_id2ptr): Fix typo.
5317 2003-03-25 Ulrich Drepper <drepper@redhat.com>
5319 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5320 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5321 * sysdeps/ia64/pthreaddef.h: Likewise.
5322 * sysdeps/powerpc/pthreaddef.h: Likewise.
5323 * sysdeps/s390/pthreaddef.h: Likewise.
5324 * sysdeps/sh/pthreaddef.h: Likewise.
5325 * sysdeps/x86_64/pthreaddef.h: Likewise.
5326 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5327 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5329 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5330 SIGTIMER is not unblocked.
5331 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5333 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5335 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5336 pass pointer through as ID.
5337 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5338 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5339 * sysdeps/unix/sysv/linux/timer_create.c: New file.
5340 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5341 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5342 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5343 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5344 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5345 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5346 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5347 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5348 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5349 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5350 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5351 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5352 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5353 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5354 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5355 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5356 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5357 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5358 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5359 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5360 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5361 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5362 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5363 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5364 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5365 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5366 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5367 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5368 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5369 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5371 * pthreadP.h: Remove FRAME_LEFT definition.
5372 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5373 already left frame. Programs which have this problem are not POSIX
5375 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5377 2003-03-24 Ulrich Drepper <drepper@redhat.com>
5379 * sysdeps/pthread/tst-timer.c: Check return values of the
5382 2003-03-23 Roland McGrath <roland@redhat.com>
5384 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5385 * tst-tls3mod.c: Likewise.
5386 * tst-tls1.c: Likewise.
5387 * tst-tls2.c: Likewise.
5389 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5392 * tst-join5.c (tf1, tf2): Add a cast.
5394 * Makeconfig (includes): Append -I$(..)nptl to this variable.
5396 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5397 Don't test anything.
5398 * tst-cond4.c: Likewise.
5399 * tst-cond6.c: Likewise.
5400 * tst-flock2.c: Likewise.
5401 * tst-mutex4.c: Likewise.
5402 * tst-rwlock4.c: Likewise.
5403 * tst-signal1.c: Likewise.
5404 * tst-spin2.c: Likewise.
5405 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5407 * tst-mutex4.c: Use test-skeleton.c.
5408 * tst-spin2.c: Likewise.
5409 * tst-sysconf.c: Likewise.
5410 * tst-barrier2.c: Likewise.
5411 * tst-cond4.c: Likewise.
5412 * tst-cond6.c: Likewise.
5413 * tst-rwlock4.c: Likewise.
5414 * tst-unload.c: Likewise.
5415 * tst-flock2.c (do_test): Use return instead of exit.
5417 2003-03-22 Jakub Jelinek <jakub@redhat.com>
5419 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5421 2003-03-21 Ulrich Drepper <drepper@redhat.com>
5423 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5424 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5425 instead of __lll_compare_and_swap.
5426 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5428 Removed definition if __lll_compare_and_swap.
5430 * cancellation.c: Adjust for new form of compare&exchange macros.
5431 * cleanup_defer.c: Likewise.
5433 * libc-cancellation.c: Likewise.
5434 * old_pthread_cond_broadcast.c: Likewise.
5435 * old_pthread_cond_signal.c: Likewise.
5436 * old_pthread_cond_timedwait.c: Likewise.
5437 * old_pthread_cond_wait.c: Likewise.
5438 * pthread_cancel.c: Likewise.
5439 * pthread_create.c: Likewise.
5440 * pthread_detach.c: Likewise.
5441 * pthread_join.c: Likewise.
5442 * pthread_key_delete.c: Likewise.
5443 * pthread_setcancelstate.c: Likewise.
5444 * pthread_setcanceltype.c: Likewise.
5445 * pthread_timedjoin.c: Likewise.
5446 * pthread_tryjoin.c: Likewise.
5447 * sysdeps/pthread/createthread.c: Likewise.
5449 2003-03-20 Ulrich Drepper <drepper@redhat.com>
5451 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5452 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5453 definitions. Replace uses with calls to atomic_* functions.
5454 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5455 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5456 __lll_test_and_set calls with atomic_exchange_and_add and
5457 atomic_exchange calls respectively.
5458 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5459 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5460 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5461 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5462 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5463 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5464 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5466 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5467 returns the old value.
5469 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
5471 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5472 int for variable OLDVAL and correct inline assembler contraint.
5473 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5474 type int for variable OLD.
5476 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5478 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5479 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5480 instead of multiple_threads field in the TCB.
5482 2003-03-19 Ulrich Drepper <drepper@redhat.com>
5484 * sysdeps/i386/i686/bits/atomic.h: Removed.
5485 * sysdeps/i386/i586/bits/atomic.h: Removed.
5486 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
5487 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
5488 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
5489 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
5490 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
5491 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
5492 * atomic.h: Removed. Moved to glibc.
5494 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5495 support for clock selection.
5497 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5500 2003-03-18 Roland McGrath <roland@redhat.com>
5502 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5503 Add __lll_rel_instr first. Add memory clobber.
5504 (lll_mutex_unlock): Use __lll_test_and_set.
5505 From Paul Mackerras <paulus@samba.org>.
5507 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5509 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5510 (SINGLE_THREAD_P): Add `header.' prefix.
5511 From Paul Mackerras <paulus@samba.org>.
5513 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5514 pthread_timedjoin_np to ...
5515 (libpthread: GLIBC_2.3.3): ... here.
5516 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5518 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5519 Avoid shadowing VAL variable.
5521 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5524 2003-03-18 Ulrich Drepper <drepper@redhat.com>
5526 * Makefile (tests): Add tst-cond11.
5527 * tst-cond11.c: New file.
5529 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5530 struct passed to cleanup handler to eliminate one more
5532 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5534 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5535 (pthrad_cond_t): Replace __unused field with __clock.
5537 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5538 waken all waiters in cleanup handler.
5539 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5540 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5542 * pthread_condattr_getclock.c: New file.
5543 * pthread_condattr_setclock.c: New file.
5544 * sysdeps/pthread/pthread.h: Declare these new functions.
5545 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5546 * Makefile (libpthread-routines): Add the new functions.
5547 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5548 Renamed field to value. Document use of the bits.
5549 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5551 * pthread_condattr_setpshared.c: Likewise.
5552 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5553 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5554 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5556 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5557 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5558 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5559 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5560 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5561 Implement clock selection.
5562 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5563 * pthread-errnos.sym: Add ENOSYS.
5564 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5565 _POSIX_CLOCK_SELECTION.
5566 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5568 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5569 invalid .size directive.
5571 2003-03-17 Roland McGrath <roland@redhat.com>
5573 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5576 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5578 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5579 Use __lll_add instead of spelling it out. Use protected symbol names.
5580 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5582 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5583 Renamed from lll_compare_and_swap. Use new name where necessary.
5584 (__lll_add): Defined.
5585 (__lll_dec_if_positive): Defined.
5586 (__lll_test_and_set): Defined.
5587 * sysdeps/ia64/pthread_spin_init.c: Removed.
5588 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5589 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5590 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5591 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5592 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5593 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5594 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5595 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5596 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5597 __sync_lock_release_si.
5598 Patch by Jakub Jelinek.
5600 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5601 Fix timeout handling.
5602 (__lll_timedwait_tid): Likewise.
5603 (lll_unlock_wake_cb): Wake up other waiters if necessary.
5604 Patch by Jakub Jelinek.
5606 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5608 2003-03-17 Roland McGrath <roland@redhat.com>
5610 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5611 * sysdeps/pthread/pthread_spin_init.c: New file.
5612 * sysdeps/pthread/pthread_spin_unlock.c: New file.
5613 * sysdeps/powerpc/Makefile: New file.
5614 * sysdeps/powerpc/pthread_spin_lock.c: New file.
5615 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5616 * sysdeps/powerpc/pthreaddef.h: New file.
5617 * sysdeps/powerpc/tcb-offsets.sym: New file.
5618 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5619 * sysdeps/powerpc/tls.h: New file.
5620 * sysdeps/powerpc/bits/atomic.h: New file.
5621 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5622 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5623 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5625 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5626 * sysdeps/unix/sysv/linux/sem_post.c: New file.
5627 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5628 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5629 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5630 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5631 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5632 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5633 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5634 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5635 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5636 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5637 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5638 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5639 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5641 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5643 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5644 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5645 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5646 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5647 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5649 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5651 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5652 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5653 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5654 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5655 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5657 2003-03-16 Roland McGrath <roland@redhat.com>
5659 * tst-fork4.c: Include <string.h>.
5660 * tst-signal2.c: Likewise.
5661 * tst-mutex5.c (do_test): exit -> return.
5662 * tst-mutex2.c: Include <stdlib.h>.
5664 2003-03-16 Ulrich Drepper <drepper@redhat.com>
5666 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5667 (__lll_mutex_timedlock_wait): Correct expected value after
5668 spurious wakeup. Otherwise we would never wait again.
5670 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5671 zone versus inline asm stupidity. Use correct instructions.
5673 * tst-rwlock6.c: Add some more status output.
5675 2003-03-15 Roland McGrath <roland@redhat.com>
5677 * sysdeps/pthread/configure.in: New file.
5678 * sysdeps/pthread/configure: New file (generated).
5680 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5682 * allocatestack.c (allocate_stack): Store the exact stack size of
5683 user allocated stacks.
5685 2003-03-15 Jakub Jelinek <jakub@redhat.com>
5687 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5688 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5689 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5690 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5691 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5692 Use `header.' prefix.
5693 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5695 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5697 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5698 __builtin_frame_address, use stack pointer.
5700 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5701 instead of __builtin_frame_pointer.
5703 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5705 * tst-basic1.c (do_test): Add cast to avoid warning.
5706 * tst-basic2.c (do_test): Likewise.
5708 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5709 amount of stack correction.
5711 * tst-fork4.c: Use test-skeleton.c.
5713 2003-03-14 Roland McGrath <roland@redhat.com>
5715 * init.c: Fix typo "#eli" for "#else".
5717 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
5719 * allocatestack.c (__stack_user): Use hidden_data_def.
5720 * pthread_create.c (__pthread_keys): Likewise.
5722 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5724 2003-03-14 Roland McGrath <roland@redhat.com>
5726 * tst-fork4.c: New file.
5727 * Makefile (tests): Add it.
5729 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
5730 we always define the padding space.
5731 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
5732 stopped supporting its own extensions fully.
5733 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
5734 struct also called `header', so `header.multiple_threads' is the field
5735 name to use on all machines.
5736 * allocatestack.c (allocate_stack): Use `header.' prefix.
5737 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5738 * pthread_create.c (__pthread_create_2_1): Likewise.
5739 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
5740 (THREAD_SELF): Likewise.
5741 * sysdeps/x86_64/tls.h: Likewise.
5742 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5743 (SINGLE_THREAD_P): Likewise.
5744 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5745 (SINGLE_THREAD_P): Likewise.
5746 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5747 (SINGLE_THREAD_P): Likewise.
5749 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
5752 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5754 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
5755 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
5757 * pthread_create.c (start_thread): setjmp is expected to return 0.
5759 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
5760 (THREAD_GETMEM_NC): Likewise.
5762 2003-03-13 Ulrich Drepper <drepper@redhat.com>
5764 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
5765 and the size of the stack which must be allocated is a multiple,
5766 allocate one more page.
5767 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
5768 MULTI_PAGE_ALIASING.
5770 2003-03-13 Roland McGrath <roland@redhat.com>
5772 * pthread_create.c (start_thread): Set EXITING_BIT after the
5773 event-reporting (and destructors), not before.
5775 2003-03-13 Jakub Jelinek <jakub@redhat.com>
5777 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
5778 lll_futex_wake): Declare register variables as long int instead of
5779 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
5780 Make syscall arguments clobbered by the syscall.
5781 (lll_futex_wait): Define using lll_futex_timed_wait.
5783 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
5786 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
5789 * allocatestack.c (nptl_ncreated): Only declare if
5790 COLORING_INCREMENT != 0.
5792 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
5793 (__libc_enable_asynccancel_2): Remove prototype.
5795 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
5796 ctid to match kernel.
5798 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5800 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
5801 libc_multiple_threads.
5802 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
5803 __libc_multiple_threads to...
5804 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
5806 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
5808 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5809 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5811 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
5812 (__pthread_once_internal): Define.
5814 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
5815 macros instead of .symver directly.
5816 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5817 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5819 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
5820 * sysdeps/x86_64/tcb-offsets.sym: New file.
5821 * sysdeps/x86_64/Makefile: New file.
5823 * sysdeps/i386/tcb-offsets.sym: Add SELF.
5824 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5825 to access own pthread_t in TCB.
5826 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5828 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5830 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5832 2003-03-12 Roland McGrath <roland@redhat.com>
5834 * pthread-errnos.sym: New file.
5835 * Makefile (gen-as-const-headers): New variable, list that file.
5836 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5837 header <pthread-errnos.h> instead of defining errno values here.
5838 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5839 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5840 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5841 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5842 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5844 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5846 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5847 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5848 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5849 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5850 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5851 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5852 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5853 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5854 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5855 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5856 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5857 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5858 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5859 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5860 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5861 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5862 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5863 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5864 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5865 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5866 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5867 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5868 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5869 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5870 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5871 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5872 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5874 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5875 CLONE_CHILD_SETTID worked.
5877 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5879 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5881 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5884 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5885 (pthread_cond_t): Add padding.
5887 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5888 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5889 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5891 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5892 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5893 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5894 (__pthread_rwlock_timedrdlock): Likewise.
5895 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5896 (__pthread_rwlock_wrlock): Likewise.
5897 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5898 (__pthread_rwlock_rdlock): Likewise.
5900 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5902 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5903 result of lock re-get if it fails.
5905 2003-03-11 Ulrich Drepper <drepper@redhat.com>
5907 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5908 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5909 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5910 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5911 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5912 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5913 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5914 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5915 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5916 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5918 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5919 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5921 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5922 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5923 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5924 (create_thread): Likewise.
5925 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5926 * init.c (__pthread_initialize_minimal_internal): Initialize
5927 __libc_multiple_threads_ptr if necessary.
5928 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
5929 __pthread_multiple_threads and __libc_multiple_threads_ptr.
5930 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5931 __libc_multiple_threads.
5932 (__libc_pthread_init): Return pointer to __libc_pthread_init if
5935 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5936 (THREAD_SETMEM_NC): Likewise.
5938 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5939 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5940 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5941 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5943 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5944 Eliminate one entire instruction.
5946 * cancellation.c (__pthread_enable_asynccancel_2): New function.
5947 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5948 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5949 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5950 instead of __pthread_enable_asynccancel.
5951 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5952 (__pthread_cond_wait): Likewise.
5953 * sysdeps/pthread/pthread_cond_timedwait.c
5954 (__pthread_cond_timedwait): Likewise.
5955 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5957 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5958 (__condvar_cleanup): Wake up all waiters in case we got signaled
5959 after being woken up but before disabling asynchronous
5961 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5962 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5963 (__condvar_cleanup): Likewise.
5965 * init.c (__NR_set_tid_address): If already defined, don't redefine.
5966 Make it an error if architecture has no #if case. Add x86-64.
5968 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
5969 pt-initfini.s generation.
5971 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
5972 (TLS_INIT_TP): Fix typo.
5974 2003-03-11 Jakub Jelinek <jakub@redhat.com>
5976 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
5977 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
5979 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
5980 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5981 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
5982 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
5983 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
5984 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5985 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5986 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5988 2003-03-11 Ulrich Drepper <drepper@redhat.com>
5990 * sysdeps/pthread/pthread_cond_timedwait.c
5991 (__pthread_cond_timedwait): Return the result of the final
5992 locking. If it succeeds, the regular function return value.
5994 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
5995 Return result of the final locking.
5996 * version.c (__nptl_main): Work around problems with the strange
5997 INTERNAL_SYSCALL macro on ppc32.
5998 * init.c (__pthread_initialize_minimal_internal): Unblock
5999 SIGCANCEL in case the parent blocked it.
6000 Reported by Paul Mackerras <paulus@samba.org>.
6002 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
6003 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
6004 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
6006 2003-03-11 Jakub Jelinek <jakub@redhat.com>
6008 * sysdeps/pthread/pthread_cond_timedwait.c
6009 (__pthread_cond_timedwait): Unlock and fail if
6010 __pthread_mutex_unlock_internal failed.
6012 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
6013 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
6015 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
6016 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
6017 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
6018 ALLOCATE_STACK): New macros.
6019 (TLS_TPADJ): New macro.
6020 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
6021 (allocate_stack): Handle TLS_DTV_AT_TP and
6022 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
6023 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
6025 * init.c [__ia64__] (__NR_set_tid_address): Define.
6027 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
6028 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
6029 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
6030 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
6031 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
6032 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
6033 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
6034 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
6035 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
6036 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
6037 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
6038 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
6039 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
6040 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
6041 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
6042 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
6043 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
6044 * sysdeps/ia64/bits/atomic.h: New file.
6045 * sysdeps/ia64/Makefile: New file.
6046 * sysdeps/ia64/pthread_spin_init.c: New file.
6047 * sysdeps/ia64/pthread_spin_lock.c: New file.
6048 * sysdeps/ia64/pthread_spin_trylock.c: New file.
6049 * sysdeps/ia64/pthread_spin_unlock.c: New file.
6050 * sysdeps/ia64/pthreaddef.h: New file.
6051 * sysdeps/ia64/tcb-offsets.sym: New file.
6052 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
6053 * sysdeps/ia64/tls.h: New file.
6055 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
6056 to syscall instead of no arguments.
6058 2003-03-10 Ulrich Drepper <drepper@redhat.com>
6060 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
6061 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
6062 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
6063 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
6065 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
6068 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
6070 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6071 lowlevelbarrier.sym.
6072 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
6073 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
6074 Include lowlevelbarrier.h and don't define offsets locally.
6075 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
6077 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
6078 (__lll_mutex_lock_wait): Reverse order of first two parameters.
6079 (__lll_mutex_timedlock_wait): Likewise.
6080 (lll_mutex_lock): Adjust asm for that.
6081 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
6082 (lll_lock): Adjust asm for operand order change.
6083 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
6084 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
6086 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
6087 Reverse order of parameters.
6088 (__lll_timedwait_tid): Remove regparms attribute.
6089 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
6090 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
6092 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6093 (__lll_timedwait_tid): Remove one unnecessary instruction.
6095 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
6096 __lll_mutex_timedlock_wait only for NOT_IN_libc.
6097 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
6100 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
6101 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
6103 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
6106 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
6107 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
6109 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
6110 define LOCK here (if UP is not defined). The actual code is in
6113 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
6114 LOCK is already defined. Don't define lll_unlock_wake_cb and
6115 __lll_timedwait_tid for libc.so.
6116 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
6117 define LOCK here (if UP is not defined). The actual code is in
6120 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
6121 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
6122 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
6123 instead of lowlevelsem.h.
6124 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6125 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6126 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6128 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6130 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
6131 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
6132 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
6134 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
6136 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
6139 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
6141 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
6142 of __libc_locking_needed.
6143 (lll_trylock): Initialize %eax to zero.
6145 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
6146 pthread_cond_t definition.
6148 2003-03-10 Roland McGrath <roland@redhat.com>
6150 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
6151 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
6152 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
6153 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
6154 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
6156 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
6157 Instead of setting PD->multiple_threads, set globals
6158 __pthread_multiple_threads and __libc_multiple_threads.
6159 * sysdeps/pthread/createthread.c (create_thread): Likewise.
6160 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
6161 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
6163 * descr.h (struct pthread): Conditionalize first member on
6164 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
6165 containing an anonymous tcbhead_t. Move `list' member out.
6166 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
6167 * allocatestack.c: Remove use of `header.data.' prefix.
6168 * pthread_create.c: Likewise.
6169 * init.c (__pthread_initialize_minimal_internal): Likewise.
6170 * sysdeps/pthread/createthread.c (create_thread): Likewise.
6171 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
6172 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
6173 * sysdeps/x86_64/tls.h: Likewise.
6174 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6175 (SINGLE_THREAD_P): Likewise.
6176 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6177 (SINGLE_THREAD_P): Likewise.
6178 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
6179 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
6181 2003-03-09 Ulrich Drepper <drepper@redhat.com>
6183 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
6185 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
6186 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6188 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
6189 leftovers from the ia32 code.
6191 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
6193 (clear_once_control): Don't load %esi.
6195 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
6198 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6200 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
6201 * sysdeps/unix/sysv/linux/createthread.c: ...here.
6203 * Makefile (tests): Add tst-cond10.
6204 * tst-cond10.c: New file.
6206 2003-03-08 Ulrich Drepper <drepper@redhat.com>
6208 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
6209 * tst-signal3.c (do_test): Likewise.
6210 * tst-sem5.c (do_test): Likewise.
6211 * tst-kill6.c (do_test): Likewise.
6212 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
6214 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
6216 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6217 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
6218 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6219 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6220 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6221 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6222 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6224 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6226 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6228 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6229 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6230 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6231 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6232 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6233 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6235 * allocatestack.c (allocate_stack): If mprotect() fails free the
6238 2003-03-07 Ulrich Drepper <drepper@redhat.com>
6240 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
6242 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
6243 lll_wake_tid. This was used only to work around kernel limits in
6245 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
6246 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
6247 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6248 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
6250 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
6251 (__pthread_initialize_minimal_internal): Change initialization of
6252 __static_tls_align_m1 appropriately.
6253 * pthreadP.h (__static_tls_align_m1): Renamed from
6255 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
6256 instead of __static_tls_align-1.
6258 2003-03-04 Ulrich Drepper <drepper@redhat.com>
6260 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6262 * pthread_create.c: Define __pthread_keys using nocommon
6263 attribute, not by placing it explicitly in bss.
6264 Remove DEFINE_DEALLOC definition. Not needed anymore.
6266 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
6267 Use it in mmap call to allocate stacks.
6269 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
6271 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
6272 result of the thread function.
6274 2003-03-03 Ulrich Drepper <drepper@redhat.com>
6276 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
6277 version is just fine.
6279 * sysdeps/unix/sysv/linux/libc_pthread_init.c
6280 (__pthread_child_handler): Renamed from pthread_child_handler,
6281 exported, and marked hidden. Change all users.
6282 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
6283 free __pthread_child_handler from child list.
6285 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
6287 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
6289 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6290 Fix handling of cancellation and failing pthread_mutex_unlock call.
6291 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6292 (__pthread_cond_wait): Likewise.
6294 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6295 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
6296 lll_futex_timed_wait call.
6297 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6298 (pthread_rwlock_timedwrlock): Likewise.
6300 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6301 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6302 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6304 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6305 check of lll_futex_wake return value.
6307 2003-03-03 Roland McGrath <roland@redhat.com>
6309 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6311 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6312 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6313 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6315 2003-03-02 Ulrich Drepper <drepper@redhat.com>
6317 * sysdeps/pthread/timer_create.c (timer_create): Return correct
6318 error for CPU clocks.
6320 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6321 _POSIX_MONOTONIC_CLOCK.
6322 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6324 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6327 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6329 * descr.h (struct pthread): Move cleanup field to the front.
6331 2003-03-01 Roland McGrath <roland@redhat.com>
6333 * sem_open.c (sem_open): Braino fix.
6335 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6337 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6339 __pthread_cleanup_pop functionality.
6340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6342 * descr.h (struct pthread): Move tid field to the front now that
6345 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6346 (__lll_mutex_timedlock_wait): Remove.
6347 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6348 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6349 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6350 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6351 (lll_unlock_wake_cb): Don't save and restore %esi.
6352 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6354 (__lll_timedwait_tid): Add alignment.
6355 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6356 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6358 (__lll_timedwait_tid): Removed.
6359 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6360 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6361 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6362 (pthread_barrier_wait): Don't save, load, and restore %esi for
6364 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6365 (__pthread_cond_signal): Don't save, load, and restore %esi.
6366 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6367 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6368 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6369 Don't save, load, and restore %esi.
6371 2003-02-27 Ulrich Drepper <drepper@redhat.com>
6373 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6374 Release lock before waking up the waiters.
6376 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6378 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6379 (reader_thread): Likewise.
6381 * sysdeps/pthread/pthread_rwlock_unlock.c
6382 (__pthread_rwlock_unlock): Release internal lock early. Don't try
6383 to wake up readers if there are none.
6385 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6386 Release internal lock before wake threads.
6388 2003-02-26 Ulrich Drepper <drepper@redhat.com>
6390 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6391 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
6393 * tst-rwlock9.c: Likewise.
6394 * tst-rwlock10.c: New file.
6395 * tst-rwlock11.c: New file.
6397 * Makefile (tests): Add tst-dlsym1.
6398 * tst-dlsym1.c: New file.
6400 * init.c (__pthread_initialize_minimal_internal): Set
6401 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6402 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6404 2003-02-24 Ulrich Drepper <drepper@redhat.com>
6406 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6408 * tst-cond2.c: Fix sychronization with child.
6410 * tst-rwlock8.c (reader_thread): Remove unused variable.
6412 * Makefile: Add rules to build and run tst-tls3.
6413 * tst-tls3.c: New file.
6414 * tst-tls3mod.c: New file.
6416 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6417 * tst-rwlock8.c: New file.
6418 * tst-rwlock9.c: New file.
6419 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6420 complete broken rwlock implementation.
6421 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6423 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6425 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6426 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6427 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6428 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6429 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6430 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6431 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6433 2003-02-23 Roland McGrath <roland@redhat.com>
6435 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6437 2003-02-23 Ulrich Drepper <drepper@redhat.com>
6439 * Makefile (tests): Add tst-context1.
6440 * tst-context1.c: New file.
6442 * Makefile (tests): Add tst-tls1 and tst-tls2.
6443 * tst-tls1.c: New file.
6444 * tst-tls2.c: New file.
6446 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6449 * pthread_create.c (start_thread): Set EXITING_BIT early.
6451 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6452 (THREAD_GETMEM_NC): Likewise.
6454 2003-02-22 Ulrich Drepper <drepper@redhat.com>
6456 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6457 off 3 more bytes by using offset-less instructions when possible.
6459 * Makefile: Add dependency for $(objpfx)version.d.
6461 * eintr.c (eintr_source): Add unnecessary return but the compiler
6464 * tst-kill3.c: Include <unistd.h>.
6466 2003-02-21 Roland McGrath <roland@redhat.com>
6468 * pthread_create.c (start_thread): Call __libc_thread_freeres.
6470 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6472 * Makefile (tests): Add tst-eintr1.
6473 (distribute): Add eintr.c.
6474 * tst-eintr1.c: New file.
6475 * eintr.c: New file.
6477 * pthread_cancel.c (pthread_cancel): Use tkill directly.
6479 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6480 Disallow sending SIGCANCEL.
6482 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
6483 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6484 * tst-kill1.c: New file.
6485 * tst-kill2.c: New file.
6486 * tst-kill3.c: New file.
6487 * tst-kill5.c: New file.
6488 * tst-kill6.c: New file.
6489 * tst-basic7.c: Renamed to...
6490 * tst-kill4.c: ...this.
6492 2003-02-21 Roland McGrath <roland@redhat.com>
6494 * Makefile (install-lib-ldscripts): New variable.
6496 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6498 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6499 * pthread_cancel.c: Use INVALID_TD_P.
6500 * pthread_detach.c: Likewise.
6501 * pthread_getschedparam.c: Likewise.
6502 * pthread_setschedparam.c: Likewise.
6503 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6504 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6505 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6506 * pthread_timedjoin.c: Likewise.
6508 * tst-basic7.c: Include <signal.h>.
6510 * pthread_join.c (pthread_join): Limited checking for invalid
6512 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6514 2003-02-20 Ulrich Drepper <drepper@redhat.com>
6516 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6517 beginning of the loop. Clear the entire first block of TSD.
6518 * Makefile (tests): Add tst-key4.
6519 * tst-key4.c: New file.
6521 2003-02-18 Ulrich Drepper <drepper@redhat.com>
6523 * Makefile (tests): Add tst-basic7.
6524 * tst-basic7.c: New file.
6526 * pthread_create.c (deallocate_tsd): Mark as internal_function.
6527 Add some more __builtin_expect.
6529 * pthreadP.h: Define dummy version of DEBUGGING_P.
6531 2003-02-17 Ulrich Drepper <drepper@redhat.com>
6533 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6534 _POSIX_THREAD_PRIORITY_SCHEDULING.
6535 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6536 _XOPEN_REALTIME_THREADS.
6537 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6539 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6540 kernel returns EINVAL for PID <= 0, work around it.
6542 * Makefile (tests): Add tst-signal5.
6543 * tst-signal5.c: New file.
6545 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6548 * tst-cancel1.c (tf): Block all signals.
6550 * Makefile (tests): Add tst-basic6.
6551 * tst-basic6.c: New file.
6553 * tst-basic1.c: Add test for process ID.
6555 * Makefile (tests): Add tst-cancel10.
6556 * tst-cancel10.c: New file.
6558 * Makefile (tests): Add tst-signal4.
6559 * tst-signal4.c: New file.
6561 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6562 __sigismember instead of sigismember. Add __builtin_expect.
6564 2003-02-16 Ulrich Drepper <drepper@redhat.com>
6566 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6567 pthread_setcancelstate, and pthread_rwlock_setpshared.
6569 * tst-cancel7.c (do_test): Make sure the pid file exists before
6570 canceling the thread.
6572 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6573 pthread_rwlock_timedrdlock tests.
6574 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6575 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6576 Check for invalid tv_nsec field.
6577 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6580 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6581 recursive mutex of overflow.
6583 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6585 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6586 going into an endless loop.
6587 * Makefile (tests): Add tst-cancel9.
6588 * tst-cancel9.c: New file.
6590 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6592 2003-02-15 Ulrich Drepper <drepper@redhat.com>
6594 * tst-mutex5.c (do_test): Add more timedlock tests.
6596 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6597 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6599 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6600 use INLINE_SYSCALL. Error number is returned, not -1.
6602 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6603 and __deallocate_stack with internal_function.
6604 * pthread_create.c: Adjust definitions appropriately.
6605 * allocatestack.c: Likewise.
6607 * pthread_join.c: Add one more __builtin_expect.
6608 * pthread_timedjoin.c: Likewise.
6610 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6611 not data of sequence number does not match.
6612 Add one __builtin_expect.
6614 * Makefile (tests): Add tst-clock1.
6615 * tst-clock1.c: New file.
6617 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6619 * Makefile (tests): Add tst-basic5.
6620 * tst-basic5.c: New file.
6622 2003-02-14 Ulrich Drepper <drepper@redhat.com>
6624 * Makefile (tests): Add tst-basic4.
6625 * tst-basic4.c: New file.
6627 * pthreadP.h: Add declaraction for __nptl_nthreads.
6628 * pthread_create.c: Define __nptl_nthreads
6629 (start_thread): Increment __nptl_nthreads at beginning. Decrement
6630 after thread is done. If then zero, call exit(0).
6631 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6632 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
6633 * init.c (pthread_functions): Initialize ptr_nthreads.
6634 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6635 (__reclaim_stacks): Decrement __nptl_nthreads.
6636 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6638 * Makefile (tests): Add tst-basic3.
6639 * tst-basic3.c: New file.
6641 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
6642 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
6643 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6644 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
6645 if asynchronous canceling is enabled.
6646 * pthread_join.c (pthread_join): When recognizing circular joins,
6647 take into account the other thread might be already canceled.
6648 * Makefile (tests): Add tst-join5.
6649 * tst-join5.c: New file.
6651 * Makefile (tests): Add tst-join4.
6652 * tst-join4.c: New file.
6654 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6656 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6658 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
6660 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6661 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6662 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6664 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6666 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6667 error if lll_futex_wake failed.
6669 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6671 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6672 handling of cancellation and failung pthread_mutex_unlock call.
6673 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6674 * Makefile (tests): Add tst-cond8 and tst-cond9.
6675 * tst-cond8.c: New file.
6676 * tst-cond9.c: New file.
6678 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6680 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
6681 non-standard initializers with __USE_GNU.
6683 * Makefile (tests): Add tst-cleanup3.
6684 * tst-cleanup3.c: New file.
6686 2003-02-12 Ulrich Drepper <drepper@redhat.com>
6688 * Makefile (tests): Add tst-attr1 and tst-attr2.
6689 * tst-attr1.c: New file.
6690 * tst-attr2.c: New file.
6692 * Makefile: Add rules to build and run tst-atfork2 test.
6693 * tst-atfork2.c: New file.
6694 * tst-atfork2mod.c: New file.
6696 * sysdeps/unix/sysv/linux/unregister-atfork.c
6697 (__unregister_atfork): Free the memory allocated for the handlers
6698 after removing them from the lists.
6700 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6703 * tst-atfork1.c (do_test): Wait for the child we forked.
6704 Report error in child.
6706 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6708 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6710 2003-02-10 Ulrich Drepper <drepper@redhat.com>
6712 * Makefile (tests): Add tst-cancel8.
6713 * tst-cancel8.c: New file.
6715 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6716 clearing of control variable.
6717 * Makefile (tests): Add tst-once3 and tst-once4.
6718 * tst-once3.c: New file.
6719 * tst-once4.c: New file.
6721 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
6723 * sysdeps/sh/Makefile: New file.
6724 * sysdeps/sh/bits/atomic.h: New file.
6725 * sysdeps/sh/pthread_spin_init.c: New file.
6726 * sysdeps/sh/pthread_spin_lock.c: New file.
6727 * sysdeps/sh/pthread_spin_trylock.S: New file.
6728 * sysdeps/sh/pthread_spin_unlock.S: New file.
6729 * sysdeps/sh/pthreaddef.h: New file.
6730 * sysdeps/sh/tcb-offsets.sym: New file.
6731 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
6732 * sysdeps/sh/tls.h: New file.
6733 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
6734 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
6735 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
6736 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
6737 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
6738 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
6739 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
6740 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
6741 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
6742 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
6743 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
6744 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
6745 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
6746 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
6747 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
6748 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
6749 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
6750 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
6751 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
6752 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
6753 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
6754 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
6755 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
6756 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
6757 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
6758 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
6759 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
6760 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
6761 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
6762 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
6764 2003-02-08 Ulrich Drepper <drepper@redhat.com>
6766 * tst-cond2.c: Rearrange code to not rely on behavior undefined
6769 * tst-basic2.c (do_test): Lock mutex before creating the thread.
6771 2003-02-07 Ulrich Drepper <drepper@redhat.com>
6773 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
6774 (TLS_GET_FS): New #define.
6775 (TLS_SET_FS): New #define.
6776 Correct value of __NR_set_thread_area.
6778 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
6780 2003-02-06 Ulrich Drepper <drepper@redhat.com>
6782 * Makefile (tests): Add tst-popen1.
6783 * tst-popen1.c: New file.
6785 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
6786 but inactive generalization.
6787 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6788 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6789 Minor optimization, remove one instruction.
6790 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6792 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
6794 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
6796 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
6798 * init.c (__NR_set_tid_address): Add #ifdef for s390.
6799 * sysdeps/pthread/pthread_barrier_wait.c: New file.
6800 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
6801 * sysdeps/pthread/pthread_cond_signal.c: New file.
6802 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
6803 * sysdeps/pthread/pthread_cond_wait.c: New file.
6804 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
6805 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
6806 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
6807 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
6808 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
6809 * sysdeps/s390/Makefile: New file.
6810 * sysdeps/s390/bits/atomic.h: New file.
6811 * sysdeps/s390/pthread_spin_init.c: New file.
6812 * sysdeps/s390/pthread_spin_lock.c: New file.
6813 * sysdeps/s390/pthread_spin_trylock.c: New file.
6814 * sysdeps/s390/pthread_spin_unlock.c: New file.
6815 * sysdeps/s390/pthreaddef.h: New file.
6816 * sysdeps/s390/tcb-offsets.sym: New file.
6817 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
6818 * sysdeps/s390/tls.h: New file.
6819 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
6820 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6821 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6822 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6823 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6824 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6825 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6826 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6827 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6828 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6829 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6830 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6831 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6832 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6833 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6834 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6835 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6836 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6837 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6838 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6839 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6840 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6841 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6843 2003-02-04 Ulrich Drepper <drepper@redhat.com>
6845 * atomic.h: Add a couple more default implementations.
6846 (atomic_compare_and_exchange_acq): Use
6847 __arch_compare_and_exchange_32_acq in return value definition. It
6849 (atomic_bit_set): Renamed from atomic_set_bit.
6850 Add missing atomic_ prefixes.
6852 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6853 thread library is available, use correct value to mark initialized
6856 2003-02-03 Ulrich Drepper <drepper@redhat.com>
6858 * allocatestack.c (allocate_stack): Use __getpagesize instead of
6859 __sysconf to determine pagesize.
6861 * pthread_create.c: Include <atomic.h>.
6862 * allocatestack.c (allocate_stack): Implement coloring of the
6863 allocated stack memory. Rename pagesize to pagesize_m1. It's the
6864 size minus one. Adjust users.
6865 * sysdeps/i386/i686/Makefile: New file.
6867 2003-02-02 Ulrich Drepper <drepper@redhat.com>
6869 * allocatestack.c: Improve comment throughout the file.
6871 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6872 (__lll_lock_wait): Add branch prediction.
6873 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6874 (__lll_lock_wait): Likewise.
6875 (lll_unlock_wake_cb): Removed.
6877 2003-01-31 Ulrich Drepper <drepper@redhat.com>
6879 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6880 _POSIX_THREAD_PRIORITY_SCHEDULING.
6882 2003-01-30 Jakub Jelinek <jakub@redhat.com>
6884 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6885 Fix return type of ptr___pthread_getspecific.
6887 2003-01-29 Ulrich Drepper <drepper@redhat.com>
6889 * Makefile (tests): Add tst-umask1.
6890 (tst-umask1-ARGS): Define.
6891 * tst-umask1.c: New file.
6893 2003-01-28 Ulrich Drepper <drepper@redhat.com>
6895 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
6896 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6897 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6898 pthread_rwlock_unlock.
6899 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6900 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6901 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6902 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6903 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6905 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6906 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6908 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6909 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6910 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6912 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6913 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6915 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6916 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6917 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6919 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6920 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6922 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6924 * Makefile (libpthread-routines): Remove lowlevelcond and
6925 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6926 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6927 and pthread_cond_broadcast.
6928 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6929 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6930 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6931 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6932 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6933 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6934 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6935 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6936 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6937 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6938 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6939 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6940 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6941 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6942 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6943 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6944 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6945 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6946 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6947 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6948 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6949 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6950 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6951 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6952 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6953 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
6954 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
6955 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
6956 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
6957 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
6958 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
6960 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
6961 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
6962 of the code is moved to ...
6963 * sysdeps/pthread/createthread.c: ...here. New file.
6965 2003-01-27 Ulrich Drepper <drepper@redhat.com>
6967 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
6968 (__new_sem_post): Clear %eax before returning.
6969 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
6971 * Makefile (tests): Add tst-cleanup2.
6972 * tst-cleanup2.c: New file.
6974 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6975 Interpret first parameter correctly.
6977 2003-01-17 Ulrich Drepper <drepper@redhat.com>
6979 * Makefile (headers): Add bits/semaphore.h.
6981 2003-01-16 Jakub Jelinek <jakub@redhat.com>
6983 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
6986 2003-01-14 Ulrich Drepper <drepper@redhat.com>
6988 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
6989 must be used and mapping failed.
6990 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
6992 * Makefile (CFLAGS-pthread_self.os): Define this, not
6993 CFLAGS-pthread_self.c.
6995 2003-01-13 Ulrich Drepper <drepper@redhat.com>
6997 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
7000 * Makefile (libpthread-routines): Add version. Add rules to build
7001 version.os and banner.h.
7002 * version.c: New file.
7004 2003-01-13 Jakub Jelinek <jakub@redhat.com>
7006 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
7007 the alias unconditional.
7008 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
7010 2003-01-13 Ulrich Drepper <drepper@redhat.com>
7012 * Makefile (CFLAGS-pthread_self.c): New definition.
7014 2003-01-06 Jakub Jelinek <jakub@redhat.com>
7016 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
7017 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
7018 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
7019 * init.c (__pthread_initialize_minimal_internal): Likewise.
7021 2003-01-07 Jakub Jelinek <jakub@redhat.com>
7023 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
7025 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7026 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7027 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7028 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7029 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7030 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7032 2003-01-06 Jakub Jelinek <jakub@redhat.com>
7034 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
7035 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
7036 * tst-cancel-wrappers.sh: Remove all exceptions.
7038 2003-01-05 Ulrich Drepper <drepper@redhat.com>
7040 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
7041 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
7043 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
7044 Use __libc_pthread_functions array if SHARED.
7046 * pthreadP.h: Move pthread_cond_2_0_t definition to...
7047 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
7049 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
7050 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
7051 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
7052 __libc_ptf_call instead of __libc_maybe_call.
7054 (__libc_cleanup_region_start): Wrap function name with PTF call.
7055 (__libc_cleanup_region_end): Likewise.
7056 (__libc_cleanup_end): Likewise.
7058 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
7059 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
7060 * pthread_key_create.c: Add __pthread_key_create_internal alias.
7061 * pthreadP.h: Add prototypes.
7063 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
7064 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
7065 __pthread_rwlock_unlock aliases.
7066 * pthreadP.h: Add prototypes for new aliases.
7068 * pthreadP.h (struct pthead_functions): Moved to...
7069 * sysdeps/pthread/pthread-functions.h: ...here. New file.
7070 * init.c (pthread_functions): Add initializers for new elements.
7072 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
7073 __pthread_cleanup_pop_restore aliases.
7074 * pthreadP.h: Add prototypes.
7076 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
7077 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
7078 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
7079 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
7080 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7081 * pthreadP.h: Adjust prototypes and callers.
7083 2003-01-04 Ulrich Drepper <drepper@redhat.com>
7085 * Makefile (tests): Add tst-cancel7.
7086 (tst-cancel7-ARGS): New variable.
7087 * tst-cancel7.c: New file.
7089 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
7090 around gcc defficiencies.
7091 * old_pthread_cond_signal.c: Likewise.
7092 * old_pthread_cond_timedwait.c: Likewise.
7093 * old_pthread_cond_wait.c: Likewise.
7095 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
7097 2003-01-03 Ulrich Drepper <drepper@redhat.com>
7099 * Makefile (tests): Add tst-cond7.
7100 * tst-cond7.c: New file.
7102 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7103 (condvar_cleanup): Get condvar address from the right place.
7105 * atomic.h: Correct definitions of atomic_full_barrier,
7106 atomic_read_barrier, atomic_write_barrier.
7108 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
7110 * old_pthread_cond_signal.c: Likewise.
7111 * old_pthread_cond_timedwait.c: Likewise.
7112 * old_pthread_cond_wait.c: Likewise.
7114 2003-01-03 Jakub Jelinek <jakub@redhat.com>
7116 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
7118 2003-01-03 Ulrich Drepper <drepper@redhat.com>
7120 * pthreadP.h (pthread_cond_2_0_t): New type.
7121 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
7122 Use new type for the 2.0 condvar function prototypes.
7123 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
7124 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
7126 * old_pthread_cond_destroy.c: Likewise.
7127 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
7128 * old_pthread_cond_signal.c: Likewise.
7129 * old_pthread_cond_timedwait.c: Likewise.
7130 * old_pthread_cond_wait.c: Likewise.
7132 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7133 (__pthread_cond_wait): Don't save cancellation mode and seq value
7136 * herrno.c (__h_errno_location): Don't define as weak.
7138 2003-01-02 Jakub Jelinek <jakub@redhat.com>
7140 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
7141 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
7142 and pthread_cond_wait.
7143 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
7145 (__pthread_cond_broadcast_2_0): ... this.
7146 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
7148 (__pthread_cond_destroy_2_0): ... this.
7149 * old_pthread_cond_init.c (__old_pthread_cond_init):
7151 (__pthread_cond_init_2_0): ... this.
7152 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
7154 (__pthread_cond_signal_2_0): ... this.
7155 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
7157 (__pthread_cond_wait_2_0): ... this.
7158 * pthread_cond_destroy.c: Include shlib-compat.h.
7159 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
7160 * pthread_cond_init.c: Include shlib-compat.h.
7161 (pthread_cond_init): Change strong_alias into versioned_symbol.
7162 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
7163 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
7165 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
7166 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
7167 __pthread_cond_wait_2_0): New prototypes.
7168 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
7169 __old_pthread_cond_init, __old_pthread_cond_signal,
7170 __old_pthread_cond_wait): Removed.
7171 * init.c: Include shlib-compat.h.
7172 (pthread_functions): Guard ptr___pthread_attr_init_2_0
7173 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
7174 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
7175 ptr___pthread_cond_*_2_0 fields.
7176 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
7177 pthread_cond_*@GLIBC_2.0 compatibility symbols.
7179 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
7180 LIBC_SIGACTION was not yet defined.
7181 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
7182 [!defined LIBC_SIGACTION] (__sigaction): New function and
7184 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
7185 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
7187 2003-01-02 Jakub Jelinek <jakub@redhat.com>
7189 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
7191 2003-01-02 Ulrich Drepper <drepper@redhat.com>
7193 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7194 New, larger type definition.
7195 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
7197 * Versions [libpthread]: Add definitions for new pthread_cond_*
7198 interfaces for version GLIBC_2.3.2.
7199 * pthread_cond_init.c: Update initialization for new type definition.
7200 * Makefile (libpthread-routines): Remove pthread_cond_wait,
7201 pthread_cond_timedwait, pthread_cond_signal, and
7202 pthread_cond_broadcast. Add old_pthread_cond_init,
7203 old_pthread_cond_destroy, old_pthread_cond_wait,
7204 old_pthread_cond_timedwait, old_pthread_cond_signal, and
7205 old_pthread_cond_broadcast.
7206 * old_pthread_cond_broadcast.c: New file.
7207 * old_pthread_cond_destroy.c: New file.
7208 * old_pthread_cond_init.c: New file.
7209 * old_pthread_cond_signal.c: New file.
7210 * old_pthread_cond_timedwait.c: New file.
7211 * old_pthread_cond_wait.c: New file.
7212 * pthreadP.h: Add prototypes for the compatibility interfaces.
7214 * pthread_cond_destroy.c: Don't include <errno.h>.
7216 2003-01-01 Ulrich Drepper <drepper@redhat.com>
7218 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
7219 unnecessary zero offset when addressing MUTEX.
7221 2002-12-31 Ulrich Drepper <drepper@redhat.com>
7223 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7225 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
7226 for __register_atfork.
7228 2002-12-31 Jakub Jelinek <jakub@redhat.com>
7230 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
7231 instead of ASSEMBLER test macro.
7233 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
7234 __libc_current_sigrtmax): Add libc_hidden_def.
7236 * sysdeps/pthread/list.h: Remove assert.h include.
7238 2002-12-31 Ulrich Drepper <drepper@redhat.com>
7240 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
7241 __pthread_initialize_minimal_internal not
7242 __pthread_initialize_minimal.
7244 2002-12-30 Ulrich Drepper <drepper@redhat.com>
7246 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
7247 __pthread_initialize_minimal as hidden.
7249 * init.c (__pthread_initialize_minimal_internal): Don't mark as
7252 2002-12-31 Jakub Jelinek <jakub@redhat.com>
7254 * Makefile ($(inst_libdir)/libpthread.so): Depend on
7255 $(common-objpfx)format.lds, include that into the output script.
7257 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
7259 2002-12-28 Andreas Jaeger <aj@suse.de>
7261 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
7262 nsec resolution changes.
7263 (xstat64_conv): Likewise.
7264 (xstat32_conv): Likewise.
7265 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
7267 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
7268 structs stat and stat64.
7269 * time/time.h (__timespec_defined): Define for __USE_MISC.
7270 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
7272 2002-12-30 Jakub Jelinek <jakub@redhat.com>
7274 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
7276 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
7277 (pthread_exit): Use strong_alias to avoid warnings.
7278 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
7279 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
7280 ptr___pthread_attr_init_2_*.
7281 * init.c (pthread_functions): Adjust.
7283 2002-12-29 Ulrich Drepper <drepper@redhat.com>
7285 * forward.c: Make all functions available by default again. It
7286 caused too much trouble.
7288 * pt-siglongjmp.c: Removed.
7290 2002-12-28 Jakub Jelinek <jakub@redhat.com>
7292 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
7293 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
7294 * sysdeps/i386/Makefile: New file.
7295 * sysdeps/i386/tcb-offsets.sym: New file.
7296 * sysdeps/pthread/tcb-offsets.h: New file.
7297 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7298 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7300 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7301 __register_atfork...
7302 (GLIBC_2.3.2): ...here.
7304 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7306 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7307 pthread_attr_setstackaddr with __attribute_deprecated__.
7309 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7311 * pt-system.c (system): Remove cancellation handling.
7312 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7313 cancellation routines.
7315 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7317 * descr.h: Include <dl-sysdep.h>.
7318 (struct pthread): Move header.data.list to the back of the struct.
7319 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7320 (MULTIPLE_THREADS_OFFSET): Adjust offset.
7321 (SYSINFO_OFFSEET): Likewise.
7323 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7325 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7327 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7328 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7329 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7330 (USE_DL_SYSINFO): Undef.
7332 2002-12-22 Jakub Jelinek <jakub@redhat.com>
7334 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7335 $(common-objpfx)libc.so.
7336 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7337 it is bigger than pipe buffer size even on arches with bigger
7339 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7341 2002-12-25 Ulrich Drepper <drepper@redhat.com>
7343 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7344 correct errno access for case that USE___THREAD is not defined.
7346 2002-12-24 Ulrich Drepper <drepper@redhat.com>
7348 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7349 Patch by Marijn Ros <marijn@mad.scientist.com>.
7351 2002-12-22 Roland McGrath <roland@redhat.com>
7353 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7355 2002-12-20 Ulrich Drepper <drepper@redhat.com>
7357 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7359 2002-12-19 Ulrich Drepper <drepper@redhat.com>
7361 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7362 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7363 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7365 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7367 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7368 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7369 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7370 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7371 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7372 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7373 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7374 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7376 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7378 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7380 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7382 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7384 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7385 that sysinfo is properly initialized.
7386 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7387 to 1 only for ld.so.
7389 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7390 RTLD_CORRECT_DYNAMIC_WEAK.
7392 2002-12-19 Jakub Jelinek <jakub@redhat.com>
7394 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7395 Use return 0 as 6th argument to FORWARD4.
7396 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7398 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7400 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7401 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7402 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7403 (INIT_SYSINFO): New #define.
7404 (TLS_TP_INIT): Use INIT_SYSINFO.
7405 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7406 At test to make sure SYSINFO_OFFSET value is correct.
7407 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7409 2002-12-18 Jakub Jelinek <jakub@redhat.com>
7411 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7412 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7413 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7414 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7415 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7416 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7417 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7419 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7421 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7422 macro instead of using int $0x80 directly.
7424 * sysdeps/pthread/bits/stdio-lock.h: New file.
7425 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7426 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7427 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7428 * Makefile (routines): Add libc-lowlevelmutex.
7430 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7431 __i686.get_pc_thunk.dx.
7433 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7435 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7436 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7437 ($(objpfx)tst-cancel-wrappers.out): New rule.
7438 * tst-cancel-wrappers.sh: New test.
7439 * tst-locale1.c: Include signal.h.
7440 (uselocale): Test static linking of __libc_current_sigrt*.
7442 2002-12-17 Ulrich Drepper <drepper@redhat.com>
7444 * Makefile (tests): Add tst-cancel6.
7445 * tst-cancel6.c: New file
7447 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7449 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7450 Define meaningfully for assembler as well.
7451 * pthreadP.h (struct pthread_functions): Remove
7452 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
7453 and ptr_pthread_attr_init_2_1 fields.
7454 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7455 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7456 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7457 (FORWARD3): Define using FORWARD4.
7458 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7460 * pt-system.c: Remove duplicate stdlib.h include.
7462 2002-12-16 Ulrich Drepper <drepper@redhat.com>
7464 * sem_init.c: Define sem_init@GLIBC_2.0.
7465 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7466 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7468 * flockfile.c: Moved to...
7469 * sysdeps/pthread/flockfile.c: ...here. New file.
7470 * funlockfile.c: Moved to...
7471 * sysdeps/pthread/funlockfile.c: ...here. New file.
7472 * ftrylockfile.c: Moved to...
7473 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
7475 2002-12-16 Jakub Jelinek <jakub@redhat.com>
7477 * libc-cancellation.c: Guard both function with
7478 #if !defined NOT_IN_libc.
7479 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7480 automatically provided pthread wrappers.
7481 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7482 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7484 * pt-open.c: Removed.
7485 * pt-fcntl.c: Removed.
7486 * pt-fsync.c: Removed.
7487 * pt-lseek.c: Removed.
7488 * pt-msgrcv.c: Removed.
7489 * pt-msgsnd.c: Removed.
7490 * pt-msync.c: Removed.
7491 * pt-nanosleep.c: Removed.
7492 * pt-open64.c: Removed.
7493 * pt-pause.c: Removed.
7494 * pt-pread.c: Removed.
7495 * pt-pread64.c: Removed.
7496 * pt-pwrite.c: Removed.
7497 * pt-pwrite64.c: Removed.
7498 * pt-read.c: Removed.
7499 * pt-recv.c: Removed.
7500 * pt-recvfrom.c: Removed.
7501 * pt-recvmsg.c: Removed.
7502 * pt-send.c: Removed.
7503 * pt-sendto.c: Removed.
7504 * pt-sigtimedwait.c: Removed.
7505 * pt-sigwait.c: Removed.
7506 * pt-wait.c: Removed.
7507 * pt-waitpid.c: Removed.
7508 * pt-write.c: Removed.
7509 * pt-accept.c: Removed.
7510 * pt-close.c: Removed.
7511 * pt-connect.c: Removed.
7512 * pt-lseek64.c: Removed.
7513 * pt-sendmsg.c: Removed.
7514 * pt-tcdrain.c: Removed.
7516 2002-12-15 Ulrich Drepper <drepper@redhat.com>
7518 * init.c (__pthread_initialize_minimal_internal): Renamed from
7519 __pthread_initialize_minimal. Make old name an alias. This
7520 converts a normal relocation into a relative relocation.
7522 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7524 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7525 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7526 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7527 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7528 pt-sigwaitinfo, pt-waitid, and pt-writev.
7529 * pt-creat.c: Removed.
7530 * pt-poll.c: Removed.
7531 * pt-pselect.c: Removed.
7532 * pt-readv.c: Removed.
7533 * pt-select.c: Removed.
7534 * pt-sigpause.c: Removed.
7535 * pt-sigsuspend.c: Removed.
7536 * pt-sigwaitinfo.c: Removed.
7537 * pt-waitid.c: Removed.
7538 * pt-writev.c: Removed.
7540 * init.c (pthread_functions): New variable.
7541 (__pthread_initialize_minimal): Pass pointer to pthread_functions
7542 (or NULL) to __libc_pthread_init.
7543 * forward.c: Rewrite to use __libc:pthread_functions array to get
7545 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7547 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7548 Take new parameter. Copy content of variable pointed to by it
7549 to __libc_pthread_init.
7551 * pthreadP.h (struct pthread_functions): New type.
7552 (__libc_pthread_init): Declare.
7554 * pthread_attr_destroy.c: Add namespace protected alias.
7555 * pthread_attr_getdetachstate.c: Likewise.
7556 * pthread_attr_getinheritsched.c: Likewise.
7557 * pthread_attr_getschedparam.c: Likewise.
7558 * pthread_attr_getschedpolicy.c: Likewise.
7559 * pthread_attr_getscope.c: Likewise.
7560 * pthread_attr_setdetachstate.c: Likewise.
7561 * pthread_attr_setinheritsched.c: Likewise.
7562 * pthread_attr_setschedparam.c: Likewise.
7563 * pthread_attr_setschedpolicy.c: Likewise.
7564 * pthread_attr_setscope.c: Likewise.
7565 * pthread_cond_broadcast.c: Likewise.
7566 * pthread_cond_destroy.c: Likewise.
7567 * pthread_cond_init.c: Likewise.
7568 * pthread_cond_signal.c: Likewise.
7569 * pthread_cond_wait.c: Likewise.
7570 * pthread_condattr_destroy.c: Likewise.
7571 * pthread_condattr_init.c: Likewise.
7572 * pthread_equal.c: Likewise.
7573 * pthread_exit.c: Likewise.
7574 * pthread_getschedparam.c: Likewise.
7575 * pthread_self.c: Likewise.
7576 * pthread_setcancelstate.c: Likewise.
7577 * pthread_setschedparam.c: Likewise.
7578 * pthread_mutex_destroy.c: Likewise.
7579 * pthread_mutex_init.c: Likewise.
7580 * pthreadP.h: Add prototypes for the aliases.
7582 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7583 multiple_threads member in correct TCB to 1.
7585 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7586 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
7587 member of thread decriptor, otherwise return unconditionally 1.
7589 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7591 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7592 regular Linux version. Remove file.
7593 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
7594 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
7595 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
7596 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
7597 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
7598 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
7599 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
7600 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
7601 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
7602 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
7603 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
7604 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
7605 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
7606 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
7607 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
7608 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
7609 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
7610 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
7611 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
7612 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
7613 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
7614 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
7615 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
7616 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
7617 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
7618 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
7619 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
7620 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
7621 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
7622 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
7624 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7626 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7627 * sysdeps/unix/sysv/linux/open.c: Removed.
7628 * sysdeps/unix/sysv/linux/fsync.c: Removed.
7629 * sysdeps/unix/sysv/linux/lseek.c: Removed.
7630 * sysdeps/unix/sysv/linux/msync.c: Removed.
7631 * sysdeps/unix/sysv/linux/read.c: Removed.
7632 * sysdeps/unix/sysv/linux/close.c: Removed.
7633 * sysdeps/unix/sysv/linux/creat.c: Removed.
7634 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7635 * sysdeps/unix/sysv/linux/pause.c: Removed.
7636 * sysdeps/unix/sysv/linux/select.c: Removed.
7637 * sysdeps/unix/sysv/linux/write.c: Removed.
7639 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7641 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7642 element in TCB to see whether locking is needed.
7644 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7645 MULTIPLE_THREADS_OFFSET value is correct.
7647 * sysdeps/unix/sysv/linux/close.c: New file.
7648 * sysdeps/unix/sysv/linux/connect.S: New file.
7649 * sysdeps/unix/sysv/linux/creat.c: New file.
7650 * sysdeps/unix/sysv/linux/fsync.c: New file.
7651 * sysdeps/unix/sysv/linux/llseek.c: New file.
7652 * sysdeps/unix/sysv/linux/lseek.c: New file.
7653 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7654 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7655 * sysdeps/unix/sysv/linux/msync.c: New file.
7656 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7657 * sysdeps/unix/sysv/linux/open.c: New file.
7658 * sysdeps/unix/sysv/linux/open64.c: New file.
7659 * sysdeps/unix/sysv/linux/pause.c: New file.
7660 * sysdeps/unix/sysv/linux/poll.c: New file.
7661 * sysdeps/unix/sysv/linux/pread.c: New file.
7662 * sysdeps/unix/sysv/linux/pread64.c: New file.
7663 * sysdeps/unix/sysv/linux/pselect.c: New file.
7664 * sysdeps/unix/sysv/linux/pwrite.c: New file.
7665 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7666 * sysdeps/unix/sysv/linux/readv.c: New file.
7667 * sysdeps/unix/sysv/linux/recv.S: New file.
7668 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7669 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7670 * sysdeps/unix/sysv/linux/select.c: New file.
7671 * sysdeps/unix/sysv/linux/send.S: New file.
7672 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7673 * sysdeps/unix/sysv/linux/sendto.S: New file.
7674 * sysdeps/unix/sysv/linux/sigpause.c: New file.
7675 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7676 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7677 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7678 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7679 * sysdeps/unix/sysv/linux/system.c: New file.
7680 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7681 * sysdeps/unix/sysv/linux/wait.c: New file.
7682 * sysdeps/unix/sysv/linux/waitid.c: New file.
7683 * sysdeps/unix/sysv/linux/waitpid.c: New file.
7684 * sysdeps/unix/sysv/linux/writev.c: New file.
7685 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7687 * pt-readv.c: Fix comment.
7689 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7691 * tst-cleanup1.c: Include stdlib.h.
7693 * tst-cancel5.c: New test.
7694 * Makefile (tests): Add tst-cancel5.
7695 (tst-cancel5): Link against libc.so libpthread.so in that order.
7697 2002-12-13 Ulrich Drepper <drepper@redhat.com>
7699 * forward.c (test_loaded): Prevent recursive calls.
7701 * Makefile (routines): Add libc-cancellation.
7702 * libc-cancellation.c: New file.
7703 * descr.h (struct pthread): Add multiple_threads field.
7704 * allocatestack.c (allocate_stack): Initialize multiple_header field of
7705 new thread descriptor to 1.
7706 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7707 Initialize multiple_thread field after successful thread creation.
7708 * cancellation.c (__do_cancel): Move to pthreadP.h.
7709 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7710 (__pthread_disable_asynccancel): Add internal_function attribute.
7711 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7712 * pthread_setcancelstate.c: Likewise.
7713 * pthread_setcanceltype.c: Likewise.
7714 * pthread_exit.c: Likewise.
7715 * pthreadP.h (CANCELLATION_P): Likewise.
7716 (__do_cancel): Define as static inline.
7717 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7718 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7720 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7721 fields. Define MULTIPLE_THREADS_OFFSET.
7722 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7724 * sysdeps/unix/sysv/linux/accept.S: New file.
7725 * sysdeps/unix/sysv/linux/read.c: New file.
7726 * sysdeps/unix/sysv/linux/write.c: New file.
7727 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7728 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7729 initialization of __libc_locking_needed.
7730 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
7731 __libc_locking_needed, use multiple_threads field in TCB.
7732 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7734 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7736 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
7738 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
7740 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
7741 access to __libc_locking_needed for PIC.
7743 2002-12-12 Jakub Jelinek <jakub@redhat.com>
7745 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
7746 declare for libc.so.
7747 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
7749 (__libc_lock_lock): Put into statement expression.
7750 (__libc_lock_unlock): Remove trailing semicolon.
7751 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
7753 2002-12-12 Roland McGrath <roland@redhat.com>
7755 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
7756 "m" constraint to refer to __libc_locking_needed. Declare it here.
7758 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7760 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
7761 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
7762 Initialize __libc_locking_needed.
7763 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
7764 instead of __register_pthread_fork_handler.
7765 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
7766 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
7767 fork-gen with libc_pthread_init.
7768 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
7769 of __register_pthread_fork_handler.
7770 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
7771 of __register_pthread_fork_handler.
7772 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
7773 __libc_locking_needed to determine whether lock prefix can be avoided.
7774 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7776 2002-12-11 Ulrich Drepper <drepper@redhat.com>
7778 * Makefile (tests): Add tst-cleanup1.
7779 * tst-cleanup1.c: New file.
7780 * cancellation.c (__cleanup_thread): Removed.
7781 (__do_cancel): Remove call to __cleanup_thread.
7782 * pthreadP.h: Remove __cleanup_thread prorotype.
7784 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7785 Remember function and argument even if cancellation handler
7786 function is not available.
7787 (__libc_cleanup_region_end): Execute registered function directly if
7788 pthread functions are not available.
7789 (__libc_cleanup_end): Likewise.
7791 * init.c (__pthread_initialize_minimal): Fix initialization in
7792 static lib by preventing gcc from being too clever.
7794 2002-12-10 Ulrich Drepper <drepper@redhat.com>
7796 * init.c (__pthread_initialize_minimal): Remove unneccesary
7799 * Makefile (tests): We can run tst-locale2 now.
7801 2002-12-09 Ulrich Drepper <drepper@redhat.com>
7803 * Versions: Remove duplicated sigwait entry.
7805 2002-12-08 Ulrich Drepper <drepper@redhat.com>
7807 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
7810 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
7812 * pthreadP.h: Declare __pthread_enable_asynccancel and
7813 __pthread_disable_asynccancel.
7814 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
7815 (CANCEL_RESET): Use __pthread_disable_asynccancel.
7816 * cancellation.c (__pthread_enable_asynccancel): New function.
7817 (__pthread_disable_asynccancel): New function.
7818 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
7819 * pt-close.c: Likewise.
7820 * pt-connect.c: Likewise.
7821 * pt-creat.c: Likewise.
7822 * pt-fcntl.c: Likewise.
7823 * pt-fsync.c: Likewise.
7824 * pt-lseek.c: Likewise.
7825 * pt-lseek64.c: Likewise.
7826 * pt-msgrcv.c: Likewise.
7827 * pt-msgsnd.c: Likewise.
7828 * pt-msync.c: Likewise.
7829 * pt-nanosleep.c: Likewise.
7830 * pt-open.c: Likewise.
7831 * pt-open64.c: Likewise.
7832 * pt-pause.c: Likewise.
7833 * pt-poll.c: Likewise.
7834 * pt-pread.c: Likewise.
7835 * pt-pread64.c: Likewise.
7836 * pt-pselect.c: Likewise.
7837 * pt-pwrite.c: Likewise.
7838 * pt-pwrite64.c: Likewise.
7839 * pt-read.c: Likewise.
7840 * pt-readv.c: Likewise.
7841 * pt-recv.c: Likewise.
7842 * pt-recvfrom.c: Likewise.
7843 * pt-recvmsg.c: Likewise.
7844 * pt-select.c: Likewise.
7845 * pt-send.c: Likewise.
7846 * pt-sendmsg.c: Likewise.
7847 * pt-sendto.c: Likewise.
7848 * pt-sigpause.c: Likewise.
7849 * pt-sigsuspend.c: Likewise.
7850 * pt-sigtimedwait.c: Likewise.
7851 * pt-sigwait.c: Likewise.
7852 * pt-sigwaitinfo.c: Likewise.
7853 * pt-system.c: Likewise.
7854 * pt-tcdrain.c: Likewise.
7855 * pt-wait.c: Likewise.
7856 * pt-waitid.c: Likewise.
7857 * pt-waitpid.c: Likewise.
7858 * pt-write.c: Likewise.
7859 * pt-writev.c: Likewise.
7860 * pthread_join.c: Likewise.
7861 * pthread_timedjoin.c: Likewise.
7863 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7864 (__xpg_sigpause): New function.
7865 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7867 2002-12-07 Ulrich Drepper <drepper@redhat.com>
7869 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7871 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7872 _GI_pthread_cleanup_pop to pthreadP.h.
7874 * ftrylockfile.c: Use _IO_lock_trylock instead of
7875 pthread_mutex_trylock.
7877 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7878 (CANCEL_RESET): Likewise.
7879 (__pthread_setcanceltype_): Declare.
7880 (__pthread_mutex_lock_internal): Declare.
7881 (__pthread_mutex_unlock_internal): Declare.
7882 (__pthread_once_internal): Declare.
7883 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7884 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7886 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7887 and pthread_mutex_unlock.
7888 * pthread_cond_wait.c: Likewise.
7889 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7890 * pthread_mutex_unlock.c: Likewise.
7892 * pthread_setcanceltype.c: Add additional alias
7893 __pthread_setcanceltype.
7895 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7896 * sem_open.c (sem_open): Likewise.
7897 Use __libc_open, __libc_write, and __libc_close instead of
7898 open, write, and close respectively.
7900 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7901 Rewrite as statement expression since it must return a value.
7903 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7904 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7907 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7908 alias __pthread_once_internal.
7910 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7912 2002-12-06 Ulrich Drepper <drepper@redhat.com>
7914 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7915 * tst-stdio1.c: New file.
7916 * tst-stdio2.c: New file.
7918 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7920 * Makefile (tests): Comment out tst-locale2 for now.
7921 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7923 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7925 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7926 Use _IO_lock_init instead of explicit assignment.
7928 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7929 Define __libc_lock_* and __libc_lock_recursive macros with
7930 lowlevellock macros, not pthread mutexes.
7932 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
7933 of pthread_mutex_lock.
7934 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
7935 instead of pthread_mutex_unlock.
7937 2002-12-06 Roland McGrath <roland@redhat.com>
7939 * allocatestack.c (__stack_user): Use uninitialized defn.
7940 * init.c (__pthread_initialize_minimal): Initialize it here.
7942 2002-12-05 Roland McGrath <roland@redhat.com>
7944 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7946 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7948 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7951 2002-12-05 Ulrich Drepper <drepper@redhat.com>
7953 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7955 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
7956 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
7957 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
7958 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
7959 for __libc_lock_* macros.
7960 * Makefile (routines): Add libc-lowlevellock.
7962 2002-10-09 Roland McGrath <roland@redhat.com>
7964 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
7965 Under [__PIC__], call the function via the pointer fetched for
7966 comparison rather than a call by name that uses the PLT.
7967 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
7968 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
7969 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
7970 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
7971 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
7973 2002-12-04 Roland McGrath <roland@redhat.com>
7975 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
7977 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
7978 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
7980 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
7982 2002-12-04 Ulrich Drepper <drepper@redhat.com>
7984 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
7985 a completely opaque, non-integer type.
7986 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7988 2002-12-05 Jakub Jelinek <jakub@redhat.com>
7990 * sysdeps/i386/tls.h: Include stdlib.h.
7991 * sysdeps/x86_64/tls.h: Likewise.
7993 2002-12-04 Ulrich Drepper <drepper@redhat.com>
7995 * Makefile (tests): Add tst-locale2.
7996 (tests-static): Likewise.
7997 * tst-locale2.c: New file.
7999 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
8000 volatile and add memory clobbers to lock operations.
8002 2002-12-03 Ulrich Drepper <drepper@redhat.com>
8004 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
8005 * sysdeps/i386/i486/bits/atomic.h: New file.
8006 * sysdeps/i386/i586/bits/atomic.h: New file.
8007 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
8008 include i486 version.
8009 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
8010 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
8011 Patch by Marijn Ros <marijn@mad.scientist.com>.
8013 * allocatestack.c (get_cached_stack): Don't crash if we first
8014 found a stack with a larger size then needed.
8015 Reported by Hui Huang <hui.huang@sun.com>.
8017 * Makefile (tests): Add tst-sysconf.
8018 * tst-sysconf.c: New file.
8020 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
8021 PTHREAD_THREADS_MAX.
8023 2002-12-02 Roland McGrath <roland@redhat.com>
8025 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
8026 Declare using hidden_proto instead of attribute_hidden, so there are
8027 non-.hidden static symbols for gdb to find.
8028 (__pthread_keys): Likewise.
8029 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
8030 * allocatestack.c (__stack_user): Likewise.
8031 * pthread_create.c (__pthread_keys): Likewise.
8032 (__nptl_threads_events, __nptl_last_event): Make these static instead
8034 * pthread_key_create.c (__pthread_pthread_keys_max,
8035 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
8037 2002-12-02 Ulrich Drepper <drepper@redhat.com>
8039 * Makefile (tests): Add tst-locale1. If buid-static is yes link
8041 * tst-locale1.c: New file.
8043 * pthread_cond_timedwait.c: Include <stdlib.h>.
8045 * Makefile (tests): Add tst-fork2 and tst-fork3.
8046 * tst-fork2.c: New file.
8047 * tst-fork3.c: New file.
8049 2002-11-28 Ulrich Drepper <drepper@redhat.com>
8051 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
8053 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
8054 require it to 200112L.
8056 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
8057 instruction only if HAVE_CMOV is defined.
8058 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
8060 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
8062 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
8064 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
8066 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
8068 2002-11-27 Ulrich Drepper <drepper@redhat.com>
8070 * sysdeps/x86_64/bits/atomic.h: New file.
8072 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
8075 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
8076 possible since gettid cannot fail.
8078 * sysdeps/x86_64/pthreaddef.h: New file.
8080 * sysdeps/i386/pthreaddef.h (gettid): Removed.
8082 * sysdeps/x86_64/pthread_spin_init.c: New file.
8083 * sysdeps/x86_64/pthread_spin_lock.c: New file.
8084 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
8085 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
8087 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
8088 Add missing lock prefix. Minute optimization.
8090 * tst-spin2.c (main): Also check successful trylock call.
8092 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
8093 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
8095 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
8096 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
8098 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
8099 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
8100 value in case of an error. Add support for INTERNAL_SYSCALL.
8102 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
8103 value in case of an error.
8105 * sysdeps/x86_64/tls.h: New file.
8107 2002-11-26 Ulrich Drepper <drepper@redhat.com>
8109 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
8110 takes the array member name and the index as parameters.
8111 (THREAD_SETMEM_NC): Likewise.
8112 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
8113 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
8116 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
8117 to decide which code to use.
8118 (THREAD_SETMEM_NC): Likewise.
8120 * allocatestack.c (queue_stack): Don't remove stack from list here.
8121 Do it in the caller. Correct condition to prematurely terminate
8122 loop to free stacks.
8123 (__deallocate_stack): Remove stack from list here.
8125 2002-11-26 Ulrich Drepper <drepper@redhat.com>
8127 * Makefile (tests): Add tst-stack1.
8128 * tst-stack1.c: New file.
8130 * allocatestack.c (allocate_stack): Initialize the TCB on a user
8133 * pthread_attr_getstack.c: Return bottom of the thread area.
8135 2002-11-25 Ulrich Drepper <drepper@redhat.com>
8137 * Makefile (libpthread-routines): Add pt-allocrtsig and
8138 pthread_kill_other_threads.
8139 * pt-allocrtsig.c: New file.
8140 * pthread_kill_other_threads.c: New file.
8141 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
8142 all three functions.
8143 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8145 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
8146 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
8147 and __libc_allocate_rtsig_private.
8148 * Versions (libpthread): Export pthread_kill_other_threads_np,
8149 __libc_current_sigrtmin, and __libc_current_sigrtmax.
8151 2002-11-24 Ulrich Drepper <drepper@redhat.com>
8153 * allocatestack.c (allocate_stack): stackaddr in attribute points to
8154 the end of the stack. Adjust computations.
8155 When mprotect call fails dequeue stack and free it.
8156 * pthread_attr_setstack.c: Store top of the stack in stackaddr
8158 * pthread_getattr_np.c: Likewise.
8160 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
8163 2002-11-23 Ulrich Drepper <drepper@redhat.com>
8165 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
8166 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
8168 2002-11-22 Ulrich Drepper <drepper@redhat.com>
8170 * pthread_getspecific.c: Optimize access to first 2nd-level array.
8171 * pthread_setspecific.c: Likewise.
8173 2002-11-21 Ulrich Drepper <drepper@redhat.com>
8175 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
8176 definitions. Get them from the official place.
8177 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
8179 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
8180 Use new CLONE_ flags in clone() calls.
8182 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
8183 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
8185 * Versions: Add pthread_* functions for libc.
8186 * forward.c: New file.
8188 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
8190 * herrno.c: New file.
8193 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
8194 sem_trywait, and sem_timedwait. Add herrno and res.
8195 * sem_init.c: Don't initialize lock and waiters members.
8196 * sem_open.c: Likewise.
8197 * sem_post.c: Removed.
8198 * sem_wait.c: Removed.
8199 * sem_trywait.c: Removed.
8200 * sem_timedwait.c: Removed.
8201 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
8202 Includes full implementations of sem_post, sem_wait, sem_trywait,
8204 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
8205 for new implementation.
8206 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
8209 * tst-sem3.c: Improve error message.
8210 * tst-signal3.c: Likewise.
8212 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
8213 to tell the kernel about the termination futex and to initialize tid
8214 member. Don't initialize main_thread.
8215 * descr.h (struct pthread): Remove main_thread member.
8216 * cancelllation.c (__do_cancel): Remove code handling main thread.
8217 The main thread is not special anymore.
8219 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
8220 size of the stacks to stack_cache_actsize.
8222 * pt-readv.c: Add missing "defined".
8223 * pt-sigwait.c: Likewise.
8224 * pt-writev.c: Likewise.
8226 2002-11-09 Ulrich Drepper <drepper@redhat.com>
8228 * Versions: Export __connect from libpthread.
8229 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8231 * Makefile (libpthread-routines): Add pt-raise.
8232 * sysdeps/unix/sysv/linux/raise.c: New file.
8233 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
8234 * sysdeps/generic/pt-raise.c: New file.
8236 * pthread_cond_init.c: Initialize all data elements of the condvar
8237 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
8239 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
8240 * pthread_create.c: Likewise.
8242 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
8243 * tst-key1.c: New file.
8244 * tst-key2.c: New file.
8245 * tst-key3.c: New file.
8247 * Versions: Export pthread_detach for version GLIBC_2.0.
8248 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
8250 2002-11-08 Ulrich Drepper <drepper@redhat.com>
8252 * pthread_key_create.c: Terminate search after an unused key was found.
8253 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8255 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
8256 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8258 2002-10-10 Ulrich Drepper <drepper@redhat.com>
8260 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
8261 dynamic lookup for errno in PIC.
8263 * allocatestack.c (get_cached_stack): Rearrange code slightly to
8264 release the stack lock as soon as possible.
8265 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
8266 the static TLS block.
8267 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
8269 * cancellation.c: Renamed from cancelation.c.
8270 * Makefile: Adjust accordingly.
8271 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
8272 * cleanup_defer.c: Use CANCELLATION_P.
8273 * pthread_testcancel.c: Likewise.
8274 * descr.h: Fix spelling in comments.
8276 * pthread_getattr_np.c: Likewise.
8277 * pthread_getschedparam.c: Likewise.
8278 * pthread_setschedparam.c: Likewise.
8279 * Versions: Likewise.
8281 * pt-pselect.c: New file.
8282 * Makefile (libpthread-routines): Add pt-pselect.
8283 * Versions: Add pselect.
8285 * tst-cancel4.c: New file.
8286 * Makefile (tests): Add tst-cancel4.
8288 2002-10-09 Ulrich Drepper <drepper@redhat.com>
8290 * pthread_mutex_lock.c: Always record lock ownership.
8291 * pthread_mutex_timedlock.c: Likewise.
8292 * pthread_mutex_trylock.c: Likewise.
8294 * pt-readv.c: New file.
8295 * pt-writev.c: New file.
8296 * pt-creat.c: New file.
8297 * pt-msgrcv.c: New file.
8298 * pt-msgsnd.c: New file.
8299 * pt-poll.c: New file.
8300 * pt-select.c: New file.
8301 * pt-sigpause.c: New file.
8302 * pt-sigsuspend.c: New file.
8303 * pt-sigwait.c: New file.
8304 * pt-sigwaitinfo.c: New file.
8305 * pt-waitid.c: New file.
8306 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8307 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8308 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8309 * Versions: Add all the new functions.
8311 * tst-exit1.c: New file.
8312 * Makefile (tests): Add tst-exit1.
8314 * sem_timedwait.c: Minor optimization for more optimal fastpath.
8316 2002-10-08 Ulrich Drepper <drepper@redhat.com>
8318 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8320 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8321 call. pthread_join is an official cancellation point.
8322 * pthread_timedjoin.c: Likewise.
8324 * pthread_cond_wait.c: Revert order in which internal lock are dropped
8325 and the condvar's mutex are retrieved.
8326 * pthread_cond_timedwait.c: Likewise.
8327 Reported by dice@saros.East.Sun.COM.
8329 2002-10-07 Ulrich Drepper <drepper@redhat.com>
8331 * pthreadP.h: Cut out all type definitions and move them...
8332 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
8333 * pthreadP.h: Include <internaltypes.h>.
8335 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8338 * sem_trywait.c: Shuffle #includes around to get right order.
8339 * sem_timedwait.c: Likewise.
8340 * sem_post.c: Likewise.
8341 * sem_wait.c: Likewise.
8343 * nptl 0.3 released.
8345 * Makefile (tests): Add tst-signal3.
8346 * tst-signal3.c: New file.
8348 2002-10-05 Ulrich Drepper <drepper@redhat.com>
8350 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8351 the asms modify the sem object.
8352 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8354 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8356 * pthreadP.h (struct sem): New type. Actual semaphore type.
8357 * semaphoreP.h: Include pthreadP.h.
8358 * sem_getvalue.c: Adjust to sem_t change.
8359 * sem_init.c: Likewise.
8360 * sem_open.c: Likewise.
8361 * sem_post.c: Likewise.
8362 * sem_timedwait.c: Likewise.
8363 * sem_trywait.c: Likewise.
8364 * sem_wait.c: Likewise.
8366 2002-10-04 Ulrich Drepper <drepper@redhat.com>
8368 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8369 * tst-basic2.c: New file.
8370 * tst-exec1.c: New file.
8371 * tst-exec2.c: New file.
8372 * tst-exec3.c: New file.
8374 * tst-fork1.c: Remove extra */.
8376 * nptl 0.2 released. The API for IA-32 is complete.