1 2006-08-15 Jakub Jelinek <jakub@redhat.com>
3 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
5 HAVE_CLOCK_GETTIME_VSYSCALL.
6 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
8 2006-08-14 Jakub Jelinek <jakub@redhat.com>
10 * sysdeps/unix/sysv/linux/bits/posix_opt.h
11 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
12 * descr.h (struct priority_protection_data): New type.
13 (struct pthread): Add tpp field.
14 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
15 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
16 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
17 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
19 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
20 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
21 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
22 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
24 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
26 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
27 * pthread_mutexattr_getprioceiling.c
28 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
29 in the SCHED_FIFO priority range.
30 * pthread_mutexattr_setprioceiling.c
31 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
32 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
33 if mutex is not TPP. Ceiling is now in __data.__lock.
34 * pthread_mutex_setprioceiling.c: Include stdbool.h.
35 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
36 is now in __data.__lock. Add locking.
37 * pthread_create.c (__free_tcb): Free pd->tpp structure.
38 * Makefile (libpthread-routines): Add tpp.
39 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
40 * tst-tpp.h: New file.
41 * tst-mutexpp1.c: New file.
42 * tst-mutexpp6.c: New file.
43 * tst-mutexpp10.c: New file.
44 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
45 * tst-mutex6.c (TEST_FUNCTION): Likewise.
47 2006-08-12 Ulrich Drepper <drepper@redhat.com>
50 * pthread_join.c (pthread_join): Account for self being canceled
51 when checking for deadlocks.
52 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
53 (tf1): Don't print anything after pthread_join returns, this would be
54 another cancellation point.
56 * tst-join6.c: New file.
57 * Makefile (tests): Add tst-join6.
59 2006-08-03 Ulrich Drepper <drepper@redhat.com>
62 * pthread_setspecific.c (__pthread_setspecific): Check
63 out-of-range index before checking for unused key.
65 * sysdeps/pthread/gai_misc.h: New file.
67 2006-08-01 Ulrich Drepper <drepper@redhat.com>
69 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
70 file. Don't use sysctl.
71 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
72 overwrite the file if this is likely not true.
74 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
76 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
77 * Makefile (tests): Add tst-getpid3.
78 * tst-getpid3.c: New file.
80 2006-07-30 Roland McGrath <roland@redhat.com>
82 * Makefile (libpthread-routines): Add ptw-sigsuspend.
84 * sysdeps/unix/sysv/linux/i386/not-cancel.h
85 (pause_not_cancel): New macro.
86 (nanosleep_not_cancel): New macro.
87 (sigsuspend_not_cancel): New macro.
88 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
89 nanosleep_not_cancel macro from <not-cancel.h>.
90 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
91 macro from <not-cancel.h>.
93 2006-07-28 Ulrich Drepper <drepper@redhat.com>
94 Jakub Jelinek <jakub@redhat.com>
96 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
97 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
98 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
99 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
100 * pthread_mutex_init.c: Add support for priority inheritance mutex.
101 * pthread_mutex_lock.c: Likewise.
102 * pthread_mutex_timedlock.c: Likewise.
103 * pthread_mutex_trylock.c: Likewise.
104 * pthread_mutex_unlock.c: Likewise.
105 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
107 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
108 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
109 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
110 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
111 pthread-pi-defines.sym.
112 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
113 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
114 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
115 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
116 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
117 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
118 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
119 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
120 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
121 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
122 _POSIX_THREAD_PRIO_INHERIT to 200112L.
123 * tst-mutex1.c: Adjust to allow use in PI mutex test.
124 * tst-mutex2.c: Likewise.
125 * tst-mutex3.c: Likewise.
126 * tst-mutex4.c: Likewise.
127 * tst-mutex5.c: Likewise.
128 * tst-mutex6.c: Likewise.
129 * tst-mutex7.c: Likewise.
130 * tst-mutex7a.c: Likewise.
131 * tst-mutex8.c: Likewise.
132 * tst-mutex9.c: Likewise.
133 * tst-robust1.c: Likewise.
134 * tst-robust7.c: Likewise.
135 * tst-robust8.c: Likewise.
136 * tst-mutexpi1.c: New file.
137 * tst-mutexpi2.c: New file.
138 * tst-mutexpi3.c: New file.
139 * tst-mutexpi4.c: New file.
140 * tst-mutexpi5.c: New file.
141 * tst-mutexpi6.c: New file.
142 * tst-mutexpi7.c: New file.
143 * tst-mutexpi7a.c: New file.
144 * tst-mutexpi8.c: New file.
145 * tst-mutexpi9.c: New file.
146 * tst-robust1.c: New file.
147 * tst-robust2.c: New file.
148 * tst-robust3.c: New file.
149 * tst-robust4.c: New file.
150 * tst-robust5.c: New file.
151 * tst-robust6.c: New file.
152 * tst-robust7.c: New file.
153 * tst-robust8.c: New file.
154 * Makefile (tests): Add the new tests.
156 * pthread_create.c (start_thread): Add some casts to avoid warnings.
157 * pthread_mutex_destroy.c: Remove unneeded label.
159 2006-07-01 Ulrich Drepper <drepper@redhat.com>
161 * pthread_mutex_init.c (__pthread_mutex_init): Move some
162 computations to compile time.
164 2006-06-04 Ulrich Drepper <drepper@redhat.com>
166 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
168 2006-05-15 Ulrich Drepper <drepper@redhat.com>
170 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
172 2006-05-11 Ulrich Drepper <drepper@redhat.com>
174 * pthread_key_create.c (__pthread_key_create): Do away with
177 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
178 (__kernel_cpumask_size): Mark as hidden.
179 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
181 * sem_open.c (__sem_mappings_lock): Mark as hidden.
182 * semaphoreP.h (__sem_mappings_lock): Likewise.
184 2006-05-10 Ulrich Drepper <drepper@redhat.com>
186 * pthread_atfork.c: Mark __dso_handle as hidden.
188 2006-05-09 Ulrich Drepper <drepper@redhat.com>
191 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
192 the reload problem. Change the one path in pthread_cancel_init
193 which causes the problem. Force gcc to reload. Simplify callers.
194 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
195 (_Unwind_GetBSP): Undo last patch.
197 2006-05-07 Ulrich Drepper <drepper@redhat.com>
199 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
200 function pointer is reloaded after pthread_cancel_init calls.
203 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
204 pointers are reloaded after pthread_cancel_init calls.
206 2006-05-01 Ulrich Drepper <drepper@redhat.com>
208 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
211 2006-04-27 Ulrich Drepper <drepper@redhat.com>
213 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
214 Allocate new object which is passed to timer_sigev_thread so that
215 the timer can be deleted before the new thread is scheduled.
217 2006-04-26 Roland McGrath <roland@redhat.com>
219 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
221 2006-04-08 Ulrich Drepper <drepper@redhat.com>
223 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
224 suffix for conditional jumps.
225 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
226 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
227 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
228 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
229 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
230 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
232 * init.c (sigcancel_handler): Compare with correct PID even if the
233 thread is in the middle of a fork call.
234 (sighandler_setxid): Likewise.
235 Reported by Suzuki K P <suzuki@in.ibm.com> .
237 2006-04-07 Jakub Jelinek <jakub@redhat.com>
239 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
241 2006-04-06 Ulrich Drepper <drepper@redhat.com>
243 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
244 fails [Coverity CID 105].
246 2006-04-05 Ulrich Drepper <drepper@redhat.com>
248 * sysdeps/pthread/pthread.h: Add nonnull attributes.
250 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
253 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
254 Define __lll_rel_instr using lwsync.
256 2006-03-27 Ulrich Drepper <drepper@redhat.com>
258 * allocatestack.c (allocate_stack): Always initialize robust_head.
259 * descr.h: Define struct robust_list_head.
260 (struct pthread): Use robust_list_head in robust mutex list definition.
261 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
262 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
263 (__pthread_initialize_minimal_internal): Register robust_list with
265 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
266 Declare __set_robust_list_avail.
267 * pthread_create.c (start_thread): Register robust_list of new thread.
268 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
270 * pthread_mutex_destroy.c: For robust mutexes don't look at the
271 number of users, it's unreliable.
272 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
273 set_robust_list syscall is available.
274 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
275 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
276 Set robust_head.list_op_pending before trying to lock a robust mutex.
277 * pthread_mutex_timedlock.c: Likewise.
278 * pthread_mutex_trylock.c: Likewise.
279 * pthread_mutex_unlock.c: Likewise for unlocking.
280 * Makefile (tests): Add tst-robust8.
281 * tst-robust8.c: New file.
283 2006-03-08 Andreas Schwab <schwab@suse.de>
285 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
286 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
288 2006-03-05 Roland McGrath <roland@redhat.com>
290 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
291 and $config_os doesn't match *linux*.
293 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
295 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
297 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
298 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
299 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
300 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
301 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
302 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
304 2006-03-02 Ulrich Drepper <drepper@redhat.com>
306 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
308 2006-03-01 Ulrich Drepper <drepper@redhat.com>
310 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
311 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
313 (__lll_robust_timedlock_wait): Likewise.
314 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
315 (__lll_robust_lock_wait): Likewise.
316 (__lll_robust_timedlock_wait): Likewise.
317 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
318 (__lll_robust_lock_wait): Likewise.
319 (__lll_robust_timedlock_wait): Likewise.
321 2006-03-01 Jakub Jelinek <jakub@redhat.com>
323 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
324 lll_robust_mutex_trylock, lll_robust_mutex_lock,
325 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
326 lll_robust_mutex_unlock): Define.
327 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
329 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
331 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
332 instead of <clone.S>.
334 2006-02-27 Jakub Jelinek <jakub@redhat.com>
336 * Makefile (libpthread-routines): Add
337 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
338 and pthread_mutex_[sg]etprioceiling.
339 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
340 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
341 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
342 pthread_mutex_setprioceiling.
343 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
344 PTHREAD_PRIO_PROTECT): New enum values.
345 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
346 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
347 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
349 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
350 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
351 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
353 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
354 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
355 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
356 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
357 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
358 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
359 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
361 * pthread_mutex_getprioceiling.c: New file.
362 * pthread_mutex_setprioceiling.c: New file.
363 * pthread_mutexattr_getprioceiling.c: New file.
364 * pthread_mutexattr_setprioceiling.c: New file.
365 * pthread_mutexattr_getprotocol.c: New file.
366 * pthread_mutexattr_setprotocol.c: New file.
368 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
370 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
372 2006-02-27 Roland McGrath <roland@redhat.com>
374 * sysdeps/pthread/Subdirs: List nptl here too.
375 * configure (libc_add_on_canonical): New variable.
377 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
379 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
380 self to get main source tree's file.
381 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
382 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
383 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
384 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
385 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
386 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
387 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
388 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
389 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
390 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
391 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
392 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
393 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
395 * Makefile: Use $(sysdirs) in vpath directive.
397 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
398 (CPPFLAGS-timer_routines.c): Likewise.
400 * Makeconfig (includes): Variable removed.
402 2006-02-26 Roland McGrath <roland@redhat.com>
404 * sysdeps/generic/pt-raise.c: Moved to ...
405 * pt-raise.c: ... here.
406 * sysdeps/generic/lowlevellock.h: Moved to ...
407 * lowlevellock.h: ... here.
409 2006-02-23 Roland McGrath <roland@redhat.com>
411 * descr.h (struct pthread): Add final member `end_padding'.
412 (PTHREAD_STRUCT_END_PADDING): Use it.
414 2006-02-20 Roland McGrath <roland@redhat.com>
416 * sysdeps/mips: Directory removed, saved in ports repository.
417 * sysdeps/unix/sysv/linux/mips: Likewise.
419 2006-02-18 Ulrich Drepper <drepper@redhat.com>
421 * tst-robust1.c: Add second mutex to check that the mutex list is
424 2006-02-17 Jakub Jelinek <jakub@redhat.com>
426 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
427 lll_robust_mutex_trylock, lll_robust_mutex_lock,
428 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
429 lll_robust_mutex_unlock): New macros.
430 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
431 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
432 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
433 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
434 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
436 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
438 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
440 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
442 2006-02-17 Ulrich Drepper <drepper@redhat.com>
444 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
445 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
446 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
447 (lll_robust_mutex_unlock): Likewise.
449 2006-02-13 Jakub Jelinek <jakub@redhat.com>
451 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
452 Set robust_list.__next rather than robust_list.
453 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
454 (__pthread_list_t): New typedef.
455 (pthread_mutex_t): Replace __next and __prev fields with __list.
456 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
457 (__pthread_list_t): New typedef.
458 (pthread_mutex_t): Replace __next and __prev fields with __list.
459 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
460 (__pthread_list_t, __pthread_slist_t): New typedefs.
461 (pthread_mutex_t): Replace __next and __prev fields with __list.
462 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
463 (__pthread_list_t, __pthread_slist_t): New typedefs.
464 (pthread_mutex_t): Replace __next and __prev fields with __list.
465 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
466 (__pthread_list_t, __pthread_slist_t): New typedefs.
467 (pthread_mutex_t): Replace __next and __prev fields with __list.
468 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
469 (__pthread_slist_t): New typedef.
470 (pthread_mutex_t): Replace __next field with __list.
472 2006-02-15 Ulrich Drepper <drepper@redhat.com>
474 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
475 PTHREAD_MUTEX_OWNERDEAD.
476 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
477 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
478 * Makefile (libpthread-routines): Add lowlevelrobustlock.
479 * pthread_create.c (start_thread): Very much simplify robust_list loop.
480 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
481 to PTHREAD_MUTEX_INCONSISTENT.
482 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
483 * pthread_mutex_lock.c: Reimplement robust mutex handling.
484 * pthread_mutex_trylock.c: Likewise.
485 * pthread_mutex_timedlock.c: Likewise.
486 * pthread_mutex_unlock.c: Likewise.
487 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
488 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
489 lowlevelrobustlock.sym.
490 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
491 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
493 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
494 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
495 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
496 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
497 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
499 2006-02-12 Ulrich Drepper <drepper@redhat.com>
501 * allocatestack.c (allocate_stack): Initialize robust_list.
502 * init.c (__pthread_initialize_minimal_internal): Likewise.
503 * descr.h (struct xid_command): Pretty printing.
504 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
505 robust_list. Adjust macros.
506 * pthread_create.c (start_thread): Adjust robust_list handling.
507 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
508 but the owner for all robust mutex types.
509 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
510 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
511 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
512 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
514 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
515 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
517 2006-02-08 Jakub Jelinek <jakub@redhat.com>
519 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
520 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
522 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
524 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
526 (lll_futex_timed_wait): Define.
528 2006-01-19 Ulrich Drepper <drepper@redhat.com>
530 * tst-cancel4.c: Test ppoll.
532 2006-01-18 Andreas Jaeger <aj@suse.de>
535 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
536 (pthread_mutex_t): Follow changes for other archs. Based on patch
537 by Jim Gifford <patches@jg555.com>.
539 2006-01-13 Richard Henderson <rth@redhat.com>
541 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
543 2006-01-10 Roland McGrath <roland@redhat.com>
545 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
546 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
547 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
548 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
549 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
550 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
551 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
552 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
553 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
554 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
556 2006-01-09 Roland McGrath <roland@redhat.com>
558 * tst-initializers1-c89.c: New file.
559 * tst-initializers1-c99.c: New file.
560 * tst-initializers1-gnu89.c: New file.
561 * tst-initializers1-gnu99.c: New file.
562 * Makefile (tests): Add them.
563 (CFLAGS-tst-initializers1-c89.c): New variable.
564 (CFLAGS-tst-initializers1-c99.c): New variable.
565 (CFLAGS-tst-initializers1-gnu89.c): New variable.
566 (CFLAGS-tst-initializers1-gnu99.c): New variable.
568 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
569 Use __extension__ on anonymous union definition.
570 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
571 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
572 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
573 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
574 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
576 2006-01-08 Jakub Jelinek <jakub@redhat.com>
578 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
579 Don't give the union a name because it changes the mangled name.
580 Instead name the struct for __data.
581 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
583 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
586 2006-01-09 Jakub Jelinek <jakub@redhat.com>
588 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
589 stack bias to mc_ftp field.
591 2006-01-07 Ulrich Drepper <drepper@redhat.com>
593 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
594 being too clever and reloading the futex value where it shouldn't.
596 2006-01-06 Ulrich Drepper <drepper@redhat.com>
598 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
601 2006-01-06 Jakub Jelinek <jakub@redhat.com>
603 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
606 2006-01-06 Ulrich Drepper <drepper@redhat.com>
608 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
609 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
612 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
613 Don't give the union a name because it changes the mangled name.
614 Instead name the struct for __data.
615 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
616 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
617 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
618 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
619 * pthread_create.c (start_thread): Adjust robust mutex free loop.
620 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
622 2006-01-05 Ulrich Drepper <drepper@redhat.com>
624 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
626 (lll_futex_timed_wait): Define.
627 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
628 * sysdeps/pthread/aio_misc.h: New file.
630 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
632 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
634 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
636 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
637 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
638 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
640 2006-01-04 Ulrich Drepper <drepper@redhat.com>
642 * tst-cancel24.cc: Use C headers instead of C++ headers.
644 2006-01-03 Jakub Jelinek <jakub@redhat.com>
646 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
647 sparc-linux configured glibc.
648 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
649 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
650 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
651 atomic_compare_and_exchange_val_24_acq instead of
652 atomic_compare_and_exchange_val_acq.
653 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
654 instead of atomic_exchange_rel.
655 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
656 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
658 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
660 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
661 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
662 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
663 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
664 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
665 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
667 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
669 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
670 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
671 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
673 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
675 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
677 2006-01-03 Ulrich Drepper <drepper@redhat.com>
679 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
682 2006-01-02 Jakub Jelinek <jakub@redhat.com>
684 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
685 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
686 THREAD_COPY_POINTER_GUARD): Define.
687 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
688 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
690 2006-01-01 Ulrich Drepper <drepper@redhat.com>
692 * version.c: Update copyright year.
694 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
696 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
697 .eh_frame section, use cfi_* directives.
698 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
700 2005-12-30 Ulrich Drepper <drepper@redhat.com>
702 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
705 2005-12-29 Ulrich Drepper <drepper@redhat.com>
707 * sysdeps/pthread/sigaction.c: Removed.
708 * sigaction.c: New file.
709 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
711 2005-12-28 Ulrich Drepper <drepper@redhat.com>
713 * Makefile (tests): Add tst-signal7.
714 * tst-signal7.c: New file.
716 2005-12-27 Roland McGrath <roland@redhat.com>
718 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
719 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
720 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
721 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
722 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
723 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
724 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
725 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
726 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
727 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
728 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
730 2005-12-27 Jakub Jelinek <jakub@redhat.com>
732 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
733 and __prev field to pthread_mutex_t.
734 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
735 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
736 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
737 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
738 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
741 2005-12-26 Ulrich Drepper <drepper@redhat.com>
743 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
744 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
745 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
746 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
747 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
748 and PTHREAD_MUTEXATTR_FLAG_BITS.
749 * descr.h (struct pthread): Add robust_list field and define
750 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
751 * pthread_mutexattr_getrobust.c: New file.
752 * pthread_mutexattr_setrobust.c: New file.
753 * pthread_mutex_consistent.c: New file.
754 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
755 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
756 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
757 Adjust pthread_mutex_t initializers.
758 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
759 field to pthread_mutex_t.
760 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
761 and __prev field to pthread_mutex_t.
762 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
763 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
764 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
765 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
766 * pthread_mutexattr_gettype.c: Likewise.
767 * pthread_mutexattr_setpshared.c: Likewise.
768 * pthread_mutexattr_settype.c: Likewise.
769 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
770 Initialize mutex kind according to robust flag.
771 * pthread_mutex_lock.c: Implement local robust mutex.
772 * pthread_mutex_timedlock.c: Likewise.
773 * pthread_mutex_trylock.c: Likewise.
774 * pthread_mutex_unlock.c: Likewise.
775 * pthread_create.c (start_thread): Mark robust mutexes which remained
777 * tst-robust1.c: New file.
778 * tst-robust2.c: New file.
779 * tst-robust3.c: New file.
780 * tst-robust4.c: New file.
781 * tst-robust5.c: New file.
782 * tst-robust6.c: New file.
783 * tst-robust7.c: New file.
784 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
785 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
786 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
787 tst-robust5, tst-robust6, and tst-robust7.
789 * tst-typesizes.c: New file.
790 * Makefile (tests): Add tst-typesizes.
792 * tst-once3.c: More debug output.
794 2005-12-24 Ulrich Drepper <drepper@redhat.com>
796 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
797 missing after last change.
799 * version.c: Update copyright year.
801 2005-12-23 Ulrich Drepper <drepper@redhat.com>
803 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
804 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
805 * pthread_mutex_trylock.c: Likewise.
806 * pthread_mutex_timedlock.c: Likewise.
807 * pthread_mutex_unlock.c: Likewise.
809 2005-12-22 Roland McGrath <roland@redhat.com>
811 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
812 so that #include_next's search location is not reset to the -I..
813 directory where <nptl/...> can be found.
815 2005-12-22 Ulrich Drepper <drepper@redhat.com>
818 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
819 Fix unwind info. Remove useless branch prediction prefix.
820 * tst-cancel24.cc: New file.
821 * Makefile: Add rules to build and run tst-cancel24.
823 2005-12-21 Roland McGrath <roland@redhat.com>
825 * libc-cancellation.c: Use <> rather than "" #includes.
826 * pt-cleanup.c: Likewise.
827 * pthread_create.c: Likewise.
828 * pthread_join.c: Likewise.
829 * pthread_timedjoin.c: Likewise.
830 * pthread_tryjoin.c: Likewise.
831 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
832 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
833 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
834 * unwind.c: Likewise.
836 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
838 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
839 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
840 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
841 THREAD_COPY_POINTER_GUARD): Define.
843 2005-12-19 Jakub Jelinek <jakub@redhat.com>
845 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
847 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
848 THREAD_COPY_POINTER_GUARD): Define.
849 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
850 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
851 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
852 THREAD_COPY_POINTER_GUARD): Define.
853 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
854 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
855 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
856 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
857 Use PTR_DEMANGLE for B0 if defined.
859 2005-12-17 Ulrich Drepper <drepper@redhat.com>
861 * pthread_create.c (__pthread_create_2_1): Use
862 THREAD_COPY_POINTER_GUARD if available.
863 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
864 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
865 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
866 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
867 * sysdeps/x86_64/tls.h: Likewise.
869 2005-12-15 Roland McGrath <roland@redhat.com>
871 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
873 2005-12-13 Ulrich Drepper <drepper@redhat.com>
875 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
877 * errno-loc.c: New file.
879 2005-12-12 Roland McGrath <roland@redhat.com>
881 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
882 adjustments before choosing stack size. Update minimum stack size
883 calculation to match allocate_stack change.
885 2005-12-12 Ulrich Drepper <drepper@redhat.com>
887 * allocatestack.c (allocate_stack): Don't demand that there is an
888 additional full page available on the stack beside guard, TLS, the
891 2005-11-24 Ulrich Drepper <drepper@redhat.com>
893 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
894 (__cleanup_fct_attribute): Use __regparm__ not regparm.
896 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
897 compiling 32-bit code we must define __cleanup_fct_attribute.
899 005-11-24 Jakub Jelinek <jakub@redhat.com>
902 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
903 __attribute__ instead of __attribute.
904 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
905 (__cleanup_fct_attribute): Likewise.
907 2005-11-17 Jakub Jelinek <jakub@redhat.com>
909 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
910 a write barrier before writing libgcc_s_getcfa.
912 2005-11-06 Ulrich Drepper <drepper@redhat.com>
914 * sysdeps/unix/sysv/linux/configure: Removed.
916 2005-11-05 Ulrich Drepper <drepper@redhat.com>
918 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
919 optional init_array/fini_array support.
921 2005-10-24 Roland McGrath <roland@redhat.com>
923 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
924 versioned_symbol use.
926 2005-10-16 Roland McGrath <roland@redhat.com>
928 * init.c (__pthread_initialize_minimal_internal): Even when using a
929 compile-time default stack size, apply the minimum that allocate_stack
930 will require, and round up to page size.
932 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
934 * Makefile ($(test-modules)): Remove static pattern rule.
936 2005-10-14 Jakub Jelinek <jakub@redhat.com>
937 Ulrich Drepper <drepper@redhat.com>
939 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
940 alignment in callback function.
941 * Makefile: Add rules to build and run tst-align3.
942 * tst-align3.c: New file.
944 2005-10-03 Jakub Jelinek <jakub@redhat.com>
946 * allocatestack.c (setxid_signal_thread): Add
947 INTERNAL_SYSCALL_DECL (err).
949 2005-10-02 Jakub Jelinek <jakub@redhat.com>
951 * allocatestack.c (setxid_signal_thread): Need to use
952 atomic_compare_and_exchange_bool_acq.
954 2005-10-01 Ulrich Drepper <drepper@redhat.com>
955 Jakub Jelinek <jakub@redhat.com>
957 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
959 (struct pthread): Move specific_used field to avoid padding.
960 Add setxid_futex field.
961 * init.c (sighandler_setxid): Reset setxid flag and release the
963 * allocatestack.c (setxid_signal_thread): New function. Broken
964 out of the bodies of the two loops in __nptl_setxid. For undetached
965 threads check whether they are exiting and if yes, don't send a signal.
966 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
967 * pthread_create.c (start_thread): For undetached threads, check
968 whether setxid bit is set. If yes, wait until signal has been
971 * allocatestack.c (STACK_VARIABLES): Initialize them.
972 * pthread_create.c (__pthread_create_2_1): Initialize pd.
974 2004-09-02 Jakub Jelinek <jakub@redhat.com>
976 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
977 waiters, awake all waiters on the associated mutex.
979 2005-09-22 Roland McGrath <roland@redhat.com>
981 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
982 ../sysdeps/x86_64/hp-timing.h).
984 2005-08-29 Jakub Jelinek <jakub@redhat.com>
986 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
987 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
988 (lll_futex_wake_unlock): Define.
989 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
990 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
991 (lll_futex_wake_unlock): Define.
992 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
993 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
994 (lll_futex_wake_unlock): Define.
995 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
996 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
997 (lll_futex_wake_unlock): Define.
998 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
999 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1000 (lll_futex_wake_unlock): Define.
1001 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
1002 lll_futex_wake_unlock.
1003 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1004 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1005 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1006 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1007 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1008 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1010 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1012 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1013 Fix typo in register name.
1015 2005-08-23 Ulrich Drepper <drepper@redhat.com>
1017 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1018 Use __sigfillset. Document that sigfillset does the right thing wrt
1021 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1024 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
1025 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
1026 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
1027 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
1028 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
1029 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
1031 * Makefile (tests): Add tst-initializers1.
1032 (CFLAGS-tst-initializers1.c): Set.
1033 * tst-initializers1.c: New test.
1035 2005-07-11 Jakub Jelinek <jakub@redhat.com>
1037 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
1038 Make sure __flags are located at offset 48 from the start of the
1041 2005-07-02 Roland McGrath <roland@redhat.com>
1043 * Makeconfig: Comment fix.
1045 2005-07-05 Jakub Jelinek <jakub@redhat.com>
1047 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
1048 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
1049 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
1050 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
1051 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1052 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1053 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
1054 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
1055 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
1056 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1058 2005-06-25 Jakub Jelinek <jakub@redhat.com>
1060 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
1061 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1062 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
1064 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1065 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
1066 field. Put in sysinfo field unconditionally.
1067 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1068 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
1069 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1070 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
1072 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1073 * pthread_create.c (__pthread_create_2_1): Use
1074 THREAD_COPY_STACK_GUARD macro.
1075 * Makefile: Add rules to build and run tst-stackguard1{,-static}
1077 * tst-stackguard1.c: New file.
1078 * tst-stackguard1-static.c: New file.
1080 2005-06-14 Alan Modra <amodra@bigpond.net.au>
1082 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1083 Invoke CGOTSETUP and CGOTRESTORE.
1084 (CGOTSETUP, CGOTRESTORE): Define.
1086 2005-05-29 Richard Henderson <rth@redhat.com>
1088 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
1089 (tf_write, tf_writev): Use it.
1090 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
1093 2005-05-23 Jakub Jelinek <jakub@redhat.com>
1095 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1096 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1097 __librt_*_asynccancel@local.
1099 2005-05-17 Alan Modra <amodra@bigpond.net.au>
1101 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1102 all occurrences of JUMPTARGET. Instead append @local to labels.
1104 2005-05-20 Jakub Jelinek <jakub@redhat.com>
1106 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1107 size/alignment of struct pthread rather than tcbhead_t.
1108 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1110 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1112 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1115 2005-05-19 Richard Henderson <rth@redhat.com>
1117 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1118 __sync_val_compare_and_swap, not explicit _si variant.
1119 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1121 2005-05-03 Ulrich Drepper <drepper@redhat.com>
1124 * sysdeps/pthread/pthread.h: Avoid empty initializers.
1126 2005-05-03 Jakub Jelinek <jakub@redhat.com>
1128 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1129 .eh_frame section, use cfi_* directives.
1131 2005-04-27 Jakub Jelinek <jakub@redhat.com>
1133 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1136 2005-04-27 Ulrich Drepper <drepper@redhat.com>
1139 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1142 2005-04-27 Roland McGrath <roland@redhat.com>
1144 * Makefile (tests): Remove tst-clock2.
1146 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1147 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1148 translating to the kernel clockid_t for our own process/thread clock.
1150 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1152 2005-04-15 Jakub Jelinek <jakub@redhat.com>
1154 * old_pthread_cond_init.c: Include <errno.h>.
1155 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1156 process shared or uses clock other than CLOCK_REALTIME.
1157 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1159 2005-04-13 David S. Miller <davem@davemloft.net>
1161 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1162 * sysdeps/sparc/sparc64/clone.S: New file.
1164 2005-04-05 Jakub Jelinek <jakub@redhat.com>
1167 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1168 __inline instead of inline.
1169 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1171 2005-03-31 Jakub Jelinek <jakub@redhat.com>
1173 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1174 functionally equivalent, but shorter instructions.
1175 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1176 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1177 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1179 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1180 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1181 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1182 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1183 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1184 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1185 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1187 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1188 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1189 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1190 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1191 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1193 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
1195 * sysdeps/mips/Makefile: New file.
1196 * sysdeps/mips/nptl-sysdep.S: New file.
1197 * sysdeps/mips/tcb-offsets.sym: New file.
1198 * sysdeps/mips/pthread_spin_lock.S: New file.
1199 * sysdeps/mips/pthread_spin_trylock.S: New file.
1200 * sysdeps/mips/pthreaddef.h: New file.
1201 * sysdeps/mips/tls.h: New file.
1202 * sysdeps/mips/jmpbuf-unwind.h: New file.
1203 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1204 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1205 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1206 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1207 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1208 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1209 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1210 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1211 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1212 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1214 2005-03-23 Ulrich Drepper <drepper@redhat.com>
1217 * pthread_create.c (__pthread_create_2_1): Rename syscall error
1220 2005-03-10 Jakub Jelinek <jakub@redhat.com>
1222 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1224 2005-02-25 Roland McGrath <roland@redhat.com>
1226 * alloca_cutoff.c: Correct license text.
1227 * tst-unload.c: Likewise.
1228 * sysdeps/pthread/allocalim.h: Likewise.
1229 * sysdeps/pthread/pt-initfini.c: Likewise.
1230 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1231 * sysdeps/pthread/bits/sigthread.h: Likewise.
1232 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1233 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1235 2005-02-16 Roland McGrath <roland@redhat.com>
1237 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1238 Use unsigned int * for ptr_nthreads.
1240 2005-02-14 Alan Modra <amodra@bigpond.net.au>
1243 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1246 2005-02-07 Richard Henderson <rth@redhat.com>
1249 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1252 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
1254 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1255 order of arguments in invocation of atomic_add_zero.
1257 2005-01-26 Jakub Jelinek <jakub@redhat.com>
1260 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1261 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1262 at least gotntpoff relocation and addition.
1263 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1265 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1267 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1270 2005-01-06 Ulrich Drepper <drepper@redhat.com>
1272 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1273 entry for static tls deallocation fix.
1274 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1275 also contains information whether the memory pointed to is static
1277 * sysdeps/i386/tls.h: Likewise.
1278 * sysdeps/ia64/tls.h: Likewise.
1279 * sysdeps/powerpc/tls.h: Likewise.
1280 * sysdeps/s390/tls.h: Likewise.
1281 * sysdeps/sh/tls.h: Likewise.
1282 * sysdeps/sparc/tls.h: Likewise.
1283 * sysdeps/x86_64/tls.h: Likewise.
1285 2004-12-27 Ulrich Drepper <drepper@redhat.com>
1287 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1289 2004-12-21 Jakub Jelinek <jakub@redhat.com>
1291 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1293 * Makefile (tests): Add tst-align2.
1294 * tst-align2.c: New test.
1295 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1296 -mpreferred-stack-boundary=4.
1298 2004-12-18 Roland McGrath <roland@redhat.com>
1300 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1301 New file removed withdrawn for the moment.
1303 2004-12-17 Richard Henderson <rth@redhat.com>
1305 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1306 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1308 2004-12-16 Ulrich Drepper <drepper@redhat.com>
1310 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1311 Increased PTHREAD_STACK_MIN.
1313 * tst-context1.c (stacks): Use bigger stack size.
1315 2004-12-16 Jakub Jelinek <jakub@redhat.com>
1317 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1318 * sysdeps/sparc/tcb-offsets.sym: Add TID.
1320 2004-12-15 Jakub Jelinek <jakub@redhat.com>
1322 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1323 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1324 * sysdeps/s390/tcb-offsets.sym (TID): Add.
1326 2004-12-15 Ulrich Drepper <drepper@redhat.com>
1328 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1330 2004-12-14 Ulrich Drepper <drepper@redhat.com>
1332 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1333 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1335 * tst-getpid1.c: If child crashes, report this first. Print which
1338 2004-12-09 Ulrich Drepper <drepper@redhat.com>
1340 * init.c (__pthread_initialize_minimal_internal): Also unblock
1343 2004-12-01 Jakub Jelinek <jakub@redhat.com>
1345 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1346 _POSIX_THREAD_CPUTIME): Define to 0.
1347 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1348 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
1349 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
1350 __timer_signal_thread_tclk): Remove.
1351 (init_module): Remove their initialization.
1352 (thread_cleanup): Remove their cleanup assertions.
1353 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
1354 __timer_signal_thread_tclk): Remove.
1355 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
1356 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
1357 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
1359 2004-12-07 Jakub Jelinek <jakub@redhat.com>
1361 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
1362 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
1364 * Makefile (tests): Add tst-getpid2.
1365 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
1366 (do_test): Use it. Use __clone2 instead of clone on ia64.
1367 * tst-getpid2.c: New test.
1369 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1371 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
1373 2004-12-04 Ulrich Drepper <drepper@redhat.com>
1375 * Makefile (tests): Add tst-getpid1.
1376 * tst-getpid1.c: New file.
1377 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
1378 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
1380 2004-12-02 Roland McGrath <roland@redhat.com>
1382 * Makefile (libpthread-nonshared): Variable removed.
1383 ($(objpfx)libpthread_nonshared.a): Target removed.
1384 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
1385 These are now handled by generic magic from
1386 libpthread-static-only-routines being set.
1388 2004-11-27 Ulrich Drepper <drepper@redhat.com>
1390 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
1391 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
1392 _POSIX_THREAD_PRIO_PROTECT): Define.
1393 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1394 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1395 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1397 2004-11-26 Jakub Jelinek <jakub@redhat.com>
1399 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
1400 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
1401 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
1402 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
1403 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1404 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1405 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1407 2004-11-24 Ulrich Drepper <drepper@redhat.com>
1409 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
1411 * Makefile (libpthread-routines): Add pthread_setschedprio.
1412 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
1413 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
1414 * pthread_setschedprio.c: New file.
1416 2004-11-20 Jakub Jelinek <jakub@redhat.com>
1418 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
1419 * pthread_cancel.c (pthread_create): Likewise.
1421 * Makefile (libpthread-routines): Add vars.
1422 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
1423 * init.c (__default_stacksize, __is_smp): Remove.
1425 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
1426 and define a wrapper macro.
1427 (PTHREAD_STATIC_FN_REQUIRE): Define.
1428 * allocatestack.c (__find_thread_by_id): Undefine.
1429 * pthread_create (__pthread_keys): Remove.
1430 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
1431 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
1432 PTHREAD_STATIC_FN_REQUIRE.
1434 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1436 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
1437 parameter to REGISTER macro.
1439 2004-11-17 Roland McGrath <roland@redhat.com>
1441 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
1442 Make sure SIGCANCEL is blocked as well.
1444 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1446 * sysdeps/pthread/setxid.h: New file.
1447 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
1448 (struct xid_command): Add forward decl.
1449 (struct pthread_functions): Change return type of __nptl_setxid hook
1451 * pthreadP.h (__nptl_setxid): Change return type to int.
1452 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
1453 calling thread, return its return value and set errno on failure.
1454 * descr.h (struct xid_command): Change id type to long array.
1456 * Makefile: Add rules to build and test tst-setuid1 and
1458 * tst-setuid1.c: New test.
1459 * tst-setuid1-static.c: New test.
1461 2004-11-10 Jakub Jelinek <jakub@redhat.com>
1463 * Makefile (tests): Add tst-exit3.
1464 * tst-exit3.c: New test.
1466 2004-11-09 Ulrich Drepper <drepper@redhat.com>
1468 * Makefile (tests): Add tst-exit2.
1469 * tst-exit2.c: New file.
1471 2004-11-09 Roland McGrath <roland@redhat.com>
1474 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
1475 here, before calling clone.
1476 * pthread_create.c (start_thread): Don't do it here.
1478 2004-11-02 Jakub Jelinek <jakub@redhat.com>
1480 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
1482 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1484 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1485 Set ETIMEDOUT to errno when time is up. Tweak to avoid
1488 2004-10-28 Jakub Jelinek <jakub@redhat.com>
1490 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
1491 if sched_priority is not between minprio and maxprio.
1493 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1495 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1496 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
1498 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1499 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
1501 2004-10-24 Ulrich Drepper <drepper@redhat.com>
1503 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
1504 not-cancelable I/O functions.
1506 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1508 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1509 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1510 make sure 2 is stored in the futex and we looked at the old value.
1511 Fix a few other problems to return the correct value.
1513 2004-10-14 Richard Henderson <rth@redhat.com>
1515 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
1518 2004-10-06 Jakub Jelinek <jakub@redhat.com>
1520 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
1521 of pthread-functions.h and pthreaddef.h.
1522 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
1524 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1525 Change __data.__nwaiters from int to unsigned int.
1527 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
1528 sysconf (_SC_THREAD_CPUTIME) returns negative value.
1530 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
1533 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
1534 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
1536 2004-10-06 Ulrich Drepper <drepper@redhat.com>
1538 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
1539 test fails, remove message queue.
1540 (tf_msgsnd): Likewise.
1542 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1544 * tst-clock1.c: Change #ifdef to #if defined.
1545 * tst-clock2.c: Likewise.
1546 * tst-cond11.c: Likewise.
1548 * sysdeps/pthread/timer_create.c (timer_create): Use
1549 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
1550 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
1553 2004-10-05 Jakub Jelinek <jakub@redhat.com>
1555 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
1556 _POSIX_THREAD_CPUTIME): Define to 0.
1558 2004-10-04 Ulrich Drepper <drepper@redhat.com>
1560 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
1561 and _POSIX_THREAD_CPUTIME to zero.
1562 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
1563 * tst-barrier2.c: Fix testing for POSIX feature.
1564 * tst-clock1.c: Likewise.
1565 * tst-clock2.c: Likewise.
1566 * tst-cond11.c: Likewise.
1567 * tst-cond4.c: Likewise.
1568 * tst-cond6.c: Likewise.
1569 * tst-flock2.c: Likewise.
1570 * tst-mutex4.c: Likewise.
1571 * tst-mutex9.c: Likewise.
1572 * tst-rwlock12.c: Likewise.
1573 * tst-rwlock4.c: Likewise.
1574 * tst-signal1.c: Likewise.
1575 * tst-spin2.c: Likewise.
1576 * sysdeps/pthread/posix-timer.h: Likewise.
1577 * sysdeps/pthread/timer_create.c: Likewise.
1578 * sysdeps/pthread/timer_routines.c: Likewise.
1580 2004-10-01 Ulrich Drepper <drepper@redhat.com>
1582 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1583 (__lll_mutex_timedlock_wait): Address futex correctly.
1585 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1586 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
1587 make sure 2 is stored in the futex and we looked at the old value.
1588 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1589 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
1590 which might very well made the code not working at all before.
1593 2004-09-28 Ulrich Drepper <drepper@redhat.com>
1595 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1596 allow SIGSETXID to be sent.
1597 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
1598 for SIGSETXID to be defined.
1599 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1600 SIGSETXID cannot be blocked.
1602 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1603 Add __extension__ to long long types.
1604 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1605 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1606 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1607 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1608 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1609 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1610 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1612 2004-09-25 Ulrich Drepper <drepper@redhat.com>
1614 * descr.h (struct pthread): Add stopped_start field.
1615 * sysdeps/pthread/createthread.c (create_thread): Set
1616 start_stopped flag in descriptor for new thread appropriately.
1617 * pthread_create.c (start_thread): Only take lock to be stopped on
1618 startup if stopped_start flag says so.
1620 2004-09-24 Ulrich Drepper <drepper@redhat.com>
1622 * pthread_create.c (__pthread_create_2_1): Remember whether thread
1623 is created detached and if yes, do not try to free the stack in case
1624 the thread creation failed.
1625 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
1626 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
1627 case there has been no error. [BZ #405]
1629 * pthread_create.c (start_thread): Don't wait for scheduler data
1630 etc to be set at the beginning of the function. The cancellation
1631 infrastructure must have been set up. And enable async
1632 cancellation before potentially going to sleep. [BZ #401]
1634 2004-09-20 Ulrich Drepper <drepper@redhat.com>
1636 * Versions: Remove exports for pthread_set*id_np functions.
1637 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
1639 * Makefile: Don't build pthread_set*id code for now.
1641 2004-09-19 Ulrich Drepper <drepper@redhat.com>
1643 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
1645 * allocatestack.c (__nptl_setxid): New function.
1646 * descr.h (struct xid_command): Define type.
1647 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
1648 (sighandler_setxid): New function.
1649 (__pthread_initialize_minimal): Register sighandler_setxid for
1651 * pt-allocrtsig.c: Update comment.
1652 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
1653 Declare __nptl_setxid.
1654 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
1655 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
1656 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1657 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1658 and pthread_setresuid_np.
1659 * pthread_setgid_np.c: New file.
1660 * pthread_setuid_np.c: New file.
1661 * pthread_setegid_np.c: New file.
1662 * pthread_seteuid_np.c: New file.
1663 * pthread_setregid_np.c: New file.
1664 * pthread_setreuid_np.c: New file.
1665 * pthread_setresgid_np.c: New file.
1666 * pthread_setresuid_np.c: New file.
1667 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
1668 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
1669 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
1670 and pthread_setresuid_np.
1671 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
1672 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
1673 pthread_setregid, and pthread_setresgid.
1675 2004-09-18 Ulrich Drepper <drepper@redhat.com>
1677 * allocatestack.c (allocate_stack): Return EAGAIN instead of
1678 ENOMEM when out of memory.
1680 2004-09-10 Roland McGrath <roland@redhat.com>
1683 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
1684 code, since we don't try to use the broken CLONE_STOPPED any more.
1685 * pthread_create.c (start_thread): Likewise.
1687 2004-09-15 Richard Henderson <rth@redhat.com>
1689 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
1691 2004-09-01 David Mosberger <davidm@hpl.hp.com>
1693 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
1694 (__libc_unwind_longjmp): Delete macro and declare as function.
1695 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
1696 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
1698 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
1699 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
1700 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
1702 2004-09-12 Ulrich Drepper <drepper@redhat.com>
1704 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
1706 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
1707 types also for __USE_XOPEN2K.
1708 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1709 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1710 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1711 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1712 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1713 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1714 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1717 2004-09-08 Ulrich Drepper <drepper@redhat.com>
1719 * sysdeps/pthread/pthread.h
1720 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
1721 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1722 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1723 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
1726 2004-09-07 Ulrich Drepper <drepper@redhat.com>
1728 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
1729 PSEUDO to be used with . prefix.
1731 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
1732 Use atomic_increment instead of atomic_exchange_and_add.
1733 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
1735 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1737 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1740 * allocatestack.c (allocate_stack): Use atomic_increment_val
1741 instead of atomic_exchange_and_add.
1742 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
1743 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1745 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1748 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
1749 the initialization function might throw.
1751 2005-09-05 Richard Henderson <rth@redhat.com>
1753 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1754 Move definition inside libpthread, libc, librt check. Provide
1755 definition for rtld.
1757 2004-09-02 Ulrich Drepper <drepper@redhat.com>
1759 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
1760 * sysdeps/i386/jmpbuf-unwind.h: Likewise
1761 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1762 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1763 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1764 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1765 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1766 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1769 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1770 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
1771 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
1773 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1774 Decrement __nwaiters. If pthread_cond_destroy has been called and
1775 this is the last waiter, signal pthread_cond_destroy caller and
1776 avoid using the pthread_cond_t structure after unlock.
1777 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1778 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1779 Read clock type from the least significant bits of __nwaiters instead
1781 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1782 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
1784 2004-08-31 Jakub Jelinek <jakub@redhat.com>
1787 * Makefile (tests): Add tst-cond20 and tst-cond21.
1788 * tst-cond20.c: New test.
1789 * tst-cond21.c: New test.
1790 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1791 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
1793 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1795 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1796 (pthread_cond_t): Likewise.
1797 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
1799 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1801 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
1803 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
1804 (cond_nwaiters): New.
1806 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
1807 if there are waiters not signalled yet.
1808 Wait until all already signalled waiters wake up.
1809 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
1810 __nwaiters. If pthread_cond_destroy has been called and this is the
1811 last waiter, signal pthread_cond_destroy caller and avoid using
1812 the pthread_cond_t structure after unlock.
1813 (__pthread_cond_wait): Increment __nwaiters in the beginning,
1814 decrement it when leaving. If pthread_cond_destroy has been called
1815 and this is the last waiter, signal pthread_cond_destroy caller.
1816 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1817 Likewise. Read clock type from the least significant bits of
1818 __nwaiters instead of __clock.
1819 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
1820 whether clock ID can be encoded in COND_CLOCK_BITS bits.
1821 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
1822 clock type just from the last COND_CLOCK_BITS bits of value.
1823 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
1824 instead of __clock, just from second bit of condattr's value.
1826 2004-08-30 Jakub Jelinek <jakub@redhat.com>
1828 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
1829 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
1831 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1833 2004-08-15 Roland McGrath <roland@frob.com>
1835 * pthread_atfork.c: Update copyright terms including special exception
1836 for these trivial files, which are statically linked into executables
1837 that use dynamic linking for the significant library code.
1839 2004-08-09 Jakub Jelinek <jakub@redhat.com>
1841 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
1842 pthread_rwlock_rdlock.
1843 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
1844 Decrease __nr_readers_queued after reacquiring lock.
1845 * sysdeps/pthread/pthread_rwlock_timedrdlock
1846 (pthread_rwlock_timedrdlock): Likewise.
1847 Reported by Bob Cook <bobcook47@hotmail.com>.
1849 2004-08-11 Jakub Jelinek <jakub@redhat.com>
1851 * tst-rwlock14.c (tf): Read main thread handle from *ARG
1852 before pthread_barrier_wait.
1854 2004-08-07 Ulrich Drepper <drepper@redhat.com>
1856 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1857 Remove unnecessary exception handling data.
1859 2004-07-23 Jakub Jelinek <jakub@redhat.com>
1862 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
1863 instead of clockid_t.
1865 2004-07-21 Roland McGrath <roland@redhat.com>
1867 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
1869 2004-07-19 Roland McGrath <roland@redhat.com>
1871 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
1873 2004-07-02 Roland McGrath <roland@redhat.com>
1875 * configure: Don't exit.
1877 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1879 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1880 (__pthread_cond_timedwait): Check for invalid nanosecond in
1883 2004-07-07 Ulrich Drepper <drepper@redhat.com>
1885 * Makefile: Add rules to build and run tst-fini1.
1886 * tst-fini1.c: New file.
1887 * tst-fini1mod.c: New file.
1889 2004-07-05 Ulrich Drepper <drepper@redhat.com>
1891 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
1892 if no cancellation support is needed.
1893 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1894 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1895 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1896 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1897 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1898 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1899 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1900 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1901 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1903 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
1904 only if not already defined.
1906 2004-07-05 Jakub Jelinek <jakub@redhat.com>
1908 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
1909 constraint "m" instead of "0" for futex.
1911 * shlib-versions: Add powerpc64-.*-linux.*.
1913 2004-07-04 Jakub Jelinek <jakub@redhat.com>
1915 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1916 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
1918 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
1919 1 billion and 64-bit tv_nsec which is valid when truncated to 32
1922 2004-06-29 Roland McGrath <roland@redhat.com>
1924 * Banner: NPTL no longer has its own version number.
1925 * Makefile (nptl-version): Variable removed.
1926 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
1927 using $(version), the glibc version number.
1929 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1931 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
1932 Fix branch offset for a PLT entry.
1933 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1935 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
1937 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1939 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
1942 2004-06-28 Jakub Jelinek <jakub@redhat.com>
1944 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
1947 2004-06-28 Jakub Jelinek <jakub@redhat.com>
1949 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1950 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
1952 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1953 (pthread_rwlock_timedrdlock): Likewise.
1955 2004-06-22 Jakub Jelinek <jakub@redhat.com>
1957 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
1958 Set __r7 to val, not mutex.
1960 2004-06-27 Ulrich Drepper <drepper@redhat.com>
1962 * Makefile: Add rules to build tst-rwlock14.
1963 * tst-rwlock14.c: New file.
1965 2004-06-24 Boris Hu <boris.hu@intel.com>
1967 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
1969 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1971 2004-06-19 Andreas Jaeger <aj@suse.de>
1973 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
1974 assembler in last patch.
1976 2004-06-17 Ulrich Drepper <drepper@redhat.com>
1978 * sysdeps/pthread/pthread_cond_timedwait.c
1979 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
1980 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1981 (__pthread_cond_timedwait): Check for invalid nanosecond in
1983 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1984 * tst-cond19.c: New file.
1985 * Makefile: Add rules to build and run tst-cond19.
1987 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
1989 * tst-context1.c (GUARD_PATTERN): Defined.
1990 (tst_context_t): Define struct containing ucontext_t & guard words.
1991 (ctx): Declare as an array of tst_context_t.
1992 (fct): Verify uc_link & guard words are still valid.
1993 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
1995 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1997 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1998 Add __data.__futex field, reshuffle __data.__clock.
1999 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
2000 (__pthread_cond_signal): Increment __futex at the same time as
2001 __wakeup_seq or __total_seq. Pass address of __futex instead of
2002 address of low 32-bits of __wakeup_seq to futex syscall.
2003 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2004 (__pthread_cond_wait): Likewise. Pass __futex value from before
2005 releasing internal lock to FUTEX_WAIT.
2006 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2007 (__pthread_cond_timedwait): Likewise.
2008 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2009 (FUTEX_CMP_REQUEUE): Define.
2010 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2011 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2012 Pass __futex value from before the unlock and __futex address instead
2013 of address of low 32-bits of __wakeup_seq to futex syscall.
2014 Fallback to FUTEX_WAKE all on any errors.
2016 2004-06-08 Jakub Jelinek <jakub@redhat.com>
2018 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
2020 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
2021 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
2022 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
2023 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
2024 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
2026 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
2028 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
2029 Add memory clobber to inline assembly.
2030 (__lll_mutex_trylock): Likewise.
2031 (__lll_mutex_cond_trylock): Likewise.
2033 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
2035 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2036 Pass val argument as 6th system call argument in %r7.
2038 2004-05-21 Jakub Jelinek <jakub@redhat.com>
2040 * Makefile (tests): Add tst-cond16.
2041 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
2042 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
2043 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2044 Add __data.__futex field, reshuffle __data.__clock.
2045 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
2046 (__pthread_cond_signal): Increment __futex at the same time as
2047 __wakeup_seq or __total_seq. Pass address of __futex instead of
2048 address of low 32-bits of __wakeup_seq to futex syscall.
2049 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
2050 (__pthread_cond_wait): Likewise. Pass __futex value from before
2051 releasing internal lock to FUTEX_WAIT.
2052 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
2053 (__pthread_cond_timedwait): Likewise.
2054 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
2055 (FUTEX_CMP_REQUEUE): Define.
2056 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2057 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2058 Pass __futex value from before the unlock and __futex address instead
2059 of address of low 32-bits of __wakeup_seq to futex syscall.
2060 Fallback to FUTEX_WAKE all on any errors.
2061 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
2063 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2064 internally. Return non-zero if error, zero if success.
2065 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2066 Add __data.__futex field, reshuffle __data.__clock.
2067 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
2069 (lll_futex_requeue): Add val argument, return 1 unconditionally
2071 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2072 Add __data.__futex field, reshuffle __data.__clock.
2073 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2075 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2076 internally. Return non-zero if error, zero if success.
2077 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2078 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
2079 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2081 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2082 internally. Return non-zero if error, zero if success.
2083 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2084 Add __data.__futex field, reshuffle __data.__clock.
2085 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
2087 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2088 internally. Return non-zero if error, zero if success.
2089 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2090 Add __data.__futex field, reshuffle __data.__clock.
2091 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2092 Add __data.__futex field, reshuffle __data.__clock.
2093 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2094 Increment __futex at the same time as __wakeup_seq or __total_seq.
2095 Pass address of __futex instead of address of low 32-bits of
2096 __wakeup_seq to futex syscall.
2097 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2098 Pass __futex value from before releasing internal lock
2100 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2101 Likewise. Avoid unnecessary shadowing of variables.
2102 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2103 Set __futex to 2 * __total_seq. Pass __futex value from before the
2104 unlock and __futex address instead of address of low 32-bits of
2105 __wakeup_seq to futex_requeue macro, adjust for new return value
2107 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2108 (__pthread_cond_signal): Increment __futex at the same time as
2109 __wakeup_seq or __total_seq. Pass address of __futex instead of
2110 address of low 32-bits of __wakeup_seq to futex syscall.
2111 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2112 (__pthread_cond_wait): Likewise. Pass __futex value from before
2113 releasing internal lock to FUTEX_WAIT.
2114 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2115 (__pthread_cond_timedwait): Likewise.
2116 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2117 (FUTEX_CMP_REQUEUE): Define.
2118 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2119 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2120 Pass __futex value from before the unlock and __futex address instead
2121 of address of low 32-bits of __wakeup_seq to futex syscall.
2122 Fallback to FUTEX_WAKE all on any errors.
2124 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2126 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2127 Add nop to align the end of critical section.
2128 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2130 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2132 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2133 Add __broadcast_seq field.
2134 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2135 all waiters as woken with woken_seq and bump broadcast counter.
2136 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2137 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
2138 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2139 Comment typo fixes. Avoid returning -ETIMEDOUT.
2141 2004-06-01 Ulrich Drepper <drepper@redhat.com>
2143 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2144 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2145 Reported by Kaz Kojima.
2147 2004-05-25 Jakub Jelinek <jakub@redhat.com>
2149 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2151 2004-05-21 Jakub Jelinek <jakub@redhat.com>
2153 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2154 __broadcast_seq with bc_seq after acquiring internal lock instead of
2157 2004-05-18 Jakub Jelinek <jakub@redhat.com>
2159 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2161 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2162 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2163 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2164 (pthread_cond_t): Add __data.__broadcast_seq field.
2165 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2166 (FRAME_SIZE): Define.
2167 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
2169 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2171 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
2173 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2174 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
2177 2004-05-18 Ulrich Drepper <drepper@redhat.com>
2179 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2180 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2181 Add __broadcast_seq field.
2182 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2183 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2184 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2185 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2186 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2188 all waiters as woken with woken_seq and bump broadcast counter.
2189 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2190 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2191 __broadcast_seq field.
2192 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2193 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2194 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2195 * pthread_cond_init.c: Initialize __broadcast_seq field.
2196 * Makefile (tests): Add tst-cond17 and tst-cond18.
2197 Add .NOTPARALLEL goal.
2198 * tst-cond16.c: New file. From Jakub.
2199 * tst-cond17.c: New file. From Jakub.
2200 * tst-cond18.c: New file. From Jakub.
2202 2004-05-16 Ulrich Drepper <drepper@redhat.com>
2204 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2207 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2208 Parametrize frame size. Correct some unwind info.
2209 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2211 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2213 * tst-stack3.c: Note testing functionality beyond POSIX.
2215 2004-05-04 Jakub Jelinek <jakub@redhat.com>
2217 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2218 Change conditional from ifdef to if.
2220 2004-04-23 Jakub Jelinek <jakub@redhat.com>
2222 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2223 SYSDEP_CANCEL_ERROR): Define.
2226 2004-05-01 Jakub Jelinek <jakub@redhat.com>
2228 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2230 2004-04-20 Jakub Jelinek <jakub@redhat.com>
2232 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2234 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2236 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2237 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2238 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2239 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2241 2004-04-19 Ulrich Drepper <drepper@redhat.com>
2243 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2244 thread has all signals blocked.
2246 2004-04-18 Andreas Jaeger <aj@suse.de>
2248 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2249 (SEM_VALUE_MAX): Add missing brace.
2251 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2253 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2255 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2256 * sysdeps/pthread/tst-mqueue8x.c: New test.
2257 * tst-cancel4.c: Update comment about message queues.
2259 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2260 return it_value { 0, 0 }.
2261 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2263 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2264 assertion for SIGEV_NONE.
2265 (thread_attr_compare): Compare all attributes, not just a partial
2268 2004-04-17 Jakub Jelinek <jakub@redhat.com>
2270 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2272 2004-04-17 Ulrich Drepper <drepper@redhat.com>
2274 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2275 Just use a plain number.
2276 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2277 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2278 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2279 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2280 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2281 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2282 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2284 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2286 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2288 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2290 2004-04-15 Jakub Jelinek <jakub@redhat.com>
2292 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2293 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2294 of calling sigwaitinfo.
2296 2004-04-16 Ulrich Drepper <drepper@redhat.com>
2298 * allocatestack.c (allocate_stack): Set reported_guardsize
2300 * pthread_getattr_np.c (pthread_getattr_np): Use
2301 reported_guardsize instead of guardsize.
2302 * descr.h (struct pthread): Add reported_guardsize field.
2304 2004-04-13 Jakub Jelinek <jakub@redhat.com>
2306 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2308 2004-04-12 Ulrich Drepper <drepper@redhat.com>
2310 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2312 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2314 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2315 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2316 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2317 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2318 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2320 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2321 (_POSIX_MESSAGE_PASSING): Define.
2322 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2323 (_POSIX_MESSAGE_PASSING): Define.
2324 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2325 (_POSIX_MESSAGE_PASSING): Define.
2327 2004-04-04 Ulrich Drepper <drepper@redhat.com>
2329 * tst-context1.c (fct): Check whether correct stack is used.
2331 2004-04-03 Ulrich Drepper <drepper@redhat.com>
2333 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2334 matching constraints for asm mem parameters.
2336 * tst-clock2.c (tf): Don't define unless needed.
2338 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
2340 * Makefile (link-libc-static): Use $(static-gnulib) instead of
2343 2004-03-30 Ulrich Drepper <drepper@redhat.com>
2345 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2346 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2347 * pthreadP.h: Declare __nptl_deallocate_tsd.
2348 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
2351 * Makefile (tests): Add tst-tsd5.
2352 * tst-tsd5.c: New file.
2354 2004-03-29 Ulrich Drepper <drepper@redhat.com>
2356 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2357 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
2358 is SHLIB_COMPAT check.
2359 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
2360 (__pthread_attr_getaffinity_old): Likewise.
2361 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2362 (__pthread_getaffinity_old): Likewise.
2363 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2364 (__pthread_setaffinity_old): Likewise.
2366 2004-03-26 Ulrich Drepper <drepper@redhat.com>
2368 * allocatestack.c (_make_stacks_executable): Call
2369 _dl_make_stack_executable first.
2371 2004-03-24 Roland McGrath <roland@redhat.com>
2373 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
2374 constraint instead of "0".
2376 2004-03-24 Ulrich Drepper <drepper@redhat.com>
2378 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2379 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
2381 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
2382 code to avoid warning.
2384 2004-03-24 Andreas Jaeger <aj@suse.de>
2386 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
2387 (__pthread_attr_setaffinity_old): Remove const.
2389 2004-03-23 Ulrich Drepper <drepper@redhat.com>
2391 * sysdeps/unix/sysv/linux/smp.h: New file.
2392 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2393 * init.c: Define __is_smp.
2394 (__pthread_initialize_minimal_internal): Call is_smp_system to
2395 initialize __is_smp.
2396 * pthreadP.h: Declare __is_smp.
2397 Define MAX_ADAPTIVE_COUNT is necessary.
2398 * pthread_mutex_init.c: Add comment regarding __spins field.
2399 * pthread_mutex_lock.c: Implement adaptive mutex type.
2400 * pthread_mutex_timedlock.c: Likewise.
2401 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2402 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2404 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2405 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2406 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2407 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2408 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2409 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2410 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2411 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
2412 lll_mutex_cond_trylock.
2413 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2414 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2415 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2416 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2417 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2418 Define BUSY_WAIT_NOP.
2419 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2420 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2422 * tst-mutex5.c: Add support for testing adaptive mutexes.
2423 * tst-mutex7.c: Likewise.
2424 * tst-mutex5a.c: New file.
2425 * tst-mutex7a.c: New file.
2426 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
2428 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2429 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
2430 vgettimeofday call might destroy the content.
2432 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
2435 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2436 No need to restrict type of ret. Make it int. Add comment.
2438 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
2439 Remove unnecessary setne instruction.
2441 2004-03-22 Jakub Jelinek <jakub@redhat.com>
2443 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2444 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
2445 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
2446 If realloc fails, break out of the loop.
2448 2004-03-20 Andreas Jaeger <aj@suse.de>
2450 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2451 (__pthread_setaffinity_old): Fix interface.
2452 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
2453 (__pthread_getaffinity_old): Likewise.
2455 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2456 (__pthread_setaffinity_new): Remove duplicate declaration.
2458 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2460 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
2461 the return value to a safe register.
2462 (CDISABLE): Set the function argument correctly.
2464 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2466 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
2467 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2468 Rewrite so that only one locked memory operation per round is needed.
2469 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2470 (pthread_barrier_wait): After wakeup, release lock only when the
2471 last thread stopped using the barrier object.
2472 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2473 (__pthread_cond_wait): Don't store mutex address if the current
2474 value is ~0l. Add correct cleanup support and unwind info.
2475 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2476 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2477 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
2478 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
2479 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2480 Add correct cleanup support and unwind info.
2481 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
2482 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
2483 information for syscall wrappers.
2485 2004-03-18 Ulrich Drepper <drepper@redhat.com>
2487 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2488 cpusetsize field, remove next.
2489 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
2490 parameter for size of the CPU set.
2491 (pthread_setaffinity_np): Likewise.
2492 (pthread_attr_getaffinity_np): Likewise.
2493 (pthread_attr_setaffinity_np): Likewise.
2494 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
2495 interface change, keep compatibility code.
2496 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2497 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
2498 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
2499 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
2500 __pthread_getaffinity_np.
2501 * Versions: Add version for changed interfaces.
2502 * tst-attr3.c: Adjust test for interface change.
2503 * pthread_getattr_np.c: Query the kernel about the affinity mask with
2504 increasing buffer sizes.
2505 * pthread_attr_destroy.c: Remove unused list handling.
2506 * pthread_attr_init.c: Likewise.
2508 2004-03-17 Roland McGrath <roland@redhat.com>
2510 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
2511 first argument to clock_getres so we ever enable kernel timers.
2513 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
2515 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
2517 2004-03-12 Richard Henderson <rth@redhat.com>
2519 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
2520 oldvalue from CENABLE to CDISABLE.
2522 2004-03-12 Ulrich Drepper <drepper@redhat.com>
2524 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
2525 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2526 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2527 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2529 2004-03-11 Richard Henderson <rth@redhat.com>
2531 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
2532 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
2533 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
2535 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2537 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
2538 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
2539 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
2541 2004-03-11 Jakub Jelinek <jakub@redhat.com>
2543 * forward.c (__pthread_cond_broadcast_2_0,
2544 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
2545 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
2546 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
2548 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2550 * sysdeps/sh/tcb-offsets.sym: Add PID.
2551 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
2552 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
2554 2004-03-10 Ulrich Drepper <drepper@redhat.com>
2556 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
2557 include <sysdep-cancel.h>, vfork is no cancellation point.
2558 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
2559 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
2560 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
2562 2004-03-10 Jakub Jelinek <jakub@redhat.com>
2564 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
2566 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
2567 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
2569 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
2571 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
2572 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
2573 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
2574 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
2575 of DO_CALL_VIA_BREAK. Work around a gas problem.
2577 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
2578 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
2579 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
2580 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
2581 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
2582 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
2584 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
2585 a local register for saving old PID. Negate PID in parent upon exit.
2587 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
2589 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2590 before syscall, set to the old value in the parent afterwards.
2591 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
2592 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
2594 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
2595 before syscall, set to the old value in the parent afterwards.
2596 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
2597 * sysdeps/s390/tcb-offsets.sym: Add PID.
2599 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
2600 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
2601 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
2602 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
2603 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
2604 * sysdeps/sparc/tcb-offsets.sym: Add PID.
2606 2004-03-10 Andreas Schwab <schwab@suse.de>
2608 * sysdeps/ia64/tcb-offsets.sym: Add PID.
2609 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
2610 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
2612 2004-03-09 Jakub Jelinek <jakub@redhat.com>
2614 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
2615 * tst-cancel21.c (do_one_test): Likewise.
2616 Reported by Gordon Jin <gordon.jin@intel.com>.
2618 2004-02-09 Jakub Jelinek <jakub@redhat.com>
2620 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
2621 if non-zero and set to INT_MIN if zero.
2622 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
2623 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
2624 (SAVE_PID, RESTORE_PID): Define.
2626 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
2627 Use relative path to avoid including NPTL i386/vfork.S.
2628 (SAVE_PID, RESTORE_PID): Define.
2629 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
2630 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
2631 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
2633 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
2634 * tst-vfork1.c: New test.
2635 * tst-vfork2.c: New test.
2636 * tst-vfork1x.c: New test.
2637 * tst-vfork2x.c: New test.
2639 2004-03-08 Ulrich Drepper <drepper@redhat.com>
2641 * sysdeps/i386/tcb-offsets.sym: Add PID.
2642 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2643 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
2644 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
2646 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
2648 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
2650 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
2652 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2655 2004-03-07 Ulrich Drepper <drepper@redhat.com>
2657 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
2660 * tst-once4.c: Remove unnecessary macro definition.
2662 * tst-mutex7.c (do_test): Limit thread stack size.
2663 * tst-once2.c (do_test): Likewise.
2664 * tst-tls3.c (do_test): Likewise.
2665 * tst-tls1.c (do_test): Likewise.
2666 * tst-signal3.c (do_test): Likewise.
2667 * tst-kill6.c (do_test): Likewise.
2668 * tst-key4.c (do_test): Likewise.
2669 * tst-join4.c (do_test): Likewise.
2670 * tst-fork1.c (do_test): Likewise.
2671 * tst-context1.c (do_test): Likewise.
2672 * tst-cond2.c (do_test): Likewise.
2673 * tst-cond10.c (do_test): Likewise.
2674 * tst-clock2.c (do_test): Likewise.
2675 * tst-cancel10.c (do_test): Likewise.
2676 * tst-basic2.c (do_test): Likewise.
2677 * tst-barrier4.c (do_test): Likewise.
2679 2004-03-05 Ulrich Drepper <drepper@redhat.com>
2681 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
2683 2004-03-01 Ulrich Drepper <drepper@redhat.com>
2685 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2686 (__pthread_cond_timedwait): Optimize wakeup test.
2687 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2688 (__pthread_cond_wait): Likewise.
2689 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2690 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2693 2004-02-29 Ulrich Drepper <drepper@redhat.com>
2695 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2696 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
2697 the atomic instruction needed.
2698 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2699 (__lll_mutex_lock_wait): Likewise.
2701 2004-02-28 Ulrich Drepper <drepper@redhat.com>
2703 * Makefile (tests): Add tst-cond14 and tst-cond15.
2704 * tst-cond14.c: New file.
2705 * tst-cond15.c: New file.
2707 2004-02-27 Ulrich Drepper <drepper@redhat.com>
2709 * sysdeps/pthread/createthread.c (create_thread): Remove use of
2710 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
2711 needs to be implemented differently to be useful.
2713 2004-02-26 Ulrich Drepper <drepper@redhat.com>
2715 * pthread_attr_setschedparam.c: Don't test priority against limits
2716 here. Set ATTR_FLAG_SCHED_SET flag.
2717 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
2718 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
2719 from parent thread to child. If attribute is used and scheduling
2720 parameters are not inherited, copy parameters from attribute or
2721 compute them. Check priority value.
2722 * pthread_getschedparam.c: If the parameters aren't known yet get
2723 them from the kernel.
2724 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
2725 ATTR_FLAG_POLICY_SET flag for thread.
2726 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
2727 and ATTR_FLAG_POLICY_SET.
2729 * sysdeps/pthread/createthread.c: Use tgkill if possible.
2731 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
2732 fail if stack address hasn't been set. Just return 0.
2734 2004-02-25 Ulrich Drepper <drepper@redhat.com>
2736 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
2737 libpthread for the files in this list.
2738 (CFLAGS-tst-unload): Removed.
2739 * tst-unload.c (do_test): Don't use complete path for
2742 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
2745 2004-02-22 Ulrich Drepper <drepper@redhat.com>
2747 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2748 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
2749 operation per round is needed.
2750 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2751 (__lll_mutex_lock_wait): Likewise.
2753 2004-02-20 Ulrich Drepper <drepper@redhat.com>
2755 * tst-cancel9.c (cleanup): Don't print to stderr.
2757 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2759 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
2761 2004-02-20 Jakub Jelinek <jakub@redhat.com>
2763 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2764 (__syscall_error_handler2): Call CDISABLE.
2765 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2766 (__syscall_error_handler2): Call CDISABLE.
2768 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2769 Release lock before the loop, don't reacquire it.
2771 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
2773 2004-02-19 Andreas Schwab <schwab@suse.de>
2775 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2778 2004-02-18 Ulrich Drepper <drepper@redhat.com>
2780 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2781 (pthread_barrier_wait): After wakeup, release lock only when the
2782 last thread stopped using the barrier object.
2783 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
2784 (pthread_barrier_wait): Likewise.
2785 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2787 * Makefile (tests): Add tst-barrier4.
2788 * tst-barrier4.c: New file.
2790 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2791 (__pthread_cond_timedwait): Perform timeout test while holding
2792 internal lock to prevent wakeup race.
2793 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2794 * sysdeps/pthread/pthread_cond_timedwait.c
2795 (__pthread_cond_timedwait): Likewise.
2796 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2797 (__pthread_cond_timedwait): Likewise.
2799 2004-02-18 Jakub Jelinek <jakub@redhat.com>
2801 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
2802 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
2803 * Makefile (tests): Add tst-rwlock13.
2804 * tst-rwlock13.c: New test.
2806 2004-02-16 Ulrich Drepper <drepper@redhat.com>
2808 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2809 (__condvar_tw_cleanup): Little optimization.
2810 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
2812 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
2814 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
2815 libpthread as "lib" parameter to SHLIB_COMPAT.
2816 (__novmx_siglongjmp): Fix typo in function name.
2817 (__novmx_longjmp): Fix typo in function name.
2819 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2821 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
2824 * sysdeps/generic/pt-longjmp.c: Moved to...
2825 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
2827 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
2829 * Makefile (libpthread-routines): Add pt-cleanup.
2830 * pt-longjmp.c: Removed.
2831 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
2832 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
2833 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
2834 Version longjmp, siglongjmp for GLIBC_2.3.4.
2835 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
2837 2004-02-13 Ulrich Drepper <drepper@redhat.com>
2839 * sysdeps/pthread/pthread_cond_timedwait.c
2840 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
2841 Reuse code. Add __builtin_expects.
2843 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2844 (__pthread_cond_timedwait): Get internal lock in case timeout has
2845 passed before the futex syscall.
2846 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2848 2004-01-20 Ulrich Drepper <drepper@redhat.com>
2850 * allocatestack.c: Pretty printing.
2852 * sysdeps/pthread/createthread.c (create_thread): Don't add
2853 CLONE_DETACHED bit if it is not necessary.
2855 2004-01-16 Ulrich Drepper <drepper@redhat.com>
2857 * pthread_getattr_np.c: Include ldsodefs.h.
2859 2004-01-16 Richard Henderson <rth@redhat.com>
2861 * allocatestack.c: Don't declare __libc_stack_end.
2862 * init.c (__pthread_initialize_minimal_internal): Likewise.
2863 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
2865 2004-01-15 Richard Henderson <rth@redhat.com>
2867 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
2868 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
2869 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
2870 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
2871 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
2872 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
2873 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
2874 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
2876 2004-01-14 Ulrich Drepper <drepper@redhat.com>
2878 * init.c (pthread_functions): Make array const.
2880 2004-01-13 Ulrich Drepper <drepper@redhat.com>
2882 * allocatestack.c (__make_stacks_executable): Change interface.
2883 Check parameters. Pass parameter on to libc counterpart.
2884 * pthreadP.h: Change declaration.
2886 2004-01-13 Richard Henderson <rth@redhat.com>
2888 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
2890 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
2893 * sysdeps/alpha/Makefile: New file.
2894 * sysdeps/alpha/tcb-offsets.sym: New file.
2895 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2896 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
2898 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
2901 2004-01-08 Jakub Jelinek <jakub@redhat.com>
2903 * Makefile (tests): Add tst-backtrace1.
2904 * tst-backtrace1.c: New test.
2906 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
2908 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
2909 register as second parameter to the REGISTER macro.
2910 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
2911 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
2912 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
2913 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
2914 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
2915 of thread register as second parameter to REGISTER macro in 64 case.
2917 2004-01-03 Ulrich Drepper <drepper@redhat.com>
2919 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
2920 (CFLAGS-getpid.o): Defined.
2921 (CFLAGS-getpid.os): Defined.
2923 2003-12-31 Ulrich Drepper <drepper@redhat.com>
2925 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
2926 returned for main thread does not overlap with any other VMA.
2927 Patch by Jakub Jelinek.
2929 2003-12-29 Jakub Jelinek <jakub@redhat.com>
2931 * tst-raise1.c: Include stdio.h.
2933 2003-12-23 Jakub Jelinek <jakub@redhat.com>
2935 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
2936 setting with __ASSUME_TGKILL || defined __NR_tgkill.
2937 If pid is 0, set it to selftid.
2938 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
2939 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
2940 != 0, return self->tid without doing a syscall.
2941 * descr.h (struct pthread): Move pid field after tid.
2943 * Makefile (tests): Add tst-raise1.
2944 * tst-raise1.c: New file.
2946 2003-12-23 Roland McGrath <roland@redhat.com>
2948 * tst-oddstacklimit.c: New file.
2949 * Makefile (tests): Add it.
2950 (tst-oddstacklimit-ENV): New variable.
2952 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
2953 value up to page size for __default_stacksize.
2955 2003-12-21 Ulrich Drepper <drepper@redhat.com>
2957 * Makefile (tests): Add tst-eintr5.
2958 * tst-eintr5.c: New file.
2960 * eintr.c (eintr_source): Prevent sending signal to self.
2962 * tst-eintr2.c (tf1): Improve error message.
2964 2003-12-20 Ulrich Drepper <drepper@redhat.com>
2966 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
2967 * sysdeps/unix/sysv/linux/getpid.c: New file.
2968 * pthread_cancel.c: Add comment explaining use of PID field.
2969 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2970 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
2971 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
2972 temporarily to signal the field must not be relied on and updated
2974 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
2975 temporarily negative.
2976 * sysdeps/unix/sysv/linux/raise.c: Likewise.
2978 2003-12-19 Ulrich Drepper <drepper@redhat.com>
2980 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
2981 (eintr_source): If ARG != NULL, use pthread_kill.
2982 * tst-eintr1.c: Adjust for this change.
2983 * tst-eintr2.c: Likewise.
2984 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
2985 * tst-eintr3.c: New file.
2986 * tst-eintr4.c: New file.
2988 2003-12-19 Jakub Jelinek <jakub@redhat.com>
2990 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
2991 if CANCELSTATE_BITMASK is set.
2992 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
2995 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
2996 (tests-reverse): Add tst-cancel23.
2997 * tst-cancel22.c: New test.
2998 * tst-cancel23.c: New test.
3000 2003-12-18 Ulrich Drepper <drepper@redhat.com>
3002 * tst-eintr1.c: Better error messages.
3004 * Makefile (tests): Add tst-eintr2.
3005 * tst-eintr2.c: New file.
3007 2003-12-18 Jakub Jelinek <jakub@redhat.com>
3009 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
3010 (CFLAGS-tst-cancelx21.c): Set.
3011 * tst-cancel21.c: New test.
3012 * tst-cancelx21.c: New test.
3014 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
3016 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
3017 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
3018 * pt-longjmp.c: Include jmpbuf-unwind.h.
3019 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
3020 _JMPBUF_UNWINDS. Adjust compared pointers.
3021 * init.c (__pthread_initialize_minimal_internal): Initialize
3022 pd->stackblock_size.
3023 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
3024 * sysdeps/alpha/jmpbuf-unwind.h: New file.
3025 * sysdeps/i386/jmpbuf-unwind.h: New file.
3026 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
3027 * sysdeps/s390/jmpbuf-unwind.h: New file.
3028 * sysdeps/sh/jmpbuf-unwind.h: New file.
3029 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
3030 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
3031 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
3032 (_JMPBUF_CFA_UNWINDS): Remove.
3033 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
3035 2003-12-12 Jakub Jelinek <jakub@redhat.com>
3037 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
3038 (CFLAGS-tst-cancelx20.c): Set.
3039 * tst-cancel20.c: New test.
3040 * tst-cancelx20.c: New test.
3042 2003-12-17 Ulrich Drepper <drepper@redhat.com>
3044 * init.c (__pthread_initialize_minimal_internal): Don't treat
3045 architectures with separate register stack special here when
3046 computing default stack size.
3048 2003-12-17 Roland McGrath <roland@redhat.com>
3050 * Makefile (tst-cancelx7-ARGS): New variable.
3051 Reportd by Greg Schafer <gschafer@zip.com.au>.
3053 2003-12-17 Jakub Jelinek <jakub@redhat.com>
3055 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
3056 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
3057 (tst-stack3-ENV): Set.
3058 ($(objpfx)tst-stack3-mem): New.
3059 * tst-stack3.c: New test.
3061 2003-12-10 David Mosberger <davidm@hpl.hp.com>
3063 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
3064 Add unwind directives. Drop unused .regstk directive.
3065 (_fini_EPILOG_BEGINS): Add unwind directives.
3067 2003-12-11 Ulrich Drepper <drepper@redhat.com>
3069 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3070 Assume parameter is a pointer.
3071 (lll_futex_wake): Likewise.
3072 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
3074 (lll_futex_wake): Likewise.
3075 Reported by Boris Hu.
3076 * sysdeps/unix/sysv/linux/unregister-atfork.c
3077 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
3079 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
3081 2003-12-10 Ulrich Drepper <drepper@redhat.com>
3083 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
3084 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
3085 __rtld_lock_initialize for ld.so lock.
3086 Patch in part by Adam Li <adam.li@intel.com>.
3088 2003-12-02 David Mosberger <davidm@hpl.hp.com>
3090 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
3091 in $(gnulib). Also, remove stale comment.
3093 2003-11-12 David Mosberger <davidm@hpl.hp.com>
3095 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3096 advantage of new syscall stub and optimize accordingly.
3098 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3099 from SYS_futex, to match expectations of
3100 sysdep.h:DO_INLINE_SYSCALL.
3101 (lll_futex_clobbers): Remove.
3102 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3103 (lll_futex_wake): Likewise.
3104 (lll_futex_requeue): Likewise.
3105 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3106 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3108 (__lll_mutex_lock): Likewise.
3109 (__lll_mutex_cond_lock): Likewise.
3110 (__lll_mutex_timed_lock): Likewise.
3111 (__lll_mutex_unlock): Likewise.
3112 (__lll_mutex_unlock_force): Likewise.
3114 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3115 comes before the include of <sysdep.h>.
3116 (THREAD_SELF_SYSINFO): New macro.
3117 (THREAD_SYSINFO): Likewise.
3118 (INIT_SYSINFO): New macro.
3119 (TLS_INIT_TP): Call INIT_SYSINFO.
3121 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3123 * sysdeps/pthread/createthread.c (create_thread): Use
3124 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3125 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3126 THREAD_SELF_SYSINFO instead of open code.
3127 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3128 (THREAD_SYSINFO): Likewise.
3130 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3132 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3134 2003-12-06 Ulrich Drepper <drepper@redhat.com>
3136 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3137 instead of .init. Patch by David Mosberger.
3139 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
3141 * sysdeps/pthread/configure.in: Remove broken declaration in C
3142 cleanup handling check.
3144 2003-11-30 Andreas Jaeger <aj@suse.de>
3146 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
3147 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
3150 2003-11-27 Jakub Jelinek <jakub@redhat.com>
3152 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3153 * pthread_attr_destroy.c: Include shlib-compat.h.
3154 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3155 is set in iattr->flags.
3156 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3158 2003-11-21 Jakub Jelinek <jakub@redhat.com>
3160 * Makefile (distribute): Add tst-cleanup4aux.c.
3162 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
3165 2003-11-21 Ulrich Drepper <drepper@redhat.com>
3167 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3168 pthread_cond_signal.
3170 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3171 store mutex address if the current value is ~0l.
3172 * sysdeps/pthread/pthread_cond_timedwait.c
3173 (__pthread_cond_timedwait): Likewise.
3174 * sysdeps/pthread/pthread_cond_broadcast.c
3175 (__pthread_cond_broadcast): Don't use requeue for pshared
3178 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3179 (__pthread_cond_wait): Don't store mutex address if the current
3181 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3182 (__pthread_cond_timedwait): Likewise.
3183 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3184 (__pthread_cond_broadcast): Don't use requeue for pshared
3187 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3188 element with ~0l for pshared condvars, with NULL otherwise.
3190 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3191 (__pthread_cond_wait): Don't store mutex address if the current
3193 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3194 (__pthread_cond_timedwait): Likewise.
3195 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3196 (__pthread_cond_broadcast): Don't use requeue for pshared
3199 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3200 * tst-cond12.c: New file.
3201 * tst-cond13.c: New file.
3203 2003-11-17 Ulrich Drepper <drepper@redhat.com>
3205 * sysdeps/pthread/configure.in: Make missing forced unwind support
3208 2003-11-11 Ulrich Drepper <drepper@redhat.com>
3210 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3212 2003-11-06 Ulrich Drepper <drepper@redhat.com>
3214 * Makefile: Add magic to clean up correctly.
3216 2003-11-05 Jakub Jelinek <jakub@redhat.com>
3218 * unwind.c (FRAME_LEFT): Define.
3219 (unwind_stop): Handle old style cleanups here.
3220 (__pthread_unwind): Handle old style cleanups only if
3221 !HAVE_FORCED_UNWIND.
3222 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3223 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3224 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3225 ($(objpfx)tst-cleanupx4): Likewise.
3226 * tst-cleanup4.c: New test.
3227 * tst-cleanup4aux.c: New.
3228 * tst-cleanupx4.c: New test.
3230 2003-11-04 Ulrich Drepper <drepper@redhat.com>
3232 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3233 lll_mutex_*lock macros to skip atomic operations on some archs.
3235 2003-11-03 Ulrich Drepper <drepper@redhat.com>
3237 * sysdeps/pthread/tst-timer.c (main): Initialize
3238 sigev2.sigev_value as well.
3240 2003-10-15 Roland McGrath <roland@redhat.com>
3242 * sysdeps/pthread/configure.in: Barf if visibility attribute support
3244 * sysdeps/pthread/configure: Regenerated.
3246 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3248 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3249 locking macros. No distinction between normal and mutex locking
3251 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3252 Merge bits from lowlevelmutex.S we still need.
3253 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3254 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3255 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3256 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3257 new mutex implementation.
3258 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3259 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3260 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3261 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3262 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3263 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3264 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3265 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3266 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3267 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3268 symbol for entry point to avoid cancellation.
3270 2003-10-07 Jakub Jelinek <jakub@redhat.com>
3272 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3274 (SAVE_OLDTYPE_0): Fix a typo.
3276 2003-10-03 Ulrich Drepper <drepper@redhat.com>
3278 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3279 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
3281 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3283 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3286 2003-10-02 Jakub Jelinek <jakub@redhat.com>
3288 * Makefile (tests): Add tst-cancel19.
3289 * tst-cancel19.c: New test.
3291 2003-10-02 Ulrich Drepper <drepper@redhat.com>
3293 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3294 restoring of the old cancellation type.
3296 2003-09-30 Jakub Jelinek <jakub@redhat.com>
3298 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3300 2003-09-27 Wolfram Gloger <wg@malloc.de>
3302 * sysdeps/pthread/malloc-machine.h: New file
3304 2003-09-24 Roland McGrath <roland@redhat.com>
3306 * allocatestack.c (__make_stacks_executable): Don't ignore return
3307 value from _dl_make_stack_executable.
3309 2003-09-24 Ulrich Drepper <drepper@redhat.com>
3311 * allocatestack.c (__make_stacks_executable): Also change
3312 permission of the currently unused stacks.
3314 * allocatestack.c (change_stack_perm): Split out from
3315 __make_stacks_executable.
3316 (allocate_stack): If the required permission changed between the time
3317 we started preparing the stack and queueing it, change the permission.
3318 (__make_stacks_executable): Call change_stack_perm.
3320 * Makefile: Build tst-execstack-mod locally.
3321 * tst-execstack-mod.c: New file.
3323 2003-09-23 Jakub Jelinek <jakub@redhat.com>
3325 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3327 2003-09-23 Roland McGrath <roland@redhat.com>
3329 * tst-execstack.c: New file.
3330 * Makefile (tests): Add it.
3331 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3332 (LDFLAGS-tst-execstack): New variable.
3334 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3335 whether to use PROT_EXEC for stack mmap.
3336 (__make_stacks_executable): New function.
3337 * pthreadP.h: Declare it.
3338 * init.c (__pthread_initialize_minimal_internal): Set
3339 GL(dl_make_stack_executable_hook) to that.
3341 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3343 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3344 recommendation from AMD re avoidance of lock prefix.
3346 2003-09-22 Jakub Jelinek <jakub@redhat.com>
3348 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
3349 lll_futex_timed_wait instead of lll_futex_wait.
3350 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
3351 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
3352 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
3353 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
3354 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
3355 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
3356 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
3357 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
3358 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
3359 Completely revamp the locking macros. No distinction between
3360 normal and mutex locking anymore.
3361 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3362 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
3363 __lll_lock_timedwait): Fix prototypes.
3364 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
3365 __lll_lock_timedwait): Likewise.
3366 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
3367 macros, add __builtin_expect.
3368 (lll_mutex_timedlock): Likewise. Fix return value.
3369 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
3370 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
3371 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
3372 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
3373 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
3374 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
3375 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
3376 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
3378 2003-09-22 Ulrich Drepper <drepper@redhat.com>
3380 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3381 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
3382 operation if possible.
3384 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
3385 like jumping over the lock prefix.
3387 2003-09-21 Ulrich Drepper <drepper@redhat.com>
3389 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
3390 locking macros. No distinction between normal and mutex locking
3392 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3393 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3394 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3395 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
3396 locking. Merge bits from lowlevelmutex.S we still need.
3397 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3398 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3399 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3400 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
3401 * Makefile (routines): Remove libc-lowlevelmutex.
3402 (libpthread-rountines): Remove lowlevelmutex.
3403 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
3404 for new mutex implementation.
3405 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3406 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3407 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3408 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3409 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3411 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3413 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3414 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3415 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
3416 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3417 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3418 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3419 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3420 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3422 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3424 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3425 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3426 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3428 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3429 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
3431 2003-09-20 Ulrich Drepper <drepper@redhat.com>
3433 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
3434 in parameters of asm with output parameters.
3436 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
3437 type of DECR parameter to int.
3438 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
3440 2003-09-18 Jakub Jelinek <jakub@redhat.com>
3442 * tst-attr3.c (tf, do_test): Print stack start/end/size and
3443 guardsize for each thread.
3445 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3447 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
3448 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3449 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
3451 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3452 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
3454 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
3455 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
3456 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3457 (pthread_getaffinity_np): Add hidden_def.
3459 * Makefile (tests): Add tst-attr3.
3460 * tst-attr3.c: New test.
3462 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
3464 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3466 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
3467 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
3469 2003-09-17 Jakub Jelinek <jakub@redhat.com>
3471 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
3472 * tst-align.c: Include tst-stack-align.h.
3473 (tf, do_test): Use TEST_STACK_ALIGN macro.
3475 2003-09-17 Ulrich Drepper <drepper@redhat.com>
3477 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
3480 2003-09-16 Ulrich Drepper <drepper@redhat.com>
3482 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
3483 stack-related values for the initial thread.
3485 2003-09-15 Jakub Jelinek <jakub@redhat.com>
3487 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
3489 2003-09-11 Ulrich Drepper <drepper@redhat.com>
3491 * pthread_mutex_lock.c: Minor code rearrangements.
3493 2003-09-05 Roland McGrath <roland@redhat.com>
3495 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
3496 Instead, include ../nptl_db/db_info.c to do its magic.
3497 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
3498 (__pthread_pthread_key_2ndlevel_size): Likewise.
3499 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
3500 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
3501 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
3502 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
3503 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
3504 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
3505 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
3506 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
3507 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
3508 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
3509 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
3510 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
3511 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
3512 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
3513 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
3514 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
3515 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
3517 2003-09-08 Ulrich Drepper <drepper@redhat.com>
3519 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
3520 of pthread_t to be compatible with LT.
3521 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3522 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3523 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3524 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3525 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3526 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3527 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3529 2003-09-04 Ulrich Drepper <drepper@redhat.com>
3531 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
3533 2003-09-04 Jakub Jelinek <jakub@redhat.com>
3535 * unwind-forcedunwind.c: Move to...
3536 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
3537 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
3538 * sysdeps/pthread/jmpbuf-unwind.h: New file.
3539 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
3540 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
3541 * unwind.c: Include jmpbuf-unwind.h.
3542 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
3544 2003-09-02 Jakub Jelinek <jakub@redhat.com>
3546 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
3547 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
3548 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
3549 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
3550 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3551 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
3552 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
3553 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
3554 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
3555 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
3556 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
3558 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
3559 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
3560 * Makefile (tests): Add tst-stack2.
3561 * tst-stack2.c: New test.
3562 * tst-stack1.c: Include limits.h and sys/param.h.
3563 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
3565 * pthread_condattr_setpshared.c: Include errno.h.
3566 (pthread_condattr_setpshared): Return EINVAL if pshared
3567 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
3569 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
3570 defined symbol for entry point to avoid cancellation.
3571 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3573 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3575 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3577 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
3579 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3581 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
3582 __close_nocancel, __read_nocancel, __write_nocancel,
3583 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
3584 libpthread.so or librt.so, define to corresponding function
3585 without _nocancel suffix.
3586 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
3587 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
3588 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
3590 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
3592 2003-09-02 Ulrich Drepper <drepper@redhat.com>
3594 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
3595 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
3597 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
3598 in subsections has a symbol associated with it.
3600 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
3601 defined symbol for entry point to avoid cancellation.
3602 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
3604 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3606 * Makefile (tests): Add tst-tls5.
3607 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
3608 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
3609 ($(objpfx)tst-tls5): New.
3610 ($(objpfx)tst-tls6.out): Likewise.
3611 (tests): Depend on $(objpfx)tst-tls6.out.
3612 * tst-tls3.c: Include stdint.h and pthreaddef.h.
3613 (do_test): Check pthread_self () return value alignment.
3614 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
3615 (tf): Check pthread_self () return value alignment.
3616 * tst-tls5.c: New test.
3618 * tst-tls5mod.c: New.
3619 * tst-tls5moda.c: New.
3620 * tst-tls5modb.c: New.
3621 * tst-tls5modc.c: New.
3622 * tst-tls5modd.c: New.
3623 * tst-tls5mode.c: New.
3624 * tst-tls5modf.c: New.
3625 * tst-tls6.sh: New test.
3627 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
3628 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
3629 * init.c (pthread_functions): Initialize them.
3630 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
3631 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
3632 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
3633 pthread_cond_timedwait@@GLIBC_2.3.2.
3635 2003-09-01 Jakub Jelinek <jakub@redhat.com>
3637 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
3638 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
3639 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
3640 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
3641 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
3642 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
3644 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
3646 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
3647 _POSIX_THREAD_PRIORITY_SCHEDULING.
3648 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3650 2003-08-31 Ulrich Drepper <drepper@redhat.com>
3652 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
3653 nested function, use static inline function from libio.h.
3654 Code by Richard Henderson.
3656 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
3659 2003-08-30 Jakub Jelinek <jakub@redhat.com>
3661 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
3662 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
3663 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
3664 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
3665 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
3666 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
3667 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
3668 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
3669 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
3670 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
3671 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
3672 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
3673 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
3674 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
3675 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
3676 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
3677 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
3678 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
3679 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
3680 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
3681 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
3682 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
3683 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
3684 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
3685 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
3686 * sysdeps/sparc/tls.h: New file.
3687 * sysdeps/sparc/tcb-offsets.sym: New file.
3688 * sysdeps/sparc/Makefile: New file.
3689 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
3690 * init.c [__sparc__] (__NR_set_tid_address): Define.
3692 2003-08-29 Jakub Jelinek <jakub@redhat.com>
3694 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
3695 _IO_release_lock): Define.
3697 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
3699 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
3700 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
3702 2003-08-27 Ulrich Drepper <drepper@redhat.com>
3704 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
3705 (__pthread_cleanup_class): Add missing return types of member
3708 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
3710 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3711 (lll_mutex_unlock_force): Add memory barrier between store and futex
3714 2003-08-25 Ulrich Drepper <drepper@redhat.com>
3716 * tst-cancel4.c (do_test): Also unlink tempfname and remove
3717 tempmsg in first loop.
3719 2003-08-18 Ulrich Drepper <drepper@redhat.com>
3721 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3722 _POSIX_THREAD_PRIORITY_SCHEDULING.
3723 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3725 2003-08-07 Jakub Jelinek <jakub@redhat.com>
3727 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
3728 (__rtld_lock_default_lock_recursive,
3729 __rtld_lock_default_unlock_recursive): Define.
3730 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
3731 __rtld_lock_unlock_recursive): Define using
3732 GL(_dl_rtld_*lock_recursive).
3733 * init.c (__pthread_initialize_minimal_internal): Initialize
3734 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
3735 Lock GL(_dl_load_lock) the same number of times as
3736 GL(_dl_load_lock) using non-mt implementation was nested.
3738 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
3739 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
3741 2003-08-06 Jakub Jelinek <jakub@redhat.com>
3743 * tst-cancel17.c (do_test): Make len2 maximum of page size and
3746 2003-08-07 Jakub Jelinek <jakub@redhat.com>
3748 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
3750 2003-08-03 Jakub Jelinek <jakub@redhat.com>
3752 * sysdeps/pthread/createthread.c (do_clone): Move error handling
3753 to first syscall error check. Move syscall error check for tkill
3754 into __ASSUME_CLONE_STOPPED #ifdef.
3756 2003-08-02 Ulrich Drepper <drepper@redhat.com>
3758 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
3759 is not defined, do explicit synchronization.
3760 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
3761 is not defined also unlock pd->lock for non-debugging case in case
3763 * pthread_create.c (start_thread): Always get and release pd->lock
3764 if __ASSUME_CLONE_STOPPED is not defined.
3765 (start_thread_debug): Removed. Adjust users.
3766 * allocatestack.c (allocate_stack): Always initialize lock if
3767 __ASSUME_CLONE_STOPPED is not defined.
3768 * Makefile (tests): Add tst-sched1.
3769 * tst-sched1.c: New file.
3771 * sysdeps/pthread/createthread.c (do_clone): Only use
3772 sched_setschduler and pass correct parameters.
3774 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3776 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
3777 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
3778 PTHREAD_STACK_MIN in comments.
3780 2003-07-31 Jakub Jelinek <jakub@redhat.com>
3782 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3783 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
3785 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
3786 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
3787 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
3788 (__pthread_cleanup_upto): Fix prototype.
3789 (_longjmp_unwind): Adjust caller.
3790 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
3791 Change second argument to const struct pointer.
3792 * tst-sem8.c (main): Remove unused s2 and s3 variables.
3793 * tst-sem9.c (main): Likewise.
3794 * unwind.c: Include string.h for strlen prototype.
3796 2003-07-31 Ulrich Drepper <drepper@redhat.com>
3798 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3799 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
3800 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
3802 Patch by Nicholas Miell <nmiell@attbi.com>.
3804 2003-07-30 Jakub Jelinek <jakub@redhat.com>
3806 * init.c (__pthread_initialize_minimal_internal): Initialize
3807 GL(dl_init_static_tls).
3808 * pthreadP.h (__pthread_init_static_tls): New prototype.
3809 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
3811 * Makefile (tests): Add tst-tls4.
3812 (modules-names): Add tst-tls4moda and tst-tls4modb.
3813 ($(objpfx)tst-tls4): Link against libdl and libpthread.
3814 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
3816 * tst-tls4.c: New file.
3817 * tst-tls4moda.c: New file.
3818 * tst-tls4modb.c: New file.
3820 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
3822 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
3823 before __timer_dealloc.
3824 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
3825 Don't call list_unlink.
3827 2003-07-29 Roland McGrath <roland@redhat.com>
3829 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
3831 2003-07-25 Jakub Jelinek <jakub@redhat.com>
3833 * tst-cancel17.c (do_test): Check if aio_cancel failed.
3834 Don't reuse struct aiocb A if it failed.
3835 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
3836 not just one byte, as that does not block.
3838 2003-07-22 Jakub Jelinek <jakub@redhat.com>
3840 * sysdeps/pthread/unwind-resume.c: New file.
3841 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
3842 unwind-resume in csu subdir.
3843 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
3845 (librt-sysdep_routines, librt-shared-only-routines): Add
3847 * sysdeps/pthread/rt-unwind-resume.c: New file.
3848 * unwind-forcedunwind.c: New file.
3849 * Makefile (libpthread-routines): Add unwind-forcedunwind.
3850 (libpthread-shared-only-routines): Likewise.
3851 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
3852 * pthreadP.h (pthread_cancel_init): New prototype.
3853 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
3855 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
3856 attr argument const struct pthread_attr *.
3858 * res.c (__res_state): Return __resp.
3859 * descr.h: Include resolv.h.
3860 (struct pthread): Add res field.
3861 * pthread_create.c: Include resolv.h.
3862 (start_thread): Initialize __resp.
3863 * Makefile (tests): Add tst-_res1.
3864 (module-names): Add tst-_res1mod1, tst-_res1mod2.
3865 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
3866 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
3868 * tst-_res1.c: New file.
3869 * tst-_res1mod1.c: New file.
3870 * tst-_res1mod2.c: New file.
3872 2003-07-21 Ulrich Drepper <drepper@redhat.com>
3874 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
3876 * Makefile: Define various *-no-z-defs variables for test DSOs
3877 which has undefined symbols.
3879 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
3881 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3882 Retry if the stwcx fails to store once_control.
3884 2003-07-20 Ulrich Drepper <drepper@redhat.com>
3886 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
3887 pthread_attr_setaffinity.
3888 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
3889 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
3890 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
3891 * pthread_attr_destroy.c: Free cpuset element if allocated.
3892 * pthread_create.c: Pass iattr as additional parameter to
3894 * sysdeps/pthread/createthread.c: If attribute is provided and
3895 a new thread is created with affinity set or scheduling parameters,
3896 start thread with CLONE_STOPPED.
3897 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
3898 pthread_attr_setaffinity.
3899 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
3902 2003-07-15 Ulrich Drepper <drepper@redhat.com>
3904 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
3906 2003-07-14 Ulrich Drepper <drepper@redhat.com>
3908 * sysdeps/pthread/configure.in: Require CFI directives also for
3911 2003-07-15 Jakub Jelinek <jakub@redhat.com>
3913 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
3916 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3918 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
3920 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
3921 registers as variables. Call __pthread_mutex_unlock_usercnt.
3922 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3923 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
3924 not self pointer in __writer. Compare with TID to determine
3926 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3927 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3929 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3931 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
3932 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
3933 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
3934 macros also when compiling librt.
3936 2003-07-11 Jakub Jelinek <jakub@redhat.com>
3938 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
3939 -fasynchronous-unwind-tables.
3940 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3941 (PSEUDO): Add cfi directives.
3942 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
3944 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
3947 2003-07-08 Jakub Jelinek <jakub@redhat.com>
3949 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
3950 __pthread_unregister_cancel): Add prototypes and hidden_proto.
3951 * unwind.c (__pthread_unwind_next): Add hidden_def.
3952 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
3954 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3955 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3956 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3958 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
3959 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3961 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
3962 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
3963 __pthread_unregister_cancel and __pthread_unwind_next.
3965 2003-07-04 Jakub Jelinek <jakub@redhat.com>
3967 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
3968 different symbol for the cancellation syscall wrapper and
3969 non-cancellation syscall wrapper.
3970 (PSEUDO_END): Define.
3972 2003-07-05 Richard Henderson <rth@redhat.com>
3974 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
3975 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
3976 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
3977 return actual return value from the syscall, not 0.
3979 2003-07-07 Ulrich Drepper <drepper@redhat.com>
3981 * descr.h (struct pthread): Add pid field.
3982 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
3983 (__reclaim_stacks): Likewise.
3984 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
3985 also check for PID of the signal source.
3986 (__pthread_initialize_minimal_internal): Also initialize pid field
3987 of initial thread's descriptor.
3988 * pthread_cancel.c: Use tgkill instead of tkill if possible.
3989 * sysdeps/unix/sysv/linux/fork.c: Likewise.
3990 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
3991 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3992 * sysdeps/unix/sysv/linux/raise.c: Likewise.
3994 2003-07-05 Ulrich Drepper <drepper@redhat.com>
3996 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
3997 Fix use of parameter.
3998 (__libc_cleanup_pop): Likewise.
4000 2003-07-04 Ulrich Drepper <drepper@redhat.com>
4002 * init.c (sigcancel_handler): Change parameters to match handler
4003 for SA_SIGACTION. Check signal number and code to recognize
4004 invalid invocations.
4006 2003-07-03 Roland McGrath <roland@redhat.com>
4008 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
4009 Apply sizeof (struct pthread) bias to r13 value.
4011 2003-07-03 Ulrich Drepper <drepper@redhat.com>
4013 * sysdeps/pthread/configure.in: Require CFI directives.
4015 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
4017 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
4018 libpthread compilation.
4019 * unwind.c (__pthread_unwind): Add hidden_def.
4020 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
4022 2003-07-01 Ulrich Drepper <drepper@redhat.com>
4024 * libc-cancellation.c (__libc_cleanup_routine): Define.
4025 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
4026 (__pthread_cleanup_pop): Define.
4028 2003-07-01 Richard Henderson <rth@redhat.com>
4030 * sysdeps/alpha/elf/pt-initfini.c: New file.
4031 * sysdeps/alpha/pthread_spin_lock.S: New file.
4032 * sysdeps/alpha/pthread_spin_trylock.S: New file.
4033 * sysdeps/alpha/pthreaddef.h: New file.
4034 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
4035 * sysdeps/alpha/tls.h: New file.
4036 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
4037 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
4038 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
4039 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
4040 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
4041 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
4042 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
4043 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
4044 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
4045 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
4047 2003-07-01 Ulrich Drepper <drepper@redhat.com>
4049 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
4050 cleanup support and unwind info.
4052 2003-06-30 Ulrich Drepper <drepper@redhat.com>
4054 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4055 Use correct cleanup handler registration. Add unwind info.
4056 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
4057 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
4058 * tst-once3.c: Add cleanup handler and check it is called.
4059 * tst-once4.c: Likewise.
4060 * tst-oncex3.c: New file.
4061 * tst-oncex4.c: New file.
4062 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
4064 2003-06-29 Ulrich Drepper <drepper@redhat.com>
4066 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
4068 2003-06-27 Ulrich Drepper <drepper@redhat.com>
4070 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
4071 (tf_msgsnd): Likewise.
4073 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
4074 premature returns a bit more.
4076 2003-06-26 Ulrich Drepper <drepper@redhat.com>
4078 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
4079 definition to the front.
4081 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
4082 the cleanup functions to make the names unique. Fix dwarf opcode
4084 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
4085 functions to make the names unique. Fix CFA offset for two blocks.
4087 2003-06-25 Ulrich Drepper <drepper@redhat.com>
4089 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
4090 missing closing braces.
4091 Patch by Christophe Saout <christophe@saout.de>.
4093 2003-06-24 Roland McGrath <roland@redhat.com>
4095 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
4097 2003-06-24 Ulrich Drepper <drepper@redhat.com>
4099 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
4100 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
4102 * pthreadP.h: Declare __find_thread_by_id.
4103 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
4104 * pthread_clock_gettime.c: Allow using other thread's clock.
4105 * pthread_clock_settime.c: Likewise.
4106 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4107 * Makefile: Add rules to build and run tst-clock2.
4108 * tst-clock2.c: New file.
4110 2003-06-23 Ulrich Drepper <drepper@redhat.com>
4112 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
4113 to use exception-based cleanup handler.
4114 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4116 * tst-cond8.c (ch): Announce that we are done.
4118 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
4120 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
4121 Also test aio_suspend with timeout value.
4123 2003-06-22 Ulrich Drepper <drepper@redhat.com>
4125 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
4126 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
4129 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
4130 (__pthread_mutex_lock_internal): Likewise.
4131 (__pthread_mutex_unlock_internal): Likewise.
4132 (__pthread_mutex_unlock_usercnt): Declare.
4133 * pthread_mutex_destroy.c: Always fail if used in any way.
4134 * pthread_mutex_init.c: Update comment.
4135 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
4136 * pthread_mutex_timedlock.c: Adjust __nusers.
4137 * pthread_mutex_trylock.c: Adjust __nusers.
4138 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
4139 and public interfaces are wrapper with pass additional parameter.
4140 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
4142 * tst-mutex8.c: New file.
4143 * Makefile (tests): Add tst-mutex8.
4144 * sysdeps/pthread/pthread_cond_timedwait.c: Call
4145 __pthread_mutex_unlock_usercnt.
4146 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4147 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4149 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4150 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4151 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
4152 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4154 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4155 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4156 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4157 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4158 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4160 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
4161 * pthread_mutex_timedlock.c: Likewise.
4162 * pthread_mutex_trylock.c: Adjust __nusers.
4163 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
4164 * tst-mutex9.c: New file.
4165 * Makefile (tests): Add tst-mutex9.
4166 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
4167 * sysdeps/ia64/tls.h: Likewise.
4168 * sysdeps/powerpc/tls.h: Likewise.
4169 * sysdeps/s390/tls.h: Likewise.
4170 * sysdeps/sh/tls.h: Likewise.
4171 * sysdeps/x86_64/tls.h: Likewise.
4172 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4173 Change type of __owner.
4174 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4175 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4176 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4177 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4178 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4180 2003-06-19 Jakub Jelinek <jakub@redhat.com>
4182 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
4183 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
4185 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
4186 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
4187 instead of nr to lll_futex_wake. Only set errno and return -1
4190 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
4191 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
4192 return actual return value from the syscall, not 0.
4194 2003-06-18 Ulrich Drepper <drepper@redhat.com>
4196 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
4197 find a random value.
4198 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
4201 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
4202 compat_timer_settime.
4203 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
4204 compat_timer_gettime.
4205 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
4206 compat_timer_getoverrun.
4207 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
4208 compat_timer_delete.
4210 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
4211 error-checking mutex detect busy mutexes.
4213 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4215 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
4216 Add ax to clobber list.
4217 (lll_mutex_cond_lock): Likewise.
4218 (lll_mutex_unlock): Likewise.
4219 (lll_lock): Likewise.
4220 (lll_unlock): Likewise.
4222 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
4223 * tst-cancel18.c: New file.
4224 * tst-cancelx18.c: New file.
4226 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
4229 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
4230 * tst-cancel17.c: New file.
4231 * tst-cancelx17.c: New file.
4233 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4234 * sysdeps/unix/sysv/linux/sigwait.c: New file.
4235 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4237 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
4239 2003-06-16 Jakub Jelinek <jakub@redhat.com>
4241 * sysdeps/pthread/createthread.c (create_thread): Set
4242 header.multiple_threads unconditionally.
4243 * allocatestack.c (allocate_stack): Likewise.
4244 * descr.h (struct pthread): Add header.multiple_threads
4246 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
4247 Define for librt. #error if neither libpthread, libc nor librt.
4248 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
4250 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
4251 CDISABLE): Likewise.
4252 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
4253 CDISABLE): Likewise.
4254 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
4255 CDISABLE): Likewise.
4256 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
4257 CDISABLE): Likewise. Access header.multiple_threads outside of
4258 libc and libpthread.
4259 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
4261 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
4262 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
4264 2003-06-17 Ulrich Drepper <drepper@redhat.com>
4266 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
4267 Also test early cancellation before the thread reaches the cancellation
4270 * Makefile: Compile forward.c with exceptions.
4272 * sysdeps/unix/sysv/linux/sleep.c: New file.
4274 2003-06-16 Ulrich Drepper <drepper@redhat.com>
4276 * Makefile: Add CFLAGS definition to compile function wrappers
4277 duplicated from libc with exceptions.
4278 * tst-cancel4.c: Also check cancellation handlers.
4280 * Makefile: Add rules to build and run tst-cancel16 and
4281 tst-cancelx16. Add missing CFLAGS definitions.
4282 * tst-cancel16.c: New file.
4283 * tst-cancelx16.c: New file.
4285 2003-06-15 Ulrich Drepper <drepper@redhat.com>
4287 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4288 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
4289 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4290 (DL_SYSINFO_IMPLEMENTATION): Likewise.
4292 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
4293 (LIBC_CANCEL_RESET): Likewise.
4294 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
4295 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
4297 (CFLAGS-libcrt-cancellation.c): Define.
4298 * sysdeps/pthread/librt-cancellation.c: New file.
4299 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
4300 macros also when compiling librt.
4301 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4302 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4303 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4304 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4305 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4306 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4307 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4309 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
4310 compat_timer_create.
4312 2003-06-14 Ulrich Drepper <drepper@redhat.com>
4314 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
4316 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4318 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
4319 Add libc_hidden_def.
4321 2003-06-13 Roland McGrath <roland@redhat.com>
4323 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
4324 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
4326 2003-06-11 Ulrich Drepper <drepper@redhat.com>
4328 * allocatestack.c (queue_stack): Always inline.
4329 * ptreadhP.h (__do_cancel): Likewise.
4331 2003-06-10 Jakub Jelinek <jakub@redhat.com>
4333 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
4336 2003-06-10 Ulrich Drepper <drepper@redhat.com>
4338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4339 (__pthread_cond_signal): Remove incorrect second addition for
4342 2003-06-09 Ulrich Drepper <drepper@redhat.com>
4344 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4345 (__pthread_cond_signal): Use correct futex pointer in
4346 __lll_mutex_lock_wait call.
4348 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4349 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
4351 2003-06-08 Ulrich Drepper <drepper@redhat.com>
4353 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
4355 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4358 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4359 hand-written CFI generation code. Since ENTRY/END also initiated
4360 CFI frames this caused two CFI sets to be generated.
4362 2003-06-07 Ulrich Drepper <drepper@redhat.com>
4364 * cleanup_routine.c: New file.
4365 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
4366 * sysdeps/pthread/pthread.h: Add support for fully exception-based
4368 * Makefile (libpthread-routines): Add cleanup_routine.
4369 Add more CFLAGS variables to compile with exceptions. Add comments
4370 why which file needs unwind tables.
4371 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
4373 * tst-cancelx1.c: New file.
4374 * tst-cancelx2.c: New file.
4375 * tst-cancelx3.c: New file.
4376 * tst-cancelx4.c: New file.
4377 * tst-cancelx5.c: New file.
4378 * tst-cancelx6.c: New file.
4379 * tst-cancelx7.c: New file.
4380 * tst-cancelx8.c: New file.
4381 * tst-cancelx9.c: New file.
4382 * tst-cancelx10.c: New file.
4383 * tst-cancelx11.c: New file.
4384 * tst-cancelx12.c: New file.
4385 * tst-cancelx13.c: New file.
4386 * tst-cancelx14.c: New file.
4387 * tst-cancelx15.c: New file.
4388 * tst-cleanupx0.c: New file.
4389 * tst-cleanupx0.expect: New file.
4390 * tst-cleanupx1.c: New file.
4391 * tst-cleanupx2.c: New file.
4392 * tst-cleanupx3.c: New file.
4394 * tst-cleanup0.c: Make standard compliant.
4395 * tst-cleanup1.c: Likewise.
4397 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
4398 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4399 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4400 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4401 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4402 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4403 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
4405 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4406 * tst-cancel12.c: New file.
4407 * tst-cancel13.c: New file.
4408 * tst-cancel14.c: New file.
4409 * tst-cancel15.c: New file.
4410 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
4413 * tst-cancel1.c: Add some comments.
4415 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
4418 2003-06-06 Ulrich Drepper <drepper@redhat.com>
4420 * Makefile (CFLAGS-pthread_cancel.c): Define.
4422 2003-06-05 Ulrich Drepper <drepper@redhat.com>
4424 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
4425 Change type of __writer element to int.
4426 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4427 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4428 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4429 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4430 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4431 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
4432 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4433 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
4434 Compare with TID to determine deadlocks.
4435 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4436 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4437 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
4438 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4439 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4440 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4442 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4444 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4445 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4446 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4448 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4450 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4451 * Makefile (tests): Add tst-rwlock12.
4452 * tst-rwlock12.c: New file.
4454 2003-06-05 Jakub Jelinek <jakub@redhat.com>
4456 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
4457 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
4458 Remove bogus hidden_proto.
4459 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4461 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
4462 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
4463 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
4464 ___lll_mutex_timedlock): Likewise.
4466 2003-06-04 Ulrich Drepper <drepper@redhat.com>
4468 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4469 (__pthread_cond_signal): Add some code to eventually handle
4472 2003-06-01 Ulrich Drepper <drepper@redhat.com>
4474 * Makefile (tests): Add tst-exec4.
4475 (tst-exec4-ARGS): Define.
4476 * tst-exec4.c: New file.
4478 2003-05-31 Ulrich Drepper <drepper@redhat.com>
4480 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
4481 Also fail if tv_nsec < 0.
4482 (__lll_timedwait_tid): Likewise.
4483 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
4484 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
4486 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
4488 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
4490 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
4492 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
4494 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
4497 * Makefile (tests): Add tst-sem8 and tst-sem9.
4498 * tst-sem8.c: New file.
4499 * tst-sem9.c: New file.
4500 * sem_open.c: Fix creation of in_use record if the file exists but
4503 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
4506 * sysdeps/pthread/timer_create.c (timer_create): In case
4507 evp==NULL, assign timer ID to sival_ptr.
4509 * descr.h (struct pthread_unwind_buf): Change type of prev element to
4510 struct pthread_unwind_buf *.
4511 (struct pthread): Likewise for cleanup_jmp_buf element.
4513 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
4514 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
4515 * unwind.c (__pthread_unwind_next): Likewise.
4517 2003-05-30 Ulrich Drepper <drepper@redhat.com>
4519 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4520 (lll_futex_timed_wait): Use int for futex value parameter.
4521 (lll_futex_wake): Likewise.
4522 (lll_futex_requeue): Likewise.
4524 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
4525 Replace one memory operation with one register operation.
4527 * tst-join4.c (do_test): Fix error message.
4529 * tst-rwlock6.c (do_test): Use correct format specifier.
4531 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4532 (__lll_mutex_lock_wait): Replace one memory operation with one
4534 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
4535 (__lll_mutex_lock_wait): Likewise.
4537 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4538 (__lll_mutex_cond_lock): Add one to value parameter of
4539 __lll_lock_wait to reflect reality in the futex syscall.
4540 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4541 (lll_mutex_cond_lock): Likewise.
4543 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4545 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
4547 (lll_mutex_cond_lock): Define.
4549 2003-05-29 Ulrich Drepper <drepper@redhat.com>
4551 * Makefile (tests): Add tst-signal6.
4552 * tst-signal6.c: New file.
4554 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
4555 (__lll_mutex_unlock_force): New function
4556 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4558 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
4559 (__lll_mutex_unlock_force): New function.
4560 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
4562 * tst-rwlock7.c (do_test): Use correct format specifier.
4564 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
4565 Find break parameter in correct asm argument.
4567 2003-05-27 Jakub Jelinek <jakub@redhat.com>
4569 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
4571 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
4573 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4575 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
4576 lll_futex_requeue, lll_mutex_unlock_force): Define.
4578 2003-05-30 Jakub Jelinek <jakub@redhat.com>
4580 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4581 (pthread_cond_t): Add __mutex.
4582 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
4583 lll_futex_requeue, lll_mutex_unlock_force): Define.
4585 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4587 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
4588 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4590 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
4592 (lll_futex_wait, lll_futex_wake): Define.
4593 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
4594 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
4595 FUTEX_REQUEUE instead of FUTEX_WAIT.
4596 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4597 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
4598 mutex which was used in condvar structure. Call
4599 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
4600 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4602 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
4603 include tcb-offsets.h. Read wakeup value in locked region.
4604 Use the value of gbr register as THREAD_ID.
4605 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4606 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4607 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4609 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
4612 2003-05-28 Ulrich Drepper <drepper@redhat.com>
4614 * sysdeps/pthread/pthread_cond_broadcast.c
4615 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
4617 2003-05-26 Ulrich Drepper <drepper@redhat.com>
4619 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
4620 typo in register name.
4621 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
4622 correctly. Actually use requeue. Little optimization.
4623 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
4624 mutex address early. Handle cancellation state as 32-bit value.
4625 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4626 Remove unnecessary label.
4628 2003-05-25 Ulrich Drepper <drepper@redhat.com>
4630 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
4631 instead of FUTEX_WAIT.
4632 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
4633 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4634 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4635 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4636 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4637 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
4638 used in condvar structure. Call __pthread_mutex_cond_lock instead
4639 of __pthread_mutex_lock_internal.
4640 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4641 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4642 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4643 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
4644 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4645 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4646 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
4647 Add pthread_mutex_cond_lock.
4648 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
4649 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
4650 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
4651 lll_mutex_cond_lock.
4652 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4653 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4654 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4656 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4657 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4659 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
4660 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4662 * pthreadP.h: Declare __pthread_mutex_cond_lock.
4663 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
4664 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
4665 macro don't define aliases.
4667 * cancellation.c: Remove __pthread_enable_asynccancel_2.
4668 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
4669 * sysdeps/pthread/pthread_cond_timedwait.c: Use
4670 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
4671 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4672 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4673 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4674 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4675 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4677 2003-05-17 Ulrich Drepper <drepper@redhat.com>
4679 * sem_open.c: Fix one endless loop. Implement correct semantics
4680 wrt opening the same semaphore more then once.
4681 * sem_close.c: Adjust for sem_open change.
4682 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
4683 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
4684 * Makefile (tests): Add tst-sem7.
4685 * tst-sem7.c: New file.
4687 2003-05-16 Roland McGrath <roland@redhat.com>
4689 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
4690 uninitialized variable braino.
4692 2003-05-16 Ulrich Drepper <drepper@redhat.com>
4694 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
4695 test for syscall availability.
4697 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
4698 __no_posix_timers to -1 if the syscalls don't exist.
4700 * pthread_join.c (pthread_join): Set tid field of the joined
4701 thread to -1. This isn't necessary but helps to recognize some
4702 error conditions with almost no cost.
4704 * allocatestack.c (FREE_P): Also negative values indicate an
4707 * unwind.c: Include <unistd.h>.
4709 2003-05-14 Ulrich Drepper <drepper@redhat.com>
4711 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
4713 2003-05-14 Jakub Jelinek <jakub@redhat.com>
4715 * Makefile (crti-objs, crtn-objs): New variables.
4716 (omit-deps, extra-objs): Add crtn.
4717 ($(objpfx)libpthread.so): Depend on both crti and crtn
4718 and links to them in multidir.
4719 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
4721 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
4723 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4724 (lll_mutex_unlock): Use atomic_exchange_rel.
4726 2003-05-11 Ulrich Drepper <drepper@redhat.com>
4728 * cond-perf.c (cons): Add missing locking around setting of alldone.
4730 2003-05-10 Ulrich Drepper <drepper@redhat.com>
4732 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
4734 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4736 2003-05-09 Ulrich Drepper <drepper@redhat.com>
4738 * tst-sem6.c: New file.
4739 * Makefile (tests): Add tst-sem6.
4741 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
4742 Use atomic_exchange_rel instead of atomic_exchange.
4743 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
4746 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
4747 code for lll_futex_wait and lll_futex_wake in static apps. Use
4748 vsyscall is possible.
4750 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
4751 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
4752 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
4753 pthread_setaffinity_np.
4754 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
4755 and pthread_setaffinity_np.
4756 * Makefile (libpthread-routines): Add pthread_getaffinity and
4757 pthread_setaffinity.
4759 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
4760 use it in case mmap to allocate the stack fails.
4761 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
4762 ARCH_MAP_FLAGS here.
4763 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
4766 2003-05-08 Ulrich Drepper <drepper@redhat.com>
4768 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
4769 handler implementation. It is now lockless in fork().
4770 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4771 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4772 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
4773 declare the __fork_*_lists.
4774 (struct fork_handler): Include pointers to all three functions.
4775 Add next, refcntr and need_signal elements.
4776 (__fork_handlers): New declaration.
4777 (__register_atfork_malloc): Remove declaration.
4778 (HAVE_register_atfork_malloc): Remove definition.
4779 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
4780 __pthread_child_handler variable.
4781 (__libc_pthread_init): Use __register_atfork instead of explicitly
4783 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
4785 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4787 * unwind.c (unwind_cleanup): Print error message and then abort. This
4788 function must never be reached.
4790 * cond-perf.c: New file.
4792 2003-05-05 Ulrich Drepper <drepper@redhat.com>
4794 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
4796 2003-05-04 Roland McGrath <roland@redhat.com>
4798 * Makefile ($(objpfx)../libc.so): New target.
4800 2003-05-02 Ulrich Drepper <drepper@redhat.com>
4802 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4803 (pthread_condattr_t): Size is only an int, don't use long for
4805 (pthread_mutexattr_t): Likewise.
4806 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4807 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4808 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4810 2003-05-01 Ulrich Drepper <drepper@redhat.com>
4812 * sysdeps/i386/tls.h: Define THREAD_ID.
4813 * sysdeps/ia64/tls.h: Likewise.
4814 * sysdeps/powerpc/tls.h: Likewise.
4815 * sysdeps/s390/tls.h: Likewise.
4816 * sysdeps/sh/tls.h: Likewise.
4817 * sysdeps/x86_64/tls.h: Likewise.
4818 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
4820 * pthread_mutex_timedlock.c: Likewise.
4821 * pthread_mutex_trylock.c: Likewise.
4822 * pthread_mutex_unlock.c: Likewise.
4823 * pthread_rwlock_trywrlock.c: Likewise.
4824 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
4825 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4826 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4827 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4829 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
4832 2003-04-29 Jakub Jelinek <jakub@redhat.com>
4834 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4835 (__SIZEOF_PTHREAD_COND_T): Define to 48.
4836 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
4837 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4838 Make __align long long instead of long.
4839 (pthread_rwlock_t): Formatting.
4840 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4841 (pthread_rwlock_t): Formatting.
4842 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4843 (pthread_cond_t): Make __align long long instead of long.
4844 (pthread_rwlock_t): Move __flags field to the same position as in
4847 2003-04-30 Ulrich Drepper <drepper@redhat.com>
4849 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
4850 * tst-rwlock7.c (do_test): Likewise.
4852 2003-04-26 Roland McGrath <roland@redhat.com>
4854 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
4856 2003-04-22 Jakub Jelinek <jakub@redhat.com>
4858 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
4859 sizeof (struct pthread).
4860 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
4862 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
4864 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
4866 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
4868 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
4870 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
4872 (NO_TLS_OFFSET): Define.
4873 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
4874 add TLS_TCB_SIZE unnecessarily.
4876 2003-04-22 Roland McGrath <roland@redhat.com>
4878 * Makeconfig (shared-thread-library): Reverse link order to work
4881 2003-04-22 Ulrich Drepper <drepper@redhat.com>
4883 * semaphore.h: Fix typo in comment.
4885 2003-04-21 Ulrich Drepper <drepper@redhat.com>
4887 * sysdeps/pthread/sigfillset.c: New file.
4889 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
4890 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
4891 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
4892 * sysdeps/pthread/sigaction.c: Likewise.
4893 * sysdeps/pthread/sigprocmask.c: New file.
4894 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
4896 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4897 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
4900 2003-04-19 Ulrich Drepper <drepper@redhat.com>
4902 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4903 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
4905 * sysdeps/unix/sysv/linux/unregister-atfork.c
4906 (__unregister_atfork): Don't free memory not allocated dynamically.
4908 * semaphore.h: Remove __THROW marker from cancellation points.
4909 * nptl/sysdeps/pthread/pthread.h: Likewise.
4911 2003-04-18 Ulrich Drepper <drepper@redhat.com>
4913 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
4914 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
4917 2003-04-16 Jakub Jelinek <jakub@redhat.com>
4919 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
4921 2003-04-15 Roland McGrath <roland@redhat.com>
4923 * forward.c (__pthread_unwind): Tweak to avoid warning.
4925 2003-04-15 Ulrich Drepper <drepper@redhat.com>
4927 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
4929 2003-04-14 Ulrich Drepper <drepper@redhat.com>
4931 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
4932 overflow CFA advance instructions.
4933 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4935 2003-04-14 Jakub Jelinek <jakub@redhat.com>
4937 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
4938 * sysdeps/i386/pthread_spin_lock.c: Likewise.
4939 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
4942 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
4943 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
4944 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
4945 DW_CFA_advance_loc for .Laddl-.Lsubl.
4947 2003-04-13 Ulrich Drepper <drepper@redhat.com>
4949 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
4950 position-independent unwind data for static libraries.
4951 Add missing unwind info. Add comments.
4953 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
4954 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4955 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4956 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4958 2003-04-12 Ulrich Drepper <drepper@redhat.com>
4960 * Makefile: Make sure all cancellation points are compiled with
4961 exception and asynchronous unwind tables.
4963 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
4964 which mishandles loading of global object addresses in PIC.
4965 (THREAD_SETMEM_NC): Likewise.
4967 2003-04-11 Ulrich Drepper <drepper@redhat.com>
4969 * pthread.h: Define new data structure for cleanup buffer. Declare
4970 new cleanup handler interfaces.
4971 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
4972 (struct pthread): Add cleanup_jmp_buf pointer. Define
4973 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
4974 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
4975 it. Declare old cleanup handler installation functions.
4976 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
4978 * cleanup_defer.c: Likewise.
4979 * cleanup_compat.c: New file. Old cleanup code.
4980 * cleanup_def_compat.c: New file. Old cleanup code.
4981 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
4982 if own thread descriptor.
4983 * unwind.c: New file.
4984 * forward.c: Add __pthread_unwind.
4985 * init.c (pthread_functions): Add __pthread_unwind.
4986 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
4987 Add ptr___pthread_unwind.
4988 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
4989 and unwind function.
4990 * Makefile (libpthread-routines): Add cleanup_compat,
4991 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
4992 table generation if necessary.
4993 * version.c: Record whether unwind support is compiled in.
4994 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
4995 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
4997 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
4998 complication to generate unwind information for syscall wrappers.
4999 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5000 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5001 __cleanup_fct_attribute.
5003 * Makefile: Add rules to build and run tst-cleanup0.
5004 * tst-cleanup0.c: New file.
5005 * tst-cleanup0.expect: New file.
5007 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
5008 caller. Optimize to avoid often unecessary local variable.
5010 2003-04-11 Roland McGrath <roland@redhat.com>
5012 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
5013 sets variable `multidir'; include that.
5014 (generated): Add it.
5015 ($(objpfx)$(multidir)/crti.o): New target.
5016 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
5018 2003-04-11 Ulrich Drepper <drepper@redhat.com>
5020 * tst-attr2.c (do_test): Add cast to avoid warning.
5021 * tst-mutex4.c (do_test): Likewise.
5023 2003-04-10 Ulrich Drepper <drepper@redhat.com>
5025 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
5028 2003-04-09 Ulrich Drepper <drepper@redhat.com>
5030 * Makefile (tests): Add tst-detach1.
5031 * tst-detach1.c: New file.
5033 2003-04-08 Ulrich Drepper <drepper@redhat.com>
5035 * sysdeps/pthread/pthread.h: Remove duplicate
5036 pthread_cleanup_{push,pop} definitions.
5038 * tst-barrier2.c: Eliminate warnings.
5039 * tst-cancel4.c: Likewise.
5040 * tst-cond4.c: Likewise.
5041 * tst-cond6.c: Likewise.
5042 * tst-detach1.c: Likewise.
5043 * tst-rwlock4.c: Likewise.
5044 * tst-rwlock6.c: Likewise.
5045 * tst-rwlock7.c: Likewise.
5046 * tst-sem3.c: Likewise.
5047 * tst-spin2.c: Likewise.
5048 * tst-umask1.c: Likewise.
5050 2003-04-07 Ulrich Drepper <drepper@redhat.com>
5052 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
5054 2003-04-06 Ulrich Drepper <drepper@redhat.com>
5056 * descr.h (struct pthread): Move cancelhandling member to the front.
5058 2003-04-05 Ulrich Drepper <drepper@redhat.com>
5060 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
5061 malloc_parent, and malloc_child statically.
5062 (__register_atfork_malloc): New function.
5063 (free_mem): Don't free any of the malloc_* variables on the list.
5064 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
5065 Define HAVE_register_atfork_malloc.
5067 2003-04-04 Ulrich Drepper <drepper@redhat.com>
5069 * sysdeps/pthread/createthread.c (create_thread): Add some more
5070 comments explaining when to set multiple_threads and when not.
5072 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5073 THREAD_ATOMIC_BIT_SET if not already defined.
5074 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
5075 THREAD_ATOMIC_BIT_SET:
5076 * sysdeps/x86_64/tls.h: Likewise.
5077 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
5078 THREAD_ATOMIC_CMPXCHG_VAL.
5079 (_pthread_cleanup_pop_restore): Likewise.
5080 * cancellation.c (__pthread_enable_asynccancel): Likewise.
5081 (__pthread_enable_asynccancel_2): Likewise.
5082 (__pthread_disable_asynccancel): Likewise.
5083 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5084 (__libc_disable_asynccancel): Likewise.
5085 * init.c (sigcancel_handler): Likewise.
5086 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
5087 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
5089 2003-04-03 Ulrich Drepper <drepper@redhat.com>
5091 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
5092 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
5093 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
5094 * Makefile (tests): Add tst-cancel11.
5095 * tst-cancel11.c: New file.
5097 2003-04-01 Ulrich Drepper <drepper@redhat.com>
5099 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
5100 round, not the first. Use specific_used flag instead of local
5101 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
5102 (__free_tcb): Don't call deallocate_tsd here.
5103 (start_thread): Call deallocate_tsd here.
5104 * pthread_setspecific.c: Set specific_used flag really only when
5106 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
5107 * tst-tsd3.c: New file.
5108 * tst-tsd4.c: New file.
5110 2003-03-31 Ulrich Drepper <drepper@redhat.com>
5112 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
5113 Use atomic_exchange_and_add instead of __lll_add.
5114 (__lll_mutex_timedlock): Likewise.
5115 Patch by Ian Wienand.
5117 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
5119 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5120 (SINGLE_THREAD_P): Fix typo.
5121 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
5123 2003-03-31 Ulrich Drepper <drepper@redhat.com>
5125 * Makefile (tests): Add tst-align.
5126 * tst-align.c: New file.
5127 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
5129 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
5132 * tst-tsd2.c: Add casts to avoid warnings.
5134 2003-03-30 Ulrich Drepper <drepper@redhat.com>
5136 * descr.h (struct pthread): Move most often used elements to the front.
5138 2003-03-29 Ulrich Drepper <drepper@redhat.com>
5140 * Makefile (libpthread-routines): Add pthread_atfork.
5141 (libpthread-static-only-routines): Add pthread_atfork.
5143 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5145 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
5147 (INSTALL_DTV): Add parens.
5148 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
5149 Use passed descr instead of THREAD_SELF.
5150 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
5151 (__lll_mutex_timedlock_wait): Correct expected value after
5153 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
5154 Release lock before waking up the waiters.
5155 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
5156 criteria. Reorderstruct passed to cleanup handler. Fix
5157 handling of cancellation and failung pthread_mutex_unlock call.
5158 Use __pthread_enable_asynccancel_2 instead of
5159 __pthread_enable_asynccancel.
5160 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5161 Return result of lock re-get if it fails.
5162 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
5163 for __pthread_cleanup_push.
5164 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
5165 completely broken rwlock implementation.
5166 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5167 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5168 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5169 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5170 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5171 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
5172 versioned_symbol macro.
5173 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
5174 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5176 2003-03-27 Ulrich Drepper <drepper@redhat.com>
5178 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
5179 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
5181 (struct timer): Remove th and bar field.
5182 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
5183 debugging code. Create only one helper thread.
5184 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
5186 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5187 Renamed. Define statically. Use thread info from siginfo.
5188 (__helper_once): New variable.
5189 (__helper_tid): New variable.
5190 (__reset_helper_control): New function.
5191 (__start_helper_thread): New function.
5193 * pthread_create.c (start_thread): Don't use setjmp inside
5194 __builtin_expect to work around gcc bug.
5196 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
5197 timer_delete syscall fails, but not with ENOSYS, set
5200 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
5201 (timer_settime): Fix typo.
5202 * sysdeps/unix/sysv/linux/timer_getoverr.c
5203 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
5205 2003-03-27 Jakub Jelinek <jakub@redhat.com>
5207 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
5208 offset of cleanupbuf.__prev.
5210 2003-03-26 Jakub Jelinek <jakub@redhat.com>
5212 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
5215 2003-03-26 Ulrich Drepper <drepper@redhat.com>
5217 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
5218 NULL provide default definition to syscall.
5220 2003-03-25 Roland McGrath <roland@redhat.com>
5222 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
5223 (timer_id2ptr): Fix typo.
5225 2003-03-25 Ulrich Drepper <drepper@redhat.com>
5227 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
5228 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5229 * sysdeps/ia64/pthreaddef.h: Likewise.
5230 * sysdeps/powerpc/pthreaddef.h: Likewise.
5231 * sysdeps/s390/pthreaddef.h: Likewise.
5232 * sysdeps/sh/pthreaddef.h: Likewise.
5233 * sysdeps/x86_64/pthreaddef.h: Likewise.
5234 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
5235 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
5237 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5238 SIGTIMER is not unblocked.
5239 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
5241 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
5243 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
5244 pass pointer through as ID.
5245 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
5246 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
5247 * sysdeps/unix/sysv/linux/timer_create.c: New file.
5248 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
5249 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
5250 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
5251 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
5252 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
5253 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
5254 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
5255 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
5256 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
5257 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
5258 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
5259 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
5260 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
5261 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
5262 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
5263 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
5264 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
5265 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
5266 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
5267 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
5268 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
5269 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
5270 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
5271 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
5272 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
5273 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
5274 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
5275 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
5276 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
5277 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
5279 * pthreadP.h: Remove FRAME_LEFT definition.
5280 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
5281 already left frame. Programs which have this problem are not POSIX
5283 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
5285 2003-03-24 Ulrich Drepper <drepper@redhat.com>
5287 * sysdeps/pthread/tst-timer.c: Check return values of the
5290 2003-03-23 Roland McGrath <roland@redhat.com>
5292 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
5293 * tst-tls3mod.c: Likewise.
5294 * tst-tls1.c: Likewise.
5295 * tst-tls2.c: Likewise.
5297 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
5300 * tst-join5.c (tf1, tf2): Add a cast.
5302 * Makeconfig (includes): Append -I$(..)nptl to this variable.
5304 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
5305 Don't test anything.
5306 * tst-cond4.c: Likewise.
5307 * tst-cond6.c: Likewise.
5308 * tst-flock2.c: Likewise.
5309 * tst-mutex4.c: Likewise.
5310 * tst-rwlock4.c: Likewise.
5311 * tst-signal1.c: Likewise.
5312 * tst-spin2.c: Likewise.
5313 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
5315 * tst-mutex4.c: Use test-skeleton.c.
5316 * tst-spin2.c: Likewise.
5317 * tst-sysconf.c: Likewise.
5318 * tst-barrier2.c: Likewise.
5319 * tst-cond4.c: Likewise.
5320 * tst-cond6.c: Likewise.
5321 * tst-rwlock4.c: Likewise.
5322 * tst-unload.c: Likewise.
5323 * tst-flock2.c (do_test): Use return instead of exit.
5325 2003-03-22 Jakub Jelinek <jakub@redhat.com>
5327 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
5329 2003-03-21 Ulrich Drepper <drepper@redhat.com>
5331 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
5332 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
5333 instead of __lll_compare_and_swap.
5334 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
5336 Removed definition if __lll_compare_and_swap.
5338 * cancellation.c: Adjust for new form of compare&exchange macros.
5339 * cleanup_defer.c: Likewise.
5341 * libc-cancellation.c: Likewise.
5342 * old_pthread_cond_broadcast.c: Likewise.
5343 * old_pthread_cond_signal.c: Likewise.
5344 * old_pthread_cond_timedwait.c: Likewise.
5345 * old_pthread_cond_wait.c: Likewise.
5346 * pthread_cancel.c: Likewise.
5347 * pthread_create.c: Likewise.
5348 * pthread_detach.c: Likewise.
5349 * pthread_join.c: Likewise.
5350 * pthread_key_delete.c: Likewise.
5351 * pthread_setcancelstate.c: Likewise.
5352 * pthread_setcanceltype.c: Likewise.
5353 * pthread_timedjoin.c: Likewise.
5354 * pthread_tryjoin.c: Likewise.
5355 * sysdeps/pthread/createthread.c: Likewise.
5357 2003-03-20 Ulrich Drepper <drepper@redhat.com>
5359 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
5360 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
5361 definitions. Replace uses with calls to atomic_* functions.
5362 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5363 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
5364 __lll_test_and_set calls with atomic_exchange_and_add and
5365 atomic_exchange calls respectively.
5366 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
5367 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
5368 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
5369 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
5370 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
5371 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
5372 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
5374 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
5375 returns the old value.
5377 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
5379 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
5380 int for variable OLDVAL and correct inline assembler contraint.
5381 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
5382 type int for variable OLD.
5384 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
5386 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5387 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
5388 instead of multiple_threads field in the TCB.
5390 2003-03-19 Ulrich Drepper <drepper@redhat.com>
5392 * sysdeps/i386/i686/bits/atomic.h: Removed.
5393 * sysdeps/i386/i586/bits/atomic.h: Removed.
5394 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
5395 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
5396 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
5397 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
5398 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
5399 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
5400 * atomic.h: Removed. Moved to glibc.
5402 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
5403 support for clock selection.
5405 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
5408 2003-03-18 Roland McGrath <roland@redhat.com>
5410 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5411 Add __lll_rel_instr first. Add memory clobber.
5412 (lll_mutex_unlock): Use __lll_test_and_set.
5413 From Paul Mackerras <paulus@samba.org>.
5415 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
5417 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
5418 (SINGLE_THREAD_P): Add `header.' prefix.
5419 From Paul Mackerras <paulus@samba.org>.
5421 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
5422 pthread_timedjoin_np to ...
5423 (libpthread: GLIBC_2.3.3): ... here.
5424 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
5426 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5427 Avoid shadowing VAL variable.
5429 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
5432 2003-03-18 Ulrich Drepper <drepper@redhat.com>
5434 * Makefile (tests): Add tst-cond11.
5435 * tst-cond11.c: New file.
5437 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
5438 struct passed to cleanup handler to eliminate one more
5440 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5442 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5443 (pthrad_cond_t): Replace __unused field with __clock.
5445 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
5446 waken all waiters in cleanup handler.
5447 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5448 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5450 * pthread_condattr_getclock.c: New file.
5451 * pthread_condattr_setclock.c: New file.
5452 * sysdeps/pthread/pthread.h: Declare these new functions.
5453 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
5454 * Makefile (libpthread-routines): Add the new functions.
5455 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
5456 Renamed field to value. Document use of the bits.
5457 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
5459 * pthread_condattr_setpshared.c: Likewise.
5460 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
5461 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
5462 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5464 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5465 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5466 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5467 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5468 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5469 Implement clock selection.
5470 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5471 * pthread-errnos.sym: Add ENOSYS.
5472 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5473 _POSIX_CLOCK_SELECTION.
5474 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5476 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
5477 invalid .size directive.
5479 2003-03-17 Roland McGrath <roland@redhat.com>
5481 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
5484 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5486 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
5487 Use __lll_add instead of spelling it out. Use protected symbol names.
5488 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
5490 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
5491 Renamed from lll_compare_and_swap. Use new name where necessary.
5492 (__lll_add): Defined.
5493 (__lll_dec_if_positive): Defined.
5494 (__lll_test_and_set): Defined.
5495 * sysdeps/ia64/pthread_spin_init.c: Removed.
5496 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
5497 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
5498 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
5499 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
5500 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
5501 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
5502 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
5503 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
5504 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
5505 __sync_lock_release_si.
5506 Patch by Jakub Jelinek.
5508 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
5509 Fix timeout handling.
5510 (__lll_timedwait_tid): Likewise.
5511 (lll_unlock_wake_cb): Wake up other waiters if necessary.
5512 Patch by Jakub Jelinek.
5514 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
5516 2003-03-17 Roland McGrath <roland@redhat.com>
5518 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
5519 * sysdeps/pthread/pthread_spin_init.c: New file.
5520 * sysdeps/pthread/pthread_spin_unlock.c: New file.
5521 * sysdeps/powerpc/Makefile: New file.
5522 * sysdeps/powerpc/pthread_spin_lock.c: New file.
5523 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
5524 * sysdeps/powerpc/pthreaddef.h: New file.
5525 * sysdeps/powerpc/tcb-offsets.sym: New file.
5526 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
5527 * sysdeps/powerpc/tls.h: New file.
5528 * sysdeps/powerpc/bits/atomic.h: New file.
5529 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
5530 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
5531 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
5533 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
5534 * sysdeps/unix/sysv/linux/sem_post.c: New file.
5535 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
5536 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
5537 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
5538 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
5539 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
5540 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
5541 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
5542 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
5543 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
5544 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
5545 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
5546 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
5547 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
5549 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
5551 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
5552 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5553 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
5554 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
5555 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5557 2003-03-17 Ulrich Drepper <drepper@redhat.com>
5559 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
5560 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5561 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5562 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5563 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
5565 2003-03-16 Roland McGrath <roland@redhat.com>
5567 * tst-fork4.c: Include <string.h>.
5568 * tst-signal2.c: Likewise.
5569 * tst-mutex5.c (do_test): exit -> return.
5570 * tst-mutex2.c: Include <stdlib.h>.
5572 2003-03-16 Ulrich Drepper <drepper@redhat.com>
5574 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
5575 (__lll_mutex_timedlock_wait): Correct expected value after
5576 spurious wakeup. Otherwise we would never wait again.
5578 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
5579 zone versus inline asm stupidity. Use correct instructions.
5581 * tst-rwlock6.c: Add some more status output.
5583 2003-03-15 Roland McGrath <roland@redhat.com>
5585 * sysdeps/pthread/configure.in: New file.
5586 * sysdeps/pthread/configure: New file (generated).
5588 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5590 * allocatestack.c (allocate_stack): Store the exact stack size of
5591 user allocated stacks.
5593 2003-03-15 Jakub Jelinek <jakub@redhat.com>
5595 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
5596 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
5597 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5598 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
5599 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
5600 Use `header.' prefix.
5601 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
5603 2003-03-15 Ulrich Drepper <drepper@redhat.com>
5605 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
5606 __builtin_frame_address, use stack pointer.
5608 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
5609 instead of __builtin_frame_pointer.
5611 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5613 * tst-basic1.c (do_test): Add cast to avoid warning.
5614 * tst-basic2.c (do_test): Likewise.
5616 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
5617 amount of stack correction.
5619 * tst-fork4.c: Use test-skeleton.c.
5621 2003-03-14 Roland McGrath <roland@redhat.com>
5623 * init.c: Fix typo "#eli" for "#else".
5625 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
5627 * allocatestack.c (__stack_user): Use hidden_data_def.
5628 * pthread_create.c (__pthread_keys): Likewise.
5630 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
5632 2003-03-14 Roland McGrath <roland@redhat.com>
5634 * tst-fork4.c: New file.
5635 * Makefile (tests): Add it.
5637 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
5638 we always define the padding space.
5639 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
5640 stopped supporting its own extensions fully.
5641 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
5642 struct also called `header', so `header.multiple_threads' is the field
5643 name to use on all machines.
5644 * allocatestack.c (allocate_stack): Use `header.' prefix.
5645 * sysdeps/pthread/createthread.c (create_thread): Likewise.
5646 * pthread_create.c (__pthread_create_2_1): Likewise.
5647 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
5648 (THREAD_SELF): Likewise.
5649 * sysdeps/x86_64/tls.h: Likewise.
5650 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
5651 (SINGLE_THREAD_P): Likewise.
5652 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
5653 (SINGLE_THREAD_P): Likewise.
5654 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
5655 (SINGLE_THREAD_P): Likewise.
5657 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
5660 2003-03-14 Ulrich Drepper <drepper@redhat.com>
5662 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
5663 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
5665 * pthread_create.c (start_thread): setjmp is expected to return 0.
5667 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
5668 (THREAD_GETMEM_NC): Likewise.
5670 2003-03-13 Ulrich Drepper <drepper@redhat.com>
5672 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
5673 and the size of the stack which must be allocated is a multiple,
5674 allocate one more page.
5675 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
5676 MULTI_PAGE_ALIASING.
5678 2003-03-13 Roland McGrath <roland@redhat.com>
5680 * pthread_create.c (start_thread): Set EXITING_BIT after the
5681 event-reporting (and destructors), not before.
5683 2003-03-13 Jakub Jelinek <jakub@redhat.com>
5685 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
5686 lll_futex_wake): Declare register variables as long int instead of
5687 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
5688 Make syscall arguments clobbered by the syscall.
5689 (lll_futex_wait): Define using lll_futex_timed_wait.
5691 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
5694 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
5697 * allocatestack.c (nptl_ncreated): Only declare if
5698 COLORING_INCREMENT != 0.
5700 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
5701 (__libc_enable_asynccancel_2): Remove prototype.
5703 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
5704 ctid to match kernel.
5706 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5708 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
5709 libc_multiple_threads.
5710 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
5711 __libc_multiple_threads to...
5712 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
5714 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
5716 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5717 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5719 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
5720 (__pthread_once_internal): Define.
5722 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
5723 macros instead of .symver directly.
5724 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5725 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5727 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
5728 * sysdeps/x86_64/tcb-offsets.sym: New file.
5729 * sysdeps/x86_64/Makefile: New file.
5731 * sysdeps/i386/tcb-offsets.sym: Add SELF.
5732 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
5733 to access own pthread_t in TCB.
5734 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5736 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5738 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5740 2003-03-12 Roland McGrath <roland@redhat.com>
5742 * pthread-errnos.sym: New file.
5743 * Makefile (gen-as-const-headers): New variable, list that file.
5744 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
5745 header <pthread-errnos.h> instead of defining errno values here.
5746 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5747 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5748 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
5749 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5750 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5752 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5754 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5755 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5756 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5757 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5758 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5759 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5760 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5761 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5762 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5763 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5764 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5765 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
5766 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5767 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
5768 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
5769 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5770 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5771 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5772 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5773 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5774 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
5775 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5776 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
5777 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
5778 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
5779 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5780 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5782 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
5783 CLONE_CHILD_SETTID worked.
5785 2003-03-12 Ulrich Drepper <drepper@redhat.com>
5787 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
5789 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
5792 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5793 (pthread_cond_t): Add padding.
5795 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
5796 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
5797 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
5799 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
5800 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
5801 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
5802 (__pthread_rwlock_timedrdlock): Likewise.
5803 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
5804 (__pthread_rwlock_wrlock): Likewise.
5805 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
5806 (__pthread_rwlock_rdlock): Likewise.
5808 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
5810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
5811 result of lock re-get if it fails.
5813 2003-03-11 Ulrich Drepper <drepper@redhat.com>
5815 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
5816 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5817 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
5818 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5819 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5820 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5821 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5822 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5823 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
5824 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5826 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
5827 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
5829 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
5830 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
5831 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
5832 (create_thread): Likewise.
5833 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
5834 * init.c (__pthread_initialize_minimal_internal): Initialize
5835 __libc_multiple_threads_ptr if necessary.
5836 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
5837 __pthread_multiple_threads and __libc_multiple_threads_ptr.
5838 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
5839 __libc_multiple_threads.
5840 (__libc_pthread_init): Return pointer to __libc_pthread_init if
5843 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
5844 (THREAD_SETMEM_NC): Likewise.
5846 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
5847 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
5848 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
5849 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
5851 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
5852 Eliminate one entire instruction.
5854 * cancellation.c (__pthread_enable_asynccancel_2): New function.
5855 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
5856 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5857 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
5858 instead of __pthread_enable_asynccancel.
5859 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5860 (__pthread_cond_wait): Likewise.
5861 * sysdeps/pthread/pthread_cond_timedwait.c
5862 (__pthread_cond_timedwait): Likewise.
5863 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5865 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5866 (__condvar_cleanup): Wake up all waiters in case we got signaled
5867 after being woken up but before disabling asynchronous
5869 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
5870 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5871 (__condvar_cleanup): Likewise.
5873 * init.c (__NR_set_tid_address): If already defined, don't redefine.
5874 Make it an error if architecture has no #if case. Add x86-64.
5876 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
5877 pt-initfini.s generation.
5879 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
5880 (TLS_INIT_TP): Fix typo.
5882 2003-03-11 Jakub Jelinek <jakub@redhat.com>
5884 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
5885 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
5887 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
5888 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
5889 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
5890 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
5891 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
5892 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
5893 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
5894 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
5896 2003-03-11 Ulrich Drepper <drepper@redhat.com>
5898 * sysdeps/pthread/pthread_cond_timedwait.c
5899 (__pthread_cond_timedwait): Return the result of the final
5900 locking. If it succeeds, the regular function return value.
5902 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
5903 Return result of the final locking.
5904 * version.c (__nptl_main): Work around problems with the strange
5905 INTERNAL_SYSCALL macro on ppc32.
5906 * init.c (__pthread_initialize_minimal_internal): Unblock
5907 SIGCANCEL in case the parent blocked it.
5908 Reported by Paul Mackerras <paulus@samba.org>.
5910 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
5911 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
5912 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
5914 2003-03-11 Jakub Jelinek <jakub@redhat.com>
5916 * sysdeps/pthread/pthread_cond_timedwait.c
5917 (__pthread_cond_timedwait): Unlock and fail if
5918 __pthread_mutex_unlock_internal failed.
5920 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
5921 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
5923 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
5924 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
5925 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
5926 ALLOCATE_STACK): New macros.
5927 (TLS_TPADJ): New macro.
5928 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
5929 (allocate_stack): Handle TLS_DTV_AT_TP and
5930 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
5931 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
5933 * init.c [__ia64__] (__NR_set_tid_address): Define.
5935 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
5936 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
5937 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
5938 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
5939 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
5940 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
5941 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
5942 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
5943 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
5944 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
5945 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
5946 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
5947 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
5948 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
5949 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
5950 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
5951 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
5952 * sysdeps/ia64/bits/atomic.h: New file.
5953 * sysdeps/ia64/Makefile: New file.
5954 * sysdeps/ia64/pthread_spin_init.c: New file.
5955 * sysdeps/ia64/pthread_spin_lock.c: New file.
5956 * sysdeps/ia64/pthread_spin_trylock.c: New file.
5957 * sysdeps/ia64/pthread_spin_unlock.c: New file.
5958 * sysdeps/ia64/pthreaddef.h: New file.
5959 * sysdeps/ia64/tcb-offsets.sym: New file.
5960 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
5961 * sysdeps/ia64/tls.h: New file.
5963 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
5964 to syscall instead of no arguments.
5966 2003-03-10 Ulrich Drepper <drepper@redhat.com>
5968 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
5969 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
5970 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
5971 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
5973 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
5976 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
5978 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5979 lowlevelbarrier.sym.
5980 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
5981 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
5982 Include lowlevelbarrier.h and don't define offsets locally.
5983 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
5985 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5986 (__lll_mutex_lock_wait): Reverse order of first two parameters.
5987 (__lll_mutex_timedlock_wait): Likewise.
5988 (lll_mutex_lock): Adjust asm for that.
5989 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
5990 (lll_lock): Adjust asm for operand order change.
5991 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
5992 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
5994 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
5995 Reverse order of parameters.
5996 (__lll_timedwait_tid): Remove regparms attribute.
5997 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
5998 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
6000 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6001 (__lll_timedwait_tid): Remove one unnecessary instruction.
6003 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
6004 __lll_mutex_timedlock_wait only for NOT_IN_libc.
6005 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
6008 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
6009 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
6011 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
6014 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
6015 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
6017 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
6018 define LOCK here (if UP is not defined). The actual code is in
6021 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
6022 LOCK is already defined. Don't define lll_unlock_wake_cb and
6023 __lll_timedwait_tid for libc.so.
6024 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
6025 define LOCK here (if UP is not defined). The actual code is in
6028 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
6029 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
6030 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
6031 instead of lowlevelsem.h.
6032 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
6033 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
6034 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
6036 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
6038 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
6039 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
6040 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
6042 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
6044 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
6047 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
6049 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
6050 of __libc_locking_needed.
6051 (lll_trylock): Initialize %eax to zero.
6053 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
6054 pthread_cond_t definition.
6056 2003-03-10 Roland McGrath <roland@redhat.com>
6058 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
6059 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
6060 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
6061 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
6062 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
6064 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
6065 Instead of setting PD->multiple_threads, set globals
6066 __pthread_multiple_threads and __libc_multiple_threads.
6067 * sysdeps/pthread/createthread.c (create_thread): Likewise.
6068 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
6069 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
6071 * descr.h (struct pthread): Conditionalize first member on
6072 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
6073 containing an anonymous tcbhead_t. Move `list' member out.
6074 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
6075 * allocatestack.c: Remove use of `header.data.' prefix.
6076 * pthread_create.c: Likewise.
6077 * init.c (__pthread_initialize_minimal_internal): Likewise.
6078 * sysdeps/pthread/createthread.c (create_thread): Likewise.
6079 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
6080 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
6081 * sysdeps/x86_64/tls.h: Likewise.
6082 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
6083 (SINGLE_THREAD_P): Likewise.
6084 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
6085 (SINGLE_THREAD_P): Likewise.
6086 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
6087 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
6089 2003-03-09 Ulrich Drepper <drepper@redhat.com>
6091 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
6093 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
6094 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6096 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
6097 leftovers from the ia32 code.
6099 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
6101 (clear_once_control): Don't load %esi.
6103 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
6106 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
6108 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
6109 * sysdeps/unix/sysv/linux/createthread.c: ...here.
6111 * Makefile (tests): Add tst-cond10.
6112 * tst-cond10.c: New file.
6114 2003-03-08 Ulrich Drepper <drepper@redhat.com>
6116 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
6117 * tst-signal3.c (do_test): Likewise.
6118 * tst-sem5.c (do_test): Likewise.
6119 * tst-kill6.c (do_test): Likewise.
6120 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
6122 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
6124 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
6125 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
6126 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6127 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
6128 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6129 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6132 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6135 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6137 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6138 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6139 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
6140 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
6141 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
6143 * allocatestack.c (allocate_stack): If mprotect() fails free the
6146 2003-03-07 Ulrich Drepper <drepper@redhat.com>
6148 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
6150 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
6151 lll_wake_tid. This was used only to work around kernel limits in
6153 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
6154 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
6155 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
6156 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
6158 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
6159 (__pthread_initialize_minimal_internal): Change initialization of
6160 __static_tls_align_m1 appropriately.
6161 * pthreadP.h (__static_tls_align_m1): Renamed from
6163 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
6164 instead of __static_tls_align-1.
6166 2003-03-04 Ulrich Drepper <drepper@redhat.com>
6168 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6170 * pthread_create.c: Define __pthread_keys using nocommon
6171 attribute, not by placing it explicitly in bss.
6172 Remove DEFINE_DEALLOC definition. Not needed anymore.
6174 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
6175 Use it in mmap call to allocate stacks.
6177 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
6179 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
6180 result of the thread function.
6182 2003-03-03 Ulrich Drepper <drepper@redhat.com>
6184 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
6185 version is just fine.
6187 * sysdeps/unix/sysv/linux/libc_pthread_init.c
6188 (__pthread_child_handler): Renamed from pthread_child_handler,
6189 exported, and marked hidden. Change all users.
6190 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
6191 free __pthread_child_handler from child list.
6193 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
6195 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
6197 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6198 Fix handling of cancellation and failing pthread_mutex_unlock call.
6199 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
6200 (__pthread_cond_wait): Likewise.
6202 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6203 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
6204 lll_futex_timed_wait call.
6205 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6206 (pthread_rwlock_timedwrlock): Likewise.
6208 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6209 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
6210 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
6212 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
6213 check of lll_futex_wake return value.
6215 2003-03-03 Roland McGrath <roland@redhat.com>
6217 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
6219 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6220 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
6221 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
6223 2003-03-02 Ulrich Drepper <drepper@redhat.com>
6225 * sysdeps/pthread/timer_create.c (timer_create): Return correct
6226 error for CPU clocks.
6228 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6229 _POSIX_MONOTONIC_CLOCK.
6230 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6232 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
6235 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6237 * descr.h (struct pthread): Move cleanup field to the front.
6239 2003-03-01 Roland McGrath <roland@redhat.com>
6241 * sem_open.c (sem_open): Braino fix.
6243 2003-03-01 Ulrich Drepper <drepper@redhat.com>
6245 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
6246 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
6247 __pthread_cleanup_pop functionality.
6248 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6250 * descr.h (struct pthread): Move tid field to the front now that
6253 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
6254 (__lll_mutex_timedlock_wait): Remove.
6255 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6256 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6257 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
6258 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6259 (lll_unlock_wake_cb): Don't save and restore %esi.
6260 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6262 (__lll_timedwait_tid): Add alignment.
6263 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6264 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
6266 (__lll_timedwait_tid): Removed.
6267 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6268 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
6269 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6270 (pthread_barrier_wait): Don't save, load, and restore %esi for
6272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6273 (__pthread_cond_signal): Don't save, load, and restore %esi.
6274 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
6275 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
6276 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6277 Don't save, load, and restore %esi.
6279 2003-02-27 Ulrich Drepper <drepper@redhat.com>
6281 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
6282 Release lock before waking up the waiters.
6284 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
6286 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
6287 (reader_thread): Likewise.
6289 * sysdeps/pthread/pthread_rwlock_unlock.c
6290 (__pthread_rwlock_unlock): Release internal lock early. Don't try
6291 to wake up readers if there are none.
6293 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
6294 Release internal lock before wake threads.
6296 2003-02-26 Ulrich Drepper <drepper@redhat.com>
6298 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
6299 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
6301 * tst-rwlock9.c: Likewise.
6302 * tst-rwlock10.c: New file.
6303 * tst-rwlock11.c: New file.
6305 * Makefile (tests): Add tst-dlsym1.
6306 * tst-dlsym1.c: New file.
6308 * init.c (__pthread_initialize_minimal_internal): Set
6309 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
6310 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
6312 2003-02-24 Ulrich Drepper <drepper@redhat.com>
6314 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
6316 * tst-cond2.c: Fix sychronization with child.
6318 * tst-rwlock8.c (reader_thread): Remove unused variable.
6320 * Makefile: Add rules to build and run tst-tls3.
6321 * tst-tls3.c: New file.
6322 * tst-tls3mod.c: New file.
6324 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
6325 * tst-rwlock8.c: New file.
6326 * tst-rwlock9.c: New file.
6327 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
6328 complete broken rwlock implementation.
6329 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6331 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6333 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6334 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6335 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6336 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6337 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6338 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
6339 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6341 2003-02-23 Roland McGrath <roland@redhat.com>
6343 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
6345 2003-02-23 Ulrich Drepper <drepper@redhat.com>
6347 * Makefile (tests): Add tst-context1.
6348 * tst-context1.c: New file.
6350 * Makefile (tests): Add tst-tls1 and tst-tls2.
6351 * tst-tls1.c: New file.
6352 * tst-tls2.c: New file.
6354 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
6357 * pthread_create.c (start_thread): Set EXITING_BIT early.
6359 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
6360 (THREAD_GETMEM_NC): Likewise.
6362 2003-02-22 Ulrich Drepper <drepper@redhat.com>
6364 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
6365 off 3 more bytes by using offset-less instructions when possible.
6367 * Makefile: Add dependency for $(objpfx)version.d.
6369 * eintr.c (eintr_source): Add unnecessary return but the compiler
6372 * tst-kill3.c: Include <unistd.h>.
6374 2003-02-21 Roland McGrath <roland@redhat.com>
6376 * pthread_create.c (start_thread): Call __libc_thread_freeres.
6378 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6380 * Makefile (tests): Add tst-eintr1.
6381 (distribute): Add eintr.c.
6382 * tst-eintr1.c: New file.
6383 * eintr.c: New file.
6385 * pthread_cancel.c (pthread_cancel): Use tkill directly.
6387 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
6388 Disallow sending SIGCANCEL.
6390 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
6391 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
6392 * tst-kill1.c: New file.
6393 * tst-kill2.c: New file.
6394 * tst-kill3.c: New file.
6395 * tst-kill5.c: New file.
6396 * tst-kill6.c: New file.
6397 * tst-basic7.c: Renamed to...
6398 * tst-kill4.c: ...this.
6400 2003-02-21 Roland McGrath <roland@redhat.com>
6402 * Makefile (install-lib-ldscripts): New variable.
6404 2003-02-21 Ulrich Drepper <drepper@redhat.com>
6406 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
6407 * pthread_cancel.c: Use INVALID_TD_P.
6408 * pthread_detach.c: Likewise.
6409 * pthread_getschedparam.c: Likewise.
6410 * pthread_setschedparam.c: Likewise.
6411 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6412 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6413 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
6414 * pthread_timedjoin.c: Likewise.
6416 * tst-basic7.c: Include <signal.h>.
6418 * pthread_join.c (pthread_join): Limited checking for invalid
6420 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
6422 2003-02-20 Ulrich Drepper <drepper@redhat.com>
6424 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
6425 beginning of the loop. Clear the entire first block of TSD.
6426 * Makefile (tests): Add tst-key4.
6427 * tst-key4.c: New file.
6429 2003-02-18 Ulrich Drepper <drepper@redhat.com>
6431 * Makefile (tests): Add tst-basic7.
6432 * tst-basic7.c: New file.
6434 * pthread_create.c (deallocate_tsd): Mark as internal_function.
6435 Add some more __builtin_expect.
6437 * pthreadP.h: Define dummy version of DEBUGGING_P.
6439 2003-02-17 Ulrich Drepper <drepper@redhat.com>
6441 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
6442 _POSIX_THREAD_PRIORITY_SCHEDULING.
6443 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
6444 _XOPEN_REALTIME_THREADS.
6445 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6447 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
6448 kernel returns EINVAL for PID <= 0, work around it.
6450 * Makefile (tests): Add tst-signal5.
6451 * tst-signal5.c: New file.
6453 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
6456 * tst-cancel1.c (tf): Block all signals.
6458 * Makefile (tests): Add tst-basic6.
6459 * tst-basic6.c: New file.
6461 * tst-basic1.c: Add test for process ID.
6463 * Makefile (tests): Add tst-cancel10.
6464 * tst-cancel10.c: New file.
6466 * Makefile (tests): Add tst-signal4.
6467 * tst-signal4.c: New file.
6469 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
6470 __sigismember instead of sigismember. Add __builtin_expect.
6472 2003-02-16 Ulrich Drepper <drepper@redhat.com>
6474 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
6475 pthread_setcancelstate, and pthread_rwlock_setpshared.
6477 * tst-cancel7.c (do_test): Make sure the pid file exists before
6478 canceling the thread.
6480 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
6481 pthread_rwlock_timedrdlock tests.
6482 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
6483 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6484 Check for invalid tv_nsec field.
6485 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6488 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
6489 recursive mutex of overflow.
6491 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
6493 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
6494 going into an endless loop.
6495 * Makefile (tests): Add tst-cancel9.
6496 * tst-cancel9.c: New file.
6498 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
6500 2003-02-15 Ulrich Drepper <drepper@redhat.com>
6502 * tst-mutex5.c (do_test): Add more timedlock tests.
6504 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
6505 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
6507 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6508 use INLINE_SYSCALL. Error number is returned, not -1.
6510 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
6511 and __deallocate_stack with internal_function.
6512 * pthread_create.c: Adjust definitions appropriately.
6513 * allocatestack.c: Likewise.
6515 * pthread_join.c: Add one more __builtin_expect.
6516 * pthread_timedjoin.c: Likewise.
6518 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
6519 not data of sequence number does not match.
6520 Add one __builtin_expect.
6522 * Makefile (tests): Add tst-clock1.
6523 * tst-clock1.c: New file.
6525 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
6527 * Makefile (tests): Add tst-basic5.
6528 * tst-basic5.c: New file.
6530 2003-02-14 Ulrich Drepper <drepper@redhat.com>
6532 * Makefile (tests): Add tst-basic4.
6533 * tst-basic4.c: New file.
6535 * pthreadP.h: Add declaraction for __nptl_nthreads.
6536 * pthread_create.c: Define __nptl_nthreads
6537 (start_thread): Increment __nptl_nthreads at beginning. Decrement
6538 after thread is done. If then zero, call exit(0).
6539 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6540 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
6541 * init.c (pthread_functions): Initialize ptr_nthreads.
6542 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
6543 (__reclaim_stacks): Decrement __nptl_nthreads.
6544 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
6546 * Makefile (tests): Add tst-basic3.
6547 * tst-basic3.c: New file.
6549 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
6550 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
6551 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
6552 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
6553 if asynchronous canceling is enabled.
6554 * pthread_join.c (pthread_join): When recognizing circular joins,
6555 take into account the other thread might be already canceled.
6556 * Makefile (tests): Add tst-join5.
6557 * tst-join5.c: New file.
6559 * Makefile (tests): Add tst-join4.
6560 * tst-join4.c: New file.
6562 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6564 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
6566 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
6568 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
6569 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
6570 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
6572 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
6574 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
6575 error if lll_futex_wake failed.
6577 2003-02-13 Ulrich Drepper <drepper@redhat.com>
6579 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
6580 handling of cancellation and failung pthread_mutex_unlock call.
6581 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6582 * Makefile (tests): Add tst-cond8 and tst-cond9.
6583 * tst-cond8.c: New file.
6584 * tst-cond9.c: New file.
6586 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
6588 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
6589 non-standard initializers with __USE_GNU.
6591 * Makefile (tests): Add tst-cleanup3.
6592 * tst-cleanup3.c: New file.
6594 2003-02-12 Ulrich Drepper <drepper@redhat.com>
6596 * Makefile (tests): Add tst-attr1 and tst-attr2.
6597 * tst-attr1.c: New file.
6598 * tst-attr2.c: New file.
6600 * Makefile: Add rules to build and run tst-atfork2 test.
6601 * tst-atfork2.c: New file.
6602 * tst-atfork2mod.c: New file.
6604 * sysdeps/unix/sysv/linux/unregister-atfork.c
6605 (__unregister_atfork): Free the memory allocated for the handlers
6606 after removing them from the lists.
6608 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
6611 * tst-atfork1.c (do_test): Wait for the child we forked.
6612 Report error in child.
6614 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
6616 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
6618 2003-02-10 Ulrich Drepper <drepper@redhat.com>
6620 * Makefile (tests): Add tst-cancel8.
6621 * tst-cancel8.c: New file.
6623 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
6624 clearing of control variable.
6625 * Makefile (tests): Add tst-once3 and tst-once4.
6626 * tst-once3.c: New file.
6627 * tst-once4.c: New file.
6629 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
6631 * sysdeps/sh/Makefile: New file.
6632 * sysdeps/sh/bits/atomic.h: New file.
6633 * sysdeps/sh/pthread_spin_init.c: New file.
6634 * sysdeps/sh/pthread_spin_lock.c: New file.
6635 * sysdeps/sh/pthread_spin_trylock.S: New file.
6636 * sysdeps/sh/pthread_spin_unlock.S: New file.
6637 * sysdeps/sh/pthreaddef.h: New file.
6638 * sysdeps/sh/tcb-offsets.sym: New file.
6639 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
6640 * sysdeps/sh/tls.h: New file.
6641 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
6642 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
6643 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
6644 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
6645 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
6646 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
6647 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
6648 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
6649 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
6650 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
6651 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
6652 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
6653 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
6654 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
6655 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
6656 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
6657 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
6658 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
6659 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
6660 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
6661 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
6662 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
6663 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
6664 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
6665 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
6666 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
6667 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
6668 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
6669 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
6670 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
6672 2003-02-08 Ulrich Drepper <drepper@redhat.com>
6674 * tst-cond2.c: Rearrange code to not rely on behavior undefined
6677 * tst-basic2.c (do_test): Lock mutex before creating the thread.
6679 2003-02-07 Ulrich Drepper <drepper@redhat.com>
6681 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
6682 (TLS_GET_FS): New #define.
6683 (TLS_SET_FS): New #define.
6684 Correct value of __NR_set_thread_area.
6686 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
6688 2003-02-06 Ulrich Drepper <drepper@redhat.com>
6690 * Makefile (tests): Add tst-popen1.
6691 * tst-popen1.c: New file.
6693 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
6694 but inactive generalization.
6695 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6696 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6697 Minor optimization, remove one instruction.
6698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6700 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
6702 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
6704 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
6706 * init.c (__NR_set_tid_address): Add #ifdef for s390.
6707 * sysdeps/pthread/pthread_barrier_wait.c: New file.
6708 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
6709 * sysdeps/pthread/pthread_cond_signal.c: New file.
6710 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
6711 * sysdeps/pthread/pthread_cond_wait.c: New file.
6712 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
6713 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
6714 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
6715 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
6716 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
6717 * sysdeps/s390/Makefile: New file.
6718 * sysdeps/s390/bits/atomic.h: New file.
6719 * sysdeps/s390/pthread_spin_init.c: New file.
6720 * sysdeps/s390/pthread_spin_lock.c: New file.
6721 * sysdeps/s390/pthread_spin_trylock.c: New file.
6722 * sysdeps/s390/pthread_spin_unlock.c: New file.
6723 * sysdeps/s390/pthreaddef.h: New file.
6724 * sysdeps/s390/tcb-offsets.sym: New file.
6725 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
6726 * sysdeps/s390/tls.h: New file.
6727 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
6728 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
6729 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
6730 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
6731 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
6732 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
6733 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6734 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
6735 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
6736 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
6737 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
6738 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
6739 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
6740 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
6741 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
6742 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
6743 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
6744 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
6745 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
6746 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
6747 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
6748 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
6749 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
6751 2003-02-04 Ulrich Drepper <drepper@redhat.com>
6753 * atomic.h: Add a couple more default implementations.
6754 (atomic_compare_and_exchange_acq): Use
6755 __arch_compare_and_exchange_32_acq in return value definition. It
6757 (atomic_bit_set): Renamed from atomic_set_bit.
6758 Add missing atomic_ prefixes.
6760 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
6761 thread library is available, use correct value to mark initialized
6764 2003-02-03 Ulrich Drepper <drepper@redhat.com>
6766 * allocatestack.c (allocate_stack): Use __getpagesize instead of
6767 __sysconf to determine pagesize.
6769 * pthread_create.c: Include <atomic.h>.
6770 * allocatestack.c (allocate_stack): Implement coloring of the
6771 allocated stack memory. Rename pagesize to pagesize_m1. It's the
6772 size minus one. Adjust users.
6773 * sysdeps/i386/i686/Makefile: New file.
6775 2003-02-02 Ulrich Drepper <drepper@redhat.com>
6777 * allocatestack.c: Improve comment throughout the file.
6779 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6780 (__lll_lock_wait): Add branch prediction.
6781 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
6782 (__lll_lock_wait): Likewise.
6783 (lll_unlock_wake_cb): Removed.
6785 2003-01-31 Ulrich Drepper <drepper@redhat.com>
6787 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
6788 _POSIX_THREAD_PRIORITY_SCHEDULING.
6790 2003-01-30 Jakub Jelinek <jakub@redhat.com>
6792 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6793 Fix return type of ptr___pthread_getspecific.
6795 2003-01-29 Ulrich Drepper <drepper@redhat.com>
6797 * Makefile (tests): Add tst-umask1.
6798 (tst-umask1-ARGS): Define.
6799 * tst-umask1.c: New file.
6801 2003-01-28 Ulrich Drepper <drepper@redhat.com>
6803 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
6804 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
6805 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
6806 pthread_rwlock_unlock.
6807 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
6808 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
6809 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
6810 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
6811 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6813 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
6814 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6816 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
6817 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
6818 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
6820 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
6821 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
6823 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
6824 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
6825 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
6827 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
6828 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
6830 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
6832 * Makefile (libpthread-routines): Remove lowlevelcond and
6833 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
6834 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
6835 and pthread_cond_broadcast.
6836 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
6837 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
6838 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
6839 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
6840 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
6841 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
6842 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
6843 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
6844 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
6845 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
6846 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
6847 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
6848 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
6849 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
6850 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
6851 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
6852 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
6853 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
6854 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
6855 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
6856 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
6857 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
6858 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
6859 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
6860 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
6861 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
6862 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
6863 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
6864 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
6865 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
6866 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
6868 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
6869 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
6870 of the code is moved to ...
6871 * sysdeps/pthread/createthread.c: ...here. New file.
6873 2003-01-27 Ulrich Drepper <drepper@redhat.com>
6875 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
6876 (__new_sem_post): Clear %eax before returning.
6877 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
6879 * Makefile (tests): Add tst-cleanup2.
6880 * tst-cleanup2.c: New file.
6882 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6883 Interpret first parameter correctly.
6885 2003-01-17 Ulrich Drepper <drepper@redhat.com>
6887 * Makefile (headers): Add bits/semaphore.h.
6889 2003-01-16 Jakub Jelinek <jakub@redhat.com>
6891 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
6894 2003-01-14 Ulrich Drepper <drepper@redhat.com>
6896 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
6897 must be used and mapping failed.
6898 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
6900 * Makefile (CFLAGS-pthread_self.os): Define this, not
6901 CFLAGS-pthread_self.c.
6903 2003-01-13 Ulrich Drepper <drepper@redhat.com>
6905 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
6908 * Makefile (libpthread-routines): Add version. Add rules to build
6909 version.os and banner.h.
6910 * version.c: New file.
6912 2003-01-13 Jakub Jelinek <jakub@redhat.com>
6914 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
6915 the alias unconditional.
6916 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
6918 2003-01-13 Ulrich Drepper <drepper@redhat.com>
6920 * Makefile (CFLAGS-pthread_self.c): New definition.
6922 2003-01-06 Jakub Jelinek <jakub@redhat.com>
6924 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
6925 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
6926 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
6927 * init.c (__pthread_initialize_minimal_internal): Likewise.
6929 2003-01-07 Jakub Jelinek <jakub@redhat.com>
6931 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
6933 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6934 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6935 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6936 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6937 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
6938 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
6940 2003-01-06 Jakub Jelinek <jakub@redhat.com>
6942 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
6943 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
6944 * tst-cancel-wrappers.sh: Remove all exceptions.
6946 2003-01-05 Ulrich Drepper <drepper@redhat.com>
6948 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
6949 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
6951 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
6952 Use __libc_pthread_functions array if SHARED.
6954 * pthreadP.h: Move pthread_cond_2_0_t definition to...
6955 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
6957 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
6958 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
6959 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
6960 __libc_ptf_call instead of __libc_maybe_call.
6962 (__libc_cleanup_region_start): Wrap function name with PTF call.
6963 (__libc_cleanup_region_end): Likewise.
6964 (__libc_cleanup_end): Likewise.
6966 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
6967 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
6968 * pthread_key_create.c: Add __pthread_key_create_internal alias.
6969 * pthreadP.h: Add prototypes.
6971 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
6972 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
6973 __pthread_rwlock_unlock aliases.
6974 * pthreadP.h: Add prototypes for new aliases.
6976 * pthreadP.h (struct pthead_functions): Moved to...
6977 * sysdeps/pthread/pthread-functions.h: ...here. New file.
6978 * init.c (pthread_functions): Add initializers for new elements.
6980 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
6981 __pthread_cleanup_pop_restore aliases.
6982 * pthreadP.h: Add prototypes.
6984 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
6985 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
6986 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
6987 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
6988 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6989 * pthreadP.h: Adjust prototypes and callers.
6991 2003-01-04 Ulrich Drepper <drepper@redhat.com>
6993 * Makefile (tests): Add tst-cancel7.
6994 (tst-cancel7-ARGS): New variable.
6995 * tst-cancel7.c: New file.
6997 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
6998 around gcc defficiencies.
6999 * old_pthread_cond_signal.c: Likewise.
7000 * old_pthread_cond_timedwait.c: Likewise.
7001 * old_pthread_cond_wait.c: Likewise.
7003 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
7005 2003-01-03 Ulrich Drepper <drepper@redhat.com>
7007 * Makefile (tests): Add tst-cond7.
7008 * tst-cond7.c: New file.
7010 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7011 (condvar_cleanup): Get condvar address from the right place.
7013 * atomic.h: Correct definitions of atomic_full_barrier,
7014 atomic_read_barrier, atomic_write_barrier.
7016 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
7018 * old_pthread_cond_signal.c: Likewise.
7019 * old_pthread_cond_timedwait.c: Likewise.
7020 * old_pthread_cond_wait.c: Likewise.
7022 2003-01-03 Jakub Jelinek <jakub@redhat.com>
7024 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
7026 2003-01-03 Ulrich Drepper <drepper@redhat.com>
7028 * pthreadP.h (pthread_cond_2_0_t): New type.
7029 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
7030 Use new type for the 2.0 condvar function prototypes.
7031 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
7032 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
7034 * old_pthread_cond_destroy.c: Likewise.
7035 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
7036 * old_pthread_cond_signal.c: Likewise.
7037 * old_pthread_cond_timedwait.c: Likewise.
7038 * old_pthread_cond_wait.c: Likewise.
7040 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
7041 (__pthread_cond_wait): Don't save cancellation mode and seq value
7044 * herrno.c (__h_errno_location): Don't define as weak.
7046 2003-01-02 Jakub Jelinek <jakub@redhat.com>
7048 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
7049 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
7050 and pthread_cond_wait.
7051 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
7053 (__pthread_cond_broadcast_2_0): ... this.
7054 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
7056 (__pthread_cond_destroy_2_0): ... this.
7057 * old_pthread_cond_init.c (__old_pthread_cond_init):
7059 (__pthread_cond_init_2_0): ... this.
7060 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
7062 (__pthread_cond_signal_2_0): ... this.
7063 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
7065 (__pthread_cond_wait_2_0): ... this.
7066 * pthread_cond_destroy.c: Include shlib-compat.h.
7067 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
7068 * pthread_cond_init.c: Include shlib-compat.h.
7069 (pthread_cond_init): Change strong_alias into versioned_symbol.
7070 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
7071 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
7073 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
7074 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
7075 __pthread_cond_wait_2_0): New prototypes.
7076 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
7077 __old_pthread_cond_init, __old_pthread_cond_signal,
7078 __old_pthread_cond_wait): Removed.
7079 * init.c: Include shlib-compat.h.
7080 (pthread_functions): Guard ptr___pthread_attr_init_2_0
7081 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
7082 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
7083 ptr___pthread_cond_*_2_0 fields.
7084 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
7085 pthread_cond_*@GLIBC_2.0 compatibility symbols.
7087 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
7088 LIBC_SIGACTION was not yet defined.
7089 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
7090 [!defined LIBC_SIGACTION] (__sigaction): New function and
7092 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
7093 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
7095 2003-01-02 Jakub Jelinek <jakub@redhat.com>
7097 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
7099 2003-01-02 Ulrich Drepper <drepper@redhat.com>
7101 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7102 New, larger type definition.
7103 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
7105 * Versions [libpthread]: Add definitions for new pthread_cond_*
7106 interfaces for version GLIBC_2.3.2.
7107 * pthread_cond_init.c: Update initialization for new type definition.
7108 * Makefile (libpthread-routines): Remove pthread_cond_wait,
7109 pthread_cond_timedwait, pthread_cond_signal, and
7110 pthread_cond_broadcast. Add old_pthread_cond_init,
7111 old_pthread_cond_destroy, old_pthread_cond_wait,
7112 old_pthread_cond_timedwait, old_pthread_cond_signal, and
7113 old_pthread_cond_broadcast.
7114 * old_pthread_cond_broadcast.c: New file.
7115 * old_pthread_cond_destroy.c: New file.
7116 * old_pthread_cond_init.c: New file.
7117 * old_pthread_cond_signal.c: New file.
7118 * old_pthread_cond_timedwait.c: New file.
7119 * old_pthread_cond_wait.c: New file.
7120 * pthreadP.h: Add prototypes for the compatibility interfaces.
7122 * pthread_cond_destroy.c: Don't include <errno.h>.
7124 2003-01-01 Ulrich Drepper <drepper@redhat.com>
7126 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
7127 unnecessary zero offset when addressing MUTEX.
7129 2002-12-31 Ulrich Drepper <drepper@redhat.com>
7131 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7133 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
7134 for __register_atfork.
7136 2002-12-31 Jakub Jelinek <jakub@redhat.com>
7138 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
7139 instead of ASSEMBLER test macro.
7141 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
7142 __libc_current_sigrtmax): Add libc_hidden_def.
7144 * sysdeps/pthread/list.h: Remove assert.h include.
7146 2002-12-31 Ulrich Drepper <drepper@redhat.com>
7148 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
7149 __pthread_initialize_minimal_internal not
7150 __pthread_initialize_minimal.
7152 2002-12-30 Ulrich Drepper <drepper@redhat.com>
7154 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
7155 __pthread_initialize_minimal as hidden.
7157 * init.c (__pthread_initialize_minimal_internal): Don't mark as
7160 2002-12-31 Jakub Jelinek <jakub@redhat.com>
7162 * Makefile ($(inst_libdir)/libpthread.so): Depend on
7163 $(common-objpfx)format.lds, include that into the output script.
7165 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
7167 2002-12-28 Andreas Jaeger <aj@suse.de>
7169 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
7170 nsec resolution changes.
7171 (xstat64_conv): Likewise.
7172 (xstat32_conv): Likewise.
7173 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
7175 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
7176 structs stat and stat64.
7177 * time/time.h (__timespec_defined): Define for __USE_MISC.
7178 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
7180 2002-12-30 Jakub Jelinek <jakub@redhat.com>
7182 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
7184 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
7185 (pthread_exit): Use strong_alias to avoid warnings.
7186 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
7187 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
7188 ptr___pthread_attr_init_2_*.
7189 * init.c (pthread_functions): Adjust.
7191 2002-12-29 Ulrich Drepper <drepper@redhat.com>
7193 * forward.c: Make all functions available by default again. It
7194 caused too much trouble.
7196 * pt-siglongjmp.c: Removed.
7198 2002-12-28 Jakub Jelinek <jakub@redhat.com>
7200 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
7201 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
7202 * sysdeps/i386/Makefile: New file.
7203 * sysdeps/i386/tcb-offsets.sym: New file.
7204 * sysdeps/pthread/tcb-offsets.h: New file.
7205 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7206 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
7208 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
7209 __register_atfork...
7210 (GLIBC_2.3.2): ...here.
7212 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7214 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
7215 pthread_attr_setstackaddr with __attribute_deprecated__.
7217 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7219 * pt-system.c (system): Remove cancellation handling.
7220 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
7221 cancellation routines.
7223 2002-12-28 Ulrich Drepper <drepper@redhat.com>
7225 * descr.h: Include <dl-sysdep.h>.
7226 (struct pthread): Move header.data.list to the back of the struct.
7227 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
7228 (MULTIPLE_THREADS_OFFSET): Adjust offset.
7229 (SYSINFO_OFFSEET): Likewise.
7231 2002-12-27 Jakub Jelinek <jakub@redhat.com>
7233 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
7235 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
7236 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
7237 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
7238 (USE_DL_SYSINFO): Undef.
7240 2002-12-22 Jakub Jelinek <jakub@redhat.com>
7242 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
7243 $(common-objpfx)libc.so.
7244 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
7245 it is bigger than pipe buffer size even on arches with bigger
7247 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
7249 2002-12-25 Ulrich Drepper <drepper@redhat.com>
7251 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
7252 correct errno access for case that USE___THREAD is not defined.
7254 2002-12-24 Ulrich Drepper <drepper@redhat.com>
7256 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
7257 Patch by Marijn Ros <marijn@mad.scientist.com>.
7259 2002-12-22 Roland McGrath <roland@redhat.com>
7261 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
7263 2002-12-20 Ulrich Drepper <drepper@redhat.com>
7265 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
7267 2002-12-19 Ulrich Drepper <drepper@redhat.com>
7269 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
7270 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
7271 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
7273 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
7275 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7276 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
7277 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
7278 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7279 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7280 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
7281 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
7282 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7284 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
7286 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7288 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
7290 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
7292 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
7293 that sysinfo is properly initialized.
7294 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
7295 to 1 only for ld.so.
7297 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
7298 RTLD_CORRECT_DYNAMIC_WEAK.
7300 2002-12-19 Jakub Jelinek <jakub@redhat.com>
7302 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
7303 Use return 0 as 6th argument to FORWARD4.
7304 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
7306 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7308 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
7309 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
7310 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
7311 (INIT_SYSINFO): New #define.
7312 (TLS_TP_INIT): Use INIT_SYSINFO.
7313 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7314 At test to make sure SYSINFO_OFFSET value is correct.
7315 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
7317 2002-12-18 Jakub Jelinek <jakub@redhat.com>
7319 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
7320 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
7321 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
7322 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
7323 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
7324 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
7325 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
7327 2002-12-18 Ulrich Drepper <drepper@redhat.com>
7329 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
7330 macro instead of using int $0x80 directly.
7332 * sysdeps/pthread/bits/stdio-lock.h: New file.
7333 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
7334 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
7335 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
7336 * Makefile (routines): Add libc-lowlevelmutex.
7338 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
7339 __i686.get_pc_thunk.dx.
7341 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7343 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
7344 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
7345 ($(objpfx)tst-cancel-wrappers.out): New rule.
7346 * tst-cancel-wrappers.sh: New test.
7347 * tst-locale1.c: Include signal.h.
7348 (uselocale): Test static linking of __libc_current_sigrt*.
7350 2002-12-17 Ulrich Drepper <drepper@redhat.com>
7352 * Makefile (tests): Add tst-cancel6.
7353 * tst-cancel6.c: New file
7355 2002-12-17 Jakub Jelinek <jakub@redhat.com>
7357 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
7358 Define meaningfully for assembler as well.
7359 * pthreadP.h (struct pthread_functions): Remove
7360 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
7361 and ptr_pthread_attr_init_2_1 fields.
7362 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
7363 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
7364 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
7365 (FORWARD3): Define using FORWARD4.
7366 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
7368 * pt-system.c: Remove duplicate stdlib.h include.
7370 2002-12-16 Ulrich Drepper <drepper@redhat.com>
7372 * sem_init.c: Define sem_init@GLIBC_2.0.
7373 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
7374 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
7376 * flockfile.c: Moved to...
7377 * sysdeps/pthread/flockfile.c: ...here. New file.
7378 * funlockfile.c: Moved to...
7379 * sysdeps/pthread/funlockfile.c: ...here. New file.
7380 * ftrylockfile.c: Moved to...
7381 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
7383 2002-12-16 Jakub Jelinek <jakub@redhat.com>
7385 * libc-cancellation.c: Guard both function with
7386 #if !defined NOT_IN_libc.
7387 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
7388 automatically provided pthread wrappers.
7389 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
7390 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
7392 * pt-open.c: Removed.
7393 * pt-fcntl.c: Removed.
7394 * pt-fsync.c: Removed.
7395 * pt-lseek.c: Removed.
7396 * pt-msgrcv.c: Removed.
7397 * pt-msgsnd.c: Removed.
7398 * pt-msync.c: Removed.
7399 * pt-nanosleep.c: Removed.
7400 * pt-open64.c: Removed.
7401 * pt-pause.c: Removed.
7402 * pt-pread.c: Removed.
7403 * pt-pread64.c: Removed.
7404 * pt-pwrite.c: Removed.
7405 * pt-pwrite64.c: Removed.
7406 * pt-read.c: Removed.
7407 * pt-recv.c: Removed.
7408 * pt-recvfrom.c: Removed.
7409 * pt-recvmsg.c: Removed.
7410 * pt-send.c: Removed.
7411 * pt-sendto.c: Removed.
7412 * pt-sigtimedwait.c: Removed.
7413 * pt-sigwait.c: Removed.
7414 * pt-wait.c: Removed.
7415 * pt-waitpid.c: Removed.
7416 * pt-write.c: Removed.
7417 * pt-accept.c: Removed.
7418 * pt-close.c: Removed.
7419 * pt-connect.c: Removed.
7420 * pt-lseek64.c: Removed.
7421 * pt-sendmsg.c: Removed.
7422 * pt-tcdrain.c: Removed.
7424 2002-12-15 Ulrich Drepper <drepper@redhat.com>
7426 * init.c (__pthread_initialize_minimal_internal): Renamed from
7427 __pthread_initialize_minimal. Make old name an alias. This
7428 converts a normal relocation into a relative relocation.
7430 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
7432 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
7433 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
7434 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
7435 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
7436 pt-sigwaitinfo, pt-waitid, and pt-writev.
7437 * pt-creat.c: Removed.
7438 * pt-poll.c: Removed.
7439 * pt-pselect.c: Removed.
7440 * pt-readv.c: Removed.
7441 * pt-select.c: Removed.
7442 * pt-sigpause.c: Removed.
7443 * pt-sigsuspend.c: Removed.
7444 * pt-sigwaitinfo.c: Removed.
7445 * pt-waitid.c: Removed.
7446 * pt-writev.c: Removed.
7448 * init.c (pthread_functions): New variable.
7449 (__pthread_initialize_minimal): Pass pointer to pthread_functions
7450 (or NULL) to __libc_pthread_init.
7451 * forward.c: Rewrite to use __libc:pthread_functions array to get
7453 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
7455 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
7456 Take new parameter. Copy content of variable pointed to by it
7457 to __libc_pthread_init.
7459 * pthreadP.h (struct pthread_functions): New type.
7460 (__libc_pthread_init): Declare.
7462 * pthread_attr_destroy.c: Add namespace protected alias.
7463 * pthread_attr_getdetachstate.c: Likewise.
7464 * pthread_attr_getinheritsched.c: Likewise.
7465 * pthread_attr_getschedparam.c: Likewise.
7466 * pthread_attr_getschedpolicy.c: Likewise.
7467 * pthread_attr_getscope.c: Likewise.
7468 * pthread_attr_setdetachstate.c: Likewise.
7469 * pthread_attr_setinheritsched.c: Likewise.
7470 * pthread_attr_setschedparam.c: Likewise.
7471 * pthread_attr_setschedpolicy.c: Likewise.
7472 * pthread_attr_setscope.c: Likewise.
7473 * pthread_cond_broadcast.c: Likewise.
7474 * pthread_cond_destroy.c: Likewise.
7475 * pthread_cond_init.c: Likewise.
7476 * pthread_cond_signal.c: Likewise.
7477 * pthread_cond_wait.c: Likewise.
7478 * pthread_condattr_destroy.c: Likewise.
7479 * pthread_condattr_init.c: Likewise.
7480 * pthread_equal.c: Likewise.
7481 * pthread_exit.c: Likewise.
7482 * pthread_getschedparam.c: Likewise.
7483 * pthread_self.c: Likewise.
7484 * pthread_setcancelstate.c: Likewise.
7485 * pthread_setschedparam.c: Likewise.
7486 * pthread_mutex_destroy.c: Likewise.
7487 * pthread_mutex_init.c: Likewise.
7488 * pthreadP.h: Add prototypes for the aliases.
7490 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
7491 multiple_threads member in correct TCB to 1.
7493 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
7494 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
7495 member of thread decriptor, otherwise return unconditionally 1.
7497 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7499 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
7500 regular Linux version. Remove file.
7501 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
7502 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
7503 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
7504 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
7505 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
7506 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
7507 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
7508 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
7509 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
7510 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
7511 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
7512 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
7513 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
7514 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
7515 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
7516 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
7517 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
7518 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
7519 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
7520 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
7521 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
7522 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
7523 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
7524 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
7525 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
7526 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
7527 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
7528 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
7529 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
7530 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
7532 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7534 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
7535 * sysdeps/unix/sysv/linux/open.c: Removed.
7536 * sysdeps/unix/sysv/linux/fsync.c: Removed.
7537 * sysdeps/unix/sysv/linux/lseek.c: Removed.
7538 * sysdeps/unix/sysv/linux/msync.c: Removed.
7539 * sysdeps/unix/sysv/linux/read.c: Removed.
7540 * sysdeps/unix/sysv/linux/close.c: Removed.
7541 * sysdeps/unix/sysv/linux/creat.c: Removed.
7542 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
7543 * sysdeps/unix/sysv/linux/pause.c: Removed.
7544 * sysdeps/unix/sysv/linux/select.c: Removed.
7545 * sysdeps/unix/sysv/linux/write.c: Removed.
7547 2002-12-14 Ulrich Drepper <drepper@redhat.com>
7549 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
7550 element in TCB to see whether locking is needed.
7552 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
7553 MULTIPLE_THREADS_OFFSET value is correct.
7555 * sysdeps/unix/sysv/linux/close.c: New file.
7556 * sysdeps/unix/sysv/linux/connect.S: New file.
7557 * sysdeps/unix/sysv/linux/creat.c: New file.
7558 * sysdeps/unix/sysv/linux/fsync.c: New file.
7559 * sysdeps/unix/sysv/linux/llseek.c: New file.
7560 * sysdeps/unix/sysv/linux/lseek.c: New file.
7561 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
7562 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
7563 * sysdeps/unix/sysv/linux/msync.c: New file.
7564 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
7565 * sysdeps/unix/sysv/linux/open.c: New file.
7566 * sysdeps/unix/sysv/linux/open64.c: New file.
7567 * sysdeps/unix/sysv/linux/pause.c: New file.
7568 * sysdeps/unix/sysv/linux/poll.c: New file.
7569 * sysdeps/unix/sysv/linux/pread.c: New file.
7570 * sysdeps/unix/sysv/linux/pread64.c: New file.
7571 * sysdeps/unix/sysv/linux/pselect.c: New file.
7572 * sysdeps/unix/sysv/linux/pwrite.c: New file.
7573 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
7574 * sysdeps/unix/sysv/linux/readv.c: New file.
7575 * sysdeps/unix/sysv/linux/recv.S: New file.
7576 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
7577 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
7578 * sysdeps/unix/sysv/linux/select.c: New file.
7579 * sysdeps/unix/sysv/linux/send.S: New file.
7580 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
7581 * sysdeps/unix/sysv/linux/sendto.S: New file.
7582 * sysdeps/unix/sysv/linux/sigpause.c: New file.
7583 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
7584 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7585 * sysdeps/unix/sysv/linux/sigwait.c: New file.
7586 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7587 * sysdeps/unix/sysv/linux/system.c: New file.
7588 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
7589 * sysdeps/unix/sysv/linux/wait.c: New file.
7590 * sysdeps/unix/sysv/linux/waitid.c: New file.
7591 * sysdeps/unix/sysv/linux/waitpid.c: New file.
7592 * sysdeps/unix/sysv/linux/writev.c: New file.
7593 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
7595 * pt-readv.c: Fix comment.
7597 2002-12-14 Jakub Jelinek <jakub@redhat.com>
7599 * tst-cleanup1.c: Include stdlib.h.
7601 * tst-cancel5.c: New test.
7602 * Makefile (tests): Add tst-cancel5.
7603 (tst-cancel5): Link against libc.so libpthread.so in that order.
7605 2002-12-13 Ulrich Drepper <drepper@redhat.com>
7607 * forward.c (test_loaded): Prevent recursive calls.
7609 * Makefile (routines): Add libc-cancellation.
7610 * libc-cancellation.c: New file.
7611 * descr.h (struct pthread): Add multiple_threads field.
7612 * allocatestack.c (allocate_stack): Initialize multiple_header field of
7613 new thread descriptor to 1.
7614 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
7615 Initialize multiple_thread field after successful thread creation.
7616 * cancellation.c (__do_cancel): Move to pthreadP.h.
7617 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
7618 (__pthread_disable_asynccancel): Add internal_function attribute.
7619 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
7620 * pthread_setcancelstate.c: Likewise.
7621 * pthread_setcanceltype.c: Likewise.
7622 * pthread_exit.c: Likewise.
7623 * pthreadP.h (CANCELLATION_P): Likewise.
7624 (__do_cancel): Define as static inline.
7625 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
7626 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
7628 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
7629 fields. Define MULTIPLE_THREADS_OFFSET.
7630 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
7632 * sysdeps/unix/sysv/linux/accept.S: New file.
7633 * sysdeps/unix/sysv/linux/read.c: New file.
7634 * sysdeps/unix/sysv/linux/write.c: New file.
7635 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
7636 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
7637 initialization of __libc_locking_needed.
7638 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
7639 __libc_locking_needed, use multiple_threads field in TCB.
7640 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7642 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7644 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
7646 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
7648 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
7649 access to __libc_locking_needed for PIC.
7651 2002-12-12 Jakub Jelinek <jakub@redhat.com>
7653 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
7654 declare for libc.so.
7655 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
7657 (__libc_lock_lock): Put into statement expression.
7658 (__libc_lock_unlock): Remove trailing semicolon.
7659 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
7661 2002-12-12 Roland McGrath <roland@redhat.com>
7663 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
7664 "m" constraint to refer to __libc_locking_needed. Declare it here.
7666 2002-12-12 Ulrich Drepper <drepper@redhat.com>
7668 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
7669 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
7670 Initialize __libc_locking_needed.
7671 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
7672 instead of __register_pthread_fork_handler.
7673 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
7674 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
7675 fork-gen with libc_pthread_init.
7676 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
7677 of __register_pthread_fork_handler.
7678 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
7679 of __register_pthread_fork_handler.
7680 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
7681 __libc_locking_needed to determine whether lock prefix can be avoided.
7682 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
7684 2002-12-11 Ulrich Drepper <drepper@redhat.com>
7686 * Makefile (tests): Add tst-cleanup1.
7687 * tst-cleanup1.c: New file.
7688 * cancellation.c (__cleanup_thread): Removed.
7689 (__do_cancel): Remove call to __cleanup_thread.
7690 * pthreadP.h: Remove __cleanup_thread prorotype.
7692 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
7693 Remember function and argument even if cancellation handler
7694 function is not available.
7695 (__libc_cleanup_region_end): Execute registered function directly if
7696 pthread functions are not available.
7697 (__libc_cleanup_end): Likewise.
7699 * init.c (__pthread_initialize_minimal): Fix initialization in
7700 static lib by preventing gcc from being too clever.
7702 2002-12-10 Ulrich Drepper <drepper@redhat.com>
7704 * init.c (__pthread_initialize_minimal): Remove unneccesary
7707 * Makefile (tests): We can run tst-locale2 now.
7709 2002-12-09 Ulrich Drepper <drepper@redhat.com>
7711 * Versions: Remove duplicated sigwait entry.
7713 2002-12-08 Ulrich Drepper <drepper@redhat.com>
7715 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
7718 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
7720 * pthreadP.h: Declare __pthread_enable_asynccancel and
7721 __pthread_disable_asynccancel.
7722 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
7723 (CANCEL_RESET): Use __pthread_disable_asynccancel.
7724 * cancellation.c (__pthread_enable_asynccancel): New function.
7725 (__pthread_disable_asynccancel): New function.
7726 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
7727 * pt-close.c: Likewise.
7728 * pt-connect.c: Likewise.
7729 * pt-creat.c: Likewise.
7730 * pt-fcntl.c: Likewise.
7731 * pt-fsync.c: Likewise.
7732 * pt-lseek.c: Likewise.
7733 * pt-lseek64.c: Likewise.
7734 * pt-msgrcv.c: Likewise.
7735 * pt-msgsnd.c: Likewise.
7736 * pt-msync.c: Likewise.
7737 * pt-nanosleep.c: Likewise.
7738 * pt-open.c: Likewise.
7739 * pt-open64.c: Likewise.
7740 * pt-pause.c: Likewise.
7741 * pt-poll.c: Likewise.
7742 * pt-pread.c: Likewise.
7743 * pt-pread64.c: Likewise.
7744 * pt-pselect.c: Likewise.
7745 * pt-pwrite.c: Likewise.
7746 * pt-pwrite64.c: Likewise.
7747 * pt-read.c: Likewise.
7748 * pt-readv.c: Likewise.
7749 * pt-recv.c: Likewise.
7750 * pt-recvfrom.c: Likewise.
7751 * pt-recvmsg.c: Likewise.
7752 * pt-select.c: Likewise.
7753 * pt-send.c: Likewise.
7754 * pt-sendmsg.c: Likewise.
7755 * pt-sendto.c: Likewise.
7756 * pt-sigpause.c: Likewise.
7757 * pt-sigsuspend.c: Likewise.
7758 * pt-sigtimedwait.c: Likewise.
7759 * pt-sigwait.c: Likewise.
7760 * pt-sigwaitinfo.c: Likewise.
7761 * pt-system.c: Likewise.
7762 * pt-tcdrain.c: Likewise.
7763 * pt-wait.c: Likewise.
7764 * pt-waitid.c: Likewise.
7765 * pt-waitpid.c: Likewise.
7766 * pt-write.c: Likewise.
7767 * pt-writev.c: Likewise.
7768 * pthread_join.c: Likewise.
7769 * pthread_timedjoin.c: Likewise.
7771 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
7772 (__xpg_sigpause): New function.
7773 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
7775 2002-12-07 Ulrich Drepper <drepper@redhat.com>
7777 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
7779 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
7780 _GI_pthread_cleanup_pop to pthreadP.h.
7782 * ftrylockfile.c: Use _IO_lock_trylock instead of
7783 pthread_mutex_trylock.
7785 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
7786 (CANCEL_RESET): Likewise.
7787 (__pthread_setcanceltype_): Declare.
7788 (__pthread_mutex_lock_internal): Declare.
7789 (__pthread_mutex_unlock_internal): Declare.
7790 (__pthread_once_internal): Declare.
7791 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
7792 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
7794 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
7795 and pthread_mutex_unlock.
7796 * pthread_cond_wait.c: Likewise.
7797 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
7798 * pthread_mutex_unlock.c: Likewise.
7800 * pthread_setcanceltype.c: Add additional alias
7801 __pthread_setcanceltype.
7803 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
7804 * sem_open.c (sem_open): Likewise.
7805 Use __libc_open, __libc_write, and __libc_close instead of
7806 open, write, and close respectively.
7808 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
7809 Rewrite as statement expression since it must return a value.
7811 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
7812 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
7815 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
7816 alias __pthread_once_internal.
7818 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
7820 2002-12-06 Ulrich Drepper <drepper@redhat.com>
7822 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
7823 * tst-stdio1.c: New file.
7824 * tst-stdio2.c: New file.
7826 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
7828 * Makefile (tests): Comment out tst-locale2 for now.
7829 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
7831 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
7833 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
7834 Use _IO_lock_init instead of explicit assignment.
7836 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
7837 Define __libc_lock_* and __libc_lock_recursive macros with
7838 lowlevellock macros, not pthread mutexes.
7840 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
7841 of pthread_mutex_lock.
7842 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
7843 instead of pthread_mutex_unlock.
7845 2002-12-06 Roland McGrath <roland@redhat.com>
7847 * allocatestack.c (__stack_user): Use uninitialized defn.
7848 * init.c (__pthread_initialize_minimal): Initialize it here.
7850 2002-12-05 Roland McGrath <roland@redhat.com>
7852 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
7854 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
7856 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
7859 2002-12-05 Ulrich Drepper <drepper@redhat.com>
7861 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
7863 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
7864 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
7865 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
7866 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
7867 for __libc_lock_* macros.
7868 * Makefile (routines): Add libc-lowlevellock.
7870 2002-10-09 Roland McGrath <roland@redhat.com>
7872 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
7873 Under [__PIC__], call the function via the pointer fetched for
7874 comparison rather than a call by name that uses the PLT.
7875 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
7876 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
7877 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
7878 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
7879 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
7881 2002-12-04 Roland McGrath <roland@redhat.com>
7883 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
7885 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
7886 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
7888 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
7890 2002-12-04 Ulrich Drepper <drepper@redhat.com>
7892 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
7893 a completely opaque, non-integer type.
7894 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7896 2002-12-05 Jakub Jelinek <jakub@redhat.com>
7898 * sysdeps/i386/tls.h: Include stdlib.h.
7899 * sysdeps/x86_64/tls.h: Likewise.
7901 2002-12-04 Ulrich Drepper <drepper@redhat.com>
7903 * Makefile (tests): Add tst-locale2.
7904 (tests-static): Likewise.
7905 * tst-locale2.c: New file.
7907 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
7908 volatile and add memory clobbers to lock operations.
7910 2002-12-03 Ulrich Drepper <drepper@redhat.com>
7912 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
7913 * sysdeps/i386/i486/bits/atomic.h: New file.
7914 * sysdeps/i386/i586/bits/atomic.h: New file.
7915 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
7916 include i486 version.
7917 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
7918 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
7919 Patch by Marijn Ros <marijn@mad.scientist.com>.
7921 * allocatestack.c (get_cached_stack): Don't crash if we first
7922 found a stack with a larger size then needed.
7923 Reported by Hui Huang <hui.huang@sun.com>.
7925 * Makefile (tests): Add tst-sysconf.
7926 * tst-sysconf.c: New file.
7928 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
7929 PTHREAD_THREADS_MAX.
7931 2002-12-02 Roland McGrath <roland@redhat.com>
7933 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
7934 Declare using hidden_proto instead of attribute_hidden, so there are
7935 non-.hidden static symbols for gdb to find.
7936 (__pthread_keys): Likewise.
7937 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
7938 * allocatestack.c (__stack_user): Likewise.
7939 * pthread_create.c (__pthread_keys): Likewise.
7940 (__nptl_threads_events, __nptl_last_event): Make these static instead
7942 * pthread_key_create.c (__pthread_pthread_keys_max,
7943 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
7945 2002-12-02 Ulrich Drepper <drepper@redhat.com>
7947 * Makefile (tests): Add tst-locale1. If buid-static is yes link
7949 * tst-locale1.c: New file.
7951 * pthread_cond_timedwait.c: Include <stdlib.h>.
7953 * Makefile (tests): Add tst-fork2 and tst-fork3.
7954 * tst-fork2.c: New file.
7955 * tst-fork3.c: New file.
7957 2002-11-28 Ulrich Drepper <drepper@redhat.com>
7959 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
7961 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
7962 require it to 200112L.
7964 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
7965 instruction only if HAVE_CMOV is defined.
7966 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
7968 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
7970 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
7972 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
7974 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
7976 2002-11-27 Ulrich Drepper <drepper@redhat.com>
7978 * sysdeps/x86_64/bits/atomic.h: New file.
7980 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
7983 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
7984 possible since gettid cannot fail.
7986 * sysdeps/x86_64/pthreaddef.h: New file.
7988 * sysdeps/i386/pthreaddef.h (gettid): Removed.
7990 * sysdeps/x86_64/pthread_spin_init.c: New file.
7991 * sysdeps/x86_64/pthread_spin_lock.c: New file.
7992 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
7993 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
7995 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
7996 Add missing lock prefix. Minute optimization.
7998 * tst-spin2.c (main): Also check successful trylock call.
8000 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
8001 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
8003 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
8004 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
8006 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
8007 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
8008 value in case of an error. Add support for INTERNAL_SYSCALL.
8010 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
8011 value in case of an error.
8013 * sysdeps/x86_64/tls.h: New file.
8015 2002-11-26 Ulrich Drepper <drepper@redhat.com>
8017 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
8018 takes the array member name and the index as parameters.
8019 (THREAD_SETMEM_NC): Likewise.
8020 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
8021 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
8024 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
8025 to decide which code to use.
8026 (THREAD_SETMEM_NC): Likewise.
8028 * allocatestack.c (queue_stack): Don't remove stack from list here.
8029 Do it in the caller. Correct condition to prematurely terminate
8030 loop to free stacks.
8031 (__deallocate_stack): Remove stack from list here.
8033 2002-11-26 Ulrich Drepper <drepper@redhat.com>
8035 * Makefile (tests): Add tst-stack1.
8036 * tst-stack1.c: New file.
8038 * allocatestack.c (allocate_stack): Initialize the TCB on a user
8041 * pthread_attr_getstack.c: Return bottom of the thread area.
8043 2002-11-25 Ulrich Drepper <drepper@redhat.com>
8045 * Makefile (libpthread-routines): Add pt-allocrtsig and
8046 pthread_kill_other_threads.
8047 * pt-allocrtsig.c: New file.
8048 * pthread_kill_other_threads.c: New file.
8049 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
8050 all three functions.
8051 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
8053 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
8054 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
8055 and __libc_allocate_rtsig_private.
8056 * Versions (libpthread): Export pthread_kill_other_threads_np,
8057 __libc_current_sigrtmin, and __libc_current_sigrtmax.
8059 2002-11-24 Ulrich Drepper <drepper@redhat.com>
8061 * allocatestack.c (allocate_stack): stackaddr in attribute points to
8062 the end of the stack. Adjust computations.
8063 When mprotect call fails dequeue stack and free it.
8064 * pthread_attr_setstack.c: Store top of the stack in stackaddr
8066 * pthread_getattr_np.c: Likewise.
8068 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
8071 2002-11-23 Ulrich Drepper <drepper@redhat.com>
8073 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
8074 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
8076 2002-11-22 Ulrich Drepper <drepper@redhat.com>
8078 * pthread_getspecific.c: Optimize access to first 2nd-level array.
8079 * pthread_setspecific.c: Likewise.
8081 2002-11-21 Ulrich Drepper <drepper@redhat.com>
8083 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
8084 definitions. Get them from the official place.
8085 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
8087 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
8088 Use new CLONE_ flags in clone() calls.
8090 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
8091 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
8093 * Versions: Add pthread_* functions for libc.
8094 * forward.c: New file.
8096 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
8098 * herrno.c: New file.
8101 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
8102 sem_trywait, and sem_timedwait. Add herrno and res.
8103 * sem_init.c: Don't initialize lock and waiters members.
8104 * sem_open.c: Likewise.
8105 * sem_post.c: Removed.
8106 * sem_wait.c: Removed.
8107 * sem_trywait.c: Removed.
8108 * sem_timedwait.c: Removed.
8109 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
8110 Includes full implementations of sem_post, sem_wait, sem_trywait,
8112 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
8113 for new implementation.
8114 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
8117 * tst-sem3.c: Improve error message.
8118 * tst-signal3.c: Likewise.
8120 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
8121 to tell the kernel about the termination futex and to initialize tid
8122 member. Don't initialize main_thread.
8123 * descr.h (struct pthread): Remove main_thread member.
8124 * cancelllation.c (__do_cancel): Remove code handling main thread.
8125 The main thread is not special anymore.
8127 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
8128 size of the stacks to stack_cache_actsize.
8130 * pt-readv.c: Add missing "defined".
8131 * pt-sigwait.c: Likewise.
8132 * pt-writev.c: Likewise.
8134 2002-11-09 Ulrich Drepper <drepper@redhat.com>
8136 * Versions: Export __connect from libpthread.
8137 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8139 * Makefile (libpthread-routines): Add pt-raise.
8140 * sysdeps/unix/sysv/linux/raise.c: New file.
8141 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
8142 * sysdeps/generic/pt-raise.c: New file.
8144 * pthread_cond_init.c: Initialize all data elements of the condvar
8145 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
8147 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
8148 * pthread_create.c: Likewise.
8150 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
8151 * tst-key1.c: New file.
8152 * tst-key2.c: New file.
8153 * tst-key3.c: New file.
8155 * Versions: Export pthread_detach for version GLIBC_2.0.
8156 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
8158 2002-11-08 Ulrich Drepper <drepper@redhat.com>
8160 * pthread_key_create.c: Terminate search after an unused key was found.
8161 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8163 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
8164 Patch by Luca Barbieri <ldb@ldb.ods.org>.
8166 2002-10-10 Ulrich Drepper <drepper@redhat.com>
8168 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
8169 dynamic lookup for errno in PIC.
8171 * allocatestack.c (get_cached_stack): Rearrange code slightly to
8172 release the stack lock as soon as possible.
8173 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
8174 the static TLS block.
8175 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
8177 * cancellation.c: Renamed from cancelation.c.
8178 * Makefile: Adjust accordingly.
8179 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
8180 * cleanup_defer.c: Use CANCELLATION_P.
8181 * pthread_testcancel.c: Likewise.
8182 * descr.h: Fix spelling in comments.
8184 * pthread_getattr_np.c: Likewise.
8185 * pthread_getschedparam.c: Likewise.
8186 * pthread_setschedparam.c: Likewise.
8187 * Versions: Likewise.
8189 * pt-pselect.c: New file.
8190 * Makefile (libpthread-routines): Add pt-pselect.
8191 * Versions: Add pselect.
8193 * tst-cancel4.c: New file.
8194 * Makefile (tests): Add tst-cancel4.
8196 2002-10-09 Ulrich Drepper <drepper@redhat.com>
8198 * pthread_mutex_lock.c: Always record lock ownership.
8199 * pthread_mutex_timedlock.c: Likewise.
8200 * pthread_mutex_trylock.c: Likewise.
8202 * pt-readv.c: New file.
8203 * pt-writev.c: New file.
8204 * pt-creat.c: New file.
8205 * pt-msgrcv.c: New file.
8206 * pt-msgsnd.c: New file.
8207 * pt-poll.c: New file.
8208 * pt-select.c: New file.
8209 * pt-sigpause.c: New file.
8210 * pt-sigsuspend.c: New file.
8211 * pt-sigwait.c: New file.
8212 * pt-sigwaitinfo.c: New file.
8213 * pt-waitid.c: New file.
8214 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
8215 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
8216 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
8217 * Versions: Add all the new functions.
8219 * tst-exit1.c: New file.
8220 * Makefile (tests): Add tst-exit1.
8222 * sem_timedwait.c: Minor optimization for more optimal fastpath.
8224 2002-10-08 Ulrich Drepper <drepper@redhat.com>
8226 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
8228 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
8229 call. pthread_join is an official cancellation point.
8230 * pthread_timedjoin.c: Likewise.
8232 * pthread_cond_wait.c: Revert order in which internal lock are dropped
8233 and the condvar's mutex are retrieved.
8234 * pthread_cond_timedwait.c: Likewise.
8235 Reported by dice@saros.East.Sun.COM.
8237 2002-10-07 Ulrich Drepper <drepper@redhat.com>
8239 * pthreadP.h: Cut out all type definitions and move them...
8240 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
8241 * pthreadP.h: Include <internaltypes.h>.
8243 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
8246 * sem_trywait.c: Shuffle #includes around to get right order.
8247 * sem_timedwait.c: Likewise.
8248 * sem_post.c: Likewise.
8249 * sem_wait.c: Likewise.
8251 * nptl 0.3 released.
8253 * Makefile (tests): Add tst-signal3.
8254 * tst-signal3.c: New file.
8256 2002-10-05 Ulrich Drepper <drepper@redhat.com>
8258 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
8259 the asms modify the sem object.
8260 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
8262 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
8264 * pthreadP.h (struct sem): New type. Actual semaphore type.
8265 * semaphoreP.h: Include pthreadP.h.
8266 * sem_getvalue.c: Adjust to sem_t change.
8267 * sem_init.c: Likewise.
8268 * sem_open.c: Likewise.
8269 * sem_post.c: Likewise.
8270 * sem_timedwait.c: Likewise.
8271 * sem_trywait.c: Likewise.
8272 * sem_wait.c: Likewise.
8274 2002-10-04 Ulrich Drepper <drepper@redhat.com>
8276 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
8277 * tst-basic2.c: New file.
8278 * tst-exec1.c: New file.
8279 * tst-exec2.c: New file.
8280 * tst-exec3.c: New file.
8282 * tst-fork1.c: Remove extra */.
8284 * nptl 0.2 released. The API for IA-32 is complete.