]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
[BZ #5465]
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
189dce4f
UD
12007-12-12 Ulrich Drepper <drepper@redhat.com>
2
3 [BZ #5465]
4 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
5 (__pthread_cond_timedwait): Don't use VDSO.
6
26e21e75
UD
72007-12-07 Ulrich Drepper <drepper@redhat.com>
8
9 [BZ #5455]
10 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
11 Allow label before pthread_cleanup_pop.
12 (pthread_cleanup_pop_restore_np): Likewise.
13
191ec77f
UD
142007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
15
16 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
17 Store 2 before returning ETIMEDOUT.
18
c012be6f
UD
192007-11-23 Ulrich Drepper <drepper@redhat.com>
20
21 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
22 Store 2 before returning ETIMEDOUT.
23 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
24 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
25 (__lll_lock_wait_private): Optimize.
26 (__lll_lock_wait): Likewise.
27
77f1e09a
UD
282007-11-20 Jakub Jelinek <jakub@redhat.com>
29
30 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
31 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
32 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
33
0f7e0ee5
UD
342007-11-08 Ulrich Drepper <drepper@redhat.com>
35
cbed6a60
UD
36 [BZ #5240]
37 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
38 If we time out, try one last time to lock the futex to avoid
39 losing a wakeup signal.
40 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
41 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
42
0f7e0ee5
UD
43 [BZ #5245]
44 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
45 if necessary.
46
f6ed654c
UD
472007-11-07 Ulrich Drepper <drepper@redhat.com>
48
49 [BZ #5245]
50 * allocatestack.c (allocate_stack): Change ENOMEM error in case
51 mmap failed to EAGAIN.
52 * Makefile (tests): Add tst-basic7.
53 * tst-basic7.c: New file.
54
b92e3780
UD
552007-11-05 Ulrich Drepper <drepper@redhat.com>
56
57 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
58 Use __linkin_atfork.
59
94a749f6
UD
602007-11-03 Mike Frysinger <vapier@gentoo.org>
61
62 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
63 missing line continuations.
64 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
65 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
66
f160a450
UD
672007-10-28 Ulrich Drepper <drepper@redhat.com>
68
69 [BZ #5220]
70 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
71 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
72 (struct timer): Add next element.
73 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
74 enqueue timer structure into __active_timer_sigev_thread list.
75 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
76 remove timer struct from __active_timer_sigev_thread.
77 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
78 Before using timer structure make sure it is still on the
79 __active_timer_sigev_thread list. Keep lock until done.
80 Define __active_timer_sigev_thread and
81 __active_timer_sigev_thread_lock.
82
94833f11
UD
832007-10-27 Ulrich Drepper <drepper@redhat.com>
84
85 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
86 Redefine thread_atfork for use of ATFORK_MEM.
87 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
88 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
89 function.
90 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
91 Use atomic operation when removing first element of list.
92
96c06e08
JJ
932007-10-17 Jakub Jelinek <jakub@redhat.com>
94
95 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
96 routine instead of an alias to __new_sem_post.
97
e807818b
JJ
982007-10-15 Jakub Jelinek <jakub@redhat.com>
99
100 * init.c (__pthread_initialize_minimal): Initialize word to appease
101 valgrind.
102
59d430c6
UD
1032007-10-10 Jakub Jelinek <jakub@redhat.com>
104
105 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
106 libc.so just clear NAME.
107 (__libc_rwlock_fini): Nop inside of libc.so.
108 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
109 all zeros.
110
221d9d8e
UD
1112007-09-02 Ulrich Drepper <drepper@redhat.com>
112
113 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
114 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
115 unlocking failed.
116 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
117
2a01ce56
UD
1182007-08-21 Ulrich Drepper <drepper@redhat.com>
119
120 [BZ #4938]
121 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
122 reclaimed stack if necessary.
123 * Makefile (tests): Add tst-tsd6.
124 * tst-tsd6.c: New file.
125
c273641b
JJ
1262007-08-21 Jakub Jelinek <jakub@redhat.com>
127
128 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
129 Add private argument.
130
fb84593c
UD
1312007-08-20 Ulrich Drepper <drepper@redhat.com>
132
133 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
134 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
135
3e8d1eab
JJ
1362007-08-16 Jakub Jelinek <jakub@redhat.com>
137
138 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
139 (__lll_robust_timedlock): Pass private as last argument to
140 __lll_robust_timedlock_wait.
141 (__lll_unlock): Fix a pasto.
142
e4720b0e
JJ
1432007-08-15 Jakub Jelinek <jakub@redhat.com>
144
145 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
146 sparc_old_sem): New structs.
147 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
148 (__sem_wait_cleanup): New function.
149 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
150 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
151 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
152 lll_futex_wait.
153 (__old_sem_wait): New function.
154 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
155 nptl/sysdeps/unix/sysv/linux/sparc version.
156 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
157 Likewise.
158 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
159 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
160 (__new_sem_trywait): Use sparc_old_sem structure.
161 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
162 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
163 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
164 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
165 lll_futex_timed_wait.
166 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
167 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
168 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
169 lll_futex_wake.
170 (__old_sem_post): New function.
171 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
172 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
173 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
174 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
175 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
176 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
177
d13f4a43
UD
1782007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
179
180 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
181 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
182 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
183 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
184 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
185 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
186 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
187 Use FUTEX_WAKE_OP.
188 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
189 kernel-features.h and tcb-offsets.h.
190 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
191 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
192 process private.
193 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
194 tcb-offsets.h.
195 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
196 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
197 process private.
198 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
199 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
200 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
201 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
202 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
203 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
204 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
205
702a9414
JJ
2062007-08-14 Jakub Jelinek <jakub@redhat.com>
207
467d1345
JJ
208 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
209 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
210 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
211 lll_futex_timed_wait.
212
702a9414
JJ
213 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
214 __lll_robust_unlock): Rewrite as macros instead of inline functions.
215 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
216 __lll_robust_unlock, __lll_wait_tid): Likewise.
217
22502ea2
UD
2182007-08-13 Jakub Jelinek <jakub@redhat.com>
219
220 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
221 Fix a pasto.
222 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
223 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
224 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
225 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
226 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
227 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
228 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
229 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
230 kernel-features.h.
231 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
232 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
233 process private. Switch DW_CFA_advance_loc1 and some
234 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
235 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
236 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
237 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
238 process private. Switch DW_CFA_advance_loc{1,2} and some
239 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
240 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
241 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
242 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
243 Likewise.
244 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
245 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
246 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
247 Likewise.
248 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
249 (__pthread_cond_broadcast): Compare %r8 instead of
250 dep_mutex-cond_*(%rdi) with $-1.
251 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
252 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
253 of oring.
254
4baf59ad
UD
2552007-08-13 Ulrich Drepper <drepper@redhat.com>
256
257 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
258
9c6f6953
UD
2592007-08-13 Jakub Jelinek <jakub@redhat.com>
260
261 * allocatestack.c: Include kernel-features.h.
262 * pthread_create.c: Likewise.
263 * pthread_mutex_init.c: Likewise.
264 * init.c: Likewise.
265 * pthread_cond_timedwait.c: Likewise.
266 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
267 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
269 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
271 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
272 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
273 Likewise.
274 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
275 Likewise.
276 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
277 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
278 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
279 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
280
974a1f0f
UD
2812007-08-12 Jakub Jelinek <jakub@redhat.com>
282
283 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
284 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
285 byte elements. One of them is the new __shared element.
286 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
287 adjust names of other padding elements.
288 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
289 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
290 byte elements. One of them is the new __shared element.
291 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
292 adjust names of other padding elements.
293 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
294 Renamed __pad1 element to __shared, adjust names of other padding
295 elements.
296 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
297 (pthread_rwlock_t): Likewise.
298 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
299 typo.
300
3012007-08-09 Anton Blanchard <anton@samba.org>
302
303 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
304
f47e2626
UD
3052007-08-12 Ulrich Drepper <drepper@redhat.com>
306
307 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
308 <kernel-features.h>.
309 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
310
5bd8a249
UD
3112007-08-11 Ulrich Drepper <drepper@redhat.com>
312
313 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
314 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
315 dealing with robust mutexes.
316 * pthread_mutex_timedlock.c: Likewise.
317 * pthread_mutex_trylock.c: Likewise.
318 * pthread_mutex_unlock.c: Likewise.
319 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
320
3212007-08-06 Jakub Jelinek <jakub@redhat.com>
322
323 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
324 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
325 (PTHREAD_MUTEX_PSHARED): Define.
326 * pthread_mutex_init.c (__pthread_mutex_init): Set
327 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
328 mutexes.
329 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
330 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
331 as second argument to lll_lock.
332 (LLL_MUTEX_TRYLOCK): Take mutex as argument
333 instead of its __data.__lock field.
334 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
335 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
336 to lll_robust_lock.
337 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
338 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
339 instead of mutex->__data.__kind directly, pass
340 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
341 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
342 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
343 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
344 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
345 to lll_timedlock, lll_robust_timedlock, lll_unlock and
346 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
347 of mutex->__data.__kind directly.
348 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
349 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
350 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
351 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
352 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
353 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
354 and lll_futex_wake.
355 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
356 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
357 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
358 directly.
359 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
360 Take mutex as argument instead of its __data.__lock field, pass
361 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
362 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
363 __data.__lock field.
364 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
365 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
366 to lll_robust_cond_lock.
367 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
368 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
369 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
370 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
371 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
372 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
373 lll_futex_wait.
374 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
375 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
376 lll_futex_wake.
377 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
378 pshared variable, pass it to lll_lock, lll_unlock,
379 lll_futex_timedwait and lll_futex_wake.
380 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
381 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
382 and lll_futex_wake.
383 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
384 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
385 macro.
386 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
387 lll_futex_wake_unlock): Likewise.
388 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
389 Likewise.
390 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
391 lll_futex_wake_unlock): Likewise.
392 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
393 Likewise.
394 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
395 lll_futex_wake_unlock): Likewise.
396 (lll_futex_wake): Fix a typo.
397 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
398 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
399 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
400 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
401 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
402 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
403 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
404 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
405 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
406 (__pthread_cond_timedwait): Likewise.
407 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
408 (__condvar_cleanup, __pthread_cond_wait): Likewise.
409
0470fa46
JJ
4102007-08-05 Jakub Jelinek <jakub@redhat.com>
411
412 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
413 Don't use CGOTSETUP and CGOTRESTORE macros.
414 (CGOTSETUP, CGOTRESTORE): Remove.
415 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
416 @local symbol.
417
64f6281c
UD
4182007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
419
420 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
421 definitions for private futexes.
422 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
423 kernel-features.h and lowlevellock.h. Use private futexes if
424 they are available.
425 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
426 (__lll_mutex_lock_wait): Rename to
427 (__lll_lock_wait): ... this. Don't compile in for libc.so.
428 (__lll_mutex_timedlock_wait): Rename to ...
429 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
430 Don't compile in for libc.so.
431 (__lll_mutex_unlock_wake): Rename to ...
432 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
433 (__lll_timedwait_tid): Use __NR_gettimeofday.
434 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
435 the header from assembler. Renamed all lll_mutex_* resp.
436 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
437 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
438 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
439 Define.
440 (__lll_lock_wait_private): Add prototype.
441 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
442 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
443 __lll_unlock_wake): Likewise.
444 (lll_lock): Add private argument. Call __lll_lock_wait_private
445 if private is constant LLL_PRIVATE.
446 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
447 lll_timedlock, lll_robust_timedlock): Add private argument.
448 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
449 if private is constant LLL_PRIVATE.
450 (lll_robust_unlock, lll_robust_dead): Add private argument.
451 (lll_lock_t): Remove.
452 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
453 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
454 lll_cond_wake, lll_cond_broadcast): Remove.
455 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
456 kernel-features.h and lowlevellock.h.
457 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
458 (LOAD_FUTEX_WAIT): Define.
459 (__lll_robust_mutex_lock_wait): Rename to ...
460 (__lll_robust_lock_wait): ... this. Add private argument.
461 Use LOAD_FUTEX_WAIT macro.
462 (__lll_robust_mutex_timedlock_wait): Rename to ...
463 (__lll_robust_timedlock_wait): ... this. Add private argument.
464 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
465 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
466 lowlevellock.h.
467 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
468 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
469 __lll_mutex_{lock,unlock}_*.
470 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
471 lowlevellock.h and pthread-errnos.h.
472 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
473 FUTEX_CMP_REQUEUE, EINVAL): Remove.
474 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
475 __lll_mutex_{lock,unlock}_*.
476 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
477 lowlevellock.h and pthread-errnos.h.
478 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
479 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
480 __lll_mutex_{lock,unlock}_*.
481 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
482 lowlevellock.h.
483 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
484 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
485 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
486 (__condvar_tw_cleanup): Likewise.
487 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
488 lowlevellock.h.
489 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
490 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
491 __lll_mutex_{lock,unlock}_*.
492 ( __condvar_w_cleanup): Likewise.
493 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
494 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
495 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
496 lowlevellock.h.
497 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
498 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
499 __lll_mutex_{lock,unlock}_*.
500 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
501 lowlevellock.h.
502 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
503 FUTEX_PRIVATE_FLAG): Remove.
504 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
505 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
506 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
507 lowlevellock.h.
508 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
509 FUTEX_PRIVATE_FLAG): Remove.
510 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
511 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
512 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
513 lowlevellock.h.
514 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
515 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
516 __lll_mutex_{lock,unlock}_*.
517 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
518 lowlevellock.h.
519 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
520 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
521 __lll_mutex_{lock,unlock}_*.
522 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
523 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
524 (__new_sem_post): Use standard initial exec code sequences.
525 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
526 lowlevellock.h.
527 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
528 FUTEX_PRIVATE_FLAG): Remove.
529 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
530 exec code sequences.
531 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
532 (__new_sem_trywait): Use standard initial exec code sequences.
533 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
534 (__new_sem_wait): Use standard initial exec code sequences.
535
e51deae7
UD
5362007-07-31 Anton Blanchard <anton@samba.org>
537
538 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
539 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
540 atomic_full_barrier.
541
5422007-07-31 Jakub Jelinek <jakub@redhat.com>
543
544 * allocatestack.c (stack_cache_lock): Change type to int.
545 (get_cached_stack, allocate_stack, __deallocate_stack,
546 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
547 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
548 as second argument to lll_lock and lll_unlock macros on
549 stack_cache_lock.
550 * pthread_create.c (__find_in_stack_list): Likewise.
551 (start_thread): Similarly with pd->lock. Use lll_robust_dead
552 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
553 as second argument.
554 * descr.h (struct pthread): Change lock and setxid_futex field
555 type to int.
556 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
557 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
558 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
559 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
560 Likewise.
561 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
562 * pthread_cond_init.c (__pthread_cond_init): Likewise.
563 * pthreadP.h (__attr_list_lock): Change type to int.
564 * pthread_attr_init.c (__attr_list_lock): Likewise.
565 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
566 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
567 lll_{,un}lock.
568 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
569 also for lll_futex_{wake,wait}.
570 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
571 a pointer to const.
572 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
573 LLL_SHARED as second argument to lll_{,un}lock.
574 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
575 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
576 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
577 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
578 Likewise.
579 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
580 as second argument to lll_{,un}lock macros on pd->lock.
581 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
582 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
583 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
584 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
585 Likewise.
586 * sysdeps/pthread/createthread.c (do_clone, create_thread):
587 Likewise.
588 * pthread_once.c (once_lock): Change type to int.
589 (__pthread_once): Pass LLL_PRIVATE as second argument to
590 lll_{,un}lock macros on once_lock.
591 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
592 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
593 rwlock->__data.__shared as second argument to them and similarly
594 for lll_futex_w*.
595 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
596 Likewise.
597 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
598 Likewise.
599 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
600 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
601 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
602 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
603 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
604 to lll_{,un}lock macros on __sem_mappings_lock.
605 * sem_open.c (check_add_mapping): Likewise.
606 (__sem_mappings_lock): Change type to int.
607 * semaphoreP.h (__sem_mappings_lock): Likewise.
608 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
609 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
610 instead of lll_*mutex_*, pass LLL_SHARED as last
611 argument.
612 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
613 pass LLL_SHARED as last argument.
614 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
615 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
616 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
617 pass LLL_SHARED as last argument.
618 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
619 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
620 LLL_SHARED as last argument.
621 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
622 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
623 Similarly.
624 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
625 __libc_lock_lock_recursive, __libc_lock_unlock,
626 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
627 argument to lll_{,un}lock.
628 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
629 _IO_lock_unlock): Likewise.
630 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
631 compound literal.
632 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
633 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
634 __fork_lock.
635 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
636 free_mem): Likewise.
637 (__fork_lock): Change type to int.
638 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
639 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
640 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
641 lll_futex_wake.
642 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
643 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
644 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
645 New function.
646 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
647 pass it through to lll_futex_*wait, only compile in when
648 IS_IN_libpthread.
649 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
650 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
651 argument and pass it through to lll_futex_*wait.
652 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
653 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
654 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
655 inline functions to __lll_* resp. __lll_robust_*.
656 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
657 (lll_mutex_dead): Add private argument.
658 (__lll_lock_wait_private): New prototype.
659 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
660 __lll_robust_lock_timedwait): Add private argument to prototypes.
661 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
662 call __lll_lock_wait_private, otherwise pass private to
663 __lll_lock_wait.
664 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
665 __lll_robust_timedlock): Add private argument, pass it to
666 __lll_*wait functions.
667 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
668 call __lll_unlock_wake_private, otherwise pass private to
669 __lll_unlock_wake.
670 (__lll_robust_unlock): Add private argument, pass it to
671 __lll_robust_unlock_wake.
672 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
673 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
674 argument, pass it through to __lll_* inline function.
675 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
676 (lll_lock_t): Remove.
677 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
678 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
679 lll_cond_wake, lll_cond_broadcast): Remove.
680 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
681 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
682 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
683 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
684 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
685 the header from assembler. Renamed all lll_mutex_* resp.
686 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
687 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
688 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
689 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
690 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
691 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
692 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
693 Remove prototype.
694 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
695 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
696 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
697 (lll_trylock): Likewise, use __lll_trylock_asm, pass
698 MULTIPLE_THREADS_OFFSET as another asm operand.
699 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
700 MULTIPLE_THREADS_OFFSET as last asm operand, call
701 __lll_lock_wait_private if private is constant LLL_PRIVATE,
702 otherwise pass private as another argument to __lll_lock_wait.
703 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
704 lll_timedlock, lll_robust_timedlock): Add private argument, pass
705 private as another argument to __lll_*lock_wait call.
706 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
707 MULTIPLE_THREADS_OFFSET as another asm operand, call
708 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
709 otherwise pass private as another argument to __lll_unlock_wake.
710 (lll_robust_unlock): Add private argument, pass private as another
711 argument to __lll_unlock_wake.
712 (lll_robust_dead): Add private argument, use __lll_private_flag
713 macro.
714 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
715 LLL_MUTEX_LOCK_INITIALIZER.
716 (lll_lock_t): Remove.
717 (LLL_LOCK_INITIALIZER_WAITERS): Define.
718 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
719 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
720 lll_cond_wake, lll_cond_broadcast): Remove.
721 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
722 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
723 2007-05-2{3,9} changes.
724 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
725 kernel-features.h and lowlevellock.h.
726 (LOAD_PRIVATE_FUTEX_WAIT): Define.
727 (LOAD_FUTEX_WAIT): Rewritten.
728 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
729 define.
730 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
731 (__lll_mutex_lock_wait): Rename to ...
732 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
733 %ecx, %ecx is now private argument. Don't compile in for libc.so.
734 (__lll_mutex_timedlock_wait): Rename to ...
735 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
736 contains private argument. Don't compile in for libc.so.
737 (__lll_mutex_unlock_wake): Rename to ...
738 (__lll_unlock_wake): ... this. %ecx contains private argument.
739 Don't compile in for libc.so.
740 (__lll_timedwait_tid): Use __NR_gettimeofday.
741 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
742 kernel-features.h and lowlevellock.h.
743 (LOAD_FUTEX_WAIT): Define.
744 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
745 define.
746 (__lll_robust_mutex_lock_wait): Rename to ...
747 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
748 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
749 macro.
750 (__lll_robust_mutex_timedlock_wait): Rename to ...
751 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
752 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
753 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
754 lowlevellock.h.
755 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
756 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
757 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
758 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
759 to __lll_lock_wait in %edx.
760 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
761 Include lowlevellock.h and pthread-errnos.h.
762 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
763 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
764 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
765 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
766 pass LLL_SHARED in %ecx to both __lll_lock_wait and
767 __lll_unlock_wake.
768 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
769 Include lowlevellock.h and pthread-errnos.h.
770 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
771 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
772 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
773 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
774 pass LLL_SHARED in %ecx to both __lll_lock_wait and
775 __lll_unlock_wake.
776 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
777 Include lowlevellock.h.
778 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
779 Don't define.
780 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
781 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
782 pass LLL_SHARED in %ecx to both __lll_lock_wait and
783 __lll_unlock_wake. Use __NR_gettimeofday.
784 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
785 Include lowlevellock.h.
786 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
787 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
788 to __lll_*, pass cond_lock address in %edx rather than %ecx to
789 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
790 and __lll_unlock_wake.
791 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
792 Include lowlevellock.h.
793 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
794 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
795 MUTEX(%ebx) address in %edx rather than %ecx to
796 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
797 and __lll_unlock_wake. Move return value from %ecx to %edx
798 register.
799 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
800 Include lowlevellock.h.
801 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
802 Don't define.
803 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
804 MUTEX(%ebp) address in %edx rather than %ecx to
805 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
806 and __lll_unlock_wake. Move return value from %ecx to %edx
807 register. Use __NR_gettimeofday.
808 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
809 Include lowlevellock.h.
810 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
811 Don't define.
812 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
813 MUTEX(%ebp) address in %edx rather than %ecx to
814 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
815 and __lll_unlock_wake. Move return value from %ecx to %edx
816 register. Use __NR_gettimeofday.
817 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
818 Include lowlevellock.h.
819 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
820 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
821 MUTEX(%edi) address in %edx rather than %ecx to
822 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
823 and __lll_unlock_wake.
824 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
825 Include lowlevellock.h.
826 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
827 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
828 MUTEX(%ebx) address in %edx rather than %ecx to
829 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
830 and __lll_unlock_wake. Move return value from %ecx to %edx
831 register.
832 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
833 lowlevellock.h.
834 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
835 define.
836 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
837 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
838 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
839 lowlevellock.h.
840 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
841 (sem_timedwait): Use __NR_gettimeofday.
842 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
843 lowlevellock.h.
844 (LOCK): Don't define.
845 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
846 lowlevellock.h.
847 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
848 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
849 are waiters.
850 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
851 2007-05-2{3,9} changes.
852 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
853 kernel-features.h and lowlevellock.h.
854 (LOAD_PRIVATE_FUTEX_WAIT): Define.
855 (LOAD_FUTEX_WAIT): Rewritten.
856 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
857 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
858 (__lll_mutex_lock_wait): Rename to ...
859 (__lll_lock_wait): ... this. %esi is now private argument.
860 Don't compile in for libc.so.
861 (__lll_mutex_timedlock_wait): Rename to ...
862 (__lll_timedlock_wait): ... this. %esi contains private argument.
863 Don't compile in for libc.so.
864 (__lll_mutex_unlock_wake): Rename to ...
865 (__lll_unlock_wake): ... this. %esi contains private argument.
866 Don't compile in for libc.so.
867 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
868 kernel-features.h and lowlevellock.h.
869 (LOAD_FUTEX_WAIT): Define.
870 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
871 (__lll_robust_mutex_lock_wait): Rename to ...
872 (__lll_robust_lock_wait): ... this. %esi argument contains private.
873 Use LOAD_FUTEX_WAIT macro.
874 (__lll_robust_mutex_timedlock_wait): Rename to ...
875 (__lll_robust_timedlock_wait): ... this. %esi argument contains
876 private, use LOAD_FUTEX_WAIT macro.
877 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
878 lowlevellock.h.
879 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
880 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
881 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
882 __lll_lock_wait and __lll_unlock_wake.
883 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
884 Include lowlevellock.h and pthread-errnos.h.
885 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
886 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
887 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
888 pass LLL_SHARED in %esi to both __lll_lock_wait and
889 __lll_unlock_wake.
890 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
891 Include lowlevellock.h and pthread-errnos.h.
892 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
893 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
894 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
895 pass LLL_SHARED in %esi to both __lll_lock_wait and
896 __lll_unlock_wake.
897 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
898 Include lowlevellock.h.
899 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
900 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
901 pass LLL_SHARED in %esi to both __lll_lock_wait and
902 __lll_unlock_wake.
903 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
904 Include lowlevellock.h.
905 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
906 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
907 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
908 and __lll_unlock_wake.
909 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
910 Include lowlevellock.h.
911 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
912 Don't define.
913 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
914 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
915 and __lll_unlock_wake.
916 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
917 Include lowlevellock.h.
918 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
919 Don't define.
920 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
921 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
922 and __lll_unlock_wake.
923 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
924 Include lowlevellock.h.
925 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
926 Don't define.
927 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
928 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
929 and __lll_unlock_wake.
930 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
931 Include lowlevellock.h.
932 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
933 Don't define.
934 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
935 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
936 and __lll_unlock_wake.
937 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
938 Include lowlevellock.h.
939 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
940 Don't define.
941 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
942 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
943 and __lll_unlock_wake.
944 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
945 lowlevellock.h.
946 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
947 define.
948 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
949 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
950 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
951 lowlevellock.h.
952 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
953 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
954 lowlevellock.h.
955 (LOCK): Don't define.
956 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
957 lowlevellock.h.
958 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
959 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
960 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
961 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
962 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
963 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
964 (__lll_lock_wait_private): New function.
965 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
966 it to lll_futex_*wait. Don't compile in for libc.so.
967 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
968 Remove.
969 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
970 (struct sparc_pthread_barrier): Remove.
971 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
972 struct sparc_pthread_barrier. Pass
973 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
974 and lll_futex_wait macros.
975 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
976 Remove.
977 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
978 Include sparc pthread_barrier_wait.c instead of generic one.
979
6f59d56e
UD
9802007-07-30 Jakub Jelinek <jakub@redhat.com>
981
1475e201
UD
982 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
983
6f59d56e
UD
984 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
985 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
986 %ecx.
987 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
988 (pthread_rwlock_timedwrlock): Likewise.
989 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
990 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
991
558f0300
JJ
9922007-07-31 Jakub Jelinek <jakub@redhat.com>
993
994 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
995
cedb4109
UD
9962007-07-26 Jakub Jelinek <jakub@redhat.com>
997
998 * tst-locale2.c (useless): Add return statement.
999
085a4412
UD
10002007-07-24 Jakub Jelinek <jakub@redhat.com>
1001
1002 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1003 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1004 * pthread_create.c (start_thread): Likewise.
1005 * init.c (sighandler_setxid): Likewise.
1006 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1007 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1008 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1009 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1010 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1011 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1012 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1013 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1014 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1015 Likewise.
1016 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1017 Likewise.
1018 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1019 Likewise.
1020 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1021 __rtld_notify): Likewise.
1022 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1023 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1024 __pthread_once): Likewise.
1025 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1026 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1027 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1028 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1029 (lll_futex_wait): Add private argument, define as wrapper around
1030 lll_futex_timed_wait.
1031 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1032 use __lll_private_flag macro.
1033 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1034 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1035 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1036 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1037 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1038 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1039 (lll_futex_wait): Add private argument, define as wrapper around
1040 lll_futex_timed_wait.
1041 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1042 use __lll_private_flag macro.
1043 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1044 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1045 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1046 Define.
1047 (lll_futex_timed_wait, lll_futex_wake): Use it.
1048 (lll_private_futex_wait, lll_private_futex_timed_wait,
1049 lll_private_futex_wake): Removed.
1050 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1051 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1052 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1053 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1054 (lll_futex_wait): Add private argument, define as wrapper around
1055 lll_futex_timed_wait.
1056 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1057 use __lll_private_flag macro.
1058 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1059 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1060 to lll_futex_*.
1061 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1062 (lll_private_futex_wait, lll_private_futex_timed_wait,
1063 lll_private_futex_wake): Removed.
1064 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1065 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1066 (lll_private_futex_wait, lll_private_futex_timed_wait,
1067 lll_private_futex_wake): Removed.
1068 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1069 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1070 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1071 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1072 (lll_futex_wait): Add private argument, define as wrapper around
1073 lll_futex_timed_wait.
1074 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1075 use __lll_private_flag macro.
1076 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1077 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1078 to lll_futex_*.
1079 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1080 Define.
1081 (lll_futex_timed_wait, lll_futex_wake): Use it.
1082 (lll_private_futex_wait, lll_private_futex_timed_wait,
1083 lll_private_futex_wake): Removed.
1084
ef0af159
JJ
10852007-07-27 Jakub Jelinek <jakub@redhat.com>
1086
1087 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1088 of the structure for sparc32.
1089
10902007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1091
1092 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1093
eb4f5909
UD
10942007-07-23 Ulrich Drepper <drepper@redhat.com>
1095
1096 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1097 code used when private futexes are assumed.
1098 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1099 Likewise.
1100
b5f13526
UD
11012007-07-23 Jakub Jelinek <jakub@redhat.com>
1102
1103 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1104 (__lll_private_flag): Define.
1105 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1106 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1107 __lll_private_flag.
1108 (lll_private_futex_wait, lll_private_futex_timedwait,
1109 lll_private_futex_wake): Define as wrapper around non-_private
1110 macros.
1111 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1112 (__lll_private_flag): Define.
1113 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1114 (lll_private_futex_wait, lll_private_futex_timedwait,
1115 lll_private_futex_wake): Define as wrapper around non-_private
1116 macros.
1117
eb7721f2
UD
11182007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1119
1120 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1121 parameter to lll_futex_wait call.
1122 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1123
1124 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1125 Replace lll_futex_wait with lll_private_futex_wait.
1126 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1127 Add LLL_SHARED parameter to lll_futex_wake().
1128
1129 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1130 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1131 lll_private_futex_wake.
1132 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1133 bit from private parm before syscall.
1134 (lll_futex_timed_wait): Likewise.
1135 (lll_futex_wake): Likewise.
1136 (lll_futex_wake_unlock): Likewise.
1137 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1138 (lll_robust_mutex_unlock): Likewise.
1139 (lll_mutex_unlock_force): Likewise.
1140 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1141
defc45f2
UD
11422007-07-23 Ulrich Drepper <drepper@redhat.com>
1143
1144 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1145 compilation when unconditionally using private futexes.
1146 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1147 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1148 Likewise.
1149 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1150 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1151
087722b8
UD
11522007-07-17 Jakub Jelinek <jakub@redhat.com>
1153
1154 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1155 Define.
1156
765c6b0c
UD
11572007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1158
1159 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1160 kernel-features.h.
1161
7d9d8bd1
RM
11622007-05-16 Roland McGrath <roland@redhat.com>
1163
1164 * init.c (__nptl_initial_report_events): New variable.
1165 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1166 to that.
1167
a4915df2
UD
11682007-06-22 Jakub Jelinek <jakub@redhat.com>
1169
1170 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1171 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1172
e4eb675d
UD
11732007-06-19 Ulrich Drepper <drepper@redhat.com>
1174
1175 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1176 implementation.
1177
ae1ad3ae
UD
11782007-06-18 Ulrich Drepper <drepper@redhat.com>
1179
1180 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1181 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1182 * pthread_mutex_timedlock.c: Likewise.
1183 * pthread_mutex_trylock.c: Likewise.
1184 * pthread_mutex_unlock.c: Likewise.
1185
89074592
UD
11862007-06-17 Andreas Schwab <schwab@suse.de>
1187
1188 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1189 sections.
1190
d4201cc4
UD
11912007-06-17 Ulrich Drepper <drepper@redhat.com>
1192
1193 * allocatestack.c (allocate_stack): Make code compile if
1194 __ASSUME_PRIVATE_FUTEX is set.
1195
339dbf0e
UD
11962007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1197
1198 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1199 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1200 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1201 (__pthread_rwlock_wrlock): Likewise.
1202 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1203 (pthread_rwlock_timedrdlock): Likewise.
1204 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1205 (pthread_rwlock_timedwrlock): Likewise.
1206 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1207 (__pthread_rwlock_unlock): Likewise.
1208
12092007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1210
1211 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1212 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1213 Split __flags into __flags, __shared, __pad1 and __pad2.
1214 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1215 futexes if they are available.
1216 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1217 in libc-lowlevellock.S allow using private futexes.
1218 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1219 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1220 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1221 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1222 lll_private_futex_timed_wait and lll_private_futex_wake.
1223 (lll_robust_mutex_unlock): Fix typo.
1224 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1225 field in futex command setup.
1226 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1227 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1228 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1229 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1230 if they are available. Remove clear_once_control.
1231 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1232 futexes if they are available.
1233 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1234 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1235 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1236 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1237 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1238 Wake only when there are waiters.
1239 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1240 support. Indicate that there are waiters. Remove unnecessary
1241 extra cancellation test.
1242 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1243 left-over duplication of __sem_wait_cleanup.
1244
26f56c1c
UD
12452007-06-07 Ulrich Drepper <drepper@redhat.com>
1246
1247 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1248 parameter to lll_futex_wait, lll_futex_timed_wait, and
1249 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1250 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1251 lll_private_futex_wake.
1252 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1253 * allocatestack.c: Adjust use of lll_futex_* macros.
1254 * init.c: Likewise.
1255 * lowlevellock.h: Likewise.
1256 * pthread_barrier_wait.c: Likewise.
1257 * pthread_cond_broadcast.c: Likewise.
1258 * pthread_cond_destroy.c: Likewise.
1259 * pthread_cond_signal.c: Likewise.
1260 * pthread_cond_timedwait.c: Likewise.
1261 * pthread_cond_wait.c: Likewise.
1262 * pthread_create.c: Likewise.
1263 * pthread_mutex_lock.c: Likewise.
1264 * pthread_mutex_setprioceiling.c: Likewise.
1265 * pthread_mutex_timedlock.c: Likewise.
1266 * pthread_mutex_unlock.c: Likewise.
1267 * pthread_rwlock_timedrdlock.c: Likewise.
1268 * pthread_rwlock_timedwrlock.c: Likewise.
1269 * pthread_rwlock_unlock.c: Likewise.
1270 * sysdeps/alpha/tls.h: Likewise.
1271 * sysdeps/i386/tls.h: Likewise.
1272 * sysdeps/ia64/tls.h: Likewise.
1273 * sysdeps/powerpc/tls.h: Likewise.
1274 * sysdeps/pthread/aio_misc.h: Likewise.
1275 * sysdeps/pthread/gai_misc.h: Likewise.
1276 * sysdeps/s390/tls.h: Likewise.
1277 * sysdeps/sh/tls.h: Likewise.
1278 * sysdeps/sparc/tls.h: Likewise.
1279 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1280 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1281 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1282 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1283 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1284 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1285 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1286 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1287 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1288 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1289 Likewise.
1290 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1291 * sysdeps/x86_64/tls.h: Likewise.
1292
ee5d5755
UD
12932007-05-29 Ulrich Drepper <drepper@redhat.com>
1294
b03b0c29
UD
1295 * pthread_getattr_np.c: No need to install a cancellation handler,
1296 this is no cancellation point.
1297 * pthread_getschedparam.c: Likewise.
1298 * pthread_setschedparam.c: Likewise.
1299 * pthread_setschedprio.c: Likewise.
1300 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1301 lll_unlock_wake_cb.
1302 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1303 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1304 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1305 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1306 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1307 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1308 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1309 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1310 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1311 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1312 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1313 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 1314
0154658d
UD
1315 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1316 whether there are more than one thread makes no sense here since
1317 we only call the slow path if the locks are taken.
1318 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1319
ee5d5755
UD
1320 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1321 COND_NWAITERS_SHIFT.
1322 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1323 COND_CLOCK_BITS.
1324 * pthread_cond_init.c: Likewise.
1325 * pthread_cond_timedwait.c: Likewise.
1326 * pthread_cond_wait.c: Likewise.
1327 * pthread_condattr_getclock.c: Likewise.
1328 * pthread_condattr_setclock.c: Likewise.
1329 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1330 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1331 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1332 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1333 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1334
991fa82b
UD
13352007-05-28 Jakub Jelinek <jakub@redhat.com>
1336
40f57573
UD
1337 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1338 unistd.h.
1339
991fa82b
UD
1340 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1341 insn suffix.
1342 (THREAD_GSCOPE_GET_FLAG): Remove.
1343 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1344 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1345 changes.
1346 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1347 (THREAD_GSCOPE_GET_FLAG): Remove.
1348 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1349 instead of THREAD_GSCOPE_GET_FLAG.
1350 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1351 it.
1352 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1353 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1354 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1355 THREAD_GSCOPE_WAIT): Define.
1356 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1357 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1358 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1359 THREAD_GSCOPE_WAIT): Define.
1360 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1361 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1362 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1363 THREAD_GSCOPE_WAIT): Define.
1364 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1365 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1366 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1367 THREAD_GSCOPE_WAIT): Define.
1368
13692007-05-24 Richard Henderson <rth@redhat.com>
1370
1371 * descr.h (struct pthread): Add header.gscope_flag.
1372 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1373 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1374 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1375 THREAD_GSCOPE_WAIT): Define.
1376
e59660bc
UD
13772007-05-27 Ulrich Drepper <drepper@redhat.com>
1378
1379 * init.c: Make it compile with older kernel headers.
1380
1381 * tst-initializers1.c: Show through exit code which test failed.
1382
1383 * pthread_rwlock_init.c: Also initialize __shared field.
1384 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1385 element in rwlock structure into four byte elements. One of them is
1386 the new __shared element.
1387 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1388 Likewise.
cd0dbd89 1389 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
1390 __shared, adjust names of other padding elements.
1391 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1392 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1393 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1394 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1395 FUTEX_PRIVATE_FLAG.
1396 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1397 futex to use private operations if possible.
1398 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1399 Likewise.
1400 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1401 Likewise.
1402 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1403 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
1404 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1405 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1406 Likewise.
1407 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1408 Likewise.
1409 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1410 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 1411
d8ff3792
UD
14122007-05-26 Ulrich Drepper <drepper@redhat.com>
1413
546346b6
UD
1414 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1415 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1416 * pthread_rwlock_timedrdlock.c: Likewise.
1417 * pthread_rwlock_tryrdlock.c: Likewise.
1418
a2dd3360
UD
1419 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1420 optimization.
1421
6df7ffad
UD
1422 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1423 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1424 duplication of __sem_wait_cleanup.
1425
1426 * allocatestack.c: Revert last change.
1427 * init.c: Likewise.
1428 * sysdeps/i386/tls.h: Likewise.
1429 * sysdeps/x86_64/tls.h: Likewise.
1430 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1431 header structure.
1432 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1433
d8ff3792
UD
1434 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1435 Add private field.
1436 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1437 * pthread_barrier_init.c: Set private flag if pshared and private
1438 futexes are supported.
1439 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1440 private field in futex command setup.
1441 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1442
3d2dd6ca
UD
14432007-05-25 Ulrich Drepper <drepper@redhat.com>
1444
42e6c665
UD
1445 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1446 support.
1447 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1448 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1449 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1450 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1451 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1452
3d2dd6ca
UD
1453 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1454 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1455 fields in the structure.
1456 (__old_sem_init): New function.
1457 * sem_open.c: Initialize all fields of the structure.
1458 * sem_getvalue.c: Adjust for renamed element.
1459 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1460 (gen-as-const-headers): Add structsem.sym.
1461 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1462 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1463 struct new_sem. Add struct old_sem.
1464 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1465 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1466 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1467 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1468 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1469 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1470 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1471 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1472 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1473 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1474 * tst-sem10.c: New file.
1475 * tst-sem11.c: New file.
1476 * tst-sem12.c: New file.
1477 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1478 of struct sem.
1479
20a4d722
JJ
14802007-05-25 Ulrich Drepper <drepper@redhat.com>
1481 Jakub Jelinek <jakub@redhat.com>
1482
1483 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1484 Move __pthread_enable_asynccancel right before futex syscall.
1485 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1486 Likewise.
1487
14882007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
1489
1490 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1491 THREAD_COPY_PRIVATE_FUTEX): Define.
1492 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1493 THREAD_COPY_PRIVATE_FUTEX): Define.
1494 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1495 * init.c (__pthread_initialize_minimal_internal): Use
1496 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
1497
1498 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1499 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1500 THREAD_GSCOPE_FLAG_WAIT): Define.
1501 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1502 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1503 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1504 PTR_DEMANGLE.
1505 (THREAD_GSCOPE_GET_FLAG): Define.
1506 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1507 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1508 instead of ->header.gscope_flag directly.
1509
5a8075b1
UD
15102007-05-23 Ulrich Drepper <drepper@redhat.com>
1511
1512 * init.c (__pthread_initialize_minimal_internal): Check whether
1513 private futexes are available.
1514 * allocatestack.c (allocate_stack): Copy private_futex field from
1515 current thread into the new stack.
1516 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1517 futexes if they are available.
1518 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1519 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1520 in libc-lowlevellock.S allow using private futexes.
1521 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1522 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1523 FUTEX_PRIVATE_FLAG.
1524 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1525 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1526 if they are available.
1527 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1528 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1529 * sysdeps/i386/tcb-offsets.sym: Likewise.
1530 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1531 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1532
6d59823c
UD
15332007-05-21 Ulrich Drepper <drepper@redhat.com>
1534
1535 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1536 Remove ptr_wait_lookup_done again.
1537 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1538 (__pthread_initialize_minimal_internal): Initialize
1539 _dl_wait_lookup_done pointer in _rtld_global directly.
1540 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1541 Remove code to code _dl_wait_lookup_done.
1542 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1543 encrypted for now.
1544
2c9718f3
JJ
15452007-05-21 Jakub Jelinek <jakub@redhat.com>
1546
1547 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1548 pthread_mutex_init failed with ENOTSUP.
1549
df94b641
UD
15502007-05-19 Ulrich Drepper <drepper@redhat.com>
1551
1552 * allocatestack.c (__wait_lookup_done): New function.
1553 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1554 Add ptr_wait_lookup_done.
1555 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1556 * pthreadP.h: Declare __wait_lookup_done.
1557 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1558 Define macros to implement reference handling of global scope.
1559 * sysdeps/x86_64/tls.h: Likewise.
1560 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1561 Initialize GL(dl_wait_lookup_done).
1562
bec51a30
UD
15632007-05-17 Ulrich Drepper <drepper@redhat.com>
1564
113ad5fc
UD
1565 [BZ #4512]
1566 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1567 is detected.
1568 * pthread_mutex_timedlock.c: Likewise.
1569 * pthread_mutex_trylock.c: Likewise.
1570 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1571
1572 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1573 * tst-robust9.c: New file.
1574 * tst-robustpi9.c: New file.
1575
bec51a30
UD
1576 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1577 unnecessary extra cancellation test.
1578
83d87915
UD
15792007-05-14 Ulrich Drepper <drepper@redhat.com>
1580
83d87915
UD
1581 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1582 extra cancellation test.
1583 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1584
3771196d
UD
15852007-05-10 Ulrich Drepper <drepper@redhat.com>
1586
341c566f
UD
1587 * descr.h (struct pthread): Rearrange members to fill hole in
1588 64-bit layout.
1589
3771196d
UD
1590 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1591 (__pthread_setaffinity_new): If syscall was successful and
1592 RESET_VGETCPU_CACHE is defined, use it before returning.
1593 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1594
7d29b542
JJ
15952007-05-10 Jakub Jelinek <jakub@redhat.com>
1596
1597 [BZ #4455]
1598 * tst-align2.c: Include stackinfo.h.
1599 * tst-getpid1.c: Likewise.
1600
16105fe0
UD
16012007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1602
29c113f0
UD
1603 [BZ #4455]
1604 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1605 * tst-getpid1.c (do_test): Likewise.
1606
16105fe0
UD
1607 [BZ #4456]
1608 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1609 (allocate_stack): Likewise.
1610
6780bc44
UD
16112007-05-07 Ulrich Drepper <drepper@redhat.com>
1612
1613 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1614 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1615 (__lll_robust_timedlock_wait): Likewise.
1616 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1617
aa75f64c
UD
16182007-05-06 Mike Frysinger <vapier@gentoo.org>
1619
15eca720 1620 [BZ #4465]
aa75f64c
UD
1621 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1622 * tst-cancel4.c (tf_fdatasync): New test.
1623
f672076e
UD
16242007-04-27 Ulrich Drepper <drepper@redhat.com>
1625
1bb5f5a1
UD
1626 [BZ #4392]
1627 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1628 check mutexes like normal mutexes.
1629
f672076e
UD
1630 [BZ #4306]
1631 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1632 Initialize the whole sigevent structure to appease valgrind.
1633
bce20b9a
UD
16342007-04-25 Ulrich Drepper <drepper@redhat.com>
1635
1636 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1637 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1638
0c786eac
UD
16392007-04-06 Ulrich Drepper <drepper@redhat.com>
1640
1641 * tst-locale1.c: Avoid warnings.
1642 * tst-locale2.c: Likewise.
1643
e1f0c5bc
UD
16442007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1645
1646 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1647 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1648
965cba04
UD
16492007-03-16 Jakub Jelinek <jakub@redhat.com>
1650
1651 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1652 __extern_always_inline where appropriate.
1653 * sysdeps/pthread/pthread.h: Likewise.
1654
a5ea509b
RH
16552007-03-13 Richard Henderson <rth@redhat.com>
1656
1657 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1658 separate cfi regions for the two subsections.
1659
00a1430e
UD
16602007-02-25 Ulrich Drepper <drepper@redhat.com>
1661
1662 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1663 new thread, don't just decrement it.
1664 Patch by Suzuki K P <suzuki@in.ibm.com>.
1665
63a2f305
UD
16662007-02-21 Ulrich Drepper <drepper@redhat.com>
1667
1668 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1669 PTHFCT_CALL definition.
1670
2484468b
UD
16712007-02-18 Ulrich Drepper <drepper@redhat.com>
1672
1673 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1674 available, don't use it.
1675
5ed61e0f
UD
16762007-02-09 Jakub Jelinek <jakub@redhat.com>
1677
1678 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1679 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1680 call into the kernel to delay.
1681
10ccaa5c
UD
16822007-01-18 Ulrich Drepper <drepper@redhat.com>
1683
f8a17855
UD
1684 * tst-initializers1.c: We want to test the initializers as seen
1685 outside of libc, so undefined _LIBC.
1686
10ccaa5c
UD
1687 * pthread_join.c (cleanup): Avoid warning.
1688
ea1533e0
UD
16892007-01-17 Ulrich Drepper <drepper@redhat.com>
1690
1476bce6
UD
1691 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1692 (__lll_timedwait_tid): Add unwind info.
1693
ea1533e0
UD
1694 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1695 function table, mangle the pointers.
1696 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1697 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1698 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1699 demangle pointers before use.
1700 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1701 demangle pointer.
1702 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1703 * sysdeps/pthread/setxid.h: Likewise.
1704
8980796b
UD
17052007-01-12 Ulrich Drepper <drepper@redhat.com>
1706
1707 * tst-rwlock7.c: Show some more information in case of correct
1708 behavior.
1709
a1d87b5d
UD
17102007-01-11 Ulrich Drepper <drepper@redhat.com>
1711
1712 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1713 (lll_futex_timed_wait): Undo part of last change, don't negate
1714 return value.
1715
11bf311e 17162007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 1717
11bf311e
UD
1718 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1719 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 1720
11bf311e 17212006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 1722
11bf311e 1723 * shlib-versions: Fix sparc64 linux target specification.
a744da90 1724
11bf311e 17252007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 1726
11bf311e
UD
1727 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1728 Adjust include path for pthread_barrier_wait.c move.
fc242bef 1729
11bf311e 17302006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 1731
11bf311e
UD
1732 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1733 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 1734
11bf311e
UD
17352006-12-06 Jakub Jelinek <jakub@redhat.com>
1736
1737 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1738 6 argument cancellable syscalls.
1739 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1740 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1741 6 argument cancellable syscalls.
1742 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 1743
66f17705
UD
17442006-12-09 Ulrich Drepper <drepper@redhat.com>
1745
1746 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1747 (__rtld_mrlock_initialize): Add missing closing parenthesis.
1748
11bf311e
UD
17492006-10-30 Jakub Jelinek <jakub@redhat.com>
1750
1751 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1752 __sync_lock_release instead of __sync_lock_release_si.
1753
536e40e2
UD
17542006-10-29 Jakub Jelinek <jakub@redhat.com>
1755
1756 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1757 Define.
1758 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1759 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1760 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1761 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1762 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1763 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1764 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1765 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1766 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1767 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1768 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1769
11bf311e
UD
17702006-10-27 Ulrich Drepper <drepper@redhat.com>
1771
1772 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1773 * pthread_barrier_wait.c: ...here.
1774 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1775 * pthread_cond_broadcast.c: ...here.
1776 * sysdeps/pthread/pthread_cond_signal.c: Move to...
1777 * pthread_cond_signal.c: ...here.
1778 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1779 * pthread_cond_timedwait.c: ...here.
1780 * sysdeps/pthread/pthread_cond_wait.c: Move to...
1781 * pthread_cond_wait.c: ...here.
1782 * sysdeps/pthread/pthread_once.c: Move to...
1783 * pthread_once.c: ...here.
1784 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1785 * pthread_rwlock_rdlock.c: ...here.
1786 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1787 * pthread_rwlock_timedrdlock.c: ...here.
1788 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1789 * pthread_rwlock_timedwrlock.c: ...here.
1790 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1791 * pthread_rwlock_unlock.c: ...here.
1792 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1793 * pthread_rwlock_wrlock.c: ...here.
1794 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1795 * pthread_spin_destroy.c: ...here.
1796 * sysdeps/pthread/pthread_spin_init.c: Move to...
1797 * pthread_spin_init.c: ...here.
1798 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1799 * pthread_spin_unlock.c: ...here.
1800 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1801 * pthread_getcpuclockid.c: ...here.
1802
1803 * init.c: USE_TLS support is now always enabled.
1804 * tst-tls5.h: Likewise.
1805 * sysdeps/alpha/tls.h: Likewise.
1806 * sysdeps/i386/tls.h: Likewise.
1807 * sysdeps/ia64/tls.h: Likewise.
1808 * sysdeps/powerpc/tls.h: Likewise.
1809 * sysdeps/s390/tls.h: Likewise.
1810 * sysdeps/sh/tls.h: Likewise.
1811 * sysdeps/sparc/tls.h: Likewise.
1812 * sysdeps/x86_64/tls.h: Likewise.
1813
006a8f6f 18142006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
1815
1816 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1817 __rtld_mrlock_change): Update oldval if atomic compare and exchange
1818 failed.
1819
1820 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1821 Define to THREAD_SELF->header.multiple_threads.
1822 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1823 Likewise.
1824 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1825 Likewise.
1826 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1827 (SINGLE_THREAD_P): Likewise.
1828 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1829 (SINGLE_THREAD_P): Likewise.
1830 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1831 (SINGLE_THREAD_P): Likewise.
1832 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1833 (SINGLE_THREAD_P): Likewise.
1834 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1835 Likewise.
1836 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1837 (SINGLE_THREAD_P): Likewise.
1838 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1839 (SINGLE_THREAD_P): Likewise.
1840 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1841 Likewise.
1842
11bf311e 18432006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 1844
11bf311e
UD
1845 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1846 by default rather than 2_3_3.
32c075e1 1847
11bf311e 18482006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 1849
11bf311e
UD
1850 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1851 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1852 atomic_* instead of catomic_* macros.
1853
18542006-10-12 Ulrich Drepper <drepper@redhat.com>
1855
1856 [BZ #3285]
1857 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1858 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1859 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1860 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1861 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1862 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1863 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1864 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1865 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1866 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1867 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1868 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1869 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1870
18712006-10-11 Ulrich Drepper <drepper@redhat.com>
1872
1873 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1874 cancelable syscalls with six parameters.
1875
1876 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1877 operations instead of atomic_*.
32c075e1 1878
11bf311e 18792006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 1880
11bf311e 1881 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 1882
11bf311e 18832006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 1884
11bf311e
UD
1885 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1886 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1887 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1888 New file.
1889 * pthread_attr_setstack.c: Allow overwriting the version number of the
1890 new symbol.
1891 * pthread_attr_setstacksize.c: Likewise.
1892 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1893 it.
1894 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1895 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 1896
457b559e
UD
18972006-09-24 Ulrich Drepper <drepper@redhat.com>
1898
1899 [BZ #3251]
1900 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1901 Patch by Petr Baudis.
1902
0466106e
UD
19032006-09-18 Jakub Jelinek <jakub@redhat.com>
1904
1905 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1906
1907 * tst-cancel2.c (tf): Loop as long as something was written.
1908
bd6d3b7d
UD
19092006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1910
1911 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1912 mutexes wake all mutexes.
1913 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1914 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1915 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1916
30aa5785
UD
19172006-09-12 Ulrich Drepper <drepper@redhat.com>
1918
1919 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1920 to guarantee the thread is always canceled.
1921
2b6a801e
UD
19222006-09-08 Jakub Jelinek <jakub@redhat.com>
1923
1924 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1925 Include stdlib.h.
1926 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1927 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
1928 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1929 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1930 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 1931
346e6ad4
UD
19322006-09-08 Ulrich Drepper <drepper@redhat.com>
1933
1934 [BZ #3123]
1935 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1936 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
1937 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1938 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1939 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
1940 * Makefile (tests): Add tst-cond22.
1941 * tst-cond22.c: New file.
1942
b051fc44
UD
19432006-09-05 Ulrich Drepper <drepper@redhat.com>
1944
1945 [BZ #3124]
1946 * descr.h (struct pthread): Add parent_cancelhandling.
1947 * sysdeps/pthread/createthread.c (create_thread): Pass parent
1948 cancelhandling value to child.
1949 * pthread_create.c (start_thread): If parent thread was canceled
1950 reset the SIGCANCEL mask.
1951 * Makefile (tests): Add tst-cancel25.
1952 * tst-cancel25.c: New file.
1953
d052233c
UD
19542006-09-05 Jakub Jelinek <jakub@redhat.com>
1955 Ulrich Drepper <drepper@redhat.com>
1956
1957 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1958 counterp if it is already zero.
1959 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1960
cd248c3f
UD
19612006-03-04 Jakub Jelinek <jakub@redhat.com>
1962 Roland McGrath <roland@redhat.com>
1963
1964 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1965 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1966 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1967 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1968 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1969 lll_robust_mutex_timedlock, lll_mutex_unlock,
1970 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1971 Add _L_*_ symbols around the subsection.
1972 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1973 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1974
19752006-03-03 Jakub Jelinek <jakub@redhat.com>
1976 Roland McGrath <roland@redhat.com>
1977
1978 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1979 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1980 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1981 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1982 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1983 lll_robust_mutex_timedlock, lll_mutex_unlock,
1984 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1985 Add _L_*_ symbols around the subsection.
1986 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1987 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1988
b80770b2
UD
19892006-08-31 Ulrich Drepper <drepper@redhat.com>
1990
1991 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1992 change because it can disturb too much existing code. If real hard
1993 reader preference is needed we'll introduce another type.
1994 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1995 (pthread_rwlock_timedwrlock): Likewise.
1996 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1997 Likewise.
1998
bee2df0b
UD
19992006-08-30 Ulrich Drepper <drepper@redhat.com>
2000
2001 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2002 reader preference.
2003 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2004 (pthread_rwlock_timedwrlock): Likewise.
2005 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2006 Likewise.
2007
d678ebc1
UD
20082006-08-25 Jakub Jelinek <jakub@redhat.com>
2009
2010 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2011 Only define ifdef SHARED.
2012
ba408f84
UD
20132006-08-23 Ulrich Drepper <drepper@redhat.com>
2014
2015 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2016 (free_stacks): ...here.
2017 (__free_stack_cache): New function.
2018 * pthreadP.h: Declare __free_stack_cache.
2019 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2020 ptr_freeres.
2021 * init.c (pthread_functions): Initialize ptr_freeres.
2022 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2023 New freeres function.
2024
376e973a
UD
20252006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2026
2027 [BZ #3018]
2028 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2029
2b34af01
UD
20302006-08-20 Ulrich Drepper <drepper@redhat.com>
2031
2032 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2033 _XOPEN_REALTIME_THREADS.
2034
89c85f87
UD
20352006-08-15 Jakub Jelinek <jakub@redhat.com>
2036
2037 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2038 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2039 HAVE_CLOCK_GETTIME_VSYSCALL.
2040 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2041
f17efcb4
UD
20422006-08-14 Jakub Jelinek <jakub@redhat.com>
2043
2044 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2045 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2046 * descr.h (struct priority_protection_data): New type.
2047 (struct pthread): Add tpp field.
2048 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2049 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2050 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2051 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2052 TPP mutexes.
2053 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2054 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2055 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2056 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2057 * tpp.c: New file.
2058 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2059 boosted by TPP.
2060 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2061 * pthread_mutexattr_getprioceiling.c
2062 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2063 in the SCHED_FIFO priority range.
2064 * pthread_mutexattr_setprioceiling.c
2065 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2066 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2067 if mutex is not TPP. Ceiling is now in __data.__lock.
2068 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2069 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2070 is now in __data.__lock. Add locking.
2071 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2072 * Makefile (libpthread-routines): Add tpp.
2073 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2074 * tst-tpp.h: New file.
2075 * tst-mutexpp1.c: New file.
2076 * tst-mutexpp6.c: New file.
2077 * tst-mutexpp10.c: New file.
2078 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2079 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2080
22bb134c
UD
20812006-08-12 Ulrich Drepper <drepper@redhat.com>
2082
2083 [BZ #2843]
2084 * pthread_join.c (pthread_join): Account for self being canceled
2085 when checking for deadlocks.
2086 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2087 (tf1): Don't print anything after pthread_join returns, this would be
2088 another cancellation point.
2089 (tf2): Likewise.
2090 * tst-join6.c: New file.
2091 * Makefile (tests): Add tst-join6.
2092
f1762c0c
UD
20932006-08-03 Ulrich Drepper <drepper@redhat.com>
2094
9c06eb66
UD
2095 [BZ #2892]
2096 * pthread_setspecific.c (__pthread_setspecific): Check
2097 out-of-range index before checking for unused key.
2098
f1762c0c
UD
2099 * sysdeps/pthread/gai_misc.h: New file.
2100
7bb1b2c9
UD
21012006-08-01 Ulrich Drepper <drepper@redhat.com>
2102
2103 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2104 file. Don't use sysctl.
2105 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2106 overwrite the file if this is likely not true.
2107
b06e7e9a
UD
21082006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2109
2110 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2111 * Makefile (tests): Add tst-getpid3.
2112 * tst-getpid3.c: New file.
2113
b894c2ea
RM
21142006-07-30 Roland McGrath <roland@redhat.com>
2115
2116 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2117
2118 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2119 (pause_not_cancel): New macro.
2120 (nanosleep_not_cancel): New macro.
2121 (sigsuspend_not_cancel): New macro.
2122 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2123 nanosleep_not_cancel macro from <not-cancel.h>.
2124 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2125 macro from <not-cancel.h>.
2126
df47504c
UD
21272006-07-28 Ulrich Drepper <drepper@redhat.com>
2128 Jakub Jelinek <jakub@redhat.com>
2129
2130 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2131 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2132 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2133 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2134 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2135 * pthread_mutex_lock.c: Likewise.
2136 * pthread_mutex_timedlock.c: Likewise.
2137 * pthread_mutex_trylock.c: Likewise.
2138 * pthread_mutex_unlock.c: Likewise.
2139 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2140 all mutexes.
2141 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2142 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2143 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2144 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2145 pthread-pi-defines.sym.
2146 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2147 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2148 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
2149 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2150 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2151 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2152 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2153 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2154 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
2155 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2156 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2157 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2158 * tst-mutex2.c: Likewise.
2159 * tst-mutex3.c: Likewise.
2160 * tst-mutex4.c: Likewise.
2161 * tst-mutex5.c: Likewise.
2162 * tst-mutex6.c: Likewise.
2163 * tst-mutex7.c: Likewise.
2164 * tst-mutex7a.c: Likewise.
2165 * tst-mutex8.c: Likewise.
2166 * tst-mutex9.c: Likewise.
2167 * tst-robust1.c: Likewise.
2168 * tst-robust7.c: Likewise.
2169 * tst-robust8.c: Likewise.
2170 * tst-mutexpi1.c: New file.
2171 * tst-mutexpi2.c: New file.
2172 * tst-mutexpi3.c: New file.
2173 * tst-mutexpi4.c: New file.
2174 * tst-mutexpi5.c: New file.
2175 * tst-mutexpi6.c: New file.
2176 * tst-mutexpi7.c: New file.
2177 * tst-mutexpi7a.c: New file.
2178 * tst-mutexpi8.c: New file.
2179 * tst-mutexpi9.c: New file.
2180 * tst-robust1.c: New file.
2181 * tst-robust2.c: New file.
2182 * tst-robust3.c: New file.
2183 * tst-robust4.c: New file.
2184 * tst-robust5.c: New file.
2185 * tst-robust6.c: New file.
2186 * tst-robust7.c: New file.
2187 * tst-robust8.c: New file.
2188 * Makefile (tests): Add the new tests.
2189
2190 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2191 * pthread_mutex_destroy.c: Remove unneeded label.
2192
f3be81a9
UD
21932006-07-01 Ulrich Drepper <drepper@redhat.com>
2194
2195 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2196 computations to compile time.
2197
c26ca5e1
UD
21982006-06-04 Ulrich Drepper <drepper@redhat.com>
2199
2200 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2201
6f8a7dff
UD
22022006-05-15 Ulrich Drepper <drepper@redhat.com>
2203
c26ca5e1 2204 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 2205
3d237e42
UD
22062006-05-11 Ulrich Drepper <drepper@redhat.com>
2207
04974d63
UD
2208 * pthread_key_create.c (__pthread_key_create): Do away with
2209 __pthread_keys_lock.
2210
2211 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2212 (__kernel_cpumask_size): Mark as hidden.
2213 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2214
3d237e42
UD
2215 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2216 * semaphoreP.h (__sem_mappings_lock): Likewise.
2217
790fc6e4
UD
22182006-05-10 Ulrich Drepper <drepper@redhat.com>
2219
2220 * pthread_atfork.c: Mark __dso_handle as hidden.
2221
be434a72
UD
22222006-05-09 Ulrich Drepper <drepper@redhat.com>
2223
2224 [BZ #2644]
2225 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2226 the reload problem. Change the one path in pthread_cancel_init
2227 which causes the problem. Force gcc to reload. Simplify callers.
2228 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2229 (_Unwind_GetBSP): Undo last patch.
2230
3142b1ac
UD
22312006-05-07 Ulrich Drepper <drepper@redhat.com>
2232
bf3635d3
UD
2233 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2234 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
2235
2236 [BZ #2644]
2237 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2238 pointers are reloaded after pthread_cancel_init calls.
2239
27488789
UD
22402006-05-01 Ulrich Drepper <drepper@redhat.com>
2241
2242 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2243 __always_inline.
2244
a6375d11
UD
22452006-04-27 Ulrich Drepper <drepper@redhat.com>
2246
2247 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2248 Allocate new object which is passed to timer_sigev_thread so that
2249 the timer can be deleted before the new thread is scheduled.
2250
16a1d952
RM
22512006-04-26 Roland McGrath <roland@redhat.com>
2252
2253 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2254
7960f2a7
UD
22552006-04-08 Ulrich Drepper <drepper@redhat.com>
2256
ab9a9ff8
UD
2257 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2258 suffix for conditional jumps.
2259 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2260 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2261 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2262 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2263 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2264 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2265
7960f2a7
UD
2266 * init.c (sigcancel_handler): Compare with correct PID even if the
2267 thread is in the middle of a fork call.
2268 (sighandler_setxid): Likewise.
2269 Reported by Suzuki K P <suzuki@in.ibm.com> .
2270
2035d91c
UD
22712006-04-07 Jakub Jelinek <jakub@redhat.com>
2272
2273 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2274
0292b0dd
UD
22752006-04-06 Ulrich Drepper <drepper@redhat.com>
2276
2277 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2278 fails [Coverity CID 105].
2279
6738b3c0
UD
22802006-04-05 Ulrich Drepper <drepper@redhat.com>
2281
2282 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2283
359157a5
RM
22842006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2285
2286 [BZ #2505]
2287 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2288 Define __lll_rel_instr using lwsync.
2289
cd277b2d
UD
22902006-03-27 Ulrich Drepper <drepper@redhat.com>
2291
2292 * allocatestack.c (allocate_stack): Always initialize robust_head.
2293 * descr.h: Define struct robust_list_head.
2294 (struct pthread): Use robust_list_head in robust mutex list definition.
2295 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2296 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2297 (__pthread_initialize_minimal_internal): Register robust_list with
2298 the kernel.
2299 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2300 Declare __set_robust_list_avail.
2301 * pthread_create.c (start_thread): Register robust_list of new thread.
2302 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2303 waiters.
2304 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2305 number of users, it's unreliable.
2306 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2307 set_robust_list syscall is available.
2308 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2309 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2310 Set robust_head.list_op_pending before trying to lock a robust mutex.
2311 * pthread_mutex_timedlock.c: Likewise.
2312 * pthread_mutex_trylock.c: Likewise.
2313 * pthread_mutex_unlock.c: Likewise for unlocking.
2314 * Makefile (tests): Add tst-robust8.
2315 * tst-robust8.c: New file.
2316
facac085
UD
23172006-03-08 Andreas Schwab <schwab@suse.de>
2318
2319 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2320 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2321
7ccbe1a1
RM
23222006-03-05 Roland McGrath <roland@redhat.com>
2323
2324 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2325 and $config_os doesn't match *linux*.
2326
043cee37
RM
23272006-03-05 David S. Miller <davem@sunset.davemloft.net>
2328
2329 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2330 Use __syscall_error.
2331 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2332 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2333 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2334 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2335 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2336 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2337
88bce79e
UD
23382006-03-02 Ulrich Drepper <drepper@redhat.com>
2339
2340 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2341
672ec465
UD
23422006-03-01 Ulrich Drepper <drepper@redhat.com>
2343
2344 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2345 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2346 mutex.
2347 (__lll_robust_timedlock_wait): Likewise.
2348 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2349 (__lll_robust_lock_wait): Likewise.
2350 (__lll_robust_timedlock_wait): Likewise.
2351 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2352 (__lll_robust_lock_wait): Likewise.
2353 (__lll_robust_timedlock_wait): Likewise.
2354
c4a4875d
RM
23552006-03-01 Jakub Jelinek <jakub@redhat.com>
2356
2357 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2358 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2359 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2360 lll_robust_mutex_unlock): Define.
2361 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2362
3192fd8e
RM
23632006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2364
2365 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2366 instead of <clone.S>.
2367
14d44b19
RM
23682006-02-27 Jakub Jelinek <jakub@redhat.com>
2369
2370 * Makefile (libpthread-routines): Add
2371 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2372 and pthread_mutex_[sg]etprioceiling.
2373 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2374 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2375 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2376 pthread_mutex_setprioceiling.
2377 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2378 PTHREAD_PRIO_PROTECT): New enum values.
2379 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2380 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2381 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2382 prototypes.
2383 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2384 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2385 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2386 Define.
2387 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2388 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2389 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2390 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2391 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2392 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2393 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2394 protocol mutexes.
2395 * pthread_mutex_getprioceiling.c: New file.
2396 * pthread_mutex_setprioceiling.c: New file.
2397 * pthread_mutexattr_getprioceiling.c: New file.
2398 * pthread_mutexattr_setprioceiling.c: New file.
2399 * pthread_mutexattr_getprotocol.c: New file.
2400 * pthread_mutexattr_setprotocol.c: New file.
2401
62f6b9b2
RM
24022006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2403
2404 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2405
e0a3ed4f
RM
24062006-02-27 Roland McGrath <roland@redhat.com>
2407
2408 * sysdeps/pthread/Subdirs: List nptl here too.
2409 * configure (libc_add_on_canonical): New variable.
2410
2411 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2412
2413 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2414 self to get main source tree's file.
2415 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2416 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2417 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2418 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2419 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2420 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2421 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2422 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2423 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2424 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2425 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2426 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2427 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2428
2429 * Makefile: Use $(sysdirs) in vpath directive.
2430
2431 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2432 (CPPFLAGS-timer_routines.c): Likewise.
2433
2434 * Makeconfig (includes): Variable removed.
2435
84cfa284
RM
24362006-02-26 Roland McGrath <roland@redhat.com>
2437
2438 * sysdeps/generic/pt-raise.c: Moved to ...
2439 * pt-raise.c: ... here.
2440 * sysdeps/generic/lowlevellock.h: Moved to ...
2441 * lowlevellock.h: ... here.
2442
c5132ca1
RM
24432006-02-23 Roland McGrath <roland@redhat.com>
2444
2445 * descr.h (struct pthread): Add final member `end_padding'.
2446 (PTHREAD_STRUCT_END_PADDING): Use it.
2447
24482006-02-20 Roland McGrath <roland@redhat.com>
2449
2450 * sysdeps/mips: Directory removed, saved in ports repository.
2451 * sysdeps/unix/sysv/linux/mips: Likewise.
2452
a93317a1
UD
24532006-02-18 Ulrich Drepper <drepper@redhat.com>
2454
2455 * tst-robust1.c: Add second mutex to check that the mutex list is
2456 handled correctly.
2457
f1740bc4
UD
24582006-02-17 Jakub Jelinek <jakub@redhat.com>
2459
2460 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2461 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2462 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2463 lll_robust_mutex_unlock): New macros.
2464 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2465 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2466 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2467 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2468 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2469
a7245bf5
UD
24702006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2471
2472 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2473 definitions.
2474 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2475
49bfc1fe
UD
24762006-02-17 Ulrich Drepper <drepper@redhat.com>
2477
2478 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2479 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2480 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2481 (lll_robust_mutex_unlock): Likewise.
2482
56e987ac
UD
24832006-02-13 Jakub Jelinek <jakub@redhat.com>
2484
2485 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2486 Set robust_list.__next rather than robust_list.
2487 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2488 (__pthread_list_t): New typedef.
2489 (pthread_mutex_t): Replace __next and __prev fields with __list.
2490 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2491 (__pthread_list_t): New typedef.
2492 (pthread_mutex_t): Replace __next and __prev fields with __list.
2493 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2494 (__pthread_list_t, __pthread_slist_t): New typedefs.
2495 (pthread_mutex_t): Replace __next and __prev fields with __list.
2496 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2497 (__pthread_list_t, __pthread_slist_t): New typedefs.
2498 (pthread_mutex_t): Replace __next and __prev fields with __list.
2499 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2500 (__pthread_list_t, __pthread_slist_t): New typedefs.
2501 (pthread_mutex_t): Replace __next and __prev fields with __list.
2502 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2503 (__pthread_slist_t): New typedef.
2504 (pthread_mutex_t): Replace __next field with __list.
2505
683040c3
UD
25062006-02-15 Ulrich Drepper <drepper@redhat.com>
2507
25bc77e6 2508 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
2509 PTHREAD_MUTEX_OWNERDEAD.
2510 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2511 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2512 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2513 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2514 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2515 to PTHREAD_MUTEX_INCONSISTENT.
2516 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2517 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2518 * pthread_mutex_trylock.c: Likewise.
2519 * pthread_mutex_timedlock.c: Likewise.
2520 * pthread_mutex_unlock.c: Likewise.
2521 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2522 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2523 lowlevelrobustlock.sym.
2524 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2525 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2526 definitions.
2527 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2528 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2529 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2530 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2531 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2532
bbf209a4
UD
25332006-02-12 Ulrich Drepper <drepper@redhat.com>
2534
b007ce7c
UD
2535 * allocatestack.c (allocate_stack): Initialize robust_list.
2536 * init.c (__pthread_initialize_minimal_internal): Likewise.
2537 * descr.h (struct xid_command): Pretty printing.
2538 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2539 robust_list. Adjust macros.
2540 * pthread_create.c (start_thread): Adjust robust_list handling.
2541 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2542 but the owner for all robust mutex types.
2543 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2544 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 2545 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
2546 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2547
bbf209a4
UD
2548 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2549 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2550
b576fca1
UD
25512006-02-08 Jakub Jelinek <jakub@redhat.com>
2552
2553 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2554 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2555
a6df7387
UD
25562006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2557
2558 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2559 Return status.
2560 (lll_futex_timed_wait): Define.
2561
7c65e900
UD
25622006-01-19 Ulrich Drepper <drepper@redhat.com>
2563
2564 * tst-cancel4.c: Test ppoll.
2565
5f9f21e8
AJ
25662006-01-18 Andreas Jaeger <aj@suse.de>
2567
cf407dfb 2568 [BZ #2167]
5f9f21e8
AJ
2569 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2570 (pthread_mutex_t): Follow changes for other archs. Based on patch
2571 by Jim Gifford <patches@jg555.com>.
2572
251278c6
UD
25732006-01-13 Richard Henderson <rth@redhat.com>
2574
2575 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2576
de59a291
RM
25772006-01-10 Roland McGrath <roland@redhat.com>
2578
2579 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2580 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2581 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2582 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2583 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2584 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2585 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2586 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2587 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 2588 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 2589
931786ee
RM
25902006-01-09 Roland McGrath <roland@redhat.com>
2591
5d42c8c3
RM
2592 * tst-initializers1-c89.c: New file.
2593 * tst-initializers1-c99.c: New file.
2594 * tst-initializers1-gnu89.c: New file.
2595 * tst-initializers1-gnu99.c: New file.
2596 * Makefile (tests): Add them.
2597 (CFLAGS-tst-initializers1-c89.c): New variable.
2598 (CFLAGS-tst-initializers1-c99.c): New variable.
2599 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2600 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2601
931786ee
RM
2602 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2603 Use __extension__ on anonymous union definition.
2604 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2605 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2606 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2607 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 2608 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 2609
8dd18431
RM
26102006-01-08 Jakub Jelinek <jakub@redhat.com>
2611
2612 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2613 Don't give the union a name because it changes the mangled name.
2614 Instead name the struct for __data.
2615 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2616 Likewise.
2617 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2618 Likewise.
2619
ae11e412
UD
26202006-01-09 Jakub Jelinek <jakub@redhat.com>
2621
2622 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2623 stack bias to mc_ftp field.
2624
c6885aa1
UD
26252006-01-07 Ulrich Drepper <drepper@redhat.com>
2626
2627 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 2628 being too clever and reloading the futex value where it shouldn't.
c6885aa1 2629
ae4ad00a
UD
26302006-01-06 Ulrich Drepper <drepper@redhat.com>
2631
2632 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2633 correct type.
2634
ced368f7
UD
26352006-01-06 Jakub Jelinek <jakub@redhat.com>
2636
2637 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2638 Add cfi directives.
2639
d804f5df
UD
26402006-01-06 Ulrich Drepper <drepper@redhat.com>
2641
cbbbb188 2642 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
2643 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2644 rename in tcbhead_t.
2645
d804f5df
UD
2646 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2647 Don't give the union a name because it changes the mangled name.
2648 Instead name the struct for __data.
2649 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2650 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2651 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2652 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2653 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2654 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2655
679d83ba
UD
26562006-01-05 Ulrich Drepper <drepper@redhat.com>
2657
2658 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2659 Return status.
2660 (lll_futex_timed_wait): Define.
2661 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2662 * sysdeps/pthread/aio_misc.h: New file.
2663
06dc5bf3
RM
26642006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2665
2666 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2667
9759bbf1
UD
26682006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2669
2670 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2671 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2672 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2673
db59b28b
UD
26742006-01-04 Ulrich Drepper <drepper@redhat.com>
2675
2676 * tst-cancel24.cc: Use C headers instead of C++ headers.
2677
b01fe5f7
UD
26782006-01-03 Jakub Jelinek <jakub@redhat.com>
2679
2680 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2681 sparc-linux configured glibc.
2682 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2683 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2684 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2685 atomic_compare_and_exchange_val_24_acq instead of
2686 atomic_compare_and_exchange_val_acq.
2687 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2688 instead of atomic_exchange_rel.
2689 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2690 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2691 file.
2692 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2693 file.
2694 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2695 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2696 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2697 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2698 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2699 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2700 New file.
2701 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2702 New file.
2703 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2704 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2705 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2706 file.
2707 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2708 file.
2709 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2710
35c2fd59
UD
27112006-01-03 Ulrich Drepper <drepper@redhat.com>
2712
2713 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2714 mutex initializers.
2715
305bb37e
UD
27162006-01-02 Jakub Jelinek <jakub@redhat.com>
2717
2718 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2719 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2720 THREAD_COPY_POINTER_GUARD): Define.
2721 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2722 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2723
cc792128
UD
27242006-01-01 Ulrich Drepper <drepper@redhat.com>
2725
2726 * version.c: Update copyright year.
2727
db0a00d3
UD
27282005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2729
2730 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2731 .eh_frame section, use cfi_* directives.
2732 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2733
b36205c4
UD
27342005-12-30 Ulrich Drepper <drepper@redhat.com>
2735
2736 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2737 now.
2738
8b4f1598
UD
27392005-12-29 Ulrich Drepper <drepper@redhat.com>
2740
2741 * sysdeps/pthread/sigaction.c: Removed.
2742 * sigaction.c: New file.
2743 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2744
fec5592d
UD
27452005-12-28 Ulrich Drepper <drepper@redhat.com>
2746
2747 * Makefile (tests): Add tst-signal7.
2748 * tst-signal7.c: New file.
2749
db169ed5
RM
27502005-12-27 Roland McGrath <roland@redhat.com>
2751
2752 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2753 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2754 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2755 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2756 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2757 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2758 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2759 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2760 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2761 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2762 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2763
bfffffae
UD
27642005-12-27 Jakub Jelinek <jakub@redhat.com>
2765
2766 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2767 and __prev field to pthread_mutex_t.
2768 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2769 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2770 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2771 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2772 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2773 to pthread_mutex_t.
2774
1bcfb5a5
UD
27752005-12-26 Ulrich Drepper <drepper@redhat.com>
2776
2777 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2778 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2779 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2780 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2781 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2782 and PTHREAD_MUTEXATTR_FLAG_BITS.
2783 * descr.h (struct pthread): Add robust_list field and define
2784 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2785 * pthread_mutexattr_getrobust.c: New file.
2786 * pthread_mutexattr_setrobust.c: New file.
2787 * pthread_mutex_consistent.c: New file.
2788 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2789 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2790 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2791 Adjust pthread_mutex_t initializers.
2792 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2793 field to pthread_mutex_t.
2794 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2795 and __prev field to pthread_mutex_t.
2796 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2797 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2798 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2799 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2800 * pthread_mutexattr_gettype.c: Likewise.
2801 * pthread_mutexattr_setpshared.c: Likewise.
2802 * pthread_mutexattr_settype.c: Likewise.
2803 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2804 Initialize mutex kind according to robust flag.
2805 * pthread_mutex_lock.c: Implement local robust mutex.
2806 * pthread_mutex_timedlock.c: Likewise.
2807 * pthread_mutex_trylock.c: Likewise.
2808 * pthread_mutex_unlock.c: Likewise.
2809 * pthread_create.c (start_thread): Mark robust mutexes which remained
2810 locked as dead.
2811 * tst-robust1.c: New file.
2812 * tst-robust2.c: New file.
2813 * tst-robust3.c: New file.
2814 * tst-robust4.c: New file.
2815 * tst-robust5.c: New file.
2816 * tst-robust6.c: New file.
2817 * tst-robust7.c: New file.
2818 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2819 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2820 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2821 tst-robust5, tst-robust6, and tst-robust7.
2822
2823 * tst-typesizes.c: New file.
2824 * Makefile (tests): Add tst-typesizes.
2825
2826 * tst-once3.c: More debug output.
2827
9333ed0d
UD
28282005-12-24 Ulrich Drepper <drepper@redhat.com>
2829
d4d138a4
UD
2830 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2831 missing after last change.
2832
bfffffae 2833 * version.c: Update copyright year.
9333ed0d 2834
dcc73a8d
UD
28352005-12-23 Ulrich Drepper <drepper@redhat.com>
2836
2837 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2838 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2839 * pthread_mutex_trylock.c: Likewise.
2840 * pthread_mutex_timedlock.c: Likewise.
2841 * pthread_mutex_unlock.c: Likewise.
2842
879f3ca6
RM
28432005-12-22 Roland McGrath <roland@redhat.com>
2844
2845 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2846 so that #include_next's search location is not reset to the -I..
2847 directory where <nptl/...> can be found.
2848
077a0da7
UD
28492005-12-22 Ulrich Drepper <drepper@redhat.com>
2850
2851 [BZ #1913]
2852 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2853 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
2854 * tst-cancel24.cc: New file.
2855 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 2856
8dea90aa
RM
28572005-12-21 Roland McGrath <roland@redhat.com>
2858
2859 * libc-cancellation.c: Use <> rather than "" #includes.
2860 * pt-cleanup.c: Likewise.
2861 * pthread_create.c: Likewise.
2862 * pthread_join.c: Likewise.
2863 * pthread_timedjoin.c: Likewise.
2864 * pthread_tryjoin.c: Likewise.
2865 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2866 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2867 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2868 * unwind.c: Likewise.
2869
8da21f96
UD
28702005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2871
2872 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2873 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2874 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2875 THREAD_COPY_POINTER_GUARD): Define.
2876
00c2b3b9
UD
28772005-12-19 Jakub Jelinek <jakub@redhat.com>
2878
2879 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2880 rather than one.
2881 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2882 THREAD_COPY_POINTER_GUARD): Define.
2883 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2884 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2885 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2886 THREAD_COPY_POINTER_GUARD): Define.
2887 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2888 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2889 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2890 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2891 Use PTR_DEMANGLE for B0 if defined.
2892
827b7087
UD
28932005-12-17 Ulrich Drepper <drepper@redhat.com>
2894
2895 * pthread_create.c (__pthread_create_2_1): Use
2896 THREAD_COPY_POINTER_GUARD if available.
2897 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2898 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2899 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2900 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2901 * sysdeps/x86_64/tls.h: Likewise.
2902
2826ac7e
RM
29032005-12-15 Roland McGrath <roland@redhat.com>
2904
2905 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2906
b6ab06ce
UD
29072005-12-13 Ulrich Drepper <drepper@redhat.com>
2908
2909 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2910 sysdeps/generic.
2911 * errno-loc.c: New file.
2912
f0d1a3b5
RM
29132005-12-12 Roland McGrath <roland@redhat.com>
2914
2915 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2916 adjustments before choosing stack size. Update minimum stack size
2917 calculation to match allocate_stack change.
2918
db13ddbc
UD
29192005-12-12 Ulrich Drepper <drepper@redhat.com>
2920
2921 * allocatestack.c (allocate_stack): Don't demand that there is an
2922 additional full page available on the stack beside guard, TLS, the
2923 minimum stack.
2924
088f460f
UD
29252005-11-24 Ulrich Drepper <drepper@redhat.com>
2926
2927 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2928 (__cleanup_fct_attribute): Use __regparm__ not regparm.
2929
2930 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2931 compiling 32-bit code we must define __cleanup_fct_attribute.
2932
16feadf2
UD
2933005-11-24 Jakub Jelinek <jakub@redhat.com>
2934
2935 [BZ #1920]
2936 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2937 __attribute__ instead of __attribute.
2938 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2939 (__cleanup_fct_attribute): Likewise.
2940
e6e493bb
UD
29412005-11-17 Jakub Jelinek <jakub@redhat.com>
2942
2943 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2944 a write barrier before writing libgcc_s_getcfa.
2945
8e635611
UD
29462005-11-06 Ulrich Drepper <drepper@redhat.com>
2947
2948 * sysdeps/unix/sysv/linux/configure: Removed.
2949
ce33ee7c
UD
29502005-11-05 Ulrich Drepper <drepper@redhat.com>
2951
2952 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2953 optional init_array/fini_array support.
2954
20d511e0
RM
29552005-10-24 Roland McGrath <roland@redhat.com>
2956
2957 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2958 versioned_symbol use.
2959
fe60d146
RM
29602005-10-16 Roland McGrath <roland@redhat.com>
2961
2962 * init.c (__pthread_initialize_minimal_internal): Even when using a
2963 compile-time default stack size, apply the minimum that allocate_stack
2964 will require, and round up to page size.
2965
0faa1cf5
RM
29662005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
2967
2968 * Makefile ($(test-modules)): Remove static pattern rule.
2969
f9126cc2
UD
29702005-10-14 Jakub Jelinek <jakub@redhat.com>
2971 Ulrich Drepper <drepper@redhat.com>
2972
2973 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2974 alignment in callback function.
2975 * Makefile: Add rules to build and run tst-align3.
2976 * tst-align3.c: New file.
2977
015a5d22
RM
29782005-10-03 Jakub Jelinek <jakub@redhat.com>
2979
2980 * allocatestack.c (setxid_signal_thread): Add
2981 INTERNAL_SYSCALL_DECL (err).
2982
b71ce910
UD
29832005-10-02 Jakub Jelinek <jakub@redhat.com>
2984
2985 * allocatestack.c (setxid_signal_thread): Need to use
2986 atomic_compare_and_exchange_bool_acq.
2987
dff9a7a1
UD
29882005-10-01 Ulrich Drepper <drepper@redhat.com>
2989 Jakub Jelinek <jakub@redhat.com>
2990
2991 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
2992 CANCEL_RESTMASK.
2993 (struct pthread): Move specific_used field to avoid padding.
2994 Add setxid_futex field.
2995 * init.c (sighandler_setxid): Reset setxid flag and release the
2996 setxid futex.
2997 * allocatestack.c (setxid_signal_thread): New function. Broken
2998 out of the bodies of the two loops in __nptl_setxid. For undetached
2999 threads check whether they are exiting and if yes, don't send a signal.
3000 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3001 * pthread_create.c (start_thread): For undetached threads, check
3002 whether setxid bit is set. If yes, wait until signal has been
3003 processed.
3004
3005 * allocatestack.c (STACK_VARIABLES): Initialize them.
3006 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3007
560b4709
UD
30082004-09-02 Jakub Jelinek <jakub@redhat.com>
3009
3010 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3011 waiters, awake all waiters on the associated mutex.
3012
5eac4760
RM
30132005-09-22 Roland McGrath <roland@redhat.com>
3014
3015 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3016 ../sysdeps/x86_64/hp-timing.h).
3017
a3615024
UD
30182005-08-29 Jakub Jelinek <jakub@redhat.com>
3019
3020 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3021 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3022 (lll_futex_wake_unlock): Define.
3023 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3024 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3025 (lll_futex_wake_unlock): Define.
3026 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3027 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3028 (lll_futex_wake_unlock): Define.
3029 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3030 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3031 (lll_futex_wake_unlock): Define.
3032 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3033 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3034 (lll_futex_wake_unlock): Define.
3035 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3036 lll_futex_wake_unlock.
3037 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3038 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3039 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3041 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3042 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3043
bf017034
UD
30442005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3045
3046 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3047 Fix typo in register name.
3048
fd4af664
UD
30492005-08-23 Ulrich Drepper <drepper@redhat.com>
3050
8558d715
UD
3051 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3052 Use __sigfillset. Document that sigfillset does the right thing wrt
3053 to SIGSETXID.
fd4af664 3054
3fd1bc67
UD
30552005-07-11 Jakub Jelinek <jakub@redhat.com>
3056
44d75caf 3057 [BZ #1102]
3fd1bc67
UD
3058 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3059 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3060 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3061 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3062 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3063 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3064 in the structure.
3065 * Makefile (tests): Add tst-initializers1.
3066 (CFLAGS-tst-initializers1.c): Set.
3067 * tst-initializers1.c: New test.
3068
553185e2
UD
30692005-07-11 Jakub Jelinek <jakub@redhat.com>
3070
3071 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3072 Make sure __flags are located at offset 48 from the start of the
3073 structure.
3074
8df08cb2
RM
30752005-07-02 Roland McGrath <roland@redhat.com>
3076
3077 * Makeconfig: Comment fix.
3078
253eb3a0
UD
30792005-07-05 Jakub Jelinek <jakub@redhat.com>
3080
3081 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3082 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3083 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3084 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3085 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3086 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3087 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3088 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3089 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3090 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3091
bb6e8ca3
UD
30922005-06-25 Jakub Jelinek <jakub@redhat.com>
3093
3094 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3095 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3096 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3097 fields.
3098 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3099 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3100 field. Put in sysinfo field unconditionally.
3101 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3102 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3103 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3104 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3105 fields.
3106 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3107 * pthread_create.c (__pthread_create_2_1): Use
3108 THREAD_COPY_STACK_GUARD macro.
3109 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3110 tests.
3111 * tst-stackguard1.c: New file.
3112 * tst-stackguard1-static.c: New file.
3113
99c7f870
UD
31142005-06-14 Alan Modra <amodra@bigpond.net.au>
3115
3116 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3117 Invoke CGOTSETUP and CGOTRESTORE.
3118 (CGOTSETUP, CGOTRESTORE): Define.
3119
8074c5c5
RM
31202005-05-29 Richard Henderson <rth@redhat.com>
3121
3122 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3123 (tf_write, tf_writev): Use it.
3124 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3125 the system minimum.
3126
c179df4e
UD
31272005-05-23 Jakub Jelinek <jakub@redhat.com>
3128
3129 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3130 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3131 __librt_*_asynccancel@local.
3132
b0e196a4
UD
31332005-05-17 Alan Modra <amodra@bigpond.net.au>
3134
3135 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3136 all occurrences of JUMPTARGET. Instead append @local to labels.
3137
f7d78e18
UD
31382005-05-20 Jakub Jelinek <jakub@redhat.com>
3139
3140 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3141 size/alignment of struct pthread rather than tcbhead_t.
3142 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3143 Likewise.
3144 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3145 Likewise.
3146 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3147 Likewise.
3148
363dd976
UD
31492005-05-19 Richard Henderson <rth@redhat.com>
3150
3151 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3152 __sync_val_compare_and_swap, not explicit _si variant.
3153 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3154
1ad9da69
UD
31552005-05-03 Ulrich Drepper <drepper@redhat.com>
3156
3157 [BZ #915]
3158 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3159
5085cd1f
UD
31602005-05-03 Jakub Jelinek <jakub@redhat.com>
3161
3162 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3163 .eh_frame section, use cfi_* directives.
3164
ad529081
UD
31652005-04-27 Jakub Jelinek <jakub@redhat.com>
3166
3167 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3168 of "" includes.
3169
dea99685
UD
31702005-04-27 Ulrich Drepper <drepper@redhat.com>
3171
c06aad09 3172 [BZ #1075]
dea99685
UD
3173 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3174 aio_write blocks.
3175
84060bad
RM
31762005-04-27 Roland McGrath <roland@redhat.com>
3177
5e2d8ac8
RM
3178 * Makefile (tests): Remove tst-clock2.
3179
84060bad
RM
3180 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3181 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3182 translating to the kernel clockid_t for our own process/thread clock.
3183
3184 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3185
4a035b9d
RM
31862005-04-15 Jakub Jelinek <jakub@redhat.com>
3187
3188 * old_pthread_cond_init.c: Include <errno.h>.
3189 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3190 process shared or uses clock other than CLOCK_REALTIME.
3191 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3192
edac0e8f
UD
31932005-04-13 David S. Miller <davem@davemloft.net>
3194
3195 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3196 * sysdeps/sparc/sparc64/clone.S: New file.
3197
613d8d52
RM
31982005-04-05 Jakub Jelinek <jakub@redhat.com>
3199
44d75caf 3200 [BZ #1102]
613d8d52
RM
3201 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3202 __inline instead of inline.
3203 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3204
ee618985
UD
32052005-03-31 Jakub Jelinek <jakub@redhat.com>
3206
3207 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3208 functionally equivalent, but shorter instructions.
3209 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3210 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3211 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3212 Likewise.
3213 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3214 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3215 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3216 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3217 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3218 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3219 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3220 Likewise.
3221 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3222 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3223 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3224 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3225 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3226
f850220b
AJ
32272005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3228
3229 * sysdeps/mips/Makefile: New file.
3230 * sysdeps/mips/nptl-sysdep.S: New file.
3231 * sysdeps/mips/tcb-offsets.sym: New file.
3232 * sysdeps/mips/pthread_spin_lock.S: New file.
3233 * sysdeps/mips/pthread_spin_trylock.S: New file.
3234 * sysdeps/mips/pthreaddef.h: New file.
3235 * sysdeps/mips/tls.h: New file.
3236 * sysdeps/mips/jmpbuf-unwind.h: New file.
3237 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3238 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3239 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3240 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3241 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3242 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3243 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3244 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3245 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3246 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3247
1e6da2b0
UD
32482005-03-23 Ulrich Drepper <drepper@redhat.com>
3249
c06aad09 3250 [BZ #1112]
1e6da2b0
UD
3251 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3252 variable to scerr.
3253
5233d576
RM
32542005-03-10 Jakub Jelinek <jakub@redhat.com>
3255
3256 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3257
3053ff11
RM
32582005-02-25 Roland McGrath <roland@redhat.com>
3259
3260 * alloca_cutoff.c: Correct license text.
3261 * tst-unload.c: Likewise.
3262 * sysdeps/pthread/allocalim.h: Likewise.
3263 * sysdeps/pthread/pt-initfini.c: Likewise.
3264 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3265 * sysdeps/pthread/bits/sigthread.h: Likewise.
3266 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3267 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3268
9cfe5381
RM
32692005-02-16 Roland McGrath <roland@redhat.com>
3270
3271 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3272 Use unsigned int * for ptr_nthreads.
3273
7de00121
RM
32742005-02-14 Alan Modra <amodra@bigpond.net.au>
3275
20d511e0 3276 [BZ #721]
7de00121
RM
3277 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3278 gcc4.
3279
4bae262d
UD
32802005-02-07 Richard Henderson <rth@redhat.com>
3281
613d8d52 3282 [BZ #787]
4bae262d
UD
3283 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3284 argument.
3285
75df54b7
RM
32862004-11-03 Marcus Brinkmann <marcus@gnu.org>
3287
3288 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3289 order of arguments in invocation of atomic_add_zero.
3290
ea9c93cc
UD
32912005-01-26 Jakub Jelinek <jakub@redhat.com>
3292
9cfe5381 3293 [BZ #737]
ea9c93cc
UD
3294 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3295 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3296 at least gotntpoff relocation and addition.
3297 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3298 Likewise.
3299 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3300 Likewise.
3301 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3302 Likewise.
3303
9dcafc55
UD
33042005-01-06 Ulrich Drepper <drepper@redhat.com>
3305
3306 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3307 entry for static tls deallocation fix.
3308 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3309 also contains information whether the memory pointed to is static
3310 TLS or not.
3311 * sysdeps/i386/tls.h: Likewise.
3312 * sysdeps/ia64/tls.h: Likewise.
3313 * sysdeps/powerpc/tls.h: Likewise.
3314 * sysdeps/s390/tls.h: Likewise.
3315 * sysdeps/sh/tls.h: Likewise.
3316 * sysdeps/sparc/tls.h: Likewise.
3317 * sysdeps/x86_64/tls.h: Likewise.
3318
a71c152c
UD
33192004-12-27 Ulrich Drepper <drepper@redhat.com>
3320
3321 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3322
d143c49e
UD
33232004-12-21 Jakub Jelinek <jakub@redhat.com>
3324
3325 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3326 %esp.
3327 * Makefile (tests): Add tst-align2.
3328 * tst-align2.c: New test.
3329 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3330 -mpreferred-stack-boundary=4.
3331
50130ded
RM
33322004-12-18 Roland McGrath <roland@redhat.com>
3333
3334 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3335 New file removed withdrawn for the moment.
3336
cbc53df0
RH
33372004-12-17 Richard Henderson <rth@redhat.com>
3338
3339 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3340 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 3341
fb9d5c73
UD
33422004-12-16 Ulrich Drepper <drepper@redhat.com>
3343
03332aa6
UD
3344 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3345 Increased PTHREAD_STACK_MIN.
3346
fb9d5c73
UD
3347 * tst-context1.c (stacks): Use bigger stack size.
3348
e853ea00
UD
33492004-12-16 Jakub Jelinek <jakub@redhat.com>
3350
3351 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3352 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3353
f23673fc
UD
33542004-12-15 Jakub Jelinek <jakub@redhat.com>
3355
3356 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3357 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3358 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3359
917fbe70
UD
33602004-12-15 Ulrich Drepper <drepper@redhat.com>
3361
3362 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3363
1f9d7c27
UD
33642004-12-14 Ulrich Drepper <drepper@redhat.com>
3365
3366 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3367 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3368
3369 * tst-getpid1.c: If child crashes, report this first. Print which
3370 signal.
3371
bf7c04cd
UD
33722004-12-09 Ulrich Drepper <drepper@redhat.com>
3373
3374 * init.c (__pthread_initialize_minimal_internal): Also unblock
3375 SIGSETXID.
3376
33772004-12-01 Jakub Jelinek <jakub@redhat.com>
3378
3379 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3380 _POSIX_THREAD_CPUTIME): Define to 0.
3381 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3382 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3383 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3384 __timer_signal_thread_tclk): Remove.
3385 (init_module): Remove their initialization.
3386 (thread_cleanup): Remove their cleanup assertions.
3387 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3388 __timer_signal_thread_tclk): Remove.
3389 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 3390 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
3391 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3392
484cc801
UD
33932004-12-07 Jakub Jelinek <jakub@redhat.com>
3394
3395 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3396 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3397
3398 * Makefile (tests): Add tst-getpid2.
3399 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3400 (do_test): Use it. Use __clone2 instead of clone on ia64.
3401 * tst-getpid2.c: New test.
3402
2da9a6a1
UD
34032004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3404
3405 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3406
1ff241b8
UD
34072004-12-04 Ulrich Drepper <drepper@redhat.com>
3408
3409 * Makefile (tests): Add tst-getpid1.
3410 * tst-getpid1.c: New file.
3411 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3412 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3413
3f488b9c
RM
34142004-12-02 Roland McGrath <roland@redhat.com>
3415
3416 * Makefile (libpthread-nonshared): Variable removed.
3417 ($(objpfx)libpthread_nonshared.a): Target removed.
3418 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3419 These are now handled by generic magic from
3420 libpthread-static-only-routines being set.
3421
597ce09c
UD
34222004-11-27 Ulrich Drepper <drepper@redhat.com>
3423
3424 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3425 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3426 _POSIX_THREAD_PRIO_PROTECT): Define.
3427 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3428 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3429 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3430
60e4523a
UD
34312004-11-26 Jakub Jelinek <jakub@redhat.com>
3432
3433 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3434 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3435 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3436 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3437 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3438 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3439 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3440
f1f2cafc
UD
34412004-11-24 Ulrich Drepper <drepper@redhat.com>
3442
bca2d208
UD
3443 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3444
f1f2cafc
UD
3445 * Makefile (libpthread-routines): Add pthread_setschedprio.
3446 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3447 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3448 * pthread_setschedprio.c: New file.
3449
b639d0c9
UD
34502004-11-20 Jakub Jelinek <jakub@redhat.com>
3451
ef2bb413
UD
3452 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3453 * pthread_cancel.c (pthread_create): Likewise.
3454
b639d0c9
UD
3455 * Makefile (libpthread-routines): Add vars.
3456 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3457 * init.c (__default_stacksize, __is_smp): Remove.
3458 * vars.c: New file.
3459 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3460 and define a wrapper macro.
3461 (PTHREAD_STATIC_FN_REQUIRE): Define.
3462 * allocatestack.c (__find_thread_by_id): Undefine.
3463 * pthread_create (__pthread_keys): Remove.
3464 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3465 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3466 PTHREAD_STATIC_FN_REQUIRE.
3467
3defcff3
UD
34682004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3469
3470 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3471 parameter to REGISTER macro.
3472
ec188f92
RM
34732004-11-17 Roland McGrath <roland@redhat.com>
3474
3475 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3476 Make sure SIGCANCEL is blocked as well.
3477
ccd8de9a
UD
34782004-11-10 Jakub Jelinek <jakub@redhat.com>
3479
3480 * sysdeps/pthread/setxid.h: New file.
3481 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3482 (struct xid_command): Add forward decl.
3483 (struct pthread_functions): Change return type of __nptl_setxid hook
3484 to int.
3485 * pthreadP.h (__nptl_setxid): Change return type to int.
3486 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3487 calling thread, return its return value and set errno on failure.
3488 * descr.h (struct xid_command): Change id type to long array.
3489
3490 * Makefile: Add rules to build and test tst-setuid1 and
3491 tst-setuid1-static.
3492 * tst-setuid1.c: New test.
3493 * tst-setuid1-static.c: New test.
3494
ed2ced8a
UD
34952004-11-10 Jakub Jelinek <jakub@redhat.com>
3496
3497 * Makefile (tests): Add tst-exit3.
3498 * tst-exit3.c: New test.
3499
948603ee
UD
35002004-11-09 Ulrich Drepper <drepper@redhat.com>
3501
3502 * Makefile (tests): Add tst-exit2.
3503 * tst-exit2.c: New file.
3504
ba5ffd2a
RM
35052004-11-09 Roland McGrath <roland@redhat.com>
3506
3507 [BZ #530]
3508 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3509 here, before calling clone.
3510 * pthread_create.c (start_thread): Don't do it here.
3511
c4d7bd39
RM
35122004-11-02 Jakub Jelinek <jakub@redhat.com>
3513
3514 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3515
543fb0c8
UD
35162004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3517
3518 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3519 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3520 assembler warning.
3521
a1fbd858
UD
35222004-10-28 Jakub Jelinek <jakub@redhat.com>
3523
3524 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3525 if sched_priority is not between minprio and maxprio.
3526
c2a4357a
UD
35272004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3528
3529 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3530 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3531
3532 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3533 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3534
78d8d211
UD
35352004-10-24 Ulrich Drepper <drepper@redhat.com>
3536
3537 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3538 not-cancelable I/O functions.
3539
dd28590f
UD
35402004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3541
3542 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3543 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3544 make sure 2 is stored in the futex and we looked at the old value.
3545 Fix a few other problems to return the correct value.
3546
f8c97af7
RH
35472004-10-14 Richard Henderson <rth@redhat.com>
3548
3549 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3550 make gcc4 happy.
3551
3feb8efa
UD
35522004-10-06 Jakub Jelinek <jakub@redhat.com>
3553
3554 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3555 of pthread-functions.h and pthreaddef.h.
3556 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3557
3558 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3559 Change __data.__nwaiters from int to unsigned int.
3560
3561 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3562 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3563
3564 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3565 before return type.
3566
3567 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3568 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3569
67060ef5
UD
35702004-10-06 Ulrich Drepper <drepper@redhat.com>
3571
3572 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3573 test fails, remove message queue.
3574 (tf_msgsnd): Likewise.
3575
f38a3086
UD
35762004-10-05 Jakub Jelinek <jakub@redhat.com>
3577
3578 * tst-clock1.c: Change #ifdef to #if defined.
3579 * tst-clock2.c: Likewise.
3580 * tst-cond11.c: Likewise.
3581
2c03b6db
UD
3582 * sysdeps/pthread/timer_create.c (timer_create): Use
3583 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3584 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3585 THREAD_CPUTIME.
3586
6ab5f50d
UD
35872004-10-05 Jakub Jelinek <jakub@redhat.com>
3588
3589 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3590 _POSIX_THREAD_CPUTIME): Define to 0.
3591
e4bb4853
UD
35922004-10-04 Ulrich Drepper <drepper@redhat.com>
3593
3594 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3595 and _POSIX_THREAD_CPUTIME to zero.
3596 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3597 * tst-barrier2.c: Fix testing for POSIX feature.
3598 * tst-clock1.c: Likewise.
3599 * tst-clock2.c: Likewise.
3600 * tst-cond11.c: Likewise.
3601 * tst-cond4.c: Likewise.
3602 * tst-cond6.c: Likewise.
3603 * tst-flock2.c: Likewise.
3604 * tst-mutex4.c: Likewise.
3605 * tst-mutex9.c: Likewise.
3606 * tst-rwlock12.c: Likewise.
3607 * tst-rwlock4.c: Likewise.
3608 * tst-signal1.c: Likewise.
3609 * tst-spin2.c: Likewise.
3610 * sysdeps/pthread/posix-timer.h: Likewise.
3611 * sysdeps/pthread/timer_create.c: Likewise.
3612 * sysdeps/pthread/timer_routines.c: Likewise.
3613
c1b48791
UD
36142004-10-01 Ulrich Drepper <drepper@redhat.com>
3615
927f0673
UD
3616 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3617 (__lll_mutex_timedlock_wait): Address futex correctly.
3618
c1b48791 3619 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 3620 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
3621 make sure 2 is stored in the futex and we looked at the old value.
3622 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3623 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3624 which might very well made the code not working at all before.
7b87aca6 3625 [BZ #417]
c1b48791 3626
e9f4e844
UD
36272004-09-28 Ulrich Drepper <drepper@redhat.com>
3628
4f21c95d
UD
3629 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3630 allow SIGSETXID to be sent.
3631 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3632 for SIGSETXID to be defined.
3633 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3634 SIGSETXID cannot be blocked.
3635
e9f4e844
UD
3636 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3637 Add __extension__ to long long types.
3638 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3639 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3640 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3641 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3642 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3643 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3644 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3645
5f66b766
UD
36462004-09-25 Ulrich Drepper <drepper@redhat.com>
3647
3648 * descr.h (struct pthread): Add stopped_start field.
3649 * sysdeps/pthread/createthread.c (create_thread): Set
3650 start_stopped flag in descriptor for new thread appropriately.
3651 * pthread_create.c (start_thread): Only take lock to be stopped on
3652 startup if stopped_start flag says so.
3653
362038b0
UD
36542004-09-24 Ulrich Drepper <drepper@redhat.com>
3655
3f80a99b
UD
3656 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3657 is created detached and if yes, do not try to free the stack in case
3658 the thread creation failed.
3659 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3660 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3661 case there has been no error. [BZ #405]
3662
362038b0
UD
3663 * pthread_create.c (start_thread): Don't wait for scheduler data
3664 etc to be set at the beginning of the function. The cancellation
3665 infrastructure must have been set up. And enable async
3666 cancellation before potentially going to sleep. [BZ #401]
3667
65f0beb9
UD
36682004-09-20 Ulrich Drepper <drepper@redhat.com>
3669
3c12b91a 3670 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
3671 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3672 for now.
3673 * Makefile: Don't build pthread_set*id code for now.
3674
2edb61e3
UD
36752004-09-19 Ulrich Drepper <drepper@redhat.com>
3676
3677 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3678 internal use.
3679 * allocatestack.c (__nptl_setxid): New function.
3680 * descr.h (struct xid_command): Define type.
3681 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3682 (sighandler_setxid): New function.
3683 (__pthread_initialize_minimal): Register sighandler_setxid for
3684 SIGCANCEL.
3685 * pt-allocrtsig.c: Update comment.
3686 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3687 Declare __nptl_setxid.
3688 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3689 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3690 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3691 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3692 and pthread_setresuid_np.
3693 * pthread_setgid_np.c: New file.
3694 * pthread_setuid_np.c: New file.
3695 * pthread_setegid_np.c: New file.
3696 * pthread_seteuid_np.c: New file.
3697 * pthread_setregid_np.c: New file.
3698 * pthread_setreuid_np.c: New file.
3699 * pthread_setresgid_np.c: New file.
3700 * pthread_setresuid_np.c: New file.
3701 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3702 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3703 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3704 and pthread_setresuid_np.
3705 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3706 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3707 pthread_setregid, and pthread_setresgid.
3708
1ab1fa6f
UD
37092004-09-18 Ulrich Drepper <drepper@redhat.com>
3710
3711 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3712 ENOMEM when out of memory.
3713
ae9e6b36
RM
37142004-09-10 Roland McGrath <roland@redhat.com>
3715
3716 [BZ #379]
3717 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3718 code, since we don't try to use the broken CLONE_STOPPED any more.
3719 * pthread_create.c (start_thread): Likewise.
3720
424bd2f8
RH
37212004-09-15 Richard Henderson <rth@redhat.com>
3722
3723 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3724
17b8a52d
UD
37252004-09-01 David Mosberger <davidm@hpl.hp.com>
3726
3727 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3728 (__libc_unwind_longjmp): Delete macro and declare as function.
3729 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3730 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3731 nptl directory.
3732 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3733 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3734 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3735
ccc63b07
UD
37362004-09-12 Ulrich Drepper <drepper@redhat.com>
3737
3738 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3739 for __USE_XOPEN2K.
3740 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3741 types also for __USE_XOPEN2K.
3742 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3743 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3744 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3745 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3746 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3747 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3748 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3749 [BZ #320]
3750
31f93b3b
UD
37512004-09-08 Ulrich Drepper <drepper@redhat.com>
3752
3753 * sysdeps/pthread/pthread.h
3754 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3755 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3756 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3757 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3758 [BZ #375]
3759
e0329987
UD
37602004-09-07 Ulrich Drepper <drepper@redhat.com>
3761
590b40f7
UD
3762 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3763 PSEUDO to be used with . prefix.
3764
67254a97
UD
3765 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3766 Use atomic_increment instead of atomic_exchange_and_add.
3767 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3768 Likewise.
3769 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3770 Likewise.
3771 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3772 Likewise.
3773
3774 * allocatestack.c (allocate_stack): Use atomic_increment_val
3775 instead of atomic_exchange_and_add.
3776 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3777 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3778 Likewise.
3779 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3780 Likewise.
3781
e0329987
UD
3782 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3783 the initialization function might throw.
3784
42d86dd6 37852005-09-05 Richard Henderson <rth@redhat.com>
e0329987 3786
42d86dd6
RH
3787 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3788 Move definition inside libpthread, libc, librt check. Provide
3789 definition for rtld.
3790
73f7c32c
UD
37912004-09-02 Ulrich Drepper <drepper@redhat.com>
3792
f76c8499
UD
3793 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3794 * sysdeps/i386/jmpbuf-unwind.h: Likewise
3795 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3796 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3797 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3798 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3799 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3800 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3801 * unwind.c: Use it.
3802
73f7c32c
UD
3803 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3804 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3805 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3806 Likewise.
3807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3808 Decrement __nwaiters. If pthread_cond_destroy has been called and
3809 this is the last waiter, signal pthread_cond_destroy caller and
3810 avoid using the pthread_cond_t structure after unlock.
3811 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3812 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3813 Read clock type from the least significant bits of __nwaiters instead
3814 of __clock.
3815 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3816 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3817
38182004-08-31 Jakub Jelinek <jakub@redhat.com>
3819
3820 [BZ #342]
3821 * Makefile (tests): Add tst-cond20 and tst-cond21.
3822 * tst-cond20.c: New test.
3823 * tst-cond21.c: New test.
3824 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3825 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3826 it unsigned int.
3827 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3828 Likewise.
3829 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3830 (pthread_cond_t): Likewise.
3831 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3832 Likewise.
3833 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3834 Likewise.
3835 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3836 Likewise.
3837 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3838 (cond_nwaiters): New.
3839 (clock_bits): New.
3840 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3841 if there are waiters not signalled yet.
3842 Wait until all already signalled waiters wake up.
3843 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3844 __nwaiters. If pthread_cond_destroy has been called and this is the
3845 last waiter, signal pthread_cond_destroy caller and avoid using
3846 the pthread_cond_t structure after unlock.
3847 (__pthread_cond_wait): Increment __nwaiters in the beginning,
3848 decrement it when leaving. If pthread_cond_destroy has been called
3849 and this is the last waiter, signal pthread_cond_destroy caller.
3850 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3851 Likewise. Read clock type from the least significant bits of
3852 __nwaiters instead of __clock.
3853 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3854 whether clock ID can be encoded in COND_CLOCK_BITS bits.
3855 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3856 clock type just from the last COND_CLOCK_BITS bits of value.
3857 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3858 instead of __clock, just from second bit of condattr's value.
3859
409f7493
UD
38602004-08-30 Jakub Jelinek <jakub@redhat.com>
3861
3862 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3863 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
3864 != 64.
3865 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3866
92c6ccd1
RM
38672004-08-15 Roland McGrath <roland@frob.com>
3868
3869 * pthread_atfork.c: Update copyright terms including special exception
3870 for these trivial files, which are statically linked into executables
3871 that use dynamic linking for the significant library code.
3872
4d004cfb
UD
38732004-08-09 Jakub Jelinek <jakub@redhat.com>
3874
3875 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3876 pthread_rwlock_rdlock.
3877 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3878 Decrease __nr_readers_queued after reacquiring lock.
3879 * sysdeps/pthread/pthread_rwlock_timedrdlock
3880 (pthread_rwlock_timedrdlock): Likewise.
3881 Reported by Bob Cook <bobcook47@hotmail.com>.
3882
90595fb6
RM
38832004-08-11 Jakub Jelinek <jakub@redhat.com>
3884
3885 * tst-rwlock14.c (tf): Read main thread handle from *ARG
3886 before pthread_barrier_wait.
3887
fa46f7ab
UD
38882004-08-07 Ulrich Drepper <drepper@redhat.com>
3889
3890 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3891 Remove unnecessary exception handling data.
3892
15ef4b55
UD
38932004-07-23 Jakub Jelinek <jakub@redhat.com>
3894
3895 [BZ #284]
3896 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3897 instead of clockid_t.
3898
4fb907b7
RM
38992004-07-21 Roland McGrath <roland@redhat.com>
3900
3901 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3902
39032004-07-19 Roland McGrath <roland@redhat.com>
3904
3905 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3906
8f73811b
RM
39072004-07-02 Roland McGrath <roland@redhat.com>
3908
3909 * configure: Don't exit.
3910
290639c3
UD
39112004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3912
3913 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3914 (__pthread_cond_timedwait): Check for invalid nanosecond in
3915 timeout value.
3916
8e5aaad9
UD
39172004-07-07 Ulrich Drepper <drepper@redhat.com>
3918
3919 * Makefile: Add rules to build and run tst-fini1.
3920 * tst-fini1.c: New file.
3921 * tst-fini1mod.c: New file.
3922
ce6e047f
UD
39232004-07-05 Ulrich Drepper <drepper@redhat.com>
3924
3925 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3926 if no cancellation support is needed.
3927 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3928 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3929 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3930 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3931 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3932 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3933 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3934 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3935 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3936
3937 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3938 only if not already defined.
3939
9b9ef823
UD
39402004-07-05 Jakub Jelinek <jakub@redhat.com>
3941
2dd18ce2
UD
3942 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3943 constraint "m" instead of "0" for futex.
3944
9b9ef823
UD
3945 * shlib-versions: Add powerpc64-.*-linux.*.
3946
38205402
UD
39472004-07-04 Jakub Jelinek <jakub@redhat.com>
3948
3949 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3950 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3951 for valid tv_nsec.
3952 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3953 1 billion and 64-bit tv_nsec which is valid when truncated to 32
3954 bits.
3955
78a9c837
RM
39562004-06-29 Roland McGrath <roland@redhat.com>
3957
3958 * Banner: NPTL no longer has its own version number.
3959 * Makefile (nptl-version): Variable removed.
3960 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3961 using $(version), the glibc version number.
3962
d3d35527
UD
39632004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3964
3965 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3966 Fix branch offset for a PLT entry.
3967 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3968 Likewise.
3969 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3970 Likewise.
3971 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3972 Likewise.
3973 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3974 Likewise.
3975
346f18ae
UD
39762004-06-28 Jakub Jelinek <jakub@redhat.com>
3977
3978 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3979 unconditionally.
3980
f3a19754
UD
39812004-06-28 Jakub Jelinek <jakub@redhat.com>
3982
3983 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3984 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3985 instead of tv_sec.
3986 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3987 (pthread_rwlock_timedrdlock): Likewise.
3988
539842a4
UD
39892004-06-22 Jakub Jelinek <jakub@redhat.com>
3990
3991 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3992 Set __r7 to val, not mutex.
3993
46f4c578
UD
39942004-06-27 Ulrich Drepper <drepper@redhat.com>
3995
3996 * Makefile: Add rules to build tst-rwlock14.
3997 * tst-rwlock14.c: New file.
3998
39992004-06-24 Boris Hu <boris.hu@intel.com>
4000
4001 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4002 check.
4003 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4004
9898e99c
AJ
40052004-06-19 Andreas Jaeger <aj@suse.de>
4006
4007 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4008 assembler in last patch.
4009
7c3164bc
UD
40102004-06-17 Ulrich Drepper <drepper@redhat.com>
4011
4012 * sysdeps/pthread/pthread_cond_timedwait.c
4013 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4014 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4015 (__pthread_cond_timedwait): Check for invalid nanosecond in
4016 timeout value.
4017 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4018 * tst-cond19.c: New file.
4019 * Makefile: Add rules to build and run tst-cond19.
4020
72e61500
UD
40212004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4022
4023 * tst-context1.c (GUARD_PATTERN): Defined.
4024 (tst_context_t): Define struct containing ucontext_t & guard words.
4025 (ctx): Declare as an array of tst_context_t.
4026 (fct): Verify uc_link & guard words are still valid.
4027 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4028
7c370086
UD
40292004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4030
4031 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4032 Add __data.__futex field, reshuffle __data.__clock.
4033 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4034 (__pthread_cond_signal): Increment __futex at the same time as
4035 __wakeup_seq or __total_seq. Pass address of __futex instead of
4036 address of low 32-bits of __wakeup_seq to futex syscall.
4037 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4038 (__pthread_cond_wait): Likewise. Pass __futex value from before
4039 releasing internal lock to FUTEX_WAIT.
4040 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4041 (__pthread_cond_timedwait): Likewise.
4042 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4043 (FUTEX_CMP_REQUEUE): Define.
4044 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4045 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4046 Pass __futex value from before the unlock and __futex address instead
4047 of address of low 32-bits of __wakeup_seq to futex syscall.
4048 Fallback to FUTEX_WAKE all on any errors.
4049
a9e526e7
RM
40502004-06-08 Jakub Jelinek <jakub@redhat.com>
4051
4052 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4053 comment typo.
4054 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4055 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4056 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4057 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4058 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4059
f1847a84
RM
40602004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4061
4062 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4063 Add memory clobber to inline assembly.
4064 (__lll_mutex_trylock): Likewise.
4065 (__lll_mutex_cond_trylock): Likewise.
4066
f7c81e1a
UD
40672004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4068
4069 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4070 Pass val argument as 6th system call argument in %r7.
4071
75fccede
UD
40722004-05-21 Jakub Jelinek <jakub@redhat.com>
4073
4074 * Makefile (tests): Add tst-cond16.
4075 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4076 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4077 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4078 Add __data.__futex field, reshuffle __data.__clock.
4079 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4080 (__pthread_cond_signal): Increment __futex at the same time as
4081 __wakeup_seq or __total_seq. Pass address of __futex instead of
4082 address of low 32-bits of __wakeup_seq to futex syscall.
4083 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4084 (__pthread_cond_wait): Likewise. Pass __futex value from before
4085 releasing internal lock to FUTEX_WAIT.
4086 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4087 (__pthread_cond_timedwait): Likewise.
4088 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4089 (FUTEX_CMP_REQUEUE): Define.
4090 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4091 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4092 Pass __futex value from before the unlock and __futex address instead
4093 of address of low 32-bits of __wakeup_seq to futex syscall.
4094 Fallback to FUTEX_WAKE all on any errors.
4095 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4096 Define.
4097 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4098 internally. Return non-zero if error, zero if success.
4099 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4100 Add __data.__futex field, reshuffle __data.__clock.
4101 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4102 Define.
4103 (lll_futex_requeue): Add val argument, return 1 unconditionally
4104 for the time being.
4105 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4106 Add __data.__futex field, reshuffle __data.__clock.
4107 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4108 Define.
4109 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4110 internally. Return non-zero if error, zero if success.
4111 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4112 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4113 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4114 Define.
4115 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4116 internally. Return non-zero if error, zero if success.
4117 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4118 Add __data.__futex field, reshuffle __data.__clock.
4119 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4120 Define.
4121 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4122 internally. Return non-zero if error, zero if success.
4123 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4124 Add __data.__futex field, reshuffle __data.__clock.
4125 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4126 Add __data.__futex field, reshuffle __data.__clock.
4127 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4128 Increment __futex at the same time as __wakeup_seq or __total_seq.
4129 Pass address of __futex instead of address of low 32-bits of
4130 __wakeup_seq to futex syscall.
4131 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4132 Pass __futex value from before releasing internal lock
4133 to FUTEX_WAIT.
4134 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4135 Likewise. Avoid unnecessary shadowing of variables.
4136 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4137 Set __futex to 2 * __total_seq. Pass __futex value from before the
4138 unlock and __futex address instead of address of low 32-bits of
4139 __wakeup_seq to futex_requeue macro, adjust for new return value
4140 meaning.
4141 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4142 (__pthread_cond_signal): Increment __futex at the same time as
4143 __wakeup_seq or __total_seq. Pass address of __futex instead of
4144 address of low 32-bits of __wakeup_seq to futex syscall.
4145 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4146 (__pthread_cond_wait): Likewise. Pass __futex value from before
4147 releasing internal lock to FUTEX_WAIT.
4148 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4149 (__pthread_cond_timedwait): Likewise.
4150 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4151 (FUTEX_CMP_REQUEUE): Define.
4152 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4153 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4154 Pass __futex value from before the unlock and __futex address instead
4155 of address of low 32-bits of __wakeup_seq to futex syscall.
4156 Fallback to FUTEX_WAKE all on any errors.
4157
41582004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4159
4160 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4161 Add nop to align the end of critical section.
4162 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4163
fbf86dda
UD
41642004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4165
4166 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4167 Add __broadcast_seq field.
4168 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4169 all waiters as woken with woken_seq and bump broadcast counter.
4170 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4171 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4172 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4173 Comment typo fixes. Avoid returning -ETIMEDOUT.
4174
41752004-06-01 Ulrich Drepper <drepper@redhat.com>
4176
4177 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4178 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4179 Reported by Kaz Kojima.
4180
ffdd5e50
UD
41812004-05-25 Jakub Jelinek <jakub@redhat.com>
4182
4183 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4184
3abc82c8
UD
41852004-05-21 Jakub Jelinek <jakub@redhat.com>
4186
4187 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4188 __broadcast_seq with bc_seq after acquiring internal lock instead of
4189 before it.
4190
893a3511
UD
41912004-05-18 Jakub Jelinek <jakub@redhat.com>
4192
4193 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4194 compilation.
4195 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4196 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4197 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4198 (pthread_cond_t): Add __data.__broadcast_seq field.
4199 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4200 (FRAME_SIZE): Define.
4201 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4202 Comment typo fixes.
4203 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4204 Define.
4205 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4206 typo fixes.
4207 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4208 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4209 fixes.
4210
42112004-05-18 Ulrich Drepper <drepper@redhat.com>
4212
4213 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4214 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4215 Add __broadcast_seq field.
4216 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4217 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4218 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4219 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4220 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4221 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4222 all waiters as woken with woken_seq and bump broadcast counter.
4223 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4224 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4225 __broadcast_seq field.
4226 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4227 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4228 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4229 * pthread_cond_init.c: Initialize __broadcast_seq field.
4230 * Makefile (tests): Add tst-cond17 and tst-cond18.
4231 Add .NOTPARALLEL goal.
4232 * tst-cond16.c: New file. From Jakub.
4233 * tst-cond17.c: New file. From Jakub.
4234 * tst-cond18.c: New file. From Jakub.
4235
4123718e
UD
42362004-05-16 Ulrich Drepper <drepper@redhat.com>
4237
4238 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4239 unwind info.
4240
4241 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4242 Parametrize frame size. Correct some unwind info.
4243 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4244
2d7ae210
UD
42452004-05-04 Jakub Jelinek <jakub@redhat.com>
4246
4247 * tst-stack3.c: Note testing functionality beyond POSIX.
4248
50c2b6d7
UD
42492004-05-04 Jakub Jelinek <jakub@redhat.com>
4250
4251 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4252 Change conditional from ifdef to if.
4253
27b02589
UD
42542004-04-23 Jakub Jelinek <jakub@redhat.com>
4255
4256 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4257 SYSDEP_CANCEL_ERROR): Define.
4258 (PSEUDO): Use it.
4259
4bb8fc33
UD
42602004-05-01 Jakub Jelinek <jakub@redhat.com>
4261
4262 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4263
f9a06dc1
UD
42642004-04-20 Jakub Jelinek <jakub@redhat.com>
4265
4266 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4267
d3b52028
UD
42682004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4269
4270 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4271 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4272 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4273 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4274
a5dd0a6c
UD
42752004-04-19 Ulrich Drepper <drepper@redhat.com>
4276
4277 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4278 thread has all signals blocked.
4279
620c3354
AJ
42802004-04-18 Andreas Jaeger <aj@suse.de>
4281
4282 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4283 (SEM_VALUE_MAX): Add missing brace.
4284
1683daeb
UD
42852004-04-17 Jakub Jelinek <jakub@redhat.com>
4286
4287 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4288 in rt subdir.
4289 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4290 * sysdeps/pthread/tst-mqueue8x.c: New test.
4291 * tst-cancel4.c: Update comment about message queues.
4292
4293 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4294 return it_value { 0, 0 }.
4295 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4296 like SIGEV_SIGNAL.
4297 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4298 assertion for SIGEV_NONE.
4299 (thread_attr_compare): Compare all attributes, not just a partial
4300 subset.
4301
43022004-04-17 Jakub Jelinek <jakub@redhat.com>
4303
4304 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4305
f532641d
UD
43062004-04-17 Ulrich Drepper <drepper@redhat.com>
4307
4308 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4309 Just use a plain number.
4310 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4311 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4312 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4313 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4314 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4315 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4316 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4317
7eb7fdda
UD
43182004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4319
53392906
UD
4320 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4321 frame info.
4322 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 4323
d7ba1313
UD
43242004-04-15 Jakub Jelinek <jakub@redhat.com>
4325
4326 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4327 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4328 of calling sigwaitinfo.
4329
5adac0e4
UD
43302004-04-16 Ulrich Drepper <drepper@redhat.com>
4331
4332 * allocatestack.c (allocate_stack): Set reported_guardsize
4333 unconditionally.
4334 * pthread_getattr_np.c (pthread_getattr_np): Use
4335 reported_guardsize instead of guardsize.
4336 * descr.h (struct pthread): Add reported_guardsize field.
4337
f93fa7d4
UD
43382004-04-13 Jakub Jelinek <jakub@redhat.com>
4339
4340 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4341
1b82c6c7
UD
43422004-04-12 Ulrich Drepper <drepper@redhat.com>
4343
4344 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4345
43462004-04-08 Jakub Jelinek <jakub@redhat.com>
4347
4348 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4349 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4350 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4351 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4352 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4353 Define.
4354 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4355 (_POSIX_MESSAGE_PASSING): Define.
4356 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4357 (_POSIX_MESSAGE_PASSING): Define.
4358 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4359 (_POSIX_MESSAGE_PASSING): Define.
4360
e6eb894e
UD
43612004-04-04 Ulrich Drepper <drepper@redhat.com>
4362
4363 * tst-context1.c (fct): Check whether correct stack is used.
4364
1e084487
UD
43652004-04-03 Ulrich Drepper <drepper@redhat.com>
4366
4e73e115
UD
4367 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4368 matching constraints for asm mem parameters.
4369
1e084487
UD
4370 * tst-clock2.c (tf): Don't define unless needed.
4371
feca5e0b
UD
43722004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4373
4374 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4375 $(gnulib).
4376
3fa21fd8
UD
43772004-03-30 Ulrich Drepper <drepper@redhat.com>
4378
4379 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4380 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4381 * pthreadP.h: Declare __nptl_deallocate_tsd.
4382 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4383 Adjust caller.
4384
4385 * Makefile (tests): Add tst-tsd5.
4386 * tst-tsd5.c: New file.
4387
8e32efa6
UD
43882004-03-29 Ulrich Drepper <drepper@redhat.com>
4389
4390 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4391 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4392 is SHLIB_COMPAT check.
4393 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4394 (__pthread_attr_getaffinity_old): Likewise.
4395 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4396 (__pthread_getaffinity_old): Likewise.
4397 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4398 (__pthread_setaffinity_old): Likewise.
4399
eec8b6ca
UD
44002004-03-26 Ulrich Drepper <drepper@redhat.com>
4401
4402 * allocatestack.c (_make_stacks_executable): Call
4403 _dl_make_stack_executable first.
4404
db2f05ba
RM
44052004-03-24 Roland McGrath <roland@redhat.com>
4406
4407 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4408 constraint instead of "0".
4409
6abbc501
UD
44102004-03-24 Ulrich Drepper <drepper@redhat.com>
4411
68dc4dcb
UD
4412 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4413 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4414
6abbc501
UD
4415 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4416 code to avoid warning.
4417
865e14d9
AJ
44182004-03-24 Andreas Jaeger <aj@suse.de>
4419
4420 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4421 (__pthread_attr_setaffinity_old): Remove const.
4422
16b06b70
UD
44232004-03-23 Ulrich Drepper <drepper@redhat.com>
4424
2c0b891a
UD
4425 * sysdeps/unix/sysv/linux/smp.h: New file.
4426 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4427 * init.c: Define __is_smp.
4428 (__pthread_initialize_minimal_internal): Call is_smp_system to
4429 initialize __is_smp.
4430 * pthreadP.h: Declare __is_smp.
4431 Define MAX_ADAPTIVE_COUNT is necessary.
4432 * pthread_mutex_init.c: Add comment regarding __spins field.
4433 * pthread_mutex_lock.c: Implement adaptive mutex type.
4434 * pthread_mutex_timedlock.c: Likewise.
4435 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4436 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4437 Add __spins field.
4438 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4439 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4440 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4441 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4442 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4443 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4444 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4445 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4446 lll_mutex_cond_trylock.
4447 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4448 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4449 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4450 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4451 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4452 Define BUSY_WAIT_NOP.
4453 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4454 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4455
4456 * tst-mutex5.c: Add support for testing adaptive mutexes.
4457 * tst-mutex7.c: Likewise.
4458 * tst-mutex5a.c: New file.
4459 * tst-mutex7a.c: New file.
4460 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4461
565699e4
UD
4462 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4463 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 4464 vgettimeofday call might destroy the content.
565699e4 4465
7fe1586f
UD
4466 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4467 @pause in the loop.
4468
e408880b
UD
4469 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4470 No need to restrict type of ret. Make it int. Add comment.
4471
16b06b70
UD
4472 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4473 Remove unnecessary setne instruction.
4474
61645263
UD
44752004-03-22 Jakub Jelinek <jakub@redhat.com>
4476
4477 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4478 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4479 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4480 If realloc fails, break out of the loop.
4481
e3d4c585
AJ
44822004-03-20 Andreas Jaeger <aj@suse.de>
4483
4484 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4485 (__pthread_setaffinity_old): Fix interface.
4486 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4487 (__pthread_getaffinity_old): Likewise.
4488
4489 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4490 (__pthread_setaffinity_new): Remove duplicate declaration.
4491
3abb1ff7
UD
44922004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4493
4494 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4495 the return value to a safe register.
4496 (CDISABLE): Set the function argument correctly.
4497
07bd2a3f
UD
44982004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4499
4500 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4501 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4502 Rewrite so that only one locked memory operation per round is needed.
4503 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4504 (pthread_barrier_wait): After wakeup, release lock only when the
4505 last thread stopped using the barrier object.
4506 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4507 (__pthread_cond_wait): Don't store mutex address if the current
4508 value is ~0l. Add correct cleanup support and unwind info.
4509 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4510 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4511 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4512 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4513 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4514 Add correct cleanup support and unwind info.
4515 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4516 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4517 information for syscall wrappers.
4518
14c35863
UD
45192004-03-18 Ulrich Drepper <drepper@redhat.com>
4520
4521 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4522 cpusetsize field, remove next.
4523 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4524 parameter for size of the CPU set.
4525 (pthread_setaffinity_np): Likewise.
4526 (pthread_attr_getaffinity_np): Likewise.
4527 (pthread_attr_setaffinity_np): Likewise.
4528 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4529 interface change, keep compatibility code.
4530 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4531 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4532 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4533 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4534 __pthread_getaffinity_np.
4535 * Versions: Add version for changed interfaces.
4536 * tst-attr3.c: Adjust test for interface change.
4537 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4538 increasing buffer sizes.
4539 * pthread_attr_destroy.c: Remove unused list handling.
4540 * pthread_attr_init.c: Likewise.
4541
8e115d80
RM
45422004-03-17 Roland McGrath <roland@redhat.com>
4543
4544 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4545 first argument to clock_getres so we ever enable kernel timers.
4546
e3b22ad3
UD
45472004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4548
4549 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4550
841153fa
RH
45512004-03-12 Richard Henderson <rth@redhat.com>
4552
e3b22ad3
UD
4553 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4554 oldvalue from CENABLE to CDISABLE.
841153fa 4555
932dfea7
UD
45562004-03-12 Ulrich Drepper <drepper@redhat.com>
4557
4558 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4559 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4560 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4561 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4562
9852f6dc
RH
45632004-03-11 Richard Henderson <rth@redhat.com>
4564
4565 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4566 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4567 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4568
43513fb7
UD
45692004-03-11 Jakub Jelinek <jakub@redhat.com>
4570
4571 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4572 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4573 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4574
45752004-03-11 Jakub Jelinek <jakub@redhat.com>
4576
4577 * forward.c (__pthread_cond_broadcast_2_0,
4578 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4579 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4580 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4581
8a3e10e0
UD
45822004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4583
4584 * sysdeps/sh/tcb-offsets.sym: Add PID.
4585 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4586 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4587
6d3a2bec
UD
45882004-03-10 Ulrich Drepper <drepper@redhat.com>
4589
4590 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4591 include <sysdep-cancel.h>, vfork is no cancellation point.
4592 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4593 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4594 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4595
d3a4a571
UD
45962004-03-10 Jakub Jelinek <jakub@redhat.com>
4597
73b4ce64
UD
4598 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4599 libc_hidden_def.
4600 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4601 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4602 Likewise.
4603 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4604 Likewise.
4605 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4606 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4607 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4608 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4609 of DO_CALL_VIA_BREAK. Work around a gas problem.
4610
d682a515
UD
4611 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4612 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4613 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4614 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4615 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4616 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4617
4618 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4619 a local register for saving old PID. Negate PID in parent upon exit.
4620
d3a4a571
UD
4621 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4622 tcb-offsets.h.
4623 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4624 before syscall, set to the old value in the parent afterwards.
4625 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4626 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4627 tcb-offsets.h.
4628 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4629 before syscall, set to the old value in the parent afterwards.
4630 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4631 * sysdeps/s390/tcb-offsets.sym: Add PID.
4632
4633 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4634 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4635 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4636 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4637 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4638 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4639
46402004-03-10 Andreas Schwab <schwab@suse.de>
4641
4642 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4643 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4644 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4645
3f2fb223 46462004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 4647
3f2fb223
UD
4648 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4649 * tst-cancel21.c (do_one_test): Likewise.
4650 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 4651
8b9d6054
UD
46522004-02-09 Jakub Jelinek <jakub@redhat.com>
4653
4654 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4655 if non-zero and set to INT_MIN if zero.
4656 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4657 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4658 (SAVE_PID, RESTORE_PID): Define.
4659 (__vfork): Use it.
4660 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4661 Use relative path to avoid including NPTL i386/vfork.S.
4662 (SAVE_PID, RESTORE_PID): Define.
4663 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4664 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4665 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4666 tst-vfork2x.
4667 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4668 * tst-vfork1.c: New test.
4669 * tst-vfork2.c: New test.
4670 * tst-vfork1x.c: New test.
4671 * tst-vfork2x.c: New test.
4672
02287d05
UD
46732004-03-08 Ulrich Drepper <drepper@redhat.com>
4674
c072ef6d 4675 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 4676 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 4677 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 4678 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 4679
d4acd24b
UD
46802004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4681
4682 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4683
8acb4b81
UD
46842004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4685
4686 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4687 _rtld_global_ro.
4688
4d1a02ef
UD
46892004-03-07 Ulrich Drepper <drepper@redhat.com>
4690
001836c8 4691 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 4692 _rtld_global_ro.
001836c8 4693
4d1a02ef
UD
4694 * tst-once4.c: Remove unnecessary macro definition.
4695
4696 * tst-mutex7.c (do_test): Limit thread stack size.
4697 * tst-once2.c (do_test): Likewise.
4698 * tst-tls3.c (do_test): Likewise.
4699 * tst-tls1.c (do_test): Likewise.
4700 * tst-signal3.c (do_test): Likewise.
4701 * tst-kill6.c (do_test): Likewise.
4702 * tst-key4.c (do_test): Likewise.
4703 * tst-join4.c (do_test): Likewise.
4704 * tst-fork1.c (do_test): Likewise.
4705 * tst-context1.c (do_test): Likewise.
4706 * tst-cond2.c (do_test): Likewise.
4707 * tst-cond10.c (do_test): Likewise.
4708 * tst-clock2.c (do_test): Likewise.
4709 * tst-cancel10.c (do_test): Likewise.
4710 * tst-basic2.c (do_test): Likewise.
4711 * tst-barrier4.c (do_test): Likewise.
4712
aa420660
UD
47132004-03-05 Ulrich Drepper <drepper@redhat.com>
4714
4715 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4716
cff08c81
UD
47172004-03-01 Ulrich Drepper <drepper@redhat.com>
4718
4719 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4720 (__pthread_cond_timedwait): Optimize wakeup test.
4721 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4722 (__pthread_cond_wait): Likewise.
4723 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4724 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4725 Likewise.
4726
b7fe377c
UD
47272004-02-29 Ulrich Drepper <drepper@redhat.com>
4728
4729 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4730 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4731 the atomic instruction needed.
4732 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4733 (__lll_mutex_lock_wait): Likewise.
4734
4c771a3b
UD
47352004-02-28 Ulrich Drepper <drepper@redhat.com>
4736
4737 * Makefile (tests): Add tst-cond14 and tst-cond15.
4738 * tst-cond14.c: New file.
4739 * tst-cond15.c: New file.
4740
a2c33d5a
UD
47412004-02-27 Ulrich Drepper <drepper@redhat.com>
4742
4743 * sysdeps/pthread/createthread.c (create_thread): Remove use of
4744 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
4745 needs to be implemented differently to be useful.
4746
261eada2
UD
47472004-02-26 Ulrich Drepper <drepper@redhat.com>
4748
14ffbc83
UD
4749 * pthread_attr_setschedparam.c: Don't test priority against limits
4750 here. Set ATTR_FLAG_SCHED_SET flag.
4751 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4752 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4753 from parent thread to child. If attribute is used and scheduling
4754 parameters are not inherited, copy parameters from attribute or
4755 compute them. Check priority value.
4756 * pthread_getschedparam.c: If the parameters aren't known yet get
4757 them from the kernel.
4758 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4759 ATTR_FLAG_POLICY_SET flag for thread.
4760 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4761 and ATTR_FLAG_POLICY_SET.
4762
4763 * sysdeps/pthread/createthread.c: Use tgkill if possible.
4764
261eada2
UD
4765 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4766 fail if stack address hasn't been set. Just return 0.
4767
701d185c
UD
47682004-02-25 Ulrich Drepper <drepper@redhat.com>
4769
25b8e63c
UD
4770 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
4771 libpthread for the files in this list.
4772 (CFLAGS-tst-unload): Removed.
4773 * tst-unload.c (do_test): Don't use complete path for
4774 LIBPHREAD_SO.
4775
701d185c
UD
4776 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4777 tst-_res1mod2.
4778
a8fd5a02
UD
47792004-02-22 Ulrich Drepper <drepper@redhat.com>
4780
4781 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4782 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4783 operation per round is needed.
4784 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4785 (__lll_mutex_lock_wait): Likewise.
4786
dd0b7b19
UD
47872004-02-20 Ulrich Drepper <drepper@redhat.com>
4788
4789 * tst-cancel9.c (cleanup): Don't print to stderr.
4790
5990e1fe
UD
47912004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4792
4793 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4794
33ab3b66
UD
47952004-02-20 Jakub Jelinek <jakub@redhat.com>
4796
1be3130e
UD
4797 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4798 (__syscall_error_handler2): Call CDISABLE.
4799 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4800 (__syscall_error_handler2): Call CDISABLE.
4801
8ba5025a
UD
4802 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4803 Release lock before the loop, don't reacquire it.
8ba5025a 4804
33ab3b66
UD
4805 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4806
11986c68
UD
48072004-02-19 Andreas Schwab <schwab@suse.de>
4808
4809 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4810 Fix last change.
4811
dc391246
UD
48122004-02-18 Ulrich Drepper <drepper@redhat.com>
4813
37c054c7
UD
4814 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4815 (pthread_barrier_wait): After wakeup, release lock only when the
4816 last thread stopped using the barrier object.
4817 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4818 (pthread_barrier_wait): Likewise.
4819 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4820 Likewise.
4821 * Makefile (tests): Add tst-barrier4.
4822 * tst-barrier4.c: New file.
dc391246
UD
4823
4824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4825 (__pthread_cond_timedwait): Perform timeout test while holding
4826 internal lock to prevent wakeup race.
4827 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4828 * sysdeps/pthread/pthread_cond_timedwait.c
4829 (__pthread_cond_timedwait): Likewise.
4830 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4831 (__pthread_cond_timedwait): Likewise.
4832
4a08113c
UD
48332004-02-18 Jakub Jelinek <jakub@redhat.com>
4834
4835 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4836 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4837 * Makefile (tests): Add tst-rwlock13.
4838 * tst-rwlock13.c: New test.
4839
71b1675e
UD
48402004-02-16 Ulrich Drepper <drepper@redhat.com>
4841
4842 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4843 (__condvar_tw_cleanup): Little optimization.
4844 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4845
cd9fdc72
UD
48462004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
4847
4848 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4849 libpthread as "lib" parameter to SHLIB_COMPAT.
4850 (__novmx_siglongjmp): Fix typo in function name.
4851 (__novmx_longjmp): Fix typo in function name.
4852
82038750
UD
48532004-02-13 Ulrich Drepper <drepper@redhat.com>
4854
b078c591
UD
4855 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4856 __builtin_expect.
4857
82038750
UD
4858 * sysdeps/generic/pt-longjmp.c: Moved to...
4859 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
4860
e2982bf0
UD
48612004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
4862
4863 * Makefile (libpthread-routines): Add pt-cleanup.
4864 * pt-longjmp.c: Removed.
4865 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4866 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4867 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4868 Version longjmp, siglongjmp for GLIBC_2.3.4.
4869 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4870
3730d95c
UD
48712004-02-13 Ulrich Drepper <drepper@redhat.com>
4872
219304ec
UD
4873 * sysdeps/pthread/pthread_cond_timedwait.c
4874 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
4875 Reuse code. Add __builtin_expects.
4876
3730d95c
UD
4877 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4878 (__pthread_cond_timedwait): Get internal lock in case timeout has
4879 passed before the futex syscall.
4880 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4881
5673ccc1
UD
48822004-01-20 Ulrich Drepper <drepper@redhat.com>
4883
debddf64
UD
4884 * allocatestack.c: Pretty printing.
4885
5673ccc1
UD
4886 * sysdeps/pthread/createthread.c (create_thread): Don't add
4887 CLONE_DETACHED bit if it is not necessary.
4888
6bae8725
UD
48892004-01-16 Ulrich Drepper <drepper@redhat.com>
4890
4891 * pthread_getattr_np.c: Include ldsodefs.h.
4892
ff151400
RH
48932004-01-16 Richard Henderson <rth@redhat.com>
4894
6bae8725
UD
4895 * allocatestack.c: Don't declare __libc_stack_end.
4896 * init.c (__pthread_initialize_minimal_internal): Likewise.
4897 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 4898
ba683832
RH
48992004-01-15 Richard Henderson <rth@redhat.com>
4900
4901 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4902 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4903 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4904 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4905 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4906 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4907 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4908 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4909
630d93a7
UD
49102004-01-14 Ulrich Drepper <drepper@redhat.com>
4911
219304ec 4912 * init.c (pthread_functions): Make array const.
630d93a7 4913
d1fc817e
UD
49142004-01-13 Ulrich Drepper <drepper@redhat.com>
4915
4916 * allocatestack.c (__make_stacks_executable): Change interface.
4917 Check parameters. Pass parameter on to libc counterpart.
4918 * pthreadP.h: Change declaration.
4919
dc927809
RH
49202004-01-13 Richard Henderson <rth@redhat.com>
4921
10677727
UD
4922 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4923 prototype form.
4924 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4925 Likewise.
4926
d1fc817e
UD
4927 * sysdeps/alpha/Makefile: New file.
4928 * sysdeps/alpha/tcb-offsets.sym: New file.
4929 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4930 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 4931
d1fc817e
UD
4932 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4933 on powerpc version.
dc927809 4934
249a3d0c
UD
49352004-01-08 Jakub Jelinek <jakub@redhat.com>
4936
4937 * Makefile (tests): Add tst-backtrace1.
4938 * tst-backtrace1.c: New test.
4939
763c0490
RM
49402003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
4941
4942 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4943 register as second parameter to the REGISTER macro.
4944 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4945 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4946 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4947 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4948 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4949 of thread register as second parameter to REGISTER macro in 64 case.
4950
c7baafd5
UD
49512004-01-03 Ulrich Drepper <drepper@redhat.com>
4952
4953 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4954 (CFLAGS-getpid.o): Defined.
4955 (CFLAGS-getpid.os): Defined.
4956
25ac0258
UD
49572003-12-31 Ulrich Drepper <drepper@redhat.com>
4958
4959 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4960 returned for main thread does not overlap with any other VMA.
4961 Patch by Jakub Jelinek.
4962
795985e4
UD
49632003-12-29 Jakub Jelinek <jakub@redhat.com>
4964
4965 * tst-raise1.c: Include stdio.h.
4966
cb5b9388
UD
49672003-12-23 Jakub Jelinek <jakub@redhat.com>
4968
4969 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4970 setting with __ASSUME_TGKILL || defined __NR_tgkill.
4971 If pid is 0, set it to selftid.
4972 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4973 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
4974 != 0, return self->tid without doing a syscall.
4975 * descr.h (struct pthread): Move pid field after tid.
4976
4977 * Makefile (tests): Add tst-raise1.
4978 * tst-raise1.c: New file.
4979
432aaf5b
RM
49802003-12-23 Roland McGrath <roland@redhat.com>
4981
4982 * tst-oddstacklimit.c: New file.
4983 * Makefile (tests): Add it.
4984 (tst-oddstacklimit-ENV): New variable.
4985
4986 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4987 value up to page size for __default_stacksize.
4988
33ebea17
UD
49892003-12-21 Ulrich Drepper <drepper@redhat.com>
4990
4991 * Makefile (tests): Add tst-eintr5.
4992 * tst-eintr5.c: New file.
4993
4994 * eintr.c (eintr_source): Prevent sending signal to self.
4995
4996 * tst-eintr2.c (tf1): Improve error message.
4997
bbe35eb5
UD
49982003-12-20 Ulrich Drepper <drepper@redhat.com>
4999
5000 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5001 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
5002 * pthread_cancel.c: Add comment explaining use of PID field.
5003 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5004 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5005 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5006 temporarily to signal the field must not be relied on and updated
5007 by getpid().
5008 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5009 temporarily negative.
5010 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 5011
4efdd8d3
UD
50122003-12-19 Ulrich Drepper <drepper@redhat.com>
5013
5014 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5015 (eintr_source): If ARG != NULL, use pthread_kill.
5016 * tst-eintr1.c: Adjust for this change.
5017 * tst-eintr2.c: Likewise.
5018 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5019 * tst-eintr3.c: New file.
5020 * tst-eintr4.c: New file.
5021
50222003-12-19 Jakub Jelinek <jakub@redhat.com>
5023
5024 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5025 if CANCELSTATE_BITMASK is set.
5026 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5027 Likewise.
5028
5029 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5030 (tests-reverse): Add tst-cancel23.
5031 * tst-cancel22.c: New test.
5032 * tst-cancel23.c: New test.
5033
675620f7
UD
50342003-12-18 Ulrich Drepper <drepper@redhat.com>
5035
5036 * tst-eintr1.c: Better error messages.
5037
5038 * Makefile (tests): Add tst-eintr2.
5039 * tst-eintr2.c: New file.
5040
50412003-12-18 Jakub Jelinek <jakub@redhat.com>
5042
5043 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5044 (CFLAGS-tst-cancelx21.c): Set.
5045 * tst-cancel21.c: New test.
5046 * tst-cancelx21.c: New test.
5047
5048 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5049 comparison operand.
5050 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5051 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5052 * pt-longjmp.c: Include jmpbuf-unwind.h.
5053 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5054 _JMPBUF_UNWINDS. Adjust compared pointers.
5055 * init.c (__pthread_initialize_minimal_internal): Initialize
5056 pd->stackblock_size.
5057 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5058 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5059 * sysdeps/i386/jmpbuf-unwind.h: New file.
5060 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5061 * sysdeps/s390/jmpbuf-unwind.h: New file.
5062 * sysdeps/sh/jmpbuf-unwind.h: New file.
5063 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5064 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 5065 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
5066 (_JMPBUF_CFA_UNWINDS): Remove.
5067 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5068
50692003-12-12 Jakub Jelinek <jakub@redhat.com>
5070
5071 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5072 (CFLAGS-tst-cancelx20.c): Set.
5073 * tst-cancel20.c: New test.
5074 * tst-cancelx20.c: New test.
5075
2d951ab6
UD
50762003-12-17 Ulrich Drepper <drepper@redhat.com>
5077
5078 * init.c (__pthread_initialize_minimal_internal): Don't treat
5079 architectures with separate register stack special here when
5080 computing default stack size.
5081
f8a3a2e7
RM
50822003-12-17 Roland McGrath <roland@redhat.com>
5083
5084 * Makefile (tst-cancelx7-ARGS): New variable.
5085 Reportd by Greg Schafer <gschafer@zip.com.au>.
5086
e796f92f
UD
50872003-12-17 Jakub Jelinek <jakub@redhat.com>
5088
5089 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5090 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5091 (tst-stack3-ENV): Set.
5092 ($(objpfx)tst-stack3-mem): New.
5093 * tst-stack3.c: New test.
5094
092eb73c
UD
50952003-12-10 David Mosberger <davidm@hpl.hp.com>
5096
5097 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5098 Add unwind directives. Drop unused .regstk directive.
5099 (_fini_EPILOG_BEGINS): Add unwind directives.
5100
ff48874d
UD
51012003-12-11 Ulrich Drepper <drepper@redhat.com>
5102
5103 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5104 Assume parameter is a pointer.
5105 (lll_futex_wake): Likewise.
20945457
UD
5106 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5107 Likewise.
5108 (lll_futex_wake): Likewise.
ff48874d
UD
5109 Reported by Boris Hu.
5110 * sysdeps/unix/sysv/linux/unregister-atfork.c
5111 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5112
5113 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5114
1d9d0b80
UD
51152003-12-10 Ulrich Drepper <drepper@redhat.com>
5116
5117 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5118 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5119 __rtld_lock_initialize for ld.so lock.
5120 Patch in part by Adam Li <adam.li@intel.com>.
5121
c776b3d7
UD
51222003-12-02 David Mosberger <davidm@hpl.hp.com>
5123
5124 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5125 in $(gnulib). Also, remove stale comment.
5126
51272003-11-12 David Mosberger <davidm@hpl.hp.com>
5128
5129 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5130 advantage of new syscall stub and optimize accordingly.
5131
5132 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5133 from SYS_futex, to match expectations of
5134 sysdep.h:DO_INLINE_SYSCALL.
5135 (lll_futex_clobbers): Remove.
5136 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5137 (lll_futex_wake): Likewise.
5138 (lll_futex_requeue): Likewise.
5139 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5140 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5141 Jelinek).
5142 (__lll_mutex_lock): Likewise.
5143 (__lll_mutex_cond_lock): Likewise.
5144 (__lll_mutex_timed_lock): Likewise.
5145 (__lll_mutex_unlock): Likewise.
5146 (__lll_mutex_unlock_force): Likewise.
5147
5148 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5149 comes before the include of <sysdep.h>.
5150 (THREAD_SELF_SYSINFO): New macro.
5151 (THREAD_SYSINFO): Likewise.
5152 (INIT_SYSINFO): New macro.
5153 (TLS_INIT_TP): Call INIT_SYSINFO.
5154
5155 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5156
5157 * sysdeps/pthread/createthread.c (create_thread): Use
5158 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5159 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5160 THREAD_SELF_SYSINFO instead of open code.
5161 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5162 (THREAD_SYSINFO): Likewise.
5163
5164 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5165
5166 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5167
57d20ee7
UD
51682003-12-06 Ulrich Drepper <drepper@redhat.com>
5169
5170 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5171 instead of .init. Patch by David Mosberger.
5172
67aeab2a
AJ
51732003-11-30 Thorsten Kukuk <kukuk@suse.de>
5174
5175 * sysdeps/pthread/configure.in: Remove broken declaration in C
5176 cleanup handling check.
5177
8ca203e6
AJ
51782003-11-30 Andreas Jaeger <aj@suse.de>
5179
5180 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5181 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5182 Likewise.
5183
46bf9de7
UD
51842003-11-27 Jakub Jelinek <jakub@redhat.com>
5185
5186 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5187 * pthread_attr_destroy.c: Include shlib-compat.h.
5188 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5189 is set in iattr->flags.
5190 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5191
1d9b73ab
UD
51922003-11-21 Jakub Jelinek <jakub@redhat.com>
5193
5194 * Makefile (distribute): Add tst-cleanup4aux.c.
5195
5196 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5197 include.
5198
53f9084e
UD
51992003-11-21 Ulrich Drepper <drepper@redhat.com>
5200
1d9b73ab
UD
5201 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5202 pthread_cond_signal.
5203
e42a990e
UD
5204 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5205 store mutex address if the current value is ~0l.
5206 * sysdeps/pthread/pthread_cond_timedwait.c
5207 (__pthread_cond_timedwait): Likewise.
5208 * sysdeps/pthread/pthread_cond_broadcast.c
5209 (__pthread_cond_broadcast): Don't use requeue for pshared
5210 condvars.
5211
5212 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5213 (__pthread_cond_wait): Don't store mutex address if the current
5214 value is ~0l.
5215 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5216 (__pthread_cond_timedwait): Likewise.
5217 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5218 (__pthread_cond_broadcast): Don't use requeue for pshared
5219 condvars.
5220
5221 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5222 element with ~0l for pshared condvars, with NULL otherwise.
5223
5224 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5225 (__pthread_cond_wait): Don't store mutex address if the current
5226 value is ~0l.
5227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5228 (__pthread_cond_timedwait): Likewise.
5229 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5230 (__pthread_cond_broadcast): Don't use requeue for pshared
5231 condvars.
5232
bf68b236 5233 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 5234 * tst-cond12.c: New file.
bf68b236 5235 * tst-cond13.c: New file.
53f9084e 5236
9780c971
UD
52372003-11-17 Ulrich Drepper <drepper@redhat.com>
5238
5239 * sysdeps/pthread/configure.in: Make missing forced unwind support
5240 fatal.
5241
74e12fbc
UD
52422003-11-11 Ulrich Drepper <drepper@redhat.com>
5243
5244 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5245
c685b2b0
UD
52462003-11-06 Ulrich Drepper <drepper@redhat.com>
5247
5248 * Makefile: Add magic to clean up correctly.
5249
44e94149
UD
52502003-11-05 Jakub Jelinek <jakub@redhat.com>
5251
5252 * unwind.c (FRAME_LEFT): Define.
5253 (unwind_stop): Handle old style cleanups here.
5254 (__pthread_unwind): Handle old style cleanups only if
5255 !HAVE_FORCED_UNWIND.
5256 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5257 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5258 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5259 ($(objpfx)tst-cleanupx4): Likewise.
5260 * tst-cleanup4.c: New test.
5261 * tst-cleanup4aux.c: New.
5262 * tst-cleanupx4.c: New test.
5263
c28422b5
UD
52642003-11-04 Ulrich Drepper <drepper@redhat.com>
5265
5266 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5267 lll_mutex_*lock macros to skip atomic operations on some archs.
5268
27176677
UD
52692003-11-03 Ulrich Drepper <drepper@redhat.com>
5270
5271 * sysdeps/pthread/tst-timer.c (main): Initialize
5272 sigev2.sigev_value as well.
5273
026395a2
RM
52742003-10-15 Roland McGrath <roland@redhat.com>
5275
5276 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5277 is missing.
5278 * sysdeps/pthread/configure: Regenerated.
5279
fa3cbe3d
UD
52802003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5281
5282 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5283 locking macros. No distinction between normal and mutex locking
5284 anymore.
5285 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5286 Merge bits from lowlevelmutex.S we still need.
5287 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5288 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5289 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5290 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5291 new mutex implementation.
5292 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5293 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5294 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5295 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5296 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5297 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5298 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5299 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5300 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5301 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5302 symbol for entry point to avoid cancellation.
5303
e700a908
UD
53042003-10-07 Jakub Jelinek <jakub@redhat.com>
5305
5306 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5307 changes.
5308 (SAVE_OLDTYPE_0): Fix a typo.
5309
c70a86b6
UD
53102003-10-03 Ulrich Drepper <drepper@redhat.com>
5311
5312 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5313 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5314
134abcb5
UD
53152003-10-02 Ulrich Drepper <drepper@redhat.com>
5316
5317 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5318 correct offset.
5319
b77ca0e8
UD
53202003-10-02 Jakub Jelinek <jakub@redhat.com>
5321
5322 * Makefile (tests): Add tst-cancel19.
5323 * tst-cancel19.c: New test.
5324
4d961dc7
UD
53252003-10-02 Ulrich Drepper <drepper@redhat.com>
5326
5327 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5328 restoring of the old cancellation type.
5329
1d5b20ad 53302003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 5331
1d5b20ad
UD
5332 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5333
4106a403
RM
53342003-09-27 Wolfram Gloger <wg@malloc.de>
5335
4d961dc7 5336 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 5337
fca9d8e4
RM
53382003-09-24 Roland McGrath <roland@redhat.com>
5339
5340 * allocatestack.c (__make_stacks_executable): Don't ignore return
5341 value from _dl_make_stack_executable.
5342
c9c60884
UD
53432003-09-24 Ulrich Drepper <drepper@redhat.com>
5344
69c9fa04
UD
5345 * allocatestack.c (__make_stacks_executable): Also change
5346 permission of the currently unused stacks.
5347
279f1143
UD
5348 * allocatestack.c (change_stack_perm): Split out from
5349 __make_stacks_executable.
5350 (allocate_stack): If the required permission changed between the time
5351 we started preparing the stack and queueing it, change the permission.
5352 (__make_stacks_executable): Call change_stack_perm.
5353
c9c60884
UD
5354 * Makefile: Build tst-execstack-mod locally.
5355 * tst-execstack-mod.c: New file.
5356
54ee14b3
UD
53572003-09-23 Jakub Jelinek <jakub@redhat.com>
5358
5359 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5360
53612003-09-23 Roland McGrath <roland@redhat.com>
5362
5363 * tst-execstack.c: New file.
5364 * Makefile (tests): Add it.
5365 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5366 (LDFLAGS-tst-execstack): New variable.
5367
5368 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5369 whether to use PROT_EXEC for stack mmap.
5370 (__make_stacks_executable): New function.
5371 * pthreadP.h: Declare it.
5372 * init.c (__pthread_initialize_minimal_internal): Set
5373 GL(dl_make_stack_executable_hook) to that.
5374
365b1602
UD
53752003-09-22 Ulrich Drepper <drepper@redhat.com>
5376
5377 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5378 recommendation from AMD re avoidance of lock prefix.
5379
39358e8b
UD
53802003-09-22 Jakub Jelinek <jakub@redhat.com>
5381
5382 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5383 lll_futex_timed_wait instead of lll_futex_wait.
5384 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5385 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5386 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5387 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5388 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5389 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5390 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5391 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5392 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5393 Completely revamp the locking macros. No distinction between
5394 normal and mutex locking anymore.
5395 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5396 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5397 __lll_lock_timedwait): Fix prototypes.
5398 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5399 __lll_lock_timedwait): Likewise.
5400 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5401 macros, add __builtin_expect.
5402 (lll_mutex_timedlock): Likewise. Fix return value.
5403 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5404 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5405 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5406 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5407 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5408 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5409 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5410 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5411
9d08fbbb
UD
54122003-09-22 Ulrich Drepper <drepper@redhat.com>
5413
c0df57e1
UD
5414 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5415 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5416 operation if possible.
5417
9d08fbbb
UD
5418 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5419 like jumping over the lock prefix.
5420
71451de2
UD
54212003-09-21 Ulrich Drepper <drepper@redhat.com>
5422
5423 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5424 locking macros. No distinction between normal and mutex locking
5425 anymore.
3a226d33 5426 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
5427 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5428 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
5429 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5430 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 5431 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 5432 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 5433 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 5434 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
5435 * Makefile (routines): Remove libc-lowlevelmutex.
5436 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
5437 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5438 for new mutex implementation.
5439 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5440 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5441 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5442 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5443 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5444 Likewise.
5445 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5446 Likewise.
5447 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5448 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5449 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5450 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5451 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5452 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5453 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5454 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5455 Likewise.
5456 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5457 Likewise.
5458 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5459 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5461 Don't use requeue.
5462 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 5463 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 5464
8f31c0ef
UD
54652003-09-20 Ulrich Drepper <drepper@redhat.com>
5466
56a4aa98
UD
5467 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5468 in parameters of asm with output parameters.
5469
8f31c0ef
UD
5470 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5471 type of DECR parameter to int.
5472 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5473
8b8074da
UD
54742003-09-18 Jakub Jelinek <jakub@redhat.com>
5475
5476 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5477 guardsize for each thread.
5478
65af7e61
UD
54792003-09-17 Jakub Jelinek <jakub@redhat.com>
5480
9ba96eda
UD
5481 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5482 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5483 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5484
06f6ca90
UD
5485 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5486 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5487 NULL.
5488 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5489 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5490 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5491 (pthread_getaffinity_np): Add hidden_def.
5492
5493 * Makefile (tests): Add tst-attr3.
5494 * tst-attr3.c: New test.
5495
65af7e61
UD
5496 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5497
3402852c
UD
54982003-09-15 Jakub Jelinek <jakub@redhat.com>
5499
5500 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5501 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5502
a4db3439
UD
55032003-09-17 Jakub Jelinek <jakub@redhat.com>
5504
5505 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5506 * tst-align.c: Include tst-stack-align.h.
5507 (tf, do_test): Use TEST_STACK_ALIGN macro.
5508
55092003-09-17 Ulrich Drepper <drepper@redhat.com>
5510
5511 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5512 variable.
5513
92ce4676
UD
55142003-09-16 Ulrich Drepper <drepper@redhat.com>
5515
5516 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5517 stack-related values for the initial thread.
5518
e07bb02a
UD
55192003-09-15 Jakub Jelinek <jakub@redhat.com>
5520
5521 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5522
d087b5dc
UD
55232003-09-11 Ulrich Drepper <drepper@redhat.com>
5524
5525 * pthread_mutex_lock.c: Minor code rearrangements.
5526
7f08f55a
RM
55272003-09-05 Roland McGrath <roland@redhat.com>
5528
5529 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5530 Instead, include ../nptl_db/db_info.c to do its magic.
5531 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5532 (__pthread_pthread_key_2ndlevel_size): Likewise.
5533 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5534 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5535 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5536 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5537 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5538 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5539 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5540 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5541 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5542 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5543 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5544 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5545 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5546 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5547 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5548 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5549 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5550
806e4a4a
UD
55512003-09-08 Ulrich Drepper <drepper@redhat.com>
5552
5553 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5554 of pthread_t to be compatible with LT.
5555 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5556 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5557 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5558 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5559 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5560 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5561 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5562
17f83e56
UD
55632003-09-04 Ulrich Drepper <drepper@redhat.com>
5564
5565 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5566
58e8ec84
UD
55672003-09-04 Jakub Jelinek <jakub@redhat.com>
5568
5569 * unwind-forcedunwind.c: Move to...
5570 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5571 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5572 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5573 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5574 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5575 * unwind.c: Include jmpbuf-unwind.h.
5576 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5577
abf1cf21
JJ
55782003-09-02 Jakub Jelinek <jakub@redhat.com>
5579
4a244f0d
UD
5580 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5581 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5582 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5583 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5584 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5585 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5586 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5587 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5588 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5589 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5590 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5591 function.
5592 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5593 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5594 * Makefile (tests): Add tst-stack2.
5595 * tst-stack2.c: New test.
5596 * tst-stack1.c: Include limits.h and sys/param.h.
5597 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5598
e29ef647
UD
5599 * pthread_condattr_setpshared.c: Include errno.h.
5600 (pthread_condattr_setpshared): Return EINVAL if pshared
5601 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5602
5777d565
UD
5603 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5604 defined symbol for entry point to avoid cancellation.
5605 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5606 Likewise.
5607 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5608 Likewise.
5609 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5610 Likewise.
5611 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5612 Likewise.
5613 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5614 Likewise.
5615 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5616 __close_nocancel, __read_nocancel, __write_nocancel,
5617 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5618 libpthread.so or librt.so, define to corresponding function
5619 without _nocancel suffix.
5620 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5621 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5622 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5623
abf1cf21
JJ
5624 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5625
8348dcc8
UD
56262003-09-02 Ulrich Drepper <drepper@redhat.com>
5627
5628 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 5629 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
5630
5631 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5632 in subsections has a symbol associated with it.
5633
5634 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5635 defined symbol for entry point to avoid cancellation.
5636 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5637
c874a32e
UD
56382003-09-01 Jakub Jelinek <jakub@redhat.com>
5639
5640 * Makefile (tests): Add tst-tls5.
5641 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5642 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5643 ($(objpfx)tst-tls5): New.
5644 ($(objpfx)tst-tls6.out): Likewise.
5645 (tests): Depend on $(objpfx)tst-tls6.out.
5646 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5647 (do_test): Check pthread_self () return value alignment.
5648 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5649 (tf): Check pthread_self () return value alignment.
5650 * tst-tls5.c: New test.
5651 * tst-tls5.h: New.
5652 * tst-tls5mod.c: New.
5653 * tst-tls5moda.c: New.
5654 * tst-tls5modb.c: New.
5655 * tst-tls5modc.c: New.
5656 * tst-tls5modd.c: New.
5657 * tst-tls5mode.c: New.
5658 * tst-tls5modf.c: New.
5659 * tst-tls6.sh: New test.
5660
c503d3dc
UD
5661 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5662 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5663 * init.c (pthread_functions): Initialize them.
5664 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5665 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5666 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5667 pthread_cond_timedwait@@GLIBC_2.3.2.
5668
48614753
JJ
56692003-09-01 Jakub Jelinek <jakub@redhat.com>
5670
56a1b877
JJ
5671 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5672 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5673 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5674 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5675 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5676 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5677
5678 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5679
48614753
JJ
5680 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5681 _POSIX_THREAD_PRIORITY_SCHEDULING.
5682 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5683
28c97261
UD
56842003-08-31 Ulrich Drepper <drepper@redhat.com>
5685
eef80cf8
UD
5686 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5687 nested function, use static inline function from libio.h.
5688 Code by Richard Henderson.
5689
28c97261
UD
5690 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5691 weak.
5692
cd2fbe58
UD
56932003-08-30 Jakub Jelinek <jakub@redhat.com>
5694
5695 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5696 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5697 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5698 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5699 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5700 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5701 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5702 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5703 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5704 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5705 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5706 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5707 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5708 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5709 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5710 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5711 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5712 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5713 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5714 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5715 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5716 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5717 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5718 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5719 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5720 * sysdeps/sparc/tls.h: New file.
5721 * sysdeps/sparc/tcb-offsets.sym: New file.
5722 * sysdeps/sparc/Makefile: New file.
5723 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5724 * init.c [__sparc__] (__NR_set_tid_address): Define.
5725
feda52c0
UD
57262003-08-29 Jakub Jelinek <jakub@redhat.com>
5727
5728 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5729 _IO_release_lock): Define.
5730
7c868816
JJ
57312003-08-29 Jakub Jelinek <jakuB@redhat.com>
5732
0261d33f 5733 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
5734 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5735
68b9e1ae
UD
57362003-08-27 Ulrich Drepper <drepper@redhat.com>
5737
5738 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5739 (__pthread_cleanup_class): Add missing return types of member
5740 functions.
5741
13b3edfc
UD
57422003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
5743
5744 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5745 (lll_mutex_unlock_force): Add memory barrier between store and futex
5746 syscall.
5747
bb606fbe
UD
57482003-08-25 Ulrich Drepper <drepper@redhat.com>
5749
5750 * tst-cancel4.c (do_test): Also unlink tempfname and remove
5751 tempmsg in first loop.
5752
ee4e5a3d
UD
57532003-08-18 Ulrich Drepper <drepper@redhat.com>
5754
5755 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5756 _POSIX_THREAD_PRIORITY_SCHEDULING.
5757 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5758
334fcf2a
UD
57592003-08-07 Jakub Jelinek <jakub@redhat.com>
5760
5761 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5762 (__rtld_lock_default_lock_recursive,
5763 __rtld_lock_default_unlock_recursive): Define.
5764 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5765 __rtld_lock_unlock_recursive): Define using
5766 GL(_dl_rtld_*lock_recursive).
5767 * init.c (__pthread_initialize_minimal_internal): Initialize
5768 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5769 Lock GL(_dl_load_lock) the same number of times as
5770 GL(_dl_load_lock) using non-mt implementation was nested.
5771
5772 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5773 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5774
a30fb2df
UD
57752003-08-06 Jakub Jelinek <jakub@redhat.com>
5776
5777 * tst-cancel17.c (do_test): Make len2 maximum of page size and
5778 PIPE_BUF.
5779
ce0d30a0
JJ
57802003-08-07 Jakub Jelinek <jakub@redhat.com>
5781
5782 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5783
9c988b83
UD
57842003-08-03 Jakub Jelinek <jakub@redhat.com>
5785
5786 * sysdeps/pthread/createthread.c (do_clone): Move error handling
5787 to first syscall error check. Move syscall error check for tkill
5788 into __ASSUME_CLONE_STOPPED #ifdef.
5789
5c5252bd
UD
57902003-08-02 Ulrich Drepper <drepper@redhat.com>
5791
f1205aa7
UD
5792 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5793 is not defined, do explicit synchronization.
5794 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
5795 is not defined also unlock pd->lock for non-debugging case in case
5796 it is necessary.
5797 * pthread_create.c (start_thread): Always get and release pd->lock
5798 if __ASSUME_CLONE_STOPPED is not defined.
5799 (start_thread_debug): Removed. Adjust users.
5800 * allocatestack.c (allocate_stack): Always initialize lock if
5801 __ASSUME_CLONE_STOPPED is not defined.
5802 * Makefile (tests): Add tst-sched1.
5803 * tst-sched1.c: New file.
5804
5c5252bd
UD
5805 * sysdeps/pthread/createthread.c (do_clone): Only use
5806 sched_setschduler and pass correct parameters.
5807
973d66e4
UD
58082003-07-31 Jakub Jelinek <jakub@redhat.com>
5809
5810 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5811 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5812 PTHREAD_STACK_MIN in comments.
5813
d347a4ab
UD
58142003-07-31 Jakub Jelinek <jakub@redhat.com>
5815
5816 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5817 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5818 argument.
5819 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5820 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5821 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5822 (__pthread_cleanup_upto): Fix prototype.
5823 (_longjmp_unwind): Adjust caller.
5824 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5825 Change second argument to const struct pointer.
5826 * tst-sem8.c (main): Remove unused s2 and s3 variables.
5827 * tst-sem9.c (main): Likewise.
5828 * unwind.c: Include string.h for strlen prototype.
5829
1b26e9a5
UD
58302003-07-31 Ulrich Drepper <drepper@redhat.com>
5831
5832 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5833 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5834 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5835 Define HAVE_CMOV.
5836 Patch by Nicholas Miell <nmiell@attbi.com>.
5837
adc12574
UD
58382003-07-30 Jakub Jelinek <jakub@redhat.com>
5839
5840 * init.c (__pthread_initialize_minimal_internal): Initialize
5841 GL(dl_init_static_tls).
5842 * pthreadP.h (__pthread_init_static_tls): New prototype.
5843 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5844 New functions.
5845 * Makefile (tests): Add tst-tls4.
5846 (modules-names): Add tst-tls4moda and tst-tls4modb.
5847 ($(objpfx)tst-tls4): Link against libdl and libpthread.
5848 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5849 tst-tls4modb.so.
5850 * tst-tls4.c: New file.
5851 * tst-tls4moda.c: New file.
5852 * tst-tls4modb.c: New file.
5853
a7f6c66e
RM
58542003-06-19 Daniel Jacobowitz <drow@mvista.com>
5855
5856 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5857 before __timer_dealloc.
5858 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5859 Don't call list_unlink.
5860
172ce013
RM
58612003-07-29 Roland McGrath <roland@redhat.com>
5862
5863 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5864
7b787f85
UD
58652003-07-25 Jakub Jelinek <jakub@redhat.com>
5866
5867 * tst-cancel17.c (do_test): Check if aio_cancel failed.
5868 Don't reuse struct aiocb A if it failed.
5869 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5870 not just one byte, as that does not block.
5871
0e9d6240
UD
58722003-07-22 Jakub Jelinek <jakub@redhat.com>
5873
9d79e037
UD
5874 * sysdeps/pthread/unwind-resume.c: New file.
5875 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5876 unwind-resume in csu subdir.
5877 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5878 exceptions.
5879 (librt-sysdep_routines, librt-shared-only-routines): Add
5880 rt-unwind-resume.
5881 * sysdeps/pthread/rt-unwind-resume.c: New file.
5882 * unwind-forcedunwind.c: New file.
5883 * Makefile (libpthread-routines): Add unwind-forcedunwind.
5884 (libpthread-shared-only-routines): Likewise.
5885 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5886 * pthreadP.h (pthread_cancel_init): New prototype.
5887 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5888
5889 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5890 attr argument const struct pthread_attr *.
5891
0e9d6240
UD
5892 * res.c (__res_state): Return __resp.
5893 * descr.h: Include resolv.h.
5894 (struct pthread): Add res field.
5895 * pthread_create.c: Include resolv.h.
5896 (start_thread): Initialize __resp.
5897 * Makefile (tests): Add tst-_res1.
5898 (module-names): Add tst-_res1mod1, tst-_res1mod2.
5899 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5900 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5901 libpthread.
5902 * tst-_res1.c: New file.
5903 * tst-_res1mod1.c: New file.
5904 * tst-_res1mod2.c: New file.
5905
1a379ea0
UD
59062003-07-21 Ulrich Drepper <drepper@redhat.com>
5907
7e939b21
UD
5908 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5909
1a379ea0
UD
5910 * Makefile: Define various *-no-z-defs variables for test DSOs
5911 which has undefined symbols.
5912
ca86a763
UD
59132003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
5914
5915 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5916 Retry if the stwcx fails to store once_control.
5917
80f536db
UD
59182003-07-20 Ulrich Drepper <drepper@redhat.com>
5919
5920 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5921 pthread_attr_setaffinity.
5922 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5923 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5924 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5925 * pthread_attr_destroy.c: Free cpuset element if allocated.
5926 * pthread_create.c: Pass iattr as additional parameter to
5927 create_thread.
5928 * sysdeps/pthread/createthread.c: If attribute is provided and
5929 a new thread is created with affinity set or scheduling parameters,
5930 start thread with CLONE_STOPPED.
5931 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5932 pthread_attr_setaffinity.
5933 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5934 cpuset element.
5935
73299943
UD
59362003-07-15 Ulrich Drepper <drepper@redhat.com>
5937
5938 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5939
da35d15e
UD
59402003-07-14 Ulrich Drepper <drepper@redhat.com>
5941
5942 * sysdeps/pthread/configure.in: Require CFI directives also for
5943 ppc and s390.
5944
75540d8a
UD
59452003-07-15 Jakub Jelinek <jakub@redhat.com>
5946
5947 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5948 Add cfi directives.
5949
4a17085f
UD
59502003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5951
5952 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5953 CLEANUP_JMP_BUF.
5954 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5955 registers as variables. Call __pthread_mutex_unlock_usercnt.
5956 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5957 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5958 not self pointer in __writer. Compare with TID to determine
5959 deadlocks.
5960 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5961 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5962 Likewise.
5963 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5964 Likewise.
5965 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5966 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5967 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5968 macros also when compiling librt.
5969
6080ecdf
UD
59702003-07-11 Jakub Jelinek <jakub@redhat.com>
5971
5972 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5973 -fasynchronous-unwind-tables.
5974 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5975 (PSEUDO): Add cfi directives.
5976 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5977 Likewise.
5978 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5979 Likewise.
5980
da0c02ee
UD
59812003-07-08 Jakub Jelinek <jakub@redhat.com>
5982
5983 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5984 __pthread_unregister_cancel): Add prototypes and hidden_proto.
5985 * unwind.c (__pthread_unwind_next): Add hidden_def.
5986 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5987 Likewise.
5988 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5989 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5990 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5991 Likewise.
5992 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5993 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5994 Likewise.
5995 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5996 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5997 __pthread_unregister_cancel and __pthread_unwind_next.
5998
57a5ea02
UD
59992003-07-04 Jakub Jelinek <jakub@redhat.com>
6000
6001 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6002 different symbol for the cancellation syscall wrapper and
6003 non-cancellation syscall wrapper.
6004 (PSEUDO_END): Define.
6005
d810b358
UD
60062003-07-05 Richard Henderson <rth@redhat.com>
6007
6008 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6009 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
6010 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6011 return actual return value from the syscall, not 0.
d810b358 6012
db54f488
UD
60132003-07-07 Ulrich Drepper <drepper@redhat.com>
6014
6015 * descr.h (struct pthread): Add pid field.
6016 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6017 (__reclaim_stacks): Likewise.
6018 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6019 also check for PID of the signal source.
6020 (__pthread_initialize_minimal_internal): Also initialize pid field
6021 of initial thread's descriptor.
6022 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6023 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6024 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6025 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6026 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6027
5e497a41
UD
60282003-07-05 Ulrich Drepper <drepper@redhat.com>
6029
6030 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6031 Fix use of parameter.
6032 (__libc_cleanup_pop): Likewise.
6033
86a0c4fa
UD
60342003-07-04 Ulrich Drepper <drepper@redhat.com>
6035
6036 * init.c (sigcancel_handler): Change parameters to match handler
6037 for SA_SIGACTION. Check signal number and code to recognize
6038 invalid invocations.
6039
bdbecaa3
RM
60402003-07-03 Roland McGrath <roland@redhat.com>
6041
6042 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6043 Apply sizeof (struct pthread) bias to r13 value.
6044
56421b23
UD
60452003-07-03 Ulrich Drepper <drepper@redhat.com>
6046
fbd90f6c
UD
6047 * sysdeps/pthread/configure.in: Require CFI directives.
6048
56421b23
UD
6049 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6050 definition.
6051 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6052 libpthread compilation.
6053 * unwind.c (__pthread_unwind): Add hidden_def.
6054 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6055
ca2b4cd7
UD
60562003-07-01 Ulrich Drepper <drepper@redhat.com>
6057
6058 * libc-cancellation.c (__libc_cleanup_routine): Define.
6059 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6060 (__pthread_cleanup_pop): Define.
6061
f036e569
UD
60622003-07-01 Richard Henderson <rth@redhat.com>
6063
6064 * sysdeps/alpha/elf/pt-initfini.c: New file.
6065 * sysdeps/alpha/pthread_spin_lock.S: New file.
6066 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6067 * sysdeps/alpha/pthreaddef.h: New file.
6068 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6069 * sysdeps/alpha/tls.h: New file.
6070 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6071 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6072 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6073 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6074 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6075 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6076 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6077 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6078 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6079 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6080
3b985826
UD
60812003-07-01 Ulrich Drepper <drepper@redhat.com>
6082
6083 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6084 cleanup support and unwind info.
6085
3a4d1e1e
UD
60862003-06-30 Ulrich Drepper <drepper@redhat.com>
6087
6088 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6089 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
6090 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6091 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
6092 * tst-once3.c: Add cleanup handler and check it is called.
6093 * tst-once4.c: Likewise.
6094 * tst-oncex3.c: New file.
6095 * tst-oncex4.c: New file.
6096 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6097
e479cc8e
UD
60982003-06-29 Ulrich Drepper <drepper@redhat.com>
6099
6100 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6101
7d7ff54c
UD
61022003-06-27 Ulrich Drepper <drepper@redhat.com>
6103
483e95d0
UD
6104 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6105 (tf_msgsnd): Likewise.
6106
7d7ff54c
UD
6107 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6108 premature returns a bit more.
6109
7539c7ec
UD
61102003-06-26 Ulrich Drepper <drepper@redhat.com>
6111
6112 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6113 definition to the front.
6114
6115 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6116 the cleanup functions to make the names unique. Fix dwarf opcode
6117 un unwind table.
6118 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6119 functions to make the names unique. Fix CFA offset for two blocks.
6120
0af6a1d9
UD
61212003-06-25 Ulrich Drepper <drepper@redhat.com>
6122
6123 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6124 missing closing braces.
6125 Patch by Christophe Saout <christophe@saout.de>.
6126
eef4a9f3
RM
61272003-06-24 Roland McGrath <roland@redhat.com>
6128
6129 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6130
4165d44d
UD
61312003-06-24 Ulrich Drepper <drepper@redhat.com>
6132
7f8f7b9d
UD
6133 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6134 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6135
4165d44d
UD
6136 * pthreadP.h: Declare __find_thread_by_id.
6137 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6138 * pthread_clock_gettime.c: Allow using other thread's clock.
6139 * pthread_clock_settime.c: Likewise.
6140 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6141 * Makefile: Add rules to build and run tst-clock2.
6142 * tst-clock2.c: New file.
6143
67b78ef9
UD
61442003-06-23 Ulrich Drepper <drepper@redhat.com>
6145
6146 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6147 to use exception-based cleanup handler.
6148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6149
6150 * tst-cond8.c (ch): Announce that we are done.
6151
6152 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6153
6154 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6155 Also test aio_suspend with timeout value.
6156
61623643
UD
61572003-06-22 Ulrich Drepper <drepper@redhat.com>
6158
3a4f2043
UD
6159 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6160 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6161 attribute_hidden.
6162
61623643
UD
6163 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6164 (__pthread_mutex_lock_internal): Likewise.
6165 (__pthread_mutex_unlock_internal): Likewise.
6166 (__pthread_mutex_unlock_usercnt): Declare.
6167 * pthread_mutex_destroy.c: Always fail if used in any way.
6168 * pthread_mutex_init.c: Update comment.
6169 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6170 * pthread_mutex_timedlock.c: Adjust __nusers.
6171 * pthread_mutex_trylock.c: Adjust __nusers.
6172 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6173 and public interfaces are wrapper with pass additional parameter.
6174 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6175 parameter zero.
6176 * tst-mutex8.c: New file.
6177 * Makefile (tests): Add tst-mutex8.
6178 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6179 __pthread_mutex_unlock_usercnt.
6180 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6181 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6183 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6184 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6185 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6186 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6187 Add __nusers.
6188 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6189 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6190 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6191 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6192 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6193
6194 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6195 * pthread_mutex_timedlock.c: Likewise.
6196 * pthread_mutex_trylock.c: Adjust __nusers.
6197 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6198 * tst-mutex9.c: New file.
6199 * Makefile (tests): Add tst-mutex9.
6200 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6201 * sysdeps/ia64/tls.h: Likewise.
6202 * sysdeps/powerpc/tls.h: Likewise.
6203 * sysdeps/s390/tls.h: Likewise.
6204 * sysdeps/sh/tls.h: Likewise.
6205 * sysdeps/x86_64/tls.h: Likewise.
6206 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6207 Change type of __owner.
6208 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6209 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6210 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6211 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6212 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6213
9bdabb94
UD
62142003-06-19 Jakub Jelinek <jakub@redhat.com>
6215
6216 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6217 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6218
6219 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6220 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6221 instead of nr to lll_futex_wake. Only set errno and return -1
6222 if err < 0.
6223
6224 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6225 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6226 return actual return value from the syscall, not 0.
6227
f6c93bd9
UD
62282003-06-18 Ulrich Drepper <drepper@redhat.com>
6229
ca343e73
UD
6230 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6231 find a random value.
6232 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6233 errno==EIDRM.
6234
50441a98
UD
6235 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6236 compat_timer_settime.
6237 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6238 compat_timer_gettime.
6239 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 6240 compat_timer_getoverrun.
50441a98
UD
6241 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6242 compat_timer_delete.
6243
f6c93bd9
UD
6244 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6245 error-checking mutex detect busy mutexes.
6246
047aec8f
UD
62472003-06-17 Ulrich Drepper <drepper@redhat.com>
6248
1d53508d
UD
6249 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6250 Add ax to clobber list.
6251 (lll_mutex_cond_lock): Likewise.
6252 (lll_mutex_unlock): Likewise.
6253 (lll_lock): Likewise.
6254 (lll_unlock): Likewise.
6255
f23b30e2
UD
6256 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6257 * tst-cancel18.c: New file.
6258 * tst-cancelx18.c: New file.
6259
6260 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6261 and tcdrain.
6262
6263 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6264 * tst-cancel17.c: New file.
6265 * tst-cancelx17.c: New file.
6266
6267 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6268 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6269 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6270
047aec8f
UD
6271 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6272
bbde8527
UD
62732003-06-16 Jakub Jelinek <jakub@redhat.com>
6274
6275 * sysdeps/pthread/createthread.c (create_thread): Set
6276 header.multiple_threads unconditionally.
6277 * allocatestack.c (allocate_stack): Likewise.
6278 * descr.h (struct pthread): Add header.multiple_threads
6279 unconditionally.
6280 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6281 Define for librt. #error if neither libpthread, libc nor librt.
6282 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6283 Likewise.
6284 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6285 CDISABLE): Likewise.
6286 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6287 CDISABLE): Likewise.
6288 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6289 CDISABLE): Likewise.
6290 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6291 CDISABLE): Likewise. Access header.multiple_threads outside of
6292 libc and libpthread.
6293 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6294 Likewise.
6295 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6296 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6297
26676450
UD
62982003-06-17 Ulrich Drepper <drepper@redhat.com>
6299
6300 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6301 Also test early cancellation before the thread reaches the cancellation
6302 point.
6303
6304 * Makefile: Compile forward.c with exceptions.
6305
6306 * sysdeps/unix/sysv/linux/sleep.c: New file.
6307
301a6724
UD
63082003-06-16 Ulrich Drepper <drepper@redhat.com>
6309
0e0deb03
UD
6310 * Makefile: Add CFLAGS definition to compile function wrappers
6311 duplicated from libc with exceptions.
6312 * tst-cancel4.c: Also check cancellation handlers.
6313
301a6724
UD
6314 * Makefile: Add rules to build and run tst-cancel16 and
6315 tst-cancelx16. Add missing CFLAGS definitions.
6316 * tst-cancel16.c: New file.
6317 * tst-cancelx16.c: New file.
6318
7a114794
UD
63192003-06-15 Ulrich Drepper <drepper@redhat.com>
6320
452aea84
UD
6321 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6322 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6323 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6324 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6325
7a114794
UD
6326 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6327 (LIBC_CANCEL_RESET): Likewise.
6328 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6329 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6330 librt-cancellation.
6331 (CFLAGS-libcrt-cancellation.c): Define.
6332 * sysdeps/pthread/librt-cancellation.c: New file.
6333 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6334 macros also when compiling librt.
6335 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6336 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6337 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6338 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6339 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6340 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6341 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6342
6343 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6344 compat_timer_create.
6345
8ba1d429
UD
63462003-06-14 Ulrich Drepper <drepper@redhat.com>
6347
cc8fb6f3
UD
6348 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6349
8ba1d429
UD
6350 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6351 __register_atfork.
6352 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6353 Add libc_hidden_def.
6354
d4f100e2
RM
63552003-06-13 Roland McGrath <roland@redhat.com>
6356
6357 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6358 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6359
dd9423a6
UD
63602003-06-11 Ulrich Drepper <drepper@redhat.com>
6361
6362 * allocatestack.c (queue_stack): Always inline.
6363 * ptreadhP.h (__do_cancel): Likewise.
6364
ed24330d
JJ
63652003-06-10 Jakub Jelinek <jakub@redhat.com>
6366
6367 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6368 a typo.
6369
06120d79
UD
63702003-06-10 Ulrich Drepper <drepper@redhat.com>
6371
6372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6373 (__pthread_cond_signal): Remove incorrect second addition for
6374 cond_lock!=0.
6375
b1720346
UD
63762003-06-09 Ulrich Drepper <drepper@redhat.com>
6377
5b318f85
UD
6378 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6379 (__pthread_cond_signal): Use correct futex pointer in
6380 __lll_mutex_lock_wait call.
6381
b1720346
UD
6382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6383 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6384
3e36c37d
UD
63852003-06-08 Ulrich Drepper <drepper@redhat.com>
6386
ecf7955d
UD
6387 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6388 cancelable.
ed24330d 6389 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
6390 Likewise.
6391
3e36c37d
UD
6392 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6393 hand-written CFI generation code. Since ENTRY/END also initiated
6394 CFI frames this caused two CFI sets to be generated.
6395
7726edc2
UD
63962003-06-07 Ulrich Drepper <drepper@redhat.com>
6397
6398 * cleanup_routine.c: New file.
6399 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6400 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6401 cleanup handling.
6402 * Makefile (libpthread-routines): Add cleanup_routine.
6403 Add more CFLAGS variables to compile with exceptions. Add comments
6404 why which file needs unwind tables.
6405 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6406 tests.
6407 * tst-cancelx1.c: New file.
6408 * tst-cancelx2.c: New file.
6409 * tst-cancelx3.c: New file.
6410 * tst-cancelx4.c: New file.
6411 * tst-cancelx5.c: New file.
6412 * tst-cancelx6.c: New file.
6413 * tst-cancelx7.c: New file.
6414 * tst-cancelx8.c: New file.
6415 * tst-cancelx9.c: New file.
6416 * tst-cancelx10.c: New file.
6417 * tst-cancelx11.c: New file.
6418 * tst-cancelx12.c: New file.
6419 * tst-cancelx13.c: New file.
6420 * tst-cancelx14.c: New file.
6421 * tst-cancelx15.c: New file.
6422 * tst-cleanupx0.c: New file.
6423 * tst-cleanupx0.expect: New file.
6424 * tst-cleanupx1.c: New file.
6425 * tst-cleanupx2.c: New file.
6426 * tst-cleanupx3.c: New file.
6427
6428 * tst-cleanup0.c: Make standard compliant.
6429 * tst-cleanup1.c: Likewise.
6430
6431 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6432 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6433 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6434 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6435 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6436 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6437 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6438 CLEANUP_JMP_BUF.
6439 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6440 * tst-cancel12.c: New file.
6441 * tst-cancel13.c: New file.
6442 * tst-cancel14.c: New file.
6443 * tst-cancel15.c: New file.
6444 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6445 and tst-cancel15.
6446
6447 * tst-cancel1.c: Add some comments.
6448
6449 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6450 timeout correctly.
6451
7a8a8e21
UD
64522003-06-06 Ulrich Drepper <drepper@redhat.com>
6453
6454 * Makefile (CFLAGS-pthread_cancel.c): Define.
6455
4ad0bbf4
UD
64562003-06-05 Ulrich Drepper <drepper@redhat.com>
6457
6458 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6459 Change type of __writer element to int.
6460 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6461 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6462 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6463 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6464 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6465 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6466 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6467 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6468 Compare with TID to determine deadlocks.
6469 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6470 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6471 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6472 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6473 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6474 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6475 Likewise.
6476 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6477 Likewise.
6478 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6479 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6480 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6481 Likewise.
6482 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6483 Likewise.
6484 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6485 * Makefile (tests): Add tst-rwlock12.
6486 * tst-rwlock12.c: New file.
6487
332faa96
JJ
64882003-06-05 Jakub Jelinek <jakub@redhat.com>
6489
6490 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6491 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6492 Remove bogus hidden_proto.
6493 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6494 Likewise.
6495 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6496 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6497 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6498 ___lll_mutex_timedlock): Likewise.
6499
29d9e2fd
UD
65002003-06-04 Ulrich Drepper <drepper@redhat.com>
6501
6502 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6503 (__pthread_cond_signal): Add some code to eventually handle
6504 cond_lock!=0.
6505
6f1acb30
UD
65062003-06-01 Ulrich Drepper <drepper@redhat.com>
6507
6508 * Makefile (tests): Add tst-exec4.
6509 (tst-exec4-ARGS): Define.
6510 * tst-exec4.c: New file.
6511
49b65043
UD
65122003-05-31 Ulrich Drepper <drepper@redhat.com>
6513
31195be2
UD
6514 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6515 Also fail if tv_nsec < 0.
6516 (__lll_timedwait_tid): Likewise.
6517 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6518 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6519 Likewise.
6520 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6521 Likewise.
6522 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6523 Likewise.
6524 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6525 Likewise.
80b54217
UD
6526 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6527 Likewise.
6528 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6529 Likewise.
31195be2 6530
dcfc8224
UD
6531 * Makefile (tests): Add tst-sem8 and tst-sem9.
6532 * tst-sem8.c: New file.
6533 * tst-sem9.c: New file.
6534 * sem_open.c: Fix creation of in_use record if the file exists but
6535 no internal record.
6536
49b65043
UD
6537 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6538 definitions.
6539
6540 * sysdeps/pthread/timer_create.c (timer_create): In case
6541 evp==NULL, assign timer ID to sival_ptr.
6542
6543 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6544 struct pthread_unwind_buf *.
6545 (struct pthread): Likewise for cleanup_jmp_buf element.
6546
6547 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6548 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6549 * unwind.c (__pthread_unwind_next): Likewise.
6550
50794a45
UD
65512003-05-30 Ulrich Drepper <drepper@redhat.com>
6552
5d4f57bd
UD
6553 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6554 (lll_futex_timed_wait): Use int for futex value parameter.
6555 (lll_futex_wake): Likewise.
6556 (lll_futex_requeue): Likewise.
6557
6558 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6559 Replace one memory operation with one register operation.
6560
6561 * tst-join4.c (do_test): Fix error message.
6562
7ab7ea33
UD
6563 * tst-rwlock6.c (do_test): Use correct format specifier.
6564
6565 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6566 (__lll_mutex_lock_wait): Replace one memory operation with one
6567 register operation.
6568 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6569 (__lll_mutex_lock_wait): Likewise.
6570
50794a45
UD
6571 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6572 (__lll_mutex_cond_lock): Add one to value parameter of
6573 __lll_lock_wait to reflect reality in the futex syscall.
6574 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6575 (lll_mutex_cond_lock): Likewise.
6576
5a70784e
JJ
65772003-05-30 Jakub Jelinek <jakub@redhat.com>
6578
6579 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6580 New function.
6581 (lll_mutex_cond_lock): Define.
6582
e7c5ac68
UD
65832003-05-29 Ulrich Drepper <drepper@redhat.com>
6584
586d1748
UD
6585 * Makefile (tests): Add tst-signal6.
6586 * tst-signal6.c: New file.
6587
b8ba4a27
UD
6588 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6589 (__lll_mutex_unlock_force): New function
6590 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6591
65d46efe
UD
6592 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6593 (__lll_mutex_unlock_force): New function.
6594 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6595
6596 * tst-rwlock7.c (do_test): Use correct format specifier.
6597
e7c5ac68
UD
6598 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6599 Find break parameter in correct asm argument.
6600
284bdc42
UD
66012003-05-27 Jakub Jelinek <jakub@redhat.com>
6602
6603 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6604 Remove out4.
6605 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6606 error occured.
6607 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6608 Add __mutex.
6609 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6610 lll_futex_requeue, lll_mutex_unlock_force): Define.
6611
e7c5ac68
UD
66122003-05-30 Jakub Jelinek <jakub@redhat.com>
6613
6614 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6615 (pthread_cond_t): Add __mutex.
6616 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6617 lll_futex_requeue, lll_mutex_unlock_force): Define.
6618
ea2630c6
UD
66192003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6620
6621 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6622 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 6623 Add __mutex field.
ea2630c6
UD
6624 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6625 Define.
6626 (lll_futex_wait, lll_futex_wake): Define.
6627 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6628 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6629 FUTEX_REQUEUE instead of FUTEX_WAIT.
6630 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6631 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6632 mutex which was used in condvar structure. Call
6633 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6634 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6635
6636 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6637 include tcb-offsets.h. Read wakeup value in locked region.
6638 Use the value of gbr register as THREAD_ID.
6639 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6640 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6641 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6642
6643 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6644 macros.
6645
5a77f150
UD
66462003-05-28 Ulrich Drepper <drepper@redhat.com>
6647
6648 * sysdeps/pthread/pthread_cond_broadcast.c
6649 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6650
7661d9f7
UD
66512003-05-26 Ulrich Drepper <drepper@redhat.com>
6652
6653 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6654 typo in register name.
6655 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6656 correctly. Actually use requeue. Little optimization.
6657 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6658 mutex address early. Handle cancellation state as 32-bit value.
6659 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6660 Remove unnecessary label.
6661
69431c9a
UD
66622003-05-25 Ulrich Drepper <drepper@redhat.com>
6663
6664 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6665 instead of FUTEX_WAIT.
6666 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6667 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6668 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6669 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6670 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6671 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6672 used in condvar structure. Call __pthread_mutex_cond_lock instead
6673 of __pthread_mutex_lock_internal.
6674 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6675 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6676 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6677 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6678 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6679 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6680 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6681 Add pthread_mutex_cond_lock.
6682 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6683 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6684 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6685 lll_mutex_cond_lock.
6686 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6687 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 6688 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 6689 Add __mutex field.
248a3490 6690 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
6691 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6692
6693 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6694 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6695
6696 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6697 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6698 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6699 macro don't define aliases.
6700
6701 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6702 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6703 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6704 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6705 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6706 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6707 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6708 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6709 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6710
fddfebbd
UD
67112003-05-17 Ulrich Drepper <drepper@redhat.com>
6712
6713 * sem_open.c: Fix one endless loop. Implement correct semantics
6714 wrt opening the same semaphore more then once.
6715 * sem_close.c: Adjust for sem_open change.
6716 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6717 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6718 * Makefile (tests): Add tst-sem7.
6719 * tst-sem7.c: New file.
6720
1eefffb0
RM
67212003-05-16 Roland McGrath <roland@redhat.com>
6722
6723 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6724 uninitialized variable braino.
6725
6e66dc78
UD
67262003-05-16 Ulrich Drepper <drepper@redhat.com>
6727
23ae6451
UD
6728 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6729 test for syscall availability.
6730
6731 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6732 __no_posix_timers to -1 if the syscalls don't exist.
6733
7ac5b8e2
UD
6734 * pthread_join.c (pthread_join): Set tid field of the joined
6735 thread to -1. This isn't necessary but helps to recognize some
6736 error conditions with almost no cost.
6737
6738 * allocatestack.c (FREE_P): Also negative values indicate an
6739 unused stack.
6740
6e66dc78
UD
6741 * unwind.c: Include <unistd.h>.
6742
855dba3c
UD
67432003-05-14 Ulrich Drepper <drepper@redhat.com>
6744
6745 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6746
81f3ac4c
UD
67472003-05-14 Jakub Jelinek <jakub@redhat.com>
6748
6749 * Makefile (crti-objs, crtn-objs): New variables.
6750 (omit-deps, extra-objs): Add crtn.
6751 ($(objpfx)libpthread.so): Depend on both crti and crtn
6752 and links to them in multidir.
6753 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6754
7158eae4
UD
67552003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
6756
6757 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6758 (lll_mutex_unlock): Use atomic_exchange_rel.
6759
edf205d5
UD
67602003-05-11 Ulrich Drepper <drepper@redhat.com>
6761
6762 * cond-perf.c (cons): Add missing locking around setting of alldone.
6763
a3f979a7
UD
67642003-05-10 Ulrich Drepper <drepper@redhat.com>
6765
6766 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6767 related macros.
6768 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6769
880867a4
UD
67702003-05-09 Ulrich Drepper <drepper@redhat.com>
6771
949ec764
UD
6772 * tst-sem6.c: New file.
6773 * Makefile (tests): Add tst-sem6.
6774
6775 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6776 Use atomic_exchange_rel instead of atomic_exchange.
6777 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6778 Likewise.
6779
6780 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6781 code for lll_futex_wait and lll_futex_wake in static apps. Use
6782 vsyscall is possible.
6783
6784 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6785 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6786 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6787 pthread_setaffinity_np.
6788 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6789 and pthread_setaffinity_np.
6790 * Makefile (libpthread-routines): Add pthread_getaffinity and
6791 pthread_setaffinity.
6792
880867a4
UD
6793 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6794 use it in case mmap to allocate the stack fails.
6795 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6796 ARCH_MAP_FLAGS here.
6797 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6798 ARCH_RETRY_MMAP.
6799
92d83c72
UD
68002003-05-08 Ulrich Drepper <drepper@redhat.com>
6801
6802 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6803 handler implementation. It is now lockless in fork().
6804 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6805 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6806 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
6807 declare the __fork_*_lists.
6808 (struct fork_handler): Include pointers to all three functions.
6809 Add next, refcntr and need_signal elements.
6810 (__fork_handlers): New declaration.
6811 (__register_atfork_malloc): Remove declaration.
6812 (HAVE_register_atfork_malloc): Remove definition.
6813 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6814 __pthread_child_handler variable.
6815 (__libc_pthread_init): Use __register_atfork instead of explicitly
6816 adding to the list.
6817 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6818 and lll_futex_wake.
6819 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6820
6821 * unwind.c (unwind_cleanup): Print error message and then abort. This
6822 function must never be reached.
6823
6824 * cond-perf.c: New file.
6825
be4d8038
UD
68262003-05-05 Ulrich Drepper <drepper@redhat.com>
6827
6828 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6829
c6696b79
RM
68302003-05-04 Roland McGrath <roland@redhat.com>
6831
6832 * Makefile ($(objpfx)../libc.so): New target.
6833
7da168bf
UD
68342003-05-02 Ulrich Drepper <drepper@redhat.com>
6835
6836 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6837 (pthread_condattr_t): Size is only an int, don't use long for
6838 alignment.
6839 (pthread_mutexattr_t): Likewise.
7da168bf
UD
6840 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6841 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6842 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6843
9a7178d6
UD
68442003-05-01 Ulrich Drepper <drepper@redhat.com>
6845
6846 * sysdeps/i386/tls.h: Define THREAD_ID.
6847 * sysdeps/ia64/tls.h: Likewise.
6848 * sysdeps/powerpc/tls.h: Likewise.
6849 * sysdeps/s390/tls.h: Likewise.
6850 * sysdeps/sh/tls.h: Likewise.
6851 * sysdeps/x86_64/tls.h: Likewise.
6852 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6853 record ownership.
6854 * pthread_mutex_timedlock.c: Likewise.
6855 * pthread_mutex_trylock.c: Likewise.
6856 * pthread_mutex_unlock.c: Likewise.
6857 * pthread_rwlock_trywrlock.c: Likewise.
6858 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6859 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6860 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6861 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6862
6863 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6864 flag.
6865
a234e27d
UD
68662003-04-29 Jakub Jelinek <jakub@redhat.com>
6867
6868 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6869 (__SIZEOF_PTHREAD_COND_T): Define to 48.
6870 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6871 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6872 Make __align long long instead of long.
6873 (pthread_rwlock_t): Formatting.
6874 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6875 (pthread_rwlock_t): Formatting.
6876 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6877 (pthread_cond_t): Make __align long long instead of long.
6878 (pthread_rwlock_t): Move __flags field to the same position as in
6879 linuxthreads.
6880
f025c136
UD
68812003-04-30 Ulrich Drepper <drepper@redhat.com>
6882
6883 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6884 * tst-rwlock7.c (do_test): Likewise.
6885
7531ab9e
RM
68862003-04-26 Roland McGrath <roland@redhat.com>
6887
6888 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6889
299601a1
UD
68902003-04-22 Jakub Jelinek <jakub@redhat.com>
6891
299601a1
UD
6892 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6893 sizeof (struct pthread).
6894 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 6895 1 struct pthread.
299601a1
UD
6896 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6897 to 0.
6898 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6899 struct pthread.
6900 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6901 to 32-bit bytes.
6902 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6903 tcbp.
6904 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6905 unneccessarily.
6906 (NO_TLS_OFFSET): Define.
299601a1
UD
6907 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6908 add TLS_TCB_SIZE unnecessarily.
299601a1 6909
950094f8
RM
69102003-04-22 Roland McGrath <roland@redhat.com>
6911
6912 * Makeconfig (shared-thread-library): Reverse link order to work
6913 around linker bug.
6914
dc2f6455
UD
69152003-04-22 Ulrich Drepper <drepper@redhat.com>
6916
6917 * semaphore.h: Fix typo in comment.
6918
e7608d77
UD
69192003-04-21 Ulrich Drepper <drepper@redhat.com>
6920
6a87ee19
UD
6921 * sysdeps/pthread/sigfillset.c: New file.
6922
e7608d77
UD
6923 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6924 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6925 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6926 * sysdeps/pthread/sigaction.c: Likewise.
6927 * sysdeps/pthread/sigprocmask.c: New file.
6928 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6929 __SIGRTMIN+1.
6930 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6931 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
6932 in this case.
6933
0b3df49e
UD
69342003-04-19 Ulrich Drepper <drepper@redhat.com>
6935
58a7a325
UD
6936 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6937 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6938
0b3df49e
UD
6939 * sysdeps/unix/sysv/linux/unregister-atfork.c
6940 (__unregister_atfork): Don't free memory not allocated dynamically.
6941
6942 * semaphore.h: Remove __THROW marker from cancellation points.
6943 * nptl/sysdeps/pthread/pthread.h: Likewise.
6944
7d74651e
UD
69452003-04-18 Ulrich Drepper <drepper@redhat.com>
6946
76a67697
UD
6947 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6948 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
6949 __THROW.
6950
dd9d6538
JJ
69512003-04-16 Jakub Jelinek <jakub@redhat.com>
6952
6953 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6954
4ab6f47c
RM
69552003-04-15 Roland McGrath <roland@redhat.com>
6956
6957 * forward.c (__pthread_unwind): Tweak to avoid warning.
6958
162434a6
UD
69592003-04-15 Ulrich Drepper <drepper@redhat.com>
6960
6961 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6962
35909161
UD
69632003-04-14 Ulrich Drepper <drepper@redhat.com>
6964
18ddd3aa 6965 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
6966 overflow CFA advance instructions.
6967 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6968
18a8e730
UD
69692003-04-14 Jakub Jelinek <jakub@redhat.com>
6970
bd4f43b4
UD
6971 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6972 * sysdeps/i386/pthread_spin_lock.c: Likewise.
6973 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
6974 defined.
6975
18a8e730
UD
6976 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6977 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6979 DW_CFA_advance_loc for .Laddl-.Lsubl.
6980
08c765fa
UD
69812003-04-13 Ulrich Drepper <drepper@redhat.com>
6982
18a8e730
UD
6983 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6984 position-independent unwind data for static libraries.
6985 Add missing unwind info. Add comments.
6986
ad2be852
UD
6987 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6988 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6989 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
6990 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6991
177d1ad3
UD
69922003-04-12 Ulrich Drepper <drepper@redhat.com>
6993
08c765fa
UD
6994 * Makefile: Make sure all cancellation points are compiled with
6995 exception and asynchronous unwind tables.
6996
177d1ad3
UD
6997 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6998 which mishandles loading of global object addresses in PIC.
6999 (THREAD_SETMEM_NC): Likewise.
7000
09d65ff3
UD
70012003-04-11 Ulrich Drepper <drepper@redhat.com>
7002
7003 * pthread.h: Define new data structure for cleanup buffer. Declare
7004 new cleanup handler interfaces.
7005 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7006 (struct pthread): Add cleanup_jmp_buf pointer. Define
7007 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7008 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7009 it. Declare old cleanup handler installation functions.
7010 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7011 handling.
7012 * cleanup_defer.c: Likewise.
7013 * cleanup_compat.c: New file. Old cleanup code.
7014 * cleanup_def_compat.c: New file. Old cleanup code.
7015 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7016 if own thread descriptor.
7017 * unwind.c: New file.
7018 * forward.c: Add __pthread_unwind.
7019 * init.c (pthread_functions): Add __pthread_unwind.
7020 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7021 Add ptr___pthread_unwind.
7022 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7023 and unwind function.
7024 * Makefile (libpthread-routines): Add cleanup_compat,
7025 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7026 table generation if necessary.
7027 * version.c: Record whether unwind support is compiled in.
7028 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7029 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7030 handler interfaces.
7031 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7032 complication to generate unwind information for syscall wrappers.
68107ec0 7033 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
7034 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7035 __cleanup_fct_attribute.
7036
7037 * Makefile: Add rules to build and run tst-cleanup0.
7038 * tst-cleanup0.c: New file.
7039 * tst-cleanup0.expect: New file.
7040
7041 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7042 caller. Optimize to avoid often unecessary local variable.
7043
0dc44b51
RM
70442003-04-11 Roland McGrath <roland@redhat.com>
7045
7046 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7047 sets variable `multidir'; include that.
7048 (generated): Add it.
7049 ($(objpfx)$(multidir)/crti.o): New target.
7050 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7051
84a80719
UD
70522003-04-11 Ulrich Drepper <drepper@redhat.com>
7053
7054 * tst-attr2.c (do_test): Add cast to avoid warning.
7055 * tst-mutex4.c (do_test): Likewise.
7056
88ff4759
UD
70572003-04-10 Ulrich Drepper <drepper@redhat.com>
7058
7059 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7060 in child.
7061
b2041097
UD
70622003-04-09 Ulrich Drepper <drepper@redhat.com>
7063
7064 * Makefile (tests): Add tst-detach1.
7065 * tst-detach1.c: New file.
7066
f9657e88
UD
70672003-04-08 Ulrich Drepper <drepper@redhat.com>
7068
9afe4964
UD
7069 * sysdeps/pthread/pthread.h: Remove duplicate
7070 pthread_cleanup_{push,pop} definitions.
7071
f9657e88
UD
7072 * tst-barrier2.c: Eliminate warnings.
7073 * tst-cancel4.c: Likewise.
7074 * tst-cond4.c: Likewise.
7075 * tst-cond6.c: Likewise.
7076 * tst-detach1.c: Likewise.
7077 * tst-rwlock4.c: Likewise.
7078 * tst-rwlock6.c: Likewise.
7079 * tst-rwlock7.c: Likewise.
7080 * tst-sem3.c: Likewise.
7081 * tst-spin2.c: Likewise.
7082 * tst-umask1.c: Likewise.
7083
69b35e86
UD
70842003-04-07 Ulrich Drepper <drepper@redhat.com>
7085
7086 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7087
c70ad7d7
UD
70882003-04-06 Ulrich Drepper <drepper@redhat.com>
7089
7090 * descr.h (struct pthread): Move cancelhandling member to the front.
7091
54e0138f
UD
70922003-04-05 Ulrich Drepper <drepper@redhat.com>
7093
7094 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7095 malloc_parent, and malloc_child statically.
7096 (__register_atfork_malloc): New function.
7097 (free_mem): Don't free any of the malloc_* variables on the list.
7098 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7099 Define HAVE_register_atfork_malloc.
7100
b22d701b
UD
71012003-04-04 Ulrich Drepper <drepper@redhat.com>
7102
7103 * sysdeps/pthread/createthread.c (create_thread): Add some more
7104 comments explaining when to set multiple_threads and when not.
7105
7106 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7107 THREAD_ATOMIC_BIT_SET if not already defined.
7108 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7109 THREAD_ATOMIC_BIT_SET:
7110 * sysdeps/x86_64/tls.h: Likewise.
7111 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7112 THREAD_ATOMIC_CMPXCHG_VAL.
7113 (_pthread_cleanup_pop_restore): Likewise.
7114 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7115 (__pthread_enable_asynccancel_2): Likewise.
7116 (__pthread_disable_asynccancel): Likewise.
7117 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7118 (__libc_disable_asynccancel): Likewise.
7119 * init.c (sigcancel_handler): Likewise.
7120 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7121 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7122
86246935
UD
71232003-04-03 Ulrich Drepper <drepper@redhat.com>
7124
7125 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7126 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7127 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7128 * Makefile (tests): Add tst-cancel11.
7129 * tst-cancel11.c: New file.
7130
6b4686a5
UD
71312003-04-01 Ulrich Drepper <drepper@redhat.com>
7132
7133 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7134 round, not the first. Use specific_used flag instead of local
7135 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7136 (__free_tcb): Don't call deallocate_tsd here.
7137 (start_thread): Call deallocate_tsd here.
7138 * pthread_setspecific.c: Set specific_used flag really only when
7139 needed.
0d73a73b 7140 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 7141 * tst-tsd3.c: New file.
0d73a73b 7142 * tst-tsd4.c: New file.
6b4686a5 7143
42b2395d
UD
71442003-03-31 Ulrich Drepper <drepper@redhat.com>
7145
211d90c5
UD
7146 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7147 Use atomic_exchange_and_add instead of __lll_add.
7148 (__lll_mutex_timedlock): Likewise.
7149 Patch by Ian Wienand.
7150
71512003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7152
7153 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7154 (SINGLE_THREAD_P): Fix typo.
7155 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7156
71572003-03-31 Ulrich Drepper <drepper@redhat.com>
7158
7159 * Makefile (tests): Add tst-align.
7160 * tst-align.c: New file.
7161 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 7162
42b2395d
UD
7163 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7164 function correctly.
7165
211d90c5
UD
7166 * tst-tsd2.c: Add casts to avoid warnings.
7167
163b180f
UD
71682003-03-30 Ulrich Drepper <drepper@redhat.com>
7169
7170 * descr.h (struct pthread): Move most often used elements to the front.
7171
ea473bad
UD
71722003-03-29 Ulrich Drepper <drepper@redhat.com>
7173
7174 * Makefile (libpthread-routines): Add pthread_atfork.
7175 (libpthread-static-only-routines): Add pthread_atfork.
7176
dd731d53
UD
71772003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7178
7179 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7180 of TLS_DTV_AT_TP.
7181 (INSTALL_DTV): Add parens.
7182 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7183 Use passed descr instead of THREAD_SELF.
7184 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7185 (__lll_mutex_timedlock_wait): Correct expected value after
7186 spurious wakeup.
7187 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7188 Release lock before waking up the waiters.
7189 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7190 criteria. Reorderstruct passed to cleanup handler. Fix
7191 handling of cancellation and failung pthread_mutex_unlock call.
7192 Use __pthread_enable_asynccancel_2 instead of
7193 __pthread_enable_asynccancel.
7194 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7195 Return result of lock re-get if it fails.
7196 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7197 for __pthread_cleanup_push.
7198 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7199 completely broken rwlock implementation.
7200 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7201 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7202 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7203 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7204 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7205 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7206 versioned_symbol macro.
7207 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7208 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7209
c75d02f0
UD
72102003-03-27 Ulrich Drepper <drepper@redhat.com>
7211
5f5004df
UD
7212 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7213 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7214 and __helper_tid.
7215 (struct timer): Remove th and bar field.
7216 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7217 debugging code. Create only one helper thread.
7218 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7219 helper thread.
7220 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7221 Renamed. Define statically. Use thread info from siginfo.
7222 (__helper_once): New variable.
7223 (__helper_tid): New variable.
7224 (__reset_helper_control): New function.
7225 (__start_helper_thread): New function.
7226
18d009ca
UD
7227 * pthread_create.c (start_thread): Don't use setjmp inside
7228 __builtin_expect to work around gcc bug.
7229
c75d02f0
UD
7230 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7231 timer_delete syscall fails, but not with ENOSYS, set
7232 __no_posix_timers.
7233
7234 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7235 (timer_settime): Fix typo.
28cf3058
UD
7236 * sysdeps/unix/sysv/linux/timer_getoverr.c
7237 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 7238
049ac259
JJ
72392003-03-27 Jakub Jelinek <jakub@redhat.com>
7240
7241 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7242 offset of cleanupbuf.__prev.
7243
f93d39dd
JJ
72442003-03-26 Jakub Jelinek <jakub@redhat.com>
7245
7246 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7247 of included file.
7248
f064e4c5
UD
72492003-03-26 Ulrich Drepper <drepper@redhat.com>
7250
7251 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7252 NULL provide default definition to syscall.
7253
83e886a3
RM
72542003-03-25 Roland McGrath <roland@redhat.com>
7255
7256 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7257 (timer_id2ptr): Fix typo.
7258
09402f5b
UD
72592003-03-25 Ulrich Drepper <drepper@redhat.com>
7260
7261 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7262 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7263 * sysdeps/ia64/pthreaddef.h: Likewise.
7264 * sysdeps/powerpc/pthreaddef.h: Likewise.
7265 * sysdeps/s390/pthreaddef.h: Likewise.
7266 * sysdeps/sh/pthreaddef.h: Likewise.
7267 * sysdeps/x86_64/pthreaddef.h: Likewise.
7268 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7269 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7270 being changed.
7271 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7272 SIGTIMER is not unblocked.
7273 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7274 RT signal taken.
7275 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7276 be send.
7277 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7278 pass pointer through as ID.
7279 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7280 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7281 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7282 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7283 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7284 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7285 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7286 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7287 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7288 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7289 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7290 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7291 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7292 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7293 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7294 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7295 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7296 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7297 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7298 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7299 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7300 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7301 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7302 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7303 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7304 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7305 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7306 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7307 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7308 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7309 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7310 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7311 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7312
7313 * pthreadP.h: Remove FRAME_LEFT definition.
7314 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7315 already left frame. Programs which have this problem are not POSIX
7316 compliant.
7317 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7318
5e826ab5
UD
73192003-03-24 Ulrich Drepper <drepper@redhat.com>
7320
7321 * sysdeps/pthread/tst-timer.c: Check return values of the
7322 functions we test.
7323
b910f788
RM
73242003-03-23 Roland McGrath <roland@redhat.com>
7325
3045a1fe
RM
7326 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7327 * tst-tls3mod.c: Likewise.
7328 * tst-tls1.c: Likewise.
7329 * tst-tls2.c: Likewise.
7330
85047fe3
RM
7331 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7332 undefined behavior.
7333
b910f788
RM
7334 * tst-join5.c (tf1, tf2): Add a cast.
7335
7336 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7337
7338 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7339 Don't test anything.
7340 * tst-cond4.c: Likewise.
7341 * tst-cond6.c: Likewise.
7342 * tst-flock2.c: Likewise.
7343 * tst-mutex4.c: Likewise.
7344 * tst-rwlock4.c: Likewise.
7345 * tst-signal1.c: Likewise.
7346 * tst-spin2.c: Likewise.
7347 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7348
7349 * tst-mutex4.c: Use test-skeleton.c.
7350 * tst-spin2.c: Likewise.
7351 * tst-sysconf.c: Likewise.
7352 * tst-barrier2.c: Likewise.
7353 * tst-cond4.c: Likewise.
7354 * tst-cond6.c: Likewise.
7355 * tst-rwlock4.c: Likewise.
7356 * tst-unload.c: Likewise.
7357 * tst-flock2.c (do_test): Use return instead of exit.
7358
4baa087a
RM
73592003-03-22 Jakub Jelinek <jakub@redhat.com>
7360
7361 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7362
5a3ab2fc
UD
73632003-03-21 Ulrich Drepper <drepper@redhat.com>
7364
9f07eae2
UD
7365 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7366 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7367 instead of __lll_compare_and_swap.
7368 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7369 Likewise.
7370 Removed definition if __lll_compare_and_swap.
7371
5a3ab2fc
UD
7372 * cancellation.c: Adjust for new form of compare&exchange macros.
7373 * cleanup_defer.c: Likewise.
7374 * init.c: Likewise.
7375 * libc-cancellation.c: Likewise.
7376 * old_pthread_cond_broadcast.c: Likewise.
7377 * old_pthread_cond_signal.c: Likewise.
7378 * old_pthread_cond_timedwait.c: Likewise.
7379 * old_pthread_cond_wait.c: Likewise.
7380 * pthread_cancel.c: Likewise.
7381 * pthread_create.c: Likewise.
7382 * pthread_detach.c: Likewise.
7383 * pthread_join.c: Likewise.
7384 * pthread_key_delete.c: Likewise.
7385 * pthread_setcancelstate.c: Likewise.
7386 * pthread_setcanceltype.c: Likewise.
7387 * pthread_timedjoin.c: Likewise.
7388 * pthread_tryjoin.c: Likewise.
7389 * sysdeps/pthread/createthread.c: Likewise.
7390
b1aea098
UD
73912003-03-20 Ulrich Drepper <drepper@redhat.com>
7392
7393 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 7394 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
7395 definitions. Replace uses with calls to atomic_* functions.
7396 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7397 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7398 __lll_test_and_set calls with atomic_exchange_and_add and
7399 atomic_exchange calls respectively.
7400 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7401 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7402 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7403 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7404 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7405 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7406 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7407
7408 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7409 returns the old value.
7410
100a7100
RM
74112003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7412
7413 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7414 int for variable OLDVAL and correct inline assembler contraint.
7415 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7416 type int for variable OLD.
7417
7418 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7419 only for s390-32.
7420 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7421 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7422 instead of multiple_threads field in the TCB.
7423
95767b36
UD
74242003-03-19 Ulrich Drepper <drepper@redhat.com>
7425
4009bf40
UD
7426 * sysdeps/i386/i686/bits/atomic.h: Removed.
7427 * sysdeps/i386/i586/bits/atomic.h: Removed.
7428 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7429 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7430 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7431 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7432 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7433 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7434 * atomic.h: Removed. Moved to glibc.
7435
560a784f
UD
7436 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7437 support for clock selection.
7438
95767b36
UD
7439 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7440 signalling waiters.
7441
043ad426
RM
74422003-03-18 Roland McGrath <roland@redhat.com>
7443
94659495
RM
7444 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7445 Add __lll_rel_instr first. Add memory clobber.
7446 (lll_mutex_unlock): Use __lll_test_and_set.
7447 From Paul Mackerras <paulus@samba.org>.
7448
7449 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7450 unconditionally.
7451 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7452 (SINGLE_THREAD_P): Add `header.' prefix.
7453 From Paul Mackerras <paulus@samba.org>.
7454
043ad426
RM
7455 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7456 pthread_timedjoin_np to ...
7457 (libpthread: GLIBC_2.3.3): ... here.
7458 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7459
7460 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7461 Avoid shadowing VAL variable.
7462
7463 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7464 New macro.
7465
86a9ee5e
UD
74662003-03-18 Ulrich Drepper <drepper@redhat.com>
7467
ac9e0aa1
UD
7468 * Makefile (tests): Add tst-cond11.
7469 * tst-cond11.c: New file.
7470
a14b373c
UD
7471 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7472 struct passed to cleanup handler to eliminate one more
7473 instruction.
7474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7475
24a49f38
UD
7476 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7477 (pthrad_cond_t): Replace __unused field with __clock.
7478
7479 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7480 waken all waiters in cleanup handler.
7481 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7482 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7483
86a9ee5e
UD
7484 * pthread_condattr_getclock.c: New file.
7485 * pthread_condattr_setclock.c: New file.
7486 * sysdeps/pthread/pthread.h: Declare these new functions.
7487 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7488 * Makefile (libpthread-routines): Add the new functions.
7489 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7490 Renamed field to value. Document use of the bits.
7491 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7492 change.
7493 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 7494 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
7495 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7496 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7497 Add __clock field.
7498 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7499 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7500 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7501 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7502 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7503 Implement clock selection.
7504 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7505 * pthread-errnos.sym: Add ENOSYS.
7506 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7507 _POSIX_CLOCK_SELECTION.
7508 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7509
7510 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7511 invalid .size directive.
7512
98054a05
RM
75132003-03-17 Roland McGrath <roland@redhat.com>
7514
7515 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7516 Formatting tweaks.
7517
001bea71
UD
75182003-03-17 Ulrich Drepper <drepper@redhat.com>
7519
4773086e
UD
7520 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7521 Use __lll_add instead of spelling it out. Use protected symbol names.
7522 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7523 Use __lll_add.
7524 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7525 Renamed from lll_compare_and_swap. Use new name where necessary.
7526 (__lll_add): Defined.
7527 (__lll_dec_if_positive): Defined.
7528 (__lll_test_and_set): Defined.
7529 * sysdeps/ia64/pthread_spin_init.c: Removed.
7530 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7531 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7532 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7533 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7534 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7535 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7536 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
7537 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7538 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7539 __sync_lock_release_si.
7540 Patch by Jakub Jelinek.
7541
7542 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7543 Fix timeout handling.
7544 (__lll_timedwait_tid): Likewise.
7545 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7546 Patch by Jakub Jelinek.
7547
7548 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7549
de4471dd
RM
75502003-03-17 Roland McGrath <roland@redhat.com>
7551
7552 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7553 * sysdeps/pthread/pthread_spin_init.c: New file.
7554 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7555 * sysdeps/powerpc/Makefile: New file.
7556 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7557 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7558 * sysdeps/powerpc/pthreaddef.h: New file.
7559 * sysdeps/powerpc/tcb-offsets.sym: New file.
7560 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7561 * sysdeps/powerpc/tls.h: New file.
7562 * sysdeps/powerpc/bits/atomic.h: New file.
7563 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7564 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7565 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 7566
de4471dd
RM
7567 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7568 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7569 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7570 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7571 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7572 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7573 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7574 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7575 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7576 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7577 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7578 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7579 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7580 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7581 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7582
7583 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7584 not gettimeofday.
7585 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7586 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7587 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7588 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7589 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7590
5778033f
UD
75912003-03-17 Ulrich Drepper <drepper@redhat.com>
7592
7593 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7594 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7595 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7596 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7597 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7598
796038f8
RM
75992003-03-16 Roland McGrath <roland@redhat.com>
7600
7601 * tst-fork4.c: Include <string.h>.
7602 * tst-signal2.c: Likewise.
7603 * tst-mutex5.c (do_test): exit -> return.
7604 * tst-mutex2.c: Include <stdlib.h>.
7605
51d0678c
UD
76062003-03-16 Ulrich Drepper <drepper@redhat.com>
7607
5778033f
UD
7608 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7609 (__lll_mutex_timedlock_wait): Correct expected value after
7610 spurious wakeup. Otherwise we would never wait again.
7611
b6e2f87a
UD
7612 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7613 zone versus inline asm stupidity. Use correct instructions.
7614
51d0678c
UD
7615 * tst-rwlock6.c: Add some more status output.
7616
8112cc70
RM
76172003-03-15 Roland McGrath <roland@redhat.com>
7618
7619 * sysdeps/pthread/configure.in: New file.
7620 * sysdeps/pthread/configure: New file (generated).
7621
49773c19
UD
76222003-03-15 Ulrich Drepper <drepper@redhat.com>
7623
7624 * allocatestack.c (allocate_stack): Store the exact stack size of
7625 user allocated stacks.
7626
eec0ca9f
JJ
76272003-03-15 Jakub Jelinek <jakub@redhat.com>
7628
7629 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7630 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7631 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7632 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7633 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7634 Use `header.' prefix.
7635 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7636
a87731e2
UD
76372003-03-15 Ulrich Drepper <drepper@redhat.com>
7638
7639 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7640 __builtin_frame_address, use stack pointer.
7641
7642 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7643 instead of __builtin_frame_pointer.
7644
e22a221d
UD
76452003-03-14 Ulrich Drepper <drepper@redhat.com>
7646
92ed3daf
UD
7647 * tst-basic1.c (do_test): Add cast to avoid warning.
7648 * tst-basic2.c (do_test): Likewise.
7649
9b89567d
UD
7650 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7651 amount of stack correction.
7652
e22a221d
UD
7653 * tst-fork4.c: Use test-skeleton.c.
7654
2e49caba
RM
76552003-03-14 Roland McGrath <roland@redhat.com>
7656
7657 * init.c: Fix typo "#eli" for "#else".
7658
415ef7d8
RM
76592003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7660
7661 * allocatestack.c (__stack_user): Use hidden_data_def.
7662 * pthread_create.c (__pthread_keys): Likewise.
7663
7664 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7665
52287505
RM
76662003-03-14 Roland McGrath <roland@redhat.com>
7667
415ef7d8
RM
7668 * tst-fork4.c: New file.
7669 * Makefile (tests): Add it.
7670
52287505
RM
7671 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7672 we always define the padding space.
7673 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7674 stopped supporting its own extensions fully.
7675 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7676 struct also called `header', so `header.multiple_threads' is the field
7677 name to use on all machines.
7678 * allocatestack.c (allocate_stack): Use `header.' prefix.
7679 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7680 * pthread_create.c (__pthread_create_2_1): Likewise.
7681 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7682 (THREAD_SELF): Likewise.
7683 * sysdeps/x86_64/tls.h: Likewise.
7684 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7685 (SINGLE_THREAD_P): Likewise.
7686 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7687 (SINGLE_THREAD_P): Likewise.
7688 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7689 (SINGLE_THREAD_P): Likewise.
7690
7691 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7692 value directly.
7693
c44bf9aa
UD
76942003-03-14 Ulrich Drepper <drepper@redhat.com>
7695
e22a221d
UD
7696 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7697 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7698
0eb18281
UD
7699 * pthread_create.c (start_thread): setjmp is expected to return 0.
7700
c44bf9aa
UD
7701 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7702 (THREAD_GETMEM_NC): Likewise.
7703
564cd8b6
UD
77042003-03-13 Ulrich Drepper <drepper@redhat.com>
7705
7706 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7707 and the size of the stack which must be allocated is a multiple,
7708 allocate one more page.
7709 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7710 MULTI_PAGE_ALIASING.
7711
6461e577
RM
77122003-03-13 Roland McGrath <roland@redhat.com>
7713
7714 * pthread_create.c (start_thread): Set EXITING_BIT after the
7715 event-reporting (and destructors), not before.
7716
b5ec5617
UD
77172003-03-13 Jakub Jelinek <jakub@redhat.com>
7718
6461e577
RM
7719 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7720 lll_futex_wake): Declare register variables as long int instead of
7721 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7722 Make syscall arguments clobbered by the syscall.
7723 (lll_futex_wait): Define using lll_futex_timed_wait.
7724
7725 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7726 to void *.
7727
7728 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7729 PPID if [! NDEBUG].
7730
7731 * allocatestack.c (nptl_ncreated): Only declare if
7732 COLORING_INCREMENT != 0.
7733
7734 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7735 (__libc_enable_asynccancel_2): Remove prototype.
7736
b5ec5617
UD
7737 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7738 ctid to match kernel.
7739
d0369fb8
UD
77402003-03-12 Ulrich Drepper <drepper@redhat.com>
7741
7588880f
UD
7742 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7743 libc_multiple_threads.
7744 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7745 __libc_multiple_threads to...
7746 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
7747
7748 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7749 versioning.
7750 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7751 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7752
7753 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7754 (__pthread_once_internal): Define.
7755
7756 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7757 macros instead of .symver directly.
7758 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7759 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7760
d0369fb8
UD
7761 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7762 * sysdeps/x86_64/tcb-offsets.sym: New file.
7763 * sysdeps/x86_64/Makefile: New file.
7764
7765 * sysdeps/i386/tcb-offsets.sym: Add SELF.
7766 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7767 to access own pthread_t in TCB.
7768 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7769 Likewise.
7770 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7771 Likewise.
7772 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7773
0bb2ac85
RM
77742003-03-12 Roland McGrath <roland@redhat.com>
7775
7776 * pthread-errnos.sym: New file.
7777 * Makefile (gen-as-const-headers): New variable, list that file.
7778 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7779 header <pthread-errnos.h> instead of defining errno values here.
7780 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7781 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7782 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7783 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7784 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7785 Likewise.
7786 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7787 Likewise.
7788 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7789 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7790 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7791 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7792 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7793 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7794 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7795 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7796 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7797 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7798 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7799 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7800 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7801 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7802 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7803 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7804 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7805 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7806 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7807 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7808 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7809 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7810 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7811 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7812 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7813 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7814 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7815
7816 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7817 CLONE_CHILD_SETTID worked.
7818
35e148cb
UD
78192003-03-12 Ulrich Drepper <drepper@redhat.com>
7820
d0369fb8
UD
7821 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7822 file.
7823 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7824 file.
7825
7826 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7827 (pthread_cond_t): Add padding.
7828
da49194d
UD
7829 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7830 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7831 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7832
35e148cb
UD
7833 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7834 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7835 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7836 (__pthread_rwlock_timedrdlock): Likewise.
7837 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7838 (__pthread_rwlock_wrlock): Likewise.
7839 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7840 (__pthread_rwlock_rdlock): Likewise.
7841
7842 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7843
7844 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7845 result of lock re-get if it fails.
7846
3e976b96
UD
78472003-03-11 Ulrich Drepper <drepper@redhat.com>
7848
5a03acfe
UD
7849 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7850 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7851 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7852 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7853 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7854 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7855 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7856 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7857 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7858 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7859
7860 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7861 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7862
7863 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7864 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7865 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7866 (create_thread): Likewise.
7867 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7868 * init.c (__pthread_initialize_minimal_internal): Initialize
7869 __libc_multiple_threads_ptr if necessary.
7870 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
7871 __pthread_multiple_threads and __libc_multiple_threads_ptr.
7872 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7873 __libc_multiple_threads.
7874 (__libc_pthread_init): Return pointer to __libc_pthread_init if
7875 necessary.
7876
7877 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7878 (THREAD_SETMEM_NC): Likewise.
7879
7880 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7881 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7882 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7883 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7884
7885 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7886 Eliminate one entire instruction.
7887
32a589b1
UD
7888 * cancellation.c (__pthread_enable_asynccancel_2): New function.
7889 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7890 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7891 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7892 instead of __pthread_enable_asynccancel.
7893 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7894 (__pthread_cond_wait): Likewise.
7895 * sysdeps/pthread/pthread_cond_timedwait.c
7896 (__pthread_cond_timedwait): Likewise.
7897 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7898
3e976b96
UD
7899 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7900 (__condvar_cleanup): Wake up all waiters in case we got signaled
7901 after being woken up but before disabling asynchronous
7902 cancellation.
7903 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7904 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7905 (__condvar_cleanup): Likewise.
7906
7907 * init.c (__NR_set_tid_address): If already defined, don't redefine.
7908 Make it an error if architecture has no #if case. Add x86-64.
7909
7910 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7911 pt-initfini.s generation.
7912
7913 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7914 (TLS_INIT_TP): Fix typo.
7915
6c477888
UD
79162003-03-11 Jakub Jelinek <jakub@redhat.com>
7917
7918 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7919 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7920
7921 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7922 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7923 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7924 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7925 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7926 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7927 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7928 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7929
ea694823
UD
79302003-03-11 Ulrich Drepper <drepper@redhat.com>
7931
6c477888
UD
7932 * sysdeps/pthread/pthread_cond_timedwait.c
7933 (__pthread_cond_timedwait): Return the result of the final
7934 locking. If it succeeds, the regular function return value.
7935
7936 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7937 Return result of the final locking.
7938 * version.c (__nptl_main): Work around problems with the strange
7939 INTERNAL_SYSCALL macro on ppc32.
7940 * init.c (__pthread_initialize_minimal_internal): Unblock
7941 SIGCANCEL in case the parent blocked it.
7942 Reported by Paul Mackerras <paulus@samba.org>.
7943
ea694823
UD
7944 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7945 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7946 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7947
b33e6163
RM
79482003-03-11 Jakub Jelinek <jakub@redhat.com>
7949
7950 * sysdeps/pthread/pthread_cond_timedwait.c
7951 (__pthread_cond_timedwait): Unlock and fail if
7952 __pthread_mutex_unlock_internal failed.
7953
7954 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7955 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7956 Use ARCH_CLONE.
7957 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7958 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7959 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7960 ALLOCATE_STACK): New macros.
7961 (TLS_TPADJ): New macro.
7962 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7963 (allocate_stack): Handle TLS_DTV_AT_TP and
7964 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
7965 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7966 Don't set PD->self.
7967 * init.c [__ia64__] (__NR_set_tid_address): Define.
7968
7969 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7970 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7971 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7972 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7973 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7974 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7975 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7976 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7977 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7978 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7979 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7980 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7981 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7982 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7983 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7984 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7985 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7986 * sysdeps/ia64/bits/atomic.h: New file.
7987 * sysdeps/ia64/Makefile: New file.
7988 * sysdeps/ia64/pthread_spin_init.c: New file.
7989 * sysdeps/ia64/pthread_spin_lock.c: New file.
7990 * sysdeps/ia64/pthread_spin_trylock.c: New file.
7991 * sysdeps/ia64/pthread_spin_unlock.c: New file.
7992 * sysdeps/ia64/pthreaddef.h: New file.
7993 * sysdeps/ia64/tcb-offsets.sym: New file.
7994 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7995 * sysdeps/ia64/tls.h: New file.
7996
7997 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7998 to syscall instead of no arguments.
7999
2b30b2e5
UD
80002003-03-10 Ulrich Drepper <drepper@redhat.com>
8001
db5f2fc9
UD
8002 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8003 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8004 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8005 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8006
8007 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8008 unused code.
8009
6a4263e3
UD
8010 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8011
3de7c2a9
UD
8012 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8013 lowlevelbarrier.sym.
8014 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8015 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8016 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 8017 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 8018
2a544d82
UD
8019 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8020 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8021 (__lll_mutex_timedlock_wait): Likewise.
8022 (lll_mutex_lock): Adjust asm for that.
8023 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8024 (lll_lock): Adjust asm for operand order change.
8025 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8026 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8027
ec06436c
UD
8028 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8029 Reverse order of parameters.
8030 (__lll_timedwait_tid): Remove regparms attribute.
8031 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8032 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8033
3273832c
UD
8034 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8035 (__lll_timedwait_tid): Remove one unnecessary instruction.
8036
51f32ab8
UD
8037 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8038 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8039 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8040 lowlevelmutex.S.
8041
8042 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8043 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8044 for NOT_IN_libc.
8045 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8046 lowlevellock.S.
8047
fad48d9e
UD
8048 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8049 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8050 for libc.so.
8051 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8052 define LOCK here (if UP is not defined). The actual code is in
8053 lowlevelmutex.S.
8054
9356d063
UD
8055 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8056 LOCK is already defined. Don't define lll_unlock_wake_cb and
8057 __lll_timedwait_tid for libc.so.
8058 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8059 define LOCK here (if UP is not defined). The actual code is in
8060 lowlevellock.S.
8061
ebf0cbc5 8062 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
8063 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8064 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8065 instead of lowlevelsem.h.
8066 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8067 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8068 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 8069
c915e5ad
UD
8070 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8071 lowlevelrwlock.sym.
8072 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8073 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 8074 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 8075
4c3c2e8a
UD
8076 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8077 register loading.
8078 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8079 last changed. D'oh.
8080
2b30b2e5
UD
8081 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8082
8083 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8084 of __libc_locking_needed.
8085 (lll_trylock): Initialize %eax to zero.
8086
2b30b2e5
UD
8087 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8088 pthread_cond_t definition.
8089
e48f9638
RM
80902003-03-10 Roland McGrath <roland@redhat.com>
8091
8092 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8093 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8094 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8095 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8096 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8097
8098 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8099 Instead of setting PD->multiple_threads, set globals
8100 __pthread_multiple_threads and __libc_multiple_threads.
8101 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8102 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8103 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8104
8105 * descr.h (struct pthread): Conditionalize first member on
8106 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8107 containing an anonymous tcbhead_t. Move `list' member out.
8108 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8109 * allocatestack.c: Remove use of `header.data.' prefix.
8110 * pthread_create.c: Likewise.
8111 * init.c (__pthread_initialize_minimal_internal): Likewise.
8112 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8113 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8114 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8115 * sysdeps/x86_64/tls.h: Likewise.
8116 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8117 (SINGLE_THREAD_P): Likewise.
8118 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8119 (SINGLE_THREAD_P): Likewise.
8120 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8121 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8122
c37cae9e
UD
81232003-03-09 Ulrich Drepper <drepper@redhat.com>
8124
d38c777e
RM
8125 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8126
7b44a5e0 8127 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 8128 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 8129
c2e5e085
UD
8130 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8131 leftovers from the ia32 code.
8132
8133 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8134 memory load.
8135 (clear_once_control): Don't load %esi.
8136
8137 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8138 handling.
8139
8140 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8141
cd4b2a55
UD
8142 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8143 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8144
c37cae9e
UD
8145 * Makefile (tests): Add tst-cond10.
8146 * tst-cond10.c: New file.
8147
d130a341
UD
81482003-03-08 Ulrich Drepper <drepper@redhat.com>
8149
ccf1d573
UD
8150 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8151 * tst-signal3.c (do_test): Likewise.
8152 * tst-sem5.c (do_test): Likewise.
8153 * tst-kill6.c (do_test): Likewise.
8154 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8155
8156 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8157 of inc/dec.
8158 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8159 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8160 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8161 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8162 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8163 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8164 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8165 Likewise.
8166 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8167 Likewise.
8168 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8169 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8170 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8171 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8172 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8173 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8174 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8175 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8176
d130a341
UD
8177 * allocatestack.c (allocate_stack): If mprotect() fails free the
8178 TLS memory.
8179
bc6389ad
UD
81802003-03-07 Ulrich Drepper <drepper@redhat.com>
8181
41d4d223
UD
8182 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8183
8184 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8185 lll_wake_tid. This was used only to work around kernel limits in
8186 the early days.
8187 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8188 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8189 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8190 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8191
bc6389ad
UD
8192 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8193 (__pthread_initialize_minimal_internal): Change initialization of
8194 __static_tls_align_m1 appropriately.
8195 * pthreadP.h (__static_tls_align_m1): Renamed from
8196 __static_tls_align.
8197 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8198 instead of __static_tls_align-1.
8199
cc775edf
UD
82002003-03-04 Ulrich Drepper <drepper@redhat.com>
8201
0de28d5c 8202 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 8203
518b5308
UD
8204 * pthread_create.c: Define __pthread_keys using nocommon
8205 attribute, not by placing it explicitly in bss.
8206 Remove DEFINE_DEALLOC definition. Not needed anymore.
8207
8208 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8209 Use it in mmap call to allocate stacks.
8210
8211 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8212
cc775edf
UD
8213 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8214 result of the thread function.
8215
4f6f0a8f
UD
82162003-03-03 Ulrich Drepper <drepper@redhat.com>
8217
f04a2721
UD
8218 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8219 version is just fine.
8220
4f6f0a8f
UD
8221 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8222 (__pthread_child_handler): Renamed from pthread_child_handler,
8223 exported, and marked hidden. Change all users.
8224 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8225 free __pthread_child_handler from child list.
8226
7ce5c164
UD
82272003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8228
8229 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8230
8231 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8232 Fix handling of cancellation and failing pthread_mutex_unlock call.
8233 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8234 (__pthread_cond_wait): Likewise.
8235
8236 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8237 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8238 lll_futex_timed_wait call.
8239 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8240 (pthread_rwlock_timedwrlock): Likewise.
8241
8242 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8243 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8244 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8245
8246 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8247 check of lll_futex_wake return value.
8248
ea6a015b
RM
82492003-03-03 Roland McGrath <roland@redhat.com>
8250
8251 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8252
8253 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8254 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8255 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8256
4adacf57
UD
82572003-03-02 Ulrich Drepper <drepper@redhat.com>
8258
1be3d664
UD
8259 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8260 error for CPU clocks.
8261
885bafa1
UD
8262 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8263 _POSIX_MONOTONIC_CLOCK.
8264 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8265
4adacf57
UD
8266 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8267 recent kernels.
8268
86bfff4d
UD
82692003-03-01 Ulrich Drepper <drepper@redhat.com>
8270
8271 * descr.h (struct pthread): Move cleanup field to the front.
8272
d1149385
RM
82732003-03-01 Roland McGrath <roland@redhat.com>
8274
8275 * sem_open.c (sem_open): Braino fix.
8276
bd8bb78b
UD
82772003-03-01 Ulrich Drepper <drepper@redhat.com>
8278
748bec08
UD
8279 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8280 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8281 __pthread_cleanup_pop functionality.
8282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8283
bd8bb78b
UD
8284 * descr.h (struct pthread): Move tid field to the front now that
8285 it is often used.
8286
8287 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8288 (__lll_mutex_timedlock_wait): Remove.
8289 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8290 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8291 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8292 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8293 (lll_unlock_wake_cb): Don't save and restore %esi.
8294 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8295 %esi.
8296 (__lll_timedwait_tid): Add alignment.
8297 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8298 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8299 %esi.
8300 (__lll_timedwait_tid): Removed.
8301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8302 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8303 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8304 (pthread_barrier_wait): Don't save, load, and restore %esi for
8305 last thread.
8306 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8307 (__pthread_cond_signal): Don't save, load, and restore %esi.
8308 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8309 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8310 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8311 Don't save, load, and restore %esi.
8312
d2637c70
UD
83132003-02-27 Ulrich Drepper <drepper@redhat.com>
8314
567fb22a
UD
8315 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8316 Release lock before waking up the waiters.
8317
427f5fa1
UD
8318 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8319
a2d83cfb
UD
8320 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8321 (reader_thread): Likewise.
8322
d2637c70
UD
8323 * sysdeps/pthread/pthread_rwlock_unlock.c
8324 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8325 to wake up readers if there are none.
8326
8327 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8328 Release internal lock before wake threads.
8329
b1531183
UD
83302003-02-26 Ulrich Drepper <drepper@redhat.com>
8331
dbf6131c
UD
8332 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8333 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8334 predefined.
8335 * tst-rwlock9.c: Likewise.
8336 * tst-rwlock10.c: New file.
8337 * tst-rwlock11.c: New file.
8338
695799fe
UD
8339 * Makefile (tests): Add tst-dlsym1.
8340 * tst-dlsym1.c: New file.
8341
b1531183
UD
8342 * init.c (__pthread_initialize_minimal_internal): Set
8343 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8344 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8345
3724f268
UD
83462003-02-24 Ulrich Drepper <drepper@redhat.com>
8347
3857ca78
UD
8348 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8349
80d80779
UD
8350 * tst-cond2.c: Fix sychronization with child.
8351
86371308
UD
8352 * tst-rwlock8.c (reader_thread): Remove unused variable.
8353
ffeb4481
UD
8354 * Makefile: Add rules to build and run tst-tls3.
8355 * tst-tls3.c: New file.
8356 * tst-tls3mod.c: New file.
8357
3724f268
UD
8358 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8359 * tst-rwlock8.c: New file.
8360 * tst-rwlock9.c: New file.
8361 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8362 complete broken rwlock implementation.
8363 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8364 Likewise.
8365 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8366 Likewise.
8367 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8368 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
8369 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8370 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8371 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8372 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8373 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 8374
8915cc40
RM
83752003-02-23 Roland McGrath <roland@redhat.com>
8376
8377 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8378
fd1a0d0c
UD
83792003-02-23 Ulrich Drepper <drepper@redhat.com>
8380
ecf28959
UD
8381 * Makefile (tests): Add tst-context1.
8382 * tst-context1.c: New file.
8383
5e47b76b
UD
8384 * Makefile (tests): Add tst-tls1 and tst-tls2.
8385 * tst-tls1.c: New file.
8386 * tst-tls2.c: New file.
8387
5a6bbb41
UD
8388 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8389 for failed cmpxchg.
8390
fd1a0d0c
UD
8391 * pthread_create.c (start_thread): Set EXITING_BIT early.
8392
8393 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8394 (THREAD_GETMEM_NC): Likewise.
8395
757f9fcb
UD
83962003-02-22 Ulrich Drepper <drepper@redhat.com>
8397
b1b8e747
UD
8398 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8399 off 3 more bytes by using offset-less instructions when possible.
8400
c780aa21 8401 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
8402
8403 * eintr.c (eintr_source): Add unnecessary return but the compiler
8404 insists.
8405
8406 * tst-kill3.c: Include <unistd.h>.
8407
5148559c
RM
84082003-02-21 Roland McGrath <roland@redhat.com>
8409
8410 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8411
ab2d98e3
UD
84122003-02-21 Ulrich Drepper <drepper@redhat.com>
8413
71028edd
UD
8414 * Makefile (tests): Add tst-eintr1.
8415 (distribute): Add eintr.c.
8416 * tst-eintr1.c: New file.
8417 * eintr.c: New file.
8418
e814f748
UD
8419 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8420
8421 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8422 Disallow sending SIGCANCEL.
8423
ab2d98e3 8424 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 8425 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
8426 * tst-kill1.c: New file.
8427 * tst-kill2.c: New file.
8428 * tst-kill3.c: New file.
8429 * tst-kill5.c: New file.
9c03686d 8430 * tst-kill6.c: New file.
e814f748
UD
8431 * tst-basic7.c: Renamed to...
8432 * tst-kill4.c: ...this.
ab2d98e3 8433
59fed0e2
RM
84342003-02-21 Roland McGrath <roland@redhat.com>
8435
8436 * Makefile (install-lib-ldscripts): New variable.
8437
49dc759f
UD
84382003-02-21 Ulrich Drepper <drepper@redhat.com>
8439
8c2e9a29
UD
8440 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8441 * pthread_cancel.c: Use INVALID_TD_P.
8442 * pthread_detach.c: Likewise.
8443 * pthread_getschedparam.c: Likewise.
8444 * pthread_setschedparam.c: Likewise.
8445 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8446 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8447 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8448 * pthread_timedjoin.c: Likewise.
8449
8450 * tst-basic7.c: Include <signal.h>.
8451
49dc759f
UD
8452 * pthread_join.c (pthread_join): Limited checking for invalid
8453 descriptors.
8454 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8455
df5803bf
UD
84562003-02-20 Ulrich Drepper <drepper@redhat.com>
8457
c5acd3d7
UD
8458 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8459 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
8460 * Makefile (tests): Add tst-key4.
8461 * tst-key4.c: New file.
8462
729924a0
UD
84632003-02-18 Ulrich Drepper <drepper@redhat.com>
8464
2f7dc594
UD
8465 * Makefile (tests): Add tst-basic7.
8466 * tst-basic7.c: New file.
8467
ba25bb0f
UD
8468 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8469 Add some more __builtin_expect.
8470
12fd3c5f 8471 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 8472
5430d926
UD
84732003-02-17 Ulrich Drepper <drepper@redhat.com>
8474
b0db7fbe
UD
8475 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8476 _POSIX_THREAD_PRIORITY_SCHEDULING.
8477 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8478 _XOPEN_REALTIME_THREADS.
8479 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8480
8481 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8482 kernel returns EINVAL for PID <= 0, work around it.
8483
ecfda9bd
UD
8484 * Makefile (tests): Add tst-signal5.
8485 * tst-signal5.c: New file.
8486
7d78ab99
UD
8487 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8488 and LOGIN_NAME_MAX.
8489
371a2972
UD
8490 * tst-cancel1.c (tf): Block all signals.
8491
5430d926
UD
8492 * Makefile (tests): Add tst-basic6.
8493 * tst-basic6.c: New file.
8494
8495 * tst-basic1.c: Add test for process ID.
8496
8497 * Makefile (tests): Add tst-cancel10.
8498 * tst-cancel10.c: New file.
8499
8500 * Makefile (tests): Add tst-signal4.
8501 * tst-signal4.c: New file.
8502
8503 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8504 __sigismember instead of sigismember. Add __builtin_expect.
8505
1564916a
UD
85062003-02-16 Ulrich Drepper <drepper@redhat.com>
8507
179ff175
UD
8508 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8509 pthread_setcancelstate, and pthread_rwlock_setpshared.
8510
e4335f9a
UD
8511 * tst-cancel7.c (do_test): Make sure the pid file exists before
8512 canceling the thread.
8513
0a37669a
UD
8514 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8515 pthread_rwlock_timedrdlock tests.
8516 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8517 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8518 Check for invalid tv_nsec field.
8519 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8520 Likewise.
8521
8522 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8523 recursive mutex of overflow.
8524
8525 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8526
e4335f9a 8527 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
8528 going into an endless loop.
8529 * Makefile (tests): Add tst-cancel9.
8530 * tst-cancel9.c: New file.
8531
8532 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8533
b270b548
UD
85342003-02-15 Ulrich Drepper <drepper@redhat.com>
8535
1c82b97f
UD
8536 * tst-mutex5.c (do_test): Add more timedlock tests.
8537
b2f05465 8538 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
8539 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8540
e798b60f
UD
8541 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8542 use INLINE_SYSCALL. Error number is returned, not -1.
8543
90491dc4
UD
8544 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8545 and __deallocate_stack with internal_function.
8546 * pthread_create.c: Adjust definitions appropriately.
8547 * allocatestack.c: Likewise.
8548
8549 * pthread_join.c: Add one more __builtin_expect.
8550 * pthread_timedjoin.c: Likewise.
8551
8552 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8553 not data of sequence number does not match.
8554 Add one __builtin_expect.
8555
c6247c9d
UD
8556 * Makefile (tests): Add tst-clock1.
8557 * tst-clock1.c: New file.
8558
b270b548
UD
8559 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8560 negative arguments.
8561 * Makefile (tests): Add tst-basic5.
8562 * tst-basic5.c: New file.
8563
700bf7af
UD
85642003-02-14 Ulrich Drepper <drepper@redhat.com>
8565
757de559
UD
8566 * Makefile (tests): Add tst-basic4.
8567 * tst-basic4.c: New file.
8568
47202270
UD
8569 * pthreadP.h: Add declaraction for __nptl_nthreads.
8570 * pthread_create.c: Define __nptl_nthreads
8571 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 8572 after thread is done. If then zero, call exit(0).
47202270
UD
8573 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8574 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8575 * init.c (pthread_functions): Initialize ptr_nthreads.
8576 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8577 (__reclaim_stacks): Decrement __nptl_nthreads.
8578 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8579 Define.
8580 * Makefile (tests): Add tst-basic3.
8581 * tst-basic3.c: New file.
8582
e320ef46
UD
8583 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8584 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8585 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8586 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8587 if asynchronous canceling is enabled.
8588 * pthread_join.c (pthread_join): When recognizing circular joins,
8589 take into account the other thread might be already canceled.
8590 * Makefile (tests): Add tst-join5.
8591 * tst-join5.c: New file.
8592
700bf7af
UD
8593 * Makefile (tests): Add tst-join4.
8594 * tst-join4.c: New file.
8595
85962003-02-13 Ulrich Drepper <drepper@redhat.com>
8597
8598 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8599
dac0f772
UD
86002003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8601
8602 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8603 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8604 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8605 warning.
8606 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8607 to avoid warning.
8608 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8609 error if lll_futex_wake failed.
8610
e8cda341
UD
86112003-02-13 Ulrich Drepper <drepper@redhat.com>
8612
a7720b5e
UD
8613 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8614 handling of cancellation and failung pthread_mutex_unlock call.
8615 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8616 * Makefile (tests): Add tst-cond8 and tst-cond9.
8617 * tst-cond8.c: New file.
8618 * tst-cond9.c: New file.
8619
a1ea4c06
UD
8620 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8621
8622 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8623 non-standard initializers with __USE_GNU.
8624
e8cda341
UD
8625 * Makefile (tests): Add tst-cleanup3.
8626 * tst-cleanup3.c: New file.
8627
2067577c
UD
86282003-02-12 Ulrich Drepper <drepper@redhat.com>
8629
89e78a95
UD
8630 * Makefile (tests): Add tst-attr1 and tst-attr2.
8631 * tst-attr1.c: New file.
8632 * tst-attr2.c: New file.
8633
dfdd294a
UD
8634 * Makefile: Add rules to build and run tst-atfork2 test.
8635 * tst-atfork2.c: New file.
8636 * tst-atfork2mod.c: New file.
8637
8638 * sysdeps/unix/sysv/linux/unregister-atfork.c
8639 (__unregister_atfork): Free the memory allocated for the handlers
8640 after removing them from the lists.
8641
8642 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8643 cleanup function.
8644
8645 * tst-atfork1.c (do_test): Wait for the child we forked.
8646 Report error in child.
8647
8648 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8649
2067577c
UD
8650 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8651
2a8a8a84
UD
86522003-02-10 Ulrich Drepper <drepper@redhat.com>
8653
d9dd121e
UD
8654 * Makefile (tests): Add tst-cancel8.
8655 * tst-cancel8.c: New file.
8656
2a8a8a84
UD
8657 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8658 clearing of control variable.
defd1870 8659 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 8660 * tst-once3.c: New file.
defd1870 8661 * tst-once4.c: New file.
2a8a8a84 8662
a54e8d33
UD
86632003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8664
8665 * sysdeps/sh/Makefile: New file.
8666 * sysdeps/sh/bits/atomic.h: New file.
8667 * sysdeps/sh/pthread_spin_init.c: New file.
8668 * sysdeps/sh/pthread_spin_lock.c: New file.
8669 * sysdeps/sh/pthread_spin_trylock.S: New file.
8670 * sysdeps/sh/pthread_spin_unlock.S: New file.
8671 * sysdeps/sh/pthreaddef.h: New file.
8672 * sysdeps/sh/tcb-offsets.sym: New file.
8673 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8674 * sysdeps/sh/tls.h: New file.
8675 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8676 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8677 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8678 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8679 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8680 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8681 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8682 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8683 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8684 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8685 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8686 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8687 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8688 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8689 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8690 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8691 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8692 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8693 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8694 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8695 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8696 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8697 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8698 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8699 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8700 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8701 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8702 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8703 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8704 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8705
696e556e
UD
87062003-02-08 Ulrich Drepper <drepper@redhat.com>
8707
8708 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8709 according to POSIX.
8710
8711 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8712
fef710d6
UD
87132003-02-07 Ulrich Drepper <drepper@redhat.com>
8714
c6180643
UD
8715 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8716 (TLS_GET_FS): New #define.
8717 (TLS_SET_FS): New #define.
8718 Correct value of __NR_set_thread_area.
8719
fef710d6
UD
8720 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8721
11090a99
UD
87222003-02-06 Ulrich Drepper <drepper@redhat.com>
8723
65c68990
UD
8724 * Makefile (tests): Add tst-popen1.
8725 * tst-popen1.c: New file.
8726
11090a99
UD
8727 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8728 but inactive generalization.
8729 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8730 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8731 Minor optimization, remove one instruction.
8732 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8733
a88c9263
UD
87342003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8735
8736 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8737
87382003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8739
8740 * init.c (__NR_set_tid_address): Add #ifdef for s390.
8741 * sysdeps/pthread/pthread_barrier_wait.c: New file.
8742 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8743 * sysdeps/pthread/pthread_cond_signal.c: New file.
8744 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8745 * sysdeps/pthread/pthread_cond_wait.c: New file.
8746 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8747 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8748 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8749 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8750 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8751 * sysdeps/s390/Makefile: New file.
8752 * sysdeps/s390/bits/atomic.h: New file.
8753 * sysdeps/s390/pthread_spin_init.c: New file.
8754 * sysdeps/s390/pthread_spin_lock.c: New file.
8755 * sysdeps/s390/pthread_spin_trylock.c: New file.
8756 * sysdeps/s390/pthread_spin_unlock.c: New file.
8757 * sysdeps/s390/pthreaddef.h: New file.
8758 * sysdeps/s390/tcb-offsets.sym: New file.
8759 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8760 * sysdeps/s390/tls.h: New file.
8761 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8762 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8763 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8764 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8765 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8766 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8767 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8768 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8769 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8770 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8771 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8772 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8773 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8774 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8775 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8776 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8777 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8778 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8779 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8780 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8781 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8782 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8783 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8784
6f1cff95
UD
87852003-02-04 Ulrich Drepper <drepper@redhat.com>
8786
ec609a8e
UD
8787 * atomic.h: Add a couple more default implementations.
8788 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
8789 __arch_compare_and_exchange_32_acq in return value definition. It
8790 always exists.
8791 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 8792 Add missing atomic_ prefixes.
e3ec8904 8793
6f1cff95
UD
8794 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8795 thread library is available, use correct value to mark initialized
8796 once variable.
8797
4f088329
UD
87982003-02-03 Ulrich Drepper <drepper@redhat.com>
8799
6f1cff95
UD
8800 * allocatestack.c (allocate_stack): Use __getpagesize instead of
8801 __sysconf to determine pagesize.
8802
3e4fc359 8803 * pthread_create.c: Include <atomic.h>.
4f088329
UD
8804 * allocatestack.c (allocate_stack): Implement coloring of the
8805 allocated stack memory. Rename pagesize to pagesize_m1. It's the
8806 size minus one. Adjust users.
3e4fc359 8807 * sysdeps/i386/i686/Makefile: New file.
4f088329 8808
2f42e8be
UD
88092003-02-02 Ulrich Drepper <drepper@redhat.com>
8810
4301f7e2
UD
8811 * allocatestack.c: Improve comment throughout the file.
8812
2f42e8be 8813 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 8814 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
8815 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8816 (__lll_lock_wait): Likewise.
8817 (lll_unlock_wake_cb): Removed.
8818
4a7d6545
UD
88192003-01-31 Ulrich Drepper <drepper@redhat.com>
8820
8821 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8822 _POSIX_THREAD_PRIORITY_SCHEDULING.
8823
886d5973
UD
88242003-01-30 Jakub Jelinek <jakub@redhat.com>
8825
8826 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8827 Fix return type of ptr___pthread_getspecific.
8828
e474ca78
UD
88292003-01-29 Ulrich Drepper <drepper@redhat.com>
8830
8831 * Makefile (tests): Add tst-umask1.
8832 (tst-umask1-ARGS): Define.
8833 * tst-umask1.c: New file.
8834
e6ebd2e4
UD
88352003-01-28 Ulrich Drepper <drepper@redhat.com>
8836
6cf26f41
UD
8837 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
8838 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8839 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8840 pthread_rwlock_unlock.
8841 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8842 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8843 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8844 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8845 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8846 New file.
8847 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8848 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8849 New file.
8850 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8851 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8852 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8853 New file.
8854 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8855 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8856 New file.
8857 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8858 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8859 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8860 New file.
8861 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8862 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8863 New file.
8864 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8865
1d087a7e
UD
8866 * Makefile (libpthread-routines): Remove lowlevelcond and
8867 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8868 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8869 and pthread_cond_broadcast.
4a99d160
UD
8870 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8871 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8872 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8873 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8874 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8875 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8876 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8877 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8878 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8879 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8880 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8881 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8882 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8883 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8884 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8885 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8886 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8887 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8888 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8889 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8890 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8891 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8892 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8893 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8894 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8895 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8896 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8897 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8898 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8899 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8900 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 8901
e6ebd2e4
UD
8902 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8903 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
8904 of the code is moved to ...
8905 * sysdeps/pthread/createthread.c: ...here. New file.
8906
a15698cb
UD
89072003-01-27 Ulrich Drepper <drepper@redhat.com>
8908
0566b130
UD
8909 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8910 (__new_sem_post): Clear %eax before returning.
8911 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8912
e6fb8846
UD
8913 * Makefile (tests): Add tst-cleanup2.
8914 * tst-cleanup2.c: New file.
8915
a15698cb
UD
8916 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8917 Interpret first parameter correctly.
8918
8824b0a1
UD
89192003-01-17 Ulrich Drepper <drepper@redhat.com>
8920
8921 * Makefile (headers): Add bits/semaphore.h.
8922
850dcfca
UD
89232003-01-16 Jakub Jelinek <jakub@redhat.com>
8924
8925 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8926 if not SHARED.
8927
574b892e
UD
89282003-01-14 Ulrich Drepper <drepper@redhat.com>
8929
a8d87c92
UD
8930 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8931 must be used and mapping failed.
8932 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8933
574b892e
UD
8934 * Makefile (CFLAGS-pthread_self.os): Define this, not
8935 CFLAGS-pthread_self.c.
8936
fb48047a
UD
89372003-01-13 Ulrich Drepper <drepper@redhat.com>
8938
47805511
UD
8939 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8940 lll_unlock_wake_cb.
8941
fb48047a
UD
8942 * Makefile (libpthread-routines): Add version. Add rules to build
8943 version.os and banner.h.
8944 * version.c: New file.
8945
115bb61d
UD
89462003-01-13 Jakub Jelinek <jakub@redhat.com>
8947
8948 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8949 the alias unconditional.
8950 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
8951
89522003-01-13 Ulrich Drepper <drepper@redhat.com>
8953
8954 * Makefile (CFLAGS-pthread_self.c): New definition.
8955
6aca81bb
UD
89562003-01-06 Jakub Jelinek <jakub@redhat.com>
8957
8958 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8959 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8960 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8961 * init.c (__pthread_initialize_minimal_internal): Likewise.
8962
e9c7764e
UD
89632003-01-07 Jakub Jelinek <jakub@redhat.com>
8964
b5facfda
UD
8965 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8966
e9c7764e
UD
8967 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8968 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8969 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8970 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8971 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8972 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8973
bef1e42f
UD
89742003-01-06 Jakub Jelinek <jakub@redhat.com>
8975
8976 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8977 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8978 * tst-cancel-wrappers.sh: Remove all exceptions.
8979
bbd17455
UD
89802003-01-05 Ulrich Drepper <drepper@redhat.com>
8981
a73ab6df
UD
8982 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8983 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
8984
bbd17455
UD
8985 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8986 Use __libc_pthread_functions array if SHARED.
8987
8988 * pthreadP.h: Move pthread_cond_2_0_t definition to...
8989 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8990
8991 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8992 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8993 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8994 __libc_ptf_call instead of __libc_maybe_call.
8995 (PTF): New #define.
8996 (__libc_cleanup_region_start): Wrap function name with PTF call.
8997 (__libc_cleanup_region_end): Likewise.
8998 (__libc_cleanup_end): Likewise.
8999
9000 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9001 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9002 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9003 * pthreadP.h: Add prototypes.
9004
9005 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9006 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9007 __pthread_rwlock_unlock aliases.
9008 * pthreadP.h: Add prototypes for new aliases.
9009
9010 * pthreadP.h (struct pthead_functions): Moved to...
9011 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9012 * init.c (pthread_functions): Add initializers for new elements.
9013
9014 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9015 __pthread_cleanup_pop_restore aliases.
9016 * pthreadP.h: Add prototypes.
9017
9018 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9019 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9020 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9021 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9022 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9023 * pthreadP.h: Adjust prototypes and callers.
9024
d27a78be
UD
90252003-01-04 Ulrich Drepper <drepper@redhat.com>
9026
b74121ae
UD
9027 * Makefile (tests): Add tst-cancel7.
9028 (tst-cancel7-ARGS): New variable.
bbd17455 9029 * tst-cancel7.c: New file.
b74121ae 9030
29bc410c
UD
9031 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9032 around gcc defficiencies.
9033 * old_pthread_cond_signal.c: Likewise.
9034 * old_pthread_cond_timedwait.c: Likewise.
9035 * old_pthread_cond_wait.c: Likewise.
9036
d27a78be
UD
9037 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9038
733f25e6
UD
90392003-01-03 Ulrich Drepper <drepper@redhat.com>
9040
7edb2ae3
UD
9041 * Makefile (tests): Add tst-cond7.
9042 * tst-cond7.c: New file.
9043
b1151300
UD
9044 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9045 (condvar_cleanup): Get condvar address from the right place.
9046
733f25e6
UD
9047 * atomic.h: Correct definitions of atomic_full_barrier,
9048 atomic_read_barrier, atomic_write_barrier.
9049
9050 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9051 race-free.
9052 * old_pthread_cond_signal.c: Likewise.
9053 * old_pthread_cond_timedwait.c: Likewise.
9054 * old_pthread_cond_wait.c: Likewise.
9055
686b7223
UD
90562003-01-03 Jakub Jelinek <jakub@redhat.com>
9057
9058 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9059
0e07706e
UD
90602003-01-03 Ulrich Drepper <drepper@redhat.com>
9061
997256dd
UD
9062 * pthreadP.h (pthread_cond_2_0_t): New type.
9063 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9064 Use new type for the 2.0 condvar function prototypes.
9065 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9066 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9067 parameter.
9068 * old_pthread_cond_destroy.c: Likewise.
9069 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9070 * old_pthread_cond_signal.c: Likewise.
9071 * old_pthread_cond_timedwait.c: Likewise.
9072 * old_pthread_cond_wait.c: Likewise.
9073
842d2817
UD
9074 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9075 (__pthread_cond_wait): Don't save cancellation mode and seq value
9076 in same location.
9077
0e07706e
UD
9078 * herrno.c (__h_errno_location): Don't define as weak.
9079
bf293afe
UD
90802003-01-02 Jakub Jelinek <jakub@redhat.com>
9081
9082 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9083 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9084 and pthread_cond_wait.
9085 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9086 Renamed to...
9087 (__pthread_cond_broadcast_2_0): ... this.
9088 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9089 Renamed to...
9090 (__pthread_cond_destroy_2_0): ... this.
9091 * old_pthread_cond_init.c (__old_pthread_cond_init):
9092 Renamed to...
9093 (__pthread_cond_init_2_0): ... this.
9094 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9095 Renamed to...
9096 (__pthread_cond_signal_2_0): ... this.
9097 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9098 Renamed to...
9099 (__pthread_cond_wait_2_0): ... this.
9100 * pthread_cond_destroy.c: Include shlib-compat.h.
9101 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9102 * pthread_cond_init.c: Include shlib-compat.h.
9103 (pthread_cond_init): Change strong_alias into versioned_symbol.
9104 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9105 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9106 fields.
9107 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9108 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9109 __pthread_cond_wait_2_0): New prototypes.
9110 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9111 __old_pthread_cond_init, __old_pthread_cond_signal,
9112 __old_pthread_cond_wait): Removed.
9113 * init.c: Include shlib-compat.h.
9114 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9115 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9116 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9117 ptr___pthread_cond_*_2_0 fields.
9118 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9119 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9120
9121 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9122 LIBC_SIGACTION was not yet defined.
9123 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9124 [!defined LIBC_SIGACTION] (__sigaction): New function and
9125 libc_hidden_weak.
9126 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9127 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9128
91292003-01-02 Jakub Jelinek <jakub@redhat.com>
9130
9131 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9132
05df18c3
UD
91332003-01-02 Ulrich Drepper <drepper@redhat.com>
9134
9135 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9136 New, larger type definition.
9137 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9138 implementation.
9139 * Versions [libpthread]: Add definitions for new pthread_cond_*
9140 interfaces for version GLIBC_2.3.2.
9141 * pthread_cond_init.c: Update initialization for new type definition.
9142 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9143 pthread_cond_timedwait, pthread_cond_signal, and
9144 pthread_cond_broadcast. Add old_pthread_cond_init,
9145 old_pthread_cond_destroy, old_pthread_cond_wait,
9146 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9147 old_pthread_cond_broadcast.
9148 * old_pthread_cond_broadcast.c: New file.
9149 * old_pthread_cond_destroy.c: New file.
9150 * old_pthread_cond_init.c: New file.
9151 * old_pthread_cond_signal.c: New file.
9152 * old_pthread_cond_timedwait.c: New file.
9153 * old_pthread_cond_wait.c: New file.
9154 * pthreadP.h: Add prototypes for the compatibility interfaces.
9155
9156 * pthread_cond_destroy.c: Don't include <errno.h>.
9157
fd8979e4
UD
91582003-01-01 Ulrich Drepper <drepper@redhat.com>
9159
9160 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9161 unnecessary zero offset when addressing MUTEX.
9162
6d6ee629
UD
91632002-12-31 Ulrich Drepper <drepper@redhat.com>
9164
9165 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9166 __register_atfork.
9167 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9168 for __register_atfork.
9169
a4baf360
UD
91702002-12-31 Jakub Jelinek <jakub@redhat.com>
9171
9172 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9173 instead of ASSEMBLER test macro.
9174
9175 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9176 __libc_current_sigrtmax): Add libc_hidden_def.
9177
9178 * sysdeps/pthread/list.h: Remove assert.h include.
9179
e9395a94
UD
91802002-12-31 Ulrich Drepper <drepper@redhat.com>
9181
9182 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9183 __pthread_initialize_minimal_internal not
9184 __pthread_initialize_minimal.
9185
89d6e444
UD
91862002-12-30 Ulrich Drepper <drepper@redhat.com>
9187
416d2de6
UD
9188 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9189 __pthread_initialize_minimal as hidden.
9190
89d6e444
UD
9191 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9192 constructor.
9193
91942002-12-31 Jakub Jelinek <jakub@redhat.com>
9195
9196 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9197 $(common-objpfx)format.lds, include that into the output script.
9198 Fix comment.
9199 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9200
8cac677c
UD
92012002-12-28 Andreas Jaeger <aj@suse.de>
9202
9203 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9204 nsec resolution changes.
9205 (xstat64_conv): Likewise.
9206 (xstat32_conv): Likewise.
9207 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9208 struct kernel_stat.
9209 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9210 structs stat and stat64.
9211 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 9212 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 9213
49e9f864
UD
92142002-12-30 Jakub Jelinek <jakub@redhat.com>
9215
9216 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9217 argument.
9218 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9219 (pthread_exit): Use strong_alias to avoid warnings.
9220 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9221 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9222 ptr___pthread_attr_init_2_*.
9223 * init.c (pthread_functions): Adjust.
9224
bab09b26
UD
92252002-12-29 Ulrich Drepper <drepper@redhat.com>
9226
598d7a42
UD
9227 * forward.c: Make all functions available by default again. It
9228 caused too much trouble.
9229
bab09b26
UD
9230 * pt-siglongjmp.c: Removed.
9231
3b7ed871
UD
92322002-12-28 Jakub Jelinek <jakub@redhat.com>
9233
9234 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9235 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9236 * sysdeps/i386/Makefile: New file.
9237 * sysdeps/i386/tcb-offsets.sym: New file.
9238 * sysdeps/pthread/tcb-offsets.h: New file.
9239 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9240 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9241
9242 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9243 __register_atfork...
9244 (GLIBC_2.3.2): ...here.
9245
92462002-12-28 Ulrich Drepper <drepper@redhat.com>
9247
9248 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9249 pthread_attr_setstackaddr with __attribute_deprecated__.
9250
270d9d47
UD
92512002-12-27 Jakub Jelinek <jakub@redhat.com>
9252
9253 * pt-system.c (system): Remove cancellation handling.
9254 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9255 cancellation routines.
9256
131fd126
UD
92572002-12-28 Ulrich Drepper <drepper@redhat.com>
9258
afb2e954
UD
9259 * descr.h: Include <dl-sysdep.h>.
9260 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
9261 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9262 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9263 (SYSINFO_OFFSEET): Likewise.
9264
92652002-12-27 Jakub Jelinek <jakub@redhat.com>
9266
9267 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9268 Define.
9269 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9270 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9271 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9272 (USE_DL_SYSINFO): Undef.
9273
92742002-12-22 Jakub Jelinek <jakub@redhat.com>
9275
9276 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9277 $(common-objpfx)libc.so.
9278 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9279 it is bigger than pipe buffer size even on arches with bigger
9280 page size.
9281 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9282
a218c9cf
UD
92832002-12-25 Ulrich Drepper <drepper@redhat.com>
9284
9285 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9286 correct errno access for case that USE___THREAD is not defined.
9287
015a2dc9
UD
92882002-12-24 Ulrich Drepper <drepper@redhat.com>
9289
9290 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9291 Patch by Marijn Ros <marijn@mad.scientist.com>.
9292
5220f9ac
RM
92932002-12-22 Roland McGrath <roland@redhat.com>
9294
9295 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9296
1561bf63
UD
92972002-12-20 Ulrich Drepper <drepper@redhat.com>
9298
9299 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9300
3325198e
UD
93012002-12-19 Ulrich Drepper <drepper@redhat.com>
9302
057c823f
UD
9303 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9304 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9305 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9306
097eca29
UD
9307 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9308 of int $0x80.
9309 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9310 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9311 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9312 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9313 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9314 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9315 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9316 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9317
9318 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9319 sysenter.
9320 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9321
9322 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9323
5f5843e3
UD
9324 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9325 in new TCB.
9326 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9327 that sysinfo is properly initialized.
9328 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9329 to 1 only for ld.so.
9330
3325198e
UD
9331 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9332 RTLD_CORRECT_DYNAMIC_WEAK.
9333
74e8f2dc
UD
93342002-12-19 Jakub Jelinek <jakub@redhat.com>
9335
9336 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9337 Use return 0 as 6th argument to FORWARD4.
9338 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9339
df45b31e
UD
93402002-12-18 Ulrich Drepper <drepper@redhat.com>
9341
9342 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9343 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9344 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9345 (INIT_SYSINFO): New #define.
9346 (TLS_TP_INIT): Use INIT_SYSINFO.
9347 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9348 At test to make sure SYSINFO_OFFSET value is correct.
9349 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9350
3d539579
UD
93512002-12-18 Jakub Jelinek <jakub@redhat.com>
9352
9353 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9354 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9355 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9356 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9357 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9358 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9359 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9360
d7913e0e
UD
93612002-12-18 Ulrich Drepper <drepper@redhat.com>
9362
f051627f
UD
9363 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9364 macro instead of using int $0x80 directly.
9365
d7913e0e
UD
9366 * sysdeps/pthread/bits/stdio-lock.h: New file.
9367 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9368 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9369 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9370 * Makefile (routines): Add libc-lowlevelmutex.
9371
9372 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9373 __i686.get_pc_thunk.dx.
9374
f077a4a9
UD
93752002-12-17 Jakub Jelinek <jakub@redhat.com>
9376
9377 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9378 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9379 ($(objpfx)tst-cancel-wrappers.out): New rule.
9380 * tst-cancel-wrappers.sh: New test.
9381 * tst-locale1.c: Include signal.h.
9382 (uselocale): Test static linking of __libc_current_sigrt*.
9383
93842002-12-17 Ulrich Drepper <drepper@redhat.com>
9385
9386 * Makefile (tests): Add tst-cancel6.
9387 * tst-cancel6.c: New file
9388
bd499a3b
UD
93892002-12-17 Jakub Jelinek <jakub@redhat.com>
9390
9391 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9392 Define meaningfully for assembler as well.
9393 * pthreadP.h (struct pthread_functions): Remove
9394 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9395 and ptr_pthread_attr_init_2_1 fields.
9396 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9397 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9398 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9399 (FORWARD3): Define using FORWARD4.
9400 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9401 versions.
9402 * pt-system.c: Remove duplicate stdlib.h include.
9403
0a1063f4
UD
94042002-12-16 Ulrich Drepper <drepper@redhat.com>
9405
87d60668
UD
9406 * sem_init.c: Define sem_init@GLIBC_2.0.
9407 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9408 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9409
0a1063f4
UD
9410 * flockfile.c: Moved to...
9411 * sysdeps/pthread/flockfile.c: ...here. New file.
9412 * funlockfile.c: Moved to...
9413 * sysdeps/pthread/funlockfile.c: ...here. New file.
9414 * ftrylockfile.c: Moved to...
9415 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9416
9634cf9d
UD
94172002-12-16 Jakub Jelinek <jakub@redhat.com>
9418
9419 * libc-cancellation.c: Guard both function with
9420 #if !defined NOT_IN_libc.
9421 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9422 automatically provided pthread wrappers.
9423 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9424 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9425 nor in libpthread.
9426 * pt-open.c: Removed.
9427 * pt-fcntl.c: Removed.
9428 * pt-fsync.c: Removed.
9429 * pt-lseek.c: Removed.
9430 * pt-msgrcv.c: Removed.
9431 * pt-msgsnd.c: Removed.
9432 * pt-msync.c: Removed.
9433 * pt-nanosleep.c: Removed.
9434 * pt-open64.c: Removed.
9435 * pt-pause.c: Removed.
9436 * pt-pread.c: Removed.
9437 * pt-pread64.c: Removed.
9438 * pt-pwrite.c: Removed.
9439 * pt-pwrite64.c: Removed.
9440 * pt-read.c: Removed.
9441 * pt-recv.c: Removed.
9442 * pt-recvfrom.c: Removed.
9443 * pt-recvmsg.c: Removed.
9444 * pt-send.c: Removed.
9445 * pt-sendto.c: Removed.
9446 * pt-sigtimedwait.c: Removed.
9447 * pt-sigwait.c: Removed.
9448 * pt-wait.c: Removed.
9449 * pt-waitpid.c: Removed.
9450 * pt-write.c: Removed.
9451 * pt-accept.c: Removed.
9452 * pt-close.c: Removed.
9453 * pt-connect.c: Removed.
9454 * pt-lseek64.c: Removed.
9455 * pt-sendmsg.c: Removed.
9456 * pt-tcdrain.c: Removed.
9457
6ee8d334
UD
94582002-12-15 Ulrich Drepper <drepper@redhat.com>
9459
81fa9371
UD
9460 * init.c (__pthread_initialize_minimal_internal): Renamed from
9461 __pthread_initialize_minimal. Make old name an alias. This
9462 converts a normal relocation into a relative relocation.
9463
f3015aa5
UD
9464 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9465
4cbc1950
UD
9466 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9467 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9468 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9469 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9470 pt-sigwaitinfo, pt-waitid, and pt-writev.
9471 * pt-creat.c: Removed.
9472 * pt-poll.c: Removed.
9473 * pt-pselect.c: Removed.
9474 * pt-readv.c: Removed.
9475 * pt-select.c: Removed.
9476 * pt-sigpause.c: Removed.
9477 * pt-sigsuspend.c: Removed.
9478 * pt-sigwaitinfo.c: Removed.
9479 * pt-waitid.c: Removed.
9480 * pt-writev.c: Removed.
9481
8454830b
UD
9482 * init.c (pthread_functions): New variable.
9483 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9484 (or NULL) to __libc_pthread_init.
9485 * forward.c: Rewrite to use __libc:pthread_functions array to get
9486 function addresses.
9487 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9488 prototype.
9489 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9490 Take new parameter. Copy content of variable pointed to by it
9491 to __libc_pthread_init.
9492
9493 * pthreadP.h (struct pthread_functions): New type.
9494 (__libc_pthread_init): Declare.
9495
9496 * pthread_attr_destroy.c: Add namespace protected alias.
9497 * pthread_attr_getdetachstate.c: Likewise.
9498 * pthread_attr_getinheritsched.c: Likewise.
9499 * pthread_attr_getschedparam.c: Likewise.
9500 * pthread_attr_getschedpolicy.c: Likewise.
9501 * pthread_attr_getscope.c: Likewise.
9502 * pthread_attr_setdetachstate.c: Likewise.
9503 * pthread_attr_setinheritsched.c: Likewise.
9504 * pthread_attr_setschedparam.c: Likewise.
9505 * pthread_attr_setschedpolicy.c: Likewise.
9506 * pthread_attr_setscope.c: Likewise.
9507 * pthread_cond_broadcast.c: Likewise.
9508 * pthread_cond_destroy.c: Likewise.
9509 * pthread_cond_init.c: Likewise.
9510 * pthread_cond_signal.c: Likewise.
9511 * pthread_cond_wait.c: Likewise.
9512 * pthread_condattr_destroy.c: Likewise.
9513 * pthread_condattr_init.c: Likewise.
9514 * pthread_equal.c: Likewise.
9515 * pthread_exit.c: Likewise.
9516 * pthread_getschedparam.c: Likewise.
9517 * pthread_self.c: Likewise.
9518 * pthread_setcancelstate.c: Likewise.
9519 * pthread_setschedparam.c: Likewise.
9520 * pthread_mutex_destroy.c: Likewise.
9521 * pthread_mutex_init.c: Likewise.
9522 * pthreadP.h: Add prototypes for the aliases.
9523
0d5f4929
UD
9524 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9525 multiple_threads member in correct TCB to 1.
9526
6ee8d334
UD
9527 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9528 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9529 member of thread decriptor, otherwise return unconditionally 1.
9530
2fb6444d
UD
95312002-12-14 Ulrich Drepper <drepper@redhat.com>
9532
9533 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9534 regular Linux version. Remove file.
9535 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9536 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9537 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9538 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9539 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9540 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9541 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9542 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9543 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9544 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9545 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9546 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9547 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9548 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9549 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9550 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9551 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9552 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9553 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9554 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9555 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9556 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9557 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9558 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9559 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9560 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9561 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9562 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9563 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9564 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9565
86b2dc40
UD
95662002-12-14 Jakub Jelinek <jakub@redhat.com>
9567
9568 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9569 * sysdeps/unix/sysv/linux/open.c: Removed.
9570 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9571 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9572 * sysdeps/unix/sysv/linux/msync.c: Removed.
9573 * sysdeps/unix/sysv/linux/read.c: Removed.
9574 * sysdeps/unix/sysv/linux/close.c: Removed.
9575 * sysdeps/unix/sysv/linux/creat.c: Removed.
9576 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9577 * sysdeps/unix/sysv/linux/pause.c: Removed.
9578 * sysdeps/unix/sysv/linux/select.c: Removed.
9579 * sysdeps/unix/sysv/linux/write.c: Removed.
9580
9d263d72
UD
95812002-12-14 Ulrich Drepper <drepper@redhat.com>
9582
9583 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9584 element in TCB to see whether locking is needed.
9585
9586 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9587 MULTIPLE_THREADS_OFFSET value is correct.
9588
9589 * sysdeps/unix/sysv/linux/close.c: New file.
9590 * sysdeps/unix/sysv/linux/connect.S: New file.
9591 * sysdeps/unix/sysv/linux/creat.c: New file.
9592 * sysdeps/unix/sysv/linux/fsync.c: New file.
9593 * sysdeps/unix/sysv/linux/llseek.c: New file.
9594 * sysdeps/unix/sysv/linux/lseek.c: New file.
9595 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9596 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9597 * sysdeps/unix/sysv/linux/msync.c: New file.
9598 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9599 * sysdeps/unix/sysv/linux/open.c: New file.
9600 * sysdeps/unix/sysv/linux/open64.c: New file.
9601 * sysdeps/unix/sysv/linux/pause.c: New file.
9602 * sysdeps/unix/sysv/linux/poll.c: New file.
9603 * sysdeps/unix/sysv/linux/pread.c: New file.
9604 * sysdeps/unix/sysv/linux/pread64.c: New file.
9605 * sysdeps/unix/sysv/linux/pselect.c: New file.
9606 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9607 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9608 * sysdeps/unix/sysv/linux/readv.c: New file.
9609 * sysdeps/unix/sysv/linux/recv.S: New file.
9610 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9611 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9612 * sysdeps/unix/sysv/linux/select.c: New file.
9613 * sysdeps/unix/sysv/linux/send.S: New file.
9614 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9615 * sysdeps/unix/sysv/linux/sendto.S: New file.
9616 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9617 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9618 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9619 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9620 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9621 * sysdeps/unix/sysv/linux/system.c: New file.
9622 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9623 * sysdeps/unix/sysv/linux/wait.c: New file.
9624 * sysdeps/unix/sysv/linux/waitid.c: New file.
9625 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9626 * sysdeps/unix/sysv/linux/writev.c: New file.
9627 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9628
9629 * pt-readv.c: Fix comment.
9630
96312002-12-14 Jakub Jelinek <jakub@redhat.com>
9632
9633 * tst-cleanup1.c: Include stdlib.h.
9634
9635 * tst-cancel5.c: New test.
9636 * Makefile (tests): Add tst-cancel5.
9637 (tst-cancel5): Link against libc.so libpthread.so in that order.
9638
9ae0909b
UD
96392002-12-13 Ulrich Drepper <drepper@redhat.com>
9640
b7bdd9c4
UD
9641 * forward.c (test_loaded): Prevent recursive calls.
9642
9ae0909b
UD
9643 * Makefile (routines): Add libc-cancellation.
9644 * libc-cancellation.c: New file.
9645 * descr.h (struct pthread): Add multiple_threads field.
9646 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9647 new thread descriptor to 1.
9648 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9649 Initialize multiple_thread field after successful thread creation.
9650 * cancellation.c (__do_cancel): Move to pthreadP.h.
9651 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9652 (__pthread_disable_asynccancel): Add internal_function attribute.
9653 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9654 * pthread_setcancelstate.c: Likewise.
9655 * pthread_setcanceltype.c: Likewise.
9656 * pthread_exit.c: Likewise.
9657 * pthreadP.h (CANCELLATION_P): Likewise.
9658 (__do_cancel): Define as static inline.
9659 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9660 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9661 declarations.
9662 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9663 fields. Define MULTIPLE_THREADS_OFFSET.
9664 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9665 declaration.
9666 * sysdeps/unix/sysv/linux/accept.S: New file.
9667 * sysdeps/unix/sysv/linux/read.c: New file.
9668 * sysdeps/unix/sysv/linux/write.c: New file.
9669 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9670 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9671 initialization of __libc_locking_needed.
9672 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9673 __libc_locking_needed, use multiple_threads field in TCB.
9674 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9675
22f20674
UD
96762002-12-12 Ulrich Drepper <drepper@redhat.com>
9677
2ad2e1e7
UD
9678 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9679 version.
9680 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9681
22f20674
UD
9682 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9683 access to __libc_locking_needed for PIC.
9684
aa80bf86
UD
96852002-12-12 Jakub Jelinek <jakub@redhat.com>
9686
9687 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9688 declare for libc.so.
9689 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9690 expression.
9691 (__libc_lock_lock): Put into statement expression.
9692 (__libc_lock_unlock): Remove trailing semicolon.
9693 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9694
24021373
RM
96952002-12-12 Roland McGrath <roland@redhat.com>
9696
9697 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9698 "m" constraint to refer to __libc_locking_needed. Declare it here.
9699
14e7aece
UD
97002002-12-12 Ulrich Drepper <drepper@redhat.com>
9701
9702 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9703 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9704 Initialize __libc_locking_needed.
9705 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9706 instead of __register_pthread_fork_handler.
9707 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9708 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9709 fork-gen with libc_pthread_init.
9710 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9711 of __register_pthread_fork_handler.
9712 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9713 of __register_pthread_fork_handler.
9714 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9715 __libc_locking_needed to determine whether lock prefix can be avoided.
9716 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9717
85631c8e
UD
97182002-12-11 Ulrich Drepper <drepper@redhat.com>
9719
da63009e
UD
9720 * Makefile (tests): Add tst-cleanup1.
9721 * tst-cleanup1.c: New file.
9722 * cancellation.c (__cleanup_thread): Removed.
9723 (__do_cancel): Remove call to __cleanup_thread.
9724 * pthreadP.h: Remove __cleanup_thread prorotype.
9725
000160a2
UD
9726 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9727 Remember function and argument even if cancellation handler
9728 function is not available.
9729 (__libc_cleanup_region_end): Execute registered function directly if
9730 pthread functions are not available.
9731 (__libc_cleanup_end): Likewise.
9732
85631c8e
UD
9733 * init.c (__pthread_initialize_minimal): Fix initialization in
9734 static lib by preventing gcc from being too clever.
9735
dce8f2b6
UD
97362002-12-10 Ulrich Drepper <drepper@redhat.com>
9737
34a075be
UD
9738 * init.c (__pthread_initialize_minimal): Remove unneccesary
9739 sigaddset call.
9740
dce8f2b6
UD
9741 * Makefile (tests): We can run tst-locale2 now.
9742
e5e45b53
UD
97432002-12-09 Ulrich Drepper <drepper@redhat.com>
9744
9745 * Versions: Remove duplicated sigwait entry.
9746
bdb04f92
UD
97472002-12-08 Ulrich Drepper <drepper@redhat.com>
9748
1e506629
UD
9749 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9750 inside libpthread.
9751
a3957dd5
UD
9752 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9753
bdb04f92
UD
9754 * pthreadP.h: Declare __pthread_enable_asynccancel and
9755 __pthread_disable_asynccancel.
9756 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9757 (CANCEL_RESET): Use __pthread_disable_asynccancel.
9758 * cancellation.c (__pthread_enable_asynccancel): New function.
9759 (__pthread_disable_asynccancel): New function.
9760 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9761 * pt-close.c: Likewise.
9762 * pt-connect.c: Likewise.
9763 * pt-creat.c: Likewise.
9764 * pt-fcntl.c: Likewise.
9765 * pt-fsync.c: Likewise.
9766 * pt-lseek.c: Likewise.
9767 * pt-lseek64.c: Likewise.
9768 * pt-msgrcv.c: Likewise.
9769 * pt-msgsnd.c: Likewise.
9770 * pt-msync.c: Likewise.
9771 * pt-nanosleep.c: Likewise.
9772 * pt-open.c: Likewise.
9773 * pt-open64.c: Likewise.
9774 * pt-pause.c: Likewise.
9775 * pt-poll.c: Likewise.
9776 * pt-pread.c: Likewise.
9777 * pt-pread64.c: Likewise.
9778 * pt-pselect.c: Likewise.
9779 * pt-pwrite.c: Likewise.
9780 * pt-pwrite64.c: Likewise.
9781 * pt-read.c: Likewise.
9782 * pt-readv.c: Likewise.
9783 * pt-recv.c: Likewise.
9784 * pt-recvfrom.c: Likewise.
9785 * pt-recvmsg.c: Likewise.
9786 * pt-select.c: Likewise.
9787 * pt-send.c: Likewise.
9788 * pt-sendmsg.c: Likewise.
9789 * pt-sendto.c: Likewise.
9790 * pt-sigpause.c: Likewise.
9791 * pt-sigsuspend.c: Likewise.
9792 * pt-sigtimedwait.c: Likewise.
9793 * pt-sigwait.c: Likewise.
9794 * pt-sigwaitinfo.c: Likewise.
9795 * pt-system.c: Likewise.
9796 * pt-tcdrain.c: Likewise.
9797 * pt-wait.c: Likewise.
9798 * pt-waitid.c: Likewise.
9799 * pt-waitpid.c: Likewise.
9800 * pt-write.c: Likewise.
9801 * pt-writev.c: Likewise.
a3957dd5
UD
9802 * pthread_join.c: Likewise.
9803 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
9804
9805 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9806 (__xpg_sigpause): New function.
9807 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9808
6ccb3834
UD
98092002-12-07 Ulrich Drepper <drepper@redhat.com>
9810
09efc3ba
UD
9811 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9812
9813 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9814 _GI_pthread_cleanup_pop to pthreadP.h.
9815
9816 * ftrylockfile.c: Use _IO_lock_trylock instead of
9817 pthread_mutex_trylock.
9818
9819 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9820 (CANCEL_RESET): Likewise.
9821 (__pthread_setcanceltype_): Declare.
9822 (__pthread_mutex_lock_internal): Declare.
9823 (__pthread_mutex_unlock_internal): Declare.
9824 (__pthread_once_internal): Declare.
9825 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9826 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9827
9828 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9829 and pthread_mutex_unlock.
9830 * pthread_cond_wait.c: Likewise.
9831 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9832 * pthread_mutex_unlock.c: Likewise.
9833
9834 * pthread_setcanceltype.c: Add additional alias
9835 __pthread_setcanceltype.
9836
9837 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9838 * sem_open.c (sem_open): Likewise.
9839 Use __libc_open, __libc_write, and __libc_close instead of
9840 open, write, and close respectively.
9841
9842 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9843 Rewrite as statement expression since it must return a value.
9844
9845 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9846 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9847 __pthread_kill.
9848
9849 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9850 alias __pthread_once_internal.
9851
6ccb3834
UD
9852 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9853
d3c9f895
UD
98542002-12-06 Ulrich Drepper <drepper@redhat.com>
9855
4614167a
UD
9856 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9857 * tst-stdio1.c: New file.
9858 * tst-stdio2.c: New file.
9859
a4548cea
UD
9860 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9861
d3c9f895
UD
9862 * Makefile (tests): Comment out tst-locale2 for now.
9863 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9864
9865 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9866 -D_IO_MTSAFE_IO.
9867 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9868 Use _IO_lock_init instead of explicit assignment.
9869
9870 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9871 Define __libc_lock_* and __libc_lock_recursive macros with
9872 lowlevellock macros, not pthread mutexes.
9873
9874 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
9875 of pthread_mutex_lock.
9876 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
9877 instead of pthread_mutex_unlock.
9878
fde89ad0
RM
98792002-12-06 Roland McGrath <roland@redhat.com>
9880
9881 * allocatestack.c (__stack_user): Use uninitialized defn.
9882 * init.c (__pthread_initialize_minimal): Initialize it here.
9883
11767d47
RM
98842002-12-05 Roland McGrath <roland@redhat.com>
9885
fde89ad0
RM
9886 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9887 string.
9888 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9889
11767d47
RM
9890 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9891 missing & here too.
9892
440d8bc2
UD
98932002-12-05 Ulrich Drepper <drepper@redhat.com>
9894
9895 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9896 lowlevellock.
9897 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9898 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9899 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9900 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9901 for __libc_lock_* macros.
9902 * Makefile (routines): Add libc-lowlevellock.
9903
99042002-10-09 Roland McGrath <roland@redhat.com>
9905
9906 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9907 Under [__PIC__], call the function via the pointer fetched for
9908 comparison rather than a call by name that uses the PLT.
9909 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9910 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9911 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9912 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9913 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9914
d5ed0118
RM
99152002-12-04 Roland McGrath <roland@redhat.com>
9916
9917 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9918
9919 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9920 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9921
9922 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9923
eaa4099f
UD
99242002-12-04 Ulrich Drepper <drepper@redhat.com>
9925
9926 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9927 a completely opaque, non-integer type.
9928 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9929
33b5d0cc
UD
99302002-12-05 Jakub Jelinek <jakub@redhat.com>
9931
9932 * sysdeps/i386/tls.h: Include stdlib.h.
9933 * sysdeps/x86_64/tls.h: Likewise.
9934
7a5cdb30
UD
99352002-12-04 Ulrich Drepper <drepper@redhat.com>
9936
c4a6d859
UD
9937 * Makefile (tests): Add tst-locale2.
9938 (tests-static): Likewise.
9939 * tst-locale2.c: New file.
9940
7a5cdb30
UD
9941 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9942 volatile and add memory clobbers to lock operations.
9943
d82d5d12
UD
99442002-12-03 Ulrich Drepper <drepper@redhat.com>
9945
69cae3cf
UD
9946 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9947 * sysdeps/i386/i486/bits/atomic.h: New file.
9948 * sysdeps/i386/i586/bits/atomic.h: New file.
9949 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9950 include i486 version.
9951 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9952 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 9953 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 9954
e4044c01
UD
9955 * allocatestack.c (get_cached_stack): Don't crash if we first
9956 found a stack with a larger size then needed.
9957 Reported by Hui Huang <hui.huang@sun.com>.
9958
d82d5d12
UD
9959 * Makefile (tests): Add tst-sysconf.
9960 * tst-sysconf.c: New file.
9961
9962 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9963 PTHREAD_THREADS_MAX.
9964
fa9a4ff0
RM
99652002-12-02 Roland McGrath <roland@redhat.com>
9966
9967 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9968 Declare using hidden_proto instead of attribute_hidden, so there are
9969 non-.hidden static symbols for gdb to find.
9970 (__pthread_keys): Likewise.
9971 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9972 * allocatestack.c (__stack_user): Likewise.
9973 * pthread_create.c (__pthread_keys): Likewise.
9974 (__nptl_threads_events, __nptl_last_event): Make these static instead
9975 of hidden.
9976 * pthread_key_create.c (__pthread_pthread_keys_max,
9977 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9978
91949a33
UD
99792002-12-02 Ulrich Drepper <drepper@redhat.com>
9980
c22b52fa
UD
9981 * Makefile (tests): Add tst-locale1. If buid-static is yes link
9982 statically.
9983 * tst-locale1.c: New file.
9984
beb6aa41
UD
9985 * pthread_cond_timedwait.c: Include <stdlib.h>.
9986
91949a33
UD
9987 * Makefile (tests): Add tst-fork2 and tst-fork3.
9988 * tst-fork2.c: New file.
9989 * tst-fork3.c: New file.
9990
654dff90
UD
99912002-11-28 Ulrich Drepper <drepper@redhat.com>
9992
cb0e76b4
UD
9993 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9994
9995 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9996 require it to 200112L.
9997
9998 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9999 instruction only if HAVE_CMOV is defined.
10000 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10001
975aa229
UD
10002 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10003
654dff90
UD
10004 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10005
10006 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10007
10008 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10009
a3931336
UD
100102002-11-27 Ulrich Drepper <drepper@redhat.com>
10011
c10c099c
UD
10012 * sysdeps/x86_64/bits/atomic.h: New file.
10013
10014 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10015 16-bit operations.
10016
dca99d27
UD
10017 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10018 possible since gettid cannot fail.
10019
f78deea6
UD
10020 * sysdeps/x86_64/pthreaddef.h: New file.
10021
10022 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10023
10024 * sysdeps/x86_64/pthread_spin_init.c: New file.
10025 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10026 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10027 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10028
10029 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10030 Add missing lock prefix. Minute optimization.
10031
10032 * tst-spin2.c (main): Also check successful trylock call.
10033
10034 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10035 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10036
10037 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10038 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10039
10040 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10041 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10042 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
10043
10044 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10045 value in case of an error.
10046
a3931336
UD
10047 * sysdeps/x86_64/tls.h: New file.
10048
76a50749
UD
100492002-11-26 Ulrich Drepper <drepper@redhat.com>
10050
117c452c
UD
10051 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10052 takes the array member name and the index as parameters.
10053 (THREAD_SETMEM_NC): Likewise.
10054 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10055 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10056 interfaces.
10057
10058 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10059 to decide which code to use.
10060 (THREAD_SETMEM_NC): Likewise.
10061
76a50749
UD
10062 * allocatestack.c (queue_stack): Don't remove stack from list here.
10063 Do it in the caller. Correct condition to prematurely terminate
10064 loop to free stacks.
10065 (__deallocate_stack): Remove stack from list here.
10066
100672002-11-26 Ulrich Drepper <drepper@redhat.com>
10068
10069 * Makefile (tests): Add tst-stack1.
10070 * tst-stack1.c: New file.
10071
10072 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10073 provided stack.
10074
10075 * pthread_attr_getstack.c: Return bottom of the thread area.
10076
100772002-11-25 Ulrich Drepper <drepper@redhat.com>
10078
10079 * Makefile (libpthread-routines): Add pt-allocrtsig and
10080 pthread_kill_other_threads.
10081 * pt-allocrtsig.c: New file.
10082 * pthread_kill_other_threads.c: New file.
10083 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10084 all three functions.
10085 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10086 allocrtsig.
10087 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10088 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10089 and __libc_allocate_rtsig_private.
10090 * Versions (libpthread): Export pthread_kill_other_threads_np,
10091 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10092
100932002-11-24 Ulrich Drepper <drepper@redhat.com>
10094
10095 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10096 the end of the stack. Adjust computations.
10097 When mprotect call fails dequeue stack and free it.
10098 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10099 attribute.
10100 * pthread_getattr_np.c: Likewise.
10101
10102 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10103 surprises.
10104
101052002-11-23 Ulrich Drepper <drepper@redhat.com>
10106
10107 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10108 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10109
101102002-11-22 Ulrich Drepper <drepper@redhat.com>
10111
10112 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10113 * pthread_setspecific.c: Likewise.
10114
101152002-11-21 Ulrich Drepper <drepper@redhat.com>
10116
10117 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10118 definitions. Get them from the official place.
10119 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10120
10121 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10122 Use new CLONE_ flags in clone() calls.
10123
10124 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10125 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10126
10127 * Versions: Add pthread_* functions for libc.
10128 * forward.c: New file.
10129
10130 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10131 errno-loc.
10132 * herrno.c: New file.
10133 * res.c: New file.
10134
10135 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10136 sem_trywait, and sem_timedwait. Add herrno and res.
10137 * sem_init.c: Don't initialize lock and waiters members.
10138 * sem_open.c: Likewise.
10139 * sem_post.c: Removed.
10140 * sem_wait.c: Removed.
10141 * sem_trywait.c: Removed.
10142 * sem_timedwait.c: Removed.
10143 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10144 Includes full implementations of sem_post, sem_wait, sem_trywait,
10145 and sem_timedwait.
10146 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10147 for new implementation.
10148 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10149 and waiters fields.
10150
10151 * tst-sem3.c: Improve error message.
10152 * tst-signal3.c: Likewise.
10153
10154 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10155 to tell the kernel about the termination futex and to initialize tid
10156 member. Don't initialize main_thread.
10157 * descr.h (struct pthread): Remove main_thread member.
10158 * cancelllation.c (__do_cancel): Remove code handling main thread.
10159 The main thread is not special anymore.
10160
10161 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10162 size of the stacks to stack_cache_actsize.
10163
10164 * pt-readv.c: Add missing "defined".
10165 * pt-sigwait.c: Likewise.
10166 * pt-writev.c: Likewise.
10167
101682002-11-09 Ulrich Drepper <drepper@redhat.com>
10169
10170 * Versions: Export __connect from libpthread.
10171 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10172
10173 * Makefile (libpthread-routines): Add pt-raise.
10174 * sysdeps/unix/sysv/linux/raise.c: New file.
10175 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10176 * sysdeps/generic/pt-raise.c: New file.
10177
10178 * pthread_cond_init.c: Initialize all data elements of the condvar
10179 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10180
10181 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10182 * pthread_create.c: Likewise.
10183
10184 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10185 * tst-key1.c: New file.
10186 * tst-key2.c: New file.
10187 * tst-key3.c: New file.
10188
10189 * Versions: Export pthread_detach for version GLIBC_2.0.
10190 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10191
101922002-11-08 Ulrich Drepper <drepper@redhat.com>
10193
10194 * pthread_key_create.c: Terminate search after an unused key was found.
10195 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10196
10197 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10198 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10199
102002002-10-10 Ulrich Drepper <drepper@redhat.com>
10201
10202 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10203 dynamic lookup for errno in PIC.
10204
10205 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10206 release the stack lock as soon as possible.
10207 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10208 the static TLS block.
10209 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10210
10211 * cancellation.c: Renamed from cancelation.c.
10212 * Makefile: Adjust accordingly.
10213 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10214 * cleanup_defer.c: Use CANCELLATION_P.
10215 * pthread_testcancel.c: Likewise.
10216 * descr.h: Fix spelling in comments.
10217 * init.c: Likewise.
10218 * pthread_getattr_np.c: Likewise.
10219 * pthread_getschedparam.c: Likewise.
10220 * pthread_setschedparam.c: Likewise.
10221 * Versions: Likewise.
10222
10223 * pt-pselect.c: New file.
10224 * Makefile (libpthread-routines): Add pt-pselect.
10225 * Versions: Add pselect.
10226
10227 * tst-cancel4.c: New file.
10228 * Makefile (tests): Add tst-cancel4.
10229
102302002-10-09 Ulrich Drepper <drepper@redhat.com>
10231
10232 * pthread_mutex_lock.c: Always record lock ownership.
10233 * pthread_mutex_timedlock.c: Likewise.
10234 * pthread_mutex_trylock.c: Likewise.
10235
10236 * pt-readv.c: New file.
10237 * pt-writev.c: New file.
10238 * pt-creat.c: New file.
10239 * pt-msgrcv.c: New file.
10240 * pt-msgsnd.c: New file.
10241 * pt-poll.c: New file.
10242 * pt-select.c: New file.
10243 * pt-sigpause.c: New file.
10244 * pt-sigsuspend.c: New file.
10245 * pt-sigwait.c: New file.
10246 * pt-sigwaitinfo.c: New file.
10247 * pt-waitid.c: New file.
10248 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10249 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10250 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10251 * Versions: Add all the new functions.
10252
10253 * tst-exit1.c: New file.
10254 * Makefile (tests): Add tst-exit1.
10255
10256 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10257
102582002-10-08 Ulrich Drepper <drepper@redhat.com>
10259
10260 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10261
10262 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10263 call. pthread_join is an official cancellation point.
10264 * pthread_timedjoin.c: Likewise.
10265
10266 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10267 and the condvar's mutex are retrieved.
10268 * pthread_cond_timedwait.c: Likewise.
10269 Reported by dice@saros.East.Sun.COM.
10270
102712002-10-07 Ulrich Drepper <drepper@redhat.com>
10272
10273 * pthreadP.h: Cut out all type definitions and move them...
10274 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10275 * pthreadP.h: Include <internaltypes.h>.
10276
10277 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10278 performance tweaks.
10279
10280 * sem_trywait.c: Shuffle #includes around to get right order.
10281 * sem_timedwait.c: Likewise.
10282 * sem_post.c: Likewise.
10283 * sem_wait.c: Likewise.
10284
10285 * nptl 0.3 released.
10286
10287 * Makefile (tests): Add tst-signal3.
10288 * tst-signal3.c: New file.
10289
102902002-10-05 Ulrich Drepper <drepper@redhat.com>
10291
10292 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10293 the asms modify the sem object.
10294 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10295
10296 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10297 the actual members.
10298 * pthreadP.h (struct sem): New type. Actual semaphore type.
10299 * semaphoreP.h: Include pthreadP.h.
10300 * sem_getvalue.c: Adjust to sem_t change.
10301 * sem_init.c: Likewise.
10302 * sem_open.c: Likewise.
10303 * sem_post.c: Likewise.
10304 * sem_timedwait.c: Likewise.
10305 * sem_trywait.c: Likewise.
10306 * sem_wait.c: Likewise.
10307
103082002-10-04 Ulrich Drepper <drepper@redhat.com>
10309
10310 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10311 * tst-basic2.c: New file.
10312 * tst-exec1.c: New file.
10313 * tst-exec2.c: New file.
10314 * tst-exec3.c: New file.
10315
10316 * tst-fork1.c: Remove extra */.
10317
10318 * nptl 0.2 released. The API for IA-32 is complete.