1 2007-11-03 Mike Frysinger <vapier@gentoo.org>
3 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
4 missing line continuations.
5 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
6 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
8 2007-10-28 Ulrich Drepper <drepper@redhat.com>
11 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
12 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
13 (struct timer): Add next element.
14 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
15 enqueue timer structure into __active_timer_sigev_thread list.
16 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
17 remove timer struct from __active_timer_sigev_thread.
18 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
19 Before using timer structure make sure it is still on the
20 __active_timer_sigev_thread list. Keep lock until done.
21 Define __active_timer_sigev_thread and
22 __active_timer_sigev_thread_lock.
24 2007-10-27 Ulrich Drepper <drepper@redhat.com>
26 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
27 Redefine thread_atfork for use of ATFORK_MEM.
28 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
29 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
31 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
32 Use atomic operation when removing first element of list.
34 2007-10-17 Jakub Jelinek <jakub@redhat.com>
36 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
37 routine instead of an alias to __new_sem_post.
39 2007-10-15 Jakub Jelinek <jakub@redhat.com>
41 * init.c (__pthread_initialize_minimal): Initialize word to appease
44 2007-10-10 Jakub Jelinek <jakub@redhat.com>
46 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
47 libc.so just clear NAME.
48 (__libc_rwlock_fini): Nop inside of libc.so.
49 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
52 2007-09-02 Ulrich Drepper <drepper@redhat.com>
54 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
55 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
57 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
59 2007-08-21 Ulrich Drepper <drepper@redhat.com>
62 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
63 reclaimed stack if necessary.
64 * Makefile (tests): Add tst-tsd6.
65 * tst-tsd6.c: New file.
67 2007-08-21 Jakub Jelinek <jakub@redhat.com>
69 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
72 2007-08-20 Ulrich Drepper <drepper@redhat.com>
74 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
75 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
77 2007-08-16 Jakub Jelinek <jakub@redhat.com>
79 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
80 (__lll_robust_timedlock): Pass private as last argument to
81 __lll_robust_timedlock_wait.
82 (__lll_unlock): Fix a pasto.
84 2007-08-15 Jakub Jelinek <jakub@redhat.com>
86 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
87 sparc_old_sem): New structs.
88 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
89 (__sem_wait_cleanup): New function.
90 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
91 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
92 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
94 (__old_sem_wait): New function.
95 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
96 nptl/sysdeps/unix/sysv/linux/sparc version.
97 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
99 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
100 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
101 (__new_sem_trywait): Use sparc_old_sem structure.
102 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
103 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
104 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
105 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
106 lll_futex_timed_wait.
107 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
108 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
109 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
111 (__old_sem_post): New function.
112 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
113 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
114 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
115 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
116 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
117 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
119 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
121 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
122 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
123 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
124 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
125 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
126 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
127 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
129 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
130 kernel-features.h and tcb-offsets.h.
131 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
132 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
134 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
136 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
137 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
139 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
140 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
141 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
142 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
143 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
144 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
145 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
147 2007-08-14 Jakub Jelinek <jakub@redhat.com>
149 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
150 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
151 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
152 lll_futex_timed_wait.
154 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
155 __lll_robust_unlock): Rewrite as macros instead of inline functions.
156 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
157 __lll_robust_unlock, __lll_wait_tid): Likewise.
159 2007-08-13 Jakub Jelinek <jakub@redhat.com>
161 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
163 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
164 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
165 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
166 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
167 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
168 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
169 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
170 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
172 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
173 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
174 process private. Switch DW_CFA_advance_loc1 and some
175 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
176 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
177 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
178 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
179 process private. Switch DW_CFA_advance_loc{1,2} and some
180 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
181 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
182 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
183 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
185 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
186 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
187 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
189 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
190 (__pthread_cond_broadcast): Compare %r8 instead of
191 dep_mutex-cond_*(%rdi) with $-1.
192 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
193 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
196 2007-08-13 Ulrich Drepper <drepper@redhat.com>
198 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
200 2007-08-13 Jakub Jelinek <jakub@redhat.com>
202 * allocatestack.c: Include kernel-features.h.
203 * pthread_create.c: Likewise.
204 * pthread_mutex_init.c: Likewise.
206 * pthread_cond_timedwait.c: Likewise.
207 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
208 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
209 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
210 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
211 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
212 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
213 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
215 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
217 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
218 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
219 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
220 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
222 2007-08-12 Jakub Jelinek <jakub@redhat.com>
224 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
225 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
226 byte elements. One of them is the new __shared element.
227 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
228 adjust names of other padding elements.
229 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
230 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
231 byte elements. One of them is the new __shared element.
232 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
233 adjust names of other padding elements.
234 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
235 Renamed __pad1 element to __shared, adjust names of other padding
237 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
238 (pthread_rwlock_t): Likewise.
239 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
242 2007-08-09 Anton Blanchard <anton@samba.org>
244 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
246 2007-08-12 Ulrich Drepper <drepper@redhat.com>
248 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
250 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
252 2007-08-11 Ulrich Drepper <drepper@redhat.com>
254 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
255 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
256 dealing with robust mutexes.
257 * pthread_mutex_timedlock.c: Likewise.
258 * pthread_mutex_trylock.c: Likewise.
259 * pthread_mutex_unlock.c: Likewise.
260 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
262 2007-08-06 Jakub Jelinek <jakub@redhat.com>
264 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
265 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
266 (PTHREAD_MUTEX_PSHARED): Define.
267 * pthread_mutex_init.c (__pthread_mutex_init): Set
268 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
270 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
271 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
272 as second argument to lll_lock.
273 (LLL_MUTEX_TRYLOCK): Take mutex as argument
274 instead of its __data.__lock field.
275 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
276 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
278 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
279 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
280 instead of mutex->__data.__kind directly, pass
281 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
282 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
283 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
284 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
285 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
286 to lll_timedlock, lll_robust_timedlock, lll_unlock and
287 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
288 of mutex->__data.__kind directly.
289 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
290 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
291 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
292 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
293 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
294 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
296 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
297 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
298 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
300 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
301 Take mutex as argument instead of its __data.__lock field, pass
302 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
303 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
305 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
306 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
307 to lll_robust_cond_lock.
308 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
309 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
310 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
311 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
312 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
313 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
315 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
316 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
318 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
319 pshared variable, pass it to lll_lock, lll_unlock,
320 lll_futex_timedwait and lll_futex_wake.
321 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
322 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
324 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
325 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
327 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
328 lll_futex_wake_unlock): Likewise.
329 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
331 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
332 lll_futex_wake_unlock): Likewise.
333 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
335 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
336 lll_futex_wake_unlock): Likewise.
337 (lll_futex_wake): Fix a typo.
338 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
339 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
340 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
341 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
342 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
343 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
344 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
345 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
346 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
347 (__pthread_cond_timedwait): Likewise.
348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
349 (__condvar_cleanup, __pthread_cond_wait): Likewise.
351 2007-08-05 Jakub Jelinek <jakub@redhat.com>
353 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
354 Don't use CGOTSETUP and CGOTRESTORE macros.
355 (CGOTSETUP, CGOTRESTORE): Remove.
356 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
359 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
361 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
362 definitions for private futexes.
363 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
364 kernel-features.h and lowlevellock.h. Use private futexes if
366 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
367 (__lll_mutex_lock_wait): Rename to
368 (__lll_lock_wait): ... this. Don't compile in for libc.so.
369 (__lll_mutex_timedlock_wait): Rename to ...
370 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
371 Don't compile in for libc.so.
372 (__lll_mutex_unlock_wake): Rename to ...
373 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
374 (__lll_timedwait_tid): Use __NR_gettimeofday.
375 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
376 the header from assembler. Renamed all lll_mutex_* resp.
377 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
378 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
379 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
381 (__lll_lock_wait_private): Add prototype.
382 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
383 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
384 __lll_unlock_wake): Likewise.
385 (lll_lock): Add private argument. Call __lll_lock_wait_private
386 if private is constant LLL_PRIVATE.
387 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
388 lll_timedlock, lll_robust_timedlock): Add private argument.
389 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
390 if private is constant LLL_PRIVATE.
391 (lll_robust_unlock, lll_robust_dead): Add private argument.
392 (lll_lock_t): Remove.
393 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
394 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
395 lll_cond_wake, lll_cond_broadcast): Remove.
396 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
397 kernel-features.h and lowlevellock.h.
398 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
399 (LOAD_FUTEX_WAIT): Define.
400 (__lll_robust_mutex_lock_wait): Rename to ...
401 (__lll_robust_lock_wait): ... this. Add private argument.
402 Use LOAD_FUTEX_WAIT macro.
403 (__lll_robust_mutex_timedlock_wait): Rename to ...
404 (__lll_robust_timedlock_wait): ... this. Add private argument.
405 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
406 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
408 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
409 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
410 __lll_mutex_{lock,unlock}_*.
411 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
412 lowlevellock.h and pthread-errnos.h.
413 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
414 FUTEX_CMP_REQUEUE, EINVAL): Remove.
415 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
416 __lll_mutex_{lock,unlock}_*.
417 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
418 lowlevellock.h and pthread-errnos.h.
419 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
420 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
421 __lll_mutex_{lock,unlock}_*.
422 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
424 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
425 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
426 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
427 (__condvar_tw_cleanup): Likewise.
428 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
430 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
431 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
432 __lll_mutex_{lock,unlock}_*.
433 ( __condvar_w_cleanup): Likewise.
434 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
435 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
436 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
438 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
439 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
440 __lll_mutex_{lock,unlock}_*.
441 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
443 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
444 FUTEX_PRIVATE_FLAG): Remove.
445 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
446 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
447 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
449 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
450 FUTEX_PRIVATE_FLAG): Remove.
451 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
452 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
453 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
455 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
456 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
457 __lll_mutex_{lock,unlock}_*.
458 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
460 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
461 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
462 __lll_mutex_{lock,unlock}_*.
463 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
464 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
465 (__new_sem_post): Use standard initial exec code sequences.
466 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
468 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
469 FUTEX_PRIVATE_FLAG): Remove.
470 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
472 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
473 (__new_sem_trywait): Use standard initial exec code sequences.
474 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
475 (__new_sem_wait): Use standard initial exec code sequences.
477 2007-07-31 Anton Blanchard <anton@samba.org>
479 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
480 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
483 2007-07-31 Jakub Jelinek <jakub@redhat.com>
485 * allocatestack.c (stack_cache_lock): Change type to int.
486 (get_cached_stack, allocate_stack, __deallocate_stack,
487 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
488 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
489 as second argument to lll_lock and lll_unlock macros on
491 * pthread_create.c (__find_in_stack_list): Likewise.
492 (start_thread): Similarly with pd->lock. Use lll_robust_dead
493 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
495 * descr.h (struct pthread): Change lock and setxid_futex field
497 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
498 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
499 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
500 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
502 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
503 * pthread_cond_init.c (__pthread_cond_init): Likewise.
504 * pthreadP.h (__attr_list_lock): Change type to int.
505 * pthread_attr_init.c (__attr_list_lock): Likewise.
506 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
507 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
509 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
510 also for lll_futex_{wake,wait}.
511 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
513 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
514 LLL_SHARED as second argument to lll_{,un}lock.
515 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
516 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
517 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
518 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
520 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
521 as second argument to lll_{,un}lock macros on pd->lock.
522 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
523 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
524 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
525 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
527 * sysdeps/pthread/createthread.c (do_clone, create_thread):
529 * pthread_once.c (once_lock): Change type to int.
530 (__pthread_once): Pass LLL_PRIVATE as second argument to
531 lll_{,un}lock macros on once_lock.
532 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
533 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
534 rwlock->__data.__shared as second argument to them and similarly
536 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
538 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
540 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
541 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
542 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
543 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
544 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
545 to lll_{,un}lock macros on __sem_mappings_lock.
546 * sem_open.c (check_add_mapping): Likewise.
547 (__sem_mappings_lock): Change type to int.
548 * semaphoreP.h (__sem_mappings_lock): Likewise.
549 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
550 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
551 instead of lll_*mutex_*, pass LLL_SHARED as last
553 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
554 pass LLL_SHARED as last argument.
555 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
556 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
557 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
558 pass LLL_SHARED as last argument.
559 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
560 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
561 LLL_SHARED as last argument.
562 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
563 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
565 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
566 __libc_lock_lock_recursive, __libc_lock_unlock,
567 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
568 argument to lll_{,un}lock.
569 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
570 _IO_lock_unlock): Likewise.
571 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
573 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
574 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
576 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
578 (__fork_lock): Change type to int.
579 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
580 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
581 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
583 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
584 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
585 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
587 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
588 pass it through to lll_futex_*wait, only compile in when
590 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
591 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
592 argument and pass it through to lll_futex_*wait.
593 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
594 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
595 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
596 inline functions to __lll_* resp. __lll_robust_*.
597 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
598 (lll_mutex_dead): Add private argument.
599 (__lll_lock_wait_private): New prototype.
600 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
601 __lll_robust_lock_timedwait): Add private argument to prototypes.
602 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
603 call __lll_lock_wait_private, otherwise pass private to
605 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
606 __lll_robust_timedlock): Add private argument, pass it to
607 __lll_*wait functions.
608 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
609 call __lll_unlock_wake_private, otherwise pass private to
611 (__lll_robust_unlock): Add private argument, pass it to
612 __lll_robust_unlock_wake.
613 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
614 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
615 argument, pass it through to __lll_* inline function.
616 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
617 (lll_lock_t): Remove.
618 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
619 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
620 lll_cond_wake, lll_cond_broadcast): Remove.
621 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
622 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
623 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
624 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
625 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
626 the header from assembler. Renamed all lll_mutex_* resp.
627 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
628 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
629 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
630 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
631 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
632 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
633 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
635 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
636 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
637 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
638 (lll_trylock): Likewise, use __lll_trylock_asm, pass
639 MULTIPLE_THREADS_OFFSET as another asm operand.
640 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
641 MULTIPLE_THREADS_OFFSET as last asm operand, call
642 __lll_lock_wait_private if private is constant LLL_PRIVATE,
643 otherwise pass private as another argument to __lll_lock_wait.
644 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
645 lll_timedlock, lll_robust_timedlock): Add private argument, pass
646 private as another argument to __lll_*lock_wait call.
647 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
648 MULTIPLE_THREADS_OFFSET as another asm operand, call
649 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
650 otherwise pass private as another argument to __lll_unlock_wake.
651 (lll_robust_unlock): Add private argument, pass private as another
652 argument to __lll_unlock_wake.
653 (lll_robust_dead): Add private argument, use __lll_private_flag
655 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
656 LLL_MUTEX_LOCK_INITIALIZER.
657 (lll_lock_t): Remove.
658 (LLL_LOCK_INITIALIZER_WAITERS): Define.
659 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
660 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
661 lll_cond_wake, lll_cond_broadcast): Remove.
662 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
663 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
664 2007-05-2{3,9} changes.
665 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
666 kernel-features.h and lowlevellock.h.
667 (LOAD_PRIVATE_FUTEX_WAIT): Define.
668 (LOAD_FUTEX_WAIT): Rewritten.
669 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
671 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
672 (__lll_mutex_lock_wait): Rename to ...
673 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
674 %ecx, %ecx is now private argument. Don't compile in for libc.so.
675 (__lll_mutex_timedlock_wait): Rename to ...
676 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
677 contains private argument. Don't compile in for libc.so.
678 (__lll_mutex_unlock_wake): Rename to ...
679 (__lll_unlock_wake): ... this. %ecx contains private argument.
680 Don't compile in for libc.so.
681 (__lll_timedwait_tid): Use __NR_gettimeofday.
682 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
683 kernel-features.h and lowlevellock.h.
684 (LOAD_FUTEX_WAIT): Define.
685 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
687 (__lll_robust_mutex_lock_wait): Rename to ...
688 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
689 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
691 (__lll_robust_mutex_timedlock_wait): Rename to ...
692 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
693 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
694 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
696 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
697 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
698 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
699 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
700 to __lll_lock_wait in %edx.
701 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
702 Include lowlevellock.h and pthread-errnos.h.
703 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
704 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
705 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
706 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
707 pass LLL_SHARED in %ecx to both __lll_lock_wait and
709 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
710 Include lowlevellock.h and pthread-errnos.h.
711 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
712 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
713 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
714 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
715 pass LLL_SHARED in %ecx to both __lll_lock_wait and
717 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
718 Include lowlevellock.h.
719 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
721 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
722 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
723 pass LLL_SHARED in %ecx to both __lll_lock_wait and
724 __lll_unlock_wake. Use __NR_gettimeofday.
725 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
726 Include lowlevellock.h.
727 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
728 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
729 to __lll_*, pass cond_lock address in %edx rather than %ecx to
730 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
731 and __lll_unlock_wake.
732 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
733 Include lowlevellock.h.
734 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
735 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
736 MUTEX(%ebx) address in %edx rather than %ecx to
737 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
738 and __lll_unlock_wake. Move return value from %ecx to %edx
740 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
741 Include lowlevellock.h.
742 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
744 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
745 MUTEX(%ebp) address in %edx rather than %ecx to
746 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
747 and __lll_unlock_wake. Move return value from %ecx to %edx
748 register. Use __NR_gettimeofday.
749 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
750 Include lowlevellock.h.
751 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
753 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
754 MUTEX(%ebp) address in %edx rather than %ecx to
755 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
756 and __lll_unlock_wake. Move return value from %ecx to %edx
757 register. Use __NR_gettimeofday.
758 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
759 Include lowlevellock.h.
760 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
761 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
762 MUTEX(%edi) address in %edx rather than %ecx to
763 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
764 and __lll_unlock_wake.
765 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
766 Include lowlevellock.h.
767 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
768 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
769 MUTEX(%ebx) address in %edx rather than %ecx to
770 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
771 and __lll_unlock_wake. Move return value from %ecx to %edx
773 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
775 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
777 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
778 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
779 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
781 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
782 (sem_timedwait): Use __NR_gettimeofday.
783 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
785 (LOCK): Don't define.
786 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
788 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
789 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
791 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
792 2007-05-2{3,9} changes.
793 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
794 kernel-features.h and lowlevellock.h.
795 (LOAD_PRIVATE_FUTEX_WAIT): Define.
796 (LOAD_FUTEX_WAIT): Rewritten.
797 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
798 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
799 (__lll_mutex_lock_wait): Rename to ...
800 (__lll_lock_wait): ... this. %esi is now private argument.
801 Don't compile in for libc.so.
802 (__lll_mutex_timedlock_wait): Rename to ...
803 (__lll_timedlock_wait): ... this. %esi contains private argument.
804 Don't compile in for libc.so.
805 (__lll_mutex_unlock_wake): Rename to ...
806 (__lll_unlock_wake): ... this. %esi contains private argument.
807 Don't compile in for libc.so.
808 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
809 kernel-features.h and lowlevellock.h.
810 (LOAD_FUTEX_WAIT): Define.
811 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
812 (__lll_robust_mutex_lock_wait): Rename to ...
813 (__lll_robust_lock_wait): ... this. %esi argument contains private.
814 Use LOAD_FUTEX_WAIT macro.
815 (__lll_robust_mutex_timedlock_wait): Rename to ...
816 (__lll_robust_timedlock_wait): ... this. %esi argument contains
817 private, use LOAD_FUTEX_WAIT macro.
818 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
820 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
821 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
822 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
823 __lll_lock_wait and __lll_unlock_wake.
824 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
825 Include lowlevellock.h and pthread-errnos.h.
826 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
827 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
828 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
829 pass LLL_SHARED in %esi to both __lll_lock_wait and
831 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
832 Include lowlevellock.h and pthread-errnos.h.
833 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
834 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
835 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
836 pass LLL_SHARED in %esi to both __lll_lock_wait and
838 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
839 Include lowlevellock.h.
840 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
841 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
842 pass LLL_SHARED in %esi to both __lll_lock_wait and
844 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
845 Include lowlevellock.h.
846 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
847 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
848 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
849 and __lll_unlock_wake.
850 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
851 Include lowlevellock.h.
852 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
854 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
855 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
856 and __lll_unlock_wake.
857 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
858 Include lowlevellock.h.
859 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
861 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
862 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
863 and __lll_unlock_wake.
864 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
865 Include lowlevellock.h.
866 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
868 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
869 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
870 and __lll_unlock_wake.
871 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
872 Include lowlevellock.h.
873 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
875 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
876 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
877 and __lll_unlock_wake.
878 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
879 Include lowlevellock.h.
880 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
882 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
883 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
884 and __lll_unlock_wake.
885 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
887 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
889 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
890 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
891 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
893 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
894 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
896 (LOCK): Don't define.
897 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
899 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
900 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
901 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
902 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
903 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
904 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
905 (__lll_lock_wait_private): New function.
906 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
907 it to lll_futex_*wait. Don't compile in for libc.so.
908 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
910 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
911 (struct sparc_pthread_barrier): Remove.
912 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
913 struct sparc_pthread_barrier. Pass
914 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
915 and lll_futex_wait macros.
916 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
918 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
919 Include sparc pthread_barrier_wait.c instead of generic one.
921 2007-07-30 Jakub Jelinek <jakub@redhat.com>
923 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
925 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
926 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
928 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
929 (pthread_rwlock_timedwrlock): Likewise.
930 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
931 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
933 2007-07-31 Jakub Jelinek <jakub@redhat.com>
935 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
937 2007-07-26 Jakub Jelinek <jakub@redhat.com>
939 * tst-locale2.c (useless): Add return statement.
941 2007-07-24 Jakub Jelinek <jakub@redhat.com>
943 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
944 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
945 * pthread_create.c (start_thread): Likewise.
946 * init.c (sighandler_setxid): Likewise.
947 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
948 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
949 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
950 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
951 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
952 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
953 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
954 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
955 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
957 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
959 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
961 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
962 __rtld_notify): Likewise.
963 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
964 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
965 __pthread_once): Likewise.
966 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
967 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
968 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
969 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
970 (lll_futex_wait): Add private argument, define as wrapper around
971 lll_futex_timed_wait.
972 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
973 use __lll_private_flag macro.
974 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
975 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
976 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
977 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
978 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
979 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
980 (lll_futex_wait): Add private argument, define as wrapper around
981 lll_futex_timed_wait.
982 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
983 use __lll_private_flag macro.
984 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
985 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
986 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
988 (lll_futex_timed_wait, lll_futex_wake): Use it.
989 (lll_private_futex_wait, lll_private_futex_timed_wait,
990 lll_private_futex_wake): Removed.
991 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
992 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
993 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
994 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
995 (lll_futex_wait): Add private argument, define as wrapper around
996 lll_futex_timed_wait.
997 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
998 use __lll_private_flag macro.
999 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1000 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1002 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1003 (lll_private_futex_wait, lll_private_futex_timed_wait,
1004 lll_private_futex_wake): Removed.
1005 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1006 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1007 (lll_private_futex_wait, lll_private_futex_timed_wait,
1008 lll_private_futex_wake): Removed.
1009 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1010 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1011 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1012 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1013 (lll_futex_wait): Add private argument, define as wrapper around
1014 lll_futex_timed_wait.
1015 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1016 use __lll_private_flag macro.
1017 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1018 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1020 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1022 (lll_futex_timed_wait, lll_futex_wake): Use it.
1023 (lll_private_futex_wait, lll_private_futex_timed_wait,
1024 lll_private_futex_wake): Removed.
1026 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1028 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1029 of the structure for sparc32.
1031 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1033 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1035 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1037 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1038 code used when private futexes are assumed.
1039 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1042 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1044 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1045 (__lll_private_flag): Define.
1046 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1047 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1049 (lll_private_futex_wait, lll_private_futex_timedwait,
1050 lll_private_futex_wake): Define as wrapper around non-_private
1052 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1053 (__lll_private_flag): Define.
1054 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1055 (lll_private_futex_wait, lll_private_futex_timedwait,
1056 lll_private_futex_wake): Define as wrapper around non-_private
1059 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1061 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1062 parameter to lll_futex_wait call.
1063 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1065 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1066 Replace lll_futex_wait with lll_private_futex_wait.
1067 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1068 Add LLL_SHARED parameter to lll_futex_wake().
1070 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1071 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1072 lll_private_futex_wake.
1073 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1074 bit from private parm before syscall.
1075 (lll_futex_timed_wait): Likewise.
1076 (lll_futex_wake): Likewise.
1077 (lll_futex_wake_unlock): Likewise.
1078 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1079 (lll_robust_mutex_unlock): Likewise.
1080 (lll_mutex_unlock_force): Likewise.
1081 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1083 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1085 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1086 compilation when unconditionally using private futexes.
1087 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1088 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1090 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1091 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1093 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1095 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1098 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1100 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1103 2007-05-16 Roland McGrath <roland@redhat.com>
1105 * init.c (__nptl_initial_report_events): New variable.
1106 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1109 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1111 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1112 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1114 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1116 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1119 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1121 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1122 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1123 * pthread_mutex_timedlock.c: Likewise.
1124 * pthread_mutex_trylock.c: Likewise.
1125 * pthread_mutex_unlock.c: Likewise.
1127 2007-06-17 Andreas Schwab <schwab@suse.de>
1129 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1132 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1134 * allocatestack.c (allocate_stack): Make code compile if
1135 __ASSUME_PRIVATE_FUTEX is set.
1137 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1139 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1140 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1141 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1142 (__pthread_rwlock_wrlock): Likewise.
1143 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1144 (pthread_rwlock_timedrdlock): Likewise.
1145 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1146 (pthread_rwlock_timedwrlock): Likewise.
1147 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1148 (__pthread_rwlock_unlock): Likewise.
1150 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1152 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1153 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1154 Split __flags into __flags, __shared, __pad1 and __pad2.
1155 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1156 futexes if they are available.
1157 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1158 in libc-lowlevellock.S allow using private futexes.
1159 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1160 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1161 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1162 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1163 lll_private_futex_timed_wait and lll_private_futex_wake.
1164 (lll_robust_mutex_unlock): Fix typo.
1165 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1166 field in futex command setup.
1167 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1168 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1169 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1170 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1171 if they are available. Remove clear_once_control.
1172 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1173 futexes if they are available.
1174 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1175 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1176 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1177 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1178 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1179 Wake only when there are waiters.
1180 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1181 support. Indicate that there are waiters. Remove unnecessary
1182 extra cancellation test.
1183 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1184 left-over duplication of __sem_wait_cleanup.
1186 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1188 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1189 parameter to lll_futex_wait, lll_futex_timed_wait, and
1190 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1191 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1192 lll_private_futex_wake.
1193 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1194 * allocatestack.c: Adjust use of lll_futex_* macros.
1196 * lowlevellock.h: Likewise.
1197 * pthread_barrier_wait.c: Likewise.
1198 * pthread_cond_broadcast.c: Likewise.
1199 * pthread_cond_destroy.c: Likewise.
1200 * pthread_cond_signal.c: Likewise.
1201 * pthread_cond_timedwait.c: Likewise.
1202 * pthread_cond_wait.c: Likewise.
1203 * pthread_create.c: Likewise.
1204 * pthread_mutex_lock.c: Likewise.
1205 * pthread_mutex_setprioceiling.c: Likewise.
1206 * pthread_mutex_timedlock.c: Likewise.
1207 * pthread_mutex_unlock.c: Likewise.
1208 * pthread_rwlock_timedrdlock.c: Likewise.
1209 * pthread_rwlock_timedwrlock.c: Likewise.
1210 * pthread_rwlock_unlock.c: Likewise.
1211 * sysdeps/alpha/tls.h: Likewise.
1212 * sysdeps/i386/tls.h: Likewise.
1213 * sysdeps/ia64/tls.h: Likewise.
1214 * sysdeps/powerpc/tls.h: Likewise.
1215 * sysdeps/pthread/aio_misc.h: Likewise.
1216 * sysdeps/pthread/gai_misc.h: Likewise.
1217 * sysdeps/s390/tls.h: Likewise.
1218 * sysdeps/sh/tls.h: Likewise.
1219 * sysdeps/sparc/tls.h: Likewise.
1220 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1221 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1222 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1223 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1224 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1225 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1226 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1227 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1228 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1229 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1231 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1232 * sysdeps/x86_64/tls.h: Likewise.
1234 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1236 * pthread_getattr_np.c: No need to install a cancellation handler,
1237 this is no cancellation point.
1238 * pthread_getschedparam.c: Likewise.
1239 * pthread_setschedparam.c: Likewise.
1240 * pthread_setschedprio.c: Likewise.
1241 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1243 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1244 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1245 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1246 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1247 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1248 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1249 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1250 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1251 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1252 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1253 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1254 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1256 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1257 whether there are more than one thread makes no sense here since
1258 we only call the slow path if the locks are taken.
1259 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1261 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1262 COND_NWAITERS_SHIFT.
1263 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1265 * pthread_cond_init.c: Likewise.
1266 * pthread_cond_timedwait.c: Likewise.
1267 * pthread_cond_wait.c: Likewise.
1268 * pthread_condattr_getclock.c: Likewise.
1269 * pthread_condattr_setclock.c: Likewise.
1270 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1271 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1273 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1274 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1276 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1278 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1281 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1283 (THREAD_GSCOPE_GET_FLAG): Remove.
1284 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1285 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1287 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1288 (THREAD_GSCOPE_GET_FLAG): Remove.
1289 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1290 instead of THREAD_GSCOPE_GET_FLAG.
1291 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1293 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1294 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1295 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1296 THREAD_GSCOPE_WAIT): Define.
1297 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1298 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1299 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1300 THREAD_GSCOPE_WAIT): Define.
1301 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1302 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1303 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1304 THREAD_GSCOPE_WAIT): Define.
1305 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1306 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1307 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1308 THREAD_GSCOPE_WAIT): Define.
1310 2007-05-24 Richard Henderson <rth@redhat.com>
1312 * descr.h (struct pthread): Add header.gscope_flag.
1313 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1314 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1315 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1316 THREAD_GSCOPE_WAIT): Define.
1318 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1320 * init.c: Make it compile with older kernel headers.
1322 * tst-initializers1.c: Show through exit code which test failed.
1324 * pthread_rwlock_init.c: Also initialize __shared field.
1325 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1326 element in rwlock structure into four byte elements. One of them is
1327 the new __shared element.
1328 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1330 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1331 __shared, adjust names of other padding elements.
1332 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1333 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1334 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1335 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1337 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1338 futex to use private operations if possible.
1339 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1341 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1343 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1344 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1345 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1346 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1348 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1350 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1351 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1353 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1355 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1356 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1357 * pthread_rwlock_timedrdlock.c: Likewise.
1358 * pthread_rwlock_tryrdlock.c: Likewise.
1360 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1363 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1364 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1365 duplication of __sem_wait_cleanup.
1367 * allocatestack.c: Revert last change.
1369 * sysdeps/i386/tls.h: Likewise.
1370 * sysdeps/x86_64/tls.h: Likewise.
1371 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1373 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1375 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1377 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1378 * pthread_barrier_init.c: Set private flag if pshared and private
1379 futexes are supported.
1380 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1381 private field in futex command setup.
1382 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1384 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1386 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1388 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1389 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1390 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1391 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1392 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1394 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1395 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1396 fields in the structure.
1397 (__old_sem_init): New function.
1398 * sem_open.c: Initialize all fields of the structure.
1399 * sem_getvalue.c: Adjust for renamed element.
1400 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1401 (gen-as-const-headers): Add structsem.sym.
1402 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1403 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1404 struct new_sem. Add struct old_sem.
1405 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1406 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1407 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1408 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1409 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1410 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1411 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1412 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1413 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1414 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1415 * tst-sem10.c: New file.
1416 * tst-sem11.c: New file.
1417 * tst-sem12.c: New file.
1418 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1421 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1422 Jakub Jelinek <jakub@redhat.com>
1424 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1425 Move __pthread_enable_asynccancel right before futex syscall.
1426 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1429 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1431 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1432 THREAD_COPY_PRIVATE_FUTEX): Define.
1433 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1434 THREAD_COPY_PRIVATE_FUTEX): Define.
1435 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1436 * init.c (__pthread_initialize_minimal_internal): Use
1437 THREAD_SET_PRIVATE_FUTEX.
1439 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1440 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1441 THREAD_GSCOPE_FLAG_WAIT): Define.
1442 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1443 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1444 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1446 (THREAD_GSCOPE_GET_FLAG): Define.
1447 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1448 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1449 instead of ->header.gscope_flag directly.
1451 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1453 * init.c (__pthread_initialize_minimal_internal): Check whether
1454 private futexes are available.
1455 * allocatestack.c (allocate_stack): Copy private_futex field from
1456 current thread into the new stack.
1457 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1458 futexes if they are available.
1459 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1460 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1461 in libc-lowlevellock.S allow using private futexes.
1462 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1463 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1465 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1466 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1467 if they are available.
1468 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1469 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1470 * sysdeps/i386/tcb-offsets.sym: Likewise.
1471 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1472 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1474 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1476 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1477 Remove ptr_wait_lookup_done again.
1478 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1479 (__pthread_initialize_minimal_internal): Initialize
1480 _dl_wait_lookup_done pointer in _rtld_global directly.
1481 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1482 Remove code to code _dl_wait_lookup_done.
1483 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1486 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1488 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1489 pthread_mutex_init failed with ENOTSUP.
1491 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1493 * allocatestack.c (__wait_lookup_done): New function.
1494 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1495 Add ptr_wait_lookup_done.
1496 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1497 * pthreadP.h: Declare __wait_lookup_done.
1498 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1499 Define macros to implement reference handling of global scope.
1500 * sysdeps/x86_64/tls.h: Likewise.
1501 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1502 Initialize GL(dl_wait_lookup_done).
1504 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1507 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1509 * pthread_mutex_timedlock.c: Likewise.
1510 * pthread_mutex_trylock.c: Likewise.
1511 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1513 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1514 * tst-robust9.c: New file.
1515 * tst-robustpi9.c: New file.
1517 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1518 unnecessary extra cancellation test.
1520 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1522 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1523 extra cancellation test.
1524 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1526 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1528 * descr.h (struct pthread): Rearrange members to fill hole in
1531 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1532 (__pthread_setaffinity_new): If syscall was successful and
1533 RESET_VGETCPU_CACHE is defined, use it before returning.
1534 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1536 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1539 * tst-align2.c: Include stackinfo.h.
1540 * tst-getpid1.c: Likewise.
1542 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1545 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1546 * tst-getpid1.c (do_test): Likewise.
1549 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1550 (allocate_stack): Likewise.
1552 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1554 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1555 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1556 (__lll_robust_timedlock_wait): Likewise.
1557 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1559 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1562 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1563 * tst-cancel4.c (tf_fdatasync): New test.
1565 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1568 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1569 check mutexes like normal mutexes.
1572 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1573 Initialize the whole sigevent structure to appease valgrind.
1575 2007-04-25 Ulrich Drepper <drepper@redhat.com>
1577 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1578 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1580 2007-04-06 Ulrich Drepper <drepper@redhat.com>
1582 * tst-locale1.c: Avoid warnings.
1583 * tst-locale2.c: Likewise.
1585 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1587 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1588 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1590 2007-03-16 Jakub Jelinek <jakub@redhat.com>
1592 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1593 __extern_always_inline where appropriate.
1594 * sysdeps/pthread/pthread.h: Likewise.
1596 2007-03-13 Richard Henderson <rth@redhat.com>
1598 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1599 separate cfi regions for the two subsections.
1601 2007-02-25 Ulrich Drepper <drepper@redhat.com>
1603 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1604 new thread, don't just decrement it.
1605 Patch by Suzuki K P <suzuki@in.ibm.com>.
1607 2007-02-21 Ulrich Drepper <drepper@redhat.com>
1609 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1610 PTHFCT_CALL definition.
1612 2007-02-18 Ulrich Drepper <drepper@redhat.com>
1614 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1615 available, don't use it.
1617 2007-02-09 Jakub Jelinek <jakub@redhat.com>
1619 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1620 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1621 call into the kernel to delay.
1623 2007-01-18 Ulrich Drepper <drepper@redhat.com>
1625 * tst-initializers1.c: We want to test the initializers as seen
1626 outside of libc, so undefined _LIBC.
1628 * pthread_join.c (cleanup): Avoid warning.
1630 2007-01-17 Ulrich Drepper <drepper@redhat.com>
1632 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1633 (__lll_timedwait_tid): Add unwind info.
1635 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1636 function table, mangle the pointers.
1637 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1638 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1639 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1640 demangle pointers before use.
1641 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1643 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1644 * sysdeps/pthread/setxid.h: Likewise.
1646 2007-01-12 Ulrich Drepper <drepper@redhat.com>
1648 * tst-rwlock7.c: Show some more information in case of correct
1651 2007-01-11 Ulrich Drepper <drepper@redhat.com>
1653 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1654 (lll_futex_timed_wait): Undo part of last change, don't negate
1657 2007-01-10 Ulrich Drepper <drepper@redhat.com>
1659 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1660 FUTEX_CMP_REQUEUE and lll_futex_requeue.
1662 2006-12-28 David S. Miller <davem@davemloft.net>
1664 * shlib-versions: Fix sparc64 linux target specification.
1666 2007-01-10 Jakub Jelinek <jakub@redhat.com>
1668 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1669 Adjust include path for pthread_barrier_wait.c move.
1671 2006-12-21 Jakub Jelinek <jakub@redhat.com>
1673 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1674 tid isn't reread from pd->tid in between ESRCH test and the syscall.
1676 2006-12-06 Jakub Jelinek <jakub@redhat.com>
1678 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1679 6 argument cancellable syscalls.
1680 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1681 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1682 6 argument cancellable syscalls.
1683 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1685 2006-12-09 Ulrich Drepper <drepper@redhat.com>
1687 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1688 (__rtld_mrlock_initialize): Add missing closing parenthesis.
1690 2006-10-30 Jakub Jelinek <jakub@redhat.com>
1692 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1693 __sync_lock_release instead of __sync_lock_release_si.
1695 2006-10-29 Jakub Jelinek <jakub@redhat.com>
1697 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1699 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1700 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1701 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1702 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1703 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1704 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1705 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1706 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1707 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1708 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1709 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1711 2006-10-27 Ulrich Drepper <drepper@redhat.com>
1713 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1714 * pthread_barrier_wait.c: ...here.
1715 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1716 * pthread_cond_broadcast.c: ...here.
1717 * sysdeps/pthread/pthread_cond_signal.c: Move to...
1718 * pthread_cond_signal.c: ...here.
1719 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1720 * pthread_cond_timedwait.c: ...here.
1721 * sysdeps/pthread/pthread_cond_wait.c: Move to...
1722 * pthread_cond_wait.c: ...here.
1723 * sysdeps/pthread/pthread_once.c: Move to...
1724 * pthread_once.c: ...here.
1725 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1726 * pthread_rwlock_rdlock.c: ...here.
1727 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1728 * pthread_rwlock_timedrdlock.c: ...here.
1729 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1730 * pthread_rwlock_timedwrlock.c: ...here.
1731 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1732 * pthread_rwlock_unlock.c: ...here.
1733 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1734 * pthread_rwlock_wrlock.c: ...here.
1735 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1736 * pthread_spin_destroy.c: ...here.
1737 * sysdeps/pthread/pthread_spin_init.c: Move to...
1738 * pthread_spin_init.c: ...here.
1739 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1740 * pthread_spin_unlock.c: ...here.
1741 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1742 * pthread_getcpuclockid.c: ...here.
1744 * init.c: USE_TLS support is now always enabled.
1745 * tst-tls5.h: Likewise.
1746 * sysdeps/alpha/tls.h: Likewise.
1747 * sysdeps/i386/tls.h: Likewise.
1748 * sysdeps/ia64/tls.h: Likewise.
1749 * sysdeps/powerpc/tls.h: Likewise.
1750 * sysdeps/s390/tls.h: Likewise.
1751 * sysdeps/sh/tls.h: Likewise.
1752 * sysdeps/sparc/tls.h: Likewise.
1753 * sysdeps/x86_64/tls.h: Likewise.
1755 2006-10-27 Jakub Jelinek <jakub@redhat.com>
1757 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1758 __rtld_mrlock_change): Update oldval if atomic compare and exchange
1761 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1762 Define to THREAD_SELF->header.multiple_threads.
1763 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1765 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1767 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1768 (SINGLE_THREAD_P): Likewise.
1769 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1770 (SINGLE_THREAD_P): Likewise.
1771 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1772 (SINGLE_THREAD_P): Likewise.
1773 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1774 (SINGLE_THREAD_P): Likewise.
1775 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1777 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1778 (SINGLE_THREAD_P): Likewise.
1779 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1780 (SINGLE_THREAD_P): Likewise.
1781 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1784 2006-10-26 Jakub Jelinek <jakub@redhat.com>
1786 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1787 by default rather than 2_3_3.
1789 2006-10-17 Jakub Jelinek <jakub@redhat.com>
1791 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1792 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1793 atomic_* instead of catomic_* macros.
1795 2006-10-12 Ulrich Drepper <drepper@redhat.com>
1798 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1799 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1800 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1801 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1802 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1803 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1804 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1805 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1806 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1807 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1808 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1809 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1810 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1812 2006-10-11 Ulrich Drepper <drepper@redhat.com>
1814 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1815 cancelable syscalls with six parameters.
1817 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1818 operations instead of atomic_*.
1820 2006-10-09 Ulrich Drepper <drepper@redhat.com>
1822 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1824 2006-10-07 Ulrich Drepper <drepper@redhat.com>
1826 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1827 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1828 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1830 * pthread_attr_setstack.c: Allow overwriting the version number of the
1832 * pthread_attr_setstacksize.c: Likewise.
1833 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1835 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1836 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1838 2006-09-24 Ulrich Drepper <drepper@redhat.com>
1841 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1842 Patch by Petr Baudis.
1844 2006-09-18 Jakub Jelinek <jakub@redhat.com>
1846 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1848 * tst-cancel2.c (tf): Loop as long as something was written.
1850 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1852 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1853 mutexes wake all mutexes.
1854 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1855 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1856 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1858 2006-09-12 Ulrich Drepper <drepper@redhat.com>
1860 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1861 to guarantee the thread is always canceled.
1863 2006-09-08 Jakub Jelinek <jakub@redhat.com>
1865 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1867 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1868 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
1869 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1870 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1871 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1873 2006-09-08 Ulrich Drepper <drepper@redhat.com>
1876 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1877 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1878 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1879 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1880 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1881 * Makefile (tests): Add tst-cond22.
1882 * tst-cond22.c: New file.
1884 2006-09-05 Ulrich Drepper <drepper@redhat.com>
1887 * descr.h (struct pthread): Add parent_cancelhandling.
1888 * sysdeps/pthread/createthread.c (create_thread): Pass parent
1889 cancelhandling value to child.
1890 * pthread_create.c (start_thread): If parent thread was canceled
1891 reset the SIGCANCEL mask.
1892 * Makefile (tests): Add tst-cancel25.
1893 * tst-cancel25.c: New file.
1895 2006-09-05 Jakub Jelinek <jakub@redhat.com>
1896 Ulrich Drepper <drepper@redhat.com>
1898 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1899 counterp if it is already zero.
1900 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1902 2006-03-04 Jakub Jelinek <jakub@redhat.com>
1903 Roland McGrath <roland@redhat.com>
1905 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1906 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1907 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1908 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1909 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1910 lll_robust_mutex_timedlock, lll_mutex_unlock,
1911 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1912 Add _L_*_ symbols around the subsection.
1913 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1914 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1916 2006-03-03 Jakub Jelinek <jakub@redhat.com>
1917 Roland McGrath <roland@redhat.com>
1919 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1920 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1921 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1922 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1923 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1924 lll_robust_mutex_timedlock, lll_mutex_unlock,
1925 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1926 Add _L_*_ symbols around the subsection.
1927 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1928 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1930 2006-08-31 Ulrich Drepper <drepper@redhat.com>
1932 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1933 change because it can disturb too much existing code. If real hard
1934 reader preference is needed we'll introduce another type.
1935 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1936 (pthread_rwlock_timedwrlock): Likewise.
1937 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1940 2006-08-30 Ulrich Drepper <drepper@redhat.com>
1942 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1944 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1945 (pthread_rwlock_timedwrlock): Likewise.
1946 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1949 2006-08-25 Jakub Jelinek <jakub@redhat.com>
1951 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1952 Only define ifdef SHARED.
1954 2006-08-23 Ulrich Drepper <drepper@redhat.com>
1956 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1957 (free_stacks): ...here.
1958 (__free_stack_cache): New function.
1959 * pthreadP.h: Declare __free_stack_cache.
1960 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1962 * init.c (pthread_functions): Initialize ptr_freeres.
1963 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
1964 New freeres function.
1966 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
1969 * Makefile (extra-objs): Add modules to extra-test-objs instead.
1971 2006-08-20 Ulrich Drepper <drepper@redhat.com>
1973 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1974 _XOPEN_REALTIME_THREADS.
1976 2006-08-15 Jakub Jelinek <jakub@redhat.com>
1978 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
1979 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
1980 HAVE_CLOCK_GETTIME_VSYSCALL.
1981 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
1983 2006-08-14 Jakub Jelinek <jakub@redhat.com>
1985 * sysdeps/unix/sysv/linux/bits/posix_opt.h
1986 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
1987 * descr.h (struct priority_protection_data): New type.
1988 (struct pthread): Add tpp field.
1989 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
1990 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
1991 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
1992 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
1994 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
1995 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
1996 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
1997 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
1999 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2001 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2002 * pthread_mutexattr_getprioceiling.c
2003 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2004 in the SCHED_FIFO priority range.
2005 * pthread_mutexattr_setprioceiling.c
2006 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2007 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2008 if mutex is not TPP. Ceiling is now in __data.__lock.
2009 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2010 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2011 is now in __data.__lock. Add locking.
2012 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2013 * Makefile (libpthread-routines): Add tpp.
2014 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2015 * tst-tpp.h: New file.
2016 * tst-mutexpp1.c: New file.
2017 * tst-mutexpp6.c: New file.
2018 * tst-mutexpp10.c: New file.
2019 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2020 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2022 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2025 * pthread_join.c (pthread_join): Account for self being canceled
2026 when checking for deadlocks.
2027 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2028 (tf1): Don't print anything after pthread_join returns, this would be
2029 another cancellation point.
2031 * tst-join6.c: New file.
2032 * Makefile (tests): Add tst-join6.
2034 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2037 * pthread_setspecific.c (__pthread_setspecific): Check
2038 out-of-range index before checking for unused key.
2040 * sysdeps/pthread/gai_misc.h: New file.
2042 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2044 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2045 file. Don't use sysctl.
2046 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2047 overwrite the file if this is likely not true.
2049 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2051 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2052 * Makefile (tests): Add tst-getpid3.
2053 * tst-getpid3.c: New file.
2055 2006-07-30 Roland McGrath <roland@redhat.com>
2057 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2059 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2060 (pause_not_cancel): New macro.
2061 (nanosleep_not_cancel): New macro.
2062 (sigsuspend_not_cancel): New macro.
2063 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2064 nanosleep_not_cancel macro from <not-cancel.h>.
2065 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2066 macro from <not-cancel.h>.
2068 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2069 Jakub Jelinek <jakub@redhat.com>
2071 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2072 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2073 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2074 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2075 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2076 * pthread_mutex_lock.c: Likewise.
2077 * pthread_mutex_timedlock.c: Likewise.
2078 * pthread_mutex_trylock.c: Likewise.
2079 * pthread_mutex_unlock.c: Likewise.
2080 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2082 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2083 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2084 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2085 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2086 pthread-pi-defines.sym.
2087 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2088 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2089 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2090 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2091 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2092 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2093 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2094 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2095 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2096 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2097 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2098 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2099 * tst-mutex2.c: Likewise.
2100 * tst-mutex3.c: Likewise.
2101 * tst-mutex4.c: Likewise.
2102 * tst-mutex5.c: Likewise.
2103 * tst-mutex6.c: Likewise.
2104 * tst-mutex7.c: Likewise.
2105 * tst-mutex7a.c: Likewise.
2106 * tst-mutex8.c: Likewise.
2107 * tst-mutex9.c: Likewise.
2108 * tst-robust1.c: Likewise.
2109 * tst-robust7.c: Likewise.
2110 * tst-robust8.c: Likewise.
2111 * tst-mutexpi1.c: New file.
2112 * tst-mutexpi2.c: New file.
2113 * tst-mutexpi3.c: New file.
2114 * tst-mutexpi4.c: New file.
2115 * tst-mutexpi5.c: New file.
2116 * tst-mutexpi6.c: New file.
2117 * tst-mutexpi7.c: New file.
2118 * tst-mutexpi7a.c: New file.
2119 * tst-mutexpi8.c: New file.
2120 * tst-mutexpi9.c: New file.
2121 * tst-robust1.c: New file.
2122 * tst-robust2.c: New file.
2123 * tst-robust3.c: New file.
2124 * tst-robust4.c: New file.
2125 * tst-robust5.c: New file.
2126 * tst-robust6.c: New file.
2127 * tst-robust7.c: New file.
2128 * tst-robust8.c: New file.
2129 * Makefile (tests): Add the new tests.
2131 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2132 * pthread_mutex_destroy.c: Remove unneeded label.
2134 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2136 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2137 computations to compile time.
2139 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2141 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2143 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2145 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2147 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2149 * pthread_key_create.c (__pthread_key_create): Do away with
2150 __pthread_keys_lock.
2152 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2153 (__kernel_cpumask_size): Mark as hidden.
2154 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2156 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2157 * semaphoreP.h (__sem_mappings_lock): Likewise.
2159 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2161 * pthread_atfork.c: Mark __dso_handle as hidden.
2163 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2166 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2167 the reload problem. Change the one path in pthread_cancel_init
2168 which causes the problem. Force gcc to reload. Simplify callers.
2169 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2170 (_Unwind_GetBSP): Undo last patch.
2172 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2174 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2175 function pointer is reloaded after pthread_cancel_init calls.
2178 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2179 pointers are reloaded after pthread_cancel_init calls.
2181 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2183 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2186 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2188 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2189 Allocate new object which is passed to timer_sigev_thread so that
2190 the timer can be deleted before the new thread is scheduled.
2192 2006-04-26 Roland McGrath <roland@redhat.com>
2194 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2196 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2198 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2199 suffix for conditional jumps.
2200 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2201 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2202 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2203 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2204 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2205 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2207 * init.c (sigcancel_handler): Compare with correct PID even if the
2208 thread is in the middle of a fork call.
2209 (sighandler_setxid): Likewise.
2210 Reported by Suzuki K P <suzuki@in.ibm.com> .
2212 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2214 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2216 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2218 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2219 fails [Coverity CID 105].
2221 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2223 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2225 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2228 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2229 Define __lll_rel_instr using lwsync.
2231 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2233 * allocatestack.c (allocate_stack): Always initialize robust_head.
2234 * descr.h: Define struct robust_list_head.
2235 (struct pthread): Use robust_list_head in robust mutex list definition.
2236 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2237 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2238 (__pthread_initialize_minimal_internal): Register robust_list with
2240 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2241 Declare __set_robust_list_avail.
2242 * pthread_create.c (start_thread): Register robust_list of new thread.
2243 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2245 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2246 number of users, it's unreliable.
2247 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2248 set_robust_list syscall is available.
2249 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2250 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2251 Set robust_head.list_op_pending before trying to lock a robust mutex.
2252 * pthread_mutex_timedlock.c: Likewise.
2253 * pthread_mutex_trylock.c: Likewise.
2254 * pthread_mutex_unlock.c: Likewise for unlocking.
2255 * Makefile (tests): Add tst-robust8.
2256 * tst-robust8.c: New file.
2258 2006-03-08 Andreas Schwab <schwab@suse.de>
2260 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2261 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2263 2006-03-05 Roland McGrath <roland@redhat.com>
2265 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2266 and $config_os doesn't match *linux*.
2268 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2270 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2271 Use __syscall_error.
2272 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2273 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2274 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2275 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2276 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2277 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2279 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2281 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2283 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2285 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2286 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2288 (__lll_robust_timedlock_wait): Likewise.
2289 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2290 (__lll_robust_lock_wait): Likewise.
2291 (__lll_robust_timedlock_wait): Likewise.
2292 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2293 (__lll_robust_lock_wait): Likewise.
2294 (__lll_robust_timedlock_wait): Likewise.
2296 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2298 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2299 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2300 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2301 lll_robust_mutex_unlock): Define.
2302 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2304 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2306 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2307 instead of <clone.S>.
2309 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2311 * Makefile (libpthread-routines): Add
2312 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2313 and pthread_mutex_[sg]etprioceiling.
2314 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2315 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2316 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2317 pthread_mutex_setprioceiling.
2318 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2319 PTHREAD_PRIO_PROTECT): New enum values.
2320 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2321 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2322 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2324 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2325 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2326 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2328 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2329 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2330 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2331 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2332 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2333 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2334 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2336 * pthread_mutex_getprioceiling.c: New file.
2337 * pthread_mutex_setprioceiling.c: New file.
2338 * pthread_mutexattr_getprioceiling.c: New file.
2339 * pthread_mutexattr_setprioceiling.c: New file.
2340 * pthread_mutexattr_getprotocol.c: New file.
2341 * pthread_mutexattr_setprotocol.c: New file.
2343 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2345 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2347 2006-02-27 Roland McGrath <roland@redhat.com>
2349 * sysdeps/pthread/Subdirs: List nptl here too.
2350 * configure (libc_add_on_canonical): New variable.
2352 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2354 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2355 self to get main source tree's file.
2356 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2357 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2358 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2359 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2360 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2361 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2362 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2363 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2364 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2365 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2366 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2367 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2368 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2370 * Makefile: Use $(sysdirs) in vpath directive.
2372 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2373 (CPPFLAGS-timer_routines.c): Likewise.
2375 * Makeconfig (includes): Variable removed.
2377 2006-02-26 Roland McGrath <roland@redhat.com>
2379 * sysdeps/generic/pt-raise.c: Moved to ...
2380 * pt-raise.c: ... here.
2381 * sysdeps/generic/lowlevellock.h: Moved to ...
2382 * lowlevellock.h: ... here.
2384 2006-02-23 Roland McGrath <roland@redhat.com>
2386 * descr.h (struct pthread): Add final member `end_padding'.
2387 (PTHREAD_STRUCT_END_PADDING): Use it.
2389 2006-02-20 Roland McGrath <roland@redhat.com>
2391 * sysdeps/mips: Directory removed, saved in ports repository.
2392 * sysdeps/unix/sysv/linux/mips: Likewise.
2394 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2396 * tst-robust1.c: Add second mutex to check that the mutex list is
2399 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2401 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2402 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2403 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2404 lll_robust_mutex_unlock): New macros.
2405 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2406 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2407 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2408 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2409 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2411 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2413 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2415 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2417 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2419 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2420 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2421 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2422 (lll_robust_mutex_unlock): Likewise.
2424 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2426 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2427 Set robust_list.__next rather than robust_list.
2428 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2429 (__pthread_list_t): New typedef.
2430 (pthread_mutex_t): Replace __next and __prev fields with __list.
2431 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2432 (__pthread_list_t): New typedef.
2433 (pthread_mutex_t): Replace __next and __prev fields with __list.
2434 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2435 (__pthread_list_t, __pthread_slist_t): New typedefs.
2436 (pthread_mutex_t): Replace __next and __prev fields with __list.
2437 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2438 (__pthread_list_t, __pthread_slist_t): New typedefs.
2439 (pthread_mutex_t): Replace __next and __prev fields with __list.
2440 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2441 (__pthread_list_t, __pthread_slist_t): New typedefs.
2442 (pthread_mutex_t): Replace __next and __prev fields with __list.
2443 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2444 (__pthread_slist_t): New typedef.
2445 (pthread_mutex_t): Replace __next field with __list.
2447 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2449 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2450 PTHREAD_MUTEX_OWNERDEAD.
2451 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2452 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2453 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2454 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2455 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2456 to PTHREAD_MUTEX_INCONSISTENT.
2457 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2458 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2459 * pthread_mutex_trylock.c: Likewise.
2460 * pthread_mutex_timedlock.c: Likewise.
2461 * pthread_mutex_unlock.c: Likewise.
2462 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2463 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2464 lowlevelrobustlock.sym.
2465 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2466 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2468 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2469 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2470 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2471 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2472 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2474 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2476 * allocatestack.c (allocate_stack): Initialize robust_list.
2477 * init.c (__pthread_initialize_minimal_internal): Likewise.
2478 * descr.h (struct xid_command): Pretty printing.
2479 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2480 robust_list. Adjust macros.
2481 * pthread_create.c (start_thread): Adjust robust_list handling.
2482 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2483 but the owner for all robust mutex types.
2484 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2485 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2486 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2487 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2489 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2490 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2492 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2494 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2495 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2497 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2499 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2501 (lll_futex_timed_wait): Define.
2503 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2505 * tst-cancel4.c: Test ppoll.
2507 2006-01-18 Andreas Jaeger <aj@suse.de>
2510 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2511 (pthread_mutex_t): Follow changes for other archs. Based on patch
2512 by Jim Gifford <patches@jg555.com>.
2514 2006-01-13 Richard Henderson <rth@redhat.com>
2516 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2518 2006-01-10 Roland McGrath <roland@redhat.com>
2520 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2521 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2522 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2523 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2524 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2525 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2526 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2527 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2528 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2529 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2531 2006-01-09 Roland McGrath <roland@redhat.com>
2533 * tst-initializers1-c89.c: New file.
2534 * tst-initializers1-c99.c: New file.
2535 * tst-initializers1-gnu89.c: New file.
2536 * tst-initializers1-gnu99.c: New file.
2537 * Makefile (tests): Add them.
2538 (CFLAGS-tst-initializers1-c89.c): New variable.
2539 (CFLAGS-tst-initializers1-c99.c): New variable.
2540 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2541 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2543 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2544 Use __extension__ on anonymous union definition.
2545 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2546 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2547 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2548 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2549 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2551 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2553 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2554 Don't give the union a name because it changes the mangled name.
2555 Instead name the struct for __data.
2556 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2558 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2561 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2563 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2564 stack bias to mc_ftp field.
2566 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2568 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2569 being too clever and reloading the futex value where it shouldn't.
2571 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2573 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2576 2006-01-06 Jakub Jelinek <jakub@redhat.com>
2578 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2581 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2583 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2584 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2585 rename in tcbhead_t.
2587 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2588 Don't give the union a name because it changes the mangled name.
2589 Instead name the struct for __data.
2590 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2591 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2592 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2593 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2594 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2595 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2597 2006-01-05 Ulrich Drepper <drepper@redhat.com>
2599 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2601 (lll_futex_timed_wait): Define.
2602 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2603 * sysdeps/pthread/aio_misc.h: New file.
2605 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2607 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2609 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2611 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2612 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2613 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2615 2006-01-04 Ulrich Drepper <drepper@redhat.com>
2617 * tst-cancel24.cc: Use C headers instead of C++ headers.
2619 2006-01-03 Jakub Jelinek <jakub@redhat.com>
2621 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2622 sparc-linux configured glibc.
2623 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2624 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2625 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2626 atomic_compare_and_exchange_val_24_acq instead of
2627 atomic_compare_and_exchange_val_acq.
2628 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2629 instead of atomic_exchange_rel.
2630 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2631 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2633 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2635 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2636 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2637 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2638 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2639 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2640 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2642 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2644 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2645 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2646 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2648 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2650 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2652 2006-01-03 Ulrich Drepper <drepper@redhat.com>
2654 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2657 2006-01-02 Jakub Jelinek <jakub@redhat.com>
2659 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2660 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2661 THREAD_COPY_POINTER_GUARD): Define.
2662 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2663 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2665 2006-01-01 Ulrich Drepper <drepper@redhat.com>
2667 * version.c: Update copyright year.
2669 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2671 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2672 .eh_frame section, use cfi_* directives.
2673 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2675 2005-12-30 Ulrich Drepper <drepper@redhat.com>
2677 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2680 2005-12-29 Ulrich Drepper <drepper@redhat.com>
2682 * sysdeps/pthread/sigaction.c: Removed.
2683 * sigaction.c: New file.
2684 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2686 2005-12-28 Ulrich Drepper <drepper@redhat.com>
2688 * Makefile (tests): Add tst-signal7.
2689 * tst-signal7.c: New file.
2691 2005-12-27 Roland McGrath <roland@redhat.com>
2693 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2694 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2695 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2696 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2697 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2698 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2699 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2700 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2701 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2702 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2703 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2705 2005-12-27 Jakub Jelinek <jakub@redhat.com>
2707 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2708 and __prev field to pthread_mutex_t.
2709 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2710 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2711 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2712 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2713 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2716 2005-12-26 Ulrich Drepper <drepper@redhat.com>
2718 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2719 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2720 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2721 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2722 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2723 and PTHREAD_MUTEXATTR_FLAG_BITS.
2724 * descr.h (struct pthread): Add robust_list field and define
2725 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2726 * pthread_mutexattr_getrobust.c: New file.
2727 * pthread_mutexattr_setrobust.c: New file.
2728 * pthread_mutex_consistent.c: New file.
2729 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2730 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2731 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2732 Adjust pthread_mutex_t initializers.
2733 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2734 field to pthread_mutex_t.
2735 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2736 and __prev field to pthread_mutex_t.
2737 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2738 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2739 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2740 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2741 * pthread_mutexattr_gettype.c: Likewise.
2742 * pthread_mutexattr_setpshared.c: Likewise.
2743 * pthread_mutexattr_settype.c: Likewise.
2744 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2745 Initialize mutex kind according to robust flag.
2746 * pthread_mutex_lock.c: Implement local robust mutex.
2747 * pthread_mutex_timedlock.c: Likewise.
2748 * pthread_mutex_trylock.c: Likewise.
2749 * pthread_mutex_unlock.c: Likewise.
2750 * pthread_create.c (start_thread): Mark robust mutexes which remained
2752 * tst-robust1.c: New file.
2753 * tst-robust2.c: New file.
2754 * tst-robust3.c: New file.
2755 * tst-robust4.c: New file.
2756 * tst-robust5.c: New file.
2757 * tst-robust6.c: New file.
2758 * tst-robust7.c: New file.
2759 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2760 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2761 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2762 tst-robust5, tst-robust6, and tst-robust7.
2764 * tst-typesizes.c: New file.
2765 * Makefile (tests): Add tst-typesizes.
2767 * tst-once3.c: More debug output.
2769 2005-12-24 Ulrich Drepper <drepper@redhat.com>
2771 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2772 missing after last change.
2774 * version.c: Update copyright year.
2776 2005-12-23 Ulrich Drepper <drepper@redhat.com>
2778 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2779 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2780 * pthread_mutex_trylock.c: Likewise.
2781 * pthread_mutex_timedlock.c: Likewise.
2782 * pthread_mutex_unlock.c: Likewise.
2784 2005-12-22 Roland McGrath <roland@redhat.com>
2786 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2787 so that #include_next's search location is not reset to the -I..
2788 directory where <nptl/...> can be found.
2790 2005-12-22 Ulrich Drepper <drepper@redhat.com>
2793 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2794 Fix unwind info. Remove useless branch prediction prefix.
2795 * tst-cancel24.cc: New file.
2796 * Makefile: Add rules to build and run tst-cancel24.
2798 2005-12-21 Roland McGrath <roland@redhat.com>
2800 * libc-cancellation.c: Use <> rather than "" #includes.
2801 * pt-cleanup.c: Likewise.
2802 * pthread_create.c: Likewise.
2803 * pthread_join.c: Likewise.
2804 * pthread_timedjoin.c: Likewise.
2805 * pthread_tryjoin.c: Likewise.
2806 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2807 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2808 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2809 * unwind.c: Likewise.
2811 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2813 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2814 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2815 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2816 THREAD_COPY_POINTER_GUARD): Define.
2818 2005-12-19 Jakub Jelinek <jakub@redhat.com>
2820 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2822 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2823 THREAD_COPY_POINTER_GUARD): Define.
2824 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2825 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2826 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2827 THREAD_COPY_POINTER_GUARD): Define.
2828 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2829 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2830 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2831 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2832 Use PTR_DEMANGLE for B0 if defined.
2834 2005-12-17 Ulrich Drepper <drepper@redhat.com>
2836 * pthread_create.c (__pthread_create_2_1): Use
2837 THREAD_COPY_POINTER_GUARD if available.
2838 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2839 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2840 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2841 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2842 * sysdeps/x86_64/tls.h: Likewise.
2844 2005-12-15 Roland McGrath <roland@redhat.com>
2846 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2848 2005-12-13 Ulrich Drepper <drepper@redhat.com>
2850 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2852 * errno-loc.c: New file.
2854 2005-12-12 Roland McGrath <roland@redhat.com>
2856 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2857 adjustments before choosing stack size. Update minimum stack size
2858 calculation to match allocate_stack change.
2860 2005-12-12 Ulrich Drepper <drepper@redhat.com>
2862 * allocatestack.c (allocate_stack): Don't demand that there is an
2863 additional full page available on the stack beside guard, TLS, the
2866 2005-11-24 Ulrich Drepper <drepper@redhat.com>
2868 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2869 (__cleanup_fct_attribute): Use __regparm__ not regparm.
2871 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2872 compiling 32-bit code we must define __cleanup_fct_attribute.
2874 005-11-24 Jakub Jelinek <jakub@redhat.com>
2877 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2878 __attribute__ instead of __attribute.
2879 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2880 (__cleanup_fct_attribute): Likewise.
2882 2005-11-17 Jakub Jelinek <jakub@redhat.com>
2884 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2885 a write barrier before writing libgcc_s_getcfa.
2887 2005-11-06 Ulrich Drepper <drepper@redhat.com>
2889 * sysdeps/unix/sysv/linux/configure: Removed.
2891 2005-11-05 Ulrich Drepper <drepper@redhat.com>
2893 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2894 optional init_array/fini_array support.
2896 2005-10-24 Roland McGrath <roland@redhat.com>
2898 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2899 versioned_symbol use.
2901 2005-10-16 Roland McGrath <roland@redhat.com>
2903 * init.c (__pthread_initialize_minimal_internal): Even when using a
2904 compile-time default stack size, apply the minimum that allocate_stack
2905 will require, and round up to page size.
2907 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
2909 * Makefile ($(test-modules)): Remove static pattern rule.
2911 2005-10-14 Jakub Jelinek <jakub@redhat.com>
2912 Ulrich Drepper <drepper@redhat.com>
2914 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2915 alignment in callback function.
2916 * Makefile: Add rules to build and run tst-align3.
2917 * tst-align3.c: New file.
2919 2005-10-03 Jakub Jelinek <jakub@redhat.com>
2921 * allocatestack.c (setxid_signal_thread): Add
2922 INTERNAL_SYSCALL_DECL (err).
2924 2005-10-02 Jakub Jelinek <jakub@redhat.com>
2926 * allocatestack.c (setxid_signal_thread): Need to use
2927 atomic_compare_and_exchange_bool_acq.
2929 2005-10-01 Ulrich Drepper <drepper@redhat.com>
2930 Jakub Jelinek <jakub@redhat.com>
2932 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
2934 (struct pthread): Move specific_used field to avoid padding.
2935 Add setxid_futex field.
2936 * init.c (sighandler_setxid): Reset setxid flag and release the
2938 * allocatestack.c (setxid_signal_thread): New function. Broken
2939 out of the bodies of the two loops in __nptl_setxid. For undetached
2940 threads check whether they are exiting and if yes, don't send a signal.
2941 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2942 * pthread_create.c (start_thread): For undetached threads, check
2943 whether setxid bit is set. If yes, wait until signal has been
2946 * allocatestack.c (STACK_VARIABLES): Initialize them.
2947 * pthread_create.c (__pthread_create_2_1): Initialize pd.
2949 2004-09-02 Jakub Jelinek <jakub@redhat.com>
2951 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2952 waiters, awake all waiters on the associated mutex.
2954 2005-09-22 Roland McGrath <roland@redhat.com>
2956 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2957 ../sysdeps/x86_64/hp-timing.h).
2959 2005-08-29 Jakub Jelinek <jakub@redhat.com>
2961 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
2962 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2963 (lll_futex_wake_unlock): Define.
2964 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
2965 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2966 (lll_futex_wake_unlock): Define.
2967 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
2968 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2969 (lll_futex_wake_unlock): Define.
2970 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
2971 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2972 (lll_futex_wake_unlock): Define.
2973 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
2974 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2975 (lll_futex_wake_unlock): Define.
2976 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
2977 lll_futex_wake_unlock.
2978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2979 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2980 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2981 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2982 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2983 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2985 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2987 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2988 Fix typo in register name.
2990 2005-08-23 Ulrich Drepper <drepper@redhat.com>
2992 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2993 Use __sigfillset. Document that sigfillset does the right thing wrt
2996 2005-07-11 Jakub Jelinek <jakub@redhat.com>
2999 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3000 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3001 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3002 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3003 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3004 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3006 * Makefile (tests): Add tst-initializers1.
3007 (CFLAGS-tst-initializers1.c): Set.
3008 * tst-initializers1.c: New test.
3010 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3012 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3013 Make sure __flags are located at offset 48 from the start of the
3016 2005-07-02 Roland McGrath <roland@redhat.com>
3018 * Makeconfig: Comment fix.
3020 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3022 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3023 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3024 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3025 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3026 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3027 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3028 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3029 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3030 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3031 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3033 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3035 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3036 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3037 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3039 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3040 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3041 field. Put in sysinfo field unconditionally.
3042 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3043 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3044 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3045 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3047 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3048 * pthread_create.c (__pthread_create_2_1): Use
3049 THREAD_COPY_STACK_GUARD macro.
3050 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3052 * tst-stackguard1.c: New file.
3053 * tst-stackguard1-static.c: New file.
3055 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3057 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3058 Invoke CGOTSETUP and CGOTRESTORE.
3059 (CGOTSETUP, CGOTRESTORE): Define.
3061 2005-05-29 Richard Henderson <rth@redhat.com>
3063 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3064 (tf_write, tf_writev): Use it.
3065 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3068 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3070 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3071 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3072 __librt_*_asynccancel@local.
3074 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3076 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3077 all occurrences of JUMPTARGET. Instead append @local to labels.
3079 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3081 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3082 size/alignment of struct pthread rather than tcbhead_t.
3083 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3085 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3087 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3090 2005-05-19 Richard Henderson <rth@redhat.com>
3092 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3093 __sync_val_compare_and_swap, not explicit _si variant.
3094 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3096 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3099 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3101 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3103 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3104 .eh_frame section, use cfi_* directives.
3106 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3108 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3111 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3114 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3117 2005-04-27 Roland McGrath <roland@redhat.com>
3119 * Makefile (tests): Remove tst-clock2.
3121 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3122 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3123 translating to the kernel clockid_t for our own process/thread clock.
3125 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3127 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3129 * old_pthread_cond_init.c: Include <errno.h>.
3130 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3131 process shared or uses clock other than CLOCK_REALTIME.
3132 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3134 2005-04-13 David S. Miller <davem@davemloft.net>
3136 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3137 * sysdeps/sparc/sparc64/clone.S: New file.
3139 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3142 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3143 __inline instead of inline.
3144 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3146 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3148 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3149 functionally equivalent, but shorter instructions.
3150 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3151 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3152 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3154 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3155 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3156 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3157 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3158 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3159 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3160 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3162 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3163 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3164 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3165 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3166 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3168 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3170 * sysdeps/mips/Makefile: New file.
3171 * sysdeps/mips/nptl-sysdep.S: New file.
3172 * sysdeps/mips/tcb-offsets.sym: New file.
3173 * sysdeps/mips/pthread_spin_lock.S: New file.
3174 * sysdeps/mips/pthread_spin_trylock.S: New file.
3175 * sysdeps/mips/pthreaddef.h: New file.
3176 * sysdeps/mips/tls.h: New file.
3177 * sysdeps/mips/jmpbuf-unwind.h: New file.
3178 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3179 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3180 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3181 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3182 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3183 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3184 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3185 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3186 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3187 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3189 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3192 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3195 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3197 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3199 2005-02-25 Roland McGrath <roland@redhat.com>
3201 * alloca_cutoff.c: Correct license text.
3202 * tst-unload.c: Likewise.
3203 * sysdeps/pthread/allocalim.h: Likewise.
3204 * sysdeps/pthread/pt-initfini.c: Likewise.
3205 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3206 * sysdeps/pthread/bits/sigthread.h: Likewise.
3207 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3208 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3210 2005-02-16 Roland McGrath <roland@redhat.com>
3212 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3213 Use unsigned int * for ptr_nthreads.
3215 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3218 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3221 2005-02-07 Richard Henderson <rth@redhat.com>
3224 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3227 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3229 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3230 order of arguments in invocation of atomic_add_zero.
3232 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3235 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3236 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3237 at least gotntpoff relocation and addition.
3238 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3240 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3242 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3245 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3247 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3248 entry for static tls deallocation fix.
3249 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3250 also contains information whether the memory pointed to is static
3252 * sysdeps/i386/tls.h: Likewise.
3253 * sysdeps/ia64/tls.h: Likewise.
3254 * sysdeps/powerpc/tls.h: Likewise.
3255 * sysdeps/s390/tls.h: Likewise.
3256 * sysdeps/sh/tls.h: Likewise.
3257 * sysdeps/sparc/tls.h: Likewise.
3258 * sysdeps/x86_64/tls.h: Likewise.
3260 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3262 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3264 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3266 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3268 * Makefile (tests): Add tst-align2.
3269 * tst-align2.c: New test.
3270 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3271 -mpreferred-stack-boundary=4.
3273 2004-12-18 Roland McGrath <roland@redhat.com>
3275 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3276 New file removed withdrawn for the moment.
3278 2004-12-17 Richard Henderson <rth@redhat.com>
3280 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3281 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3283 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3285 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3286 Increased PTHREAD_STACK_MIN.
3288 * tst-context1.c (stacks): Use bigger stack size.
3290 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3292 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3293 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3295 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3297 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3298 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3299 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3301 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3303 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3305 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3307 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3308 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3310 * tst-getpid1.c: If child crashes, report this first. Print which
3313 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3315 * init.c (__pthread_initialize_minimal_internal): Also unblock
3318 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3320 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3321 _POSIX_THREAD_CPUTIME): Define to 0.
3322 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3323 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3324 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3325 __timer_signal_thread_tclk): Remove.
3326 (init_module): Remove their initialization.
3327 (thread_cleanup): Remove their cleanup assertions.
3328 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3329 __timer_signal_thread_tclk): Remove.
3330 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3331 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3332 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3334 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3336 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3337 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3339 * Makefile (tests): Add tst-getpid2.
3340 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3341 (do_test): Use it. Use __clone2 instead of clone on ia64.
3342 * tst-getpid2.c: New test.
3344 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3346 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3348 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3350 * Makefile (tests): Add tst-getpid1.
3351 * tst-getpid1.c: New file.
3352 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3353 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3355 2004-12-02 Roland McGrath <roland@redhat.com>
3357 * Makefile (libpthread-nonshared): Variable removed.
3358 ($(objpfx)libpthread_nonshared.a): Target removed.
3359 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3360 These are now handled by generic magic from
3361 libpthread-static-only-routines being set.
3363 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3365 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3366 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3367 _POSIX_THREAD_PRIO_PROTECT): Define.
3368 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3369 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3370 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3372 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3374 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3375 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3376 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3377 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3378 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3379 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3380 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3382 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3384 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3386 * Makefile (libpthread-routines): Add pthread_setschedprio.
3387 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3388 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3389 * pthread_setschedprio.c: New file.
3391 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3393 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3394 * pthread_cancel.c (pthread_create): Likewise.
3396 * Makefile (libpthread-routines): Add vars.
3397 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3398 * init.c (__default_stacksize, __is_smp): Remove.
3400 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3401 and define a wrapper macro.
3402 (PTHREAD_STATIC_FN_REQUIRE): Define.
3403 * allocatestack.c (__find_thread_by_id): Undefine.
3404 * pthread_create (__pthread_keys): Remove.
3405 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3406 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3407 PTHREAD_STATIC_FN_REQUIRE.
3409 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3411 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3412 parameter to REGISTER macro.
3414 2004-11-17 Roland McGrath <roland@redhat.com>
3416 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3417 Make sure SIGCANCEL is blocked as well.
3419 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3421 * sysdeps/pthread/setxid.h: New file.
3422 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3423 (struct xid_command): Add forward decl.
3424 (struct pthread_functions): Change return type of __nptl_setxid hook
3426 * pthreadP.h (__nptl_setxid): Change return type to int.
3427 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3428 calling thread, return its return value and set errno on failure.
3429 * descr.h (struct xid_command): Change id type to long array.
3431 * Makefile: Add rules to build and test tst-setuid1 and
3433 * tst-setuid1.c: New test.
3434 * tst-setuid1-static.c: New test.
3436 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3438 * Makefile (tests): Add tst-exit3.
3439 * tst-exit3.c: New test.
3441 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3443 * Makefile (tests): Add tst-exit2.
3444 * tst-exit2.c: New file.
3446 2004-11-09 Roland McGrath <roland@redhat.com>
3449 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3450 here, before calling clone.
3451 * pthread_create.c (start_thread): Don't do it here.
3453 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3455 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3457 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3459 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3460 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3463 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3465 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3466 if sched_priority is not between minprio and maxprio.
3468 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3470 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3471 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3473 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3474 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3476 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3478 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3479 not-cancelable I/O functions.
3481 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3483 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3484 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3485 make sure 2 is stored in the futex and we looked at the old value.
3486 Fix a few other problems to return the correct value.
3488 2004-10-14 Richard Henderson <rth@redhat.com>
3490 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3493 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3495 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3496 of pthread-functions.h and pthreaddef.h.
3497 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3499 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3500 Change __data.__nwaiters from int to unsigned int.
3502 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3503 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3505 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3508 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3509 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3511 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3513 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3514 test fails, remove message queue.
3515 (tf_msgsnd): Likewise.
3517 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3519 * tst-clock1.c: Change #ifdef to #if defined.
3520 * tst-clock2.c: Likewise.
3521 * tst-cond11.c: Likewise.
3523 * sysdeps/pthread/timer_create.c (timer_create): Use
3524 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3525 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3528 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3530 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3531 _POSIX_THREAD_CPUTIME): Define to 0.
3533 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3535 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3536 and _POSIX_THREAD_CPUTIME to zero.
3537 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3538 * tst-barrier2.c: Fix testing for POSIX feature.
3539 * tst-clock1.c: Likewise.
3540 * tst-clock2.c: Likewise.
3541 * tst-cond11.c: Likewise.
3542 * tst-cond4.c: Likewise.
3543 * tst-cond6.c: Likewise.
3544 * tst-flock2.c: Likewise.
3545 * tst-mutex4.c: Likewise.
3546 * tst-mutex9.c: Likewise.
3547 * tst-rwlock12.c: Likewise.
3548 * tst-rwlock4.c: Likewise.
3549 * tst-signal1.c: Likewise.
3550 * tst-spin2.c: Likewise.
3551 * sysdeps/pthread/posix-timer.h: Likewise.
3552 * sysdeps/pthread/timer_create.c: Likewise.
3553 * sysdeps/pthread/timer_routines.c: Likewise.
3555 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3557 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3558 (__lll_mutex_timedlock_wait): Address futex correctly.
3560 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3561 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3562 make sure 2 is stored in the futex and we looked at the old value.
3563 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3564 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3565 which might very well made the code not working at all before.
3568 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3570 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3571 allow SIGSETXID to be sent.
3572 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3573 for SIGSETXID to be defined.
3574 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3575 SIGSETXID cannot be blocked.
3577 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3578 Add __extension__ to long long types.
3579 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3580 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3581 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3582 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3583 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3584 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3585 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3587 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3589 * descr.h (struct pthread): Add stopped_start field.
3590 * sysdeps/pthread/createthread.c (create_thread): Set
3591 start_stopped flag in descriptor for new thread appropriately.
3592 * pthread_create.c (start_thread): Only take lock to be stopped on
3593 startup if stopped_start flag says so.
3595 2004-09-24 Ulrich Drepper <drepper@redhat.com>
3597 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3598 is created detached and if yes, do not try to free the stack in case
3599 the thread creation failed.
3600 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3601 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3602 case there has been no error. [BZ #405]
3604 * pthread_create.c (start_thread): Don't wait for scheduler data
3605 etc to be set at the beginning of the function. The cancellation
3606 infrastructure must have been set up. And enable async
3607 cancellation before potentially going to sleep. [BZ #401]
3609 2004-09-20 Ulrich Drepper <drepper@redhat.com>
3611 * Versions: Remove exports for pthread_set*id_np functions.
3612 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3614 * Makefile: Don't build pthread_set*id code for now.
3616 2004-09-19 Ulrich Drepper <drepper@redhat.com>
3618 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3620 * allocatestack.c (__nptl_setxid): New function.
3621 * descr.h (struct xid_command): Define type.
3622 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3623 (sighandler_setxid): New function.
3624 (__pthread_initialize_minimal): Register sighandler_setxid for
3626 * pt-allocrtsig.c: Update comment.
3627 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3628 Declare __nptl_setxid.
3629 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3630 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3631 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3632 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3633 and pthread_setresuid_np.
3634 * pthread_setgid_np.c: New file.
3635 * pthread_setuid_np.c: New file.
3636 * pthread_setegid_np.c: New file.
3637 * pthread_seteuid_np.c: New file.
3638 * pthread_setregid_np.c: New file.
3639 * pthread_setreuid_np.c: New file.
3640 * pthread_setresgid_np.c: New file.
3641 * pthread_setresuid_np.c: New file.
3642 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3643 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3644 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3645 and pthread_setresuid_np.
3646 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3647 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3648 pthread_setregid, and pthread_setresgid.
3650 2004-09-18 Ulrich Drepper <drepper@redhat.com>
3652 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3653 ENOMEM when out of memory.
3655 2004-09-10 Roland McGrath <roland@redhat.com>
3658 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3659 code, since we don't try to use the broken CLONE_STOPPED any more.
3660 * pthread_create.c (start_thread): Likewise.
3662 2004-09-15 Richard Henderson <rth@redhat.com>
3664 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3666 2004-09-01 David Mosberger <davidm@hpl.hp.com>
3668 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3669 (__libc_unwind_longjmp): Delete macro and declare as function.
3670 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3671 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3673 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3674 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3675 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3677 2004-09-12 Ulrich Drepper <drepper@redhat.com>
3679 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3681 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3682 types also for __USE_XOPEN2K.
3683 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3684 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3685 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3686 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3687 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3688 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3689 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3692 2004-09-08 Ulrich Drepper <drepper@redhat.com>
3694 * sysdeps/pthread/pthread.h
3695 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3696 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3697 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3698 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3701 2004-09-07 Ulrich Drepper <drepper@redhat.com>
3703 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3704 PSEUDO to be used with . prefix.
3706 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3707 Use atomic_increment instead of atomic_exchange_and_add.
3708 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3710 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3712 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3715 * allocatestack.c (allocate_stack): Use atomic_increment_val
3716 instead of atomic_exchange_and_add.
3717 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3718 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3720 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3723 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3724 the initialization function might throw.
3726 2005-09-05 Richard Henderson <rth@redhat.com>
3728 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3729 Move definition inside libpthread, libc, librt check. Provide
3730 definition for rtld.
3732 2004-09-02 Ulrich Drepper <drepper@redhat.com>
3734 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3735 * sysdeps/i386/jmpbuf-unwind.h: Likewise
3736 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3737 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3738 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3739 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3740 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3741 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3744 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3745 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3746 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3748 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3749 Decrement __nwaiters. If pthread_cond_destroy has been called and
3750 this is the last waiter, signal pthread_cond_destroy caller and
3751 avoid using the pthread_cond_t structure after unlock.
3752 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3753 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3754 Read clock type from the least significant bits of __nwaiters instead
3756 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3757 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3759 2004-08-31 Jakub Jelinek <jakub@redhat.com>
3762 * Makefile (tests): Add tst-cond20 and tst-cond21.
3763 * tst-cond20.c: New test.
3764 * tst-cond21.c: New test.
3765 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3766 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3768 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3770 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3771 (pthread_cond_t): Likewise.
3772 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3774 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3776 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3778 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3779 (cond_nwaiters): New.
3781 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3782 if there are waiters not signalled yet.
3783 Wait until all already signalled waiters wake up.
3784 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3785 __nwaiters. If pthread_cond_destroy has been called and this is the
3786 last waiter, signal pthread_cond_destroy caller and avoid using
3787 the pthread_cond_t structure after unlock.
3788 (__pthread_cond_wait): Increment __nwaiters in the beginning,
3789 decrement it when leaving. If pthread_cond_destroy has been called
3790 and this is the last waiter, signal pthread_cond_destroy caller.
3791 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3792 Likewise. Read clock type from the least significant bits of
3793 __nwaiters instead of __clock.
3794 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3795 whether clock ID can be encoded in COND_CLOCK_BITS bits.
3796 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3797 clock type just from the last COND_CLOCK_BITS bits of value.
3798 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3799 instead of __clock, just from second bit of condattr's value.
3801 2004-08-30 Jakub Jelinek <jakub@redhat.com>
3803 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3804 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
3806 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3808 2004-08-15 Roland McGrath <roland@frob.com>
3810 * pthread_atfork.c: Update copyright terms including special exception
3811 for these trivial files, which are statically linked into executables
3812 that use dynamic linking for the significant library code.
3814 2004-08-09 Jakub Jelinek <jakub@redhat.com>
3816 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3817 pthread_rwlock_rdlock.
3818 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3819 Decrease __nr_readers_queued after reacquiring lock.
3820 * sysdeps/pthread/pthread_rwlock_timedrdlock
3821 (pthread_rwlock_timedrdlock): Likewise.
3822 Reported by Bob Cook <bobcook47@hotmail.com>.
3824 2004-08-11 Jakub Jelinek <jakub@redhat.com>
3826 * tst-rwlock14.c (tf): Read main thread handle from *ARG
3827 before pthread_barrier_wait.
3829 2004-08-07 Ulrich Drepper <drepper@redhat.com>
3831 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3832 Remove unnecessary exception handling data.
3834 2004-07-23 Jakub Jelinek <jakub@redhat.com>
3837 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3838 instead of clockid_t.
3840 2004-07-21 Roland McGrath <roland@redhat.com>
3842 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3844 2004-07-19 Roland McGrath <roland@redhat.com>
3846 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3848 2004-07-02 Roland McGrath <roland@redhat.com>
3850 * configure: Don't exit.
3852 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3854 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3855 (__pthread_cond_timedwait): Check for invalid nanosecond in
3858 2004-07-07 Ulrich Drepper <drepper@redhat.com>
3860 * Makefile: Add rules to build and run tst-fini1.
3861 * tst-fini1.c: New file.
3862 * tst-fini1mod.c: New file.
3864 2004-07-05 Ulrich Drepper <drepper@redhat.com>
3866 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3867 if no cancellation support is needed.
3868 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3869 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3870 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3871 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3872 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3873 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3874 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3875 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3876 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3878 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3879 only if not already defined.
3881 2004-07-05 Jakub Jelinek <jakub@redhat.com>
3883 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3884 constraint "m" instead of "0" for futex.
3886 * shlib-versions: Add powerpc64-.*-linux.*.
3888 2004-07-04 Jakub Jelinek <jakub@redhat.com>
3890 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3891 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3893 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3894 1 billion and 64-bit tv_nsec which is valid when truncated to 32
3897 2004-06-29 Roland McGrath <roland@redhat.com>
3899 * Banner: NPTL no longer has its own version number.
3900 * Makefile (nptl-version): Variable removed.
3901 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3902 using $(version), the glibc version number.
3904 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3906 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3907 Fix branch offset for a PLT entry.
3908 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3910 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3912 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3914 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3917 2004-06-28 Jakub Jelinek <jakub@redhat.com>
3919 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3922 2004-06-28 Jakub Jelinek <jakub@redhat.com>
3924 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3925 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3927 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3928 (pthread_rwlock_timedrdlock): Likewise.
3930 2004-06-22 Jakub Jelinek <jakub@redhat.com>
3932 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3933 Set __r7 to val, not mutex.
3935 2004-06-27 Ulrich Drepper <drepper@redhat.com>
3937 * Makefile: Add rules to build tst-rwlock14.
3938 * tst-rwlock14.c: New file.
3940 2004-06-24 Boris Hu <boris.hu@intel.com>
3942 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3944 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3946 2004-06-19 Andreas Jaeger <aj@suse.de>
3948 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3949 assembler in last patch.
3951 2004-06-17 Ulrich Drepper <drepper@redhat.com>
3953 * sysdeps/pthread/pthread_cond_timedwait.c
3954 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3955 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3956 (__pthread_cond_timedwait): Check for invalid nanosecond in
3958 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3959 * tst-cond19.c: New file.
3960 * Makefile: Add rules to build and run tst-cond19.
3962 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
3964 * tst-context1.c (GUARD_PATTERN): Defined.
3965 (tst_context_t): Define struct containing ucontext_t & guard words.
3966 (ctx): Declare as an array of tst_context_t.
3967 (fct): Verify uc_link & guard words are still valid.
3968 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
3970 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3972 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3973 Add __data.__futex field, reshuffle __data.__clock.
3974 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
3975 (__pthread_cond_signal): Increment __futex at the same time as
3976 __wakeup_seq or __total_seq. Pass address of __futex instead of
3977 address of low 32-bits of __wakeup_seq to futex syscall.
3978 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3979 (__pthread_cond_wait): Likewise. Pass __futex value from before
3980 releasing internal lock to FUTEX_WAIT.
3981 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3982 (__pthread_cond_timedwait): Likewise.
3983 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3984 (FUTEX_CMP_REQUEUE): Define.
3985 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3986 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3987 Pass __futex value from before the unlock and __futex address instead
3988 of address of low 32-bits of __wakeup_seq to futex syscall.
3989 Fallback to FUTEX_WAKE all on any errors.
3991 2004-06-08 Jakub Jelinek <jakub@redhat.com>
3993 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
3995 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
3996 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
3997 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
3998 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
3999 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4001 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4003 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4004 Add memory clobber to inline assembly.
4005 (__lll_mutex_trylock): Likewise.
4006 (__lll_mutex_cond_trylock): Likewise.
4008 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4010 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4011 Pass val argument as 6th system call argument in %r7.
4013 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4015 * Makefile (tests): Add tst-cond16.
4016 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4017 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4018 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4019 Add __data.__futex field, reshuffle __data.__clock.
4020 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4021 (__pthread_cond_signal): Increment __futex at the same time as
4022 __wakeup_seq or __total_seq. Pass address of __futex instead of
4023 address of low 32-bits of __wakeup_seq to futex syscall.
4024 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4025 (__pthread_cond_wait): Likewise. Pass __futex value from before
4026 releasing internal lock to FUTEX_WAIT.
4027 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4028 (__pthread_cond_timedwait): Likewise.
4029 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4030 (FUTEX_CMP_REQUEUE): Define.
4031 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4032 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4033 Pass __futex value from before the unlock and __futex address instead
4034 of address of low 32-bits of __wakeup_seq to futex syscall.
4035 Fallback to FUTEX_WAKE all on any errors.
4036 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4038 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4039 internally. Return non-zero if error, zero if success.
4040 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4041 Add __data.__futex field, reshuffle __data.__clock.
4042 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4044 (lll_futex_requeue): Add val argument, return 1 unconditionally
4046 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4047 Add __data.__futex field, reshuffle __data.__clock.
4048 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4050 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4051 internally. Return non-zero if error, zero if success.
4052 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4053 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4054 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4056 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4057 internally. Return non-zero if error, zero if success.
4058 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4059 Add __data.__futex field, reshuffle __data.__clock.
4060 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4062 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4063 internally. Return non-zero if error, zero if success.
4064 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4065 Add __data.__futex field, reshuffle __data.__clock.
4066 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4067 Add __data.__futex field, reshuffle __data.__clock.
4068 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4069 Increment __futex at the same time as __wakeup_seq or __total_seq.
4070 Pass address of __futex instead of address of low 32-bits of
4071 __wakeup_seq to futex syscall.
4072 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4073 Pass __futex value from before releasing internal lock
4075 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4076 Likewise. Avoid unnecessary shadowing of variables.
4077 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4078 Set __futex to 2 * __total_seq. Pass __futex value from before the
4079 unlock and __futex address instead of address of low 32-bits of
4080 __wakeup_seq to futex_requeue macro, adjust for new return value
4082 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4083 (__pthread_cond_signal): Increment __futex at the same time as
4084 __wakeup_seq or __total_seq. Pass address of __futex instead of
4085 address of low 32-bits of __wakeup_seq to futex syscall.
4086 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4087 (__pthread_cond_wait): Likewise. Pass __futex value from before
4088 releasing internal lock to FUTEX_WAIT.
4089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4090 (__pthread_cond_timedwait): Likewise.
4091 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4092 (FUTEX_CMP_REQUEUE): Define.
4093 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4094 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4095 Pass __futex value from before the unlock and __futex address instead
4096 of address of low 32-bits of __wakeup_seq to futex syscall.
4097 Fallback to FUTEX_WAKE all on any errors.
4099 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4101 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4102 Add nop to align the end of critical section.
4103 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4105 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4107 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4108 Add __broadcast_seq field.
4109 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4110 all waiters as woken with woken_seq and bump broadcast counter.
4111 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4112 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4113 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4114 Comment typo fixes. Avoid returning -ETIMEDOUT.
4116 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4119 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4120 Reported by Kaz Kojima.
4122 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4124 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4126 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4128 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4129 __broadcast_seq with bc_seq after acquiring internal lock instead of
4132 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4134 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4137 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4138 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4139 (pthread_cond_t): Add __data.__broadcast_seq field.
4140 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4141 (FRAME_SIZE): Define.
4142 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4144 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4146 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4148 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4149 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4152 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4154 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4155 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4156 Add __broadcast_seq field.
4157 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4158 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4159 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4160 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4161 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4162 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4163 all waiters as woken with woken_seq and bump broadcast counter.
4164 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4165 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4166 __broadcast_seq field.
4167 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4168 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4169 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4170 * pthread_cond_init.c: Initialize __broadcast_seq field.
4171 * Makefile (tests): Add tst-cond17 and tst-cond18.
4172 Add .NOTPARALLEL goal.
4173 * tst-cond16.c: New file. From Jakub.
4174 * tst-cond17.c: New file. From Jakub.
4175 * tst-cond18.c: New file. From Jakub.
4177 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4179 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4183 Parametrize frame size. Correct some unwind info.
4184 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4186 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4188 * tst-stack3.c: Note testing functionality beyond POSIX.
4190 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4192 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4193 Change conditional from ifdef to if.
4195 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4197 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4198 SYSDEP_CANCEL_ERROR): Define.
4201 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4203 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4205 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4207 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4209 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4211 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4212 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4213 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4214 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4216 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4218 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4219 thread has all signals blocked.
4221 2004-04-18 Andreas Jaeger <aj@suse.de>
4223 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4224 (SEM_VALUE_MAX): Add missing brace.
4226 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4228 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4230 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4231 * sysdeps/pthread/tst-mqueue8x.c: New test.
4232 * tst-cancel4.c: Update comment about message queues.
4234 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4235 return it_value { 0, 0 }.
4236 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4238 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4239 assertion for SIGEV_NONE.
4240 (thread_attr_compare): Compare all attributes, not just a partial
4243 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4245 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4247 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4249 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4250 Just use a plain number.
4251 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4252 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4253 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4254 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4255 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4256 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4257 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4259 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4261 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4263 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4265 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4267 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4268 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4269 of calling sigwaitinfo.
4271 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4273 * allocatestack.c (allocate_stack): Set reported_guardsize
4275 * pthread_getattr_np.c (pthread_getattr_np): Use
4276 reported_guardsize instead of guardsize.
4277 * descr.h (struct pthread): Add reported_guardsize field.
4279 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4281 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4283 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4285 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4287 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4289 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4290 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4291 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4292 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4293 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4295 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4296 (_POSIX_MESSAGE_PASSING): Define.
4297 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4298 (_POSIX_MESSAGE_PASSING): Define.
4299 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4300 (_POSIX_MESSAGE_PASSING): Define.
4302 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4304 * tst-context1.c (fct): Check whether correct stack is used.
4306 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4308 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4309 matching constraints for asm mem parameters.
4311 * tst-clock2.c (tf): Don't define unless needed.
4313 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4315 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4318 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4320 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4321 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4322 * pthreadP.h: Declare __nptl_deallocate_tsd.
4323 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4326 * Makefile (tests): Add tst-tsd5.
4327 * tst-tsd5.c: New file.
4329 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4331 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4332 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4333 is SHLIB_COMPAT check.
4334 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4335 (__pthread_attr_getaffinity_old): Likewise.
4336 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4337 (__pthread_getaffinity_old): Likewise.
4338 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4339 (__pthread_setaffinity_old): Likewise.
4341 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4343 * allocatestack.c (_make_stacks_executable): Call
4344 _dl_make_stack_executable first.
4346 2004-03-24 Roland McGrath <roland@redhat.com>
4348 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4349 constraint instead of "0".
4351 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4353 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4354 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4356 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4357 code to avoid warning.
4359 2004-03-24 Andreas Jaeger <aj@suse.de>
4361 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4362 (__pthread_attr_setaffinity_old): Remove const.
4364 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4366 * sysdeps/unix/sysv/linux/smp.h: New file.
4367 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4368 * init.c: Define __is_smp.
4369 (__pthread_initialize_minimal_internal): Call is_smp_system to
4370 initialize __is_smp.
4371 * pthreadP.h: Declare __is_smp.
4372 Define MAX_ADAPTIVE_COUNT is necessary.
4373 * pthread_mutex_init.c: Add comment regarding __spins field.
4374 * pthread_mutex_lock.c: Implement adaptive mutex type.
4375 * pthread_mutex_timedlock.c: Likewise.
4376 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4377 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4379 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4380 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4381 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4382 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4383 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4384 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4385 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4386 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4387 lll_mutex_cond_trylock.
4388 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4389 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4390 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4391 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4392 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4393 Define BUSY_WAIT_NOP.
4394 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4395 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4397 * tst-mutex5.c: Add support for testing adaptive mutexes.
4398 * tst-mutex7.c: Likewise.
4399 * tst-mutex5a.c: New file.
4400 * tst-mutex7a.c: New file.
4401 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4403 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4404 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4405 vgettimeofday call might destroy the content.
4407 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4410 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4411 No need to restrict type of ret. Make it int. Add comment.
4413 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4414 Remove unnecessary setne instruction.
4416 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4418 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4419 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4420 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4421 If realloc fails, break out of the loop.
4423 2004-03-20 Andreas Jaeger <aj@suse.de>
4425 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4426 (__pthread_setaffinity_old): Fix interface.
4427 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4428 (__pthread_getaffinity_old): Likewise.
4430 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4431 (__pthread_setaffinity_new): Remove duplicate declaration.
4433 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4435 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4436 the return value to a safe register.
4437 (CDISABLE): Set the function argument correctly.
4439 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4441 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4442 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4443 Rewrite so that only one locked memory operation per round is needed.
4444 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4445 (pthread_barrier_wait): After wakeup, release lock only when the
4446 last thread stopped using the barrier object.
4447 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4448 (__pthread_cond_wait): Don't store mutex address if the current
4449 value is ~0l. Add correct cleanup support and unwind info.
4450 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4451 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4452 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4453 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4454 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4455 Add correct cleanup support and unwind info.
4456 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4457 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4458 information for syscall wrappers.
4460 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4462 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4463 cpusetsize field, remove next.
4464 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4465 parameter for size of the CPU set.
4466 (pthread_setaffinity_np): Likewise.
4467 (pthread_attr_getaffinity_np): Likewise.
4468 (pthread_attr_setaffinity_np): Likewise.
4469 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4470 interface change, keep compatibility code.
4471 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4472 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4473 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4474 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4475 __pthread_getaffinity_np.
4476 * Versions: Add version for changed interfaces.
4477 * tst-attr3.c: Adjust test for interface change.
4478 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4479 increasing buffer sizes.
4480 * pthread_attr_destroy.c: Remove unused list handling.
4481 * pthread_attr_init.c: Likewise.
4483 2004-03-17 Roland McGrath <roland@redhat.com>
4485 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4486 first argument to clock_getres so we ever enable kernel timers.
4488 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4490 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4492 2004-03-12 Richard Henderson <rth@redhat.com>
4494 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4495 oldvalue from CENABLE to CDISABLE.
4497 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4499 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4500 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4501 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4502 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4504 2004-03-11 Richard Henderson <rth@redhat.com>
4506 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4507 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4508 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4510 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4512 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4513 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4514 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4516 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4518 * forward.c (__pthread_cond_broadcast_2_0,
4519 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4520 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4521 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4523 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4525 * sysdeps/sh/tcb-offsets.sym: Add PID.
4526 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4527 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4529 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4531 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4532 include <sysdep-cancel.h>, vfork is no cancellation point.
4533 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4534 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4535 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4537 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4539 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4541 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4542 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4544 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4546 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4547 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4548 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4549 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4550 of DO_CALL_VIA_BREAK. Work around a gas problem.
4552 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4553 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4554 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4555 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4556 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4557 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4559 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4560 a local register for saving old PID. Negate PID in parent upon exit.
4562 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4564 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4565 before syscall, set to the old value in the parent afterwards.
4566 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4567 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4569 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4570 before syscall, set to the old value in the parent afterwards.
4571 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4572 * sysdeps/s390/tcb-offsets.sym: Add PID.
4574 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4575 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4576 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4577 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4578 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4579 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4581 2004-03-10 Andreas Schwab <schwab@suse.de>
4583 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4584 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4585 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4587 2004-03-09 Jakub Jelinek <jakub@redhat.com>
4589 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4590 * tst-cancel21.c (do_one_test): Likewise.
4591 Reported by Gordon Jin <gordon.jin@intel.com>.
4593 2004-02-09 Jakub Jelinek <jakub@redhat.com>
4595 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4596 if non-zero and set to INT_MIN if zero.
4597 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4598 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4599 (SAVE_PID, RESTORE_PID): Define.
4601 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4602 Use relative path to avoid including NPTL i386/vfork.S.
4603 (SAVE_PID, RESTORE_PID): Define.
4604 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4605 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4606 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4608 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4609 * tst-vfork1.c: New test.
4610 * tst-vfork2.c: New test.
4611 * tst-vfork1x.c: New test.
4612 * tst-vfork2x.c: New test.
4614 2004-03-08 Ulrich Drepper <drepper@redhat.com>
4616 * sysdeps/i386/tcb-offsets.sym: Add PID.
4617 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4618 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4619 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4621 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4623 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4625 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4627 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4630 2004-03-07 Ulrich Drepper <drepper@redhat.com>
4632 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4635 * tst-once4.c: Remove unnecessary macro definition.
4637 * tst-mutex7.c (do_test): Limit thread stack size.
4638 * tst-once2.c (do_test): Likewise.
4639 * tst-tls3.c (do_test): Likewise.
4640 * tst-tls1.c (do_test): Likewise.
4641 * tst-signal3.c (do_test): Likewise.
4642 * tst-kill6.c (do_test): Likewise.
4643 * tst-key4.c (do_test): Likewise.
4644 * tst-join4.c (do_test): Likewise.
4645 * tst-fork1.c (do_test): Likewise.
4646 * tst-context1.c (do_test): Likewise.
4647 * tst-cond2.c (do_test): Likewise.
4648 * tst-cond10.c (do_test): Likewise.
4649 * tst-clock2.c (do_test): Likewise.
4650 * tst-cancel10.c (do_test): Likewise.
4651 * tst-basic2.c (do_test): Likewise.
4652 * tst-barrier4.c (do_test): Likewise.
4654 2004-03-05 Ulrich Drepper <drepper@redhat.com>
4656 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4658 2004-03-01 Ulrich Drepper <drepper@redhat.com>
4660 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4661 (__pthread_cond_timedwait): Optimize wakeup test.
4662 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4663 (__pthread_cond_wait): Likewise.
4664 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4665 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4668 2004-02-29 Ulrich Drepper <drepper@redhat.com>
4670 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4671 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4672 the atomic instruction needed.
4673 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4674 (__lll_mutex_lock_wait): Likewise.
4676 2004-02-28 Ulrich Drepper <drepper@redhat.com>
4678 * Makefile (tests): Add tst-cond14 and tst-cond15.
4679 * tst-cond14.c: New file.
4680 * tst-cond15.c: New file.
4682 2004-02-27 Ulrich Drepper <drepper@redhat.com>
4684 * sysdeps/pthread/createthread.c (create_thread): Remove use of
4685 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
4686 needs to be implemented differently to be useful.
4688 2004-02-26 Ulrich Drepper <drepper@redhat.com>
4690 * pthread_attr_setschedparam.c: Don't test priority against limits
4691 here. Set ATTR_FLAG_SCHED_SET flag.
4692 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4693 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4694 from parent thread to child. If attribute is used and scheduling
4695 parameters are not inherited, copy parameters from attribute or
4696 compute them. Check priority value.
4697 * pthread_getschedparam.c: If the parameters aren't known yet get
4698 them from the kernel.
4699 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4700 ATTR_FLAG_POLICY_SET flag for thread.
4701 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4702 and ATTR_FLAG_POLICY_SET.
4704 * sysdeps/pthread/createthread.c: Use tgkill if possible.
4706 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4707 fail if stack address hasn't been set. Just return 0.
4709 2004-02-25 Ulrich Drepper <drepper@redhat.com>
4711 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
4712 libpthread for the files in this list.
4713 (CFLAGS-tst-unload): Removed.
4714 * tst-unload.c (do_test): Don't use complete path for
4717 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4720 2004-02-22 Ulrich Drepper <drepper@redhat.com>
4722 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4723 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4724 operation per round is needed.
4725 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4726 (__lll_mutex_lock_wait): Likewise.
4728 2004-02-20 Ulrich Drepper <drepper@redhat.com>
4730 * tst-cancel9.c (cleanup): Don't print to stderr.
4732 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4734 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4736 2004-02-20 Jakub Jelinek <jakub@redhat.com>
4738 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4739 (__syscall_error_handler2): Call CDISABLE.
4740 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4741 (__syscall_error_handler2): Call CDISABLE.
4743 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4744 Release lock before the loop, don't reacquire it.
4746 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4748 2004-02-19 Andreas Schwab <schwab@suse.de>
4750 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4753 2004-02-18 Ulrich Drepper <drepper@redhat.com>
4755 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4756 (pthread_barrier_wait): After wakeup, release lock only when the
4757 last thread stopped using the barrier object.
4758 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4759 (pthread_barrier_wait): Likewise.
4760 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4762 * Makefile (tests): Add tst-barrier4.
4763 * tst-barrier4.c: New file.
4765 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4766 (__pthread_cond_timedwait): Perform timeout test while holding
4767 internal lock to prevent wakeup race.
4768 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4769 * sysdeps/pthread/pthread_cond_timedwait.c
4770 (__pthread_cond_timedwait): Likewise.
4771 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4772 (__pthread_cond_timedwait): Likewise.
4774 2004-02-18 Jakub Jelinek <jakub@redhat.com>
4776 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4777 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4778 * Makefile (tests): Add tst-rwlock13.
4779 * tst-rwlock13.c: New test.
4781 2004-02-16 Ulrich Drepper <drepper@redhat.com>
4783 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4784 (__condvar_tw_cleanup): Little optimization.
4785 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4787 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
4789 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4790 libpthread as "lib" parameter to SHLIB_COMPAT.
4791 (__novmx_siglongjmp): Fix typo in function name.
4792 (__novmx_longjmp): Fix typo in function name.
4794 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4796 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4799 * sysdeps/generic/pt-longjmp.c: Moved to...
4800 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
4802 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
4804 * Makefile (libpthread-routines): Add pt-cleanup.
4805 * pt-longjmp.c: Removed.
4806 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4807 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4808 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4809 Version longjmp, siglongjmp for GLIBC_2.3.4.
4810 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4812 2004-02-13 Ulrich Drepper <drepper@redhat.com>
4814 * sysdeps/pthread/pthread_cond_timedwait.c
4815 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
4816 Reuse code. Add __builtin_expects.
4818 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4819 (__pthread_cond_timedwait): Get internal lock in case timeout has
4820 passed before the futex syscall.
4821 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4823 2004-01-20 Ulrich Drepper <drepper@redhat.com>
4825 * allocatestack.c: Pretty printing.
4827 * sysdeps/pthread/createthread.c (create_thread): Don't add
4828 CLONE_DETACHED bit if it is not necessary.
4830 2004-01-16 Ulrich Drepper <drepper@redhat.com>
4832 * pthread_getattr_np.c: Include ldsodefs.h.
4834 2004-01-16 Richard Henderson <rth@redhat.com>
4836 * allocatestack.c: Don't declare __libc_stack_end.
4837 * init.c (__pthread_initialize_minimal_internal): Likewise.
4838 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4840 2004-01-15 Richard Henderson <rth@redhat.com>
4842 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4843 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4844 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4845 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4846 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4847 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4848 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4849 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4851 2004-01-14 Ulrich Drepper <drepper@redhat.com>
4853 * init.c (pthread_functions): Make array const.
4855 2004-01-13 Ulrich Drepper <drepper@redhat.com>
4857 * allocatestack.c (__make_stacks_executable): Change interface.
4858 Check parameters. Pass parameter on to libc counterpart.
4859 * pthreadP.h: Change declaration.
4861 2004-01-13 Richard Henderson <rth@redhat.com>
4863 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4865 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4868 * sysdeps/alpha/Makefile: New file.
4869 * sysdeps/alpha/tcb-offsets.sym: New file.
4870 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4871 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4873 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4876 2004-01-08 Jakub Jelinek <jakub@redhat.com>
4878 * Makefile (tests): Add tst-backtrace1.
4879 * tst-backtrace1.c: New test.
4881 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
4883 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4884 register as second parameter to the REGISTER macro.
4885 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4886 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4887 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4888 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4889 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4890 of thread register as second parameter to REGISTER macro in 64 case.
4892 2004-01-03 Ulrich Drepper <drepper@redhat.com>
4894 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4895 (CFLAGS-getpid.o): Defined.
4896 (CFLAGS-getpid.os): Defined.
4898 2003-12-31 Ulrich Drepper <drepper@redhat.com>
4900 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4901 returned for main thread does not overlap with any other VMA.
4902 Patch by Jakub Jelinek.
4904 2003-12-29 Jakub Jelinek <jakub@redhat.com>
4906 * tst-raise1.c: Include stdio.h.
4908 2003-12-23 Jakub Jelinek <jakub@redhat.com>
4910 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4911 setting with __ASSUME_TGKILL || defined __NR_tgkill.
4912 If pid is 0, set it to selftid.
4913 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4914 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
4915 != 0, return self->tid without doing a syscall.
4916 * descr.h (struct pthread): Move pid field after tid.
4918 * Makefile (tests): Add tst-raise1.
4919 * tst-raise1.c: New file.
4921 2003-12-23 Roland McGrath <roland@redhat.com>
4923 * tst-oddstacklimit.c: New file.
4924 * Makefile (tests): Add it.
4925 (tst-oddstacklimit-ENV): New variable.
4927 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4928 value up to page size for __default_stacksize.
4930 2003-12-21 Ulrich Drepper <drepper@redhat.com>
4932 * Makefile (tests): Add tst-eintr5.
4933 * tst-eintr5.c: New file.
4935 * eintr.c (eintr_source): Prevent sending signal to self.
4937 * tst-eintr2.c (tf1): Improve error message.
4939 2003-12-20 Ulrich Drepper <drepper@redhat.com>
4941 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4942 * sysdeps/unix/sysv/linux/getpid.c: New file.
4943 * pthread_cancel.c: Add comment explaining use of PID field.
4944 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4945 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4946 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4947 temporarily to signal the field must not be relied on and updated
4949 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4950 temporarily negative.
4951 * sysdeps/unix/sysv/linux/raise.c: Likewise.
4953 2003-12-19 Ulrich Drepper <drepper@redhat.com>
4955 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
4956 (eintr_source): If ARG != NULL, use pthread_kill.
4957 * tst-eintr1.c: Adjust for this change.
4958 * tst-eintr2.c: Likewise.
4959 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
4960 * tst-eintr3.c: New file.
4961 * tst-eintr4.c: New file.
4963 2003-12-19 Jakub Jelinek <jakub@redhat.com>
4965 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
4966 if CANCELSTATE_BITMASK is set.
4967 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
4970 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
4971 (tests-reverse): Add tst-cancel23.
4972 * tst-cancel22.c: New test.
4973 * tst-cancel23.c: New test.
4975 2003-12-18 Ulrich Drepper <drepper@redhat.com>
4977 * tst-eintr1.c: Better error messages.
4979 * Makefile (tests): Add tst-eintr2.
4980 * tst-eintr2.c: New file.
4982 2003-12-18 Jakub Jelinek <jakub@redhat.com>
4984 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
4985 (CFLAGS-tst-cancelx21.c): Set.
4986 * tst-cancel21.c: New test.
4987 * tst-cancelx21.c: New test.
4989 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
4991 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
4992 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
4993 * pt-longjmp.c: Include jmpbuf-unwind.h.
4994 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
4995 _JMPBUF_UNWINDS. Adjust compared pointers.
4996 * init.c (__pthread_initialize_minimal_internal): Initialize
4997 pd->stackblock_size.
4998 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
4999 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5000 * sysdeps/i386/jmpbuf-unwind.h: New file.
5001 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5002 * sysdeps/s390/jmpbuf-unwind.h: New file.
5003 * sysdeps/sh/jmpbuf-unwind.h: New file.
5004 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5005 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5006 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5007 (_JMPBUF_CFA_UNWINDS): Remove.
5008 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5010 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5012 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5013 (CFLAGS-tst-cancelx20.c): Set.
5014 * tst-cancel20.c: New test.
5015 * tst-cancelx20.c: New test.
5017 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5019 * init.c (__pthread_initialize_minimal_internal): Don't treat
5020 architectures with separate register stack special here when
5021 computing default stack size.
5023 2003-12-17 Roland McGrath <roland@redhat.com>
5025 * Makefile (tst-cancelx7-ARGS): New variable.
5026 Reportd by Greg Schafer <gschafer@zip.com.au>.
5028 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5030 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5031 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5032 (tst-stack3-ENV): Set.
5033 ($(objpfx)tst-stack3-mem): New.
5034 * tst-stack3.c: New test.
5036 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5038 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5039 Add unwind directives. Drop unused .regstk directive.
5040 (_fini_EPILOG_BEGINS): Add unwind directives.
5042 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5044 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5045 Assume parameter is a pointer.
5046 (lll_futex_wake): Likewise.
5047 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5049 (lll_futex_wake): Likewise.
5050 Reported by Boris Hu.
5051 * sysdeps/unix/sysv/linux/unregister-atfork.c
5052 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5054 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5056 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5058 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5059 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5060 __rtld_lock_initialize for ld.so lock.
5061 Patch in part by Adam Li <adam.li@intel.com>.
5063 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5065 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5066 in $(gnulib). Also, remove stale comment.
5068 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5070 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5071 advantage of new syscall stub and optimize accordingly.
5073 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5074 from SYS_futex, to match expectations of
5075 sysdep.h:DO_INLINE_SYSCALL.
5076 (lll_futex_clobbers): Remove.
5077 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5078 (lll_futex_wake): Likewise.
5079 (lll_futex_requeue): Likewise.
5080 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5081 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5083 (__lll_mutex_lock): Likewise.
5084 (__lll_mutex_cond_lock): Likewise.
5085 (__lll_mutex_timed_lock): Likewise.
5086 (__lll_mutex_unlock): Likewise.
5087 (__lll_mutex_unlock_force): Likewise.
5089 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5090 comes before the include of <sysdep.h>.
5091 (THREAD_SELF_SYSINFO): New macro.
5092 (THREAD_SYSINFO): Likewise.
5093 (INIT_SYSINFO): New macro.
5094 (TLS_INIT_TP): Call INIT_SYSINFO.
5096 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5098 * sysdeps/pthread/createthread.c (create_thread): Use
5099 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5100 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5101 THREAD_SELF_SYSINFO instead of open code.
5102 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5103 (THREAD_SYSINFO): Likewise.
5105 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5107 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5109 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5111 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5112 instead of .init. Patch by David Mosberger.
5114 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5116 * sysdeps/pthread/configure.in: Remove broken declaration in C
5117 cleanup handling check.
5119 2003-11-30 Andreas Jaeger <aj@suse.de>
5121 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5122 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5125 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5127 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5128 * pthread_attr_destroy.c: Include shlib-compat.h.
5129 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5130 is set in iattr->flags.
5131 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5133 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5135 * Makefile (distribute): Add tst-cleanup4aux.c.
5137 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5140 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5142 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5143 pthread_cond_signal.
5145 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5146 store mutex address if the current value is ~0l.
5147 * sysdeps/pthread/pthread_cond_timedwait.c
5148 (__pthread_cond_timedwait): Likewise.
5149 * sysdeps/pthread/pthread_cond_broadcast.c
5150 (__pthread_cond_broadcast): Don't use requeue for pshared
5153 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5154 (__pthread_cond_wait): Don't store mutex address if the current
5156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5157 (__pthread_cond_timedwait): Likewise.
5158 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5159 (__pthread_cond_broadcast): Don't use requeue for pshared
5162 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5163 element with ~0l for pshared condvars, with NULL otherwise.
5165 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5166 (__pthread_cond_wait): Don't store mutex address if the current
5168 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5169 (__pthread_cond_timedwait): Likewise.
5170 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5171 (__pthread_cond_broadcast): Don't use requeue for pshared
5174 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5175 * tst-cond12.c: New file.
5176 * tst-cond13.c: New file.
5178 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5180 * sysdeps/pthread/configure.in: Make missing forced unwind support
5183 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5185 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5187 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5189 * Makefile: Add magic to clean up correctly.
5191 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5193 * unwind.c (FRAME_LEFT): Define.
5194 (unwind_stop): Handle old style cleanups here.
5195 (__pthread_unwind): Handle old style cleanups only if
5196 !HAVE_FORCED_UNWIND.
5197 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5198 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5199 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5200 ($(objpfx)tst-cleanupx4): Likewise.
5201 * tst-cleanup4.c: New test.
5202 * tst-cleanup4aux.c: New.
5203 * tst-cleanupx4.c: New test.
5205 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5207 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5208 lll_mutex_*lock macros to skip atomic operations on some archs.
5210 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5212 * sysdeps/pthread/tst-timer.c (main): Initialize
5213 sigev2.sigev_value as well.
5215 2003-10-15 Roland McGrath <roland@redhat.com>
5217 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5219 * sysdeps/pthread/configure: Regenerated.
5221 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5223 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5224 locking macros. No distinction between normal and mutex locking
5226 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5227 Merge bits from lowlevelmutex.S we still need.
5228 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5229 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5230 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5231 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5232 new mutex implementation.
5233 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5234 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5235 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5236 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5237 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5238 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5239 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5240 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5241 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5242 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5243 symbol for entry point to avoid cancellation.
5245 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5247 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5249 (SAVE_OLDTYPE_0): Fix a typo.
5251 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5253 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5254 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5256 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5258 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5261 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5263 * Makefile (tests): Add tst-cancel19.
5264 * tst-cancel19.c: New test.
5266 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5268 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5269 restoring of the old cancellation type.
5271 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5273 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5275 2003-09-27 Wolfram Gloger <wg@malloc.de>
5277 * sysdeps/pthread/malloc-machine.h: New file
5279 2003-09-24 Roland McGrath <roland@redhat.com>
5281 * allocatestack.c (__make_stacks_executable): Don't ignore return
5282 value from _dl_make_stack_executable.
5284 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5286 * allocatestack.c (__make_stacks_executable): Also change
5287 permission of the currently unused stacks.
5289 * allocatestack.c (change_stack_perm): Split out from
5290 __make_stacks_executable.
5291 (allocate_stack): If the required permission changed between the time
5292 we started preparing the stack and queueing it, change the permission.
5293 (__make_stacks_executable): Call change_stack_perm.
5295 * Makefile: Build tst-execstack-mod locally.
5296 * tst-execstack-mod.c: New file.
5298 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5300 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5302 2003-09-23 Roland McGrath <roland@redhat.com>
5304 * tst-execstack.c: New file.
5305 * Makefile (tests): Add it.
5306 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5307 (LDFLAGS-tst-execstack): New variable.
5309 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5310 whether to use PROT_EXEC for stack mmap.
5311 (__make_stacks_executable): New function.
5312 * pthreadP.h: Declare it.
5313 * init.c (__pthread_initialize_minimal_internal): Set
5314 GL(dl_make_stack_executable_hook) to that.
5316 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5318 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5319 recommendation from AMD re avoidance of lock prefix.
5321 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5323 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5324 lll_futex_timed_wait instead of lll_futex_wait.
5325 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5326 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5327 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5328 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5329 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5330 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5331 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5332 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5333 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5334 Completely revamp the locking macros. No distinction between
5335 normal and mutex locking anymore.
5336 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5337 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5338 __lll_lock_timedwait): Fix prototypes.
5339 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5340 __lll_lock_timedwait): Likewise.
5341 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5342 macros, add __builtin_expect.
5343 (lll_mutex_timedlock): Likewise. Fix return value.
5344 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5345 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5346 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5347 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5348 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5349 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5350 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5351 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5353 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5355 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5356 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5357 operation if possible.
5359 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5360 like jumping over the lock prefix.
5362 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5364 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5365 locking macros. No distinction between normal and mutex locking
5367 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5368 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5369 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5370 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5371 locking. Merge bits from lowlevelmutex.S we still need.
5372 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5373 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5374 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5375 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5376 * Makefile (routines): Remove libc-lowlevelmutex.
5377 (libpthread-rountines): Remove lowlevelmutex.
5378 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5379 for new mutex implementation.
5380 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5381 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5383 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5384 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5386 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5388 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5389 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5390 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5391 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5392 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5394 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5395 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5397 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5399 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5400 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5401 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5403 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5404 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5406 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5408 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5409 in parameters of asm with output parameters.
5411 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5412 type of DECR parameter to int.
5413 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5415 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5417 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5418 guardsize for each thread.
5420 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5422 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5423 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5424 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5426 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5427 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5429 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5430 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5431 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5432 (pthread_getaffinity_np): Add hidden_def.
5434 * Makefile (tests): Add tst-attr3.
5435 * tst-attr3.c: New test.
5437 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5439 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5441 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5442 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5444 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5446 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5447 * tst-align.c: Include tst-stack-align.h.
5448 (tf, do_test): Use TEST_STACK_ALIGN macro.
5450 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5452 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5455 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5457 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5458 stack-related values for the initial thread.
5460 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5462 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5464 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5466 * pthread_mutex_lock.c: Minor code rearrangements.
5468 2003-09-05 Roland McGrath <roland@redhat.com>
5470 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5471 Instead, include ../nptl_db/db_info.c to do its magic.
5472 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5473 (__pthread_pthread_key_2ndlevel_size): Likewise.
5474 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5475 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5476 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5477 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5478 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5479 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5480 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5481 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5482 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5483 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5484 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5485 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5486 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5487 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5488 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5489 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5490 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5492 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5494 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5495 of pthread_t to be compatible with LT.
5496 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5497 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5498 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5499 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5500 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5501 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5502 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5504 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5506 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5508 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5510 * unwind-forcedunwind.c: Move to...
5511 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5512 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5513 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5514 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5515 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5516 * unwind.c: Include jmpbuf-unwind.h.
5517 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5519 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5521 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5522 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5523 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5524 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5525 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5526 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5527 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5528 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5529 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5530 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5531 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5533 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5534 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5535 * Makefile (tests): Add tst-stack2.
5536 * tst-stack2.c: New test.
5537 * tst-stack1.c: Include limits.h and sys/param.h.
5538 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5540 * pthread_condattr_setpshared.c: Include errno.h.
5541 (pthread_condattr_setpshared): Return EINVAL if pshared
5542 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5544 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5545 defined symbol for entry point to avoid cancellation.
5546 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5548 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5550 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5552 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5554 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5556 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5557 __close_nocancel, __read_nocancel, __write_nocancel,
5558 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5559 libpthread.so or librt.so, define to corresponding function
5560 without _nocancel suffix.
5561 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5562 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5563 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5565 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5567 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5569 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5570 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5572 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5573 in subsections has a symbol associated with it.
5575 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5576 defined symbol for entry point to avoid cancellation.
5577 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5579 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5581 * Makefile (tests): Add tst-tls5.
5582 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5583 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5584 ($(objpfx)tst-tls5): New.
5585 ($(objpfx)tst-tls6.out): Likewise.
5586 (tests): Depend on $(objpfx)tst-tls6.out.
5587 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5588 (do_test): Check pthread_self () return value alignment.
5589 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5590 (tf): Check pthread_self () return value alignment.
5591 * tst-tls5.c: New test.
5593 * tst-tls5mod.c: New.
5594 * tst-tls5moda.c: New.
5595 * tst-tls5modb.c: New.
5596 * tst-tls5modc.c: New.
5597 * tst-tls5modd.c: New.
5598 * tst-tls5mode.c: New.
5599 * tst-tls5modf.c: New.
5600 * tst-tls6.sh: New test.
5602 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5603 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5604 * init.c (pthread_functions): Initialize them.
5605 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5606 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5607 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5608 pthread_cond_timedwait@@GLIBC_2.3.2.
5610 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5612 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5613 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5614 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5615 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5616 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5617 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5619 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5621 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5622 _POSIX_THREAD_PRIORITY_SCHEDULING.
5623 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5625 2003-08-31 Ulrich Drepper <drepper@redhat.com>
5627 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5628 nested function, use static inline function from libio.h.
5629 Code by Richard Henderson.
5631 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5634 2003-08-30 Jakub Jelinek <jakub@redhat.com>
5636 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5637 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5638 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5639 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5640 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5641 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5642 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5643 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5644 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5645 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5646 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5647 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5648 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5649 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5650 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5651 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5652 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5653 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5654 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5655 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5656 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5657 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5658 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5659 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5660 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5661 * sysdeps/sparc/tls.h: New file.
5662 * sysdeps/sparc/tcb-offsets.sym: New file.
5663 * sysdeps/sparc/Makefile: New file.
5664 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5665 * init.c [__sparc__] (__NR_set_tid_address): Define.
5667 2003-08-29 Jakub Jelinek <jakub@redhat.com>
5669 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5670 _IO_release_lock): Define.
5672 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
5674 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5675 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5677 2003-08-27 Ulrich Drepper <drepper@redhat.com>
5679 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5680 (__pthread_cleanup_class): Add missing return types of member
5683 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
5685 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5686 (lll_mutex_unlock_force): Add memory barrier between store and futex
5689 2003-08-25 Ulrich Drepper <drepper@redhat.com>
5691 * tst-cancel4.c (do_test): Also unlink tempfname and remove
5692 tempmsg in first loop.
5694 2003-08-18 Ulrich Drepper <drepper@redhat.com>
5696 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5697 _POSIX_THREAD_PRIORITY_SCHEDULING.
5698 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5700 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5702 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5703 (__rtld_lock_default_lock_recursive,
5704 __rtld_lock_default_unlock_recursive): Define.
5705 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5706 __rtld_lock_unlock_recursive): Define using
5707 GL(_dl_rtld_*lock_recursive).
5708 * init.c (__pthread_initialize_minimal_internal): Initialize
5709 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5710 Lock GL(_dl_load_lock) the same number of times as
5711 GL(_dl_load_lock) using non-mt implementation was nested.
5713 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5714 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5716 2003-08-06 Jakub Jelinek <jakub@redhat.com>
5718 * tst-cancel17.c (do_test): Make len2 maximum of page size and
5721 2003-08-07 Jakub Jelinek <jakub@redhat.com>
5723 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5725 2003-08-03 Jakub Jelinek <jakub@redhat.com>
5727 * sysdeps/pthread/createthread.c (do_clone): Move error handling
5728 to first syscall error check. Move syscall error check for tkill
5729 into __ASSUME_CLONE_STOPPED #ifdef.
5731 2003-08-02 Ulrich Drepper <drepper@redhat.com>
5733 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5734 is not defined, do explicit synchronization.
5735 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
5736 is not defined also unlock pd->lock for non-debugging case in case
5738 * pthread_create.c (start_thread): Always get and release pd->lock
5739 if __ASSUME_CLONE_STOPPED is not defined.
5740 (start_thread_debug): Removed. Adjust users.
5741 * allocatestack.c (allocate_stack): Always initialize lock if
5742 __ASSUME_CLONE_STOPPED is not defined.
5743 * Makefile (tests): Add tst-sched1.
5744 * tst-sched1.c: New file.
5746 * sysdeps/pthread/createthread.c (do_clone): Only use
5747 sched_setschduler and pass correct parameters.
5749 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5751 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5752 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5753 PTHREAD_STACK_MIN in comments.
5755 2003-07-31 Jakub Jelinek <jakub@redhat.com>
5757 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5758 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5760 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5761 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5762 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5763 (__pthread_cleanup_upto): Fix prototype.
5764 (_longjmp_unwind): Adjust caller.
5765 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5766 Change second argument to const struct pointer.
5767 * tst-sem8.c (main): Remove unused s2 and s3 variables.
5768 * tst-sem9.c (main): Likewise.
5769 * unwind.c: Include string.h for strlen prototype.
5771 2003-07-31 Ulrich Drepper <drepper@redhat.com>
5773 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5774 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5775 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5777 Patch by Nicholas Miell <nmiell@attbi.com>.
5779 2003-07-30 Jakub Jelinek <jakub@redhat.com>
5781 * init.c (__pthread_initialize_minimal_internal): Initialize
5782 GL(dl_init_static_tls).
5783 * pthreadP.h (__pthread_init_static_tls): New prototype.
5784 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5786 * Makefile (tests): Add tst-tls4.
5787 (modules-names): Add tst-tls4moda and tst-tls4modb.
5788 ($(objpfx)tst-tls4): Link against libdl and libpthread.
5789 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5791 * tst-tls4.c: New file.
5792 * tst-tls4moda.c: New file.
5793 * tst-tls4modb.c: New file.
5795 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
5797 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5798 before __timer_dealloc.
5799 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5800 Don't call list_unlink.
5802 2003-07-29 Roland McGrath <roland@redhat.com>
5804 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5806 2003-07-25 Jakub Jelinek <jakub@redhat.com>
5808 * tst-cancel17.c (do_test): Check if aio_cancel failed.
5809 Don't reuse struct aiocb A if it failed.
5810 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5811 not just one byte, as that does not block.
5813 2003-07-22 Jakub Jelinek <jakub@redhat.com>
5815 * sysdeps/pthread/unwind-resume.c: New file.
5816 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5817 unwind-resume in csu subdir.
5818 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5820 (librt-sysdep_routines, librt-shared-only-routines): Add
5822 * sysdeps/pthread/rt-unwind-resume.c: New file.
5823 * unwind-forcedunwind.c: New file.
5824 * Makefile (libpthread-routines): Add unwind-forcedunwind.
5825 (libpthread-shared-only-routines): Likewise.
5826 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5827 * pthreadP.h (pthread_cancel_init): New prototype.
5828 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5830 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5831 attr argument const struct pthread_attr *.
5833 * res.c (__res_state): Return __resp.
5834 * descr.h: Include resolv.h.
5835 (struct pthread): Add res field.
5836 * pthread_create.c: Include resolv.h.
5837 (start_thread): Initialize __resp.
5838 * Makefile (tests): Add tst-_res1.
5839 (module-names): Add tst-_res1mod1, tst-_res1mod2.
5840 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5841 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5843 * tst-_res1.c: New file.
5844 * tst-_res1mod1.c: New file.
5845 * tst-_res1mod2.c: New file.
5847 2003-07-21 Ulrich Drepper <drepper@redhat.com>
5849 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5851 * Makefile: Define various *-no-z-defs variables for test DSOs
5852 which has undefined symbols.
5854 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
5856 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5857 Retry if the stwcx fails to store once_control.
5859 2003-07-20 Ulrich Drepper <drepper@redhat.com>
5861 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5862 pthread_attr_setaffinity.
5863 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5864 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5865 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5866 * pthread_attr_destroy.c: Free cpuset element if allocated.
5867 * pthread_create.c: Pass iattr as additional parameter to
5869 * sysdeps/pthread/createthread.c: If attribute is provided and
5870 a new thread is created with affinity set or scheduling parameters,
5871 start thread with CLONE_STOPPED.
5872 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5873 pthread_attr_setaffinity.
5874 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5877 2003-07-15 Ulrich Drepper <drepper@redhat.com>
5879 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5881 2003-07-14 Ulrich Drepper <drepper@redhat.com>
5883 * sysdeps/pthread/configure.in: Require CFI directives also for
5886 2003-07-15 Jakub Jelinek <jakub@redhat.com>
5888 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5891 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5893 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5895 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5896 registers as variables. Call __pthread_mutex_unlock_usercnt.
5897 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5898 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5899 not self pointer in __writer. Compare with TID to determine
5901 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5902 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5904 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5906 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5907 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5908 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5909 macros also when compiling librt.
5911 2003-07-11 Jakub Jelinek <jakub@redhat.com>
5913 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5914 -fasynchronous-unwind-tables.
5915 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5916 (PSEUDO): Add cfi directives.
5917 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5919 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5922 2003-07-08 Jakub Jelinek <jakub@redhat.com>
5924 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5925 __pthread_unregister_cancel): Add prototypes and hidden_proto.
5926 * unwind.c (__pthread_unwind_next): Add hidden_def.
5927 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5929 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5930 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5931 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5933 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5934 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5936 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5937 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5938 __pthread_unregister_cancel and __pthread_unwind_next.
5940 2003-07-04 Jakub Jelinek <jakub@redhat.com>
5942 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5943 different symbol for the cancellation syscall wrapper and
5944 non-cancellation syscall wrapper.
5945 (PSEUDO_END): Define.
5947 2003-07-05 Richard Henderson <rth@redhat.com>
5949 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5950 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
5951 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5952 return actual return value from the syscall, not 0.
5954 2003-07-07 Ulrich Drepper <drepper@redhat.com>
5956 * descr.h (struct pthread): Add pid field.
5957 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5958 (__reclaim_stacks): Likewise.
5959 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
5960 also check for PID of the signal source.
5961 (__pthread_initialize_minimal_internal): Also initialize pid field
5962 of initial thread's descriptor.
5963 * pthread_cancel.c: Use tgkill instead of tkill if possible.
5964 * sysdeps/unix/sysv/linux/fork.c: Likewise.
5965 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
5966 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5967 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5969 2003-07-05 Ulrich Drepper <drepper@redhat.com>
5971 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
5972 Fix use of parameter.
5973 (__libc_cleanup_pop): Likewise.
5975 2003-07-04 Ulrich Drepper <drepper@redhat.com>
5977 * init.c (sigcancel_handler): Change parameters to match handler
5978 for SA_SIGACTION. Check signal number and code to recognize
5979 invalid invocations.
5981 2003-07-03 Roland McGrath <roland@redhat.com>
5983 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
5984 Apply sizeof (struct pthread) bias to r13 value.
5986 2003-07-03 Ulrich Drepper <drepper@redhat.com>
5988 * sysdeps/pthread/configure.in: Require CFI directives.
5990 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
5992 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
5993 libpthread compilation.
5994 * unwind.c (__pthread_unwind): Add hidden_def.
5995 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
5997 2003-07-01 Ulrich Drepper <drepper@redhat.com>
5999 * libc-cancellation.c (__libc_cleanup_routine): Define.
6000 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6001 (__pthread_cleanup_pop): Define.
6003 2003-07-01 Richard Henderson <rth@redhat.com>
6005 * sysdeps/alpha/elf/pt-initfini.c: New file.
6006 * sysdeps/alpha/pthread_spin_lock.S: New file.
6007 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6008 * sysdeps/alpha/pthreaddef.h: New file.
6009 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6010 * sysdeps/alpha/tls.h: New file.
6011 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6012 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6013 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6014 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6015 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6016 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6017 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6018 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6019 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6020 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6022 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6024 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6025 cleanup support and unwind info.
6027 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6029 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6030 Use correct cleanup handler registration. Add unwind info.
6031 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6032 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6033 * tst-once3.c: Add cleanup handler and check it is called.
6034 * tst-once4.c: Likewise.
6035 * tst-oncex3.c: New file.
6036 * tst-oncex4.c: New file.
6037 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6039 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6041 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6043 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6045 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6046 (tf_msgsnd): Likewise.
6048 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6049 premature returns a bit more.
6051 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6053 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6054 definition to the front.
6056 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6057 the cleanup functions to make the names unique. Fix dwarf opcode
6059 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6060 functions to make the names unique. Fix CFA offset for two blocks.
6062 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6064 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6065 missing closing braces.
6066 Patch by Christophe Saout <christophe@saout.de>.
6068 2003-06-24 Roland McGrath <roland@redhat.com>
6070 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6072 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6074 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6075 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6077 * pthreadP.h: Declare __find_thread_by_id.
6078 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6079 * pthread_clock_gettime.c: Allow using other thread's clock.
6080 * pthread_clock_settime.c: Likewise.
6081 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6082 * Makefile: Add rules to build and run tst-clock2.
6083 * tst-clock2.c: New file.
6085 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6087 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6088 to use exception-based cleanup handler.
6089 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6091 * tst-cond8.c (ch): Announce that we are done.
6093 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6095 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6096 Also test aio_suspend with timeout value.
6098 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6100 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6101 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6104 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6105 (__pthread_mutex_lock_internal): Likewise.
6106 (__pthread_mutex_unlock_internal): Likewise.
6107 (__pthread_mutex_unlock_usercnt): Declare.
6108 * pthread_mutex_destroy.c: Always fail if used in any way.
6109 * pthread_mutex_init.c: Update comment.
6110 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6111 * pthread_mutex_timedlock.c: Adjust __nusers.
6112 * pthread_mutex_trylock.c: Adjust __nusers.
6113 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6114 and public interfaces are wrapper with pass additional parameter.
6115 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6117 * tst-mutex8.c: New file.
6118 * Makefile (tests): Add tst-mutex8.
6119 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6120 __pthread_mutex_unlock_usercnt.
6121 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6122 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6123 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6124 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6125 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6126 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6127 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6129 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6130 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6131 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6132 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6133 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6135 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6136 * pthread_mutex_timedlock.c: Likewise.
6137 * pthread_mutex_trylock.c: Adjust __nusers.
6138 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6139 * tst-mutex9.c: New file.
6140 * Makefile (tests): Add tst-mutex9.
6141 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6142 * sysdeps/ia64/tls.h: Likewise.
6143 * sysdeps/powerpc/tls.h: Likewise.
6144 * sysdeps/s390/tls.h: Likewise.
6145 * sysdeps/sh/tls.h: Likewise.
6146 * sysdeps/x86_64/tls.h: Likewise.
6147 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6148 Change type of __owner.
6149 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6150 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6151 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6152 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6153 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6155 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6157 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6158 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6160 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6161 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6162 instead of nr to lll_futex_wake. Only set errno and return -1
6165 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6166 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6167 return actual return value from the syscall, not 0.
6169 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6171 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6172 find a random value.
6173 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6176 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6177 compat_timer_settime.
6178 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6179 compat_timer_gettime.
6180 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6181 compat_timer_getoverrun.
6182 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6183 compat_timer_delete.
6185 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6186 error-checking mutex detect busy mutexes.
6188 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6190 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6191 Add ax to clobber list.
6192 (lll_mutex_cond_lock): Likewise.
6193 (lll_mutex_unlock): Likewise.
6194 (lll_lock): Likewise.
6195 (lll_unlock): Likewise.
6197 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6198 * tst-cancel18.c: New file.
6199 * tst-cancelx18.c: New file.
6201 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6204 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6205 * tst-cancel17.c: New file.
6206 * tst-cancelx17.c: New file.
6208 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6209 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6210 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6212 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6214 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6216 * sysdeps/pthread/createthread.c (create_thread): Set
6217 header.multiple_threads unconditionally.
6218 * allocatestack.c (allocate_stack): Likewise.
6219 * descr.h (struct pthread): Add header.multiple_threads
6221 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6222 Define for librt. #error if neither libpthread, libc nor librt.
6223 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6225 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6226 CDISABLE): Likewise.
6227 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6228 CDISABLE): Likewise.
6229 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6230 CDISABLE): Likewise.
6231 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6232 CDISABLE): Likewise. Access header.multiple_threads outside of
6233 libc and libpthread.
6234 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6236 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6237 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6239 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6241 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6242 Also test early cancellation before the thread reaches the cancellation
6245 * Makefile: Compile forward.c with exceptions.
6247 * sysdeps/unix/sysv/linux/sleep.c: New file.
6249 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6251 * Makefile: Add CFLAGS definition to compile function wrappers
6252 duplicated from libc with exceptions.
6253 * tst-cancel4.c: Also check cancellation handlers.
6255 * Makefile: Add rules to build and run tst-cancel16 and
6256 tst-cancelx16. Add missing CFLAGS definitions.
6257 * tst-cancel16.c: New file.
6258 * tst-cancelx16.c: New file.
6260 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6262 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6263 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6264 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6265 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6267 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6268 (LIBC_CANCEL_RESET): Likewise.
6269 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6270 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6272 (CFLAGS-libcrt-cancellation.c): Define.
6273 * sysdeps/pthread/librt-cancellation.c: New file.
6274 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6275 macros also when compiling librt.
6276 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6277 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6278 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6279 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6280 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6281 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6282 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6284 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6285 compat_timer_create.
6287 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6289 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6291 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6293 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6294 Add libc_hidden_def.
6296 2003-06-13 Roland McGrath <roland@redhat.com>
6298 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6299 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6301 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6303 * allocatestack.c (queue_stack): Always inline.
6304 * ptreadhP.h (__do_cancel): Likewise.
6306 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6308 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6311 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6313 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6314 (__pthread_cond_signal): Remove incorrect second addition for
6317 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6319 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6320 (__pthread_cond_signal): Use correct futex pointer in
6321 __lll_mutex_lock_wait call.
6323 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6324 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6326 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6328 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6330 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6333 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6334 hand-written CFI generation code. Since ENTRY/END also initiated
6335 CFI frames this caused two CFI sets to be generated.
6337 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6339 * cleanup_routine.c: New file.
6340 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6341 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6343 * Makefile (libpthread-routines): Add cleanup_routine.
6344 Add more CFLAGS variables to compile with exceptions. Add comments
6345 why which file needs unwind tables.
6346 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6348 * tst-cancelx1.c: New file.
6349 * tst-cancelx2.c: New file.
6350 * tst-cancelx3.c: New file.
6351 * tst-cancelx4.c: New file.
6352 * tst-cancelx5.c: New file.
6353 * tst-cancelx6.c: New file.
6354 * tst-cancelx7.c: New file.
6355 * tst-cancelx8.c: New file.
6356 * tst-cancelx9.c: New file.
6357 * tst-cancelx10.c: New file.
6358 * tst-cancelx11.c: New file.
6359 * tst-cancelx12.c: New file.
6360 * tst-cancelx13.c: New file.
6361 * tst-cancelx14.c: New file.
6362 * tst-cancelx15.c: New file.
6363 * tst-cleanupx0.c: New file.
6364 * tst-cleanupx0.expect: New file.
6365 * tst-cleanupx1.c: New file.
6366 * tst-cleanupx2.c: New file.
6367 * tst-cleanupx3.c: New file.
6369 * tst-cleanup0.c: Make standard compliant.
6370 * tst-cleanup1.c: Likewise.
6372 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6373 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6374 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6375 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6376 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6377 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6378 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6380 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6381 * tst-cancel12.c: New file.
6382 * tst-cancel13.c: New file.
6383 * tst-cancel14.c: New file.
6384 * tst-cancel15.c: New file.
6385 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6388 * tst-cancel1.c: Add some comments.
6390 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6393 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6395 * Makefile (CFLAGS-pthread_cancel.c): Define.
6397 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6399 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6400 Change type of __writer element to int.
6401 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6402 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6403 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6404 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6405 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6406 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6407 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6408 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6409 Compare with TID to determine deadlocks.
6410 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6411 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6412 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6413 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6414 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6415 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6417 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6419 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6420 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6421 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6423 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6425 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6426 * Makefile (tests): Add tst-rwlock12.
6427 * tst-rwlock12.c: New file.
6429 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6431 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6432 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6433 Remove bogus hidden_proto.
6434 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6436 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6437 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6438 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6439 ___lll_mutex_timedlock): Likewise.
6441 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6443 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6444 (__pthread_cond_signal): Add some code to eventually handle
6447 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6449 * Makefile (tests): Add tst-exec4.
6450 (tst-exec4-ARGS): Define.
6451 * tst-exec4.c: New file.
6453 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6455 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6456 Also fail if tv_nsec < 0.
6457 (__lll_timedwait_tid): Likewise.
6458 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6459 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6461 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6463 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6465 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6467 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6469 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6472 * Makefile (tests): Add tst-sem8 and tst-sem9.
6473 * tst-sem8.c: New file.
6474 * tst-sem9.c: New file.
6475 * sem_open.c: Fix creation of in_use record if the file exists but
6478 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6481 * sysdeps/pthread/timer_create.c (timer_create): In case
6482 evp==NULL, assign timer ID to sival_ptr.
6484 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6485 struct pthread_unwind_buf *.
6486 (struct pthread): Likewise for cleanup_jmp_buf element.
6488 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6489 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6490 * unwind.c (__pthread_unwind_next): Likewise.
6492 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6494 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6495 (lll_futex_timed_wait): Use int for futex value parameter.
6496 (lll_futex_wake): Likewise.
6497 (lll_futex_requeue): Likewise.
6499 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6500 Replace one memory operation with one register operation.
6502 * tst-join4.c (do_test): Fix error message.
6504 * tst-rwlock6.c (do_test): Use correct format specifier.
6506 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6507 (__lll_mutex_lock_wait): Replace one memory operation with one
6509 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6510 (__lll_mutex_lock_wait): Likewise.
6512 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6513 (__lll_mutex_cond_lock): Add one to value parameter of
6514 __lll_lock_wait to reflect reality in the futex syscall.
6515 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6516 (lll_mutex_cond_lock): Likewise.
6518 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6520 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6522 (lll_mutex_cond_lock): Define.
6524 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6526 * Makefile (tests): Add tst-signal6.
6527 * tst-signal6.c: New file.
6529 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6530 (__lll_mutex_unlock_force): New function
6531 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6533 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6534 (__lll_mutex_unlock_force): New function.
6535 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6537 * tst-rwlock7.c (do_test): Use correct format specifier.
6539 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6540 Find break parameter in correct asm argument.
6542 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6544 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6546 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6548 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6550 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6551 lll_futex_requeue, lll_mutex_unlock_force): Define.
6553 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6555 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6556 (pthread_cond_t): Add __mutex.
6557 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6558 lll_futex_requeue, lll_mutex_unlock_force): Define.
6560 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6562 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6563 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6565 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6567 (lll_futex_wait, lll_futex_wake): Define.
6568 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6569 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6570 FUTEX_REQUEUE instead of FUTEX_WAIT.
6571 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6572 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6573 mutex which was used in condvar structure. Call
6574 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6575 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6577 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6578 include tcb-offsets.h. Read wakeup value in locked region.
6579 Use the value of gbr register as THREAD_ID.
6580 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6581 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6582 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6584 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6587 2003-05-28 Ulrich Drepper <drepper@redhat.com>
6589 * sysdeps/pthread/pthread_cond_broadcast.c
6590 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6592 2003-05-26 Ulrich Drepper <drepper@redhat.com>
6594 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6595 typo in register name.
6596 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6597 correctly. Actually use requeue. Little optimization.
6598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6599 mutex address early. Handle cancellation state as 32-bit value.
6600 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6601 Remove unnecessary label.
6603 2003-05-25 Ulrich Drepper <drepper@redhat.com>
6605 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6606 instead of FUTEX_WAIT.
6607 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6608 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6609 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6610 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6611 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6612 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6613 used in condvar structure. Call __pthread_mutex_cond_lock instead
6614 of __pthread_mutex_lock_internal.
6615 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6616 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6617 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6618 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6620 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6621 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6622 Add pthread_mutex_cond_lock.
6623 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6624 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6625 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6626 lll_mutex_cond_lock.
6627 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6628 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6629 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6631 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6632 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6634 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6635 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6637 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6638 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6639 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6640 macro don't define aliases.
6642 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6643 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6644 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6645 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6646 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6647 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6648 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6649 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6650 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6652 2003-05-17 Ulrich Drepper <drepper@redhat.com>
6654 * sem_open.c: Fix one endless loop. Implement correct semantics
6655 wrt opening the same semaphore more then once.
6656 * sem_close.c: Adjust for sem_open change.
6657 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6658 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6659 * Makefile (tests): Add tst-sem7.
6660 * tst-sem7.c: New file.
6662 2003-05-16 Roland McGrath <roland@redhat.com>
6664 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6665 uninitialized variable braino.
6667 2003-05-16 Ulrich Drepper <drepper@redhat.com>
6669 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6670 test for syscall availability.
6672 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6673 __no_posix_timers to -1 if the syscalls don't exist.
6675 * pthread_join.c (pthread_join): Set tid field of the joined
6676 thread to -1. This isn't necessary but helps to recognize some
6677 error conditions with almost no cost.
6679 * allocatestack.c (FREE_P): Also negative values indicate an
6682 * unwind.c: Include <unistd.h>.
6684 2003-05-14 Ulrich Drepper <drepper@redhat.com>
6686 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6688 2003-05-14 Jakub Jelinek <jakub@redhat.com>
6690 * Makefile (crti-objs, crtn-objs): New variables.
6691 (omit-deps, extra-objs): Add crtn.
6692 ($(objpfx)libpthread.so): Depend on both crti and crtn
6693 and links to them in multidir.
6694 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6696 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
6698 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6699 (lll_mutex_unlock): Use atomic_exchange_rel.
6701 2003-05-11 Ulrich Drepper <drepper@redhat.com>
6703 * cond-perf.c (cons): Add missing locking around setting of alldone.
6705 2003-05-10 Ulrich Drepper <drepper@redhat.com>
6707 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6709 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6711 2003-05-09 Ulrich Drepper <drepper@redhat.com>
6713 * tst-sem6.c: New file.
6714 * Makefile (tests): Add tst-sem6.
6716 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6717 Use atomic_exchange_rel instead of atomic_exchange.
6718 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6721 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6722 code for lll_futex_wait and lll_futex_wake in static apps. Use
6723 vsyscall is possible.
6725 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6726 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6727 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6728 pthread_setaffinity_np.
6729 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6730 and pthread_setaffinity_np.
6731 * Makefile (libpthread-routines): Add pthread_getaffinity and
6732 pthread_setaffinity.
6734 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6735 use it in case mmap to allocate the stack fails.
6736 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6737 ARCH_MAP_FLAGS here.
6738 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6741 2003-05-08 Ulrich Drepper <drepper@redhat.com>
6743 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6744 handler implementation. It is now lockless in fork().
6745 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6746 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6747 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
6748 declare the __fork_*_lists.
6749 (struct fork_handler): Include pointers to all three functions.
6750 Add next, refcntr and need_signal elements.
6751 (__fork_handlers): New declaration.
6752 (__register_atfork_malloc): Remove declaration.
6753 (HAVE_register_atfork_malloc): Remove definition.
6754 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6755 __pthread_child_handler variable.
6756 (__libc_pthread_init): Use __register_atfork instead of explicitly
6758 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6760 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6762 * unwind.c (unwind_cleanup): Print error message and then abort. This
6763 function must never be reached.
6765 * cond-perf.c: New file.
6767 2003-05-05 Ulrich Drepper <drepper@redhat.com>
6769 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6771 2003-05-04 Roland McGrath <roland@redhat.com>
6773 * Makefile ($(objpfx)../libc.so): New target.
6775 2003-05-02 Ulrich Drepper <drepper@redhat.com>
6777 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6778 (pthread_condattr_t): Size is only an int, don't use long for
6780 (pthread_mutexattr_t): Likewise.
6781 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6782 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6783 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6785 2003-05-01 Ulrich Drepper <drepper@redhat.com>
6787 * sysdeps/i386/tls.h: Define THREAD_ID.
6788 * sysdeps/ia64/tls.h: Likewise.
6789 * sysdeps/powerpc/tls.h: Likewise.
6790 * sysdeps/s390/tls.h: Likewise.
6791 * sysdeps/sh/tls.h: Likewise.
6792 * sysdeps/x86_64/tls.h: Likewise.
6793 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6795 * pthread_mutex_timedlock.c: Likewise.
6796 * pthread_mutex_trylock.c: Likewise.
6797 * pthread_mutex_unlock.c: Likewise.
6798 * pthread_rwlock_trywrlock.c: Likewise.
6799 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6800 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6801 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6802 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6804 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6807 2003-04-29 Jakub Jelinek <jakub@redhat.com>
6809 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6810 (__SIZEOF_PTHREAD_COND_T): Define to 48.
6811 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6812 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6813 Make __align long long instead of long.
6814 (pthread_rwlock_t): Formatting.
6815 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6816 (pthread_rwlock_t): Formatting.
6817 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6818 (pthread_cond_t): Make __align long long instead of long.
6819 (pthread_rwlock_t): Move __flags field to the same position as in
6822 2003-04-30 Ulrich Drepper <drepper@redhat.com>
6824 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6825 * tst-rwlock7.c (do_test): Likewise.
6827 2003-04-26 Roland McGrath <roland@redhat.com>
6829 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6831 2003-04-22 Jakub Jelinek <jakub@redhat.com>
6833 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6834 sizeof (struct pthread).
6835 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6837 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6839 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6841 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6843 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6845 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6847 (NO_TLS_OFFSET): Define.
6848 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6849 add TLS_TCB_SIZE unnecessarily.
6851 2003-04-22 Roland McGrath <roland@redhat.com>
6853 * Makeconfig (shared-thread-library): Reverse link order to work
6856 2003-04-22 Ulrich Drepper <drepper@redhat.com>
6858 * semaphore.h: Fix typo in comment.
6860 2003-04-21 Ulrich Drepper <drepper@redhat.com>
6862 * sysdeps/pthread/sigfillset.c: New file.
6864 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6865 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6866 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6867 * sysdeps/pthread/sigaction.c: Likewise.
6868 * sysdeps/pthread/sigprocmask.c: New file.
6869 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6871 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6872 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
6875 2003-04-19 Ulrich Drepper <drepper@redhat.com>
6877 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6878 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6880 * sysdeps/unix/sysv/linux/unregister-atfork.c
6881 (__unregister_atfork): Don't free memory not allocated dynamically.
6883 * semaphore.h: Remove __THROW marker from cancellation points.
6884 * nptl/sysdeps/pthread/pthread.h: Likewise.
6886 2003-04-18 Ulrich Drepper <drepper@redhat.com>
6888 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6889 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6892 2003-04-16 Jakub Jelinek <jakub@redhat.com>
6894 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6896 2003-04-15 Roland McGrath <roland@redhat.com>
6898 * forward.c (__pthread_unwind): Tweak to avoid warning.
6900 2003-04-15 Ulrich Drepper <drepper@redhat.com>
6902 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6904 2003-04-14 Ulrich Drepper <drepper@redhat.com>
6906 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6907 overflow CFA advance instructions.
6908 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6910 2003-04-14 Jakub Jelinek <jakub@redhat.com>
6912 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6913 * sysdeps/i386/pthread_spin_lock.c: Likewise.
6914 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
6917 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6918 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6919 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6920 DW_CFA_advance_loc for .Laddl-.Lsubl.
6922 2003-04-13 Ulrich Drepper <drepper@redhat.com>
6924 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6925 position-independent unwind data for static libraries.
6926 Add missing unwind info. Add comments.
6928 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6929 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6930 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6931 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6933 2003-04-12 Ulrich Drepper <drepper@redhat.com>
6935 * Makefile: Make sure all cancellation points are compiled with
6936 exception and asynchronous unwind tables.
6938 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6939 which mishandles loading of global object addresses in PIC.
6940 (THREAD_SETMEM_NC): Likewise.
6942 2003-04-11 Ulrich Drepper <drepper@redhat.com>
6944 * pthread.h: Define new data structure for cleanup buffer. Declare
6945 new cleanup handler interfaces.
6946 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
6947 (struct pthread): Add cleanup_jmp_buf pointer. Define
6948 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6949 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
6950 it. Declare old cleanup handler installation functions.
6951 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
6953 * cleanup_defer.c: Likewise.
6954 * cleanup_compat.c: New file. Old cleanup code.
6955 * cleanup_def_compat.c: New file. Old cleanup code.
6956 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6957 if own thread descriptor.
6958 * unwind.c: New file.
6959 * forward.c: Add __pthread_unwind.
6960 * init.c (pthread_functions): Add __pthread_unwind.
6961 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
6962 Add ptr___pthread_unwind.
6963 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
6964 and unwind function.
6965 * Makefile (libpthread-routines): Add cleanup_compat,
6966 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
6967 table generation if necessary.
6968 * version.c: Record whether unwind support is compiled in.
6969 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
6970 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
6972 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
6973 complication to generate unwind information for syscall wrappers.
6974 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6975 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
6976 __cleanup_fct_attribute.
6978 * Makefile: Add rules to build and run tst-cleanup0.
6979 * tst-cleanup0.c: New file.
6980 * tst-cleanup0.expect: New file.
6982 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
6983 caller. Optimize to avoid often unecessary local variable.
6985 2003-04-11 Roland McGrath <roland@redhat.com>
6987 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
6988 sets variable `multidir'; include that.
6989 (generated): Add it.
6990 ($(objpfx)$(multidir)/crti.o): New target.
6991 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
6993 2003-04-11 Ulrich Drepper <drepper@redhat.com>
6995 * tst-attr2.c (do_test): Add cast to avoid warning.
6996 * tst-mutex4.c (do_test): Likewise.
6998 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7000 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7003 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7005 * Makefile (tests): Add tst-detach1.
7006 * tst-detach1.c: New file.
7008 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7010 * sysdeps/pthread/pthread.h: Remove duplicate
7011 pthread_cleanup_{push,pop} definitions.
7013 * tst-barrier2.c: Eliminate warnings.
7014 * tst-cancel4.c: Likewise.
7015 * tst-cond4.c: Likewise.
7016 * tst-cond6.c: Likewise.
7017 * tst-detach1.c: Likewise.
7018 * tst-rwlock4.c: Likewise.
7019 * tst-rwlock6.c: Likewise.
7020 * tst-rwlock7.c: Likewise.
7021 * tst-sem3.c: Likewise.
7022 * tst-spin2.c: Likewise.
7023 * tst-umask1.c: Likewise.
7025 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7027 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7029 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7031 * descr.h (struct pthread): Move cancelhandling member to the front.
7033 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7035 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7036 malloc_parent, and malloc_child statically.
7037 (__register_atfork_malloc): New function.
7038 (free_mem): Don't free any of the malloc_* variables on the list.
7039 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7040 Define HAVE_register_atfork_malloc.
7042 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7044 * sysdeps/pthread/createthread.c (create_thread): Add some more
7045 comments explaining when to set multiple_threads and when not.
7047 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7048 THREAD_ATOMIC_BIT_SET if not already defined.
7049 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7050 THREAD_ATOMIC_BIT_SET:
7051 * sysdeps/x86_64/tls.h: Likewise.
7052 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7053 THREAD_ATOMIC_CMPXCHG_VAL.
7054 (_pthread_cleanup_pop_restore): Likewise.
7055 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7056 (__pthread_enable_asynccancel_2): Likewise.
7057 (__pthread_disable_asynccancel): Likewise.
7058 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7059 (__libc_disable_asynccancel): Likewise.
7060 * init.c (sigcancel_handler): Likewise.
7061 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7062 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7064 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7066 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7067 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7068 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7069 * Makefile (tests): Add tst-cancel11.
7070 * tst-cancel11.c: New file.
7072 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7074 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7075 round, not the first. Use specific_used flag instead of local
7076 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7077 (__free_tcb): Don't call deallocate_tsd here.
7078 (start_thread): Call deallocate_tsd here.
7079 * pthread_setspecific.c: Set specific_used flag really only when
7081 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7082 * tst-tsd3.c: New file.
7083 * tst-tsd4.c: New file.
7085 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7087 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7088 Use atomic_exchange_and_add instead of __lll_add.
7089 (__lll_mutex_timedlock): Likewise.
7090 Patch by Ian Wienand.
7092 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7094 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7095 (SINGLE_THREAD_P): Fix typo.
7096 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7098 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7100 * Makefile (tests): Add tst-align.
7101 * tst-align.c: New file.
7102 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7104 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7107 * tst-tsd2.c: Add casts to avoid warnings.
7109 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7111 * descr.h (struct pthread): Move most often used elements to the front.
7113 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7115 * Makefile (libpthread-routines): Add pthread_atfork.
7116 (libpthread-static-only-routines): Add pthread_atfork.
7118 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7120 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7122 (INSTALL_DTV): Add parens.
7123 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7124 Use passed descr instead of THREAD_SELF.
7125 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7126 (__lll_mutex_timedlock_wait): Correct expected value after
7128 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7129 Release lock before waking up the waiters.
7130 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7131 criteria. Reorderstruct passed to cleanup handler. Fix
7132 handling of cancellation and failung pthread_mutex_unlock call.
7133 Use __pthread_enable_asynccancel_2 instead of
7134 __pthread_enable_asynccancel.
7135 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7136 Return result of lock re-get if it fails.
7137 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7138 for __pthread_cleanup_push.
7139 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7140 completely broken rwlock implementation.
7141 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7142 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7143 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7144 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7145 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7146 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7147 versioned_symbol macro.
7148 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7149 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7151 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7153 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7154 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7156 (struct timer): Remove th and bar field.
7157 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7158 debugging code. Create only one helper thread.
7159 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7161 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7162 Renamed. Define statically. Use thread info from siginfo.
7163 (__helper_once): New variable.
7164 (__helper_tid): New variable.
7165 (__reset_helper_control): New function.
7166 (__start_helper_thread): New function.
7168 * pthread_create.c (start_thread): Don't use setjmp inside
7169 __builtin_expect to work around gcc bug.
7171 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7172 timer_delete syscall fails, but not with ENOSYS, set
7175 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7176 (timer_settime): Fix typo.
7177 * sysdeps/unix/sysv/linux/timer_getoverr.c
7178 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7180 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7183 offset of cleanupbuf.__prev.
7185 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7187 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7190 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7192 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7193 NULL provide default definition to syscall.
7195 2003-03-25 Roland McGrath <roland@redhat.com>
7197 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7198 (timer_id2ptr): Fix typo.
7200 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7202 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7203 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7204 * sysdeps/ia64/pthreaddef.h: Likewise.
7205 * sysdeps/powerpc/pthreaddef.h: Likewise.
7206 * sysdeps/s390/pthreaddef.h: Likewise.
7207 * sysdeps/sh/pthreaddef.h: Likewise.
7208 * sysdeps/x86_64/pthreaddef.h: Likewise.
7209 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7210 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7212 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7213 SIGTIMER is not unblocked.
7214 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7216 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7218 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7219 pass pointer through as ID.
7220 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7221 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7222 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7223 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7224 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7225 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7226 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7227 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7228 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7229 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7230 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7231 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7232 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7233 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7234 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7235 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7236 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7237 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7238 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7239 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7240 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7241 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7242 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7243 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7244 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7245 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7246 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7247 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7248 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7249 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7250 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7251 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7252 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7254 * pthreadP.h: Remove FRAME_LEFT definition.
7255 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7256 already left frame. Programs which have this problem are not POSIX
7258 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7260 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7262 * sysdeps/pthread/tst-timer.c: Check return values of the
7265 2003-03-23 Roland McGrath <roland@redhat.com>
7267 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7268 * tst-tls3mod.c: Likewise.
7269 * tst-tls1.c: Likewise.
7270 * tst-tls2.c: Likewise.
7272 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7275 * tst-join5.c (tf1, tf2): Add a cast.
7277 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7279 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7280 Don't test anything.
7281 * tst-cond4.c: Likewise.
7282 * tst-cond6.c: Likewise.
7283 * tst-flock2.c: Likewise.
7284 * tst-mutex4.c: Likewise.
7285 * tst-rwlock4.c: Likewise.
7286 * tst-signal1.c: Likewise.
7287 * tst-spin2.c: Likewise.
7288 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7290 * tst-mutex4.c: Use test-skeleton.c.
7291 * tst-spin2.c: Likewise.
7292 * tst-sysconf.c: Likewise.
7293 * tst-barrier2.c: Likewise.
7294 * tst-cond4.c: Likewise.
7295 * tst-cond6.c: Likewise.
7296 * tst-rwlock4.c: Likewise.
7297 * tst-unload.c: Likewise.
7298 * tst-flock2.c (do_test): Use return instead of exit.
7300 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7302 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7304 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7306 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7307 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7308 instead of __lll_compare_and_swap.
7309 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7311 Removed definition if __lll_compare_and_swap.
7313 * cancellation.c: Adjust for new form of compare&exchange macros.
7314 * cleanup_defer.c: Likewise.
7316 * libc-cancellation.c: Likewise.
7317 * old_pthread_cond_broadcast.c: Likewise.
7318 * old_pthread_cond_signal.c: Likewise.
7319 * old_pthread_cond_timedwait.c: Likewise.
7320 * old_pthread_cond_wait.c: Likewise.
7321 * pthread_cancel.c: Likewise.
7322 * pthread_create.c: Likewise.
7323 * pthread_detach.c: Likewise.
7324 * pthread_join.c: Likewise.
7325 * pthread_key_delete.c: Likewise.
7326 * pthread_setcancelstate.c: Likewise.
7327 * pthread_setcanceltype.c: Likewise.
7328 * pthread_timedjoin.c: Likewise.
7329 * pthread_tryjoin.c: Likewise.
7330 * sysdeps/pthread/createthread.c: Likewise.
7332 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7334 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7335 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7336 definitions. Replace uses with calls to atomic_* functions.
7337 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7338 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7339 __lll_test_and_set calls with atomic_exchange_and_add and
7340 atomic_exchange calls respectively.
7341 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7342 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7343 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7344 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7345 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7346 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7347 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7349 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7350 returns the old value.
7352 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7354 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7355 int for variable OLDVAL and correct inline assembler contraint.
7356 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7357 type int for variable OLD.
7359 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7361 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7362 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7363 instead of multiple_threads field in the TCB.
7365 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7367 * sysdeps/i386/i686/bits/atomic.h: Removed.
7368 * sysdeps/i386/i586/bits/atomic.h: Removed.
7369 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7370 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7371 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7372 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7373 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7374 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7375 * atomic.h: Removed. Moved to glibc.
7377 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7378 support for clock selection.
7380 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7383 2003-03-18 Roland McGrath <roland@redhat.com>
7385 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7386 Add __lll_rel_instr first. Add memory clobber.
7387 (lll_mutex_unlock): Use __lll_test_and_set.
7388 From Paul Mackerras <paulus@samba.org>.
7390 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7392 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7393 (SINGLE_THREAD_P): Add `header.' prefix.
7394 From Paul Mackerras <paulus@samba.org>.
7396 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7397 pthread_timedjoin_np to ...
7398 (libpthread: GLIBC_2.3.3): ... here.
7399 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7401 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7402 Avoid shadowing VAL variable.
7404 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7407 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7409 * Makefile (tests): Add tst-cond11.
7410 * tst-cond11.c: New file.
7412 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7413 struct passed to cleanup handler to eliminate one more
7415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7417 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7418 (pthrad_cond_t): Replace __unused field with __clock.
7420 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7421 waken all waiters in cleanup handler.
7422 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7423 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7425 * pthread_condattr_getclock.c: New file.
7426 * pthread_condattr_setclock.c: New file.
7427 * sysdeps/pthread/pthread.h: Declare these new functions.
7428 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7429 * Makefile (libpthread-routines): Add the new functions.
7430 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7431 Renamed field to value. Document use of the bits.
7432 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7434 * pthread_condattr_setpshared.c: Likewise.
7435 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7436 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7437 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7439 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7440 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7441 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7442 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7443 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7444 Implement clock selection.
7445 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7446 * pthread-errnos.sym: Add ENOSYS.
7447 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7448 _POSIX_CLOCK_SELECTION.
7449 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7451 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7452 invalid .size directive.
7454 2003-03-17 Roland McGrath <roland@redhat.com>
7456 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7459 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7461 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7462 Use __lll_add instead of spelling it out. Use protected symbol names.
7463 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7465 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7466 Renamed from lll_compare_and_swap. Use new name where necessary.
7467 (__lll_add): Defined.
7468 (__lll_dec_if_positive): Defined.
7469 (__lll_test_and_set): Defined.
7470 * sysdeps/ia64/pthread_spin_init.c: Removed.
7471 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7472 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7473 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7474 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7475 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7476 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7477 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7478 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7479 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7480 __sync_lock_release_si.
7481 Patch by Jakub Jelinek.
7483 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7484 Fix timeout handling.
7485 (__lll_timedwait_tid): Likewise.
7486 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7487 Patch by Jakub Jelinek.
7489 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7491 2003-03-17 Roland McGrath <roland@redhat.com>
7493 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7494 * sysdeps/pthread/pthread_spin_init.c: New file.
7495 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7496 * sysdeps/powerpc/Makefile: New file.
7497 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7498 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7499 * sysdeps/powerpc/pthreaddef.h: New file.
7500 * sysdeps/powerpc/tcb-offsets.sym: New file.
7501 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7502 * sysdeps/powerpc/tls.h: New file.
7503 * sysdeps/powerpc/bits/atomic.h: New file.
7504 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7505 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7506 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7508 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7509 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7510 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7511 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7512 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7513 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7514 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7515 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7516 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7517 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7518 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7519 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7520 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7521 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7522 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7524 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7526 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7527 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7528 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7529 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7530 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7532 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7534 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7535 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7536 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7537 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7538 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7540 2003-03-16 Roland McGrath <roland@redhat.com>
7542 * tst-fork4.c: Include <string.h>.
7543 * tst-signal2.c: Likewise.
7544 * tst-mutex5.c (do_test): exit -> return.
7545 * tst-mutex2.c: Include <stdlib.h>.
7547 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7549 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7550 (__lll_mutex_timedlock_wait): Correct expected value after
7551 spurious wakeup. Otherwise we would never wait again.
7553 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7554 zone versus inline asm stupidity. Use correct instructions.
7556 * tst-rwlock6.c: Add some more status output.
7558 2003-03-15 Roland McGrath <roland@redhat.com>
7560 * sysdeps/pthread/configure.in: New file.
7561 * sysdeps/pthread/configure: New file (generated).
7563 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7565 * allocatestack.c (allocate_stack): Store the exact stack size of
7566 user allocated stacks.
7568 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7570 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7571 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7572 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7573 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7574 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7575 Use `header.' prefix.
7576 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7578 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7580 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7581 __builtin_frame_address, use stack pointer.
7583 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7584 instead of __builtin_frame_pointer.
7586 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7588 * tst-basic1.c (do_test): Add cast to avoid warning.
7589 * tst-basic2.c (do_test): Likewise.
7591 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7592 amount of stack correction.
7594 * tst-fork4.c: Use test-skeleton.c.
7596 2003-03-14 Roland McGrath <roland@redhat.com>
7598 * init.c: Fix typo "#eli" for "#else".
7600 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7602 * allocatestack.c (__stack_user): Use hidden_data_def.
7603 * pthread_create.c (__pthread_keys): Likewise.
7605 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7607 2003-03-14 Roland McGrath <roland@redhat.com>
7609 * tst-fork4.c: New file.
7610 * Makefile (tests): Add it.
7612 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7613 we always define the padding space.
7614 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7615 stopped supporting its own extensions fully.
7616 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7617 struct also called `header', so `header.multiple_threads' is the field
7618 name to use on all machines.
7619 * allocatestack.c (allocate_stack): Use `header.' prefix.
7620 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7621 * pthread_create.c (__pthread_create_2_1): Likewise.
7622 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7623 (THREAD_SELF): Likewise.
7624 * sysdeps/x86_64/tls.h: Likewise.
7625 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7626 (SINGLE_THREAD_P): Likewise.
7627 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7628 (SINGLE_THREAD_P): Likewise.
7629 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7630 (SINGLE_THREAD_P): Likewise.
7632 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7635 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7637 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7638 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7640 * pthread_create.c (start_thread): setjmp is expected to return 0.
7642 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7643 (THREAD_GETMEM_NC): Likewise.
7645 2003-03-13 Ulrich Drepper <drepper@redhat.com>
7647 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7648 and the size of the stack which must be allocated is a multiple,
7649 allocate one more page.
7650 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7651 MULTI_PAGE_ALIASING.
7653 2003-03-13 Roland McGrath <roland@redhat.com>
7655 * pthread_create.c (start_thread): Set EXITING_BIT after the
7656 event-reporting (and destructors), not before.
7658 2003-03-13 Jakub Jelinek <jakub@redhat.com>
7660 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7661 lll_futex_wake): Declare register variables as long int instead of
7662 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7663 Make syscall arguments clobbered by the syscall.
7664 (lll_futex_wait): Define using lll_futex_timed_wait.
7666 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7669 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7672 * allocatestack.c (nptl_ncreated): Only declare if
7673 COLORING_INCREMENT != 0.
7675 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7676 (__libc_enable_asynccancel_2): Remove prototype.
7678 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7679 ctid to match kernel.
7681 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7683 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7684 libc_multiple_threads.
7685 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7686 __libc_multiple_threads to...
7687 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
7689 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7691 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7692 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7694 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7695 (__pthread_once_internal): Define.
7697 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7698 macros instead of .symver directly.
7699 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7700 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7702 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7703 * sysdeps/x86_64/tcb-offsets.sym: New file.
7704 * sysdeps/x86_64/Makefile: New file.
7706 * sysdeps/i386/tcb-offsets.sym: Add SELF.
7707 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7708 to access own pthread_t in TCB.
7709 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7711 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7713 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7715 2003-03-12 Roland McGrath <roland@redhat.com>
7717 * pthread-errnos.sym: New file.
7718 * Makefile (gen-as-const-headers): New variable, list that file.
7719 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7720 header <pthread-errnos.h> instead of defining errno values here.
7721 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7722 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7723 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7724 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7725 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7727 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7729 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7730 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7731 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7732 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7733 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7734 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7735 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7736 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7737 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7738 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7739 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7740 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7741 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7742 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7743 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7744 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7745 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7746 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7747 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7748 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7749 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7750 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7751 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7752 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7753 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7754 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7755 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7757 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7758 CLONE_CHILD_SETTID worked.
7760 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7762 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7764 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7767 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7768 (pthread_cond_t): Add padding.
7770 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7771 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7772 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7774 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7775 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7776 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7777 (__pthread_rwlock_timedrdlock): Likewise.
7778 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7779 (__pthread_rwlock_wrlock): Likewise.
7780 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7781 (__pthread_rwlock_rdlock): Likewise.
7783 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7785 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7786 result of lock re-get if it fails.
7788 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7790 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7791 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7792 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7793 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7794 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7795 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7796 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7797 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7798 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7799 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7801 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7802 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7804 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7805 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7806 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7807 (create_thread): Likewise.
7808 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7809 * init.c (__pthread_initialize_minimal_internal): Initialize
7810 __libc_multiple_threads_ptr if necessary.
7811 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
7812 __pthread_multiple_threads and __libc_multiple_threads_ptr.
7813 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7814 __libc_multiple_threads.
7815 (__libc_pthread_init): Return pointer to __libc_pthread_init if
7818 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7819 (THREAD_SETMEM_NC): Likewise.
7821 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7822 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7823 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7824 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7826 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7827 Eliminate one entire instruction.
7829 * cancellation.c (__pthread_enable_asynccancel_2): New function.
7830 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7831 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7832 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7833 instead of __pthread_enable_asynccancel.
7834 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7835 (__pthread_cond_wait): Likewise.
7836 * sysdeps/pthread/pthread_cond_timedwait.c
7837 (__pthread_cond_timedwait): Likewise.
7838 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7840 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7841 (__condvar_cleanup): Wake up all waiters in case we got signaled
7842 after being woken up but before disabling asynchronous
7844 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7845 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7846 (__condvar_cleanup): Likewise.
7848 * init.c (__NR_set_tid_address): If already defined, don't redefine.
7849 Make it an error if architecture has no #if case. Add x86-64.
7851 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7852 pt-initfini.s generation.
7854 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7855 (TLS_INIT_TP): Fix typo.
7857 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7859 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7860 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7862 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7863 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7864 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7865 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7866 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7867 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7868 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7869 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7871 2003-03-11 Ulrich Drepper <drepper@redhat.com>
7873 * sysdeps/pthread/pthread_cond_timedwait.c
7874 (__pthread_cond_timedwait): Return the result of the final
7875 locking. If it succeeds, the regular function return value.
7877 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7878 Return result of the final locking.
7879 * version.c (__nptl_main): Work around problems with the strange
7880 INTERNAL_SYSCALL macro on ppc32.
7881 * init.c (__pthread_initialize_minimal_internal): Unblock
7882 SIGCANCEL in case the parent blocked it.
7883 Reported by Paul Mackerras <paulus@samba.org>.
7885 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7886 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7887 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7889 2003-03-11 Jakub Jelinek <jakub@redhat.com>
7891 * sysdeps/pthread/pthread_cond_timedwait.c
7892 (__pthread_cond_timedwait): Unlock and fail if
7893 __pthread_mutex_unlock_internal failed.
7895 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7896 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7898 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7899 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7900 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7901 ALLOCATE_STACK): New macros.
7902 (TLS_TPADJ): New macro.
7903 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7904 (allocate_stack): Handle TLS_DTV_AT_TP and
7905 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
7906 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7908 * init.c [__ia64__] (__NR_set_tid_address): Define.
7910 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7911 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7912 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7913 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7914 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7915 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7916 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7917 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7918 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7919 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7920 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7921 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7922 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7923 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7924 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7925 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7926 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7927 * sysdeps/ia64/bits/atomic.h: New file.
7928 * sysdeps/ia64/Makefile: New file.
7929 * sysdeps/ia64/pthread_spin_init.c: New file.
7930 * sysdeps/ia64/pthread_spin_lock.c: New file.
7931 * sysdeps/ia64/pthread_spin_trylock.c: New file.
7932 * sysdeps/ia64/pthread_spin_unlock.c: New file.
7933 * sysdeps/ia64/pthreaddef.h: New file.
7934 * sysdeps/ia64/tcb-offsets.sym: New file.
7935 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7936 * sysdeps/ia64/tls.h: New file.
7938 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7939 to syscall instead of no arguments.
7941 2003-03-10 Ulrich Drepper <drepper@redhat.com>
7943 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7944 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7945 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7946 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7948 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7951 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7953 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7954 lowlevelbarrier.sym.
7955 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7956 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7957 Include lowlevelbarrier.h and don't define offsets locally.
7958 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
7960 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
7961 (__lll_mutex_lock_wait): Reverse order of first two parameters.
7962 (__lll_mutex_timedlock_wait): Likewise.
7963 (lll_mutex_lock): Adjust asm for that.
7964 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
7965 (lll_lock): Adjust asm for operand order change.
7966 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
7967 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
7969 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
7970 Reverse order of parameters.
7971 (__lll_timedwait_tid): Remove regparms attribute.
7972 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
7973 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
7975 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7976 (__lll_timedwait_tid): Remove one unnecessary instruction.
7978 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
7979 __lll_mutex_timedlock_wait only for NOT_IN_libc.
7980 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
7983 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
7984 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
7986 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
7989 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
7990 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
7992 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
7993 define LOCK here (if UP is not defined). The actual code is in
7996 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
7997 LOCK is already defined. Don't define lll_unlock_wake_cb and
7998 __lll_timedwait_tid for libc.so.
7999 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8000 define LOCK here (if UP is not defined). The actual code is in
8003 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8004 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8005 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8006 instead of lowlevelsem.h.
8007 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8008 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8009 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8011 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8013 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8014 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8015 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8017 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8019 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8022 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8024 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8025 of __libc_locking_needed.
8026 (lll_trylock): Initialize %eax to zero.
8028 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8029 pthread_cond_t definition.
8031 2003-03-10 Roland McGrath <roland@redhat.com>
8033 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8034 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8035 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8036 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8037 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8039 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8040 Instead of setting PD->multiple_threads, set globals
8041 __pthread_multiple_threads and __libc_multiple_threads.
8042 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8043 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8044 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8046 * descr.h (struct pthread): Conditionalize first member on
8047 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8048 containing an anonymous tcbhead_t. Move `list' member out.
8049 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8050 * allocatestack.c: Remove use of `header.data.' prefix.
8051 * pthread_create.c: Likewise.
8052 * init.c (__pthread_initialize_minimal_internal): Likewise.
8053 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8054 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8055 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8056 * sysdeps/x86_64/tls.h: Likewise.
8057 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8058 (SINGLE_THREAD_P): Likewise.
8059 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8060 (SINGLE_THREAD_P): Likewise.
8061 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8062 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8064 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8066 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8068 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8069 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8071 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8072 leftovers from the ia32 code.
8074 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8076 (clear_once_control): Don't load %esi.
8078 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8081 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8083 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8084 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8086 * Makefile (tests): Add tst-cond10.
8087 * tst-cond10.c: New file.
8089 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8091 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8092 * tst-signal3.c (do_test): Likewise.
8093 * tst-sem5.c (do_test): Likewise.
8094 * tst-kill6.c (do_test): Likewise.
8095 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8097 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8099 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8100 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8101 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8102 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8103 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8104 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8105 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8107 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8109 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8110 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8111 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8112 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8113 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8114 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8115 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8116 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8118 * allocatestack.c (allocate_stack): If mprotect() fails free the
8121 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8123 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8125 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8126 lll_wake_tid. This was used only to work around kernel limits in
8128 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8129 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8130 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8131 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8133 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8134 (__pthread_initialize_minimal_internal): Change initialization of
8135 __static_tls_align_m1 appropriately.
8136 * pthreadP.h (__static_tls_align_m1): Renamed from
8138 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8139 instead of __static_tls_align-1.
8141 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8143 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8145 * pthread_create.c: Define __pthread_keys using nocommon
8146 attribute, not by placing it explicitly in bss.
8147 Remove DEFINE_DEALLOC definition. Not needed anymore.
8149 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8150 Use it in mmap call to allocate stacks.
8152 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8154 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8155 result of the thread function.
8157 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8159 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8160 version is just fine.
8162 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8163 (__pthread_child_handler): Renamed from pthread_child_handler,
8164 exported, and marked hidden. Change all users.
8165 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8166 free __pthread_child_handler from child list.
8168 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8170 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8172 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8173 Fix handling of cancellation and failing pthread_mutex_unlock call.
8174 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8175 (__pthread_cond_wait): Likewise.
8177 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8178 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8179 lll_futex_timed_wait call.
8180 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8181 (pthread_rwlock_timedwrlock): Likewise.
8183 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8184 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8185 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8187 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8188 check of lll_futex_wake return value.
8190 2003-03-03 Roland McGrath <roland@redhat.com>
8192 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8194 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8195 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8196 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8198 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8200 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8201 error for CPU clocks.
8203 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8204 _POSIX_MONOTONIC_CLOCK.
8205 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8207 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8210 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8212 * descr.h (struct pthread): Move cleanup field to the front.
8214 2003-03-01 Roland McGrath <roland@redhat.com>
8216 * sem_open.c (sem_open): Braino fix.
8218 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8220 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8221 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8222 __pthread_cleanup_pop functionality.
8223 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8225 * descr.h (struct pthread): Move tid field to the front now that
8228 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8229 (__lll_mutex_timedlock_wait): Remove.
8230 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8231 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8232 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8233 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8234 (lll_unlock_wake_cb): Don't save and restore %esi.
8235 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8237 (__lll_timedwait_tid): Add alignment.
8238 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8239 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8241 (__lll_timedwait_tid): Removed.
8242 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8243 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8244 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8245 (pthread_barrier_wait): Don't save, load, and restore %esi for
8247 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8248 (__pthread_cond_signal): Don't save, load, and restore %esi.
8249 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8250 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8251 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8252 Don't save, load, and restore %esi.
8254 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8256 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8257 Release lock before waking up the waiters.
8259 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8261 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8262 (reader_thread): Likewise.
8264 * sysdeps/pthread/pthread_rwlock_unlock.c
8265 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8266 to wake up readers if there are none.
8268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8269 Release internal lock before wake threads.
8271 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8273 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8274 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8276 * tst-rwlock9.c: Likewise.
8277 * tst-rwlock10.c: New file.
8278 * tst-rwlock11.c: New file.
8280 * Makefile (tests): Add tst-dlsym1.
8281 * tst-dlsym1.c: New file.
8283 * init.c (__pthread_initialize_minimal_internal): Set
8284 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8285 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8287 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8289 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8291 * tst-cond2.c: Fix sychronization with child.
8293 * tst-rwlock8.c (reader_thread): Remove unused variable.
8295 * Makefile: Add rules to build and run tst-tls3.
8296 * tst-tls3.c: New file.
8297 * tst-tls3mod.c: New file.
8299 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8300 * tst-rwlock8.c: New file.
8301 * tst-rwlock9.c: New file.
8302 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8303 complete broken rwlock implementation.
8304 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8306 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8308 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8309 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8310 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8311 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8312 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8313 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8314 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8316 2003-02-23 Roland McGrath <roland@redhat.com>
8318 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8320 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8322 * Makefile (tests): Add tst-context1.
8323 * tst-context1.c: New file.
8325 * Makefile (tests): Add tst-tls1 and tst-tls2.
8326 * tst-tls1.c: New file.
8327 * tst-tls2.c: New file.
8329 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8332 * pthread_create.c (start_thread): Set EXITING_BIT early.
8334 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8335 (THREAD_GETMEM_NC): Likewise.
8337 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8339 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8340 off 3 more bytes by using offset-less instructions when possible.
8342 * Makefile: Add dependency for $(objpfx)version.d.
8344 * eintr.c (eintr_source): Add unnecessary return but the compiler
8347 * tst-kill3.c: Include <unistd.h>.
8349 2003-02-21 Roland McGrath <roland@redhat.com>
8351 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8353 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8355 * Makefile (tests): Add tst-eintr1.
8356 (distribute): Add eintr.c.
8357 * tst-eintr1.c: New file.
8358 * eintr.c: New file.
8360 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8362 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8363 Disallow sending SIGCANCEL.
8365 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8366 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8367 * tst-kill1.c: New file.
8368 * tst-kill2.c: New file.
8369 * tst-kill3.c: New file.
8370 * tst-kill5.c: New file.
8371 * tst-kill6.c: New file.
8372 * tst-basic7.c: Renamed to...
8373 * tst-kill4.c: ...this.
8375 2003-02-21 Roland McGrath <roland@redhat.com>
8377 * Makefile (install-lib-ldscripts): New variable.
8379 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8381 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8382 * pthread_cancel.c: Use INVALID_TD_P.
8383 * pthread_detach.c: Likewise.
8384 * pthread_getschedparam.c: Likewise.
8385 * pthread_setschedparam.c: Likewise.
8386 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8387 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8388 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8389 * pthread_timedjoin.c: Likewise.
8391 * tst-basic7.c: Include <signal.h>.
8393 * pthread_join.c (pthread_join): Limited checking for invalid
8395 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8397 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8399 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8400 beginning of the loop. Clear the entire first block of TSD.
8401 * Makefile (tests): Add tst-key4.
8402 * tst-key4.c: New file.
8404 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8406 * Makefile (tests): Add tst-basic7.
8407 * tst-basic7.c: New file.
8409 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8410 Add some more __builtin_expect.
8412 * pthreadP.h: Define dummy version of DEBUGGING_P.
8414 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8416 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8417 _POSIX_THREAD_PRIORITY_SCHEDULING.
8418 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8419 _XOPEN_REALTIME_THREADS.
8420 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8422 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8423 kernel returns EINVAL for PID <= 0, work around it.
8425 * Makefile (tests): Add tst-signal5.
8426 * tst-signal5.c: New file.
8428 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8431 * tst-cancel1.c (tf): Block all signals.
8433 * Makefile (tests): Add tst-basic6.
8434 * tst-basic6.c: New file.
8436 * tst-basic1.c: Add test for process ID.
8438 * Makefile (tests): Add tst-cancel10.
8439 * tst-cancel10.c: New file.
8441 * Makefile (tests): Add tst-signal4.
8442 * tst-signal4.c: New file.
8444 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8445 __sigismember instead of sigismember. Add __builtin_expect.
8447 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8449 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8450 pthread_setcancelstate, and pthread_rwlock_setpshared.
8452 * tst-cancel7.c (do_test): Make sure the pid file exists before
8453 canceling the thread.
8455 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8456 pthread_rwlock_timedrdlock tests.
8457 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8458 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8459 Check for invalid tv_nsec field.
8460 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8463 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8464 recursive mutex of overflow.
8466 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8468 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8469 going into an endless loop.
8470 * Makefile (tests): Add tst-cancel9.
8471 * tst-cancel9.c: New file.
8473 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8475 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8477 * tst-mutex5.c (do_test): Add more timedlock tests.
8479 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8480 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8482 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8483 use INLINE_SYSCALL. Error number is returned, not -1.
8485 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8486 and __deallocate_stack with internal_function.
8487 * pthread_create.c: Adjust definitions appropriately.
8488 * allocatestack.c: Likewise.
8490 * pthread_join.c: Add one more __builtin_expect.
8491 * pthread_timedjoin.c: Likewise.
8493 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8494 not data of sequence number does not match.
8495 Add one __builtin_expect.
8497 * Makefile (tests): Add tst-clock1.
8498 * tst-clock1.c: New file.
8500 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8502 * Makefile (tests): Add tst-basic5.
8503 * tst-basic5.c: New file.
8505 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8507 * Makefile (tests): Add tst-basic4.
8508 * tst-basic4.c: New file.
8510 * pthreadP.h: Add declaraction for __nptl_nthreads.
8511 * pthread_create.c: Define __nptl_nthreads
8512 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8513 after thread is done. If then zero, call exit(0).
8514 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8515 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8516 * init.c (pthread_functions): Initialize ptr_nthreads.
8517 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8518 (__reclaim_stacks): Decrement __nptl_nthreads.
8519 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8521 * Makefile (tests): Add tst-basic3.
8522 * tst-basic3.c: New file.
8524 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8525 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8526 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8527 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8528 if asynchronous canceling is enabled.
8529 * pthread_join.c (pthread_join): When recognizing circular joins,
8530 take into account the other thread might be already canceled.
8531 * Makefile (tests): Add tst-join5.
8532 * tst-join5.c: New file.
8534 * Makefile (tests): Add tst-join4.
8535 * tst-join4.c: New file.
8537 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8539 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8541 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8543 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8544 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8545 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8547 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8549 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8550 error if lll_futex_wake failed.
8552 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8554 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8555 handling of cancellation and failung pthread_mutex_unlock call.
8556 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8557 * Makefile (tests): Add tst-cond8 and tst-cond9.
8558 * tst-cond8.c: New file.
8559 * tst-cond9.c: New file.
8561 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8563 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8564 non-standard initializers with __USE_GNU.
8566 * Makefile (tests): Add tst-cleanup3.
8567 * tst-cleanup3.c: New file.
8569 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8571 * Makefile (tests): Add tst-attr1 and tst-attr2.
8572 * tst-attr1.c: New file.
8573 * tst-attr2.c: New file.
8575 * Makefile: Add rules to build and run tst-atfork2 test.
8576 * tst-atfork2.c: New file.
8577 * tst-atfork2mod.c: New file.
8579 * sysdeps/unix/sysv/linux/unregister-atfork.c
8580 (__unregister_atfork): Free the memory allocated for the handlers
8581 after removing them from the lists.
8583 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8586 * tst-atfork1.c (do_test): Wait for the child we forked.
8587 Report error in child.
8589 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8591 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8593 2003-02-10 Ulrich Drepper <drepper@redhat.com>
8595 * Makefile (tests): Add tst-cancel8.
8596 * tst-cancel8.c: New file.
8598 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8599 clearing of control variable.
8600 * Makefile (tests): Add tst-once3 and tst-once4.
8601 * tst-once3.c: New file.
8602 * tst-once4.c: New file.
8604 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8606 * sysdeps/sh/Makefile: New file.
8607 * sysdeps/sh/bits/atomic.h: New file.
8608 * sysdeps/sh/pthread_spin_init.c: New file.
8609 * sysdeps/sh/pthread_spin_lock.c: New file.
8610 * sysdeps/sh/pthread_spin_trylock.S: New file.
8611 * sysdeps/sh/pthread_spin_unlock.S: New file.
8612 * sysdeps/sh/pthreaddef.h: New file.
8613 * sysdeps/sh/tcb-offsets.sym: New file.
8614 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8615 * sysdeps/sh/tls.h: New file.
8616 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8617 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8618 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8619 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8620 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8621 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8622 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8623 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8624 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8625 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8626 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8627 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8628 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8629 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8630 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8631 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8632 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8633 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8634 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8635 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8636 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8637 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8638 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8639 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8640 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8641 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8642 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8643 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8644 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8645 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8647 2003-02-08 Ulrich Drepper <drepper@redhat.com>
8649 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8652 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8654 2003-02-07 Ulrich Drepper <drepper@redhat.com>
8656 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8657 (TLS_GET_FS): New #define.
8658 (TLS_SET_FS): New #define.
8659 Correct value of __NR_set_thread_area.
8661 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8663 2003-02-06 Ulrich Drepper <drepper@redhat.com>
8665 * Makefile (tests): Add tst-popen1.
8666 * tst-popen1.c: New file.
8668 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8669 but inactive generalization.
8670 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8671 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8672 Minor optimization, remove one instruction.
8673 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8675 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8677 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8679 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8681 * init.c (__NR_set_tid_address): Add #ifdef for s390.
8682 * sysdeps/pthread/pthread_barrier_wait.c: New file.
8683 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8684 * sysdeps/pthread/pthread_cond_signal.c: New file.
8685 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8686 * sysdeps/pthread/pthread_cond_wait.c: New file.
8687 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8688 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8689 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8690 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8691 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8692 * sysdeps/s390/Makefile: New file.
8693 * sysdeps/s390/bits/atomic.h: New file.
8694 * sysdeps/s390/pthread_spin_init.c: New file.
8695 * sysdeps/s390/pthread_spin_lock.c: New file.
8696 * sysdeps/s390/pthread_spin_trylock.c: New file.
8697 * sysdeps/s390/pthread_spin_unlock.c: New file.
8698 * sysdeps/s390/pthreaddef.h: New file.
8699 * sysdeps/s390/tcb-offsets.sym: New file.
8700 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8701 * sysdeps/s390/tls.h: New file.
8702 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8703 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8704 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8705 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8706 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8707 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8708 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8709 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8710 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8711 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8712 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8713 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8714 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8715 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8716 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8717 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8718 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8719 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8720 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8721 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8722 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8723 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8724 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8726 2003-02-04 Ulrich Drepper <drepper@redhat.com>
8728 * atomic.h: Add a couple more default implementations.
8729 (atomic_compare_and_exchange_acq): Use
8730 __arch_compare_and_exchange_32_acq in return value definition. It
8732 (atomic_bit_set): Renamed from atomic_set_bit.
8733 Add missing atomic_ prefixes.
8735 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8736 thread library is available, use correct value to mark initialized
8739 2003-02-03 Ulrich Drepper <drepper@redhat.com>
8741 * allocatestack.c (allocate_stack): Use __getpagesize instead of
8742 __sysconf to determine pagesize.
8744 * pthread_create.c: Include <atomic.h>.
8745 * allocatestack.c (allocate_stack): Implement coloring of the
8746 allocated stack memory. Rename pagesize to pagesize_m1. It's the
8747 size minus one. Adjust users.
8748 * sysdeps/i386/i686/Makefile: New file.
8750 2003-02-02 Ulrich Drepper <drepper@redhat.com>
8752 * allocatestack.c: Improve comment throughout the file.
8754 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8755 (__lll_lock_wait): Add branch prediction.
8756 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8757 (__lll_lock_wait): Likewise.
8758 (lll_unlock_wake_cb): Removed.
8760 2003-01-31 Ulrich Drepper <drepper@redhat.com>
8762 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8763 _POSIX_THREAD_PRIORITY_SCHEDULING.
8765 2003-01-30 Jakub Jelinek <jakub@redhat.com>
8767 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8768 Fix return type of ptr___pthread_getspecific.
8770 2003-01-29 Ulrich Drepper <drepper@redhat.com>
8772 * Makefile (tests): Add tst-umask1.
8773 (tst-umask1-ARGS): Define.
8774 * tst-umask1.c: New file.
8776 2003-01-28 Ulrich Drepper <drepper@redhat.com>
8778 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
8779 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8780 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8781 pthread_rwlock_unlock.
8782 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8783 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8784 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8785 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8786 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8788 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8789 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8791 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8792 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8793 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8795 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8796 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8798 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8799 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8800 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8802 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8803 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8805 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8807 * Makefile (libpthread-routines): Remove lowlevelcond and
8808 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8809 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8810 and pthread_cond_broadcast.
8811 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8812 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8813 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8814 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8815 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8816 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8817 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8818 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8819 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8820 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8821 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8822 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8823 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8825 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8826 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8827 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8828 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8829 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8830 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8831 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8832 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8833 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8834 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8835 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8836 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8837 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8838 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8839 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8840 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8841 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8843 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8844 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
8845 of the code is moved to ...
8846 * sysdeps/pthread/createthread.c: ...here. New file.
8848 2003-01-27 Ulrich Drepper <drepper@redhat.com>
8850 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8851 (__new_sem_post): Clear %eax before returning.
8852 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8854 * Makefile (tests): Add tst-cleanup2.
8855 * tst-cleanup2.c: New file.
8857 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8858 Interpret first parameter correctly.
8860 2003-01-17 Ulrich Drepper <drepper@redhat.com>
8862 * Makefile (headers): Add bits/semaphore.h.
8864 2003-01-16 Jakub Jelinek <jakub@redhat.com>
8866 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8869 2003-01-14 Ulrich Drepper <drepper@redhat.com>
8871 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8872 must be used and mapping failed.
8873 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8875 * Makefile (CFLAGS-pthread_self.os): Define this, not
8876 CFLAGS-pthread_self.c.
8878 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8880 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8883 * Makefile (libpthread-routines): Add version. Add rules to build
8884 version.os and banner.h.
8885 * version.c: New file.
8887 2003-01-13 Jakub Jelinek <jakub@redhat.com>
8889 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8890 the alias unconditional.
8891 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
8893 2003-01-13 Ulrich Drepper <drepper@redhat.com>
8895 * Makefile (CFLAGS-pthread_self.c): New definition.
8897 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8899 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8900 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8901 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8902 * init.c (__pthread_initialize_minimal_internal): Likewise.
8904 2003-01-07 Jakub Jelinek <jakub@redhat.com>
8906 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8908 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8909 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8910 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8911 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8912 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8913 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8915 2003-01-06 Jakub Jelinek <jakub@redhat.com>
8917 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8918 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8919 * tst-cancel-wrappers.sh: Remove all exceptions.
8921 2003-01-05 Ulrich Drepper <drepper@redhat.com>
8923 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8924 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
8926 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8927 Use __libc_pthread_functions array if SHARED.
8929 * pthreadP.h: Move pthread_cond_2_0_t definition to...
8930 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8932 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8933 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8934 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8935 __libc_ptf_call instead of __libc_maybe_call.
8937 (__libc_cleanup_region_start): Wrap function name with PTF call.
8938 (__libc_cleanup_region_end): Likewise.
8939 (__libc_cleanup_end): Likewise.
8941 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8942 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8943 * pthread_key_create.c: Add __pthread_key_create_internal alias.
8944 * pthreadP.h: Add prototypes.
8946 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8947 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8948 __pthread_rwlock_unlock aliases.
8949 * pthreadP.h: Add prototypes for new aliases.
8951 * pthreadP.h (struct pthead_functions): Moved to...
8952 * sysdeps/pthread/pthread-functions.h: ...here. New file.
8953 * init.c (pthread_functions): Add initializers for new elements.
8955 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8956 __pthread_cleanup_pop_restore aliases.
8957 * pthreadP.h: Add prototypes.
8959 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
8960 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
8961 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
8962 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
8963 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8964 * pthreadP.h: Adjust prototypes and callers.
8966 2003-01-04 Ulrich Drepper <drepper@redhat.com>
8968 * Makefile (tests): Add tst-cancel7.
8969 (tst-cancel7-ARGS): New variable.
8970 * tst-cancel7.c: New file.
8972 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
8973 around gcc defficiencies.
8974 * old_pthread_cond_signal.c: Likewise.
8975 * old_pthread_cond_timedwait.c: Likewise.
8976 * old_pthread_cond_wait.c: Likewise.
8978 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
8980 2003-01-03 Ulrich Drepper <drepper@redhat.com>
8982 * Makefile (tests): Add tst-cond7.
8983 * tst-cond7.c: New file.
8985 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8986 (condvar_cleanup): Get condvar address from the right place.
8988 * atomic.h: Correct definitions of atomic_full_barrier,
8989 atomic_read_barrier, atomic_write_barrier.
8991 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
8993 * old_pthread_cond_signal.c: Likewise.
8994 * old_pthread_cond_timedwait.c: Likewise.
8995 * old_pthread_cond_wait.c: Likewise.
8997 2003-01-03 Jakub Jelinek <jakub@redhat.com>
8999 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9001 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9003 * pthreadP.h (pthread_cond_2_0_t): New type.
9004 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9005 Use new type for the 2.0 condvar function prototypes.
9006 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9007 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9009 * old_pthread_cond_destroy.c: Likewise.
9010 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9011 * old_pthread_cond_signal.c: Likewise.
9012 * old_pthread_cond_timedwait.c: Likewise.
9013 * old_pthread_cond_wait.c: Likewise.
9015 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9016 (__pthread_cond_wait): Don't save cancellation mode and seq value
9019 * herrno.c (__h_errno_location): Don't define as weak.
9021 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9023 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9024 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9025 and pthread_cond_wait.
9026 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9028 (__pthread_cond_broadcast_2_0): ... this.
9029 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9031 (__pthread_cond_destroy_2_0): ... this.
9032 * old_pthread_cond_init.c (__old_pthread_cond_init):
9034 (__pthread_cond_init_2_0): ... this.
9035 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9037 (__pthread_cond_signal_2_0): ... this.
9038 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9040 (__pthread_cond_wait_2_0): ... this.
9041 * pthread_cond_destroy.c: Include shlib-compat.h.
9042 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9043 * pthread_cond_init.c: Include shlib-compat.h.
9044 (pthread_cond_init): Change strong_alias into versioned_symbol.
9045 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9046 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9048 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9049 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9050 __pthread_cond_wait_2_0): New prototypes.
9051 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9052 __old_pthread_cond_init, __old_pthread_cond_signal,
9053 __old_pthread_cond_wait): Removed.
9054 * init.c: Include shlib-compat.h.
9055 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9056 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9057 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9058 ptr___pthread_cond_*_2_0 fields.
9059 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9060 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9062 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9063 LIBC_SIGACTION was not yet defined.
9064 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9065 [!defined LIBC_SIGACTION] (__sigaction): New function and
9067 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9068 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9070 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9072 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9074 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9076 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9077 New, larger type definition.
9078 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9080 * Versions [libpthread]: Add definitions for new pthread_cond_*
9081 interfaces for version GLIBC_2.3.2.
9082 * pthread_cond_init.c: Update initialization for new type definition.
9083 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9084 pthread_cond_timedwait, pthread_cond_signal, and
9085 pthread_cond_broadcast. Add old_pthread_cond_init,
9086 old_pthread_cond_destroy, old_pthread_cond_wait,
9087 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9088 old_pthread_cond_broadcast.
9089 * old_pthread_cond_broadcast.c: New file.
9090 * old_pthread_cond_destroy.c: New file.
9091 * old_pthread_cond_init.c: New file.
9092 * old_pthread_cond_signal.c: New file.
9093 * old_pthread_cond_timedwait.c: New file.
9094 * old_pthread_cond_wait.c: New file.
9095 * pthreadP.h: Add prototypes for the compatibility interfaces.
9097 * pthread_cond_destroy.c: Don't include <errno.h>.
9099 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9101 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9102 unnecessary zero offset when addressing MUTEX.
9104 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9106 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9108 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9109 for __register_atfork.
9111 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9113 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9114 instead of ASSEMBLER test macro.
9116 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9117 __libc_current_sigrtmax): Add libc_hidden_def.
9119 * sysdeps/pthread/list.h: Remove assert.h include.
9121 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9123 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9124 __pthread_initialize_minimal_internal not
9125 __pthread_initialize_minimal.
9127 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9129 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9130 __pthread_initialize_minimal as hidden.
9132 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9135 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9137 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9138 $(common-objpfx)format.lds, include that into the output script.
9140 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9142 2002-12-28 Andreas Jaeger <aj@suse.de>
9144 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9145 nsec resolution changes.
9146 (xstat64_conv): Likewise.
9147 (xstat32_conv): Likewise.
9148 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9150 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9151 structs stat and stat64.
9152 * time/time.h (__timespec_defined): Define for __USE_MISC.
9153 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9155 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9157 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9159 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9160 (pthread_exit): Use strong_alias to avoid warnings.
9161 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9162 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9163 ptr___pthread_attr_init_2_*.
9164 * init.c (pthread_functions): Adjust.
9166 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9168 * forward.c: Make all functions available by default again. It
9169 caused too much trouble.
9171 * pt-siglongjmp.c: Removed.
9173 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9175 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9176 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9177 * sysdeps/i386/Makefile: New file.
9178 * sysdeps/i386/tcb-offsets.sym: New file.
9179 * sysdeps/pthread/tcb-offsets.h: New file.
9180 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9181 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9183 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9184 __register_atfork...
9185 (GLIBC_2.3.2): ...here.
9187 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9189 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9190 pthread_attr_setstackaddr with __attribute_deprecated__.
9192 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9194 * pt-system.c (system): Remove cancellation handling.
9195 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9196 cancellation routines.
9198 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9200 * descr.h: Include <dl-sysdep.h>.
9201 (struct pthread): Move header.data.list to the back of the struct.
9202 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9203 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9204 (SYSINFO_OFFSEET): Likewise.
9206 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9208 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9210 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9211 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9212 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9213 (USE_DL_SYSINFO): Undef.
9215 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9217 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9218 $(common-objpfx)libc.so.
9219 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9220 it is bigger than pipe buffer size even on arches with bigger
9222 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9224 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9226 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9227 correct errno access for case that USE___THREAD is not defined.
9229 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9231 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9232 Patch by Marijn Ros <marijn@mad.scientist.com>.
9234 2002-12-22 Roland McGrath <roland@redhat.com>
9236 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9238 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9240 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9242 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9244 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9245 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9246 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9248 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9250 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9251 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9252 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9253 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9254 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9255 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9256 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9257 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9259 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9261 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9263 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9265 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9267 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9268 that sysinfo is properly initialized.
9269 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9270 to 1 only for ld.so.
9272 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9273 RTLD_CORRECT_DYNAMIC_WEAK.
9275 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9277 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9278 Use return 0 as 6th argument to FORWARD4.
9279 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9281 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9283 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9284 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9285 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9286 (INIT_SYSINFO): New #define.
9287 (TLS_TP_INIT): Use INIT_SYSINFO.
9288 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9289 At test to make sure SYSINFO_OFFSET value is correct.
9290 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9292 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9294 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9295 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9296 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9297 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9298 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9299 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9300 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9302 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9304 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9305 macro instead of using int $0x80 directly.
9307 * sysdeps/pthread/bits/stdio-lock.h: New file.
9308 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9309 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9310 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9311 * Makefile (routines): Add libc-lowlevelmutex.
9313 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9314 __i686.get_pc_thunk.dx.
9316 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9318 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9319 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9320 ($(objpfx)tst-cancel-wrappers.out): New rule.
9321 * tst-cancel-wrappers.sh: New test.
9322 * tst-locale1.c: Include signal.h.
9323 (uselocale): Test static linking of __libc_current_sigrt*.
9325 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9327 * Makefile (tests): Add tst-cancel6.
9328 * tst-cancel6.c: New file
9330 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9332 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9333 Define meaningfully for assembler as well.
9334 * pthreadP.h (struct pthread_functions): Remove
9335 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9336 and ptr_pthread_attr_init_2_1 fields.
9337 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9338 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9339 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9340 (FORWARD3): Define using FORWARD4.
9341 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9343 * pt-system.c: Remove duplicate stdlib.h include.
9345 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9347 * sem_init.c: Define sem_init@GLIBC_2.0.
9348 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9349 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9351 * flockfile.c: Moved to...
9352 * sysdeps/pthread/flockfile.c: ...here. New file.
9353 * funlockfile.c: Moved to...
9354 * sysdeps/pthread/funlockfile.c: ...here. New file.
9355 * ftrylockfile.c: Moved to...
9356 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9358 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9360 * libc-cancellation.c: Guard both function with
9361 #if !defined NOT_IN_libc.
9362 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9363 automatically provided pthread wrappers.
9364 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9365 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9367 * pt-open.c: Removed.
9368 * pt-fcntl.c: Removed.
9369 * pt-fsync.c: Removed.
9370 * pt-lseek.c: Removed.
9371 * pt-msgrcv.c: Removed.
9372 * pt-msgsnd.c: Removed.
9373 * pt-msync.c: Removed.
9374 * pt-nanosleep.c: Removed.
9375 * pt-open64.c: Removed.
9376 * pt-pause.c: Removed.
9377 * pt-pread.c: Removed.
9378 * pt-pread64.c: Removed.
9379 * pt-pwrite.c: Removed.
9380 * pt-pwrite64.c: Removed.
9381 * pt-read.c: Removed.
9382 * pt-recv.c: Removed.
9383 * pt-recvfrom.c: Removed.
9384 * pt-recvmsg.c: Removed.
9385 * pt-send.c: Removed.
9386 * pt-sendto.c: Removed.
9387 * pt-sigtimedwait.c: Removed.
9388 * pt-sigwait.c: Removed.
9389 * pt-wait.c: Removed.
9390 * pt-waitpid.c: Removed.
9391 * pt-write.c: Removed.
9392 * pt-accept.c: Removed.
9393 * pt-close.c: Removed.
9394 * pt-connect.c: Removed.
9395 * pt-lseek64.c: Removed.
9396 * pt-sendmsg.c: Removed.
9397 * pt-tcdrain.c: Removed.
9399 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9401 * init.c (__pthread_initialize_minimal_internal): Renamed from
9402 __pthread_initialize_minimal. Make old name an alias. This
9403 converts a normal relocation into a relative relocation.
9405 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9407 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9408 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9409 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9410 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9411 pt-sigwaitinfo, pt-waitid, and pt-writev.
9412 * pt-creat.c: Removed.
9413 * pt-poll.c: Removed.
9414 * pt-pselect.c: Removed.
9415 * pt-readv.c: Removed.
9416 * pt-select.c: Removed.
9417 * pt-sigpause.c: Removed.
9418 * pt-sigsuspend.c: Removed.
9419 * pt-sigwaitinfo.c: Removed.
9420 * pt-waitid.c: Removed.
9421 * pt-writev.c: Removed.
9423 * init.c (pthread_functions): New variable.
9424 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9425 (or NULL) to __libc_pthread_init.
9426 * forward.c: Rewrite to use __libc:pthread_functions array to get
9428 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9430 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9431 Take new parameter. Copy content of variable pointed to by it
9432 to __libc_pthread_init.
9434 * pthreadP.h (struct pthread_functions): New type.
9435 (__libc_pthread_init): Declare.
9437 * pthread_attr_destroy.c: Add namespace protected alias.
9438 * pthread_attr_getdetachstate.c: Likewise.
9439 * pthread_attr_getinheritsched.c: Likewise.
9440 * pthread_attr_getschedparam.c: Likewise.
9441 * pthread_attr_getschedpolicy.c: Likewise.
9442 * pthread_attr_getscope.c: Likewise.
9443 * pthread_attr_setdetachstate.c: Likewise.
9444 * pthread_attr_setinheritsched.c: Likewise.
9445 * pthread_attr_setschedparam.c: Likewise.
9446 * pthread_attr_setschedpolicy.c: Likewise.
9447 * pthread_attr_setscope.c: Likewise.
9448 * pthread_cond_broadcast.c: Likewise.
9449 * pthread_cond_destroy.c: Likewise.
9450 * pthread_cond_init.c: Likewise.
9451 * pthread_cond_signal.c: Likewise.
9452 * pthread_cond_wait.c: Likewise.
9453 * pthread_condattr_destroy.c: Likewise.
9454 * pthread_condattr_init.c: Likewise.
9455 * pthread_equal.c: Likewise.
9456 * pthread_exit.c: Likewise.
9457 * pthread_getschedparam.c: Likewise.
9458 * pthread_self.c: Likewise.
9459 * pthread_setcancelstate.c: Likewise.
9460 * pthread_setschedparam.c: Likewise.
9461 * pthread_mutex_destroy.c: Likewise.
9462 * pthread_mutex_init.c: Likewise.
9463 * pthreadP.h: Add prototypes for the aliases.
9465 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9466 multiple_threads member in correct TCB to 1.
9468 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9469 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9470 member of thread decriptor, otherwise return unconditionally 1.
9472 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9474 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9475 regular Linux version. Remove file.
9476 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9477 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9478 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9479 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9480 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9481 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9482 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9483 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9484 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9485 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9486 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9487 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9488 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9489 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9490 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9491 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9492 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9493 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9494 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9495 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9496 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9497 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9498 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9499 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9500 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9501 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9502 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9503 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9504 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9505 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9507 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9509 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9510 * sysdeps/unix/sysv/linux/open.c: Removed.
9511 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9512 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9513 * sysdeps/unix/sysv/linux/msync.c: Removed.
9514 * sysdeps/unix/sysv/linux/read.c: Removed.
9515 * sysdeps/unix/sysv/linux/close.c: Removed.
9516 * sysdeps/unix/sysv/linux/creat.c: Removed.
9517 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9518 * sysdeps/unix/sysv/linux/pause.c: Removed.
9519 * sysdeps/unix/sysv/linux/select.c: Removed.
9520 * sysdeps/unix/sysv/linux/write.c: Removed.
9522 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9524 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9525 element in TCB to see whether locking is needed.
9527 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9528 MULTIPLE_THREADS_OFFSET value is correct.
9530 * sysdeps/unix/sysv/linux/close.c: New file.
9531 * sysdeps/unix/sysv/linux/connect.S: New file.
9532 * sysdeps/unix/sysv/linux/creat.c: New file.
9533 * sysdeps/unix/sysv/linux/fsync.c: New file.
9534 * sysdeps/unix/sysv/linux/llseek.c: New file.
9535 * sysdeps/unix/sysv/linux/lseek.c: New file.
9536 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9537 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9538 * sysdeps/unix/sysv/linux/msync.c: New file.
9539 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9540 * sysdeps/unix/sysv/linux/open.c: New file.
9541 * sysdeps/unix/sysv/linux/open64.c: New file.
9542 * sysdeps/unix/sysv/linux/pause.c: New file.
9543 * sysdeps/unix/sysv/linux/poll.c: New file.
9544 * sysdeps/unix/sysv/linux/pread.c: New file.
9545 * sysdeps/unix/sysv/linux/pread64.c: New file.
9546 * sysdeps/unix/sysv/linux/pselect.c: New file.
9547 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9548 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9549 * sysdeps/unix/sysv/linux/readv.c: New file.
9550 * sysdeps/unix/sysv/linux/recv.S: New file.
9551 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9552 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9553 * sysdeps/unix/sysv/linux/select.c: New file.
9554 * sysdeps/unix/sysv/linux/send.S: New file.
9555 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9556 * sysdeps/unix/sysv/linux/sendto.S: New file.
9557 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9558 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9559 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9560 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9561 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9562 * sysdeps/unix/sysv/linux/system.c: New file.
9563 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9564 * sysdeps/unix/sysv/linux/wait.c: New file.
9565 * sysdeps/unix/sysv/linux/waitid.c: New file.
9566 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9567 * sysdeps/unix/sysv/linux/writev.c: New file.
9568 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9570 * pt-readv.c: Fix comment.
9572 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9574 * tst-cleanup1.c: Include stdlib.h.
9576 * tst-cancel5.c: New test.
9577 * Makefile (tests): Add tst-cancel5.
9578 (tst-cancel5): Link against libc.so libpthread.so in that order.
9580 2002-12-13 Ulrich Drepper <drepper@redhat.com>
9582 * forward.c (test_loaded): Prevent recursive calls.
9584 * Makefile (routines): Add libc-cancellation.
9585 * libc-cancellation.c: New file.
9586 * descr.h (struct pthread): Add multiple_threads field.
9587 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9588 new thread descriptor to 1.
9589 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9590 Initialize multiple_thread field after successful thread creation.
9591 * cancellation.c (__do_cancel): Move to pthreadP.h.
9592 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9593 (__pthread_disable_asynccancel): Add internal_function attribute.
9594 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9595 * pthread_setcancelstate.c: Likewise.
9596 * pthread_setcanceltype.c: Likewise.
9597 * pthread_exit.c: Likewise.
9598 * pthreadP.h (CANCELLATION_P): Likewise.
9599 (__do_cancel): Define as static inline.
9600 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9601 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9603 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9604 fields. Define MULTIPLE_THREADS_OFFSET.
9605 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9607 * sysdeps/unix/sysv/linux/accept.S: New file.
9608 * sysdeps/unix/sysv/linux/read.c: New file.
9609 * sysdeps/unix/sysv/linux/write.c: New file.
9610 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9611 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9612 initialization of __libc_locking_needed.
9613 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9614 __libc_locking_needed, use multiple_threads field in TCB.
9615 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9617 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9619 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9621 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9623 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9624 access to __libc_locking_needed for PIC.
9626 2002-12-12 Jakub Jelinek <jakub@redhat.com>
9628 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9629 declare for libc.so.
9630 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9632 (__libc_lock_lock): Put into statement expression.
9633 (__libc_lock_unlock): Remove trailing semicolon.
9634 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9636 2002-12-12 Roland McGrath <roland@redhat.com>
9638 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9639 "m" constraint to refer to __libc_locking_needed. Declare it here.
9641 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9643 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9644 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9645 Initialize __libc_locking_needed.
9646 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9647 instead of __register_pthread_fork_handler.
9648 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9649 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9650 fork-gen with libc_pthread_init.
9651 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9652 of __register_pthread_fork_handler.
9653 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9654 of __register_pthread_fork_handler.
9655 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9656 __libc_locking_needed to determine whether lock prefix can be avoided.
9657 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9659 2002-12-11 Ulrich Drepper <drepper@redhat.com>
9661 * Makefile (tests): Add tst-cleanup1.
9662 * tst-cleanup1.c: New file.
9663 * cancellation.c (__cleanup_thread): Removed.
9664 (__do_cancel): Remove call to __cleanup_thread.
9665 * pthreadP.h: Remove __cleanup_thread prorotype.
9667 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9668 Remember function and argument even if cancellation handler
9669 function is not available.
9670 (__libc_cleanup_region_end): Execute registered function directly if
9671 pthread functions are not available.
9672 (__libc_cleanup_end): Likewise.
9674 * init.c (__pthread_initialize_minimal): Fix initialization in
9675 static lib by preventing gcc from being too clever.
9677 2002-12-10 Ulrich Drepper <drepper@redhat.com>
9679 * init.c (__pthread_initialize_minimal): Remove unneccesary
9682 * Makefile (tests): We can run tst-locale2 now.
9684 2002-12-09 Ulrich Drepper <drepper@redhat.com>
9686 * Versions: Remove duplicated sigwait entry.
9688 2002-12-08 Ulrich Drepper <drepper@redhat.com>
9690 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9693 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9695 * pthreadP.h: Declare __pthread_enable_asynccancel and
9696 __pthread_disable_asynccancel.
9697 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9698 (CANCEL_RESET): Use __pthread_disable_asynccancel.
9699 * cancellation.c (__pthread_enable_asynccancel): New function.
9700 (__pthread_disable_asynccancel): New function.
9701 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9702 * pt-close.c: Likewise.
9703 * pt-connect.c: Likewise.
9704 * pt-creat.c: Likewise.
9705 * pt-fcntl.c: Likewise.
9706 * pt-fsync.c: Likewise.
9707 * pt-lseek.c: Likewise.
9708 * pt-lseek64.c: Likewise.
9709 * pt-msgrcv.c: Likewise.
9710 * pt-msgsnd.c: Likewise.
9711 * pt-msync.c: Likewise.
9712 * pt-nanosleep.c: Likewise.
9713 * pt-open.c: Likewise.
9714 * pt-open64.c: Likewise.
9715 * pt-pause.c: Likewise.
9716 * pt-poll.c: Likewise.
9717 * pt-pread.c: Likewise.
9718 * pt-pread64.c: Likewise.
9719 * pt-pselect.c: Likewise.
9720 * pt-pwrite.c: Likewise.
9721 * pt-pwrite64.c: Likewise.
9722 * pt-read.c: Likewise.
9723 * pt-readv.c: Likewise.
9724 * pt-recv.c: Likewise.
9725 * pt-recvfrom.c: Likewise.
9726 * pt-recvmsg.c: Likewise.
9727 * pt-select.c: Likewise.
9728 * pt-send.c: Likewise.
9729 * pt-sendmsg.c: Likewise.
9730 * pt-sendto.c: Likewise.
9731 * pt-sigpause.c: Likewise.
9732 * pt-sigsuspend.c: Likewise.
9733 * pt-sigtimedwait.c: Likewise.
9734 * pt-sigwait.c: Likewise.
9735 * pt-sigwaitinfo.c: Likewise.
9736 * pt-system.c: Likewise.
9737 * pt-tcdrain.c: Likewise.
9738 * pt-wait.c: Likewise.
9739 * pt-waitid.c: Likewise.
9740 * pt-waitpid.c: Likewise.
9741 * pt-write.c: Likewise.
9742 * pt-writev.c: Likewise.
9743 * pthread_join.c: Likewise.
9744 * pthread_timedjoin.c: Likewise.
9746 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9747 (__xpg_sigpause): New function.
9748 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9750 2002-12-07 Ulrich Drepper <drepper@redhat.com>
9752 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9754 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9755 _GI_pthread_cleanup_pop to pthreadP.h.
9757 * ftrylockfile.c: Use _IO_lock_trylock instead of
9758 pthread_mutex_trylock.
9760 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9761 (CANCEL_RESET): Likewise.
9762 (__pthread_setcanceltype_): Declare.
9763 (__pthread_mutex_lock_internal): Declare.
9764 (__pthread_mutex_unlock_internal): Declare.
9765 (__pthread_once_internal): Declare.
9766 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9767 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9769 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9770 and pthread_mutex_unlock.
9771 * pthread_cond_wait.c: Likewise.
9772 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9773 * pthread_mutex_unlock.c: Likewise.
9775 * pthread_setcanceltype.c: Add additional alias
9776 __pthread_setcanceltype.
9778 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9779 * sem_open.c (sem_open): Likewise.
9780 Use __libc_open, __libc_write, and __libc_close instead of
9781 open, write, and close respectively.
9783 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9784 Rewrite as statement expression since it must return a value.
9786 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9787 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9790 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9791 alias __pthread_once_internal.
9793 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9795 2002-12-06 Ulrich Drepper <drepper@redhat.com>
9797 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9798 * tst-stdio1.c: New file.
9799 * tst-stdio2.c: New file.
9801 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9803 * Makefile (tests): Comment out tst-locale2 for now.
9804 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9806 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9808 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9809 Use _IO_lock_init instead of explicit assignment.
9811 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9812 Define __libc_lock_* and __libc_lock_recursive macros with
9813 lowlevellock macros, not pthread mutexes.
9815 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
9816 of pthread_mutex_lock.
9817 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
9818 instead of pthread_mutex_unlock.
9820 2002-12-06 Roland McGrath <roland@redhat.com>
9822 * allocatestack.c (__stack_user): Use uninitialized defn.
9823 * init.c (__pthread_initialize_minimal): Initialize it here.
9825 2002-12-05 Roland McGrath <roland@redhat.com>
9827 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9829 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9831 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9834 2002-12-05 Ulrich Drepper <drepper@redhat.com>
9836 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9838 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9839 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9840 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9841 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9842 for __libc_lock_* macros.
9843 * Makefile (routines): Add libc-lowlevellock.
9845 2002-10-09 Roland McGrath <roland@redhat.com>
9847 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9848 Under [__PIC__], call the function via the pointer fetched for
9849 comparison rather than a call by name that uses the PLT.
9850 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9851 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9852 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9853 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9854 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9856 2002-12-04 Roland McGrath <roland@redhat.com>
9858 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9860 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9861 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9863 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9865 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9867 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9868 a completely opaque, non-integer type.
9869 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9871 2002-12-05 Jakub Jelinek <jakub@redhat.com>
9873 * sysdeps/i386/tls.h: Include stdlib.h.
9874 * sysdeps/x86_64/tls.h: Likewise.
9876 2002-12-04 Ulrich Drepper <drepper@redhat.com>
9878 * Makefile (tests): Add tst-locale2.
9879 (tests-static): Likewise.
9880 * tst-locale2.c: New file.
9882 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9883 volatile and add memory clobbers to lock operations.
9885 2002-12-03 Ulrich Drepper <drepper@redhat.com>
9887 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9888 * sysdeps/i386/i486/bits/atomic.h: New file.
9889 * sysdeps/i386/i586/bits/atomic.h: New file.
9890 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9891 include i486 version.
9892 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9893 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9894 Patch by Marijn Ros <marijn@mad.scientist.com>.
9896 * allocatestack.c (get_cached_stack): Don't crash if we first
9897 found a stack with a larger size then needed.
9898 Reported by Hui Huang <hui.huang@sun.com>.
9900 * Makefile (tests): Add tst-sysconf.
9901 * tst-sysconf.c: New file.
9903 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9904 PTHREAD_THREADS_MAX.
9906 2002-12-02 Roland McGrath <roland@redhat.com>
9908 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9909 Declare using hidden_proto instead of attribute_hidden, so there are
9910 non-.hidden static symbols for gdb to find.
9911 (__pthread_keys): Likewise.
9912 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9913 * allocatestack.c (__stack_user): Likewise.
9914 * pthread_create.c (__pthread_keys): Likewise.
9915 (__nptl_threads_events, __nptl_last_event): Make these static instead
9917 * pthread_key_create.c (__pthread_pthread_keys_max,
9918 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9920 2002-12-02 Ulrich Drepper <drepper@redhat.com>
9922 * Makefile (tests): Add tst-locale1. If buid-static is yes link
9924 * tst-locale1.c: New file.
9926 * pthread_cond_timedwait.c: Include <stdlib.h>.
9928 * Makefile (tests): Add tst-fork2 and tst-fork3.
9929 * tst-fork2.c: New file.
9930 * tst-fork3.c: New file.
9932 2002-11-28 Ulrich Drepper <drepper@redhat.com>
9934 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9936 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9937 require it to 200112L.
9939 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9940 instruction only if HAVE_CMOV is defined.
9941 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9943 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9945 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9947 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9949 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9951 2002-11-27 Ulrich Drepper <drepper@redhat.com>
9953 * sysdeps/x86_64/bits/atomic.h: New file.
9955 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9958 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
9959 possible since gettid cannot fail.
9961 * sysdeps/x86_64/pthreaddef.h: New file.
9963 * sysdeps/i386/pthreaddef.h (gettid): Removed.
9965 * sysdeps/x86_64/pthread_spin_init.c: New file.
9966 * sysdeps/x86_64/pthread_spin_lock.c: New file.
9967 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
9968 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
9970 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
9971 Add missing lock prefix. Minute optimization.
9973 * tst-spin2.c (main): Also check successful trylock call.
9975 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
9976 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
9978 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
9979 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
9981 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
9982 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
9983 value in case of an error. Add support for INTERNAL_SYSCALL.
9985 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
9986 value in case of an error.
9988 * sysdeps/x86_64/tls.h: New file.
9990 2002-11-26 Ulrich Drepper <drepper@redhat.com>
9992 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
9993 takes the array member name and the index as parameters.
9994 (THREAD_SETMEM_NC): Likewise.
9995 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
9996 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
9999 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10000 to decide which code to use.
10001 (THREAD_SETMEM_NC): Likewise.
10003 * allocatestack.c (queue_stack): Don't remove stack from list here.
10004 Do it in the caller. Correct condition to prematurely terminate
10005 loop to free stacks.
10006 (__deallocate_stack): Remove stack from list here.
10008 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10010 * Makefile (tests): Add tst-stack1.
10011 * tst-stack1.c: New file.
10013 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10016 * pthread_attr_getstack.c: Return bottom of the thread area.
10018 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10020 * Makefile (libpthread-routines): Add pt-allocrtsig and
10021 pthread_kill_other_threads.
10022 * pt-allocrtsig.c: New file.
10023 * pthread_kill_other_threads.c: New file.
10024 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10025 all three functions.
10026 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10028 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10029 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10030 and __libc_allocate_rtsig_private.
10031 * Versions (libpthread): Export pthread_kill_other_threads_np,
10032 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10034 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10036 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10037 the end of the stack. Adjust computations.
10038 When mprotect call fails dequeue stack and free it.
10039 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10041 * pthread_getattr_np.c: Likewise.
10043 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10046 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10048 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10049 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10051 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10053 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10054 * pthread_setspecific.c: Likewise.
10056 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10058 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10059 definitions. Get them from the official place.
10060 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10062 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10063 Use new CLONE_ flags in clone() calls.
10065 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10066 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10068 * Versions: Add pthread_* functions for libc.
10069 * forward.c: New file.
10071 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10073 * herrno.c: New file.
10076 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10077 sem_trywait, and sem_timedwait. Add herrno and res.
10078 * sem_init.c: Don't initialize lock and waiters members.
10079 * sem_open.c: Likewise.
10080 * sem_post.c: Removed.
10081 * sem_wait.c: Removed.
10082 * sem_trywait.c: Removed.
10083 * sem_timedwait.c: Removed.
10084 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10085 Includes full implementations of sem_post, sem_wait, sem_trywait,
10087 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10088 for new implementation.
10089 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10090 and waiters fields.
10092 * tst-sem3.c: Improve error message.
10093 * tst-signal3.c: Likewise.
10095 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10096 to tell the kernel about the termination futex and to initialize tid
10097 member. Don't initialize main_thread.
10098 * descr.h (struct pthread): Remove main_thread member.
10099 * cancelllation.c (__do_cancel): Remove code handling main thread.
10100 The main thread is not special anymore.
10102 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10103 size of the stacks to stack_cache_actsize.
10105 * pt-readv.c: Add missing "defined".
10106 * pt-sigwait.c: Likewise.
10107 * pt-writev.c: Likewise.
10109 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10111 * Versions: Export __connect from libpthread.
10112 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10114 * Makefile (libpthread-routines): Add pt-raise.
10115 * sysdeps/unix/sysv/linux/raise.c: New file.
10116 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10117 * sysdeps/generic/pt-raise.c: New file.
10119 * pthread_cond_init.c: Initialize all data elements of the condvar
10120 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10122 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10123 * pthread_create.c: Likewise.
10125 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10126 * tst-key1.c: New file.
10127 * tst-key2.c: New file.
10128 * tst-key3.c: New file.
10130 * Versions: Export pthread_detach for version GLIBC_2.0.
10131 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10133 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10135 * pthread_key_create.c: Terminate search after an unused key was found.
10136 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10138 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10139 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10141 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10143 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10144 dynamic lookup for errno in PIC.
10146 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10147 release the stack lock as soon as possible.
10148 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10149 the static TLS block.
10150 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10152 * cancellation.c: Renamed from cancelation.c.
10153 * Makefile: Adjust accordingly.
10154 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10155 * cleanup_defer.c: Use CANCELLATION_P.
10156 * pthread_testcancel.c: Likewise.
10157 * descr.h: Fix spelling in comments.
10158 * init.c: Likewise.
10159 * pthread_getattr_np.c: Likewise.
10160 * pthread_getschedparam.c: Likewise.
10161 * pthread_setschedparam.c: Likewise.
10162 * Versions: Likewise.
10164 * pt-pselect.c: New file.
10165 * Makefile (libpthread-routines): Add pt-pselect.
10166 * Versions: Add pselect.
10168 * tst-cancel4.c: New file.
10169 * Makefile (tests): Add tst-cancel4.
10171 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10173 * pthread_mutex_lock.c: Always record lock ownership.
10174 * pthread_mutex_timedlock.c: Likewise.
10175 * pthread_mutex_trylock.c: Likewise.
10177 * pt-readv.c: New file.
10178 * pt-writev.c: New file.
10179 * pt-creat.c: New file.
10180 * pt-msgrcv.c: New file.
10181 * pt-msgsnd.c: New file.
10182 * pt-poll.c: New file.
10183 * pt-select.c: New file.
10184 * pt-sigpause.c: New file.
10185 * pt-sigsuspend.c: New file.
10186 * pt-sigwait.c: New file.
10187 * pt-sigwaitinfo.c: New file.
10188 * pt-waitid.c: New file.
10189 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10190 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10191 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10192 * Versions: Add all the new functions.
10194 * tst-exit1.c: New file.
10195 * Makefile (tests): Add tst-exit1.
10197 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10199 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10201 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10203 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10204 call. pthread_join is an official cancellation point.
10205 * pthread_timedjoin.c: Likewise.
10207 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10208 and the condvar's mutex are retrieved.
10209 * pthread_cond_timedwait.c: Likewise.
10210 Reported by dice@saros.East.Sun.COM.
10212 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10214 * pthreadP.h: Cut out all type definitions and move them...
10215 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10216 * pthreadP.h: Include <internaltypes.h>.
10218 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10219 performance tweaks.
10221 * sem_trywait.c: Shuffle #includes around to get right order.
10222 * sem_timedwait.c: Likewise.
10223 * sem_post.c: Likewise.
10224 * sem_wait.c: Likewise.
10226 * nptl 0.3 released.
10228 * Makefile (tests): Add tst-signal3.
10229 * tst-signal3.c: New file.
10231 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10233 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10234 the asms modify the sem object.
10235 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10237 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10238 the actual members.
10239 * pthreadP.h (struct sem): New type. Actual semaphore type.
10240 * semaphoreP.h: Include pthreadP.h.
10241 * sem_getvalue.c: Adjust to sem_t change.
10242 * sem_init.c: Likewise.
10243 * sem_open.c: Likewise.
10244 * sem_post.c: Likewise.
10245 * sem_timedwait.c: Likewise.
10246 * sem_trywait.c: Likewise.
10247 * sem_wait.c: Likewise.
10249 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10251 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10252 * tst-basic2.c: New file.
10253 * tst-exec1.c: New file.
10254 * tst-exec2.c: New file.
10255 * tst-exec3.c: New file.
10257 * tst-fork1.c: Remove extra */.
10259 * nptl 0.2 released. The API for IA-32 is complete.