1 2006-09-08 Jakub Jelinek <jakub@redhat.com>
3 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
5 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
6 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
7 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
11 2006-09-08 Ulrich Drepper <drepper@redhat.com>
14 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
15 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
16 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
17 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
18 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
19 * Makefile (tests): Add tst-cond22.
20 * tst-cond22.c: New file.
22 2006-09-05 Ulrich Drepper <drepper@redhat.com>
25 * descr.h (struct pthread): Add parent_cancelhandling.
26 * sysdeps/pthread/createthread.c (create_thread): Pass parent
27 cancelhandling value to child.
28 * pthread_create.c (start_thread): If parent thread was canceled
29 reset the SIGCANCEL mask.
30 * Makefile (tests): Add tst-cancel25.
31 * tst-cancel25.c: New file.
33 2006-09-05 Jakub Jelinek <jakub@redhat.com>
34 Ulrich Drepper <drepper@redhat.com>
36 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
37 counterp if it is already zero.
38 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
40 2006-03-04 Jakub Jelinek <jakub@redhat.com>
41 Roland McGrath <roland@redhat.com>
43 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
44 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
45 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
46 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
47 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
48 lll_robust_mutex_timedlock, lll_mutex_unlock,
49 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
50 Add _L_*_ symbols around the subsection.
51 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
52 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
54 2006-03-03 Jakub Jelinek <jakub@redhat.com>
55 Roland McGrath <roland@redhat.com>
57 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
58 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
59 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
60 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
61 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
62 lll_robust_mutex_timedlock, lll_mutex_unlock,
63 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
64 Add _L_*_ symbols around the subsection.
65 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
66 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
68 2006-08-31 Ulrich Drepper <drepper@redhat.com>
70 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
71 change because it can disturb too much existing code. If real hard
72 reader preference is needed we'll introduce another type.
73 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
74 (pthread_rwlock_timedwrlock): Likewise.
75 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
78 2006-08-30 Ulrich Drepper <drepper@redhat.com>
80 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
82 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
83 (pthread_rwlock_timedwrlock): Likewise.
84 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
87 2006-08-25 Jakub Jelinek <jakub@redhat.com>
89 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
90 Only define ifdef SHARED.
92 2006-08-23 Ulrich Drepper <drepper@redhat.com>
94 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
95 (free_stacks): ...here.
96 (__free_stack_cache): New function.
97 * pthreadP.h: Declare __free_stack_cache.
98 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
100 * init.c (pthread_functions): Initialize ptr_freeres.
101 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
102 New freeres function.
104 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
107 * Makefile (extra-objs): Add modules to extra-test-objs instead.
109 2006-08-20 Ulrich Drepper <drepper@redhat.com>
111 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
112 _XOPEN_REALTIME_THREADS.
114 2006-08-15 Jakub Jelinek <jakub@redhat.com>
116 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
117 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
118 HAVE_CLOCK_GETTIME_VSYSCALL.
119 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
121 2006-08-14 Jakub Jelinek <jakub@redhat.com>
123 * sysdeps/unix/sysv/linux/bits/posix_opt.h
124 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
125 * descr.h (struct priority_protection_data): New type.
126 (struct pthread): Add tpp field.
127 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
128 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
129 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
130 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
132 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
133 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
134 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
135 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
137 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
139 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
140 * pthread_mutexattr_getprioceiling.c
141 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
142 in the SCHED_FIFO priority range.
143 * pthread_mutexattr_setprioceiling.c
144 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
145 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
146 if mutex is not TPP. Ceiling is now in __data.__lock.
147 * pthread_mutex_setprioceiling.c: Include stdbool.h.
148 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
149 is now in __data.__lock. Add locking.
150 * pthread_create.c (__free_tcb): Free pd->tpp structure.
151 * Makefile (libpthread-routines): Add tpp.
152 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
153 * tst-tpp.h: New file.
154 * tst-mutexpp1.c: New file.
155 * tst-mutexpp6.c: New file.
156 * tst-mutexpp10.c: New file.
157 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
158 * tst-mutex6.c (TEST_FUNCTION): Likewise.
160 2006-08-12 Ulrich Drepper <drepper@redhat.com>
163 * pthread_join.c (pthread_join): Account for self being canceled
164 when checking for deadlocks.
165 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
166 (tf1): Don't print anything after pthread_join returns, this would be
167 another cancellation point.
169 * tst-join6.c: New file.
170 * Makefile (tests): Add tst-join6.
172 2006-08-03 Ulrich Drepper <drepper@redhat.com>
175 * pthread_setspecific.c (__pthread_setspecific): Check
176 out-of-range index before checking for unused key.
178 * sysdeps/pthread/gai_misc.h: New file.
180 2006-08-01 Ulrich Drepper <drepper@redhat.com>
182 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
183 file. Don't use sysctl.
184 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
185 overwrite the file if this is likely not true.
187 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
189 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
190 * Makefile (tests): Add tst-getpid3.
191 * tst-getpid3.c: New file.
193 2006-07-30 Roland McGrath <roland@redhat.com>
195 * Makefile (libpthread-routines): Add ptw-sigsuspend.
197 * sysdeps/unix/sysv/linux/i386/not-cancel.h
198 (pause_not_cancel): New macro.
199 (nanosleep_not_cancel): New macro.
200 (sigsuspend_not_cancel): New macro.
201 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
202 nanosleep_not_cancel macro from <not-cancel.h>.
203 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
204 macro from <not-cancel.h>.
206 2006-07-28 Ulrich Drepper <drepper@redhat.com>
207 Jakub Jelinek <jakub@redhat.com>
209 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
210 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
211 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
212 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
213 * pthread_mutex_init.c: Add support for priority inheritance mutex.
214 * pthread_mutex_lock.c: Likewise.
215 * pthread_mutex_timedlock.c: Likewise.
216 * pthread_mutex_trylock.c: Likewise.
217 * pthread_mutex_unlock.c: Likewise.
218 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
220 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
221 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
222 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
223 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
224 pthread-pi-defines.sym.
225 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
226 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
227 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
228 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
229 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
230 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
231 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
232 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
233 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
234 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
235 _POSIX_THREAD_PRIO_INHERIT to 200112L.
236 * tst-mutex1.c: Adjust to allow use in PI mutex test.
237 * tst-mutex2.c: Likewise.
238 * tst-mutex3.c: Likewise.
239 * tst-mutex4.c: Likewise.
240 * tst-mutex5.c: Likewise.
241 * tst-mutex6.c: Likewise.
242 * tst-mutex7.c: Likewise.
243 * tst-mutex7a.c: Likewise.
244 * tst-mutex8.c: Likewise.
245 * tst-mutex9.c: Likewise.
246 * tst-robust1.c: Likewise.
247 * tst-robust7.c: Likewise.
248 * tst-robust8.c: Likewise.
249 * tst-mutexpi1.c: New file.
250 * tst-mutexpi2.c: New file.
251 * tst-mutexpi3.c: New file.
252 * tst-mutexpi4.c: New file.
253 * tst-mutexpi5.c: New file.
254 * tst-mutexpi6.c: New file.
255 * tst-mutexpi7.c: New file.
256 * tst-mutexpi7a.c: New file.
257 * tst-mutexpi8.c: New file.
258 * tst-mutexpi9.c: New file.
259 * tst-robust1.c: New file.
260 * tst-robust2.c: New file.
261 * tst-robust3.c: New file.
262 * tst-robust4.c: New file.
263 * tst-robust5.c: New file.
264 * tst-robust6.c: New file.
265 * tst-robust7.c: New file.
266 * tst-robust8.c: New file.
267 * Makefile (tests): Add the new tests.
269 * pthread_create.c (start_thread): Add some casts to avoid warnings.
270 * pthread_mutex_destroy.c: Remove unneeded label.
272 2006-07-01 Ulrich Drepper <drepper@redhat.com>
274 * pthread_mutex_init.c (__pthread_mutex_init): Move some
275 computations to compile time.
277 2006-06-04 Ulrich Drepper <drepper@redhat.com>
279 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
281 2006-05-15 Ulrich Drepper <drepper@redhat.com>
283 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
285 2006-05-11 Ulrich Drepper <drepper@redhat.com>
287 * pthread_key_create.c (__pthread_key_create): Do away with
290 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
291 (__kernel_cpumask_size): Mark as hidden.
292 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
294 * sem_open.c (__sem_mappings_lock): Mark as hidden.
295 * semaphoreP.h (__sem_mappings_lock): Likewise.
297 2006-05-10 Ulrich Drepper <drepper@redhat.com>
299 * pthread_atfork.c: Mark __dso_handle as hidden.
301 2006-05-09 Ulrich Drepper <drepper@redhat.com>
304 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
305 the reload problem. Change the one path in pthread_cancel_init
306 which causes the problem. Force gcc to reload. Simplify callers.
307 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
308 (_Unwind_GetBSP): Undo last patch.
310 2006-05-07 Ulrich Drepper <drepper@redhat.com>
312 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
313 function pointer is reloaded after pthread_cancel_init calls.
316 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
317 pointers are reloaded after pthread_cancel_init calls.
319 2006-05-01 Ulrich Drepper <drepper@redhat.com>
321 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
324 2006-04-27 Ulrich Drepper <drepper@redhat.com>
326 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
327 Allocate new object which is passed to timer_sigev_thread so that
328 the timer can be deleted before the new thread is scheduled.
330 2006-04-26 Roland McGrath <roland@redhat.com>
332 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
334 2006-04-08 Ulrich Drepper <drepper@redhat.com>
336 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
337 suffix for conditional jumps.
338 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
339 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
340 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
341 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
342 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
343 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
345 * init.c (sigcancel_handler): Compare with correct PID even if the
346 thread is in the middle of a fork call.
347 (sighandler_setxid): Likewise.
348 Reported by Suzuki K P <suzuki@in.ibm.com> .
350 2006-04-07 Jakub Jelinek <jakub@redhat.com>
352 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
354 2006-04-06 Ulrich Drepper <drepper@redhat.com>
356 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
357 fails [Coverity CID 105].
359 2006-04-05 Ulrich Drepper <drepper@redhat.com>
361 * sysdeps/pthread/pthread.h: Add nonnull attributes.
363 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
366 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
367 Define __lll_rel_instr using lwsync.
369 2006-03-27 Ulrich Drepper <drepper@redhat.com>
371 * allocatestack.c (allocate_stack): Always initialize robust_head.
372 * descr.h: Define struct robust_list_head.
373 (struct pthread): Use robust_list_head in robust mutex list definition.
374 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
375 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
376 (__pthread_initialize_minimal_internal): Register robust_list with
378 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
379 Declare __set_robust_list_avail.
380 * pthread_create.c (start_thread): Register robust_list of new thread.
381 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
383 * pthread_mutex_destroy.c: For robust mutexes don't look at the
384 number of users, it's unreliable.
385 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
386 set_robust_list syscall is available.
387 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
388 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
389 Set robust_head.list_op_pending before trying to lock a robust mutex.
390 * pthread_mutex_timedlock.c: Likewise.
391 * pthread_mutex_trylock.c: Likewise.
392 * pthread_mutex_unlock.c: Likewise for unlocking.
393 * Makefile (tests): Add tst-robust8.
394 * tst-robust8.c: New file.
396 2006-03-08 Andreas Schwab <schwab@suse.de>
398 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
399 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
401 2006-03-05 Roland McGrath <roland@redhat.com>
403 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
404 and $config_os doesn't match *linux*.
406 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
408 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
410 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
411 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
412 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
413 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
414 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
415 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
417 2006-03-02 Ulrich Drepper <drepper@redhat.com>
419 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
421 2006-03-01 Ulrich Drepper <drepper@redhat.com>
423 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
424 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
426 (__lll_robust_timedlock_wait): Likewise.
427 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
428 (__lll_robust_lock_wait): Likewise.
429 (__lll_robust_timedlock_wait): Likewise.
430 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
431 (__lll_robust_lock_wait): Likewise.
432 (__lll_robust_timedlock_wait): Likewise.
434 2006-03-01 Jakub Jelinek <jakub@redhat.com>
436 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
437 lll_robust_mutex_trylock, lll_robust_mutex_lock,
438 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
439 lll_robust_mutex_unlock): Define.
440 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
442 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
444 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
445 instead of <clone.S>.
447 2006-02-27 Jakub Jelinek <jakub@redhat.com>
449 * Makefile (libpthread-routines): Add
450 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
451 and pthread_mutex_[sg]etprioceiling.
452 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
453 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
454 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
455 pthread_mutex_setprioceiling.
456 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
457 PTHREAD_PRIO_PROTECT): New enum values.
458 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
459 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
460 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
462 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
463 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
464 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
466 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
467 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
468 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
469 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
470 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
471 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
472 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
474 * pthread_mutex_getprioceiling.c: New file.
475 * pthread_mutex_setprioceiling.c: New file.
476 * pthread_mutexattr_getprioceiling.c: New file.
477 * pthread_mutexattr_setprioceiling.c: New file.
478 * pthread_mutexattr_getprotocol.c: New file.
479 * pthread_mutexattr_setprotocol.c: New file.
481 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
483 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
485 2006-02-27 Roland McGrath <roland@redhat.com>
487 * sysdeps/pthread/Subdirs: List nptl here too.
488 * configure (libc_add_on_canonical): New variable.
490 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
492 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
493 self to get main source tree's file.
494 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
495 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
496 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
497 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
498 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
499 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
500 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
501 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
502 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
503 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
504 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
505 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
506 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
508 * Makefile: Use $(sysdirs) in vpath directive.
510 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
511 (CPPFLAGS-timer_routines.c): Likewise.
513 * Makeconfig (includes): Variable removed.
515 2006-02-26 Roland McGrath <roland@redhat.com>
517 * sysdeps/generic/pt-raise.c: Moved to ...
518 * pt-raise.c: ... here.
519 * sysdeps/generic/lowlevellock.h: Moved to ...
520 * lowlevellock.h: ... here.
522 2006-02-23 Roland McGrath <roland@redhat.com>
524 * descr.h (struct pthread): Add final member `end_padding'.
525 (PTHREAD_STRUCT_END_PADDING): Use it.
527 2006-02-20 Roland McGrath <roland@redhat.com>
529 * sysdeps/mips: Directory removed, saved in ports repository.
530 * sysdeps/unix/sysv/linux/mips: Likewise.
532 2006-02-18 Ulrich Drepper <drepper@redhat.com>
534 * tst-robust1.c: Add second mutex to check that the mutex list is
537 2006-02-17 Jakub Jelinek <jakub@redhat.com>
539 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
540 lll_robust_mutex_trylock, lll_robust_mutex_lock,
541 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
542 lll_robust_mutex_unlock): New macros.
543 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
544 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
545 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
546 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
547 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
549 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
551 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
553 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
555 2006-02-17 Ulrich Drepper <drepper@redhat.com>
557 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
558 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
559 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
560 (lll_robust_mutex_unlock): Likewise.
562 2006-02-13 Jakub Jelinek <jakub@redhat.com>
564 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
565 Set robust_list.__next rather than robust_list.
566 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
567 (__pthread_list_t): New typedef.
568 (pthread_mutex_t): Replace __next and __prev fields with __list.
569 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
570 (__pthread_list_t): New typedef.
571 (pthread_mutex_t): Replace __next and __prev fields with __list.
572 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
573 (__pthread_list_t, __pthread_slist_t): New typedefs.
574 (pthread_mutex_t): Replace __next and __prev fields with __list.
575 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
576 (__pthread_list_t, __pthread_slist_t): New typedefs.
577 (pthread_mutex_t): Replace __next and __prev fields with __list.
578 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
579 (__pthread_list_t, __pthread_slist_t): New typedefs.
580 (pthread_mutex_t): Replace __next and __prev fields with __list.
581 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
582 (__pthread_slist_t): New typedef.
583 (pthread_mutex_t): Replace __next field with __list.
585 2006-02-15 Ulrich Drepper <drepper@redhat.com>
587 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
588 PTHREAD_MUTEX_OWNERDEAD.
589 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
590 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
591 * Makefile (libpthread-routines): Add lowlevelrobustlock.
592 * pthread_create.c (start_thread): Very much simplify robust_list loop.
593 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
594 to PTHREAD_MUTEX_INCONSISTENT.
595 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
596 * pthread_mutex_lock.c: Reimplement robust mutex handling.
597 * pthread_mutex_trylock.c: Likewise.
598 * pthread_mutex_timedlock.c: Likewise.
599 * pthread_mutex_unlock.c: Likewise.
600 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
601 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
602 lowlevelrobustlock.sym.
603 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
604 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
606 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
607 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
608 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
609 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
610 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
612 2006-02-12 Ulrich Drepper <drepper@redhat.com>
614 * allocatestack.c (allocate_stack): Initialize robust_list.
615 * init.c (__pthread_initialize_minimal_internal): Likewise.
616 * descr.h (struct xid_command): Pretty printing.
617 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
618 robust_list. Adjust macros.
619 * pthread_create.c (start_thread): Adjust robust_list handling.
620 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
621 but the owner for all robust mutex types.
622 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
623 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
624 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
625 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
627 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
628 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
630 2006-02-08 Jakub Jelinek <jakub@redhat.com>
632 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
633 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
635 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
637 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
639 (lll_futex_timed_wait): Define.
641 2006-01-19 Ulrich Drepper <drepper@redhat.com>
643 * tst-cancel4.c: Test ppoll.
645 2006-01-18 Andreas Jaeger <aj@suse.de>
648 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
649 (pthread_mutex_t): Follow changes for other archs. Based on patch
650 by Jim Gifford <patches@jg555.com>.
652 2006-01-13 Richard Henderson <rth@redhat.com>
654 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
656 2006-01-10 Roland McGrath <roland@redhat.com>
658 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
659 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
660 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
661 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
662 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
663 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
664 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
665 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
666 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
667 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
669 2006-01-09 Roland McGrath <roland@redhat.com>
671 * tst-initializers1-c89.c: New file.
672 * tst-initializers1-c99.c: New file.
673 * tst-initializers1-gnu89.c: New file.
674 * tst-initializers1-gnu99.c: New file.
675 * Makefile (tests): Add them.
676 (CFLAGS-tst-initializers1-c89.c): New variable.
677 (CFLAGS-tst-initializers1-c99.c): New variable.
678 (CFLAGS-tst-initializers1-gnu89.c): New variable.
679 (CFLAGS-tst-initializers1-gnu99.c): New variable.
681 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
682 Use __extension__ on anonymous union definition.
683 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
684 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
685 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
686 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
687 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
689 2006-01-08 Jakub Jelinek <jakub@redhat.com>
691 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
692 Don't give the union a name because it changes the mangled name.
693 Instead name the struct for __data.
694 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
696 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
699 2006-01-09 Jakub Jelinek <jakub@redhat.com>
701 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
702 stack bias to mc_ftp field.
704 2006-01-07 Ulrich Drepper <drepper@redhat.com>
706 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
707 being too clever and reloading the futex value where it shouldn't.
709 2006-01-06 Ulrich Drepper <drepper@redhat.com>
711 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
714 2006-01-06 Jakub Jelinek <jakub@redhat.com>
716 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
719 2006-01-06 Ulrich Drepper <drepper@redhat.com>
721 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
722 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
725 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
726 Don't give the union a name because it changes the mangled name.
727 Instead name the struct for __data.
728 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
729 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
730 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
731 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
732 * pthread_create.c (start_thread): Adjust robust mutex free loop.
733 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
735 2006-01-05 Ulrich Drepper <drepper@redhat.com>
737 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
739 (lll_futex_timed_wait): Define.
740 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
741 * sysdeps/pthread/aio_misc.h: New file.
743 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
745 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
747 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
749 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
750 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
751 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
753 2006-01-04 Ulrich Drepper <drepper@redhat.com>
755 * tst-cancel24.cc: Use C headers instead of C++ headers.
757 2006-01-03 Jakub Jelinek <jakub@redhat.com>
759 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
760 sparc-linux configured glibc.
761 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
762 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
763 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
764 atomic_compare_and_exchange_val_24_acq instead of
765 atomic_compare_and_exchange_val_acq.
766 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
767 instead of atomic_exchange_rel.
768 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
769 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
771 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
773 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
774 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
775 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
776 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
777 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
778 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
780 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
782 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
783 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
784 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
786 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
788 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
790 2006-01-03 Ulrich Drepper <drepper@redhat.com>
792 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
795 2006-01-02 Jakub Jelinek <jakub@redhat.com>
797 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
798 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
799 THREAD_COPY_POINTER_GUARD): Define.
800 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
801 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
803 2006-01-01 Ulrich Drepper <drepper@redhat.com>
805 * version.c: Update copyright year.
807 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
809 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
810 .eh_frame section, use cfi_* directives.
811 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
813 2005-12-30 Ulrich Drepper <drepper@redhat.com>
815 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
818 2005-12-29 Ulrich Drepper <drepper@redhat.com>
820 * sysdeps/pthread/sigaction.c: Removed.
821 * sigaction.c: New file.
822 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
824 2005-12-28 Ulrich Drepper <drepper@redhat.com>
826 * Makefile (tests): Add tst-signal7.
827 * tst-signal7.c: New file.
829 2005-12-27 Roland McGrath <roland@redhat.com>
831 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
832 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
833 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
834 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
835 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
836 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
837 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
838 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
839 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
840 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
841 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
843 2005-12-27 Jakub Jelinek <jakub@redhat.com>
845 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
846 and __prev field to pthread_mutex_t.
847 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
848 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
849 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
850 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
851 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
854 2005-12-26 Ulrich Drepper <drepper@redhat.com>
856 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
857 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
858 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
859 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
860 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
861 and PTHREAD_MUTEXATTR_FLAG_BITS.
862 * descr.h (struct pthread): Add robust_list field and define
863 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
864 * pthread_mutexattr_getrobust.c: New file.
865 * pthread_mutexattr_setrobust.c: New file.
866 * pthread_mutex_consistent.c: New file.
867 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
868 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
869 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
870 Adjust pthread_mutex_t initializers.
871 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
872 field to pthread_mutex_t.
873 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
874 and __prev field to pthread_mutex_t.
875 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
876 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
877 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
878 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
879 * pthread_mutexattr_gettype.c: Likewise.
880 * pthread_mutexattr_setpshared.c: Likewise.
881 * pthread_mutexattr_settype.c: Likewise.
882 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
883 Initialize mutex kind according to robust flag.
884 * pthread_mutex_lock.c: Implement local robust mutex.
885 * pthread_mutex_timedlock.c: Likewise.
886 * pthread_mutex_trylock.c: Likewise.
887 * pthread_mutex_unlock.c: Likewise.
888 * pthread_create.c (start_thread): Mark robust mutexes which remained
890 * tst-robust1.c: New file.
891 * tst-robust2.c: New file.
892 * tst-robust3.c: New file.
893 * tst-robust4.c: New file.
894 * tst-robust5.c: New file.
895 * tst-robust6.c: New file.
896 * tst-robust7.c: New file.
897 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
898 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
899 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
900 tst-robust5, tst-robust6, and tst-robust7.
902 * tst-typesizes.c: New file.
903 * Makefile (tests): Add tst-typesizes.
905 * tst-once3.c: More debug output.
907 2005-12-24 Ulrich Drepper <drepper@redhat.com>
909 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
910 missing after last change.
912 * version.c: Update copyright year.
914 2005-12-23 Ulrich Drepper <drepper@redhat.com>
916 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
917 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
918 * pthread_mutex_trylock.c: Likewise.
919 * pthread_mutex_timedlock.c: Likewise.
920 * pthread_mutex_unlock.c: Likewise.
922 2005-12-22 Roland McGrath <roland@redhat.com>
924 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
925 so that #include_next's search location is not reset to the -I..
926 directory where <nptl/...> can be found.
928 2005-12-22 Ulrich Drepper <drepper@redhat.com>
931 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
932 Fix unwind info. Remove useless branch prediction prefix.
933 * tst-cancel24.cc: New file.
934 * Makefile: Add rules to build and run tst-cancel24.
936 2005-12-21 Roland McGrath <roland@redhat.com>
938 * libc-cancellation.c: Use <> rather than "" #includes.
939 * pt-cleanup.c: Likewise.
940 * pthread_create.c: Likewise.
941 * pthread_join.c: Likewise.
942 * pthread_timedjoin.c: Likewise.
943 * pthread_tryjoin.c: Likewise.
944 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
945 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
946 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
947 * unwind.c: Likewise.
949 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
951 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
952 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
953 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
954 THREAD_COPY_POINTER_GUARD): Define.
956 2005-12-19 Jakub Jelinek <jakub@redhat.com>
958 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
960 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
961 THREAD_COPY_POINTER_GUARD): Define.
962 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
963 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
964 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
965 THREAD_COPY_POINTER_GUARD): Define.
966 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
967 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
968 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
969 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
970 Use PTR_DEMANGLE for B0 if defined.
972 2005-12-17 Ulrich Drepper <drepper@redhat.com>
974 * pthread_create.c (__pthread_create_2_1): Use
975 THREAD_COPY_POINTER_GUARD if available.
976 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
977 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
978 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
979 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
980 * sysdeps/x86_64/tls.h: Likewise.
982 2005-12-15 Roland McGrath <roland@redhat.com>
984 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
986 2005-12-13 Ulrich Drepper <drepper@redhat.com>
988 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
990 * errno-loc.c: New file.
992 2005-12-12 Roland McGrath <roland@redhat.com>
994 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
995 adjustments before choosing stack size. Update minimum stack size
996 calculation to match allocate_stack change.
998 2005-12-12 Ulrich Drepper <drepper@redhat.com>
1000 * allocatestack.c (allocate_stack): Don't demand that there is an
1001 additional full page available on the stack beside guard, TLS, the
1004 2005-11-24 Ulrich Drepper <drepper@redhat.com>
1006 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1007 (__cleanup_fct_attribute): Use __regparm__ not regparm.
1009 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
1010 compiling 32-bit code we must define __cleanup_fct_attribute.
1012 005-11-24 Jakub Jelinek <jakub@redhat.com>
1015 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
1016 __attribute__ instead of __attribute.
1017 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1018 (__cleanup_fct_attribute): Likewise.
1020 2005-11-17 Jakub Jelinek <jakub@redhat.com>
1022 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
1023 a write barrier before writing libgcc_s_getcfa.
1025 2005-11-06 Ulrich Drepper <drepper@redhat.com>
1027 * sysdeps/unix/sysv/linux/configure: Removed.
1029 2005-11-05 Ulrich Drepper <drepper@redhat.com>
1031 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
1032 optional init_array/fini_array support.
1034 2005-10-24 Roland McGrath <roland@redhat.com>
1036 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
1037 versioned_symbol use.
1039 2005-10-16 Roland McGrath <roland@redhat.com>
1041 * init.c (__pthread_initialize_minimal_internal): Even when using a
1042 compile-time default stack size, apply the minimum that allocate_stack
1043 will require, and round up to page size.
1045 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
1047 * Makefile ($(test-modules)): Remove static pattern rule.
1049 2005-10-14 Jakub Jelinek <jakub@redhat.com>
1050 Ulrich Drepper <drepper@redhat.com>
1052 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
1053 alignment in callback function.
1054 * Makefile: Add rules to build and run tst-align3.
1055 * tst-align3.c: New file.
1057 2005-10-03 Jakub Jelinek <jakub@redhat.com>
1059 * allocatestack.c (setxid_signal_thread): Add
1060 INTERNAL_SYSCALL_DECL (err).
1062 2005-10-02 Jakub Jelinek <jakub@redhat.com>
1064 * allocatestack.c (setxid_signal_thread): Need to use
1065 atomic_compare_and_exchange_bool_acq.
1067 2005-10-01 Ulrich Drepper <drepper@redhat.com>
1068 Jakub Jelinek <jakub@redhat.com>
1070 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
1072 (struct pthread): Move specific_used field to avoid padding.
1073 Add setxid_futex field.
1074 * init.c (sighandler_setxid): Reset setxid flag and release the
1076 * allocatestack.c (setxid_signal_thread): New function. Broken
1077 out of the bodies of the two loops in __nptl_setxid. For undetached
1078 threads check whether they are exiting and if yes, don't send a signal.
1079 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
1080 * pthread_create.c (start_thread): For undetached threads, check
1081 whether setxid bit is set. If yes, wait until signal has been
1084 * allocatestack.c (STACK_VARIABLES): Initialize them.
1085 * pthread_create.c (__pthread_create_2_1): Initialize pd.
1087 2004-09-02 Jakub Jelinek <jakub@redhat.com>
1089 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1090 waiters, awake all waiters on the associated mutex.
1092 2005-09-22 Roland McGrath <roland@redhat.com>
1094 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
1095 ../sysdeps/x86_64/hp-timing.h).
1097 2005-08-29 Jakub Jelinek <jakub@redhat.com>
1099 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
1100 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1101 (lll_futex_wake_unlock): Define.
1102 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
1103 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1104 (lll_futex_wake_unlock): Define.
1105 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
1106 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1107 (lll_futex_wake_unlock): Define.
1108 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
1109 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1110 (lll_futex_wake_unlock): Define.
1111 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
1112 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1113 (lll_futex_wake_unlock): Define.
1114 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
1115 lll_futex_wake_unlock.
1116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1117 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1118 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1119 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1120 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1121 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1123 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1125 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1126 Fix typo in register name.
1128 2005-08-23 Ulrich Drepper <drepper@redhat.com>
1130 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1131 Use __sigfillset. Document that sigfillset does the right thing wrt
1134 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1137 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
1138 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
1139 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
1140 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
1141 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
1142 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
1144 * Makefile (tests): Add tst-initializers1.
1145 (CFLAGS-tst-initializers1.c): Set.
1146 * tst-initializers1.c: New test.
1148 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1150 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
1151 Make sure __flags are located at offset 48 from the start of the
1154 2005-07-02 Roland McGrath <roland@redhat.com>
1156 * Makeconfig: Comment fix.
1158 2005-07-05 Jakub Jelinek <jakub@redhat.com>
1160 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
1161 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
1162 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
1163 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
1164 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1165 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1166 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
1167 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
1168 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
1169 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1171 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1173 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
1174 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1175 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
1177 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1178 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
1179 field. Put in sysinfo field unconditionally.
1180 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1181 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
1182 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1183 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
1185 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1186 * pthread_create.c (__pthread_create_2_1): Use
1187 THREAD_COPY_STACK_GUARD macro.
1188 * Makefile: Add rules to build and run tst-stackguard1{,-static}
1190 * tst-stackguard1.c: New file.
1191 * tst-stackguard1-static.c: New file.
1193 2005-06-14 Alan Modra <amodra@bigpond.net.au>
1195 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1196 Invoke CGOTSETUP and CGOTRESTORE.
1197 (CGOTSETUP, CGOTRESTORE): Define.
1199 2005-05-29 Richard Henderson <rth@redhat.com>
1201 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
1202 (tf_write, tf_writev): Use it.
1203 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
1206 2005-05-23 Jakub Jelinek <jakub@redhat.com>
1208 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1209 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1210 __librt_*_asynccancel@local.
1212 2005-05-17 Alan Modra <amodra@bigpond.net.au>
1214 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1215 all occurrences of JUMPTARGET. Instead append @local to labels.
1217 2005-05-20 Jakub Jelinek <jakub@redhat.com>
1219 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1220 size/alignment of struct pthread rather than tcbhead_t.
1221 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1223 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1225 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1228 2005-05-19 Richard Henderson <rth@redhat.com>
1230 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1231 __sync_val_compare_and_swap, not explicit _si variant.
1232 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1234 2005-05-03 Ulrich Drepper <drepper@redhat.com>
1237 * sysdeps/pthread/pthread.h: Avoid empty initializers.
1239 2005-05-03 Jakub Jelinek <jakub@redhat.com>
1241 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1242 .eh_frame section, use cfi_* directives.
1244 2005-04-27 Jakub Jelinek <jakub@redhat.com>
1246 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1249 2005-04-27 Ulrich Drepper <drepper@redhat.com>
1252 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1255 2005-04-27 Roland McGrath <roland@redhat.com>
1257 * Makefile (tests): Remove tst-clock2.
1259 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1260 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1261 translating to the kernel clockid_t for our own process/thread clock.
1263 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1265 2005-04-15 Jakub Jelinek <jakub@redhat.com>
1267 * old_pthread_cond_init.c: Include <errno.h>.
1268 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1269 process shared or uses clock other than CLOCK_REALTIME.
1270 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1272 2005-04-13 David S. Miller <davem@davemloft.net>
1274 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1275 * sysdeps/sparc/sparc64/clone.S: New file.
1277 2005-04-05 Jakub Jelinek <jakub@redhat.com>
1280 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1281 __inline instead of inline.
1282 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1284 2005-03-31 Jakub Jelinek <jakub@redhat.com>
1286 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1287 functionally equivalent, but shorter instructions.
1288 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1289 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1290 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1292 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1293 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1294 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1295 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1296 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1297 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1298 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1300 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1301 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1302 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1303 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1304 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1306 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
1308 * sysdeps/mips/Makefile: New file.
1309 * sysdeps/mips/nptl-sysdep.S: New file.
1310 * sysdeps/mips/tcb-offsets.sym: New file.
1311 * sysdeps/mips/pthread_spin_lock.S: New file.
1312 * sysdeps/mips/pthread_spin_trylock.S: New file.
1313 * sysdeps/mips/pthreaddef.h: New file.
1314 * sysdeps/mips/tls.h: New file.
1315 * sysdeps/mips/jmpbuf-unwind.h: New file.
1316 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1317 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1318 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1319 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1320 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1321 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1322 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1323 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1324 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1325 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1327 2005-03-23 Ulrich Drepper <drepper@redhat.com>
1330 * pthread_create.c (__pthread_create_2_1): Rename syscall error
1333 2005-03-10 Jakub Jelinek <jakub@redhat.com>
1335 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1337 2005-02-25 Roland McGrath <roland@redhat.com>
1339 * alloca_cutoff.c: Correct license text.
1340 * tst-unload.c: Likewise.
1341 * sysdeps/pthread/allocalim.h: Likewise.
1342 * sysdeps/pthread/pt-initfini.c: Likewise.
1343 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1344 * sysdeps/pthread/bits/sigthread.h: Likewise.
1345 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1346 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1348 2005-02-16 Roland McGrath <roland@redhat.com>
1350 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1351 Use unsigned int * for ptr_nthreads.
1353 2005-02-14 Alan Modra <amodra@bigpond.net.au>
1356 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1359 2005-02-07 Richard Henderson <rth@redhat.com>
1362 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1365 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
1367 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1368 order of arguments in invocation of atomic_add_zero.
1370 2005-01-26 Jakub Jelinek <jakub@redhat.com>
1373 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1374 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1375 at least gotntpoff relocation and addition.
1376 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1378 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1380 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1383 2005-01-06 Ulrich Drepper <drepper@redhat.com>
1385 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1386 entry for static tls deallocation fix.
1387 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1388 also contains information whether the memory pointed to is static
1390 * sysdeps/i386/tls.h: Likewise.
1391 * sysdeps/ia64/tls.h: Likewise.
1392 * sysdeps/powerpc/tls.h: Likewise.
1393 * sysdeps/s390/tls.h: Likewise.
1394 * sysdeps/sh/tls.h: Likewise.
1395 * sysdeps/sparc/tls.h: Likewise.
1396 * sysdeps/x86_64/tls.h: Likewise.
1398 2004-12-27 Ulrich Drepper <drepper@redhat.com>
1400 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1402 2004-12-21 Jakub Jelinek <jakub@redhat.com>
1404 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1406 * Makefile (tests): Add tst-align2.
1407 * tst-align2.c: New test.
1408 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1409 -mpreferred-stack-boundary=4.
1411 2004-12-18 Roland McGrath <roland@redhat.com>
1413 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1414 New file removed withdrawn for the moment.
1416 2004-12-17 Richard Henderson <rth@redhat.com>
1418 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1419 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1421 2004-12-16 Ulrich Drepper <drepper@redhat.com>
1423 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1424 Increased PTHREAD_STACK_MIN.
1426 * tst-context1.c (stacks): Use bigger stack size.
1428 2004-12-16 Jakub Jelinek <jakub@redhat.com>
1430 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1431 * sysdeps/sparc/tcb-offsets.sym: Add TID.
1433 2004-12-15 Jakub Jelinek <jakub@redhat.com>
1435 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1436 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1437 * sysdeps/s390/tcb-offsets.sym (TID): Add.
1439 2004-12-15 Ulrich Drepper <drepper@redhat.com>
1441 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1443 2004-12-14 Ulrich Drepper <drepper@redhat.com>
1445 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1446 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1448 * tst-getpid1.c: If child crashes, report this first. Print which
1451 2004-12-09 Ulrich Drepper <drepper@redhat.com>
1453 * init.c (__pthread_initialize_minimal_internal): Also unblock
1456 2004-12-01 Jakub Jelinek <jakub@redhat.com>
1458 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1459 _POSIX_THREAD_CPUTIME): Define to 0.
1460 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1461 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1462 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1463 __timer_signal_thread_tclk): Remove.
1464 (init_module): Remove their initialization.
1465 (thread_cleanup): Remove their cleanup assertions.
1466 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1467 __timer_signal_thread_tclk): Remove.
1468 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1469 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1470 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1472 2004-12-07 Jakub Jelinek <jakub@redhat.com>
1474 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1475 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1477 * Makefile (tests): Add tst-getpid2.
1478 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1479 (do_test): Use it. Use __clone2 instead of clone on ia64.
1480 * tst-getpid2.c: New test.
1482 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1484 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1486 2004-12-04 Ulrich Drepper <drepper@redhat.com>
1488 * Makefile (tests): Add tst-getpid1.
1489 * tst-getpid1.c: New file.
1490 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1491 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1493 2004-12-02 Roland McGrath <roland@redhat.com>
1495 * Makefile (libpthread-nonshared): Variable removed.
1496 ($(objpfx)libpthread_nonshared.a): Target removed.
1497 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1498 These are now handled by generic magic from
1499 libpthread-static-only-routines being set.
1501 2004-11-27 Ulrich Drepper <drepper@redhat.com>
1503 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1504 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1505 _POSIX_THREAD_PRIO_PROTECT): Define.
1506 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1507 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1508 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1510 2004-11-26 Jakub Jelinek <jakub@redhat.com>
1512 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1513 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1514 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1515 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1516 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1517 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1518 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1520 2004-11-24 Ulrich Drepper <drepper@redhat.com>
1522 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1524 * Makefile (libpthread-routines): Add pthread_setschedprio.
1525 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1526 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1527 * pthread_setschedprio.c: New file.
1529 2004-11-20 Jakub Jelinek <jakub@redhat.com>
1531 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1532 * pthread_cancel.c (pthread_create): Likewise.
1534 * Makefile (libpthread-routines): Add vars.
1535 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1536 * init.c (__default_stacksize, __is_smp): Remove.
1538 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1539 and define a wrapper macro.
1540 (PTHREAD_STATIC_FN_REQUIRE): Define.
1541 * allocatestack.c (__find_thread_by_id): Undefine.
1542 * pthread_create (__pthread_keys): Remove.
1543 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1544 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1545 PTHREAD_STATIC_FN_REQUIRE.
1547 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1549 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1550 parameter to REGISTER macro.
1552 2004-11-17 Roland McGrath <roland@redhat.com>
1554 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1555 Make sure SIGCANCEL is blocked as well.
1557 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1559 * sysdeps/pthread/setxid.h: New file.
1560 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1561 (struct xid_command): Add forward decl.
1562 (struct pthread_functions): Change return type of __nptl_setxid hook
1564 * pthreadP.h (__nptl_setxid): Change return type to int.
1565 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1566 calling thread, return its return value and set errno on failure.
1567 * descr.h (struct xid_command): Change id type to long array.
1569 * Makefile: Add rules to build and test tst-setuid1 and
1571 * tst-setuid1.c: New test.
1572 * tst-setuid1-static.c: New test.
1574 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1576 * Makefile (tests): Add tst-exit3.
1577 * tst-exit3.c: New test.
1579 2004-11-09 Ulrich Drepper <drepper@redhat.com>
1581 * Makefile (tests): Add tst-exit2.
1582 * tst-exit2.c: New file.
1584 2004-11-09 Roland McGrath <roland@redhat.com>
1587 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1588 here, before calling clone.
1589 * pthread_create.c (start_thread): Don't do it here.
1591 2004-11-02 Jakub Jelinek <jakub@redhat.com>
1593 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1595 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1597 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1598 Set ETIMEDOUT to errno when time is up. Tweak to avoid
1601 2004-10-28 Jakub Jelinek <jakub@redhat.com>
1603 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1604 if sched_priority is not between minprio and maxprio.
1606 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1608 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1609 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1611 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1612 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1614 2004-10-24 Ulrich Drepper <drepper@redhat.com>
1616 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1617 not-cancelable I/O functions.
1619 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1621 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1622 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1623 make sure 2 is stored in the futex and we looked at the old value.
1624 Fix a few other problems to return the correct value.
1626 2004-10-14 Richard Henderson <rth@redhat.com>
1628 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1631 2004-10-06 Jakub Jelinek <jakub@redhat.com>
1633 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1634 of pthread-functions.h and pthreaddef.h.
1635 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1637 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1638 Change __data.__nwaiters from int to unsigned int.
1640 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1641 sysconf (_SC_THREAD_CPUTIME) returns negative value.
1643 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1646 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1647 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1649 2004-10-06 Ulrich Drepper <drepper@redhat.com>
1651 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
1652 test fails, remove message queue.
1653 (tf_msgsnd): Likewise.
1655 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1657 * tst-clock1.c: Change #ifdef to #if defined.
1658 * tst-clock2.c: Likewise.
1659 * tst-cond11.c: Likewise.
1661 * sysdeps/pthread/timer_create.c (timer_create): Use
1662 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1663 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1666 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1668 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1669 _POSIX_THREAD_CPUTIME): Define to 0.
1671 2004-10-04 Ulrich Drepper <drepper@redhat.com>
1673 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1674 and _POSIX_THREAD_CPUTIME to zero.
1675 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1676 * tst-barrier2.c: Fix testing for POSIX feature.
1677 * tst-clock1.c: Likewise.
1678 * tst-clock2.c: Likewise.
1679 * tst-cond11.c: Likewise.
1680 * tst-cond4.c: Likewise.
1681 * tst-cond6.c: Likewise.
1682 * tst-flock2.c: Likewise.
1683 * tst-mutex4.c: Likewise.
1684 * tst-mutex9.c: Likewise.
1685 * tst-rwlock12.c: Likewise.
1686 * tst-rwlock4.c: Likewise.
1687 * tst-signal1.c: Likewise.
1688 * tst-spin2.c: Likewise.
1689 * sysdeps/pthread/posix-timer.h: Likewise.
1690 * sysdeps/pthread/timer_create.c: Likewise.
1691 * sysdeps/pthread/timer_routines.c: Likewise.
1693 2004-10-01 Ulrich Drepper <drepper@redhat.com>
1695 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1696 (__lll_mutex_timedlock_wait): Address futex correctly.
1698 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1699 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1700 make sure 2 is stored in the futex and we looked at the old value.
1701 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1702 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
1703 which might very well made the code not working at all before.
1706 2004-09-28 Ulrich Drepper <drepper@redhat.com>
1708 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1709 allow SIGSETXID to be sent.
1710 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1711 for SIGSETXID to be defined.
1712 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1713 SIGSETXID cannot be blocked.
1715 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1716 Add __extension__ to long long types.
1717 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1718 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1719 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1720 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1721 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1722 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1723 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1725 2004-09-25 Ulrich Drepper <drepper@redhat.com>
1727 * descr.h (struct pthread): Add stopped_start field.
1728 * sysdeps/pthread/createthread.c (create_thread): Set
1729 start_stopped flag in descriptor for new thread appropriately.
1730 * pthread_create.c (start_thread): Only take lock to be stopped on
1731 startup if stopped_start flag says so.
1733 2004-09-24 Ulrich Drepper <drepper@redhat.com>
1735 * pthread_create.c (__pthread_create_2_1): Remember whether thread
1736 is created detached and if yes, do not try to free the stack in case
1737 the thread creation failed.
1738 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1739 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1740 case there has been no error. [BZ #405]
1742 * pthread_create.c (start_thread): Don't wait for scheduler data
1743 etc to be set at the beginning of the function. The cancellation
1744 infrastructure must have been set up. And enable async
1745 cancellation before potentially going to sleep. [BZ #401]
1747 2004-09-20 Ulrich Drepper <drepper@redhat.com>
1749 * Versions: Remove exports for pthread_set*id_np functions.
1750 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1752 * Makefile: Don't build pthread_set*id code for now.
1754 2004-09-19 Ulrich Drepper <drepper@redhat.com>
1756 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1758 * allocatestack.c (__nptl_setxid): New function.
1759 * descr.h (struct xid_command): Define type.
1760 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1761 (sighandler_setxid): New function.
1762 (__pthread_initialize_minimal): Register sighandler_setxid for
1764 * pt-allocrtsig.c: Update comment.
1765 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
1766 Declare __nptl_setxid.
1767 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1768 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1769 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1770 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1771 and pthread_setresuid_np.
1772 * pthread_setgid_np.c: New file.
1773 * pthread_setuid_np.c: New file.
1774 * pthread_setegid_np.c: New file.
1775 * pthread_seteuid_np.c: New file.
1776 * pthread_setregid_np.c: New file.
1777 * pthread_setreuid_np.c: New file.
1778 * pthread_setresgid_np.c: New file.
1779 * pthread_setresuid_np.c: New file.
1780 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
1781 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1782 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1783 and pthread_setresuid_np.
1784 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1785 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1786 pthread_setregid, and pthread_setresgid.
1788 2004-09-18 Ulrich Drepper <drepper@redhat.com>
1790 * allocatestack.c (allocate_stack): Return EAGAIN instead of
1791 ENOMEM when out of memory.
1793 2004-09-10 Roland McGrath <roland@redhat.com>
1796 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1797 code, since we don't try to use the broken CLONE_STOPPED any more.
1798 * pthread_create.c (start_thread): Likewise.
1800 2004-09-15 Richard Henderson <rth@redhat.com>
1802 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1804 2004-09-01 David Mosberger <davidm@hpl.hp.com>
1806 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1807 (__libc_unwind_longjmp): Delete macro and declare as function.
1808 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1809 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1811 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1812 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1813 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1815 2004-09-12 Ulrich Drepper <drepper@redhat.com>
1817 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1819 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1820 types also for __USE_XOPEN2K.
1821 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1822 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1823 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1824 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1825 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1826 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1827 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1830 2004-09-08 Ulrich Drepper <drepper@redhat.com>
1832 * sysdeps/pthread/pthread.h
1833 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
1834 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1835 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1836 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
1839 2004-09-07 Ulrich Drepper <drepper@redhat.com>
1841 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1842 PSEUDO to be used with . prefix.
1844 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1845 Use atomic_increment instead of atomic_exchange_and_add.
1846 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1848 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1850 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1853 * allocatestack.c (allocate_stack): Use atomic_increment_val
1854 instead of atomic_exchange_and_add.
1855 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1856 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1858 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1861 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1862 the initialization function might throw.
1864 2005-09-05 Richard Henderson <rth@redhat.com>
1866 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1867 Move definition inside libpthread, libc, librt check. Provide
1868 definition for rtld.
1870 2004-09-02 Ulrich Drepper <drepper@redhat.com>
1872 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1873 * sysdeps/i386/jmpbuf-unwind.h: Likewise
1874 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1875 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1876 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1877 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1878 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1879 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1882 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1883 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1884 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1886 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1887 Decrement __nwaiters. If pthread_cond_destroy has been called and
1888 this is the last waiter, signal pthread_cond_destroy caller and
1889 avoid using the pthread_cond_t structure after unlock.
1890 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1891 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1892 Read clock type from the least significant bits of __nwaiters instead
1894 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1895 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1897 2004-08-31 Jakub Jelinek <jakub@redhat.com>
1900 * Makefile (tests): Add tst-cond20 and tst-cond21.
1901 * tst-cond20.c: New test.
1902 * tst-cond21.c: New test.
1903 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1904 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1906 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1908 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1909 (pthread_cond_t): Likewise.
1910 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1912 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1914 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1916 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1917 (cond_nwaiters): New.
1919 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1920 if there are waiters not signalled yet.
1921 Wait until all already signalled waiters wake up.
1922 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1923 __nwaiters. If pthread_cond_destroy has been called and this is the
1924 last waiter, signal pthread_cond_destroy caller and avoid using
1925 the pthread_cond_t structure after unlock.
1926 (__pthread_cond_wait): Increment __nwaiters in the beginning,
1927 decrement it when leaving. If pthread_cond_destroy has been called
1928 and this is the last waiter, signal pthread_cond_destroy caller.
1929 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1930 Likewise. Read clock type from the least significant bits of
1931 __nwaiters instead of __clock.
1932 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1933 whether clock ID can be encoded in COND_CLOCK_BITS bits.
1934 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1935 clock type just from the last COND_CLOCK_BITS bits of value.
1936 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1937 instead of __clock, just from second bit of condattr's value.
1939 2004-08-30 Jakub Jelinek <jakub@redhat.com>
1941 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1942 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
1944 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1946 2004-08-15 Roland McGrath <roland@frob.com>
1948 * pthread_atfork.c: Update copyright terms including special exception
1949 for these trivial files, which are statically linked into executables
1950 that use dynamic linking for the significant library code.
1952 2004-08-09 Jakub Jelinek <jakub@redhat.com>
1954 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1955 pthread_rwlock_rdlock.
1956 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1957 Decrease __nr_readers_queued after reacquiring lock.
1958 * sysdeps/pthread/pthread_rwlock_timedrdlock
1959 (pthread_rwlock_timedrdlock): Likewise.
1960 Reported by Bob Cook <bobcook47@hotmail.com>.
1962 2004-08-11 Jakub Jelinek <jakub@redhat.com>
1964 * tst-rwlock14.c (tf): Read main thread handle from *ARG
1965 before pthread_barrier_wait.
1967 2004-08-07 Ulrich Drepper <drepper@redhat.com>
1969 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1970 Remove unnecessary exception handling data.
1972 2004-07-23 Jakub Jelinek <jakub@redhat.com>
1975 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1976 instead of clockid_t.
1978 2004-07-21 Roland McGrath <roland@redhat.com>
1980 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1982 2004-07-19 Roland McGrath <roland@redhat.com>
1984 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1986 2004-07-02 Roland McGrath <roland@redhat.com>
1988 * configure: Don't exit.
1990 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1992 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1993 (__pthread_cond_timedwait): Check for invalid nanosecond in
1996 2004-07-07 Ulrich Drepper <drepper@redhat.com>
1998 * Makefile: Add rules to build and run tst-fini1.
1999 * tst-fini1.c: New file.
2000 * tst-fini1mod.c: New file.
2002 2004-07-05 Ulrich Drepper <drepper@redhat.com>
2004 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
2005 if no cancellation support is needed.
2006 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2007 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2008 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2009 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2010 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2011 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2012 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2013 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2014 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2016 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
2017 only if not already defined.
2019 2004-07-05 Jakub Jelinek <jakub@redhat.com>
2021 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
2022 constraint "m" instead of "0" for futex.
2024 * shlib-versions: Add powerpc64-.*-linux.*.
2026 2004-07-04 Jakub Jelinek <jakub@redhat.com>
2028 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2029 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
2031 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
2032 1 billion and 64-bit tv_nsec which is valid when truncated to 32
2035 2004-06-29 Roland McGrath <roland@redhat.com>
2037 * Banner: NPTL no longer has its own version number.
2038 * Makefile (nptl-version): Variable removed.
2039 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
2040 using $(version), the glibc version number.
2042 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2044 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2045 Fix branch offset for a PLT entry.
2046 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2048 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2050 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
2052 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
2055 2004-06-28 Jakub Jelinek <jakub@redhat.com>
2057 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
2060 2004-06-28 Jakub Jelinek <jakub@redhat.com>
2062 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2063 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
2065 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2066 (pthread_rwlock_timedrdlock): Likewise.
2068 2004-06-22 Jakub Jelinek <jakub@redhat.com>
2070 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2071 Set __r7 to val, not mutex.
2073 2004-06-27 Ulrich Drepper <drepper@redhat.com>
2075 * Makefile: Add rules to build tst-rwlock14.
2076 * tst-rwlock14.c: New file.
2078 2004-06-24 Boris Hu <boris.hu@intel.com>
2080 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
2082 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2084 2004-06-19 Andreas Jaeger <aj@suse.de>
2086 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
2087 assembler in last patch.
2089 2004-06-17 Ulrich Drepper <drepper@redhat.com>
2091 * sysdeps/pthread/pthread_cond_timedwait.c
2092 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
2093 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2094 (__pthread_cond_timedwait): Check for invalid nanosecond in
2096 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2097 * tst-cond19.c: New file.
2098 * Makefile: Add rules to build and run tst-cond19.
2100 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
2102 * tst-context1.c (GUARD_PATTERN): Defined.
2103 (tst_context_t): Define struct containing ucontext_t & guard words.
2104 (ctx): Declare as an array of tst_context_t.
2105 (fct): Verify uc_link & guard words are still valid.
2106 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
2108 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2110 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2111 Add __data.__futex field, reshuffle __data.__clock.
2112 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
2113 (__pthread_cond_signal): Increment __futex at the same time as
2114 __wakeup_seq or __total_seq. Pass address of __futex instead of
2115 address of low 32-bits of __wakeup_seq to futex syscall.
2116 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2117 (__pthread_cond_wait): Likewise. Pass __futex value from before
2118 releasing internal lock to FUTEX_WAIT.
2119 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2120 (__pthread_cond_timedwait): Likewise.
2121 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2122 (FUTEX_CMP_REQUEUE): Define.
2123 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2124 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2125 Pass __futex value from before the unlock and __futex address instead
2126 of address of low 32-bits of __wakeup_seq to futex syscall.
2127 Fallback to FUTEX_WAKE all on any errors.
2129 2004-06-08 Jakub Jelinek <jakub@redhat.com>
2131 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
2133 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
2134 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
2135 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
2136 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
2137 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
2139 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2141 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
2142 Add memory clobber to inline assembly.
2143 (__lll_mutex_trylock): Likewise.
2144 (__lll_mutex_cond_trylock): Likewise.
2146 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
2148 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2149 Pass val argument as 6th system call argument in %r7.
2151 2004-05-21 Jakub Jelinek <jakub@redhat.com>
2153 * Makefile (tests): Add tst-cond16.
2154 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
2155 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
2156 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2157 Add __data.__futex field, reshuffle __data.__clock.
2158 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
2159 (__pthread_cond_signal): Increment __futex at the same time as
2160 __wakeup_seq or __total_seq. Pass address of __futex instead of
2161 address of low 32-bits of __wakeup_seq to futex syscall.
2162 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
2163 (__pthread_cond_wait): Likewise. Pass __futex value from before
2164 releasing internal lock to FUTEX_WAIT.
2165 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
2166 (__pthread_cond_timedwait): Likewise.
2167 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
2168 (FUTEX_CMP_REQUEUE): Define.
2169 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2170 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2171 Pass __futex value from before the unlock and __futex address instead
2172 of address of low 32-bits of __wakeup_seq to futex syscall.
2173 Fallback to FUTEX_WAKE all on any errors.
2174 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
2176 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2177 internally. Return non-zero if error, zero if success.
2178 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2179 Add __data.__futex field, reshuffle __data.__clock.
2180 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
2182 (lll_futex_requeue): Add val argument, return 1 unconditionally
2184 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2185 Add __data.__futex field, reshuffle __data.__clock.
2186 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2188 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2189 internally. Return non-zero if error, zero if success.
2190 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2191 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
2192 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2194 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2195 internally. Return non-zero if error, zero if success.
2196 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2197 Add __data.__futex field, reshuffle __data.__clock.
2198 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
2200 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2201 internally. Return non-zero if error, zero if success.
2202 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2203 Add __data.__futex field, reshuffle __data.__clock.
2204 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2205 Add __data.__futex field, reshuffle __data.__clock.
2206 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2207 Increment __futex at the same time as __wakeup_seq or __total_seq.
2208 Pass address of __futex instead of address of low 32-bits of
2209 __wakeup_seq to futex syscall.
2210 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2211 Pass __futex value from before releasing internal lock
2213 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2214 Likewise. Avoid unnecessary shadowing of variables.
2215 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2216 Set __futex to 2 * __total_seq. Pass __futex value from before the
2217 unlock and __futex address instead of address of low 32-bits of
2218 __wakeup_seq to futex_requeue macro, adjust for new return value
2220 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2221 (__pthread_cond_signal): Increment __futex at the same time as
2222 __wakeup_seq or __total_seq. Pass address of __futex instead of
2223 address of low 32-bits of __wakeup_seq to futex syscall.
2224 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2225 (__pthread_cond_wait): Likewise. Pass __futex value from before
2226 releasing internal lock to FUTEX_WAIT.
2227 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2228 (__pthread_cond_timedwait): Likewise.
2229 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2230 (FUTEX_CMP_REQUEUE): Define.
2231 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2232 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2233 Pass __futex value from before the unlock and __futex address instead
2234 of address of low 32-bits of __wakeup_seq to futex syscall.
2235 Fallback to FUTEX_WAKE all on any errors.
2237 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2239 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2240 Add nop to align the end of critical section.
2241 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2243 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2245 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2246 Add __broadcast_seq field.
2247 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2248 all waiters as woken with woken_seq and bump broadcast counter.
2249 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2250 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
2251 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2252 Comment typo fixes. Avoid returning -ETIMEDOUT.
2254 2004-06-01 Ulrich Drepper <drepper@redhat.com>
2256 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2257 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2258 Reported by Kaz Kojima.
2260 2004-05-25 Jakub Jelinek <jakub@redhat.com>
2262 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2264 2004-05-21 Jakub Jelinek <jakub@redhat.com>
2266 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2267 __broadcast_seq with bc_seq after acquiring internal lock instead of
2270 2004-05-18 Jakub Jelinek <jakub@redhat.com>
2272 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2275 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2276 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2277 (pthread_cond_t): Add __data.__broadcast_seq field.
2278 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2279 (FRAME_SIZE): Define.
2280 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
2282 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2284 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
2286 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2287 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
2290 2004-05-18 Ulrich Drepper <drepper@redhat.com>
2292 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2293 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2294 Add __broadcast_seq field.
2295 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2296 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2297 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2298 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2299 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2301 all waiters as woken with woken_seq and bump broadcast counter.
2302 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2303 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2304 __broadcast_seq field.
2305 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2306 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2307 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2308 * pthread_cond_init.c: Initialize __broadcast_seq field.
2309 * Makefile (tests): Add tst-cond17 and tst-cond18.
2310 Add .NOTPARALLEL goal.
2311 * tst-cond16.c: New file. From Jakub.
2312 * tst-cond17.c: New file. From Jakub.
2313 * tst-cond18.c: New file. From Jakub.
2315 2004-05-16 Ulrich Drepper <drepper@redhat.com>
2317 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2320 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2321 Parametrize frame size. Correct some unwind info.
2322 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2324 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2326 * tst-stack3.c: Note testing functionality beyond POSIX.
2328 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2330 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2331 Change conditional from ifdef to if.
2333 2004-04-23 Jakub Jelinek <jakub@redhat.com>
2335 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2336 SYSDEP_CANCEL_ERROR): Define.
2339 2004-05-01 Jakub Jelinek <jakub@redhat.com>
2341 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2343 2004-04-20 Jakub Jelinek <jakub@redhat.com>
2345 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2347 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2349 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2350 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2351 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2352 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2354 2004-04-19 Ulrich Drepper <drepper@redhat.com>
2356 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2357 thread has all signals blocked.
2359 2004-04-18 Andreas Jaeger <aj@suse.de>
2361 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2362 (SEM_VALUE_MAX): Add missing brace.
2364 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2366 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2368 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2369 * sysdeps/pthread/tst-mqueue8x.c: New test.
2370 * tst-cancel4.c: Update comment about message queues.
2372 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2373 return it_value { 0, 0 }.
2374 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2376 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2377 assertion for SIGEV_NONE.
2378 (thread_attr_compare): Compare all attributes, not just a partial
2381 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2383 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2385 2004-04-17 Ulrich Drepper <drepper@redhat.com>
2387 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2388 Just use a plain number.
2389 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2390 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2391 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2392 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2393 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2394 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2395 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2397 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2399 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2401 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2403 2004-04-15 Jakub Jelinek <jakub@redhat.com>
2405 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2406 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2407 of calling sigwaitinfo.
2409 2004-04-16 Ulrich Drepper <drepper@redhat.com>
2411 * allocatestack.c (allocate_stack): Set reported_guardsize
2413 * pthread_getattr_np.c (pthread_getattr_np): Use
2414 reported_guardsize instead of guardsize.
2415 * descr.h (struct pthread): Add reported_guardsize field.
2417 2004-04-13 Jakub Jelinek <jakub@redhat.com>
2419 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2421 2004-04-12 Ulrich Drepper <drepper@redhat.com>
2423 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2425 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2427 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2428 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2429 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2430 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2431 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2433 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2434 (_POSIX_MESSAGE_PASSING): Define.
2435 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2436 (_POSIX_MESSAGE_PASSING): Define.
2437 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2438 (_POSIX_MESSAGE_PASSING): Define.
2440 2004-04-04 Ulrich Drepper <drepper@redhat.com>
2442 * tst-context1.c (fct): Check whether correct stack is used.
2444 2004-04-03 Ulrich Drepper <drepper@redhat.com>
2446 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2447 matching constraints for asm mem parameters.
2449 * tst-clock2.c (tf): Don't define unless needed.
2451 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
2453 * Makefile (link-libc-static): Use $(static-gnulib) instead of
2456 2004-03-30 Ulrich Drepper <drepper@redhat.com>
2458 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2459 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2460 * pthreadP.h: Declare __nptl_deallocate_tsd.
2461 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2464 * Makefile (tests): Add tst-tsd5.
2465 * tst-tsd5.c: New file.
2467 2004-03-29 Ulrich Drepper <drepper@redhat.com>
2469 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2470 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2471 is SHLIB_COMPAT check.
2472 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2473 (__pthread_attr_getaffinity_old): Likewise.
2474 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2475 (__pthread_getaffinity_old): Likewise.
2476 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2477 (__pthread_setaffinity_old): Likewise.
2479 2004-03-26 Ulrich Drepper <drepper@redhat.com>
2481 * allocatestack.c (_make_stacks_executable): Call
2482 _dl_make_stack_executable first.
2484 2004-03-24 Roland McGrath <roland@redhat.com>
2486 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2487 constraint instead of "0".
2489 2004-03-24 Ulrich Drepper <drepper@redhat.com>
2491 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2492 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2494 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2495 code to avoid warning.
2497 2004-03-24 Andreas Jaeger <aj@suse.de>
2499 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2500 (__pthread_attr_setaffinity_old): Remove const.
2502 2004-03-23 Ulrich Drepper <drepper@redhat.com>
2504 * sysdeps/unix/sysv/linux/smp.h: New file.
2505 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2506 * init.c: Define __is_smp.
2507 (__pthread_initialize_minimal_internal): Call is_smp_system to
2508 initialize __is_smp.
2509 * pthreadP.h: Declare __is_smp.
2510 Define MAX_ADAPTIVE_COUNT is necessary.
2511 * pthread_mutex_init.c: Add comment regarding __spins field.
2512 * pthread_mutex_lock.c: Implement adaptive mutex type.
2513 * pthread_mutex_timedlock.c: Likewise.
2514 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2515 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2517 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2518 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2519 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2520 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2521 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2522 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2523 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2524 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2525 lll_mutex_cond_trylock.
2526 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2527 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2528 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2529 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2530 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2531 Define BUSY_WAIT_NOP.
2532 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2533 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2535 * tst-mutex5.c: Add support for testing adaptive mutexes.
2536 * tst-mutex7.c: Likewise.
2537 * tst-mutex5a.c: New file.
2538 * tst-mutex7a.c: New file.
2539 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2541 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2542 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2543 vgettimeofday call might destroy the content.
2545 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2548 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2549 No need to restrict type of ret. Make it int. Add comment.
2551 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2552 Remove unnecessary setne instruction.
2554 2004-03-22 Jakub Jelinek <jakub@redhat.com>
2556 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2557 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2558 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2559 If realloc fails, break out of the loop.
2561 2004-03-20 Andreas Jaeger <aj@suse.de>
2563 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2564 (__pthread_setaffinity_old): Fix interface.
2565 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2566 (__pthread_getaffinity_old): Likewise.
2568 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2569 (__pthread_setaffinity_new): Remove duplicate declaration.
2571 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2573 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2574 the return value to a safe register.
2575 (CDISABLE): Set the function argument correctly.
2577 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2579 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2580 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2581 Rewrite so that only one locked memory operation per round is needed.
2582 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2583 (pthread_barrier_wait): After wakeup, release lock only when the
2584 last thread stopped using the barrier object.
2585 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2586 (__pthread_cond_wait): Don't store mutex address if the current
2587 value is ~0l. Add correct cleanup support and unwind info.
2588 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2589 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2590 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2591 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2592 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2593 Add correct cleanup support and unwind info.
2594 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2595 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2596 information for syscall wrappers.
2598 2004-03-18 Ulrich Drepper <drepper@redhat.com>
2600 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2601 cpusetsize field, remove next.
2602 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2603 parameter for size of the CPU set.
2604 (pthread_setaffinity_np): Likewise.
2605 (pthread_attr_getaffinity_np): Likewise.
2606 (pthread_attr_setaffinity_np): Likewise.
2607 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2608 interface change, keep compatibility code.
2609 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2610 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2611 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2612 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
2613 __pthread_getaffinity_np.
2614 * Versions: Add version for changed interfaces.
2615 * tst-attr3.c: Adjust test for interface change.
2616 * pthread_getattr_np.c: Query the kernel about the affinity mask with
2617 increasing buffer sizes.
2618 * pthread_attr_destroy.c: Remove unused list handling.
2619 * pthread_attr_init.c: Likewise.
2621 2004-03-17 Roland McGrath <roland@redhat.com>
2623 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2624 first argument to clock_getres so we ever enable kernel timers.
2626 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
2628 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2630 2004-03-12 Richard Henderson <rth@redhat.com>
2632 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2633 oldvalue from CENABLE to CDISABLE.
2635 2004-03-12 Ulrich Drepper <drepper@redhat.com>
2637 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2638 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2639 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2640 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2642 2004-03-11 Richard Henderson <rth@redhat.com>
2644 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2645 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2646 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2648 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2650 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2651 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2652 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2654 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2656 * forward.c (__pthread_cond_broadcast_2_0,
2657 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2658 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2659 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2661 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2663 * sysdeps/sh/tcb-offsets.sym: Add PID.
2664 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2665 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2667 2004-03-10 Ulrich Drepper <drepper@redhat.com>
2669 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2670 include <sysdep-cancel.h>, vfork is no cancellation point.
2671 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2672 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2673 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2675 2004-03-10 Jakub Jelinek <jakub@redhat.com>
2677 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2679 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2680 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2682 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2684 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2685 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2686 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2687 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2688 of DO_CALL_VIA_BREAK. Work around a gas problem.
2690 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2691 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2692 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2693 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2694 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2695 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2697 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2698 a local register for saving old PID. Negate PID in parent upon exit.
2700 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2702 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2703 before syscall, set to the old value in the parent afterwards.
2704 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2705 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2707 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2708 before syscall, set to the old value in the parent afterwards.
2709 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2710 * sysdeps/s390/tcb-offsets.sym: Add PID.
2712 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2713 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2714 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2715 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2716 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2717 * sysdeps/sparc/tcb-offsets.sym: Add PID.
2719 2004-03-10 Andreas Schwab <schwab@suse.de>
2721 * sysdeps/ia64/tcb-offsets.sym: Add PID.
2722 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2723 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2725 2004-03-09 Jakub Jelinek <jakub@redhat.com>
2727 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2728 * tst-cancel21.c (do_one_test): Likewise.
2729 Reported by Gordon Jin <gordon.jin@intel.com>.
2731 2004-02-09 Jakub Jelinek <jakub@redhat.com>
2733 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2734 if non-zero and set to INT_MIN if zero.
2735 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2736 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2737 (SAVE_PID, RESTORE_PID): Define.
2739 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2740 Use relative path to avoid including NPTL i386/vfork.S.
2741 (SAVE_PID, RESTORE_PID): Define.
2742 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2743 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2744 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2746 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2747 * tst-vfork1.c: New test.
2748 * tst-vfork2.c: New test.
2749 * tst-vfork1x.c: New test.
2750 * tst-vfork2x.c: New test.
2752 2004-03-08 Ulrich Drepper <drepper@redhat.com>
2754 * sysdeps/i386/tcb-offsets.sym: Add PID.
2755 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2756 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2757 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2759 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
2761 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2763 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
2765 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2768 2004-03-07 Ulrich Drepper <drepper@redhat.com>
2770 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2773 * tst-once4.c: Remove unnecessary macro definition.
2775 * tst-mutex7.c (do_test): Limit thread stack size.
2776 * tst-once2.c (do_test): Likewise.
2777 * tst-tls3.c (do_test): Likewise.
2778 * tst-tls1.c (do_test): Likewise.
2779 * tst-signal3.c (do_test): Likewise.
2780 * tst-kill6.c (do_test): Likewise.
2781 * tst-key4.c (do_test): Likewise.
2782 * tst-join4.c (do_test): Likewise.
2783 * tst-fork1.c (do_test): Likewise.
2784 * tst-context1.c (do_test): Likewise.
2785 * tst-cond2.c (do_test): Likewise.
2786 * tst-cond10.c (do_test): Likewise.
2787 * tst-clock2.c (do_test): Likewise.
2788 * tst-cancel10.c (do_test): Likewise.
2789 * tst-basic2.c (do_test): Likewise.
2790 * tst-barrier4.c (do_test): Likewise.
2792 2004-03-05 Ulrich Drepper <drepper@redhat.com>
2794 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2796 2004-03-01 Ulrich Drepper <drepper@redhat.com>
2798 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2799 (__pthread_cond_timedwait): Optimize wakeup test.
2800 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2801 (__pthread_cond_wait): Likewise.
2802 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2803 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2806 2004-02-29 Ulrich Drepper <drepper@redhat.com>
2808 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2809 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
2810 the atomic instruction needed.
2811 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2812 (__lll_mutex_lock_wait): Likewise.
2814 2004-02-28 Ulrich Drepper <drepper@redhat.com>
2816 * Makefile (tests): Add tst-cond14 and tst-cond15.
2817 * tst-cond14.c: New file.
2818 * tst-cond15.c: New file.
2820 2004-02-27 Ulrich Drepper <drepper@redhat.com>
2822 * sysdeps/pthread/createthread.c (create_thread): Remove use of
2823 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
2824 needs to be implemented differently to be useful.
2826 2004-02-26 Ulrich Drepper <drepper@redhat.com>
2828 * pthread_attr_setschedparam.c: Don't test priority against limits
2829 here. Set ATTR_FLAG_SCHED_SET flag.
2830 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
2831 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
2832 from parent thread to child. If attribute is used and scheduling
2833 parameters are not inherited, copy parameters from attribute or
2834 compute them. Check priority value.
2835 * pthread_getschedparam.c: If the parameters aren't known yet get
2836 them from the kernel.
2837 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
2838 ATTR_FLAG_POLICY_SET flag for thread.
2839 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
2840 and ATTR_FLAG_POLICY_SET.
2842 * sysdeps/pthread/createthread.c: Use tgkill if possible.
2844 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2845 fail if stack address hasn't been set. Just return 0.
2847 2004-02-25 Ulrich Drepper <drepper@redhat.com>
2849 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
2850 libpthread for the files in this list.
2851 (CFLAGS-tst-unload): Removed.
2852 * tst-unload.c (do_test): Don't use complete path for
2855 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2858 2004-02-22 Ulrich Drepper <drepper@redhat.com>
2860 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2861 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2862 operation per round is needed.
2863 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2864 (__lll_mutex_lock_wait): Likewise.
2866 2004-02-20 Ulrich Drepper <drepper@redhat.com>
2868 * tst-cancel9.c (cleanup): Don't print to stderr.
2870 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2872 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2874 2004-02-20 Jakub Jelinek <jakub@redhat.com>
2876 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2877 (__syscall_error_handler2): Call CDISABLE.
2878 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2879 (__syscall_error_handler2): Call CDISABLE.
2881 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2882 Release lock before the loop, don't reacquire it.
2884 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2886 2004-02-19 Andreas Schwab <schwab@suse.de>
2888 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2891 2004-02-18 Ulrich Drepper <drepper@redhat.com>
2893 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2894 (pthread_barrier_wait): After wakeup, release lock only when the
2895 last thread stopped using the barrier object.
2896 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2897 (pthread_barrier_wait): Likewise.
2898 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2900 * Makefile (tests): Add tst-barrier4.
2901 * tst-barrier4.c: New file.
2903 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2904 (__pthread_cond_timedwait): Perform timeout test while holding
2905 internal lock to prevent wakeup race.
2906 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2907 * sysdeps/pthread/pthread_cond_timedwait.c
2908 (__pthread_cond_timedwait): Likewise.
2909 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2910 (__pthread_cond_timedwait): Likewise.
2912 2004-02-18 Jakub Jelinek <jakub@redhat.com>
2914 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2915 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2916 * Makefile (tests): Add tst-rwlock13.
2917 * tst-rwlock13.c: New test.
2919 2004-02-16 Ulrich Drepper <drepper@redhat.com>
2921 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2922 (__condvar_tw_cleanup): Little optimization.
2923 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2925 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
2927 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2928 libpthread as "lib" parameter to SHLIB_COMPAT.
2929 (__novmx_siglongjmp): Fix typo in function name.
2930 (__novmx_longjmp): Fix typo in function name.
2932 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2934 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2937 * sysdeps/generic/pt-longjmp.c: Moved to...
2938 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
2940 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
2942 * Makefile (libpthread-routines): Add pt-cleanup.
2943 * pt-longjmp.c: Removed.
2944 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2945 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2946 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2947 Version longjmp, siglongjmp for GLIBC_2.3.4.
2948 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2950 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2952 * sysdeps/pthread/pthread_cond_timedwait.c
2953 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
2954 Reuse code. Add __builtin_expects.
2956 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2957 (__pthread_cond_timedwait): Get internal lock in case timeout has
2958 passed before the futex syscall.
2959 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2961 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2963 * allocatestack.c: Pretty printing.
2965 * sysdeps/pthread/createthread.c (create_thread): Don't add
2966 CLONE_DETACHED bit if it is not necessary.
2968 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2970 * pthread_getattr_np.c: Include ldsodefs.h.
2972 2004-01-16 Richard Henderson <rth@redhat.com>
2974 * allocatestack.c: Don't declare __libc_stack_end.
2975 * init.c (__pthread_initialize_minimal_internal): Likewise.
2976 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
2978 2004-01-15 Richard Henderson <rth@redhat.com>
2980 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2981 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2982 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2983 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2984 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2985 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2986 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2987 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
2989 2004-01-14 Ulrich Drepper <drepper@redhat.com>
2991 * init.c (pthread_functions): Make array const.
2993 2004-01-13 Ulrich Drepper <drepper@redhat.com>
2995 * allocatestack.c (__make_stacks_executable): Change interface.
2996 Check parameters. Pass parameter on to libc counterpart.
2997 * pthreadP.h: Change declaration.
2999 2004-01-13 Richard Henderson <rth@redhat.com>
3001 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
3003 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
3006 * sysdeps/alpha/Makefile: New file.
3007 * sysdeps/alpha/tcb-offsets.sym: New file.
3008 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3009 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
3011 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
3014 2004-01-08 Jakub Jelinek <jakub@redhat.com>
3016 * Makefile (tests): Add tst-backtrace1.
3017 * tst-backtrace1.c: New test.
3019 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
3021 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
3022 register as second parameter to the REGISTER macro.
3023 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
3024 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
3025 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
3026 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
3027 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
3028 of thread register as second parameter to REGISTER macro in 64 case.
3030 2004-01-03 Ulrich Drepper <drepper@redhat.com>
3032 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
3033 (CFLAGS-getpid.o): Defined.
3034 (CFLAGS-getpid.os): Defined.
3036 2003-12-31 Ulrich Drepper <drepper@redhat.com>
3038 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
3039 returned for main thread does not overlap with any other VMA.
3040 Patch by Jakub Jelinek.
3042 2003-12-29 Jakub Jelinek <jakub@redhat.com>
3044 * tst-raise1.c: Include stdio.h.
3046 2003-12-23 Jakub Jelinek <jakub@redhat.com>
3048 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
3049 setting with __ASSUME_TGKILL || defined __NR_tgkill.
3050 If pid is 0, set it to selftid.
3051 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
3052 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
3053 != 0, return self->tid without doing a syscall.
3054 * descr.h (struct pthread): Move pid field after tid.
3056 * Makefile (tests): Add tst-raise1.
3057 * tst-raise1.c: New file.
3059 2003-12-23 Roland McGrath <roland@redhat.com>
3061 * tst-oddstacklimit.c: New file.
3062 * Makefile (tests): Add it.
3063 (tst-oddstacklimit-ENV): New variable.
3065 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
3066 value up to page size for __default_stacksize.
3068 2003-12-21 Ulrich Drepper <drepper@redhat.com>
3070 * Makefile (tests): Add tst-eintr5.
3071 * tst-eintr5.c: New file.
3073 * eintr.c (eintr_source): Prevent sending signal to self.
3075 * tst-eintr2.c (tf1): Improve error message.
3077 2003-12-20 Ulrich Drepper <drepper@redhat.com>
3079 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
3080 * sysdeps/unix/sysv/linux/getpid.c: New file.
3081 * pthread_cancel.c: Add comment explaining use of PID field.
3082 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3083 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
3084 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
3085 temporarily to signal the field must not be relied on and updated
3087 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
3088 temporarily negative.
3089 * sysdeps/unix/sysv/linux/raise.c: Likewise.
3091 2003-12-19 Ulrich Drepper <drepper@redhat.com>
3093 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
3094 (eintr_source): If ARG != NULL, use pthread_kill.
3095 * tst-eintr1.c: Adjust for this change.
3096 * tst-eintr2.c: Likewise.
3097 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
3098 * tst-eintr3.c: New file.
3099 * tst-eintr4.c: New file.
3101 2003-12-19 Jakub Jelinek <jakub@redhat.com>
3103 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
3104 if CANCELSTATE_BITMASK is set.
3105 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
3108 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
3109 (tests-reverse): Add tst-cancel23.
3110 * tst-cancel22.c: New test.
3111 * tst-cancel23.c: New test.
3113 2003-12-18 Ulrich Drepper <drepper@redhat.com>
3115 * tst-eintr1.c: Better error messages.
3117 * Makefile (tests): Add tst-eintr2.
3118 * tst-eintr2.c: New file.
3120 2003-12-18 Jakub Jelinek <jakub@redhat.com>
3122 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
3123 (CFLAGS-tst-cancelx21.c): Set.
3124 * tst-cancel21.c: New test.
3125 * tst-cancelx21.c: New test.
3127 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
3129 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
3130 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
3131 * pt-longjmp.c: Include jmpbuf-unwind.h.
3132 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
3133 _JMPBUF_UNWINDS. Adjust compared pointers.
3134 * init.c (__pthread_initialize_minimal_internal): Initialize
3135 pd->stackblock_size.
3136 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
3137 * sysdeps/alpha/jmpbuf-unwind.h: New file.
3138 * sysdeps/i386/jmpbuf-unwind.h: New file.
3139 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
3140 * sysdeps/s390/jmpbuf-unwind.h: New file.
3141 * sysdeps/sh/jmpbuf-unwind.h: New file.
3142 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
3143 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
3144 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
3145 (_JMPBUF_CFA_UNWINDS): Remove.
3146 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
3148 2003-12-12 Jakub Jelinek <jakub@redhat.com>
3150 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
3151 (CFLAGS-tst-cancelx20.c): Set.
3152 * tst-cancel20.c: New test.
3153 * tst-cancelx20.c: New test.
3155 2003-12-17 Ulrich Drepper <drepper@redhat.com>
3157 * init.c (__pthread_initialize_minimal_internal): Don't treat
3158 architectures with separate register stack special here when
3159 computing default stack size.
3161 2003-12-17 Roland McGrath <roland@redhat.com>
3163 * Makefile (tst-cancelx7-ARGS): New variable.
3164 Reportd by Greg Schafer <gschafer@zip.com.au>.
3166 2003-12-17 Jakub Jelinek <jakub@redhat.com>
3168 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
3169 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
3170 (tst-stack3-ENV): Set.
3171 ($(objpfx)tst-stack3-mem): New.
3172 * tst-stack3.c: New test.
3174 2003-12-10 David Mosberger <davidm@hpl.hp.com>
3176 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
3177 Add unwind directives. Drop unused .regstk directive.
3178 (_fini_EPILOG_BEGINS): Add unwind directives.
3180 2003-12-11 Ulrich Drepper <drepper@redhat.com>
3182 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3183 Assume parameter is a pointer.
3184 (lll_futex_wake): Likewise.
3185 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
3187 (lll_futex_wake): Likewise.
3188 Reported by Boris Hu.
3189 * sysdeps/unix/sysv/linux/unregister-atfork.c
3190 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
3192 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
3194 2003-12-10 Ulrich Drepper <drepper@redhat.com>
3196 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
3197 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
3198 __rtld_lock_initialize for ld.so lock.
3199 Patch in part by Adam Li <adam.li@intel.com>.
3201 2003-12-02 David Mosberger <davidm@hpl.hp.com>
3203 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
3204 in $(gnulib). Also, remove stale comment.
3206 2003-11-12 David Mosberger <davidm@hpl.hp.com>
3208 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3209 advantage of new syscall stub and optimize accordingly.
3211 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3212 from SYS_futex, to match expectations of
3213 sysdep.h:DO_INLINE_SYSCALL.
3214 (lll_futex_clobbers): Remove.
3215 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3216 (lll_futex_wake): Likewise.
3217 (lll_futex_requeue): Likewise.
3218 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3219 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3221 (__lll_mutex_lock): Likewise.
3222 (__lll_mutex_cond_lock): Likewise.
3223 (__lll_mutex_timed_lock): Likewise.
3224 (__lll_mutex_unlock): Likewise.
3225 (__lll_mutex_unlock_force): Likewise.
3227 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3228 comes before the include of <sysdep.h>.
3229 (THREAD_SELF_SYSINFO): New macro.
3230 (THREAD_SYSINFO): Likewise.
3231 (INIT_SYSINFO): New macro.
3232 (TLS_INIT_TP): Call INIT_SYSINFO.
3234 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3236 * sysdeps/pthread/createthread.c (create_thread): Use
3237 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3238 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3239 THREAD_SELF_SYSINFO instead of open code.
3240 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3241 (THREAD_SYSINFO): Likewise.
3243 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3245 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3247 2003-12-06 Ulrich Drepper <drepper@redhat.com>
3249 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3250 instead of .init. Patch by David Mosberger.
3252 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
3254 * sysdeps/pthread/configure.in: Remove broken declaration in C
3255 cleanup handling check.
3257 2003-11-30 Andreas Jaeger <aj@suse.de>
3259 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
3260 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
3263 2003-11-27 Jakub Jelinek <jakub@redhat.com>
3265 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3266 * pthread_attr_destroy.c: Include shlib-compat.h.
3267 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3268 is set in iattr->flags.
3269 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3271 2003-11-21 Jakub Jelinek <jakub@redhat.com>
3273 * Makefile (distribute): Add tst-cleanup4aux.c.
3275 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
3278 2003-11-21 Ulrich Drepper <drepper@redhat.com>
3280 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3281 pthread_cond_signal.
3283 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3284 store mutex address if the current value is ~0l.
3285 * sysdeps/pthread/pthread_cond_timedwait.c
3286 (__pthread_cond_timedwait): Likewise.
3287 * sysdeps/pthread/pthread_cond_broadcast.c
3288 (__pthread_cond_broadcast): Don't use requeue for pshared
3291 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3292 (__pthread_cond_wait): Don't store mutex address if the current
3294 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3295 (__pthread_cond_timedwait): Likewise.
3296 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3297 (__pthread_cond_broadcast): Don't use requeue for pshared
3300 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3301 element with ~0l for pshared condvars, with NULL otherwise.
3303 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3304 (__pthread_cond_wait): Don't store mutex address if the current
3306 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3307 (__pthread_cond_timedwait): Likewise.
3308 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3309 (__pthread_cond_broadcast): Don't use requeue for pshared
3312 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3313 * tst-cond12.c: New file.
3314 * tst-cond13.c: New file.
3316 2003-11-17 Ulrich Drepper <drepper@redhat.com>
3318 * sysdeps/pthread/configure.in: Make missing forced unwind support
3321 2003-11-11 Ulrich Drepper <drepper@redhat.com>
3323 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3325 2003-11-06 Ulrich Drepper <drepper@redhat.com>
3327 * Makefile: Add magic to clean up correctly.
3329 2003-11-05 Jakub Jelinek <jakub@redhat.com>
3331 * unwind.c (FRAME_LEFT): Define.
3332 (unwind_stop): Handle old style cleanups here.
3333 (__pthread_unwind): Handle old style cleanups only if
3334 !HAVE_FORCED_UNWIND.
3335 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3336 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3337 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3338 ($(objpfx)tst-cleanupx4): Likewise.
3339 * tst-cleanup4.c: New test.
3340 * tst-cleanup4aux.c: New.
3341 * tst-cleanupx4.c: New test.
3343 2003-11-04 Ulrich Drepper <drepper@redhat.com>
3345 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3346 lll_mutex_*lock macros to skip atomic operations on some archs.
3348 2003-11-03 Ulrich Drepper <drepper@redhat.com>
3350 * sysdeps/pthread/tst-timer.c (main): Initialize
3351 sigev2.sigev_value as well.
3353 2003-10-15 Roland McGrath <roland@redhat.com>
3355 * sysdeps/pthread/configure.in: Barf if visibility attribute support
3357 * sysdeps/pthread/configure: Regenerated.
3359 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3361 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3362 locking macros. No distinction between normal and mutex locking
3364 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3365 Merge bits from lowlevelmutex.S we still need.
3366 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3367 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3368 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3369 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3370 new mutex implementation.
3371 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3372 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3373 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3374 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3375 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3376 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3377 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3378 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3379 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3380 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3381 symbol for entry point to avoid cancellation.
3383 2003-10-07 Jakub Jelinek <jakub@redhat.com>
3385 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3387 (SAVE_OLDTYPE_0): Fix a typo.
3389 2003-10-03 Ulrich Drepper <drepper@redhat.com>
3391 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3392 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
3394 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3396 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3399 2003-10-02 Jakub Jelinek <jakub@redhat.com>
3401 * Makefile (tests): Add tst-cancel19.
3402 * tst-cancel19.c: New test.
3404 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3406 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3407 restoring of the old cancellation type.
3409 2003-09-30 Jakub Jelinek <jakub@redhat.com>
3411 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3413 2003-09-27 Wolfram Gloger <wg@malloc.de>
3415 * sysdeps/pthread/malloc-machine.h: New file
3417 2003-09-24 Roland McGrath <roland@redhat.com>
3419 * allocatestack.c (__make_stacks_executable): Don't ignore return
3420 value from _dl_make_stack_executable.
3422 2003-09-24 Ulrich Drepper <drepper@redhat.com>
3424 * allocatestack.c (__make_stacks_executable): Also change
3425 permission of the currently unused stacks.
3427 * allocatestack.c (change_stack_perm): Split out from
3428 __make_stacks_executable.
3429 (allocate_stack): If the required permission changed between the time
3430 we started preparing the stack and queueing it, change the permission.
3431 (__make_stacks_executable): Call change_stack_perm.
3433 * Makefile: Build tst-execstack-mod locally.
3434 * tst-execstack-mod.c: New file.
3436 2003-09-23 Jakub Jelinek <jakub@redhat.com>
3438 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3440 2003-09-23 Roland McGrath <roland@redhat.com>
3442 * tst-execstack.c: New file.
3443 * Makefile (tests): Add it.
3444 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3445 (LDFLAGS-tst-execstack): New variable.
3447 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3448 whether to use PROT_EXEC for stack mmap.
3449 (__make_stacks_executable): New function.
3450 * pthreadP.h: Declare it.
3451 * init.c (__pthread_initialize_minimal_internal): Set
3452 GL(dl_make_stack_executable_hook) to that.
3454 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3456 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3457 recommendation from AMD re avoidance of lock prefix.
3459 2003-09-22 Jakub Jelinek <jakub@redhat.com>
3461 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3462 lll_futex_timed_wait instead of lll_futex_wait.
3463 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3464 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3465 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3466 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3467 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3468 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3469 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3470 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3471 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3472 Completely revamp the locking macros. No distinction between
3473 normal and mutex locking anymore.
3474 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3475 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3476 __lll_lock_timedwait): Fix prototypes.
3477 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3478 __lll_lock_timedwait): Likewise.
3479 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3480 macros, add __builtin_expect.
3481 (lll_mutex_timedlock): Likewise. Fix return value.
3482 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3483 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3484 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3485 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3486 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3487 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3488 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3489 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3491 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3493 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3494 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3495 operation if possible.
3497 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3498 like jumping over the lock prefix.
3500 2003-09-21 Ulrich Drepper <drepper@redhat.com>
3502 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3503 locking macros. No distinction between normal and mutex locking
3505 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3506 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3507 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3508 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3509 locking. Merge bits from lowlevelmutex.S we still need.
3510 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3511 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3512 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3513 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3514 * Makefile (routines): Remove libc-lowlevelmutex.
3515 (libpthread-rountines): Remove lowlevelmutex.
3516 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3517 for new mutex implementation.
3518 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3520 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3521 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3522 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3524 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3526 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3527 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3528 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3529 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3530 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3531 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3532 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3533 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3535 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3537 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3538 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3541 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3542 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3544 2003-09-20 Ulrich Drepper <drepper@redhat.com>
3546 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3547 in parameters of asm with output parameters.
3549 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3550 type of DECR parameter to int.
3551 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3553 2003-09-18 Jakub Jelinek <jakub@redhat.com>
3555 * tst-attr3.c (tf, do_test): Print stack start/end/size and
3556 guardsize for each thread.
3558 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3560 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3561 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3562 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3564 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3565 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3567 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3568 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3569 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3570 (pthread_getaffinity_np): Add hidden_def.
3572 * Makefile (tests): Add tst-attr3.
3573 * tst-attr3.c: New test.
3575 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3577 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3579 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3580 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3582 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3584 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3585 * tst-align.c: Include tst-stack-align.h.
3586 (tf, do_test): Use TEST_STACK_ALIGN macro.
3588 2003-09-17 Ulrich Drepper <drepper@redhat.com>
3590 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3593 2003-09-16 Ulrich Drepper <drepper@redhat.com>
3595 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3596 stack-related values for the initial thread.
3598 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3600 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3602 2003-09-11 Ulrich Drepper <drepper@redhat.com>
3604 * pthread_mutex_lock.c: Minor code rearrangements.
3606 2003-09-05 Roland McGrath <roland@redhat.com>
3608 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3609 Instead, include ../nptl_db/db_info.c to do its magic.
3610 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3611 (__pthread_pthread_key_2ndlevel_size): Likewise.
3612 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3613 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3614 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3615 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3616 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3617 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3618 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3619 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3620 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3621 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3622 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3623 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3624 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3625 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3626 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3627 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3628 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3630 2003-09-08 Ulrich Drepper <drepper@redhat.com>
3632 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3633 of pthread_t to be compatible with LT.
3634 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3635 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3636 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3637 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3638 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3639 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3640 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3642 2003-09-04 Ulrich Drepper <drepper@redhat.com>
3644 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3646 2003-09-04 Jakub Jelinek <jakub@redhat.com>
3648 * unwind-forcedunwind.c: Move to...
3649 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3650 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3651 * sysdeps/pthread/jmpbuf-unwind.h: New file.
3652 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3653 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3654 * unwind.c: Include jmpbuf-unwind.h.
3655 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3657 2003-09-02 Jakub Jelinek <jakub@redhat.com>
3659 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3660 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3661 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3662 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3663 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3664 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3665 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3666 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3667 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3668 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3669 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3671 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3672 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3673 * Makefile (tests): Add tst-stack2.
3674 * tst-stack2.c: New test.
3675 * tst-stack1.c: Include limits.h and sys/param.h.
3676 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3678 * pthread_condattr_setpshared.c: Include errno.h.
3679 (pthread_condattr_setpshared): Return EINVAL if pshared
3680 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3682 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3683 defined symbol for entry point to avoid cancellation.
3684 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3686 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3688 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3690 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3692 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3694 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3695 __close_nocancel, __read_nocancel, __write_nocancel,
3696 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
3697 libpthread.so or librt.so, define to corresponding function
3698 without _nocancel suffix.
3699 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3700 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3701 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3703 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3705 2003-09-02 Ulrich Drepper <drepper@redhat.com>
3707 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3708 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3710 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3711 in subsections has a symbol associated with it.
3713 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3714 defined symbol for entry point to avoid cancellation.
3715 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3717 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3719 * Makefile (tests): Add tst-tls5.
3720 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3721 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3722 ($(objpfx)tst-tls5): New.
3723 ($(objpfx)tst-tls6.out): Likewise.
3724 (tests): Depend on $(objpfx)tst-tls6.out.
3725 * tst-tls3.c: Include stdint.h and pthreaddef.h.
3726 (do_test): Check pthread_self () return value alignment.
3727 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3728 (tf): Check pthread_self () return value alignment.
3729 * tst-tls5.c: New test.
3731 * tst-tls5mod.c: New.
3732 * tst-tls5moda.c: New.
3733 * tst-tls5modb.c: New.
3734 * tst-tls5modc.c: New.
3735 * tst-tls5modd.c: New.
3736 * tst-tls5mode.c: New.
3737 * tst-tls5modf.c: New.
3738 * tst-tls6.sh: New test.
3740 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3741 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3742 * init.c (pthread_functions): Initialize them.
3743 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3744 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3745 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3746 pthread_cond_timedwait@@GLIBC_2.3.2.
3748 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3750 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3751 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3752 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3753 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3754 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3755 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3757 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3759 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3760 _POSIX_THREAD_PRIORITY_SCHEDULING.
3761 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3763 2003-08-31 Ulrich Drepper <drepper@redhat.com>
3765 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3766 nested function, use static inline function from libio.h.
3767 Code by Richard Henderson.
3769 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3772 2003-08-30 Jakub Jelinek <jakub@redhat.com>
3774 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3775 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3776 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3777 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3778 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3779 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3780 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3781 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3782 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3783 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3784 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3785 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3786 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3787 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3788 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3789 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3790 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3791 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3792 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3793 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3794 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3795 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3796 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3797 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3798 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3799 * sysdeps/sparc/tls.h: New file.
3800 * sysdeps/sparc/tcb-offsets.sym: New file.
3801 * sysdeps/sparc/Makefile: New file.
3802 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3803 * init.c [__sparc__] (__NR_set_tid_address): Define.
3805 2003-08-29 Jakub Jelinek <jakub@redhat.com>
3807 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3808 _IO_release_lock): Define.
3810 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
3812 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3813 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
3815 2003-08-27 Ulrich Drepper <drepper@redhat.com>
3817 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3818 (__pthread_cleanup_class): Add missing return types of member
3821 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
3823 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3824 (lll_mutex_unlock_force): Add memory barrier between store and futex
3827 2003-08-25 Ulrich Drepper <drepper@redhat.com>
3829 * tst-cancel4.c (do_test): Also unlink tempfname and remove
3830 tempmsg in first loop.
3832 2003-08-18 Ulrich Drepper <drepper@redhat.com>
3834 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3835 _POSIX_THREAD_PRIORITY_SCHEDULING.
3836 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3838 2003-08-07 Jakub Jelinek <jakub@redhat.com>
3840 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
3841 (__rtld_lock_default_lock_recursive,
3842 __rtld_lock_default_unlock_recursive): Define.
3843 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3844 __rtld_lock_unlock_recursive): Define using
3845 GL(_dl_rtld_*lock_recursive).
3846 * init.c (__pthread_initialize_minimal_internal): Initialize
3847 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3848 Lock GL(_dl_load_lock) the same number of times as
3849 GL(_dl_load_lock) using non-mt implementation was nested.
3851 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3852 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3854 2003-08-06 Jakub Jelinek <jakub@redhat.com>
3856 * tst-cancel17.c (do_test): Make len2 maximum of page size and
3859 2003-08-07 Jakub Jelinek <jakub@redhat.com>
3861 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3863 2003-08-03 Jakub Jelinek <jakub@redhat.com>
3865 * sysdeps/pthread/createthread.c (do_clone): Move error handling
3866 to first syscall error check. Move syscall error check for tkill
3867 into __ASSUME_CLONE_STOPPED #ifdef.
3869 2003-08-02 Ulrich Drepper <drepper@redhat.com>
3871 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3872 is not defined, do explicit synchronization.
3873 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
3874 is not defined also unlock pd->lock for non-debugging case in case
3876 * pthread_create.c (start_thread): Always get and release pd->lock
3877 if __ASSUME_CLONE_STOPPED is not defined.
3878 (start_thread_debug): Removed. Adjust users.
3879 * allocatestack.c (allocate_stack): Always initialize lock if
3880 __ASSUME_CLONE_STOPPED is not defined.
3881 * Makefile (tests): Add tst-sched1.
3882 * tst-sched1.c: New file.
3884 * sysdeps/pthread/createthread.c (do_clone): Only use
3885 sched_setschduler and pass correct parameters.
3887 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3889 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3890 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3891 PTHREAD_STACK_MIN in comments.
3893 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3895 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3896 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3898 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3899 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3900 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3901 (__pthread_cleanup_upto): Fix prototype.
3902 (_longjmp_unwind): Adjust caller.
3903 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3904 Change second argument to const struct pointer.
3905 * tst-sem8.c (main): Remove unused s2 and s3 variables.
3906 * tst-sem9.c (main): Likewise.
3907 * unwind.c: Include string.h for strlen prototype.
3909 2003-07-31 Ulrich Drepper <drepper@redhat.com>
3911 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3912 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3913 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3915 Patch by Nicholas Miell <nmiell@attbi.com>.
3917 2003-07-30 Jakub Jelinek <jakub@redhat.com>
3919 * init.c (__pthread_initialize_minimal_internal): Initialize
3920 GL(dl_init_static_tls).
3921 * pthreadP.h (__pthread_init_static_tls): New prototype.
3922 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3924 * Makefile (tests): Add tst-tls4.
3925 (modules-names): Add tst-tls4moda and tst-tls4modb.
3926 ($(objpfx)tst-tls4): Link against libdl and libpthread.
3927 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3929 * tst-tls4.c: New file.
3930 * tst-tls4moda.c: New file.
3931 * tst-tls4modb.c: New file.
3933 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
3935 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3936 before __timer_dealloc.
3937 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3938 Don't call list_unlink.
3940 2003-07-29 Roland McGrath <roland@redhat.com>
3942 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3944 2003-07-25 Jakub Jelinek <jakub@redhat.com>
3946 * tst-cancel17.c (do_test): Check if aio_cancel failed.
3947 Don't reuse struct aiocb A if it failed.
3948 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3949 not just one byte, as that does not block.
3951 2003-07-22 Jakub Jelinek <jakub@redhat.com>
3953 * sysdeps/pthread/unwind-resume.c: New file.
3954 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3955 unwind-resume in csu subdir.
3956 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3958 (librt-sysdep_routines, librt-shared-only-routines): Add
3960 * sysdeps/pthread/rt-unwind-resume.c: New file.
3961 * unwind-forcedunwind.c: New file.
3962 * Makefile (libpthread-routines): Add unwind-forcedunwind.
3963 (libpthread-shared-only-routines): Likewise.
3964 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3965 * pthreadP.h (pthread_cancel_init): New prototype.
3966 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3968 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3969 attr argument const struct pthread_attr *.
3971 * res.c (__res_state): Return __resp.
3972 * descr.h: Include resolv.h.
3973 (struct pthread): Add res field.
3974 * pthread_create.c: Include resolv.h.
3975 (start_thread): Initialize __resp.
3976 * Makefile (tests): Add tst-_res1.
3977 (module-names): Add tst-_res1mod1, tst-_res1mod2.
3978 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3979 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3981 * tst-_res1.c: New file.
3982 * tst-_res1mod1.c: New file.
3983 * tst-_res1mod2.c: New file.
3985 2003-07-21 Ulrich Drepper <drepper@redhat.com>
3987 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
3989 * Makefile: Define various *-no-z-defs variables for test DSOs
3990 which has undefined symbols.
3992 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
3994 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3995 Retry if the stwcx fails to store once_control.
3997 2003-07-20 Ulrich Drepper <drepper@redhat.com>
3999 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
4000 pthread_attr_setaffinity.
4001 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
4002 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
4003 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
4004 * pthread_attr_destroy.c: Free cpuset element if allocated.
4005 * pthread_create.c: Pass iattr as additional parameter to
4007 * sysdeps/pthread/createthread.c: If attribute is provided and
4008 a new thread is created with affinity set or scheduling parameters,
4009 start thread with CLONE_STOPPED.
4010 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
4011 pthread_attr_setaffinity.
4012 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4015 2003-07-15 Ulrich Drepper <drepper@redhat.com>
4017 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
4019 2003-07-14 Ulrich Drepper <drepper@redhat.com>
4021 * sysdeps/pthread/configure.in: Require CFI directives also for
4024 2003-07-15 Jakub Jelinek <jakub@redhat.com>
4026 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
4029 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4031 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
4033 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
4034 registers as variables. Call __pthread_mutex_unlock_usercnt.
4035 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4036 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
4037 not self pointer in __writer. Compare with TID to determine
4039 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4040 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4042 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4044 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
4045 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4046 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
4047 macros also when compiling librt.
4049 2003-07-11 Jakub Jelinek <jakub@redhat.com>
4051 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
4052 -fasynchronous-unwind-tables.
4053 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4054 (PSEUDO): Add cfi directives.
4055 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
4057 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
4060 2003-07-08 Jakub Jelinek <jakub@redhat.com>
4062 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
4063 __pthread_unregister_cancel): Add prototypes and hidden_proto.
4064 * unwind.c (__pthread_unwind_next): Add hidden_def.
4065 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
4067 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4068 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4069 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4071 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
4072 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4074 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
4075 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
4076 __pthread_unregister_cancel and __pthread_unwind_next.
4078 2003-07-04 Jakub Jelinek <jakub@redhat.com>
4080 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
4081 different symbol for the cancellation syscall wrapper and
4082 non-cancellation syscall wrapper.
4083 (PSEUDO_END): Define.
4085 2003-07-05 Richard Henderson <rth@redhat.com>
4087 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
4088 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
4089 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4090 return actual return value from the syscall, not 0.
4092 2003-07-07 Ulrich Drepper <drepper@redhat.com>
4094 * descr.h (struct pthread): Add pid field.
4095 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
4096 (__reclaim_stacks): Likewise.
4097 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
4098 also check for PID of the signal source.
4099 (__pthread_initialize_minimal_internal): Also initialize pid field
4100 of initial thread's descriptor.
4101 * pthread_cancel.c: Use tgkill instead of tkill if possible.
4102 * sysdeps/unix/sysv/linux/fork.c: Likewise.
4103 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
4104 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4105 * sysdeps/unix/sysv/linux/raise.c: Likewise.
4107 2003-07-05 Ulrich Drepper <drepper@redhat.com>
4109 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
4110 Fix use of parameter.
4111 (__libc_cleanup_pop): Likewise.
4113 2003-07-04 Ulrich Drepper <drepper@redhat.com>
4115 * init.c (sigcancel_handler): Change parameters to match handler
4116 for SA_SIGACTION. Check signal number and code to recognize
4117 invalid invocations.
4119 2003-07-03 Roland McGrath <roland@redhat.com>
4121 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
4122 Apply sizeof (struct pthread) bias to r13 value.
4124 2003-07-03 Ulrich Drepper <drepper@redhat.com>
4126 * sysdeps/pthread/configure.in: Require CFI directives.
4128 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
4130 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
4131 libpthread compilation.
4132 * unwind.c (__pthread_unwind): Add hidden_def.
4133 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
4135 2003-07-01 Ulrich Drepper <drepper@redhat.com>
4137 * libc-cancellation.c (__libc_cleanup_routine): Define.
4138 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
4139 (__pthread_cleanup_pop): Define.
4141 2003-07-01 Richard Henderson <rth@redhat.com>
4143 * sysdeps/alpha/elf/pt-initfini.c: New file.
4144 * sysdeps/alpha/pthread_spin_lock.S: New file.
4145 * sysdeps/alpha/pthread_spin_trylock.S: New file.
4146 * sysdeps/alpha/pthreaddef.h: New file.
4147 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
4148 * sysdeps/alpha/tls.h: New file.
4149 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
4150 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
4151 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
4152 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
4153 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
4154 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
4155 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
4156 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
4157 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
4158 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
4160 2003-07-01 Ulrich Drepper <drepper@redhat.com>
4162 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
4163 cleanup support and unwind info.
4165 2003-06-30 Ulrich Drepper <drepper@redhat.com>
4167 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4168 Use correct cleanup handler registration. Add unwind info.
4169 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
4170 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
4171 * tst-once3.c: Add cleanup handler and check it is called.
4172 * tst-once4.c: Likewise.
4173 * tst-oncex3.c: New file.
4174 * tst-oncex4.c: New file.
4175 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
4177 2003-06-29 Ulrich Drepper <drepper@redhat.com>
4179 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
4181 2003-06-27 Ulrich Drepper <drepper@redhat.com>
4183 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
4184 (tf_msgsnd): Likewise.
4186 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
4187 premature returns a bit more.
4189 2003-06-26 Ulrich Drepper <drepper@redhat.com>
4191 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
4192 definition to the front.
4194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
4195 the cleanup functions to make the names unique. Fix dwarf opcode
4197 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
4198 functions to make the names unique. Fix CFA offset for two blocks.
4200 2003-06-25 Ulrich Drepper <drepper@redhat.com>
4202 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
4203 missing closing braces.
4204 Patch by Christophe Saout <christophe@saout.de>.
4206 2003-06-24 Roland McGrath <roland@redhat.com>
4208 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
4210 2003-06-24 Ulrich Drepper <drepper@redhat.com>
4212 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
4213 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
4215 * pthreadP.h: Declare __find_thread_by_id.
4216 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
4217 * pthread_clock_gettime.c: Allow using other thread's clock.
4218 * pthread_clock_settime.c: Likewise.
4219 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4220 * Makefile: Add rules to build and run tst-clock2.
4221 * tst-clock2.c: New file.
4223 2003-06-23 Ulrich Drepper <drepper@redhat.com>
4225 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
4226 to use exception-based cleanup handler.
4227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4229 * tst-cond8.c (ch): Announce that we are done.
4231 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
4233 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
4234 Also test aio_suspend with timeout value.
4236 2003-06-22 Ulrich Drepper <drepper@redhat.com>
4238 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
4239 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
4242 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
4243 (__pthread_mutex_lock_internal): Likewise.
4244 (__pthread_mutex_unlock_internal): Likewise.
4245 (__pthread_mutex_unlock_usercnt): Declare.
4246 * pthread_mutex_destroy.c: Always fail if used in any way.
4247 * pthread_mutex_init.c: Update comment.
4248 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
4249 * pthread_mutex_timedlock.c: Adjust __nusers.
4250 * pthread_mutex_trylock.c: Adjust __nusers.
4251 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
4252 and public interfaces are wrapper with pass additional parameter.
4253 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
4255 * tst-mutex8.c: New file.
4256 * Makefile (tests): Add tst-mutex8.
4257 * sysdeps/pthread/pthread_cond_timedwait.c: Call
4258 __pthread_mutex_unlock_usercnt.
4259 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4260 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4261 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4262 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4263 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4264 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
4265 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4267 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4268 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4269 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4270 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4271 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4273 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
4274 * pthread_mutex_timedlock.c: Likewise.
4275 * pthread_mutex_trylock.c: Adjust __nusers.
4276 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
4277 * tst-mutex9.c: New file.
4278 * Makefile (tests): Add tst-mutex9.
4279 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
4280 * sysdeps/ia64/tls.h: Likewise.
4281 * sysdeps/powerpc/tls.h: Likewise.
4282 * sysdeps/s390/tls.h: Likewise.
4283 * sysdeps/sh/tls.h: Likewise.
4284 * sysdeps/x86_64/tls.h: Likewise.
4285 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4286 Change type of __owner.
4287 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4288 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4289 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4290 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4291 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4293 2003-06-19 Jakub Jelinek <jakub@redhat.com>
4295 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
4296 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
4298 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
4299 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
4300 instead of nr to lll_futex_wake. Only set errno and return -1
4303 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
4304 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4305 return actual return value from the syscall, not 0.
4307 2003-06-18 Ulrich Drepper <drepper@redhat.com>
4309 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
4310 find a random value.
4311 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
4314 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
4315 compat_timer_settime.
4316 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
4317 compat_timer_gettime.
4318 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4319 compat_timer_getoverrun.
4320 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4321 compat_timer_delete.
4323 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4324 error-checking mutex detect busy mutexes.
4326 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4328 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4329 Add ax to clobber list.
4330 (lll_mutex_cond_lock): Likewise.
4331 (lll_mutex_unlock): Likewise.
4332 (lll_lock): Likewise.
4333 (lll_unlock): Likewise.
4335 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4336 * tst-cancel18.c: New file.
4337 * tst-cancelx18.c: New file.
4339 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4342 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4343 * tst-cancel17.c: New file.
4344 * tst-cancelx17.c: New file.
4346 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4347 * sysdeps/unix/sysv/linux/sigwait.c: New file.
4348 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4350 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4352 2003-06-16 Jakub Jelinek <jakub@redhat.com>
4354 * sysdeps/pthread/createthread.c (create_thread): Set
4355 header.multiple_threads unconditionally.
4356 * allocatestack.c (allocate_stack): Likewise.
4357 * descr.h (struct pthread): Add header.multiple_threads
4359 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4360 Define for librt. #error if neither libpthread, libc nor librt.
4361 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4363 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4364 CDISABLE): Likewise.
4365 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4366 CDISABLE): Likewise.
4367 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4368 CDISABLE): Likewise.
4369 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4370 CDISABLE): Likewise. Access header.multiple_threads outside of
4371 libc and libpthread.
4372 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4374 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4375 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4377 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4379 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4380 Also test early cancellation before the thread reaches the cancellation
4383 * Makefile: Compile forward.c with exceptions.
4385 * sysdeps/unix/sysv/linux/sleep.c: New file.
4387 2003-06-16 Ulrich Drepper <drepper@redhat.com>
4389 * Makefile: Add CFLAGS definition to compile function wrappers
4390 duplicated from libc with exceptions.
4391 * tst-cancel4.c: Also check cancellation handlers.
4393 * Makefile: Add rules to build and run tst-cancel16 and
4394 tst-cancelx16. Add missing CFLAGS definitions.
4395 * tst-cancel16.c: New file.
4396 * tst-cancelx16.c: New file.
4398 2003-06-15 Ulrich Drepper <drepper@redhat.com>
4400 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4401 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4402 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4403 (DL_SYSINFO_IMPLEMENTATION): Likewise.
4405 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4406 (LIBC_CANCEL_RESET): Likewise.
4407 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4408 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4410 (CFLAGS-libcrt-cancellation.c): Define.
4411 * sysdeps/pthread/librt-cancellation.c: New file.
4412 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4413 macros also when compiling librt.
4414 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4415 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4416 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4417 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4418 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4419 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4420 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4422 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4423 compat_timer_create.
4425 2003-06-14 Ulrich Drepper <drepper@redhat.com>
4427 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4429 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4431 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4432 Add libc_hidden_def.
4434 2003-06-13 Roland McGrath <roland@redhat.com>
4436 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4437 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4439 2003-06-11 Ulrich Drepper <drepper@redhat.com>
4441 * allocatestack.c (queue_stack): Always inline.
4442 * ptreadhP.h (__do_cancel): Likewise.
4444 2003-06-10 Jakub Jelinek <jakub@redhat.com>
4446 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4449 2003-06-10 Ulrich Drepper <drepper@redhat.com>
4451 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4452 (__pthread_cond_signal): Remove incorrect second addition for
4455 2003-06-09 Ulrich Drepper <drepper@redhat.com>
4457 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4458 (__pthread_cond_signal): Use correct futex pointer in
4459 __lll_mutex_lock_wait call.
4461 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4462 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4464 2003-06-08 Ulrich Drepper <drepper@redhat.com>
4466 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4468 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4471 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4472 hand-written CFI generation code. Since ENTRY/END also initiated
4473 CFI frames this caused two CFI sets to be generated.
4475 2003-06-07 Ulrich Drepper <drepper@redhat.com>
4477 * cleanup_routine.c: New file.
4478 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4479 * sysdeps/pthread/pthread.h: Add support for fully exception-based
4481 * Makefile (libpthread-routines): Add cleanup_routine.
4482 Add more CFLAGS variables to compile with exceptions. Add comments
4483 why which file needs unwind tables.
4484 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4486 * tst-cancelx1.c: New file.
4487 * tst-cancelx2.c: New file.
4488 * tst-cancelx3.c: New file.
4489 * tst-cancelx4.c: New file.
4490 * tst-cancelx5.c: New file.
4491 * tst-cancelx6.c: New file.
4492 * tst-cancelx7.c: New file.
4493 * tst-cancelx8.c: New file.
4494 * tst-cancelx9.c: New file.
4495 * tst-cancelx10.c: New file.
4496 * tst-cancelx11.c: New file.
4497 * tst-cancelx12.c: New file.
4498 * tst-cancelx13.c: New file.
4499 * tst-cancelx14.c: New file.
4500 * tst-cancelx15.c: New file.
4501 * tst-cleanupx0.c: New file.
4502 * tst-cleanupx0.expect: New file.
4503 * tst-cleanupx1.c: New file.
4504 * tst-cleanupx2.c: New file.
4505 * tst-cleanupx3.c: New file.
4507 * tst-cleanup0.c: Make standard compliant.
4508 * tst-cleanup1.c: Likewise.
4510 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4511 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4512 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4513 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4514 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4515 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4516 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4518 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4519 * tst-cancel12.c: New file.
4520 * tst-cancel13.c: New file.
4521 * tst-cancel14.c: New file.
4522 * tst-cancel15.c: New file.
4523 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4526 * tst-cancel1.c: Add some comments.
4528 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4531 2003-06-06 Ulrich Drepper <drepper@redhat.com>
4533 * Makefile (CFLAGS-pthread_cancel.c): Define.
4535 2003-06-05 Ulrich Drepper <drepper@redhat.com>
4537 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4538 Change type of __writer element to int.
4539 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4540 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4541 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4542 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4543 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4544 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4545 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4546 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4547 Compare with TID to determine deadlocks.
4548 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4549 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4550 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4551 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4552 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4553 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4555 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4557 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4558 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4559 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4561 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4563 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4564 * Makefile (tests): Add tst-rwlock12.
4565 * tst-rwlock12.c: New file.
4567 2003-06-05 Jakub Jelinek <jakub@redhat.com>
4569 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4570 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4571 Remove bogus hidden_proto.
4572 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4574 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4575 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4576 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4577 ___lll_mutex_timedlock): Likewise.
4579 2003-06-04 Ulrich Drepper <drepper@redhat.com>
4581 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4582 (__pthread_cond_signal): Add some code to eventually handle
4585 2003-06-01 Ulrich Drepper <drepper@redhat.com>
4587 * Makefile (tests): Add tst-exec4.
4588 (tst-exec4-ARGS): Define.
4589 * tst-exec4.c: New file.
4591 2003-05-31 Ulrich Drepper <drepper@redhat.com>
4593 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4594 Also fail if tv_nsec < 0.
4595 (__lll_timedwait_tid): Likewise.
4596 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4597 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4599 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4601 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4603 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4605 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4607 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4610 * Makefile (tests): Add tst-sem8 and tst-sem9.
4611 * tst-sem8.c: New file.
4612 * tst-sem9.c: New file.
4613 * sem_open.c: Fix creation of in_use record if the file exists but
4616 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4619 * sysdeps/pthread/timer_create.c (timer_create): In case
4620 evp==NULL, assign timer ID to sival_ptr.
4622 * descr.h (struct pthread_unwind_buf): Change type of prev element to
4623 struct pthread_unwind_buf *.
4624 (struct pthread): Likewise for cleanup_jmp_buf element.
4626 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4627 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4628 * unwind.c (__pthread_unwind_next): Likewise.
4630 2003-05-30 Ulrich Drepper <drepper@redhat.com>
4632 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4633 (lll_futex_timed_wait): Use int for futex value parameter.
4634 (lll_futex_wake): Likewise.
4635 (lll_futex_requeue): Likewise.
4637 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4638 Replace one memory operation with one register operation.
4640 * tst-join4.c (do_test): Fix error message.
4642 * tst-rwlock6.c (do_test): Use correct format specifier.
4644 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4645 (__lll_mutex_lock_wait): Replace one memory operation with one
4647 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4648 (__lll_mutex_lock_wait): Likewise.
4650 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4651 (__lll_mutex_cond_lock): Add one to value parameter of
4652 __lll_lock_wait to reflect reality in the futex syscall.
4653 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4654 (lll_mutex_cond_lock): Likewise.
4656 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4658 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4660 (lll_mutex_cond_lock): Define.
4662 2003-05-29 Ulrich Drepper <drepper@redhat.com>
4664 * Makefile (tests): Add tst-signal6.
4665 * tst-signal6.c: New file.
4667 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4668 (__lll_mutex_unlock_force): New function
4669 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4671 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4672 (__lll_mutex_unlock_force): New function.
4673 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4675 * tst-rwlock7.c (do_test): Use correct format specifier.
4677 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4678 Find break parameter in correct asm argument.
4680 2003-05-27 Jakub Jelinek <jakub@redhat.com>
4682 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4684 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4686 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4688 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4689 lll_futex_requeue, lll_mutex_unlock_force): Define.
4691 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4693 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4694 (pthread_cond_t): Add __mutex.
4695 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4696 lll_futex_requeue, lll_mutex_unlock_force): Define.
4698 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4700 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4701 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4703 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4705 (lll_futex_wait, lll_futex_wake): Define.
4706 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4707 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4708 FUTEX_REQUEUE instead of FUTEX_WAIT.
4709 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4710 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4711 mutex which was used in condvar structure. Call
4712 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4713 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4715 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4716 include tcb-offsets.h. Read wakeup value in locked region.
4717 Use the value of gbr register as THREAD_ID.
4718 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4719 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4720 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4722 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4725 2003-05-28 Ulrich Drepper <drepper@redhat.com>
4727 * sysdeps/pthread/pthread_cond_broadcast.c
4728 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4730 2003-05-26 Ulrich Drepper <drepper@redhat.com>
4732 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4733 typo in register name.
4734 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4735 correctly. Actually use requeue. Little optimization.
4736 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4737 mutex address early. Handle cancellation state as 32-bit value.
4738 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4739 Remove unnecessary label.
4741 2003-05-25 Ulrich Drepper <drepper@redhat.com>
4743 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4744 instead of FUTEX_WAIT.
4745 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4746 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4747 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4748 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4749 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4750 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
4751 used in condvar structure. Call __pthread_mutex_cond_lock instead
4752 of __pthread_mutex_lock_internal.
4753 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4754 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4755 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4756 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
4757 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4758 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4759 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
4760 Add pthread_mutex_cond_lock.
4761 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
4762 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
4763 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
4764 lll_mutex_cond_lock.
4765 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4766 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4767 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4769 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4770 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4772 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
4773 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4775 * pthreadP.h: Declare __pthread_mutex_cond_lock.
4776 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
4777 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
4778 macro don't define aliases.
4780 * cancellation.c: Remove __pthread_enable_asynccancel_2.
4781 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
4782 * sysdeps/pthread/pthread_cond_timedwait.c: Use
4783 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
4784 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4785 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4786 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4787 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4788 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4790 2003-05-17 Ulrich Drepper <drepper@redhat.com>
4792 * sem_open.c: Fix one endless loop. Implement correct semantics
4793 wrt opening the same semaphore more then once.
4794 * sem_close.c: Adjust for sem_open change.
4795 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
4796 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
4797 * Makefile (tests): Add tst-sem7.
4798 * tst-sem7.c: New file.
4800 2003-05-16 Roland McGrath <roland@redhat.com>
4802 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
4803 uninitialized variable braino.
4805 2003-05-16 Ulrich Drepper <drepper@redhat.com>
4807 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
4808 test for syscall availability.
4810 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
4811 __no_posix_timers to -1 if the syscalls don't exist.
4813 * pthread_join.c (pthread_join): Set tid field of the joined
4814 thread to -1. This isn't necessary but helps to recognize some
4815 error conditions with almost no cost.
4817 * allocatestack.c (FREE_P): Also negative values indicate an
4820 * unwind.c: Include <unistd.h>.
4822 2003-05-14 Ulrich Drepper <drepper@redhat.com>
4824 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
4826 2003-05-14 Jakub Jelinek <jakub@redhat.com>
4828 * Makefile (crti-objs, crtn-objs): New variables.
4829 (omit-deps, extra-objs): Add crtn.
4830 ($(objpfx)libpthread.so): Depend on both crti and crtn
4831 and links to them in multidir.
4832 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
4834 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
4836 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4837 (lll_mutex_unlock): Use atomic_exchange_rel.
4839 2003-05-11 Ulrich Drepper <drepper@redhat.com>
4841 * cond-perf.c (cons): Add missing locking around setting of alldone.
4843 2003-05-10 Ulrich Drepper <drepper@redhat.com>
4845 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4847 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4849 2003-05-09 Ulrich Drepper <drepper@redhat.com>
4851 * tst-sem6.c: New file.
4852 * Makefile (tests): Add tst-sem6.
4854 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4855 Use atomic_exchange_rel instead of atomic_exchange.
4856 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4859 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4860 code for lll_futex_wait and lll_futex_wake in static apps. Use
4861 vsyscall is possible.
4863 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4864 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4865 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4866 pthread_setaffinity_np.
4867 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4868 and pthread_setaffinity_np.
4869 * Makefile (libpthread-routines): Add pthread_getaffinity and
4870 pthread_setaffinity.
4872 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4873 use it in case mmap to allocate the stack fails.
4874 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4875 ARCH_MAP_FLAGS here.
4876 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4879 2003-05-08 Ulrich Drepper <drepper@redhat.com>
4881 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4882 handler implementation. It is now lockless in fork().
4883 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4884 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4885 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
4886 declare the __fork_*_lists.
4887 (struct fork_handler): Include pointers to all three functions.
4888 Add next, refcntr and need_signal elements.
4889 (__fork_handlers): New declaration.
4890 (__register_atfork_malloc): Remove declaration.
4891 (HAVE_register_atfork_malloc): Remove definition.
4892 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4893 __pthread_child_handler variable.
4894 (__libc_pthread_init): Use __register_atfork instead of explicitly
4896 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4898 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4900 * unwind.c (unwind_cleanup): Print error message and then abort. This
4901 function must never be reached.
4903 * cond-perf.c: New file.
4905 2003-05-05 Ulrich Drepper <drepper@redhat.com>
4907 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4909 2003-05-04 Roland McGrath <roland@redhat.com>
4911 * Makefile ($(objpfx)../libc.so): New target.
4913 2003-05-02 Ulrich Drepper <drepper@redhat.com>
4915 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4916 (pthread_condattr_t): Size is only an int, don't use long for
4918 (pthread_mutexattr_t): Likewise.
4919 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4920 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4921 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4923 2003-05-01 Ulrich Drepper <drepper@redhat.com>
4925 * sysdeps/i386/tls.h: Define THREAD_ID.
4926 * sysdeps/ia64/tls.h: Likewise.
4927 * sysdeps/powerpc/tls.h: Likewise.
4928 * sysdeps/s390/tls.h: Likewise.
4929 * sysdeps/sh/tls.h: Likewise.
4930 * sysdeps/x86_64/tls.h: Likewise.
4931 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4933 * pthread_mutex_timedlock.c: Likewise.
4934 * pthread_mutex_trylock.c: Likewise.
4935 * pthread_mutex_unlock.c: Likewise.
4936 * pthread_rwlock_trywrlock.c: Likewise.
4937 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4938 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4939 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4940 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4942 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4945 2003-04-29 Jakub Jelinek <jakub@redhat.com>
4947 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4948 (__SIZEOF_PTHREAD_COND_T): Define to 48.
4949 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4950 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4951 Make __align long long instead of long.
4952 (pthread_rwlock_t): Formatting.
4953 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4954 (pthread_rwlock_t): Formatting.
4955 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4956 (pthread_cond_t): Make __align long long instead of long.
4957 (pthread_rwlock_t): Move __flags field to the same position as in
4960 2003-04-30 Ulrich Drepper <drepper@redhat.com>
4962 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4963 * tst-rwlock7.c (do_test): Likewise.
4965 2003-04-26 Roland McGrath <roland@redhat.com>
4967 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4969 2003-04-22 Jakub Jelinek <jakub@redhat.com>
4971 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4972 sizeof (struct pthread).
4973 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
4975 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
4977 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
4979 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
4981 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
4983 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
4985 (NO_TLS_OFFSET): Define.
4986 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
4987 add TLS_TCB_SIZE unnecessarily.
4989 2003-04-22 Roland McGrath <roland@redhat.com>
4991 * Makeconfig (shared-thread-library): Reverse link order to work
4994 2003-04-22 Ulrich Drepper <drepper@redhat.com>
4996 * semaphore.h: Fix typo in comment.
4998 2003-04-21 Ulrich Drepper <drepper@redhat.com>
5000 * sysdeps/pthread/sigfillset.c: New file.
5002 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
5003 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
5004 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
5005 * sysdeps/pthread/sigaction.c: Likewise.
5006 * sysdeps/pthread/sigprocmask.c: New file.
5007 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
5009 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5010 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
5013 2003-04-19 Ulrich Drepper <drepper@redhat.com>
5015 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5016 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
5018 * sysdeps/unix/sysv/linux/unregister-atfork.c
5019 (__unregister_atfork): Don't free memory not allocated dynamically.
5021 * semaphore.h: Remove __THROW marker from cancellation points.
5022 * nptl/sysdeps/pthread/pthread.h: Likewise.
5024 2003-04-18 Ulrich Drepper <drepper@redhat.com>
5026 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
5027 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
5030 2003-04-16 Jakub Jelinek <jakub@redhat.com>
5032 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
5034 2003-04-15 Roland McGrath <roland@redhat.com>
5036 * forward.c (__pthread_unwind): Tweak to avoid warning.
5038 2003-04-15 Ulrich Drepper <drepper@redhat.com>
5040 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
5042 2003-04-14 Ulrich Drepper <drepper@redhat.com>
5044 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
5045 overflow CFA advance instructions.
5046 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5048 2003-04-14 Jakub Jelinek <jakub@redhat.com>
5050 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
5051 * sysdeps/i386/pthread_spin_lock.c: Likewise.
5052 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
5055 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
5056 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
5057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
5058 DW_CFA_advance_loc for .Laddl-.Lsubl.
5060 2003-04-13 Ulrich Drepper <drepper@redhat.com>
5062 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
5063 position-independent unwind data for static libraries.
5064 Add missing unwind info. Add comments.
5066 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
5067 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5068 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5069 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5071 2003-04-12 Ulrich Drepper <drepper@redhat.com>
5073 * Makefile: Make sure all cancellation points are compiled with
5074 exception and asynchronous unwind tables.
5076 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
5077 which mishandles loading of global object addresses in PIC.
5078 (THREAD_SETMEM_NC): Likewise.
5080 2003-04-11 Ulrich Drepper <drepper@redhat.com>
5082 * pthread.h: Define new data structure for cleanup buffer. Declare
5083 new cleanup handler interfaces.
5084 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
5085 (struct pthread): Add cleanup_jmp_buf pointer. Define
5086 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
5087 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
5088 it. Declare old cleanup handler installation functions.
5089 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
5091 * cleanup_defer.c: Likewise.
5092 * cleanup_compat.c: New file. Old cleanup code.
5093 * cleanup_def_compat.c: New file. Old cleanup code.
5094 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
5095 if own thread descriptor.
5096 * unwind.c: New file.
5097 * forward.c: Add __pthread_unwind.
5098 * init.c (pthread_functions): Add __pthread_unwind.
5099 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
5100 Add ptr___pthread_unwind.
5101 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
5102 and unwind function.
5103 * Makefile (libpthread-routines): Add cleanup_compat,
5104 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
5105 table generation if necessary.
5106 * version.c: Record whether unwind support is compiled in.
5107 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
5108 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
5110 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
5111 complication to generate unwind information for syscall wrappers.
5112 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5113 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5114 __cleanup_fct_attribute.
5116 * Makefile: Add rules to build and run tst-cleanup0.
5117 * tst-cleanup0.c: New file.
5118 * tst-cleanup0.expect: New file.
5120 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
5121 caller. Optimize to avoid often unecessary local variable.
5123 2003-04-11 Roland McGrath <roland@redhat.com>
5125 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
5126 sets variable `multidir'; include that.
5127 (generated): Add it.
5128 ($(objpfx)$(multidir)/crti.o): New target.
5129 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
5131 2003-04-11 Ulrich Drepper <drepper@redhat.com>
5133 * tst-attr2.c (do_test): Add cast to avoid warning.
5134 * tst-mutex4.c (do_test): Likewise.
5136 2003-04-10 Ulrich Drepper <drepper@redhat.com>
5138 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
5141 2003-04-09 Ulrich Drepper <drepper@redhat.com>
5143 * Makefile (tests): Add tst-detach1.
5144 * tst-detach1.c: New file.
5146 2003-04-08 Ulrich Drepper <drepper@redhat.com>
5148 * sysdeps/pthread/pthread.h: Remove duplicate
5149 pthread_cleanup_{push,pop} definitions.
5151 * tst-barrier2.c: Eliminate warnings.
5152 * tst-cancel4.c: Likewise.
5153 * tst-cond4.c: Likewise.
5154 * tst-cond6.c: Likewise.
5155 * tst-detach1.c: Likewise.
5156 * tst-rwlock4.c: Likewise.
5157 * tst-rwlock6.c: Likewise.
5158 * tst-rwlock7.c: Likewise.
5159 * tst-sem3.c: Likewise.
5160 * tst-spin2.c: Likewise.
5161 * tst-umask1.c: Likewise.
5163 2003-04-07 Ulrich Drepper <drepper@redhat.com>
5165 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
5167 2003-04-06 Ulrich Drepper <drepper@redhat.com>
5169 * descr.h (struct pthread): Move cancelhandling member to the front.
5171 2003-04-05 Ulrich Drepper <drepper@redhat.com>
5173 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
5174 malloc_parent, and malloc_child statically.
5175 (__register_atfork_malloc): New function.
5176 (free_mem): Don't free any of the malloc_* variables on the list.
5177 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
5178 Define HAVE_register_atfork_malloc.
5180 2003-04-04 Ulrich Drepper <drepper@redhat.com>
5182 * sysdeps/pthread/createthread.c (create_thread): Add some more
5183 comments explaining when to set multiple_threads and when not.
5185 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5186 THREAD_ATOMIC_BIT_SET if not already defined.
5187 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5188 THREAD_ATOMIC_BIT_SET:
5189 * sysdeps/x86_64/tls.h: Likewise.
5190 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
5191 THREAD_ATOMIC_CMPXCHG_VAL.
5192 (_pthread_cleanup_pop_restore): Likewise.
5193 * cancellation.c (__pthread_enable_asynccancel): Likewise.
5194 (__pthread_enable_asynccancel_2): Likewise.
5195 (__pthread_disable_asynccancel): Likewise.
5196 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5197 (__libc_disable_asynccancel): Likewise.
5198 * init.c (sigcancel_handler): Likewise.
5199 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
5200 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
5202 2003-04-03 Ulrich Drepper <drepper@redhat.com>
5204 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
5205 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5206 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
5207 * Makefile (tests): Add tst-cancel11.
5208 * tst-cancel11.c: New file.
5210 2003-04-01 Ulrich Drepper <drepper@redhat.com>
5212 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
5213 round, not the first. Use specific_used flag instead of local
5214 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
5215 (__free_tcb): Don't call deallocate_tsd here.
5216 (start_thread): Call deallocate_tsd here.
5217 * pthread_setspecific.c: Set specific_used flag really only when
5219 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
5220 * tst-tsd3.c: New file.
5221 * tst-tsd4.c: New file.
5223 2003-03-31 Ulrich Drepper <drepper@redhat.com>
5225 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
5226 Use atomic_exchange_and_add instead of __lll_add.
5227 (__lll_mutex_timedlock): Likewise.
5228 Patch by Ian Wienand.
5230 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
5232 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5233 (SINGLE_THREAD_P): Fix typo.
5234 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
5236 2003-03-31 Ulrich Drepper <drepper@redhat.com>
5238 * Makefile (tests): Add tst-align.
5239 * tst-align.c: New file.
5240 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
5242 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
5245 * tst-tsd2.c: Add casts to avoid warnings.
5247 2003-03-30 Ulrich Drepper <drepper@redhat.com>
5249 * descr.h (struct pthread): Move most often used elements to the front.
5251 2003-03-29 Ulrich Drepper <drepper@redhat.com>
5253 * Makefile (libpthread-routines): Add pthread_atfork.
5254 (libpthread-static-only-routines): Add pthread_atfork.
5256 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5258 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
5260 (INSTALL_DTV): Add parens.
5261 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
5262 Use passed descr instead of THREAD_SELF.
5263 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
5264 (__lll_mutex_timedlock_wait): Correct expected value after
5266 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
5267 Release lock before waking up the waiters.
5268 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
5269 criteria. Reorderstruct passed to cleanup handler. Fix
5270 handling of cancellation and failung pthread_mutex_unlock call.
5271 Use __pthread_enable_asynccancel_2 instead of
5272 __pthread_enable_asynccancel.
5273 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5274 Return result of lock re-get if it fails.
5275 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
5276 for __pthread_cleanup_push.
5277 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
5278 completely broken rwlock implementation.
5279 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5280 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5281 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5282 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5283 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5284 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
5285 versioned_symbol macro.
5286 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
5287 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5289 2003-03-27 Ulrich Drepper <drepper@redhat.com>
5291 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
5292 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
5294 (struct timer): Remove th and bar field.
5295 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
5296 debugging code. Create only one helper thread.
5297 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
5299 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5300 Renamed. Define statically. Use thread info from siginfo.
5301 (__helper_once): New variable.
5302 (__helper_tid): New variable.
5303 (__reset_helper_control): New function.
5304 (__start_helper_thread): New function.
5306 * pthread_create.c (start_thread): Don't use setjmp inside
5307 __builtin_expect to work around gcc bug.
5309 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
5310 timer_delete syscall fails, but not with ENOSYS, set
5313 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
5314 (timer_settime): Fix typo.
5315 * sysdeps/unix/sysv/linux/timer_getoverr.c
5316 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5318 2003-03-27 Jakub Jelinek <jakub@redhat.com>
5320 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5321 offset of cleanupbuf.__prev.
5323 2003-03-26 Jakub Jelinek <jakub@redhat.com>
5325 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5328 2003-03-26 Ulrich Drepper <drepper@redhat.com>
5330 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5331 NULL provide default definition to syscall.
5333 2003-03-25 Roland McGrath <roland@redhat.com>
5335 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5336 (timer_id2ptr): Fix typo.
5338 2003-03-25 Ulrich Drepper <drepper@redhat.com>
5340 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5341 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5342 * sysdeps/ia64/pthreaddef.h: Likewise.
5343 * sysdeps/powerpc/pthreaddef.h: Likewise.
5344 * sysdeps/s390/pthreaddef.h: Likewise.
5345 * sysdeps/sh/pthreaddef.h: Likewise.
5346 * sysdeps/x86_64/pthreaddef.h: Likewise.
5347 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5348 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5350 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5351 SIGTIMER is not unblocked.
5352 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5354 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5356 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5357 pass pointer through as ID.
5358 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5359 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5360 * sysdeps/unix/sysv/linux/timer_create.c: New file.
5361 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5362 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5363 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5364 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5365 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5366 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5367 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5368 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5369 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5370 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5371 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5372 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5373 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5374 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5375 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5376 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5377 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5378 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5379 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5380 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5381 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5382 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5383 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5384 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5385 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5386 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5387 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5388 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5389 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5390 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5392 * pthreadP.h: Remove FRAME_LEFT definition.
5393 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5394 already left frame. Programs which have this problem are not POSIX
5396 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5398 2003-03-24 Ulrich Drepper <drepper@redhat.com>
5400 * sysdeps/pthread/tst-timer.c: Check return values of the
5403 2003-03-23 Roland McGrath <roland@redhat.com>
5405 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5406 * tst-tls3mod.c: Likewise.
5407 * tst-tls1.c: Likewise.
5408 * tst-tls2.c: Likewise.
5410 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5413 * tst-join5.c (tf1, tf2): Add a cast.
5415 * Makeconfig (includes): Append -I$(..)nptl to this variable.
5417 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5418 Don't test anything.
5419 * tst-cond4.c: Likewise.
5420 * tst-cond6.c: Likewise.
5421 * tst-flock2.c: Likewise.
5422 * tst-mutex4.c: Likewise.
5423 * tst-rwlock4.c: Likewise.
5424 * tst-signal1.c: Likewise.
5425 * tst-spin2.c: Likewise.
5426 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5428 * tst-mutex4.c: Use test-skeleton.c.
5429 * tst-spin2.c: Likewise.
5430 * tst-sysconf.c: Likewise.
5431 * tst-barrier2.c: Likewise.
5432 * tst-cond4.c: Likewise.
5433 * tst-cond6.c: Likewise.
5434 * tst-rwlock4.c: Likewise.
5435 * tst-unload.c: Likewise.
5436 * tst-flock2.c (do_test): Use return instead of exit.
5438 2003-03-22 Jakub Jelinek <jakub@redhat.com>
5440 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5442 2003-03-21 Ulrich Drepper <drepper@redhat.com>
5444 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5445 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5446 instead of __lll_compare_and_swap.
5447 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5449 Removed definition if __lll_compare_and_swap.
5451 * cancellation.c: Adjust for new form of compare&exchange macros.
5452 * cleanup_defer.c: Likewise.
5454 * libc-cancellation.c: Likewise.
5455 * old_pthread_cond_broadcast.c: Likewise.
5456 * old_pthread_cond_signal.c: Likewise.
5457 * old_pthread_cond_timedwait.c: Likewise.
5458 * old_pthread_cond_wait.c: Likewise.
5459 * pthread_cancel.c: Likewise.
5460 * pthread_create.c: Likewise.
5461 * pthread_detach.c: Likewise.
5462 * pthread_join.c: Likewise.
5463 * pthread_key_delete.c: Likewise.
5464 * pthread_setcancelstate.c: Likewise.
5465 * pthread_setcanceltype.c: Likewise.
5466 * pthread_timedjoin.c: Likewise.
5467 * pthread_tryjoin.c: Likewise.
5468 * sysdeps/pthread/createthread.c: Likewise.
5470 2003-03-20 Ulrich Drepper <drepper@redhat.com>
5472 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5473 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5474 definitions. Replace uses with calls to atomic_* functions.
5475 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5476 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5477 __lll_test_and_set calls with atomic_exchange_and_add and
5478 atomic_exchange calls respectively.
5479 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5480 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5481 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5482 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5483 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5484 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5485 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5487 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5488 returns the old value.
5490 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
5492 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5493 int for variable OLDVAL and correct inline assembler contraint.
5494 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5495 type int for variable OLD.
5497 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5499 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5500 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5501 instead of multiple_threads field in the TCB.
5503 2003-03-19 Ulrich Drepper <drepper@redhat.com>
5505 * sysdeps/i386/i686/bits/atomic.h: Removed.
5506 * sysdeps/i386/i586/bits/atomic.h: Removed.
5507 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
5508 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
5509 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
5510 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
5511 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
5512 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
5513 * atomic.h: Removed. Moved to glibc.
5515 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5516 support for clock selection.
5518 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5521 2003-03-18 Roland McGrath <roland@redhat.com>
5523 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5524 Add __lll_rel_instr first. Add memory clobber.
5525 (lll_mutex_unlock): Use __lll_test_and_set.
5526 From Paul Mackerras <paulus@samba.org>.
5528 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5530 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5531 (SINGLE_THREAD_P): Add `header.' prefix.
5532 From Paul Mackerras <paulus@samba.org>.
5534 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5535 pthread_timedjoin_np to ...
5536 (libpthread: GLIBC_2.3.3): ... here.
5537 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5539 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5540 Avoid shadowing VAL variable.
5542 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5545 2003-03-18 Ulrich Drepper <drepper@redhat.com>
5547 * Makefile (tests): Add tst-cond11.
5548 * tst-cond11.c: New file.
5550 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5551 struct passed to cleanup handler to eliminate one more
5553 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5555 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5556 (pthrad_cond_t): Replace __unused field with __clock.
5558 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5559 waken all waiters in cleanup handler.
5560 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5561 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5563 * pthread_condattr_getclock.c: New file.
5564 * pthread_condattr_setclock.c: New file.
5565 * sysdeps/pthread/pthread.h: Declare these new functions.
5566 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5567 * Makefile (libpthread-routines): Add the new functions.
5568 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5569 Renamed field to value. Document use of the bits.
5570 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5572 * pthread_condattr_setpshared.c: Likewise.
5573 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5574 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5575 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5577 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5578 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5579 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5580 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5581 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5582 Implement clock selection.
5583 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5584 * pthread-errnos.sym: Add ENOSYS.
5585 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5586 _POSIX_CLOCK_SELECTION.
5587 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5589 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5590 invalid .size directive.
5592 2003-03-17 Roland McGrath <roland@redhat.com>
5594 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5597 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5599 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5600 Use __lll_add instead of spelling it out. Use protected symbol names.
5601 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5603 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5604 Renamed from lll_compare_and_swap. Use new name where necessary.
5605 (__lll_add): Defined.
5606 (__lll_dec_if_positive): Defined.
5607 (__lll_test_and_set): Defined.
5608 * sysdeps/ia64/pthread_spin_init.c: Removed.
5609 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5610 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5611 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5612 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5613 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5614 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5615 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5616 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5617 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5618 __sync_lock_release_si.
5619 Patch by Jakub Jelinek.
5621 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5622 Fix timeout handling.
5623 (__lll_timedwait_tid): Likewise.
5624 (lll_unlock_wake_cb): Wake up other waiters if necessary.
5625 Patch by Jakub Jelinek.
5627 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5629 2003-03-17 Roland McGrath <roland@redhat.com>
5631 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5632 * sysdeps/pthread/pthread_spin_init.c: New file.
5633 * sysdeps/pthread/pthread_spin_unlock.c: New file.
5634 * sysdeps/powerpc/Makefile: New file.
5635 * sysdeps/powerpc/pthread_spin_lock.c: New file.
5636 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5637 * sysdeps/powerpc/pthreaddef.h: New file.
5638 * sysdeps/powerpc/tcb-offsets.sym: New file.
5639 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5640 * sysdeps/powerpc/tls.h: New file.
5641 * sysdeps/powerpc/bits/atomic.h: New file.
5642 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5643 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5644 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5646 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5647 * sysdeps/unix/sysv/linux/sem_post.c: New file.
5648 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5649 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5650 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5651 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5652 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5653 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5654 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5655 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5656 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5657 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5658 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5659 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5660 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5662 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5664 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5665 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5666 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5667 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5668 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5670 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5672 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5673 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5674 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5675 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5676 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5678 2003-03-16 Roland McGrath <roland@redhat.com>
5680 * tst-fork4.c: Include <string.h>.
5681 * tst-signal2.c: Likewise.
5682 * tst-mutex5.c (do_test): exit -> return.
5683 * tst-mutex2.c: Include <stdlib.h>.
5685 2003-03-16 Ulrich Drepper <drepper@redhat.com>
5687 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5688 (__lll_mutex_timedlock_wait): Correct expected value after
5689 spurious wakeup. Otherwise we would never wait again.
5691 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5692 zone versus inline asm stupidity. Use correct instructions.
5694 * tst-rwlock6.c: Add some more status output.
5696 2003-03-15 Roland McGrath <roland@redhat.com>
5698 * sysdeps/pthread/configure.in: New file.
5699 * sysdeps/pthread/configure: New file (generated).
5701 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5703 * allocatestack.c (allocate_stack): Store the exact stack size of
5704 user allocated stacks.
5706 2003-03-15 Jakub Jelinek <jakub@redhat.com>
5708 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5709 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5710 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5711 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5712 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5713 Use `header.' prefix.
5714 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5716 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5718 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5719 __builtin_frame_address, use stack pointer.
5721 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5722 instead of __builtin_frame_pointer.
5724 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5726 * tst-basic1.c (do_test): Add cast to avoid warning.
5727 * tst-basic2.c (do_test): Likewise.
5729 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5730 amount of stack correction.
5732 * tst-fork4.c: Use test-skeleton.c.
5734 2003-03-14 Roland McGrath <roland@redhat.com>
5736 * init.c: Fix typo "#eli" for "#else".
5738 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
5740 * allocatestack.c (__stack_user): Use hidden_data_def.
5741 * pthread_create.c (__pthread_keys): Likewise.
5743 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5745 2003-03-14 Roland McGrath <roland@redhat.com>
5747 * tst-fork4.c: New file.
5748 * Makefile (tests): Add it.
5750 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
5751 we always define the padding space.
5752 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
5753 stopped supporting its own extensions fully.
5754 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
5755 struct also called `header', so `header.multiple_threads' is the field
5756 name to use on all machines.
5757 * allocatestack.c (allocate_stack): Use `header.' prefix.
5758 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5759 * pthread_create.c (__pthread_create_2_1): Likewise.
5760 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
5761 (THREAD_SELF): Likewise.
5762 * sysdeps/x86_64/tls.h: Likewise.
5763 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5764 (SINGLE_THREAD_P): Likewise.
5765 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5766 (SINGLE_THREAD_P): Likewise.
5767 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5768 (SINGLE_THREAD_P): Likewise.
5770 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
5773 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5775 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
5776 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
5778 * pthread_create.c (start_thread): setjmp is expected to return 0.
5780 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
5781 (THREAD_GETMEM_NC): Likewise.
5783 2003-03-13 Ulrich Drepper <drepper@redhat.com>
5785 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
5786 and the size of the stack which must be allocated is a multiple,
5787 allocate one more page.
5788 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
5789 MULTI_PAGE_ALIASING.
5791 2003-03-13 Roland McGrath <roland@redhat.com>
5793 * pthread_create.c (start_thread): Set EXITING_BIT after the
5794 event-reporting (and destructors), not before.
5796 2003-03-13 Jakub Jelinek <jakub@redhat.com>
5798 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
5799 lll_futex_wake): Declare register variables as long int instead of
5800 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
5801 Make syscall arguments clobbered by the syscall.
5802 (lll_futex_wait): Define using lll_futex_timed_wait.
5804 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
5807 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
5810 * allocatestack.c (nptl_ncreated): Only declare if
5811 COLORING_INCREMENT != 0.
5813 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
5814 (__libc_enable_asynccancel_2): Remove prototype.
5816 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
5817 ctid to match kernel.
5819 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5821 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
5822 libc_multiple_threads.
5823 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
5824 __libc_multiple_threads to...
5825 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
5827 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
5829 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5830 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5832 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
5833 (__pthread_once_internal): Define.
5835 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
5836 macros instead of .symver directly.
5837 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5838 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5840 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
5841 * sysdeps/x86_64/tcb-offsets.sym: New file.
5842 * sysdeps/x86_64/Makefile: New file.
5844 * sysdeps/i386/tcb-offsets.sym: Add SELF.
5845 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5846 to access own pthread_t in TCB.
5847 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5849 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5851 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5853 2003-03-12 Roland McGrath <roland@redhat.com>
5855 * pthread-errnos.sym: New file.
5856 * Makefile (gen-as-const-headers): New variable, list that file.
5857 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5858 header <pthread-errnos.h> instead of defining errno values here.
5859 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5860 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5861 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5862 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5863 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5865 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5867 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5868 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5869 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5870 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5871 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5872 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5873 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5874 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5875 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5876 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5877 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5878 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5879 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5880 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5881 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5882 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5883 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5884 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5885 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5886 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5887 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5888 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5889 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5890 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5891 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5892 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5893 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5895 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5896 CLONE_CHILD_SETTID worked.
5898 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5900 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5902 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5905 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5906 (pthread_cond_t): Add padding.
5908 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5909 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5910 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5912 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5913 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5914 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5915 (__pthread_rwlock_timedrdlock): Likewise.
5916 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5917 (__pthread_rwlock_wrlock): Likewise.
5918 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5919 (__pthread_rwlock_rdlock): Likewise.
5921 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5923 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5924 result of lock re-get if it fails.
5926 2003-03-11 Ulrich Drepper <drepper@redhat.com>
5928 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5929 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5930 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5931 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5932 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5933 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5934 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5935 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5936 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5937 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5939 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5940 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5942 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5943 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5944 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5945 (create_thread): Likewise.
5946 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5947 * init.c (__pthread_initialize_minimal_internal): Initialize
5948 __libc_multiple_threads_ptr if necessary.
5949 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
5950 __pthread_multiple_threads and __libc_multiple_threads_ptr.
5951 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5952 __libc_multiple_threads.
5953 (__libc_pthread_init): Return pointer to __libc_pthread_init if
5956 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5957 (THREAD_SETMEM_NC): Likewise.
5959 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5960 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5961 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5962 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5964 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5965 Eliminate one entire instruction.
5967 * cancellation.c (__pthread_enable_asynccancel_2): New function.
5968 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5969 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5970 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5971 instead of __pthread_enable_asynccancel.
5972 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5973 (__pthread_cond_wait): Likewise.
5974 * sysdeps/pthread/pthread_cond_timedwait.c
5975 (__pthread_cond_timedwait): Likewise.
5976 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5979 (__condvar_cleanup): Wake up all waiters in case we got signaled
5980 after being woken up but before disabling asynchronous
5982 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5983 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5984 (__condvar_cleanup): Likewise.
5986 * init.c (__NR_set_tid_address): If already defined, don't redefine.
5987 Make it an error if architecture has no #if case. Add x86-64.
5989 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
5990 pt-initfini.s generation.
5992 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
5993 (TLS_INIT_TP): Fix typo.
5995 2003-03-11 Jakub Jelinek <jakub@redhat.com>
5997 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
5998 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
6000 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
6001 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
6002 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
6003 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
6004 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
6005 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6006 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6007 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6009 2003-03-11 Ulrich Drepper <drepper@redhat.com>
6011 * sysdeps/pthread/pthread_cond_timedwait.c
6012 (__pthread_cond_timedwait): Return the result of the final
6013 locking. If it succeeds, the regular function return value.
6015 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
6016 Return result of the final locking.
6017 * version.c (__nptl_main): Work around problems with the strange
6018 INTERNAL_SYSCALL macro on ppc32.
6019 * init.c (__pthread_initialize_minimal_internal): Unblock
6020 SIGCANCEL in case the parent blocked it.
6021 Reported by Paul Mackerras <paulus@samba.org>.
6023 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
6024 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
6025 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
6027 2003-03-11 Jakub Jelinek <jakub@redhat.com>
6029 * sysdeps/pthread/pthread_cond_timedwait.c
6030 (__pthread_cond_timedwait): Unlock and fail if
6031 __pthread_mutex_unlock_internal failed.
6033 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
6034 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
6036 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
6037 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
6038 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
6039 ALLOCATE_STACK): New macros.
6040 (TLS_TPADJ): New macro.
6041 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
6042 (allocate_stack): Handle TLS_DTV_AT_TP and
6043 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
6044 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
6046 * init.c [__ia64__] (__NR_set_tid_address): Define.
6048 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
6049 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
6050 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
6051 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
6052 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
6053 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
6054 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
6055 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
6056 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
6057 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
6058 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
6059 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
6060 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
6061 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
6062 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
6063 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
6064 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
6065 * sysdeps/ia64/bits/atomic.h: New file.
6066 * sysdeps/ia64/Makefile: New file.
6067 * sysdeps/ia64/pthread_spin_init.c: New file.
6068 * sysdeps/ia64/pthread_spin_lock.c: New file.
6069 * sysdeps/ia64/pthread_spin_trylock.c: New file.
6070 * sysdeps/ia64/pthread_spin_unlock.c: New file.
6071 * sysdeps/ia64/pthreaddef.h: New file.
6072 * sysdeps/ia64/tcb-offsets.sym: New file.
6073 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
6074 * sysdeps/ia64/tls.h: New file.
6076 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
6077 to syscall instead of no arguments.
6079 2003-03-10 Ulrich Drepper <drepper@redhat.com>
6081 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
6082 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
6083 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
6084 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
6086 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
6089 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
6091 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6092 lowlevelbarrier.sym.
6093 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
6094 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
6095 Include lowlevelbarrier.h and don't define offsets locally.
6096 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
6098 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
6099 (__lll_mutex_lock_wait): Reverse order of first two parameters.
6100 (__lll_mutex_timedlock_wait): Likewise.
6101 (lll_mutex_lock): Adjust asm for that.
6102 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
6103 (lll_lock): Adjust asm for operand order change.
6104 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
6105 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
6107 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
6108 Reverse order of parameters.
6109 (__lll_timedwait_tid): Remove regparms attribute.
6110 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
6111 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
6113 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6114 (__lll_timedwait_tid): Remove one unnecessary instruction.
6116 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
6117 __lll_mutex_timedlock_wait only for NOT_IN_libc.
6118 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
6121 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
6122 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
6124 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
6127 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
6128 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
6130 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
6131 define LOCK here (if UP is not defined). The actual code is in
6134 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
6135 LOCK is already defined. Don't define lll_unlock_wake_cb and
6136 __lll_timedwait_tid for libc.so.
6137 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
6138 define LOCK here (if UP is not defined). The actual code is in
6141 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
6142 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
6143 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
6144 instead of lowlevelsem.h.
6145 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6146 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6147 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6149 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6151 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
6152 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
6153 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
6155 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
6157 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
6160 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
6162 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
6163 of __libc_locking_needed.
6164 (lll_trylock): Initialize %eax to zero.
6166 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
6167 pthread_cond_t definition.
6169 2003-03-10 Roland McGrath <roland@redhat.com>
6171 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
6172 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
6173 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
6174 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
6175 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
6177 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
6178 Instead of setting PD->multiple_threads, set globals
6179 __pthread_multiple_threads and __libc_multiple_threads.
6180 * sysdeps/pthread/createthread.c (create_thread): Likewise.
6181 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
6182 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
6184 * descr.h (struct pthread): Conditionalize first member on
6185 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
6186 containing an anonymous tcbhead_t. Move `list' member out.
6187 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
6188 * allocatestack.c: Remove use of `header.data.' prefix.
6189 * pthread_create.c: Likewise.
6190 * init.c (__pthread_initialize_minimal_internal): Likewise.
6191 * sysdeps/pthread/createthread.c (create_thread): Likewise.
6192 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
6193 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
6194 * sysdeps/x86_64/tls.h: Likewise.
6195 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6196 (SINGLE_THREAD_P): Likewise.
6197 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6198 (SINGLE_THREAD_P): Likewise.
6199 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
6200 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
6202 2003-03-09 Ulrich Drepper <drepper@redhat.com>
6204 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
6206 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
6207 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6209 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
6210 leftovers from the ia32 code.
6212 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
6214 (clear_once_control): Don't load %esi.
6216 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
6219 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6221 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
6222 * sysdeps/unix/sysv/linux/createthread.c: ...here.
6224 * Makefile (tests): Add tst-cond10.
6225 * tst-cond10.c: New file.
6227 2003-03-08 Ulrich Drepper <drepper@redhat.com>
6229 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
6230 * tst-signal3.c (do_test): Likewise.
6231 * tst-sem5.c (do_test): Likewise.
6232 * tst-kill6.c (do_test): Likewise.
6233 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
6235 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
6237 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6238 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
6239 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6240 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6241 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6242 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6243 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6245 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6247 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6248 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6249 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6251 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6252 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6253 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6254 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6256 * allocatestack.c (allocate_stack): If mprotect() fails free the
6259 2003-03-07 Ulrich Drepper <drepper@redhat.com>
6261 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
6263 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
6264 lll_wake_tid. This was used only to work around kernel limits in
6266 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
6267 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
6268 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6269 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
6271 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
6272 (__pthread_initialize_minimal_internal): Change initialization of
6273 __static_tls_align_m1 appropriately.
6274 * pthreadP.h (__static_tls_align_m1): Renamed from
6276 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
6277 instead of __static_tls_align-1.
6279 2003-03-04 Ulrich Drepper <drepper@redhat.com>
6281 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6283 * pthread_create.c: Define __pthread_keys using nocommon
6284 attribute, not by placing it explicitly in bss.
6285 Remove DEFINE_DEALLOC definition. Not needed anymore.
6287 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
6288 Use it in mmap call to allocate stacks.
6290 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
6292 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
6293 result of the thread function.
6295 2003-03-03 Ulrich Drepper <drepper@redhat.com>
6297 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
6298 version is just fine.
6300 * sysdeps/unix/sysv/linux/libc_pthread_init.c
6301 (__pthread_child_handler): Renamed from pthread_child_handler,
6302 exported, and marked hidden. Change all users.
6303 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
6304 free __pthread_child_handler from child list.
6306 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
6308 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
6310 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6311 Fix handling of cancellation and failing pthread_mutex_unlock call.
6312 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6313 (__pthread_cond_wait): Likewise.
6315 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6316 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
6317 lll_futex_timed_wait call.
6318 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6319 (pthread_rwlock_timedwrlock): Likewise.
6321 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6322 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6323 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6325 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6326 check of lll_futex_wake return value.
6328 2003-03-03 Roland McGrath <roland@redhat.com>
6330 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6332 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6333 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6334 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6336 2003-03-02 Ulrich Drepper <drepper@redhat.com>
6338 * sysdeps/pthread/timer_create.c (timer_create): Return correct
6339 error for CPU clocks.
6341 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6342 _POSIX_MONOTONIC_CLOCK.
6343 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6345 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6348 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6350 * descr.h (struct pthread): Move cleanup field to the front.
6352 2003-03-01 Roland McGrath <roland@redhat.com>
6354 * sem_open.c (sem_open): Braino fix.
6356 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6358 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6359 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6360 __pthread_cleanup_pop functionality.
6361 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6363 * descr.h (struct pthread): Move tid field to the front now that
6366 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6367 (__lll_mutex_timedlock_wait): Remove.
6368 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6369 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6370 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6371 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6372 (lll_unlock_wake_cb): Don't save and restore %esi.
6373 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6375 (__lll_timedwait_tid): Add alignment.
6376 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6377 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6379 (__lll_timedwait_tid): Removed.
6380 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6381 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6382 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6383 (pthread_barrier_wait): Don't save, load, and restore %esi for
6385 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6386 (__pthread_cond_signal): Don't save, load, and restore %esi.
6387 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6388 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6389 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6390 Don't save, load, and restore %esi.
6392 2003-02-27 Ulrich Drepper <drepper@redhat.com>
6394 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6395 Release lock before waking up the waiters.
6397 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6399 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6400 (reader_thread): Likewise.
6402 * sysdeps/pthread/pthread_rwlock_unlock.c
6403 (__pthread_rwlock_unlock): Release internal lock early. Don't try
6404 to wake up readers if there are none.
6406 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6407 Release internal lock before wake threads.
6409 2003-02-26 Ulrich Drepper <drepper@redhat.com>
6411 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6412 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
6414 * tst-rwlock9.c: Likewise.
6415 * tst-rwlock10.c: New file.
6416 * tst-rwlock11.c: New file.
6418 * Makefile (tests): Add tst-dlsym1.
6419 * tst-dlsym1.c: New file.
6421 * init.c (__pthread_initialize_minimal_internal): Set
6422 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6423 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6425 2003-02-24 Ulrich Drepper <drepper@redhat.com>
6427 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6429 * tst-cond2.c: Fix sychronization with child.
6431 * tst-rwlock8.c (reader_thread): Remove unused variable.
6433 * Makefile: Add rules to build and run tst-tls3.
6434 * tst-tls3.c: New file.
6435 * tst-tls3mod.c: New file.
6437 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6438 * tst-rwlock8.c: New file.
6439 * tst-rwlock9.c: New file.
6440 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6441 complete broken rwlock implementation.
6442 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6444 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6446 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6447 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6448 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6449 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6450 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6451 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6452 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6454 2003-02-23 Roland McGrath <roland@redhat.com>
6456 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6458 2003-02-23 Ulrich Drepper <drepper@redhat.com>
6460 * Makefile (tests): Add tst-context1.
6461 * tst-context1.c: New file.
6463 * Makefile (tests): Add tst-tls1 and tst-tls2.
6464 * tst-tls1.c: New file.
6465 * tst-tls2.c: New file.
6467 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6470 * pthread_create.c (start_thread): Set EXITING_BIT early.
6472 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6473 (THREAD_GETMEM_NC): Likewise.
6475 2003-02-22 Ulrich Drepper <drepper@redhat.com>
6477 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6478 off 3 more bytes by using offset-less instructions when possible.
6480 * Makefile: Add dependency for $(objpfx)version.d.
6482 * eintr.c (eintr_source): Add unnecessary return but the compiler
6485 * tst-kill3.c: Include <unistd.h>.
6487 2003-02-21 Roland McGrath <roland@redhat.com>
6489 * pthread_create.c (start_thread): Call __libc_thread_freeres.
6491 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6493 * Makefile (tests): Add tst-eintr1.
6494 (distribute): Add eintr.c.
6495 * tst-eintr1.c: New file.
6496 * eintr.c: New file.
6498 * pthread_cancel.c (pthread_cancel): Use tkill directly.
6500 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6501 Disallow sending SIGCANCEL.
6503 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
6504 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6505 * tst-kill1.c: New file.
6506 * tst-kill2.c: New file.
6507 * tst-kill3.c: New file.
6508 * tst-kill5.c: New file.
6509 * tst-kill6.c: New file.
6510 * tst-basic7.c: Renamed to...
6511 * tst-kill4.c: ...this.
6513 2003-02-21 Roland McGrath <roland@redhat.com>
6515 * Makefile (install-lib-ldscripts): New variable.
6517 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6519 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6520 * pthread_cancel.c: Use INVALID_TD_P.
6521 * pthread_detach.c: Likewise.
6522 * pthread_getschedparam.c: Likewise.
6523 * pthread_setschedparam.c: Likewise.
6524 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6525 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6526 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6527 * pthread_timedjoin.c: Likewise.
6529 * tst-basic7.c: Include <signal.h>.
6531 * pthread_join.c (pthread_join): Limited checking for invalid
6533 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6535 2003-02-20 Ulrich Drepper <drepper@redhat.com>
6537 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6538 beginning of the loop. Clear the entire first block of TSD.
6539 * Makefile (tests): Add tst-key4.
6540 * tst-key4.c: New file.
6542 2003-02-18 Ulrich Drepper <drepper@redhat.com>
6544 * Makefile (tests): Add tst-basic7.
6545 * tst-basic7.c: New file.
6547 * pthread_create.c (deallocate_tsd): Mark as internal_function.
6548 Add some more __builtin_expect.
6550 * pthreadP.h: Define dummy version of DEBUGGING_P.
6552 2003-02-17 Ulrich Drepper <drepper@redhat.com>
6554 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6555 _POSIX_THREAD_PRIORITY_SCHEDULING.
6556 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6557 _XOPEN_REALTIME_THREADS.
6558 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6560 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6561 kernel returns EINVAL for PID <= 0, work around it.
6563 * Makefile (tests): Add tst-signal5.
6564 * tst-signal5.c: New file.
6566 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6569 * tst-cancel1.c (tf): Block all signals.
6571 * Makefile (tests): Add tst-basic6.
6572 * tst-basic6.c: New file.
6574 * tst-basic1.c: Add test for process ID.
6576 * Makefile (tests): Add tst-cancel10.
6577 * tst-cancel10.c: New file.
6579 * Makefile (tests): Add tst-signal4.
6580 * tst-signal4.c: New file.
6582 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6583 __sigismember instead of sigismember. Add __builtin_expect.
6585 2003-02-16 Ulrich Drepper <drepper@redhat.com>
6587 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6588 pthread_setcancelstate, and pthread_rwlock_setpshared.
6590 * tst-cancel7.c (do_test): Make sure the pid file exists before
6591 canceling the thread.
6593 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6594 pthread_rwlock_timedrdlock tests.
6595 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6596 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6597 Check for invalid tv_nsec field.
6598 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6601 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6602 recursive mutex of overflow.
6604 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6606 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6607 going into an endless loop.
6608 * Makefile (tests): Add tst-cancel9.
6609 * tst-cancel9.c: New file.
6611 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6613 2003-02-15 Ulrich Drepper <drepper@redhat.com>
6615 * tst-mutex5.c (do_test): Add more timedlock tests.
6617 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6618 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6620 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6621 use INLINE_SYSCALL. Error number is returned, not -1.
6623 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6624 and __deallocate_stack with internal_function.
6625 * pthread_create.c: Adjust definitions appropriately.
6626 * allocatestack.c: Likewise.
6628 * pthread_join.c: Add one more __builtin_expect.
6629 * pthread_timedjoin.c: Likewise.
6631 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6632 not data of sequence number does not match.
6633 Add one __builtin_expect.
6635 * Makefile (tests): Add tst-clock1.
6636 * tst-clock1.c: New file.
6638 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6640 * Makefile (tests): Add tst-basic5.
6641 * tst-basic5.c: New file.
6643 2003-02-14 Ulrich Drepper <drepper@redhat.com>
6645 * Makefile (tests): Add tst-basic4.
6646 * tst-basic4.c: New file.
6648 * pthreadP.h: Add declaraction for __nptl_nthreads.
6649 * pthread_create.c: Define __nptl_nthreads
6650 (start_thread): Increment __nptl_nthreads at beginning. Decrement
6651 after thread is done. If then zero, call exit(0).
6652 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6653 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
6654 * init.c (pthread_functions): Initialize ptr_nthreads.
6655 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6656 (__reclaim_stacks): Decrement __nptl_nthreads.
6657 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6659 * Makefile (tests): Add tst-basic3.
6660 * tst-basic3.c: New file.
6662 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
6663 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
6664 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6665 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
6666 if asynchronous canceling is enabled.
6667 * pthread_join.c (pthread_join): When recognizing circular joins,
6668 take into account the other thread might be already canceled.
6669 * Makefile (tests): Add tst-join5.
6670 * tst-join5.c: New file.
6672 * Makefile (tests): Add tst-join4.
6673 * tst-join4.c: New file.
6675 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6677 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6679 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
6681 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6682 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6683 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6685 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6687 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6688 error if lll_futex_wake failed.
6690 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6692 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6693 handling of cancellation and failung pthread_mutex_unlock call.
6694 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6695 * Makefile (tests): Add tst-cond8 and tst-cond9.
6696 * tst-cond8.c: New file.
6697 * tst-cond9.c: New file.
6699 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6701 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
6702 non-standard initializers with __USE_GNU.
6704 * Makefile (tests): Add tst-cleanup3.
6705 * tst-cleanup3.c: New file.
6707 2003-02-12 Ulrich Drepper <drepper@redhat.com>
6709 * Makefile (tests): Add tst-attr1 and tst-attr2.
6710 * tst-attr1.c: New file.
6711 * tst-attr2.c: New file.
6713 * Makefile: Add rules to build and run tst-atfork2 test.
6714 * tst-atfork2.c: New file.
6715 * tst-atfork2mod.c: New file.
6717 * sysdeps/unix/sysv/linux/unregister-atfork.c
6718 (__unregister_atfork): Free the memory allocated for the handlers
6719 after removing them from the lists.
6721 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6724 * tst-atfork1.c (do_test): Wait for the child we forked.
6725 Report error in child.
6727 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6729 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6731 2003-02-10 Ulrich Drepper <drepper@redhat.com>
6733 * Makefile (tests): Add tst-cancel8.
6734 * tst-cancel8.c: New file.
6736 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6737 clearing of control variable.
6738 * Makefile (tests): Add tst-once3 and tst-once4.
6739 * tst-once3.c: New file.
6740 * tst-once4.c: New file.
6742 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
6744 * sysdeps/sh/Makefile: New file.
6745 * sysdeps/sh/bits/atomic.h: New file.
6746 * sysdeps/sh/pthread_spin_init.c: New file.
6747 * sysdeps/sh/pthread_spin_lock.c: New file.
6748 * sysdeps/sh/pthread_spin_trylock.S: New file.
6749 * sysdeps/sh/pthread_spin_unlock.S: New file.
6750 * sysdeps/sh/pthreaddef.h: New file.
6751 * sysdeps/sh/tcb-offsets.sym: New file.
6752 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
6753 * sysdeps/sh/tls.h: New file.
6754 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
6755 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
6756 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
6757 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
6758 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
6759 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
6760 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
6761 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
6762 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
6763 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
6764 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
6765 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
6766 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
6767 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
6768 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
6769 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
6770 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
6771 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
6772 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
6773 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
6774 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
6775 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
6776 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
6777 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
6778 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
6779 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
6780 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
6781 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
6782 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
6783 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
6785 2003-02-08 Ulrich Drepper <drepper@redhat.com>
6787 * tst-cond2.c: Rearrange code to not rely on behavior undefined
6790 * tst-basic2.c (do_test): Lock mutex before creating the thread.
6792 2003-02-07 Ulrich Drepper <drepper@redhat.com>
6794 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
6795 (TLS_GET_FS): New #define.
6796 (TLS_SET_FS): New #define.
6797 Correct value of __NR_set_thread_area.
6799 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
6801 2003-02-06 Ulrich Drepper <drepper@redhat.com>
6803 * Makefile (tests): Add tst-popen1.
6804 * tst-popen1.c: New file.
6806 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
6807 but inactive generalization.
6808 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6809 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6810 Minor optimization, remove one instruction.
6811 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6813 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
6815 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
6817 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
6819 * init.c (__NR_set_tid_address): Add #ifdef for s390.
6820 * sysdeps/pthread/pthread_barrier_wait.c: New file.
6821 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
6822 * sysdeps/pthread/pthread_cond_signal.c: New file.
6823 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
6824 * sysdeps/pthread/pthread_cond_wait.c: New file.
6825 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
6826 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
6827 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
6828 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
6829 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
6830 * sysdeps/s390/Makefile: New file.
6831 * sysdeps/s390/bits/atomic.h: New file.
6832 * sysdeps/s390/pthread_spin_init.c: New file.
6833 * sysdeps/s390/pthread_spin_lock.c: New file.
6834 * sysdeps/s390/pthread_spin_trylock.c: New file.
6835 * sysdeps/s390/pthread_spin_unlock.c: New file.
6836 * sysdeps/s390/pthreaddef.h: New file.
6837 * sysdeps/s390/tcb-offsets.sym: New file.
6838 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
6839 * sysdeps/s390/tls.h: New file.
6840 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
6841 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6842 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6843 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6844 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6845 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6846 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6847 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6848 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6849 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6850 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6851 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6852 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6853 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6854 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6855 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6856 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6857 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6858 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6859 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6860 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6861 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6862 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6864 2003-02-04 Ulrich Drepper <drepper@redhat.com>
6866 * atomic.h: Add a couple more default implementations.
6867 (atomic_compare_and_exchange_acq): Use
6868 __arch_compare_and_exchange_32_acq in return value definition. It
6870 (atomic_bit_set): Renamed from atomic_set_bit.
6871 Add missing atomic_ prefixes.
6873 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6874 thread library is available, use correct value to mark initialized
6877 2003-02-03 Ulrich Drepper <drepper@redhat.com>
6879 * allocatestack.c (allocate_stack): Use __getpagesize instead of
6880 __sysconf to determine pagesize.
6882 * pthread_create.c: Include <atomic.h>.
6883 * allocatestack.c (allocate_stack): Implement coloring of the
6884 allocated stack memory. Rename pagesize to pagesize_m1. It's the
6885 size minus one. Adjust users.
6886 * sysdeps/i386/i686/Makefile: New file.
6888 2003-02-02 Ulrich Drepper <drepper@redhat.com>
6890 * allocatestack.c: Improve comment throughout the file.
6892 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6893 (__lll_lock_wait): Add branch prediction.
6894 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6895 (__lll_lock_wait): Likewise.
6896 (lll_unlock_wake_cb): Removed.
6898 2003-01-31 Ulrich Drepper <drepper@redhat.com>
6900 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6901 _POSIX_THREAD_PRIORITY_SCHEDULING.
6903 2003-01-30 Jakub Jelinek <jakub@redhat.com>
6905 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6906 Fix return type of ptr___pthread_getspecific.
6908 2003-01-29 Ulrich Drepper <drepper@redhat.com>
6910 * Makefile (tests): Add tst-umask1.
6911 (tst-umask1-ARGS): Define.
6912 * tst-umask1.c: New file.
6914 2003-01-28 Ulrich Drepper <drepper@redhat.com>
6916 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
6917 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6918 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6919 pthread_rwlock_unlock.
6920 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6921 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6922 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6923 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6924 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6926 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6927 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6929 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6930 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6931 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6933 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6934 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6936 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6937 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6938 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6940 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6941 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6943 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6945 * Makefile (libpthread-routines): Remove lowlevelcond and
6946 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6947 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6948 and pthread_cond_broadcast.
6949 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6950 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6951 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6952 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6953 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6954 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6955 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6956 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6957 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6958 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6959 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6960 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6961 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6962 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6963 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6964 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6965 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6966 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6967 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6968 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6969 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6970 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6971 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6972 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6973 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6974 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
6975 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
6976 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
6977 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
6978 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
6979 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
6981 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
6982 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
6983 of the code is moved to ...
6984 * sysdeps/pthread/createthread.c: ...here. New file.
6986 2003-01-27 Ulrich Drepper <drepper@redhat.com>
6988 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
6989 (__new_sem_post): Clear %eax before returning.
6990 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
6992 * Makefile (tests): Add tst-cleanup2.
6993 * tst-cleanup2.c: New file.
6995 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6996 Interpret first parameter correctly.
6998 2003-01-17 Ulrich Drepper <drepper@redhat.com>
7000 * Makefile (headers): Add bits/semaphore.h.
7002 2003-01-16 Jakub Jelinek <jakub@redhat.com>
7004 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
7007 2003-01-14 Ulrich Drepper <drepper@redhat.com>
7009 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
7010 must be used and mapping failed.
7011 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
7013 * Makefile (CFLAGS-pthread_self.os): Define this, not
7014 CFLAGS-pthread_self.c.
7016 2003-01-13 Ulrich Drepper <drepper@redhat.com>
7018 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
7021 * Makefile (libpthread-routines): Add version. Add rules to build
7022 version.os and banner.h.
7023 * version.c: New file.
7025 2003-01-13 Jakub Jelinek <jakub@redhat.com>
7027 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
7028 the alias unconditional.
7029 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
7031 2003-01-13 Ulrich Drepper <drepper@redhat.com>
7033 * Makefile (CFLAGS-pthread_self.c): New definition.
7035 2003-01-06 Jakub Jelinek <jakub@redhat.com>
7037 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
7038 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
7039 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
7040 * init.c (__pthread_initialize_minimal_internal): Likewise.
7042 2003-01-07 Jakub Jelinek <jakub@redhat.com>
7044 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
7046 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7047 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7048 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7049 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7050 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
7051 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
7053 2003-01-06 Jakub Jelinek <jakub@redhat.com>
7055 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
7056 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
7057 * tst-cancel-wrappers.sh: Remove all exceptions.
7059 2003-01-05 Ulrich Drepper <drepper@redhat.com>
7061 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
7062 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
7064 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
7065 Use __libc_pthread_functions array if SHARED.
7067 * pthreadP.h: Move pthread_cond_2_0_t definition to...
7068 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
7070 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
7071 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
7072 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
7073 __libc_ptf_call instead of __libc_maybe_call.
7075 (__libc_cleanup_region_start): Wrap function name with PTF call.
7076 (__libc_cleanup_region_end): Likewise.
7077 (__libc_cleanup_end): Likewise.
7079 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
7080 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
7081 * pthread_key_create.c: Add __pthread_key_create_internal alias.
7082 * pthreadP.h: Add prototypes.
7084 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
7085 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
7086 __pthread_rwlock_unlock aliases.
7087 * pthreadP.h: Add prototypes for new aliases.
7089 * pthreadP.h (struct pthead_functions): Moved to...
7090 * sysdeps/pthread/pthread-functions.h: ...here. New file.
7091 * init.c (pthread_functions): Add initializers for new elements.
7093 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
7094 __pthread_cleanup_pop_restore aliases.
7095 * pthreadP.h: Add prototypes.
7097 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
7098 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
7099 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
7100 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
7101 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7102 * pthreadP.h: Adjust prototypes and callers.
7104 2003-01-04 Ulrich Drepper <drepper@redhat.com>
7106 * Makefile (tests): Add tst-cancel7.
7107 (tst-cancel7-ARGS): New variable.
7108 * tst-cancel7.c: New file.
7110 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
7111 around gcc defficiencies.
7112 * old_pthread_cond_signal.c: Likewise.
7113 * old_pthread_cond_timedwait.c: Likewise.
7114 * old_pthread_cond_wait.c: Likewise.
7116 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
7118 2003-01-03 Ulrich Drepper <drepper@redhat.com>
7120 * Makefile (tests): Add tst-cond7.
7121 * tst-cond7.c: New file.
7123 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7124 (condvar_cleanup): Get condvar address from the right place.
7126 * atomic.h: Correct definitions of atomic_full_barrier,
7127 atomic_read_barrier, atomic_write_barrier.
7129 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
7131 * old_pthread_cond_signal.c: Likewise.
7132 * old_pthread_cond_timedwait.c: Likewise.
7133 * old_pthread_cond_wait.c: Likewise.
7135 2003-01-03 Jakub Jelinek <jakub@redhat.com>
7137 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
7139 2003-01-03 Ulrich Drepper <drepper@redhat.com>
7141 * pthreadP.h (pthread_cond_2_0_t): New type.
7142 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
7143 Use new type for the 2.0 condvar function prototypes.
7144 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
7145 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
7147 * old_pthread_cond_destroy.c: Likewise.
7148 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
7149 * old_pthread_cond_signal.c: Likewise.
7150 * old_pthread_cond_timedwait.c: Likewise.
7151 * old_pthread_cond_wait.c: Likewise.
7153 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7154 (__pthread_cond_wait): Don't save cancellation mode and seq value
7157 * herrno.c (__h_errno_location): Don't define as weak.
7159 2003-01-02 Jakub Jelinek <jakub@redhat.com>
7161 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
7162 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
7163 and pthread_cond_wait.
7164 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
7166 (__pthread_cond_broadcast_2_0): ... this.
7167 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
7169 (__pthread_cond_destroy_2_0): ... this.
7170 * old_pthread_cond_init.c (__old_pthread_cond_init):
7172 (__pthread_cond_init_2_0): ... this.
7173 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
7175 (__pthread_cond_signal_2_0): ... this.
7176 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
7178 (__pthread_cond_wait_2_0): ... this.
7179 * pthread_cond_destroy.c: Include shlib-compat.h.
7180 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
7181 * pthread_cond_init.c: Include shlib-compat.h.
7182 (pthread_cond_init): Change strong_alias into versioned_symbol.
7183 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
7184 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
7186 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
7187 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
7188 __pthread_cond_wait_2_0): New prototypes.
7189 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
7190 __old_pthread_cond_init, __old_pthread_cond_signal,
7191 __old_pthread_cond_wait): Removed.
7192 * init.c: Include shlib-compat.h.
7193 (pthread_functions): Guard ptr___pthread_attr_init_2_0
7194 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
7195 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
7196 ptr___pthread_cond_*_2_0 fields.
7197 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
7198 pthread_cond_*@GLIBC_2.0 compatibility symbols.
7200 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
7201 LIBC_SIGACTION was not yet defined.
7202 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
7203 [!defined LIBC_SIGACTION] (__sigaction): New function and
7205 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
7206 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
7208 2003-01-02 Jakub Jelinek <jakub@redhat.com>
7210 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
7212 2003-01-02 Ulrich Drepper <drepper@redhat.com>
7214 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7215 New, larger type definition.
7216 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
7218 * Versions [libpthread]: Add definitions for new pthread_cond_*
7219 interfaces for version GLIBC_2.3.2.
7220 * pthread_cond_init.c: Update initialization for new type definition.
7221 * Makefile (libpthread-routines): Remove pthread_cond_wait,
7222 pthread_cond_timedwait, pthread_cond_signal, and
7223 pthread_cond_broadcast. Add old_pthread_cond_init,
7224 old_pthread_cond_destroy, old_pthread_cond_wait,
7225 old_pthread_cond_timedwait, old_pthread_cond_signal, and
7226 old_pthread_cond_broadcast.
7227 * old_pthread_cond_broadcast.c: New file.
7228 * old_pthread_cond_destroy.c: New file.
7229 * old_pthread_cond_init.c: New file.
7230 * old_pthread_cond_signal.c: New file.
7231 * old_pthread_cond_timedwait.c: New file.
7232 * old_pthread_cond_wait.c: New file.
7233 * pthreadP.h: Add prototypes for the compatibility interfaces.
7235 * pthread_cond_destroy.c: Don't include <errno.h>.
7237 2003-01-01 Ulrich Drepper <drepper@redhat.com>
7239 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
7240 unnecessary zero offset when addressing MUTEX.
7242 2002-12-31 Ulrich Drepper <drepper@redhat.com>
7244 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7246 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
7247 for __register_atfork.
7249 2002-12-31 Jakub Jelinek <jakub@redhat.com>
7251 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
7252 instead of ASSEMBLER test macro.
7254 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
7255 __libc_current_sigrtmax): Add libc_hidden_def.
7257 * sysdeps/pthread/list.h: Remove assert.h include.
7259 2002-12-31 Ulrich Drepper <drepper@redhat.com>
7261 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
7262 __pthread_initialize_minimal_internal not
7263 __pthread_initialize_minimal.
7265 2002-12-30 Ulrich Drepper <drepper@redhat.com>
7267 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
7268 __pthread_initialize_minimal as hidden.
7270 * init.c (__pthread_initialize_minimal_internal): Don't mark as
7273 2002-12-31 Jakub Jelinek <jakub@redhat.com>
7275 * Makefile ($(inst_libdir)/libpthread.so): Depend on
7276 $(common-objpfx)format.lds, include that into the output script.
7278 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
7280 2002-12-28 Andreas Jaeger <aj@suse.de>
7282 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
7283 nsec resolution changes.
7284 (xstat64_conv): Likewise.
7285 (xstat32_conv): Likewise.
7286 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
7288 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
7289 structs stat and stat64.
7290 * time/time.h (__timespec_defined): Define for __USE_MISC.
7291 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
7293 2002-12-30 Jakub Jelinek <jakub@redhat.com>
7295 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
7297 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
7298 (pthread_exit): Use strong_alias to avoid warnings.
7299 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
7300 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
7301 ptr___pthread_attr_init_2_*.
7302 * init.c (pthread_functions): Adjust.
7304 2002-12-29 Ulrich Drepper <drepper@redhat.com>
7306 * forward.c: Make all functions available by default again. It
7307 caused too much trouble.
7309 * pt-siglongjmp.c: Removed.
7311 2002-12-28 Jakub Jelinek <jakub@redhat.com>
7313 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
7314 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
7315 * sysdeps/i386/Makefile: New file.
7316 * sysdeps/i386/tcb-offsets.sym: New file.
7317 * sysdeps/pthread/tcb-offsets.h: New file.
7318 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7319 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7321 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7322 __register_atfork...
7323 (GLIBC_2.3.2): ...here.
7325 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7327 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7328 pthread_attr_setstackaddr with __attribute_deprecated__.
7330 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7332 * pt-system.c (system): Remove cancellation handling.
7333 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7334 cancellation routines.
7336 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7338 * descr.h: Include <dl-sysdep.h>.
7339 (struct pthread): Move header.data.list to the back of the struct.
7340 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7341 (MULTIPLE_THREADS_OFFSET): Adjust offset.
7342 (SYSINFO_OFFSEET): Likewise.
7344 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7346 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7348 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7349 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7350 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7351 (USE_DL_SYSINFO): Undef.
7353 2002-12-22 Jakub Jelinek <jakub@redhat.com>
7355 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7356 $(common-objpfx)libc.so.
7357 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7358 it is bigger than pipe buffer size even on arches with bigger
7360 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7362 2002-12-25 Ulrich Drepper <drepper@redhat.com>
7364 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7365 correct errno access for case that USE___THREAD is not defined.
7367 2002-12-24 Ulrich Drepper <drepper@redhat.com>
7369 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7370 Patch by Marijn Ros <marijn@mad.scientist.com>.
7372 2002-12-22 Roland McGrath <roland@redhat.com>
7374 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7376 2002-12-20 Ulrich Drepper <drepper@redhat.com>
7378 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7380 2002-12-19 Ulrich Drepper <drepper@redhat.com>
7382 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7383 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7384 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7386 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7388 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7389 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7390 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7391 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7392 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7393 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7394 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7395 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7397 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7399 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7401 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7403 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7405 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7406 that sysinfo is properly initialized.
7407 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7408 to 1 only for ld.so.
7410 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7411 RTLD_CORRECT_DYNAMIC_WEAK.
7413 2002-12-19 Jakub Jelinek <jakub@redhat.com>
7415 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7416 Use return 0 as 6th argument to FORWARD4.
7417 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7419 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7421 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7422 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7423 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7424 (INIT_SYSINFO): New #define.
7425 (TLS_TP_INIT): Use INIT_SYSINFO.
7426 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7427 At test to make sure SYSINFO_OFFSET value is correct.
7428 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7430 2002-12-18 Jakub Jelinek <jakub@redhat.com>
7432 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7433 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7434 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7435 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7436 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7437 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7438 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7440 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7442 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7443 macro instead of using int $0x80 directly.
7445 * sysdeps/pthread/bits/stdio-lock.h: New file.
7446 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7447 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7448 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7449 * Makefile (routines): Add libc-lowlevelmutex.
7451 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7452 __i686.get_pc_thunk.dx.
7454 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7456 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7457 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7458 ($(objpfx)tst-cancel-wrappers.out): New rule.
7459 * tst-cancel-wrappers.sh: New test.
7460 * tst-locale1.c: Include signal.h.
7461 (uselocale): Test static linking of __libc_current_sigrt*.
7463 2002-12-17 Ulrich Drepper <drepper@redhat.com>
7465 * Makefile (tests): Add tst-cancel6.
7466 * tst-cancel6.c: New file
7468 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7470 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7471 Define meaningfully for assembler as well.
7472 * pthreadP.h (struct pthread_functions): Remove
7473 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
7474 and ptr_pthread_attr_init_2_1 fields.
7475 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7476 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7477 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7478 (FORWARD3): Define using FORWARD4.
7479 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7481 * pt-system.c: Remove duplicate stdlib.h include.
7483 2002-12-16 Ulrich Drepper <drepper@redhat.com>
7485 * sem_init.c: Define sem_init@GLIBC_2.0.
7486 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7487 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7489 * flockfile.c: Moved to...
7490 * sysdeps/pthread/flockfile.c: ...here. New file.
7491 * funlockfile.c: Moved to...
7492 * sysdeps/pthread/funlockfile.c: ...here. New file.
7493 * ftrylockfile.c: Moved to...
7494 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
7496 2002-12-16 Jakub Jelinek <jakub@redhat.com>
7498 * libc-cancellation.c: Guard both function with
7499 #if !defined NOT_IN_libc.
7500 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7501 automatically provided pthread wrappers.
7502 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7503 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7505 * pt-open.c: Removed.
7506 * pt-fcntl.c: Removed.
7507 * pt-fsync.c: Removed.
7508 * pt-lseek.c: Removed.
7509 * pt-msgrcv.c: Removed.
7510 * pt-msgsnd.c: Removed.
7511 * pt-msync.c: Removed.
7512 * pt-nanosleep.c: Removed.
7513 * pt-open64.c: Removed.
7514 * pt-pause.c: Removed.
7515 * pt-pread.c: Removed.
7516 * pt-pread64.c: Removed.
7517 * pt-pwrite.c: Removed.
7518 * pt-pwrite64.c: Removed.
7519 * pt-read.c: Removed.
7520 * pt-recv.c: Removed.
7521 * pt-recvfrom.c: Removed.
7522 * pt-recvmsg.c: Removed.
7523 * pt-send.c: Removed.
7524 * pt-sendto.c: Removed.
7525 * pt-sigtimedwait.c: Removed.
7526 * pt-sigwait.c: Removed.
7527 * pt-wait.c: Removed.
7528 * pt-waitpid.c: Removed.
7529 * pt-write.c: Removed.
7530 * pt-accept.c: Removed.
7531 * pt-close.c: Removed.
7532 * pt-connect.c: Removed.
7533 * pt-lseek64.c: Removed.
7534 * pt-sendmsg.c: Removed.
7535 * pt-tcdrain.c: Removed.
7537 2002-12-15 Ulrich Drepper <drepper@redhat.com>
7539 * init.c (__pthread_initialize_minimal_internal): Renamed from
7540 __pthread_initialize_minimal. Make old name an alias. This
7541 converts a normal relocation into a relative relocation.
7543 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7545 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7546 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7547 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7548 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7549 pt-sigwaitinfo, pt-waitid, and pt-writev.
7550 * pt-creat.c: Removed.
7551 * pt-poll.c: Removed.
7552 * pt-pselect.c: Removed.
7553 * pt-readv.c: Removed.
7554 * pt-select.c: Removed.
7555 * pt-sigpause.c: Removed.
7556 * pt-sigsuspend.c: Removed.
7557 * pt-sigwaitinfo.c: Removed.
7558 * pt-waitid.c: Removed.
7559 * pt-writev.c: Removed.
7561 * init.c (pthread_functions): New variable.
7562 (__pthread_initialize_minimal): Pass pointer to pthread_functions
7563 (or NULL) to __libc_pthread_init.
7564 * forward.c: Rewrite to use __libc:pthread_functions array to get
7566 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7568 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7569 Take new parameter. Copy content of variable pointed to by it
7570 to __libc_pthread_init.
7572 * pthreadP.h (struct pthread_functions): New type.
7573 (__libc_pthread_init): Declare.
7575 * pthread_attr_destroy.c: Add namespace protected alias.
7576 * pthread_attr_getdetachstate.c: Likewise.
7577 * pthread_attr_getinheritsched.c: Likewise.
7578 * pthread_attr_getschedparam.c: Likewise.
7579 * pthread_attr_getschedpolicy.c: Likewise.
7580 * pthread_attr_getscope.c: Likewise.
7581 * pthread_attr_setdetachstate.c: Likewise.
7582 * pthread_attr_setinheritsched.c: Likewise.
7583 * pthread_attr_setschedparam.c: Likewise.
7584 * pthread_attr_setschedpolicy.c: Likewise.
7585 * pthread_attr_setscope.c: Likewise.
7586 * pthread_cond_broadcast.c: Likewise.
7587 * pthread_cond_destroy.c: Likewise.
7588 * pthread_cond_init.c: Likewise.
7589 * pthread_cond_signal.c: Likewise.
7590 * pthread_cond_wait.c: Likewise.
7591 * pthread_condattr_destroy.c: Likewise.
7592 * pthread_condattr_init.c: Likewise.
7593 * pthread_equal.c: Likewise.
7594 * pthread_exit.c: Likewise.
7595 * pthread_getschedparam.c: Likewise.
7596 * pthread_self.c: Likewise.
7597 * pthread_setcancelstate.c: Likewise.
7598 * pthread_setschedparam.c: Likewise.
7599 * pthread_mutex_destroy.c: Likewise.
7600 * pthread_mutex_init.c: Likewise.
7601 * pthreadP.h: Add prototypes for the aliases.
7603 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7604 multiple_threads member in correct TCB to 1.
7606 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7607 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
7608 member of thread decriptor, otherwise return unconditionally 1.
7610 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7612 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7613 regular Linux version. Remove file.
7614 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
7615 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
7616 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
7617 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
7618 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
7619 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
7620 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
7621 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
7622 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
7623 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
7624 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
7625 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
7626 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
7627 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
7628 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
7629 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
7630 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
7631 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
7632 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
7633 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
7634 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
7635 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
7636 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
7637 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
7638 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
7639 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
7640 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
7641 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
7642 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
7643 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
7645 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7647 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7648 * sysdeps/unix/sysv/linux/open.c: Removed.
7649 * sysdeps/unix/sysv/linux/fsync.c: Removed.
7650 * sysdeps/unix/sysv/linux/lseek.c: Removed.
7651 * sysdeps/unix/sysv/linux/msync.c: Removed.
7652 * sysdeps/unix/sysv/linux/read.c: Removed.
7653 * sysdeps/unix/sysv/linux/close.c: Removed.
7654 * sysdeps/unix/sysv/linux/creat.c: Removed.
7655 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7656 * sysdeps/unix/sysv/linux/pause.c: Removed.
7657 * sysdeps/unix/sysv/linux/select.c: Removed.
7658 * sysdeps/unix/sysv/linux/write.c: Removed.
7660 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7662 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7663 element in TCB to see whether locking is needed.
7665 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7666 MULTIPLE_THREADS_OFFSET value is correct.
7668 * sysdeps/unix/sysv/linux/close.c: New file.
7669 * sysdeps/unix/sysv/linux/connect.S: New file.
7670 * sysdeps/unix/sysv/linux/creat.c: New file.
7671 * sysdeps/unix/sysv/linux/fsync.c: New file.
7672 * sysdeps/unix/sysv/linux/llseek.c: New file.
7673 * sysdeps/unix/sysv/linux/lseek.c: New file.
7674 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7675 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7676 * sysdeps/unix/sysv/linux/msync.c: New file.
7677 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7678 * sysdeps/unix/sysv/linux/open.c: New file.
7679 * sysdeps/unix/sysv/linux/open64.c: New file.
7680 * sysdeps/unix/sysv/linux/pause.c: New file.
7681 * sysdeps/unix/sysv/linux/poll.c: New file.
7682 * sysdeps/unix/sysv/linux/pread.c: New file.
7683 * sysdeps/unix/sysv/linux/pread64.c: New file.
7684 * sysdeps/unix/sysv/linux/pselect.c: New file.
7685 * sysdeps/unix/sysv/linux/pwrite.c: New file.
7686 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7687 * sysdeps/unix/sysv/linux/readv.c: New file.
7688 * sysdeps/unix/sysv/linux/recv.S: New file.
7689 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7690 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7691 * sysdeps/unix/sysv/linux/select.c: New file.
7692 * sysdeps/unix/sysv/linux/send.S: New file.
7693 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7694 * sysdeps/unix/sysv/linux/sendto.S: New file.
7695 * sysdeps/unix/sysv/linux/sigpause.c: New file.
7696 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7697 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7698 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7699 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7700 * sysdeps/unix/sysv/linux/system.c: New file.
7701 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7702 * sysdeps/unix/sysv/linux/wait.c: New file.
7703 * sysdeps/unix/sysv/linux/waitid.c: New file.
7704 * sysdeps/unix/sysv/linux/waitpid.c: New file.
7705 * sysdeps/unix/sysv/linux/writev.c: New file.
7706 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7708 * pt-readv.c: Fix comment.
7710 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7712 * tst-cleanup1.c: Include stdlib.h.
7714 * tst-cancel5.c: New test.
7715 * Makefile (tests): Add tst-cancel5.
7716 (tst-cancel5): Link against libc.so libpthread.so in that order.
7718 2002-12-13 Ulrich Drepper <drepper@redhat.com>
7720 * forward.c (test_loaded): Prevent recursive calls.
7722 * Makefile (routines): Add libc-cancellation.
7723 * libc-cancellation.c: New file.
7724 * descr.h (struct pthread): Add multiple_threads field.
7725 * allocatestack.c (allocate_stack): Initialize multiple_header field of
7726 new thread descriptor to 1.
7727 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7728 Initialize multiple_thread field after successful thread creation.
7729 * cancellation.c (__do_cancel): Move to pthreadP.h.
7730 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7731 (__pthread_disable_asynccancel): Add internal_function attribute.
7732 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7733 * pthread_setcancelstate.c: Likewise.
7734 * pthread_setcanceltype.c: Likewise.
7735 * pthread_exit.c: Likewise.
7736 * pthreadP.h (CANCELLATION_P): Likewise.
7737 (__do_cancel): Define as static inline.
7738 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7739 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7741 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7742 fields. Define MULTIPLE_THREADS_OFFSET.
7743 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7745 * sysdeps/unix/sysv/linux/accept.S: New file.
7746 * sysdeps/unix/sysv/linux/read.c: New file.
7747 * sysdeps/unix/sysv/linux/write.c: New file.
7748 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7749 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7750 initialization of __libc_locking_needed.
7751 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
7752 __libc_locking_needed, use multiple_threads field in TCB.
7753 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7755 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7757 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
7759 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
7761 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
7762 access to __libc_locking_needed for PIC.
7764 2002-12-12 Jakub Jelinek <jakub@redhat.com>
7766 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
7767 declare for libc.so.
7768 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
7770 (__libc_lock_lock): Put into statement expression.
7771 (__libc_lock_unlock): Remove trailing semicolon.
7772 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
7774 2002-12-12 Roland McGrath <roland@redhat.com>
7776 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
7777 "m" constraint to refer to __libc_locking_needed. Declare it here.
7779 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7781 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
7782 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
7783 Initialize __libc_locking_needed.
7784 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
7785 instead of __register_pthread_fork_handler.
7786 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
7787 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
7788 fork-gen with libc_pthread_init.
7789 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
7790 of __register_pthread_fork_handler.
7791 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
7792 of __register_pthread_fork_handler.
7793 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
7794 __libc_locking_needed to determine whether lock prefix can be avoided.
7795 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7797 2002-12-11 Ulrich Drepper <drepper@redhat.com>
7799 * Makefile (tests): Add tst-cleanup1.
7800 * tst-cleanup1.c: New file.
7801 * cancellation.c (__cleanup_thread): Removed.
7802 (__do_cancel): Remove call to __cleanup_thread.
7803 * pthreadP.h: Remove __cleanup_thread prorotype.
7805 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7806 Remember function and argument even if cancellation handler
7807 function is not available.
7808 (__libc_cleanup_region_end): Execute registered function directly if
7809 pthread functions are not available.
7810 (__libc_cleanup_end): Likewise.
7812 * init.c (__pthread_initialize_minimal): Fix initialization in
7813 static lib by preventing gcc from being too clever.
7815 2002-12-10 Ulrich Drepper <drepper@redhat.com>
7817 * init.c (__pthread_initialize_minimal): Remove unneccesary
7820 * Makefile (tests): We can run tst-locale2 now.
7822 2002-12-09 Ulrich Drepper <drepper@redhat.com>
7824 * Versions: Remove duplicated sigwait entry.
7826 2002-12-08 Ulrich Drepper <drepper@redhat.com>
7828 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
7831 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
7833 * pthreadP.h: Declare __pthread_enable_asynccancel and
7834 __pthread_disable_asynccancel.
7835 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
7836 (CANCEL_RESET): Use __pthread_disable_asynccancel.
7837 * cancellation.c (__pthread_enable_asynccancel): New function.
7838 (__pthread_disable_asynccancel): New function.
7839 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
7840 * pt-close.c: Likewise.
7841 * pt-connect.c: Likewise.
7842 * pt-creat.c: Likewise.
7843 * pt-fcntl.c: Likewise.
7844 * pt-fsync.c: Likewise.
7845 * pt-lseek.c: Likewise.
7846 * pt-lseek64.c: Likewise.
7847 * pt-msgrcv.c: Likewise.
7848 * pt-msgsnd.c: Likewise.
7849 * pt-msync.c: Likewise.
7850 * pt-nanosleep.c: Likewise.
7851 * pt-open.c: Likewise.
7852 * pt-open64.c: Likewise.
7853 * pt-pause.c: Likewise.
7854 * pt-poll.c: Likewise.
7855 * pt-pread.c: Likewise.
7856 * pt-pread64.c: Likewise.
7857 * pt-pselect.c: Likewise.
7858 * pt-pwrite.c: Likewise.
7859 * pt-pwrite64.c: Likewise.
7860 * pt-read.c: Likewise.
7861 * pt-readv.c: Likewise.
7862 * pt-recv.c: Likewise.
7863 * pt-recvfrom.c: Likewise.
7864 * pt-recvmsg.c: Likewise.
7865 * pt-select.c: Likewise.
7866 * pt-send.c: Likewise.
7867 * pt-sendmsg.c: Likewise.
7868 * pt-sendto.c: Likewise.
7869 * pt-sigpause.c: Likewise.
7870 * pt-sigsuspend.c: Likewise.
7871 * pt-sigtimedwait.c: Likewise.
7872 * pt-sigwait.c: Likewise.
7873 * pt-sigwaitinfo.c: Likewise.
7874 * pt-system.c: Likewise.
7875 * pt-tcdrain.c: Likewise.
7876 * pt-wait.c: Likewise.
7877 * pt-waitid.c: Likewise.
7878 * pt-waitpid.c: Likewise.
7879 * pt-write.c: Likewise.
7880 * pt-writev.c: Likewise.
7881 * pthread_join.c: Likewise.
7882 * pthread_timedjoin.c: Likewise.
7884 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7885 (__xpg_sigpause): New function.
7886 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7888 2002-12-07 Ulrich Drepper <drepper@redhat.com>
7890 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7892 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7893 _GI_pthread_cleanup_pop to pthreadP.h.
7895 * ftrylockfile.c: Use _IO_lock_trylock instead of
7896 pthread_mutex_trylock.
7898 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7899 (CANCEL_RESET): Likewise.
7900 (__pthread_setcanceltype_): Declare.
7901 (__pthread_mutex_lock_internal): Declare.
7902 (__pthread_mutex_unlock_internal): Declare.
7903 (__pthread_once_internal): Declare.
7904 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7905 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7907 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7908 and pthread_mutex_unlock.
7909 * pthread_cond_wait.c: Likewise.
7910 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7911 * pthread_mutex_unlock.c: Likewise.
7913 * pthread_setcanceltype.c: Add additional alias
7914 __pthread_setcanceltype.
7916 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7917 * sem_open.c (sem_open): Likewise.
7918 Use __libc_open, __libc_write, and __libc_close instead of
7919 open, write, and close respectively.
7921 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7922 Rewrite as statement expression since it must return a value.
7924 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7925 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7928 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7929 alias __pthread_once_internal.
7931 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7933 2002-12-06 Ulrich Drepper <drepper@redhat.com>
7935 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7936 * tst-stdio1.c: New file.
7937 * tst-stdio2.c: New file.
7939 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7941 * Makefile (tests): Comment out tst-locale2 for now.
7942 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7944 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7946 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7947 Use _IO_lock_init instead of explicit assignment.
7949 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7950 Define __libc_lock_* and __libc_lock_recursive macros with
7951 lowlevellock macros, not pthread mutexes.
7953 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
7954 of pthread_mutex_lock.
7955 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
7956 instead of pthread_mutex_unlock.
7958 2002-12-06 Roland McGrath <roland@redhat.com>
7960 * allocatestack.c (__stack_user): Use uninitialized defn.
7961 * init.c (__pthread_initialize_minimal): Initialize it here.
7963 2002-12-05 Roland McGrath <roland@redhat.com>
7965 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7967 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7969 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7972 2002-12-05 Ulrich Drepper <drepper@redhat.com>
7974 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7976 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
7977 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
7978 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
7979 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
7980 for __libc_lock_* macros.
7981 * Makefile (routines): Add libc-lowlevellock.
7983 2002-10-09 Roland McGrath <roland@redhat.com>
7985 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
7986 Under [__PIC__], call the function via the pointer fetched for
7987 comparison rather than a call by name that uses the PLT.
7988 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
7989 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
7990 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
7991 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
7992 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
7994 2002-12-04 Roland McGrath <roland@redhat.com>
7996 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
7998 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
7999 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
8001 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
8003 2002-12-04 Ulrich Drepper <drepper@redhat.com>
8005 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
8006 a completely opaque, non-integer type.
8007 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8009 2002-12-05 Jakub Jelinek <jakub@redhat.com>
8011 * sysdeps/i386/tls.h: Include stdlib.h.
8012 * sysdeps/x86_64/tls.h: Likewise.
8014 2002-12-04 Ulrich Drepper <drepper@redhat.com>
8016 * Makefile (tests): Add tst-locale2.
8017 (tests-static): Likewise.
8018 * tst-locale2.c: New file.
8020 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
8021 volatile and add memory clobbers to lock operations.
8023 2002-12-03 Ulrich Drepper <drepper@redhat.com>
8025 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
8026 * sysdeps/i386/i486/bits/atomic.h: New file.
8027 * sysdeps/i386/i586/bits/atomic.h: New file.
8028 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
8029 include i486 version.
8030 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
8031 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
8032 Patch by Marijn Ros <marijn@mad.scientist.com>.
8034 * allocatestack.c (get_cached_stack): Don't crash if we first
8035 found a stack with a larger size then needed.
8036 Reported by Hui Huang <hui.huang@sun.com>.
8038 * Makefile (tests): Add tst-sysconf.
8039 * tst-sysconf.c: New file.
8041 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
8042 PTHREAD_THREADS_MAX.
8044 2002-12-02 Roland McGrath <roland@redhat.com>
8046 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
8047 Declare using hidden_proto instead of attribute_hidden, so there are
8048 non-.hidden static symbols for gdb to find.
8049 (__pthread_keys): Likewise.
8050 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
8051 * allocatestack.c (__stack_user): Likewise.
8052 * pthread_create.c (__pthread_keys): Likewise.
8053 (__nptl_threads_events, __nptl_last_event): Make these static instead
8055 * pthread_key_create.c (__pthread_pthread_keys_max,
8056 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
8058 2002-12-02 Ulrich Drepper <drepper@redhat.com>
8060 * Makefile (tests): Add tst-locale1. If buid-static is yes link
8062 * tst-locale1.c: New file.
8064 * pthread_cond_timedwait.c: Include <stdlib.h>.
8066 * Makefile (tests): Add tst-fork2 and tst-fork3.
8067 * tst-fork2.c: New file.
8068 * tst-fork3.c: New file.
8070 2002-11-28 Ulrich Drepper <drepper@redhat.com>
8072 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
8074 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
8075 require it to 200112L.
8077 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
8078 instruction only if HAVE_CMOV is defined.
8079 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
8081 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
8083 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
8085 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
8087 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
8089 2002-11-27 Ulrich Drepper <drepper@redhat.com>
8091 * sysdeps/x86_64/bits/atomic.h: New file.
8093 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
8096 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
8097 possible since gettid cannot fail.
8099 * sysdeps/x86_64/pthreaddef.h: New file.
8101 * sysdeps/i386/pthreaddef.h (gettid): Removed.
8103 * sysdeps/x86_64/pthread_spin_init.c: New file.
8104 * sysdeps/x86_64/pthread_spin_lock.c: New file.
8105 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
8106 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
8108 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
8109 Add missing lock prefix. Minute optimization.
8111 * tst-spin2.c (main): Also check successful trylock call.
8113 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
8114 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
8116 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
8117 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
8119 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
8120 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
8121 value in case of an error. Add support for INTERNAL_SYSCALL.
8123 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
8124 value in case of an error.
8126 * sysdeps/x86_64/tls.h: New file.
8128 2002-11-26 Ulrich Drepper <drepper@redhat.com>
8130 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
8131 takes the array member name and the index as parameters.
8132 (THREAD_SETMEM_NC): Likewise.
8133 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
8134 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
8137 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
8138 to decide which code to use.
8139 (THREAD_SETMEM_NC): Likewise.
8141 * allocatestack.c (queue_stack): Don't remove stack from list here.
8142 Do it in the caller. Correct condition to prematurely terminate
8143 loop to free stacks.
8144 (__deallocate_stack): Remove stack from list here.
8146 2002-11-26 Ulrich Drepper <drepper@redhat.com>
8148 * Makefile (tests): Add tst-stack1.
8149 * tst-stack1.c: New file.
8151 * allocatestack.c (allocate_stack): Initialize the TCB on a user
8154 * pthread_attr_getstack.c: Return bottom of the thread area.
8156 2002-11-25 Ulrich Drepper <drepper@redhat.com>
8158 * Makefile (libpthread-routines): Add pt-allocrtsig and
8159 pthread_kill_other_threads.
8160 * pt-allocrtsig.c: New file.
8161 * pthread_kill_other_threads.c: New file.
8162 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
8163 all three functions.
8164 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8166 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
8167 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
8168 and __libc_allocate_rtsig_private.
8169 * Versions (libpthread): Export pthread_kill_other_threads_np,
8170 __libc_current_sigrtmin, and __libc_current_sigrtmax.
8172 2002-11-24 Ulrich Drepper <drepper@redhat.com>
8174 * allocatestack.c (allocate_stack): stackaddr in attribute points to
8175 the end of the stack. Adjust computations.
8176 When mprotect call fails dequeue stack and free it.
8177 * pthread_attr_setstack.c: Store top of the stack in stackaddr
8179 * pthread_getattr_np.c: Likewise.
8181 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
8184 2002-11-23 Ulrich Drepper <drepper@redhat.com>
8186 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
8187 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
8189 2002-11-22 Ulrich Drepper <drepper@redhat.com>
8191 * pthread_getspecific.c: Optimize access to first 2nd-level array.
8192 * pthread_setspecific.c: Likewise.
8194 2002-11-21 Ulrich Drepper <drepper@redhat.com>
8196 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
8197 definitions. Get them from the official place.
8198 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
8200 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
8201 Use new CLONE_ flags in clone() calls.
8203 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
8204 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
8206 * Versions: Add pthread_* functions for libc.
8207 * forward.c: New file.
8209 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
8211 * herrno.c: New file.
8214 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
8215 sem_trywait, and sem_timedwait. Add herrno and res.
8216 * sem_init.c: Don't initialize lock and waiters members.
8217 * sem_open.c: Likewise.
8218 * sem_post.c: Removed.
8219 * sem_wait.c: Removed.
8220 * sem_trywait.c: Removed.
8221 * sem_timedwait.c: Removed.
8222 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
8223 Includes full implementations of sem_post, sem_wait, sem_trywait,
8225 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
8226 for new implementation.
8227 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
8230 * tst-sem3.c: Improve error message.
8231 * tst-signal3.c: Likewise.
8233 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
8234 to tell the kernel about the termination futex and to initialize tid
8235 member. Don't initialize main_thread.
8236 * descr.h (struct pthread): Remove main_thread member.
8237 * cancelllation.c (__do_cancel): Remove code handling main thread.
8238 The main thread is not special anymore.
8240 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
8241 size of the stacks to stack_cache_actsize.
8243 * pt-readv.c: Add missing "defined".
8244 * pt-sigwait.c: Likewise.
8245 * pt-writev.c: Likewise.
8247 2002-11-09 Ulrich Drepper <drepper@redhat.com>
8249 * Versions: Export __connect from libpthread.
8250 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8252 * Makefile (libpthread-routines): Add pt-raise.
8253 * sysdeps/unix/sysv/linux/raise.c: New file.
8254 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
8255 * sysdeps/generic/pt-raise.c: New file.
8257 * pthread_cond_init.c: Initialize all data elements of the condvar
8258 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
8260 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
8261 * pthread_create.c: Likewise.
8263 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
8264 * tst-key1.c: New file.
8265 * tst-key2.c: New file.
8266 * tst-key3.c: New file.
8268 * Versions: Export pthread_detach for version GLIBC_2.0.
8269 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
8271 2002-11-08 Ulrich Drepper <drepper@redhat.com>
8273 * pthread_key_create.c: Terminate search after an unused key was found.
8274 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8276 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
8277 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8279 2002-10-10 Ulrich Drepper <drepper@redhat.com>
8281 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
8282 dynamic lookup for errno in PIC.
8284 * allocatestack.c (get_cached_stack): Rearrange code slightly to
8285 release the stack lock as soon as possible.
8286 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
8287 the static TLS block.
8288 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
8290 * cancellation.c: Renamed from cancelation.c.
8291 * Makefile: Adjust accordingly.
8292 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
8293 * cleanup_defer.c: Use CANCELLATION_P.
8294 * pthread_testcancel.c: Likewise.
8295 * descr.h: Fix spelling in comments.
8297 * pthread_getattr_np.c: Likewise.
8298 * pthread_getschedparam.c: Likewise.
8299 * pthread_setschedparam.c: Likewise.
8300 * Versions: Likewise.
8302 * pt-pselect.c: New file.
8303 * Makefile (libpthread-routines): Add pt-pselect.
8304 * Versions: Add pselect.
8306 * tst-cancel4.c: New file.
8307 * Makefile (tests): Add tst-cancel4.
8309 2002-10-09 Ulrich Drepper <drepper@redhat.com>
8311 * pthread_mutex_lock.c: Always record lock ownership.
8312 * pthread_mutex_timedlock.c: Likewise.
8313 * pthread_mutex_trylock.c: Likewise.
8315 * pt-readv.c: New file.
8316 * pt-writev.c: New file.
8317 * pt-creat.c: New file.
8318 * pt-msgrcv.c: New file.
8319 * pt-msgsnd.c: New file.
8320 * pt-poll.c: New file.
8321 * pt-select.c: New file.
8322 * pt-sigpause.c: New file.
8323 * pt-sigsuspend.c: New file.
8324 * pt-sigwait.c: New file.
8325 * pt-sigwaitinfo.c: New file.
8326 * pt-waitid.c: New file.
8327 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8328 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8329 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8330 * Versions: Add all the new functions.
8332 * tst-exit1.c: New file.
8333 * Makefile (tests): Add tst-exit1.
8335 * sem_timedwait.c: Minor optimization for more optimal fastpath.
8337 2002-10-08 Ulrich Drepper <drepper@redhat.com>
8339 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8341 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8342 call. pthread_join is an official cancellation point.
8343 * pthread_timedjoin.c: Likewise.
8345 * pthread_cond_wait.c: Revert order in which internal lock are dropped
8346 and the condvar's mutex are retrieved.
8347 * pthread_cond_timedwait.c: Likewise.
8348 Reported by dice@saros.East.Sun.COM.
8350 2002-10-07 Ulrich Drepper <drepper@redhat.com>
8352 * pthreadP.h: Cut out all type definitions and move them...
8353 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
8354 * pthreadP.h: Include <internaltypes.h>.
8356 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8359 * sem_trywait.c: Shuffle #includes around to get right order.
8360 * sem_timedwait.c: Likewise.
8361 * sem_post.c: Likewise.
8362 * sem_wait.c: Likewise.
8364 * nptl 0.3 released.
8366 * Makefile (tests): Add tst-signal3.
8367 * tst-signal3.c: New file.
8369 2002-10-05 Ulrich Drepper <drepper@redhat.com>
8371 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8372 the asms modify the sem object.
8373 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8375 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8377 * pthreadP.h (struct sem): New type. Actual semaphore type.
8378 * semaphoreP.h: Include pthreadP.h.
8379 * sem_getvalue.c: Adjust to sem_t change.
8380 * sem_init.c: Likewise.
8381 * sem_open.c: Likewise.
8382 * sem_post.c: Likewise.
8383 * sem_timedwait.c: Likewise.
8384 * sem_trywait.c: Likewise.
8385 * sem_wait.c: Likewise.
8387 2002-10-04 Ulrich Drepper <drepper@redhat.com>
8389 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8390 * tst-basic2.c: New file.
8391 * tst-exec1.c: New file.
8392 * tst-exec2.c: New file.
8393 * tst-exec3.c: New file.
8395 * tst-fork1.c: Remove extra */.
8397 * nptl 0.2 released. The API for IA-32 is complete.