]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
* posix/Makefile ($(objpfx)getconf.speclist): Fix typo.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
64f6281c
UD
12007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2
3 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
4 definitions for private futexes.
5 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
6 kernel-features.h and lowlevellock.h. Use private futexes if
7 they are available.
8 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
9 (__lll_mutex_lock_wait): Rename to
10 (__lll_lock_wait): ... this. Don't compile in for libc.so.
11 (__lll_mutex_timedlock_wait): Rename to ...
12 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
13 Don't compile in for libc.so.
14 (__lll_mutex_unlock_wake): Rename to ...
15 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
16 (__lll_timedwait_tid): Use __NR_gettimeofday.
17 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
18 the header from assembler. Renamed all lll_mutex_* resp.
19 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
20 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
21 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
22 Define.
23 (__lll_lock_wait_private): Add prototype.
24 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
25 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
26 __lll_unlock_wake): Likewise.
27 (lll_lock): Add private argument. Call __lll_lock_wait_private
28 if private is constant LLL_PRIVATE.
29 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
30 lll_timedlock, lll_robust_timedlock): Add private argument.
31 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
32 if private is constant LLL_PRIVATE.
33 (lll_robust_unlock, lll_robust_dead): Add private argument.
34 (lll_lock_t): Remove.
35 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
36 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
37 lll_cond_wake, lll_cond_broadcast): Remove.
38 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
39 kernel-features.h and lowlevellock.h.
40 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
41 (LOAD_FUTEX_WAIT): Define.
42 (__lll_robust_mutex_lock_wait): Rename to ...
43 (__lll_robust_lock_wait): ... this. Add private argument.
44 Use LOAD_FUTEX_WAIT macro.
45 (__lll_robust_mutex_timedlock_wait): Rename to ...
46 (__lll_robust_timedlock_wait): ... this. Add private argument.
47 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
48 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
49 lowlevellock.h.
50 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
51 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
52 __lll_mutex_{lock,unlock}_*.
53 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
54 lowlevellock.h and pthread-errnos.h.
55 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
56 FUTEX_CMP_REQUEUE, EINVAL): Remove.
57 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
58 __lll_mutex_{lock,unlock}_*.
59 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
60 lowlevellock.h and pthread-errnos.h.
61 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
62 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
63 __lll_mutex_{lock,unlock}_*.
64 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
65 lowlevellock.h.
66 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
67 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
68 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
69 (__condvar_tw_cleanup): Likewise.
70 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
71 lowlevellock.h.
72 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
73 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
74 __lll_mutex_{lock,unlock}_*.
75 ( __condvar_w_cleanup): Likewise.
76 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
77 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
78 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
79 lowlevellock.h.
80 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
81 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
82 __lll_mutex_{lock,unlock}_*.
83 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
84 lowlevellock.h.
85 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
86 FUTEX_PRIVATE_FLAG): Remove.
87 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
88 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
89 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
90 lowlevellock.h.
91 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
92 FUTEX_PRIVATE_FLAG): Remove.
93 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
94 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
95 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
96 lowlevellock.h.
97 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
98 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
99 __lll_mutex_{lock,unlock}_*.
100 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
101 lowlevellock.h.
102 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
103 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
104 __lll_mutex_{lock,unlock}_*.
105 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
106 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
107 (__new_sem_post): Use standard initial exec code sequences.
108 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
109 lowlevellock.h.
110 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
111 FUTEX_PRIVATE_FLAG): Remove.
112 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
113 exec code sequences.
114 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
115 (__new_sem_trywait): Use standard initial exec code sequences.
116 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
117 (__new_sem_wait): Use standard initial exec code sequences.
118
e51deae7
UD
1192007-07-31 Anton Blanchard <anton@samba.org>
120
121 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
122 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
123 atomic_full_barrier.
124
1252007-07-31 Jakub Jelinek <jakub@redhat.com>
126
127 * allocatestack.c (stack_cache_lock): Change type to int.
128 (get_cached_stack, allocate_stack, __deallocate_stack,
129 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
130 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
131 as second argument to lll_lock and lll_unlock macros on
132 stack_cache_lock.
133 * pthread_create.c (__find_in_stack_list): Likewise.
134 (start_thread): Similarly with pd->lock. Use lll_robust_dead
135 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
136 as second argument.
137 * descr.h (struct pthread): Change lock and setxid_futex field
138 type to int.
139 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
140 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
141 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
142 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
143 Likewise.
144 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
145 * pthread_cond_init.c (__pthread_cond_init): Likewise.
146 * pthreadP.h (__attr_list_lock): Change type to int.
147 * pthread_attr_init.c (__attr_list_lock): Likewise.
148 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
149 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
150 lll_{,un}lock.
151 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
152 also for lll_futex_{wake,wait}.
153 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
154 a pointer to const.
155 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
156 LLL_SHARED as second argument to lll_{,un}lock.
157 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
158 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
159 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
160 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
161 Likewise.
162 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
163 as second argument to lll_{,un}lock macros on pd->lock.
164 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
165 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
166 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
167 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
168 Likewise.
169 * sysdeps/pthread/createthread.c (do_clone, create_thread):
170 Likewise.
171 * pthread_once.c (once_lock): Change type to int.
172 (__pthread_once): Pass LLL_PRIVATE as second argument to
173 lll_{,un}lock macros on once_lock.
174 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
175 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
176 rwlock->__data.__shared as second argument to them and similarly
177 for lll_futex_w*.
178 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
179 Likewise.
180 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
181 Likewise.
182 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
183 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
184 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
185 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
186 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
187 to lll_{,un}lock macros on __sem_mappings_lock.
188 * sem_open.c (check_add_mapping): Likewise.
189 (__sem_mappings_lock): Change type to int.
190 * semaphoreP.h (__sem_mappings_lock): Likewise.
191 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
192 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
193 instead of lll_*mutex_*, pass LLL_SHARED as last
194 argument.
195 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
196 pass LLL_SHARED as last argument.
197 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
198 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
199 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
200 pass LLL_SHARED as last argument.
201 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
202 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
203 LLL_SHARED as last argument.
204 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
205 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
206 Similarly.
207 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
208 __libc_lock_lock_recursive, __libc_lock_unlock,
209 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
210 argument to lll_{,un}lock.
211 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
212 _IO_lock_unlock): Likewise.
213 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
214 compound literal.
215 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
216 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
217 __fork_lock.
218 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
219 free_mem): Likewise.
220 (__fork_lock): Change type to int.
221 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
222 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
223 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
224 lll_futex_wake.
225 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
226 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
227 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
228 New function.
229 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
230 pass it through to lll_futex_*wait, only compile in when
231 IS_IN_libpthread.
232 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
233 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
234 argument and pass it through to lll_futex_*wait.
235 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
236 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
237 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
238 inline functions to __lll_* resp. __lll_robust_*.
239 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
240 (lll_mutex_dead): Add private argument.
241 (__lll_lock_wait_private): New prototype.
242 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
243 __lll_robust_lock_timedwait): Add private argument to prototypes.
244 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
245 call __lll_lock_wait_private, otherwise pass private to
246 __lll_lock_wait.
247 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
248 __lll_robust_timedlock): Add private argument, pass it to
249 __lll_*wait functions.
250 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
251 call __lll_unlock_wake_private, otherwise pass private to
252 __lll_unlock_wake.
253 (__lll_robust_unlock): Add private argument, pass it to
254 __lll_robust_unlock_wake.
255 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
256 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
257 argument, pass it through to __lll_* inline function.
258 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
259 (lll_lock_t): Remove.
260 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
261 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
262 lll_cond_wake, lll_cond_broadcast): Remove.
263 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
264 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
265 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
266 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
267 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
268 the header from assembler. Renamed all lll_mutex_* resp.
269 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
270 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
271 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
272 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
273 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
274 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
275 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
276 Remove prototype.
277 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
278 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
279 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
280 (lll_trylock): Likewise, use __lll_trylock_asm, pass
281 MULTIPLE_THREADS_OFFSET as another asm operand.
282 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
283 MULTIPLE_THREADS_OFFSET as last asm operand, call
284 __lll_lock_wait_private if private is constant LLL_PRIVATE,
285 otherwise pass private as another argument to __lll_lock_wait.
286 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
287 lll_timedlock, lll_robust_timedlock): Add private argument, pass
288 private as another argument to __lll_*lock_wait call.
289 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
290 MULTIPLE_THREADS_OFFSET as another asm operand, call
291 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
292 otherwise pass private as another argument to __lll_unlock_wake.
293 (lll_robust_unlock): Add private argument, pass private as another
294 argument to __lll_unlock_wake.
295 (lll_robust_dead): Add private argument, use __lll_private_flag
296 macro.
297 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
298 LLL_MUTEX_LOCK_INITIALIZER.
299 (lll_lock_t): Remove.
300 (LLL_LOCK_INITIALIZER_WAITERS): Define.
301 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
302 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
303 lll_cond_wake, lll_cond_broadcast): Remove.
304 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
305 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
306 2007-05-2{3,9} changes.
307 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
308 kernel-features.h and lowlevellock.h.
309 (LOAD_PRIVATE_FUTEX_WAIT): Define.
310 (LOAD_FUTEX_WAIT): Rewritten.
311 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
312 define.
313 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
314 (__lll_mutex_lock_wait): Rename to ...
315 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
316 %ecx, %ecx is now private argument. Don't compile in for libc.so.
317 (__lll_mutex_timedlock_wait): Rename to ...
318 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
319 contains private argument. Don't compile in for libc.so.
320 (__lll_mutex_unlock_wake): Rename to ...
321 (__lll_unlock_wake): ... this. %ecx contains private argument.
322 Don't compile in for libc.so.
323 (__lll_timedwait_tid): Use __NR_gettimeofday.
324 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
325 kernel-features.h and lowlevellock.h.
326 (LOAD_FUTEX_WAIT): Define.
327 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
328 define.
329 (__lll_robust_mutex_lock_wait): Rename to ...
330 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
331 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
332 macro.
333 (__lll_robust_mutex_timedlock_wait): Rename to ...
334 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
335 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
336 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
337 lowlevellock.h.
338 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
339 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
340 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
341 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
342 to __lll_lock_wait in %edx.
343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
344 Include lowlevellock.h and pthread-errnos.h.
345 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
346 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
347 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
348 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
349 pass LLL_SHARED in %ecx to both __lll_lock_wait and
350 __lll_unlock_wake.
351 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
352 Include lowlevellock.h and pthread-errnos.h.
353 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
354 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
355 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
356 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
357 pass LLL_SHARED in %ecx to both __lll_lock_wait and
358 __lll_unlock_wake.
359 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
360 Include lowlevellock.h.
361 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
362 Don't define.
363 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
364 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
365 pass LLL_SHARED in %ecx to both __lll_lock_wait and
366 __lll_unlock_wake. Use __NR_gettimeofday.
367 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
368 Include lowlevellock.h.
369 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
370 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
371 to __lll_*, pass cond_lock address in %edx rather than %ecx to
372 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
373 and __lll_unlock_wake.
374 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
375 Include lowlevellock.h.
376 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
377 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
378 MUTEX(%ebx) address in %edx rather than %ecx to
379 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
380 and __lll_unlock_wake. Move return value from %ecx to %edx
381 register.
382 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
383 Include lowlevellock.h.
384 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
385 Don't define.
386 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
387 MUTEX(%ebp) address in %edx rather than %ecx to
388 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
389 and __lll_unlock_wake. Move return value from %ecx to %edx
390 register. Use __NR_gettimeofday.
391 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
392 Include lowlevellock.h.
393 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
394 Don't define.
395 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
396 MUTEX(%ebp) address in %edx rather than %ecx to
397 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
398 and __lll_unlock_wake. Move return value from %ecx to %edx
399 register. Use __NR_gettimeofday.
400 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
401 Include lowlevellock.h.
402 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
403 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
404 MUTEX(%edi) address in %edx rather than %ecx to
405 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
406 and __lll_unlock_wake.
407 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
408 Include lowlevellock.h.
409 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
410 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
411 MUTEX(%ebx) address in %edx rather than %ecx to
412 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
413 and __lll_unlock_wake. Move return value from %ecx to %edx
414 register.
415 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
416 lowlevellock.h.
417 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
418 define.
419 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
420 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
421 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
422 lowlevellock.h.
423 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
424 (sem_timedwait): Use __NR_gettimeofday.
425 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
426 lowlevellock.h.
427 (LOCK): Don't define.
428 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
429 lowlevellock.h.
430 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
431 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
432 are waiters.
433 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
434 2007-05-2{3,9} changes.
435 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
436 kernel-features.h and lowlevellock.h.
437 (LOAD_PRIVATE_FUTEX_WAIT): Define.
438 (LOAD_FUTEX_WAIT): Rewritten.
439 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
440 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
441 (__lll_mutex_lock_wait): Rename to ...
442 (__lll_lock_wait): ... this. %esi is now private argument.
443 Don't compile in for libc.so.
444 (__lll_mutex_timedlock_wait): Rename to ...
445 (__lll_timedlock_wait): ... this. %esi contains private argument.
446 Don't compile in for libc.so.
447 (__lll_mutex_unlock_wake): Rename to ...
448 (__lll_unlock_wake): ... this. %esi contains private argument.
449 Don't compile in for libc.so.
450 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
451 kernel-features.h and lowlevellock.h.
452 (LOAD_FUTEX_WAIT): Define.
453 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
454 (__lll_robust_mutex_lock_wait): Rename to ...
455 (__lll_robust_lock_wait): ... this. %esi argument contains private.
456 Use LOAD_FUTEX_WAIT macro.
457 (__lll_robust_mutex_timedlock_wait): Rename to ...
458 (__lll_robust_timedlock_wait): ... this. %esi argument contains
459 private, use LOAD_FUTEX_WAIT macro.
460 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
461 lowlevellock.h.
462 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
463 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
464 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
465 __lll_lock_wait and __lll_unlock_wake.
466 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
467 Include lowlevellock.h and pthread-errnos.h.
468 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
469 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
470 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
471 pass LLL_SHARED in %esi to both __lll_lock_wait and
472 __lll_unlock_wake.
473 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
474 Include lowlevellock.h and pthread-errnos.h.
475 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
476 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
477 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
478 pass LLL_SHARED in %esi to both __lll_lock_wait and
479 __lll_unlock_wake.
480 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
481 Include lowlevellock.h.
482 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
483 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
484 pass LLL_SHARED in %esi to both __lll_lock_wait and
485 __lll_unlock_wake.
486 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
487 Include lowlevellock.h.
488 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
489 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
490 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
491 and __lll_unlock_wake.
492 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
493 Include lowlevellock.h.
494 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
495 Don't define.
496 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
497 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
498 and __lll_unlock_wake.
499 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
500 Include lowlevellock.h.
501 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
502 Don't define.
503 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
504 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
505 and __lll_unlock_wake.
506 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
507 Include lowlevellock.h.
508 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
509 Don't define.
510 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
511 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
512 and __lll_unlock_wake.
513 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
514 Include lowlevellock.h.
515 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
516 Don't define.
517 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
518 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
519 and __lll_unlock_wake.
520 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
521 Include lowlevellock.h.
522 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
523 Don't define.
524 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
525 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
526 and __lll_unlock_wake.
527 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
528 lowlevellock.h.
529 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
530 define.
531 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
532 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
533 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
534 lowlevellock.h.
535 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
536 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
537 lowlevellock.h.
538 (LOCK): Don't define.
539 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
540 lowlevellock.h.
541 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
542 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
543 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
544 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
545 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
546 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
547 (__lll_lock_wait_private): New function.
548 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
549 it to lll_futex_*wait. Don't compile in for libc.so.
550 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
551 Remove.
552 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
553 (struct sparc_pthread_barrier): Remove.
554 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
555 struct sparc_pthread_barrier. Pass
556 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
557 and lll_futex_wait macros.
558 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
559 Remove.
560 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
561 Include sparc pthread_barrier_wait.c instead of generic one.
562
6f59d56e
UD
5632007-07-30 Jakub Jelinek <jakub@redhat.com>
564
1475e201
UD
565 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
566
6f59d56e
UD
567 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
568 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
569 %ecx.
570 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
571 (pthread_rwlock_timedwrlock): Likewise.
572 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
573 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
574
558f0300
JJ
5752007-07-31 Jakub Jelinek <jakub@redhat.com>
576
577 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
578
cedb4109
UD
5792007-07-26 Jakub Jelinek <jakub@redhat.com>
580
581 * tst-locale2.c (useless): Add return statement.
582
085a4412
UD
5832007-07-24 Jakub Jelinek <jakub@redhat.com>
584
585 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
586 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
587 * pthread_create.c (start_thread): Likewise.
588 * init.c (sighandler_setxid): Likewise.
589 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
590 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
591 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
592 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
593 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
594 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
595 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
596 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
597 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
598 Likewise.
599 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
600 Likewise.
601 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
602 Likewise.
603 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
604 __rtld_notify): Likewise.
605 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
606 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
607 __pthread_once): Likewise.
608 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
609 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
610 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
611 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
612 (lll_futex_wait): Add private argument, define as wrapper around
613 lll_futex_timed_wait.
614 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
615 use __lll_private_flag macro.
616 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
617 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
618 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
619 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
620 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
621 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
622 (lll_futex_wait): Add private argument, define as wrapper around
623 lll_futex_timed_wait.
624 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
625 use __lll_private_flag macro.
626 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
627 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
628 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
629 Define.
630 (lll_futex_timed_wait, lll_futex_wake): Use it.
631 (lll_private_futex_wait, lll_private_futex_timed_wait,
632 lll_private_futex_wake): Removed.
633 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
634 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
635 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
636 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
637 (lll_futex_wait): Add private argument, define as wrapper around
638 lll_futex_timed_wait.
639 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
640 use __lll_private_flag macro.
641 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
642 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
643 to lll_futex_*.
644 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
645 (lll_private_futex_wait, lll_private_futex_timed_wait,
646 lll_private_futex_wake): Removed.
647 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
648 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
649 (lll_private_futex_wait, lll_private_futex_timed_wait,
650 lll_private_futex_wake): Removed.
651 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
652 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
653 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
654 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
655 (lll_futex_wait): Add private argument, define as wrapper around
656 lll_futex_timed_wait.
657 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
658 use __lll_private_flag macro.
659 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
660 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
661 to lll_futex_*.
662 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
663 Define.
664 (lll_futex_timed_wait, lll_futex_wake): Use it.
665 (lll_private_futex_wait, lll_private_futex_timed_wait,
666 lll_private_futex_wake): Removed.
667
ef0af159
JJ
6682007-07-27 Jakub Jelinek <jakub@redhat.com>
669
670 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
671 of the structure for sparc32.
672
6732007-07-26 Aurelien Jarno <aurelien@aurel32.net>
674
675 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
676
eb4f5909
UD
6772007-07-23 Ulrich Drepper <drepper@redhat.com>
678
679 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
680 code used when private futexes are assumed.
681 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
682 Likewise.
683
b5f13526
UD
6842007-07-23 Jakub Jelinek <jakub@redhat.com>
685
686 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
687 (__lll_private_flag): Define.
688 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
689 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
690 __lll_private_flag.
691 (lll_private_futex_wait, lll_private_futex_timedwait,
692 lll_private_futex_wake): Define as wrapper around non-_private
693 macros.
694 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
695 (__lll_private_flag): Define.
696 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
697 (lll_private_futex_wait, lll_private_futex_timedwait,
698 lll_private_futex_wake): Define as wrapper around non-_private
699 macros.
700
eb7721f2
UD
7012007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
702
703 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
704 parameter to lll_futex_wait call.
705 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
706
707 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
708 Replace lll_futex_wait with lll_private_futex_wait.
709 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
710 Add LLL_SHARED parameter to lll_futex_wake().
711
712 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
713 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
714 lll_private_futex_wake.
715 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
716 bit from private parm before syscall.
717 (lll_futex_timed_wait): Likewise.
718 (lll_futex_wake): Likewise.
719 (lll_futex_wake_unlock): Likewise.
720 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
721 (lll_robust_mutex_unlock): Likewise.
722 (lll_mutex_unlock_force): Likewise.
723 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
724
defc45f2
UD
7252007-07-23 Ulrich Drepper <drepper@redhat.com>
726
727 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
728 compilation when unconditionally using private futexes.
729 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
730 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
731 Likewise.
732 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
733 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
734
087722b8
UD
7352007-07-17 Jakub Jelinek <jakub@redhat.com>
736
737 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
738 Define.
739
765c6b0c
UD
7402007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
741
742 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
743 kernel-features.h.
744
7d9d8bd1
RM
7452007-05-16 Roland McGrath <roland@redhat.com>
746
747 * init.c (__nptl_initial_report_events): New variable.
748 (__pthread_initialize_minimal_internal): Initialize pd->report_events
749 to that.
750
a4915df2
UD
7512007-06-22 Jakub Jelinek <jakub@redhat.com>
752
753 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
754 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
755
e4eb675d
UD
7562007-06-19 Ulrich Drepper <drepper@redhat.com>
757
758 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
759 implementation.
760
ae1ad3ae
UD
7612007-06-18 Ulrich Drepper <drepper@redhat.com>
762
763 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
764 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
765 * pthread_mutex_timedlock.c: Likewise.
766 * pthread_mutex_trylock.c: Likewise.
767 * pthread_mutex_unlock.c: Likewise.
768
89074592
UD
7692007-06-17 Andreas Schwab <schwab@suse.de>
770
771 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
772 sections.
773
d4201cc4
UD
7742007-06-17 Ulrich Drepper <drepper@redhat.com>
775
776 * allocatestack.c (allocate_stack): Make code compile if
777 __ASSUME_PRIVATE_FUTEX is set.
778
339dbf0e
UD
7792007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
780
781 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
782 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
783 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
784 (__pthread_rwlock_wrlock): Likewise.
785 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
786 (pthread_rwlock_timedrdlock): Likewise.
787 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
788 (pthread_rwlock_timedwrlock): Likewise.
789 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
790 (__pthread_rwlock_unlock): Likewise.
791
7922007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
793
794 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
795 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
796 Split __flags into __flags, __shared, __pad1 and __pad2.
797 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
798 futexes if they are available.
799 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
800 in libc-lowlevellock.S allow using private futexes.
801 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
802 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
803 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
804 to call lll_futex_timed_wait. Add lll_private_futex_wait,
805 lll_private_futex_timed_wait and lll_private_futex_wake.
806 (lll_robust_mutex_unlock): Fix typo.
807 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
808 field in futex command setup.
809 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
810 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
811 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
812 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
813 if they are available. Remove clear_once_control.
814 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
815 futexes if they are available.
816 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
817 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
818 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
819 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
820 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
821 Wake only when there are waiters.
822 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
823 support. Indicate that there are waiters. Remove unnecessary
824 extra cancellation test.
825 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
826 left-over duplication of __sem_wait_cleanup.
827
26f56c1c
UD
8282007-06-07 Ulrich Drepper <drepper@redhat.com>
829
830 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
831 parameter to lll_futex_wait, lll_futex_timed_wait, and
832 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
833 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
834 lll_private_futex_wake.
835 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
836 * allocatestack.c: Adjust use of lll_futex_* macros.
837 * init.c: Likewise.
838 * lowlevellock.h: Likewise.
839 * pthread_barrier_wait.c: Likewise.
840 * pthread_cond_broadcast.c: Likewise.
841 * pthread_cond_destroy.c: Likewise.
842 * pthread_cond_signal.c: Likewise.
843 * pthread_cond_timedwait.c: Likewise.
844 * pthread_cond_wait.c: Likewise.
845 * pthread_create.c: Likewise.
846 * pthread_mutex_lock.c: Likewise.
847 * pthread_mutex_setprioceiling.c: Likewise.
848 * pthread_mutex_timedlock.c: Likewise.
849 * pthread_mutex_unlock.c: Likewise.
850 * pthread_rwlock_timedrdlock.c: Likewise.
851 * pthread_rwlock_timedwrlock.c: Likewise.
852 * pthread_rwlock_unlock.c: Likewise.
853 * sysdeps/alpha/tls.h: Likewise.
854 * sysdeps/i386/tls.h: Likewise.
855 * sysdeps/ia64/tls.h: Likewise.
856 * sysdeps/powerpc/tls.h: Likewise.
857 * sysdeps/pthread/aio_misc.h: Likewise.
858 * sysdeps/pthread/gai_misc.h: Likewise.
859 * sysdeps/s390/tls.h: Likewise.
860 * sysdeps/sh/tls.h: Likewise.
861 * sysdeps/sparc/tls.h: Likewise.
862 * sysdeps/unix/sysv/linux/fork.c: Likewise.
863 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
864 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
865 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
866 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
867 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
868 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
869 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
870 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
871 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
872 Likewise.
873 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
874 * sysdeps/x86_64/tls.h: Likewise.
875
ee5d5755
UD
8762007-05-29 Ulrich Drepper <drepper@redhat.com>
877
b03b0c29
UD
878 * pthread_getattr_np.c: No need to install a cancellation handler,
879 this is no cancellation point.
880 * pthread_getschedparam.c: Likewise.
881 * pthread_setschedparam.c: Likewise.
882 * pthread_setschedprio.c: Likewise.
883 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
884 lll_unlock_wake_cb.
885 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
886 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
887 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
888 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
889 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
890 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
891 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
892 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
893 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
894 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
895 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
896 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
fc3f0ccb 897
0154658d
UD
898 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
899 whether there are more than one thread makes no sense here since
900 we only call the slow path if the locks are taken.
901 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
902
ee5d5755
UD
903 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
904 COND_NWAITERS_SHIFT.
905 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
906 COND_CLOCK_BITS.
907 * pthread_cond_init.c: Likewise.
908 * pthread_cond_timedwait.c: Likewise.
909 * pthread_cond_wait.c: Likewise.
910 * pthread_condattr_getclock.c: Likewise.
911 * pthread_condattr_setclock.c: Likewise.
912 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
914 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
915 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
916 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
917
991fa82b
UD
9182007-05-28 Jakub Jelinek <jakub@redhat.com>
919
40f57573
UD
920 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
921 unistd.h.
922
991fa82b
UD
923 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
924 insn suffix.
925 (THREAD_GSCOPE_GET_FLAG): Remove.
926 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
927 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
928 changes.
929 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
930 (THREAD_GSCOPE_GET_FLAG): Remove.
931 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
932 instead of THREAD_GSCOPE_GET_FLAG.
933 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
934 it.
935 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
936 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
937 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
938 THREAD_GSCOPE_WAIT): Define.
939 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
940 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
941 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
942 THREAD_GSCOPE_WAIT): Define.
943 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
944 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
945 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
946 THREAD_GSCOPE_WAIT): Define.
947 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
948 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
949 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
950 THREAD_GSCOPE_WAIT): Define.
951
9522007-05-24 Richard Henderson <rth@redhat.com>
953
954 * descr.h (struct pthread): Add header.gscope_flag.
955 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
956 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
957 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
958 THREAD_GSCOPE_WAIT): Define.
959
e59660bc
UD
9602007-05-27 Ulrich Drepper <drepper@redhat.com>
961
962 * init.c: Make it compile with older kernel headers.
963
964 * tst-initializers1.c: Show through exit code which test failed.
965
966 * pthread_rwlock_init.c: Also initialize __shared field.
967 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
968 element in rwlock structure into four byte elements. One of them is
969 the new __shared element.
970 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
971 Likewise.
cd0dbd89 972 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
e59660bc
UD
973 __shared, adjust names of other padding elements.
974 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
975 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
976 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
977 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
978 FUTEX_PRIVATE_FLAG.
979 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
980 futex to use private operations if possible.
981 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
982 Likewise.
983 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
984 Likewise.
985 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
986 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
50f1dec5
UD
987 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
988 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
989 Likewise.
990 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
991 Likewise.
992 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
993 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
e59660bc 994
d8ff3792
UD
9952007-05-26 Ulrich Drepper <drepper@redhat.com>
996
546346b6
UD
997 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
998 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
999 * pthread_rwlock_timedrdlock.c: Likewise.
1000 * pthread_rwlock_tryrdlock.c: Likewise.
1001
a2dd3360
UD
1002 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1003 optimization.
1004
6df7ffad
UD
1005 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1006 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1007 duplication of __sem_wait_cleanup.
1008
1009 * allocatestack.c: Revert last change.
1010 * init.c: Likewise.
1011 * sysdeps/i386/tls.h: Likewise.
1012 * sysdeps/x86_64/tls.h: Likewise.
1013 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1014 header structure.
1015 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1016
d8ff3792
UD
1017 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1018 Add private field.
1019 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1020 * pthread_barrier_init.c: Set private flag if pshared and private
1021 futexes are supported.
1022 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1023 private field in futex command setup.
1024 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1025
3d2dd6ca
UD
10262007-05-25 Ulrich Drepper <drepper@redhat.com>
1027
42e6c665
UD
1028 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1029 support.
1030 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1031 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1032 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1033 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1034 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1035
3d2dd6ca
UD
1036 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1037 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1038 fields in the structure.
1039 (__old_sem_init): New function.
1040 * sem_open.c: Initialize all fields of the structure.
1041 * sem_getvalue.c: Adjust for renamed element.
1042 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1043 (gen-as-const-headers): Add structsem.sym.
1044 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1045 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1046 struct new_sem. Add struct old_sem.
1047 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1048 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1049 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1050 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1051 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1052 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1053 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1054 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1055 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1056 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1057 * tst-sem10.c: New file.
1058 * tst-sem11.c: New file.
1059 * tst-sem12.c: New file.
1060 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1061 of struct sem.
1062
20a4d722
JJ
10632007-05-25 Ulrich Drepper <drepper@redhat.com>
1064 Jakub Jelinek <jakub@redhat.com>
1065
1066 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1067 Move __pthread_enable_asynccancel right before futex syscall.
1068 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1069 Likewise.
1070
10712007-05-24 Jakub Jelinek <jakub@redhat.com>
86acd596
UD
1072
1073 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1074 THREAD_COPY_PRIVATE_FUTEX): Define.
1075 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1076 THREAD_COPY_PRIVATE_FUTEX): Define.
1077 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1078 * init.c (__pthread_initialize_minimal_internal): Use
1079 THREAD_SET_PRIVATE_FUTEX.
0a54ab53
UD
1080
1081 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1082 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1083 THREAD_GSCOPE_FLAG_WAIT): Define.
1084 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1085 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1086 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1087 PTR_DEMANGLE.
1088 (THREAD_GSCOPE_GET_FLAG): Define.
1089 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1090 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1091 instead of ->header.gscope_flag directly.
1092
5a8075b1
UD
10932007-05-23 Ulrich Drepper <drepper@redhat.com>
1094
1095 * init.c (__pthread_initialize_minimal_internal): Check whether
1096 private futexes are available.
1097 * allocatestack.c (allocate_stack): Copy private_futex field from
1098 current thread into the new stack.
1099 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1100 futexes if they are available.
1101 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1102 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1103 in libc-lowlevellock.S allow using private futexes.
1104 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1105 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1106 FUTEX_PRIVATE_FLAG.
1107 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1108 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1109 if they are available.
1110 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1111 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1112 * sysdeps/i386/tcb-offsets.sym: Likewise.
1113 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1114 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1115
6d59823c
UD
11162007-05-21 Ulrich Drepper <drepper@redhat.com>
1117
1118 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1119 Remove ptr_wait_lookup_done again.
1120 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1121 (__pthread_initialize_minimal_internal): Initialize
1122 _dl_wait_lookup_done pointer in _rtld_global directly.
1123 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1124 Remove code to code _dl_wait_lookup_done.
1125 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1126 encrypted for now.
1127
2c9718f3
JJ
11282007-05-21 Jakub Jelinek <jakub@redhat.com>
1129
1130 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1131 pthread_mutex_init failed with ENOTSUP.
1132
df94b641
UD
11332007-05-19 Ulrich Drepper <drepper@redhat.com>
1134
1135 * allocatestack.c (__wait_lookup_done): New function.
1136 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1137 Add ptr_wait_lookup_done.
1138 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1139 * pthreadP.h: Declare __wait_lookup_done.
1140 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1141 Define macros to implement reference handling of global scope.
1142 * sysdeps/x86_64/tls.h: Likewise.
1143 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1144 Initialize GL(dl_wait_lookup_done).
1145
bec51a30
UD
11462007-05-17 Ulrich Drepper <drepper@redhat.com>
1147
113ad5fc
UD
1148 [BZ #4512]
1149 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1150 is detected.
1151 * pthread_mutex_timedlock.c: Likewise.
1152 * pthread_mutex_trylock.c: Likewise.
1153 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1154
1155 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1156 * tst-robust9.c: New file.
1157 * tst-robustpi9.c: New file.
1158
bec51a30
UD
1159 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1160 unnecessary extra cancellation test.
1161
83d87915
UD
11622007-05-14 Ulrich Drepper <drepper@redhat.com>
1163
83d87915
UD
1164 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1165 extra cancellation test.
1166 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1167
3771196d
UD
11682007-05-10 Ulrich Drepper <drepper@redhat.com>
1169
341c566f
UD
1170 * descr.h (struct pthread): Rearrange members to fill hole in
1171 64-bit layout.
1172
3771196d
UD
1173 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1174 (__pthread_setaffinity_new): If syscall was successful and
1175 RESET_VGETCPU_CACHE is defined, use it before returning.
1176 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1177
7d29b542
JJ
11782007-05-10 Jakub Jelinek <jakub@redhat.com>
1179
1180 [BZ #4455]
1181 * tst-align2.c: Include stackinfo.h.
1182 * tst-getpid1.c: Likewise.
1183
16105fe0
UD
11842007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1185
29c113f0
UD
1186 [BZ #4455]
1187 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1188 * tst-getpid1.c (do_test): Likewise.
1189
16105fe0
UD
1190 [BZ #4456]
1191 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1192 (allocate_stack): Likewise.
1193
6780bc44
UD
11942007-05-07 Ulrich Drepper <drepper@redhat.com>
1195
1196 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1197 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1198 (__lll_robust_timedlock_wait): Likewise.
1199 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1200
aa75f64c
UD
12012007-05-06 Mike Frysinger <vapier@gentoo.org>
1202
15eca720 1203 [BZ #4465]
aa75f64c
UD
1204 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1205 * tst-cancel4.c (tf_fdatasync): New test.
1206
f672076e
UD
12072007-04-27 Ulrich Drepper <drepper@redhat.com>
1208
1bb5f5a1
UD
1209 [BZ #4392]
1210 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1211 check mutexes like normal mutexes.
1212
f672076e
UD
1213 [BZ #4306]
1214 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1215 Initialize the whole sigevent structure to appease valgrind.
1216
bce20b9a
UD
12172007-04-25 Ulrich Drepper <drepper@redhat.com>
1218
1219 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1220 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1221
0c786eac
UD
12222007-04-06 Ulrich Drepper <drepper@redhat.com>
1223
1224 * tst-locale1.c: Avoid warnings.
1225 * tst-locale2.c: Likewise.
1226
e1f0c5bc
UD
12272007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1228
1229 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1230 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1231
965cba04
UD
12322007-03-16 Jakub Jelinek <jakub@redhat.com>
1233
1234 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1235 __extern_always_inline where appropriate.
1236 * sysdeps/pthread/pthread.h: Likewise.
1237
a5ea509b
RH
12382007-03-13 Richard Henderson <rth@redhat.com>
1239
1240 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1241 separate cfi regions for the two subsections.
1242
00a1430e
UD
12432007-02-25 Ulrich Drepper <drepper@redhat.com>
1244
1245 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1246 new thread, don't just decrement it.
1247 Patch by Suzuki K P <suzuki@in.ibm.com>.
1248
63a2f305
UD
12492007-02-21 Ulrich Drepper <drepper@redhat.com>
1250
1251 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1252 PTHFCT_CALL definition.
1253
2484468b
UD
12542007-02-18 Ulrich Drepper <drepper@redhat.com>
1255
1256 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1257 available, don't use it.
1258
5ed61e0f
UD
12592007-02-09 Jakub Jelinek <jakub@redhat.com>
1260
1261 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1262 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1263 call into the kernel to delay.
1264
10ccaa5c
UD
12652007-01-18 Ulrich Drepper <drepper@redhat.com>
1266
f8a17855
UD
1267 * tst-initializers1.c: We want to test the initializers as seen
1268 outside of libc, so undefined _LIBC.
1269
10ccaa5c
UD
1270 * pthread_join.c (cleanup): Avoid warning.
1271
ea1533e0
UD
12722007-01-17 Ulrich Drepper <drepper@redhat.com>
1273
1476bce6
UD
1274 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1275 (__lll_timedwait_tid): Add unwind info.
1276
ea1533e0
UD
1277 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1278 function table, mangle the pointers.
1279 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1280 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1281 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1282 demangle pointers before use.
1283 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1284 demangle pointer.
1285 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1286 * sysdeps/pthread/setxid.h: Likewise.
1287
8980796b
UD
12882007-01-12 Ulrich Drepper <drepper@redhat.com>
1289
1290 * tst-rwlock7.c: Show some more information in case of correct
1291 behavior.
1292
a1d87b5d
UD
12932007-01-11 Ulrich Drepper <drepper@redhat.com>
1294
1295 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1296 (lll_futex_timed_wait): Undo part of last change, don't negate
1297 return value.
1298
11bf311e 12992007-01-10 Ulrich Drepper <drepper@redhat.com>
66193697 1300
11bf311e
UD
1301 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1302 FUTEX_CMP_REQUEUE and lll_futex_requeue.
66193697 1303
11bf311e 13042006-12-28 David S. Miller <davem@davemloft.net>
14a31e35 1305
11bf311e 1306 * shlib-versions: Fix sparc64 linux target specification.
a744da90 1307
11bf311e 13082007-01-10 Jakub Jelinek <jakub@redhat.com>
a744da90 1309
11bf311e
UD
1310 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1311 Adjust include path for pthread_barrier_wait.c move.
fc242bef 1312
11bf311e 13132006-12-21 Jakub Jelinek <jakub@redhat.com>
fc242bef 1314
11bf311e
UD
1315 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1316 tid isn't reread from pd->tid in between ESRCH test and the syscall.
a822d9f4 1317
11bf311e
UD
13182006-12-06 Jakub Jelinek <jakub@redhat.com>
1319
1320 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1321 6 argument cancellable syscalls.
1322 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1323 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1324 6 argument cancellable syscalls.
1325 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
a822d9f4 1326
66f17705
UD
13272006-12-09 Ulrich Drepper <drepper@redhat.com>
1328
1329 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1330 (__rtld_mrlock_initialize): Add missing closing parenthesis.
1331
11bf311e
UD
13322006-10-30 Jakub Jelinek <jakub@redhat.com>
1333
1334 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1335 __sync_lock_release instead of __sync_lock_release_si.
1336
536e40e2
UD
13372006-10-29 Jakub Jelinek <jakub@redhat.com>
1338
1339 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1340 Define.
1341 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1342 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1343 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1344 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1345 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1346 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1347 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1348 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1349 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1350 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1351 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1352
11bf311e
UD
13532006-10-27 Ulrich Drepper <drepper@redhat.com>
1354
1355 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1356 * pthread_barrier_wait.c: ...here.
1357 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1358 * pthread_cond_broadcast.c: ...here.
1359 * sysdeps/pthread/pthread_cond_signal.c: Move to...
1360 * pthread_cond_signal.c: ...here.
1361 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1362 * pthread_cond_timedwait.c: ...here.
1363 * sysdeps/pthread/pthread_cond_wait.c: Move to...
1364 * pthread_cond_wait.c: ...here.
1365 * sysdeps/pthread/pthread_once.c: Move to...
1366 * pthread_once.c: ...here.
1367 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1368 * pthread_rwlock_rdlock.c: ...here.
1369 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1370 * pthread_rwlock_timedrdlock.c: ...here.
1371 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1372 * pthread_rwlock_timedwrlock.c: ...here.
1373 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1374 * pthread_rwlock_unlock.c: ...here.
1375 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1376 * pthread_rwlock_wrlock.c: ...here.
1377 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1378 * pthread_spin_destroy.c: ...here.
1379 * sysdeps/pthread/pthread_spin_init.c: Move to...
1380 * pthread_spin_init.c: ...here.
1381 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1382 * pthread_spin_unlock.c: ...here.
1383 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1384 * pthread_getcpuclockid.c: ...here.
1385
1386 * init.c: USE_TLS support is now always enabled.
1387 * tst-tls5.h: Likewise.
1388 * sysdeps/alpha/tls.h: Likewise.
1389 * sysdeps/i386/tls.h: Likewise.
1390 * sysdeps/ia64/tls.h: Likewise.
1391 * sysdeps/powerpc/tls.h: Likewise.
1392 * sysdeps/s390/tls.h: Likewise.
1393 * sysdeps/sh/tls.h: Likewise.
1394 * sysdeps/sparc/tls.h: Likewise.
1395 * sysdeps/x86_64/tls.h: Likewise.
1396
006a8f6f 13972006-10-27 Jakub Jelinek <jakub@redhat.com>
c0a777e8
UD
1398
1399 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1400 __rtld_mrlock_change): Update oldval if atomic compare and exchange
1401 failed.
1402
1403 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1404 Define to THREAD_SELF->header.multiple_threads.
1405 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1406 Likewise.
1407 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1408 Likewise.
1409 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1410 (SINGLE_THREAD_P): Likewise.
1411 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1412 (SINGLE_THREAD_P): Likewise.
1413 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1414 (SINGLE_THREAD_P): Likewise.
1415 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1416 (SINGLE_THREAD_P): Likewise.
1417 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1418 Likewise.
1419 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1420 (SINGLE_THREAD_P): Likewise.
1421 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1422 (SINGLE_THREAD_P): Likewise.
1423 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1424 Likewise.
1425
11bf311e 14262006-10-26 Jakub Jelinek <jakub@redhat.com>
32c075e1 1427
11bf311e
UD
1428 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1429 by default rather than 2_3_3.
32c075e1 1430
11bf311e 14312006-10-17 Jakub Jelinek <jakub@redhat.com>
32c075e1 1432
11bf311e
UD
1433 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1434 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1435 atomic_* instead of catomic_* macros.
1436
14372006-10-12 Ulrich Drepper <drepper@redhat.com>
1438
1439 [BZ #3285]
1440 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1441 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1442 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1443 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1444 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1445 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1446 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1447 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1448 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1449 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1450 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1451 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1452 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1453
14542006-10-11 Ulrich Drepper <drepper@redhat.com>
1455
1456 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1457 cancelable syscalls with six parameters.
1458
1459 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1460 operations instead of atomic_*.
32c075e1 1461
11bf311e 14622006-10-09 Ulrich Drepper <drepper@redhat.com>
32c075e1 1463
11bf311e 1464 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
32c075e1 1465
11bf311e 14662006-10-07 Ulrich Drepper <drepper@redhat.com>
32c075e1 1467
11bf311e
UD
1468 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1469 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1470 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1471 New file.
1472 * pthread_attr_setstack.c: Allow overwriting the version number of the
1473 new symbol.
1474 * pthread_attr_setstacksize.c: Likewise.
1475 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1476 it.
1477 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1478 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
fa279678 1479
457b559e
UD
14802006-09-24 Ulrich Drepper <drepper@redhat.com>
1481
1482 [BZ #3251]
1483 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1484 Patch by Petr Baudis.
1485
0466106e
UD
14862006-09-18 Jakub Jelinek <jakub@redhat.com>
1487
1488 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1489
1490 * tst-cancel2.c (tf): Loop as long as something was written.
1491
bd6d3b7d
UD
14922006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1493
1494 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1495 mutexes wake all mutexes.
1496 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1497 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1498 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1499
30aa5785
UD
15002006-09-12 Ulrich Drepper <drepper@redhat.com>
1501
1502 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1503 to guarantee the thread is always canceled.
1504
2b6a801e
UD
15052006-09-08 Jakub Jelinek <jakub@redhat.com>
1506
1507 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1508 Include stdlib.h.
1509 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1510 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
1511 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1512 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1513 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
bd6d3b7d 1514
346e6ad4
UD
15152006-09-08 Ulrich Drepper <drepper@redhat.com>
1516
1517 [BZ #3123]
1518 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1519 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2b6a801e
UD
1520 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1521 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1522 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
346e6ad4
UD
1523 * Makefile (tests): Add tst-cond22.
1524 * tst-cond22.c: New file.
1525
b051fc44
UD
15262006-09-05 Ulrich Drepper <drepper@redhat.com>
1527
1528 [BZ #3124]
1529 * descr.h (struct pthread): Add parent_cancelhandling.
1530 * sysdeps/pthread/createthread.c (create_thread): Pass parent
1531 cancelhandling value to child.
1532 * pthread_create.c (start_thread): If parent thread was canceled
1533 reset the SIGCANCEL mask.
1534 * Makefile (tests): Add tst-cancel25.
1535 * tst-cancel25.c: New file.
1536
d052233c
UD
15372006-09-05 Jakub Jelinek <jakub@redhat.com>
1538 Ulrich Drepper <drepper@redhat.com>
1539
1540 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1541 counterp if it is already zero.
1542 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1543
cd248c3f
UD
15442006-03-04 Jakub Jelinek <jakub@redhat.com>
1545 Roland McGrath <roland@redhat.com>
1546
1547 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1548 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1549 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1550 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1551 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1552 lll_robust_mutex_timedlock, lll_mutex_unlock,
1553 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1554 Add _L_*_ symbols around the subsection.
1555 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1556 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1557
15582006-03-03 Jakub Jelinek <jakub@redhat.com>
1559 Roland McGrath <roland@redhat.com>
1560
1561 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1562 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1563 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1564 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1565 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1566 lll_robust_mutex_timedlock, lll_mutex_unlock,
1567 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1568 Add _L_*_ symbols around the subsection.
1569 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1570 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1571
b80770b2
UD
15722006-08-31 Ulrich Drepper <drepper@redhat.com>
1573
1574 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1575 change because it can disturb too much existing code. If real hard
1576 reader preference is needed we'll introduce another type.
1577 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1578 (pthread_rwlock_timedwrlock): Likewise.
1579 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1580 Likewise.
1581
bee2df0b
UD
15822006-08-30 Ulrich Drepper <drepper@redhat.com>
1583
1584 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1585 reader preference.
1586 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1587 (pthread_rwlock_timedwrlock): Likewise.
1588 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1589 Likewise.
1590
d678ebc1
UD
15912006-08-25 Jakub Jelinek <jakub@redhat.com>
1592
1593 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1594 Only define ifdef SHARED.
1595
ba408f84
UD
15962006-08-23 Ulrich Drepper <drepper@redhat.com>
1597
1598 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1599 (free_stacks): ...here.
1600 (__free_stack_cache): New function.
1601 * pthreadP.h: Declare __free_stack_cache.
1602 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1603 ptr_freeres.
1604 * init.c (pthread_functions): Initialize ptr_freeres.
1605 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
1606 New freeres function.
1607
376e973a
UD
16082006-07-30 Joseph S. Myers <joseph@codesourcery.com>
1609
1610 [BZ #3018]
1611 * Makefile (extra-objs): Add modules to extra-test-objs instead.
1612
2b34af01
UD
16132006-08-20 Ulrich Drepper <drepper@redhat.com>
1614
1615 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1616 _XOPEN_REALTIME_THREADS.
1617
89c85f87
UD
16182006-08-15 Jakub Jelinek <jakub@redhat.com>
1619
1620 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
1621 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
1622 HAVE_CLOCK_GETTIME_VSYSCALL.
1623 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
1624
f17efcb4
UD
16252006-08-14 Jakub Jelinek <jakub@redhat.com>
1626
1627 * sysdeps/unix/sysv/linux/bits/posix_opt.h
1628 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
1629 * descr.h (struct priority_protection_data): New type.
1630 (struct pthread): Add tpp field.
1631 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
1632 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
1633 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
1634 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
1635 TPP mutexes.
1636 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
1637 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
1638 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
1639 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
1640 * tpp.c: New file.
1641 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
1642 boosted by TPP.
1643 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1644 * pthread_mutexattr_getprioceiling.c
1645 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
1646 in the SCHED_FIFO priority range.
1647 * pthread_mutexattr_setprioceiling.c
1648 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
1649 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
1650 if mutex is not TPP. Ceiling is now in __data.__lock.
1651 * pthread_mutex_setprioceiling.c: Include stdbool.h.
1652 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
1653 is now in __data.__lock. Add locking.
1654 * pthread_create.c (__free_tcb): Free pd->tpp structure.
1655 * Makefile (libpthread-routines): Add tpp.
1656 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
1657 * tst-tpp.h: New file.
1658 * tst-mutexpp1.c: New file.
1659 * tst-mutexpp6.c: New file.
1660 * tst-mutexpp10.c: New file.
1661 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
1662 * tst-mutex6.c (TEST_FUNCTION): Likewise.
1663
22bb134c
UD
16642006-08-12 Ulrich Drepper <drepper@redhat.com>
1665
1666 [BZ #2843]
1667 * pthread_join.c (pthread_join): Account for self being canceled
1668 when checking for deadlocks.
1669 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
1670 (tf1): Don't print anything after pthread_join returns, this would be
1671 another cancellation point.
1672 (tf2): Likewise.
1673 * tst-join6.c: New file.
1674 * Makefile (tests): Add tst-join6.
1675
f1762c0c
UD
16762006-08-03 Ulrich Drepper <drepper@redhat.com>
1677
9c06eb66
UD
1678 [BZ #2892]
1679 * pthread_setspecific.c (__pthread_setspecific): Check
1680 out-of-range index before checking for unused key.
1681
f1762c0c
UD
1682 * sysdeps/pthread/gai_misc.h: New file.
1683
7bb1b2c9
UD
16842006-08-01 Ulrich Drepper <drepper@redhat.com>
1685
1686 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
1687 file. Don't use sysctl.
1688 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
1689 overwrite the file if this is likely not true.
1690
b06e7e9a
UD
16912006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
1692
1693 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
1694 * Makefile (tests): Add tst-getpid3.
1695 * tst-getpid3.c: New file.
1696
b894c2ea
RM
16972006-07-30 Roland McGrath <roland@redhat.com>
1698
1699 * Makefile (libpthread-routines): Add ptw-sigsuspend.
1700
1701 * sysdeps/unix/sysv/linux/i386/not-cancel.h
1702 (pause_not_cancel): New macro.
1703 (nanosleep_not_cancel): New macro.
1704 (sigsuspend_not_cancel): New macro.
1705 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1706 nanosleep_not_cancel macro from <not-cancel.h>.
1707 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
1708 macro from <not-cancel.h>.
1709
df47504c
UD
17102006-07-28 Ulrich Drepper <drepper@redhat.com>
1711 Jakub Jelinek <jakub@redhat.com>
1712
1713 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
1714 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
1715 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
1716 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
1717 * pthread_mutex_init.c: Add support for priority inheritance mutex.
1718 * pthread_mutex_lock.c: Likewise.
1719 * pthread_mutex_timedlock.c: Likewise.
1720 * pthread_mutex_trylock.c: Likewise.
1721 * pthread_mutex_unlock.c: Likewise.
1722 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
1723 all mutexes.
1724 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
1725 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
1726 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
1727 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
1728 pthread-pi-defines.sym.
1729 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
1730 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
1731 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
d5ba53f9
UD
1732 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1733 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1734 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1735 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1736 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1737 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
df47504c
UD
1738 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1739 _POSIX_THREAD_PRIO_INHERIT to 200112L.
1740 * tst-mutex1.c: Adjust to allow use in PI mutex test.
1741 * tst-mutex2.c: Likewise.
1742 * tst-mutex3.c: Likewise.
1743 * tst-mutex4.c: Likewise.
1744 * tst-mutex5.c: Likewise.
1745 * tst-mutex6.c: Likewise.
1746 * tst-mutex7.c: Likewise.
1747 * tst-mutex7a.c: Likewise.
1748 * tst-mutex8.c: Likewise.
1749 * tst-mutex9.c: Likewise.
1750 * tst-robust1.c: Likewise.
1751 * tst-robust7.c: Likewise.
1752 * tst-robust8.c: Likewise.
1753 * tst-mutexpi1.c: New file.
1754 * tst-mutexpi2.c: New file.
1755 * tst-mutexpi3.c: New file.
1756 * tst-mutexpi4.c: New file.
1757 * tst-mutexpi5.c: New file.
1758 * tst-mutexpi6.c: New file.
1759 * tst-mutexpi7.c: New file.
1760 * tst-mutexpi7a.c: New file.
1761 * tst-mutexpi8.c: New file.
1762 * tst-mutexpi9.c: New file.
1763 * tst-robust1.c: New file.
1764 * tst-robust2.c: New file.
1765 * tst-robust3.c: New file.
1766 * tst-robust4.c: New file.
1767 * tst-robust5.c: New file.
1768 * tst-robust6.c: New file.
1769 * tst-robust7.c: New file.
1770 * tst-robust8.c: New file.
1771 * Makefile (tests): Add the new tests.
1772
1773 * pthread_create.c (start_thread): Add some casts to avoid warnings.
1774 * pthread_mutex_destroy.c: Remove unneeded label.
1775
f3be81a9
UD
17762006-07-01 Ulrich Drepper <drepper@redhat.com>
1777
1778 * pthread_mutex_init.c (__pthread_mutex_init): Move some
1779 computations to compile time.
1780
c26ca5e1
UD
17812006-06-04 Ulrich Drepper <drepper@redhat.com>
1782
1783 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
1784
6f8a7dff
UD
17852006-05-15 Ulrich Drepper <drepper@redhat.com>
1786
c26ca5e1 1787 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
6f8a7dff 1788
3d237e42
UD
17892006-05-11 Ulrich Drepper <drepper@redhat.com>
1790
04974d63
UD
1791 * pthread_key_create.c (__pthread_key_create): Do away with
1792 __pthread_keys_lock.
1793
1794 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1795 (__kernel_cpumask_size): Mark as hidden.
1796 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
1797
3d237e42
UD
1798 * sem_open.c (__sem_mappings_lock): Mark as hidden.
1799 * semaphoreP.h (__sem_mappings_lock): Likewise.
1800
790fc6e4
UD
18012006-05-10 Ulrich Drepper <drepper@redhat.com>
1802
1803 * pthread_atfork.c: Mark __dso_handle as hidden.
1804
be434a72
UD
18052006-05-09 Ulrich Drepper <drepper@redhat.com>
1806
1807 [BZ #2644]
1808 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
1809 the reload problem. Change the one path in pthread_cancel_init
1810 which causes the problem. Force gcc to reload. Simplify callers.
1811 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
1812 (_Unwind_GetBSP): Undo last patch.
1813
3142b1ac
UD
18142006-05-07 Ulrich Drepper <drepper@redhat.com>
1815
bf3635d3
UD
1816 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
1817 function pointer is reloaded after pthread_cancel_init calls.
3142b1ac
UD
1818
1819 [BZ #2644]
1820 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
1821 pointers are reloaded after pthread_cancel_init calls.
1822
27488789
UD
18232006-05-01 Ulrich Drepper <drepper@redhat.com>
1824
1825 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
1826 __always_inline.
1827
a6375d11
UD
18282006-04-27 Ulrich Drepper <drepper@redhat.com>
1829
1830 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1831 Allocate new object which is passed to timer_sigev_thread so that
1832 the timer can be deleted before the new thread is scheduled.
1833
16a1d952
RM
18342006-04-26 Roland McGrath <roland@redhat.com>
1835
1836 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
1837
7960f2a7
UD
18382006-04-08 Ulrich Drepper <drepper@redhat.com>
1839
ab9a9ff8
UD
1840 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
1841 suffix for conditional jumps.
1842 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1843 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1844 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
1845 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
1846 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1847 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1848
7960f2a7
UD
1849 * init.c (sigcancel_handler): Compare with correct PID even if the
1850 thread is in the middle of a fork call.
1851 (sighandler_setxid): Likewise.
1852 Reported by Suzuki K P <suzuki@in.ibm.com> .
1853
2035d91c
UD
18542006-04-07 Jakub Jelinek <jakub@redhat.com>
1855
1856 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
1857
0292b0dd
UD
18582006-04-06 Ulrich Drepper <drepper@redhat.com>
1859
1860 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
1861 fails [Coverity CID 105].
1862
6738b3c0
UD
18632006-04-05 Ulrich Drepper <drepper@redhat.com>
1864
1865 * sysdeps/pthread/pthread.h: Add nonnull attributes.
1866
359157a5
RM
18672006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
1868
1869 [BZ #2505]
1870 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
1871 Define __lll_rel_instr using lwsync.
1872
cd277b2d
UD
18732006-03-27 Ulrich Drepper <drepper@redhat.com>
1874
1875 * allocatestack.c (allocate_stack): Always initialize robust_head.
1876 * descr.h: Define struct robust_list_head.
1877 (struct pthread): Use robust_list_head in robust mutex list definition.
1878 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
1879 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
1880 (__pthread_initialize_minimal_internal): Register robust_list with
1881 the kernel.
1882 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
1883 Declare __set_robust_list_avail.
1884 * pthread_create.c (start_thread): Register robust_list of new thread.
1885 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
1886 waiters.
1887 * pthread_mutex_destroy.c: For robust mutexes don't look at the
1888 number of users, it's unreliable.
1889 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
1890 set_robust_list syscall is available.
1891 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
1892 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
1893 Set robust_head.list_op_pending before trying to lock a robust mutex.
1894 * pthread_mutex_timedlock.c: Likewise.
1895 * pthread_mutex_trylock.c: Likewise.
1896 * pthread_mutex_unlock.c: Likewise for unlocking.
1897 * Makefile (tests): Add tst-robust8.
1898 * tst-robust8.c: New file.
1899
facac085
UD
19002006-03-08 Andreas Schwab <schwab@suse.de>
1901
1902 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
1903 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
1904
7ccbe1a1
RM
19052006-03-05 Roland McGrath <roland@redhat.com>
1906
1907 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
1908 and $config_os doesn't match *linux*.
1909
043cee37
RM
19102006-03-05 David S. Miller <davem@sunset.davemloft.net>
1911
1912 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
1913 Use __syscall_error.
1914 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1915 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1916 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
1917 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1918 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1919 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
1920
88bce79e
UD
19212006-03-02 Ulrich Drepper <drepper@redhat.com>
1922
1923 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
1924
672ec465
UD
19252006-03-01 Ulrich Drepper <drepper@redhat.com>
1926
1927 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1928 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
1929 mutex.
1930 (__lll_robust_timedlock_wait): Likewise.
1931 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
1932 (__lll_robust_lock_wait): Likewise.
1933 (__lll_robust_timedlock_wait): Likewise.
1934 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1935 (__lll_robust_lock_wait): Likewise.
1936 (__lll_robust_timedlock_wait): Likewise.
1937
c4a4875d
RM
19382006-03-01 Jakub Jelinek <jakub@redhat.com>
1939
1940 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
1941 lll_robust_mutex_trylock, lll_robust_mutex_lock,
1942 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
1943 lll_robust_mutex_unlock): Define.
1944 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
1945
3192fd8e
RM
19462006-02-28 H.J. Lu <hongjiu.lu@intel.com>
1947
1948 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
1949 instead of <clone.S>.
1950
14d44b19
RM
19512006-02-27 Jakub Jelinek <jakub@redhat.com>
1952
1953 * Makefile (libpthread-routines): Add
1954 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
1955 and pthread_mutex_[sg]etprioceiling.
1956 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
1957 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
1958 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
1959 pthread_mutex_setprioceiling.
1960 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
1961 PTHREAD_PRIO_PROTECT): New enum values.
1962 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
1963 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
1964 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
1965 prototypes.
1966 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
1967 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
1968 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
1969 Define.
1970 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
1971 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
1972 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
1973 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
1974 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
1975 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
1976 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
1977 protocol mutexes.
1978 * pthread_mutex_getprioceiling.c: New file.
1979 * pthread_mutex_setprioceiling.c: New file.
1980 * pthread_mutexattr_getprioceiling.c: New file.
1981 * pthread_mutexattr_setprioceiling.c: New file.
1982 * pthread_mutexattr_getprotocol.c: New file.
1983 * pthread_mutexattr_setprotocol.c: New file.
1984
62f6b9b2
RM
19852006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
1986
1987 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
1988
e0a3ed4f
RM
19892006-02-27 Roland McGrath <roland@redhat.com>
1990
1991 * sysdeps/pthread/Subdirs: List nptl here too.
1992 * configure (libc_add_on_canonical): New variable.
1993
1994 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
1995
1996 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
1997 self to get main source tree's file.
1998 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
1999 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2000 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2001 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2002 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2003 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2004 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2005 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2006 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2007 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2008 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2009 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2010 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2011
2012 * Makefile: Use $(sysdirs) in vpath directive.
2013
2014 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2015 (CPPFLAGS-timer_routines.c): Likewise.
2016
2017 * Makeconfig (includes): Variable removed.
2018
84cfa284
RM
20192006-02-26 Roland McGrath <roland@redhat.com>
2020
2021 * sysdeps/generic/pt-raise.c: Moved to ...
2022 * pt-raise.c: ... here.
2023 * sysdeps/generic/lowlevellock.h: Moved to ...
2024 * lowlevellock.h: ... here.
2025
c5132ca1
RM
20262006-02-23 Roland McGrath <roland@redhat.com>
2027
2028 * descr.h (struct pthread): Add final member `end_padding'.
2029 (PTHREAD_STRUCT_END_PADDING): Use it.
2030
20312006-02-20 Roland McGrath <roland@redhat.com>
2032
2033 * sysdeps/mips: Directory removed, saved in ports repository.
2034 * sysdeps/unix/sysv/linux/mips: Likewise.
2035
a93317a1
UD
20362006-02-18 Ulrich Drepper <drepper@redhat.com>
2037
2038 * tst-robust1.c: Add second mutex to check that the mutex list is
2039 handled correctly.
2040
f1740bc4
UD
20412006-02-17 Jakub Jelinek <jakub@redhat.com>
2042
2043 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2044 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2045 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2046 lll_robust_mutex_unlock): New macros.
2047 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2048 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2049 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2050 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2051 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2052
a7245bf5
UD
20532006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2054
2055 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2056 definitions.
2057 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2058
49bfc1fe
UD
20592006-02-17 Ulrich Drepper <drepper@redhat.com>
2060
2061 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2062 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2063 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2064 (lll_robust_mutex_unlock): Likewise.
2065
56e987ac
UD
20662006-02-13 Jakub Jelinek <jakub@redhat.com>
2067
2068 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2069 Set robust_list.__next rather than robust_list.
2070 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2071 (__pthread_list_t): New typedef.
2072 (pthread_mutex_t): Replace __next and __prev fields with __list.
2073 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2074 (__pthread_list_t): New typedef.
2075 (pthread_mutex_t): Replace __next and __prev fields with __list.
2076 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2077 (__pthread_list_t, __pthread_slist_t): New typedefs.
2078 (pthread_mutex_t): Replace __next and __prev fields with __list.
2079 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2080 (__pthread_list_t, __pthread_slist_t): New typedefs.
2081 (pthread_mutex_t): Replace __next and __prev fields with __list.
2082 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2083 (__pthread_list_t, __pthread_slist_t): New typedefs.
2084 (pthread_mutex_t): Replace __next and __prev fields with __list.
2085 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2086 (__pthread_slist_t): New typedef.
2087 (pthread_mutex_t): Replace __next field with __list.
2088
683040c3
UD
20892006-02-15 Ulrich Drepper <drepper@redhat.com>
2090
25bc77e6 2091 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
683040c3
UD
2092 PTHREAD_MUTEX_OWNERDEAD.
2093 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2094 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2095 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2096 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2097 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2098 to PTHREAD_MUTEX_INCONSISTENT.
2099 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2100 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2101 * pthread_mutex_trylock.c: Likewise.
2102 * pthread_mutex_timedlock.c: Likewise.
2103 * pthread_mutex_unlock.c: Likewise.
2104 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2105 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2106 lowlevelrobustlock.sym.
2107 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2108 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2109 definitions.
2110 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2111 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2112 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2113 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2114 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2115
bbf209a4
UD
21162006-02-12 Ulrich Drepper <drepper@redhat.com>
2117
b007ce7c
UD
2118 * allocatestack.c (allocate_stack): Initialize robust_list.
2119 * init.c (__pthread_initialize_minimal_internal): Likewise.
2120 * descr.h (struct xid_command): Pretty printing.
2121 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2122 robust_list. Adjust macros.
2123 * pthread_create.c (start_thread): Adjust robust_list handling.
2124 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2125 but the owner for all robust mutex types.
2126 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2127 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
0ca3379d 2128 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
b007ce7c
UD
2129 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2130
bbf209a4
UD
2131 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2132 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2133
b576fca1
UD
21342006-02-08 Jakub Jelinek <jakub@redhat.com>
2135
2136 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2137 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2138
a6df7387
UD
21392006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2140
2141 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2142 Return status.
2143 (lll_futex_timed_wait): Define.
2144
7c65e900
UD
21452006-01-19 Ulrich Drepper <drepper@redhat.com>
2146
2147 * tst-cancel4.c: Test ppoll.
2148
5f9f21e8
AJ
21492006-01-18 Andreas Jaeger <aj@suse.de>
2150
cf407dfb 2151 [BZ #2167]
5f9f21e8
AJ
2152 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2153 (pthread_mutex_t): Follow changes for other archs. Based on patch
2154 by Jim Gifford <patches@jg555.com>.
2155
251278c6
UD
21562006-01-13 Richard Henderson <rth@redhat.com>
2157
2158 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2159
de59a291
RM
21602006-01-10 Roland McGrath <roland@redhat.com>
2161
2162 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2163 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2164 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2165 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2166 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2167 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2168 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2169 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2170 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
0ca13e14 2171 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
de59a291 2172
931786ee
RM
21732006-01-09 Roland McGrath <roland@redhat.com>
2174
5d42c8c3
RM
2175 * tst-initializers1-c89.c: New file.
2176 * tst-initializers1-c99.c: New file.
2177 * tst-initializers1-gnu89.c: New file.
2178 * tst-initializers1-gnu99.c: New file.
2179 * Makefile (tests): Add them.
2180 (CFLAGS-tst-initializers1-c89.c): New variable.
2181 (CFLAGS-tst-initializers1-c99.c): New variable.
2182 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2183 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2184
931786ee
RM
2185 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2186 Use __extension__ on anonymous union definition.
2187 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2188 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2189 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2190 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3c238452 2191 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
931786ee 2192
8dd18431
RM
21932006-01-08 Jakub Jelinek <jakub@redhat.com>
2194
2195 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2196 Don't give the union a name because it changes the mangled name.
2197 Instead name the struct for __data.
2198 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2199 Likewise.
2200 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2201 Likewise.
2202
ae11e412
UD
22032006-01-09 Jakub Jelinek <jakub@redhat.com>
2204
2205 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2206 stack bias to mc_ftp field.
2207
c6885aa1
UD
22082006-01-07 Ulrich Drepper <drepper@redhat.com>
2209
2210 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
6e741bc3 2211 being too clever and reloading the futex value where it shouldn't.
c6885aa1 2212
ae4ad00a
UD
22132006-01-06 Ulrich Drepper <drepper@redhat.com>
2214
2215 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2216 correct type.
2217
ced368f7
UD
22182006-01-06 Jakub Jelinek <jakub@redhat.com>
2219
2220 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2221 Add cfi directives.
2222
d804f5df
UD
22232006-01-06 Ulrich Drepper <drepper@redhat.com>
2224
cbbbb188 2225 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
719046c1
UD
2226 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2227 rename in tcbhead_t.
2228
d804f5df
UD
2229 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2230 Don't give the union a name because it changes the mangled name.
2231 Instead name the struct for __data.
2232 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2233 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2234 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2235 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2236 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2237 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2238
679d83ba
UD
22392006-01-05 Ulrich Drepper <drepper@redhat.com>
2240
2241 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2242 Return status.
2243 (lll_futex_timed_wait): Define.
2244 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2245 * sysdeps/pthread/aio_misc.h: New file.
2246
06dc5bf3
RM
22472006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2248
2249 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2250
9759bbf1
UD
22512006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2252
2253 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2254 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2255 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2256
db59b28b
UD
22572006-01-04 Ulrich Drepper <drepper@redhat.com>
2258
2259 * tst-cancel24.cc: Use C headers instead of C++ headers.
2260
b01fe5f7
UD
22612006-01-03 Jakub Jelinek <jakub@redhat.com>
2262
2263 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2264 sparc-linux configured glibc.
2265 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2266 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2267 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2268 atomic_compare_and_exchange_val_24_acq instead of
2269 atomic_compare_and_exchange_val_acq.
2270 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2271 instead of atomic_exchange_rel.
2272 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2273 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2274 file.
2275 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2276 file.
2277 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2278 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2279 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2280 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2281 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2282 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2283 New file.
2284 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2285 New file.
2286 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2287 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2288 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2289 file.
2290 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2291 file.
2292 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2293
35c2fd59
UD
22942006-01-03 Ulrich Drepper <drepper@redhat.com>
2295
2296 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2297 mutex initializers.
2298
305bb37e
UD
22992006-01-02 Jakub Jelinek <jakub@redhat.com>
2300
2301 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2302 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2303 THREAD_COPY_POINTER_GUARD): Define.
2304 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2305 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2306
cc792128
UD
23072006-01-01 Ulrich Drepper <drepper@redhat.com>
2308
2309 * version.c: Update copyright year.
2310
db0a00d3
UD
23112005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2312
2313 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2314 .eh_frame section, use cfi_* directives.
2315 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2316
b36205c4
UD
23172005-12-30 Ulrich Drepper <drepper@redhat.com>
2318
2319 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2320 now.
2321
8b4f1598
UD
23222005-12-29 Ulrich Drepper <drepper@redhat.com>
2323
2324 * sysdeps/pthread/sigaction.c: Removed.
2325 * sigaction.c: New file.
2326 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2327
fec5592d
UD
23282005-12-28 Ulrich Drepper <drepper@redhat.com>
2329
2330 * Makefile (tests): Add tst-signal7.
2331 * tst-signal7.c: New file.
2332
db169ed5
RM
23332005-12-27 Roland McGrath <roland@redhat.com>
2334
2335 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2336 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2337 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2338 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2339 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2340 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2341 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2342 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2343 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2344 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2345 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2346
bfffffae
UD
23472005-12-27 Jakub Jelinek <jakub@redhat.com>
2348
2349 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2350 and __prev field to pthread_mutex_t.
2351 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2352 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2353 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2354 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2355 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2356 to pthread_mutex_t.
2357
1bcfb5a5
UD
23582005-12-26 Ulrich Drepper <drepper@redhat.com>
2359
2360 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2361 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2362 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2363 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2364 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2365 and PTHREAD_MUTEXATTR_FLAG_BITS.
2366 * descr.h (struct pthread): Add robust_list field and define
2367 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2368 * pthread_mutexattr_getrobust.c: New file.
2369 * pthread_mutexattr_setrobust.c: New file.
2370 * pthread_mutex_consistent.c: New file.
2371 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2372 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2373 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2374 Adjust pthread_mutex_t initializers.
2375 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2376 field to pthread_mutex_t.
2377 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2378 and __prev field to pthread_mutex_t.
2379 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2380 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2381 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2382 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2383 * pthread_mutexattr_gettype.c: Likewise.
2384 * pthread_mutexattr_setpshared.c: Likewise.
2385 * pthread_mutexattr_settype.c: Likewise.
2386 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2387 Initialize mutex kind according to robust flag.
2388 * pthread_mutex_lock.c: Implement local robust mutex.
2389 * pthread_mutex_timedlock.c: Likewise.
2390 * pthread_mutex_trylock.c: Likewise.
2391 * pthread_mutex_unlock.c: Likewise.
2392 * pthread_create.c (start_thread): Mark robust mutexes which remained
2393 locked as dead.
2394 * tst-robust1.c: New file.
2395 * tst-robust2.c: New file.
2396 * tst-robust3.c: New file.
2397 * tst-robust4.c: New file.
2398 * tst-robust5.c: New file.
2399 * tst-robust6.c: New file.
2400 * tst-robust7.c: New file.
2401 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2402 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2403 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2404 tst-robust5, tst-robust6, and tst-robust7.
2405
2406 * tst-typesizes.c: New file.
2407 * Makefile (tests): Add tst-typesizes.
2408
2409 * tst-once3.c: More debug output.
2410
9333ed0d
UD
24112005-12-24 Ulrich Drepper <drepper@redhat.com>
2412
d4d138a4
UD
2413 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2414 missing after last change.
2415
bfffffae 2416 * version.c: Update copyright year.
9333ed0d 2417
dcc73a8d
UD
24182005-12-23 Ulrich Drepper <drepper@redhat.com>
2419
2420 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2421 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2422 * pthread_mutex_trylock.c: Likewise.
2423 * pthread_mutex_timedlock.c: Likewise.
2424 * pthread_mutex_unlock.c: Likewise.
2425
879f3ca6
RM
24262005-12-22 Roland McGrath <roland@redhat.com>
2427
2428 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2429 so that #include_next's search location is not reset to the -I..
2430 directory where <nptl/...> can be found.
2431
077a0da7
UD
24322005-12-22 Ulrich Drepper <drepper@redhat.com>
2433
2434 [BZ #1913]
2435 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2436 Fix unwind info. Remove useless branch prediction prefix.
7735afa2
UD
2437 * tst-cancel24.cc: New file.
2438 * Makefile: Add rules to build and run tst-cancel24.
077a0da7 2439
8dea90aa
RM
24402005-12-21 Roland McGrath <roland@redhat.com>
2441
2442 * libc-cancellation.c: Use <> rather than "" #includes.
2443 * pt-cleanup.c: Likewise.
2444 * pthread_create.c: Likewise.
2445 * pthread_join.c: Likewise.
2446 * pthread_timedjoin.c: Likewise.
2447 * pthread_tryjoin.c: Likewise.
2448 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2449 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2450 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2451 * unwind.c: Likewise.
2452
8da21f96
UD
24532005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2454
2455 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2456 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2457 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2458 THREAD_COPY_POINTER_GUARD): Define.
2459
00c2b3b9
UD
24602005-12-19 Jakub Jelinek <jakub@redhat.com>
2461
2462 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2463 rather than one.
2464 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2465 THREAD_COPY_POINTER_GUARD): Define.
2466 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2467 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2468 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2469 THREAD_COPY_POINTER_GUARD): Define.
2470 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2471 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2472 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2473 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2474 Use PTR_DEMANGLE for B0 if defined.
2475
827b7087
UD
24762005-12-17 Ulrich Drepper <drepper@redhat.com>
2477
2478 * pthread_create.c (__pthread_create_2_1): Use
2479 THREAD_COPY_POINTER_GUARD if available.
2480 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2481 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2482 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2483 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2484 * sysdeps/x86_64/tls.h: Likewise.
2485
2826ac7e
RM
24862005-12-15 Roland McGrath <roland@redhat.com>
2487
2488 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2489
b6ab06ce
UD
24902005-12-13 Ulrich Drepper <drepper@redhat.com>
2491
2492 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2493 sysdeps/generic.
2494 * errno-loc.c: New file.
2495
f0d1a3b5
RM
24962005-12-12 Roland McGrath <roland@redhat.com>
2497
2498 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2499 adjustments before choosing stack size. Update minimum stack size
2500 calculation to match allocate_stack change.
2501
db13ddbc
UD
25022005-12-12 Ulrich Drepper <drepper@redhat.com>
2503
2504 * allocatestack.c (allocate_stack): Don't demand that there is an
2505 additional full page available on the stack beside guard, TLS, the
2506 minimum stack.
2507
088f460f
UD
25082005-11-24 Ulrich Drepper <drepper@redhat.com>
2509
2510 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2511 (__cleanup_fct_attribute): Use __regparm__ not regparm.
2512
2513 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2514 compiling 32-bit code we must define __cleanup_fct_attribute.
2515
16feadf2
UD
2516005-11-24 Jakub Jelinek <jakub@redhat.com>
2517
2518 [BZ #1920]
2519 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2520 __attribute__ instead of __attribute.
2521 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2522 (__cleanup_fct_attribute): Likewise.
2523
e6e493bb
UD
25242005-11-17 Jakub Jelinek <jakub@redhat.com>
2525
2526 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2527 a write barrier before writing libgcc_s_getcfa.
2528
8e635611
UD
25292005-11-06 Ulrich Drepper <drepper@redhat.com>
2530
2531 * sysdeps/unix/sysv/linux/configure: Removed.
2532
ce33ee7c
UD
25332005-11-05 Ulrich Drepper <drepper@redhat.com>
2534
2535 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2536 optional init_array/fini_array support.
2537
20d511e0
RM
25382005-10-24 Roland McGrath <roland@redhat.com>
2539
2540 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2541 versioned_symbol use.
2542
fe60d146
RM
25432005-10-16 Roland McGrath <roland@redhat.com>
2544
2545 * init.c (__pthread_initialize_minimal_internal): Even when using a
2546 compile-time default stack size, apply the minimum that allocate_stack
2547 will require, and round up to page size.
2548
0faa1cf5
RM
25492005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
2550
2551 * Makefile ($(test-modules)): Remove static pattern rule.
2552
f9126cc2
UD
25532005-10-14 Jakub Jelinek <jakub@redhat.com>
2554 Ulrich Drepper <drepper@redhat.com>
2555
2556 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2557 alignment in callback function.
2558 * Makefile: Add rules to build and run tst-align3.
2559 * tst-align3.c: New file.
2560
015a5d22
RM
25612005-10-03 Jakub Jelinek <jakub@redhat.com>
2562
2563 * allocatestack.c (setxid_signal_thread): Add
2564 INTERNAL_SYSCALL_DECL (err).
2565
b71ce910
UD
25662005-10-02 Jakub Jelinek <jakub@redhat.com>
2567
2568 * allocatestack.c (setxid_signal_thread): Need to use
2569 atomic_compare_and_exchange_bool_acq.
2570
dff9a7a1
UD
25712005-10-01 Ulrich Drepper <drepper@redhat.com>
2572 Jakub Jelinek <jakub@redhat.com>
2573
2574 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
2575 CANCEL_RESTMASK.
2576 (struct pthread): Move specific_used field to avoid padding.
2577 Add setxid_futex field.
2578 * init.c (sighandler_setxid): Reset setxid flag and release the
2579 setxid futex.
2580 * allocatestack.c (setxid_signal_thread): New function. Broken
2581 out of the bodies of the two loops in __nptl_setxid. For undetached
2582 threads check whether they are exiting and if yes, don't send a signal.
2583 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2584 * pthread_create.c (start_thread): For undetached threads, check
2585 whether setxid bit is set. If yes, wait until signal has been
2586 processed.
2587
2588 * allocatestack.c (STACK_VARIABLES): Initialize them.
2589 * pthread_create.c (__pthread_create_2_1): Initialize pd.
2590
560b4709
UD
25912004-09-02 Jakub Jelinek <jakub@redhat.com>
2592
2593 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2594 waiters, awake all waiters on the associated mutex.
2595
5eac4760
RM
25962005-09-22 Roland McGrath <roland@redhat.com>
2597
2598 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2599 ../sysdeps/x86_64/hp-timing.h).
2600
a3615024
UD
26012005-08-29 Jakub Jelinek <jakub@redhat.com>
2602
2603 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
2604 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2605 (lll_futex_wake_unlock): Define.
2606 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
2607 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2608 (lll_futex_wake_unlock): Define.
2609 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
2610 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2611 (lll_futex_wake_unlock): Define.
2612 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
2613 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2614 (lll_futex_wake_unlock): Define.
2615 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
2616 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2617 (lll_futex_wake_unlock): Define.
2618 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
2619 lll_futex_wake_unlock.
2620 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2621 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2622 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2623 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2624 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2625 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
2626
bf017034
UD
26272005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2628
2629 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
2630 Fix typo in register name.
2631
fd4af664
UD
26322005-08-23 Ulrich Drepper <drepper@redhat.com>
2633
8558d715
UD
2634 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2635 Use __sigfillset. Document that sigfillset does the right thing wrt
2636 to SIGSETXID.
fd4af664 2637
3fd1bc67
UD
26382005-07-11 Jakub Jelinek <jakub@redhat.com>
2639
44d75caf 2640 [BZ #1102]
3fd1bc67
UD
2641 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
2642 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
2643 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
2644 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
2645 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
2646 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
2647 in the structure.
2648 * Makefile (tests): Add tst-initializers1.
2649 (CFLAGS-tst-initializers1.c): Set.
2650 * tst-initializers1.c: New test.
2651
553185e2
UD
26522005-07-11 Jakub Jelinek <jakub@redhat.com>
2653
2654 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
2655 Make sure __flags are located at offset 48 from the start of the
2656 structure.
2657
8df08cb2
RM
26582005-07-02 Roland McGrath <roland@redhat.com>
2659
2660 * Makeconfig: Comment fix.
2661
253eb3a0
UD
26622005-07-05 Jakub Jelinek <jakub@redhat.com>
2663
2664 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
2665 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
2666 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
2667 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
2668 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2669 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2670 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
2671 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
2672 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
2673 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
2674
bb6e8ca3
UD
26752005-06-25 Jakub Jelinek <jakub@redhat.com>
2676
2677 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
2678 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2679 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
2680 fields.
2681 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2682 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
2683 field. Put in sysinfo field unconditionally.
2684 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2685 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
2686 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2687 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
2688 fields.
2689 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
2690 * pthread_create.c (__pthread_create_2_1): Use
2691 THREAD_COPY_STACK_GUARD macro.
2692 * Makefile: Add rules to build and run tst-stackguard1{,-static}
2693 tests.
2694 * tst-stackguard1.c: New file.
2695 * tst-stackguard1-static.c: New file.
2696
99c7f870
UD
26972005-06-14 Alan Modra <amodra@bigpond.net.au>
2698
2699 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2700 Invoke CGOTSETUP and CGOTRESTORE.
2701 (CGOTSETUP, CGOTRESTORE): Define.
2702
8074c5c5
RM
27032005-05-29 Richard Henderson <rth@redhat.com>
2704
2705 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
2706 (tf_write, tf_writev): Use it.
2707 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
2708 the system minimum.
2709
c179df4e
UD
27102005-05-23 Jakub Jelinek <jakub@redhat.com>
2711
2712 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2713 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
2714 __librt_*_asynccancel@local.
2715
b0e196a4
UD
27162005-05-17 Alan Modra <amodra@bigpond.net.au>
2717
2718 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
2719 all occurrences of JUMPTARGET. Instead append @local to labels.
2720
f7d78e18
UD
27212005-05-20 Jakub Jelinek <jakub@redhat.com>
2722
2723 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
2724 size/alignment of struct pthread rather than tcbhead_t.
2725 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2726 Likewise.
2727 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2728 Likewise.
2729 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
2730 Likewise.
2731
363dd976
UD
27322005-05-19 Richard Henderson <rth@redhat.com>
2733
2734 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
2735 __sync_val_compare_and_swap, not explicit _si variant.
2736 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
2737
1ad9da69
UD
27382005-05-03 Ulrich Drepper <drepper@redhat.com>
2739
2740 [BZ #915]
2741 * sysdeps/pthread/pthread.h: Avoid empty initializers.
2742
5085cd1f
UD
27432005-05-03 Jakub Jelinek <jakub@redhat.com>
2744
2745 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
2746 .eh_frame section, use cfi_* directives.
2747
ad529081
UD
27482005-04-27 Jakub Jelinek <jakub@redhat.com>
2749
2750 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
2751 of "" includes.
2752
dea99685
UD
27532005-04-27 Ulrich Drepper <drepper@redhat.com>
2754
c06aad09 2755 [BZ #1075]
dea99685
UD
2756 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
2757 aio_write blocks.
2758
84060bad
RM
27592005-04-27 Roland McGrath <roland@redhat.com>
2760
5e2d8ac8
RM
2761 * Makefile (tests): Remove tst-clock2.
2762
84060bad
RM
2763 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
2764 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
2765 translating to the kernel clockid_t for our own process/thread clock.
2766
2767 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
2768
4a035b9d
RM
27692005-04-15 Jakub Jelinek <jakub@redhat.com>
2770
2771 * old_pthread_cond_init.c: Include <errno.h>.
2772 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
2773 process shared or uses clock other than CLOCK_REALTIME.
2774 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
2775
edac0e8f
UD
27762005-04-13 David S. Miller <davem@davemloft.net>
2777
2778 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
2779 * sysdeps/sparc/sparc64/clone.S: New file.
2780
613d8d52
RM
27812005-04-05 Jakub Jelinek <jakub@redhat.com>
2782
44d75caf 2783 [BZ #1102]
613d8d52
RM
2784 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
2785 __inline instead of inline.
2786 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
2787
ee618985
UD
27882005-03-31 Jakub Jelinek <jakub@redhat.com>
2789
2790 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
2791 functionally equivalent, but shorter instructions.
2792 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2793 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2794 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2795 Likewise.
2796 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2797 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2798 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2799 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2801 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2802 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2803 Likewise.
2804 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2805 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2806 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2807 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2808 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2809
f850220b
AJ
28102005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
2811
2812 * sysdeps/mips/Makefile: New file.
2813 * sysdeps/mips/nptl-sysdep.S: New file.
2814 * sysdeps/mips/tcb-offsets.sym: New file.
2815 * sysdeps/mips/pthread_spin_lock.S: New file.
2816 * sysdeps/mips/pthread_spin_trylock.S: New file.
2817 * sysdeps/mips/pthreaddef.h: New file.
2818 * sysdeps/mips/tls.h: New file.
2819 * sysdeps/mips/jmpbuf-unwind.h: New file.
2820 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
2821 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
2822 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
2823 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
2824 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
2825 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
2826 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
2827 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
2828 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
2829 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
2830
1e6da2b0
UD
28312005-03-23 Ulrich Drepper <drepper@redhat.com>
2832
c06aad09 2833 [BZ #1112]
1e6da2b0
UD
2834 * pthread_create.c (__pthread_create_2_1): Rename syscall error
2835 variable to scerr.
2836
5233d576
RM
28372005-03-10 Jakub Jelinek <jakub@redhat.com>
2838
2839 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
2840
3053ff11
RM
28412005-02-25 Roland McGrath <roland@redhat.com>
2842
2843 * alloca_cutoff.c: Correct license text.
2844 * tst-unload.c: Likewise.
2845 * sysdeps/pthread/allocalim.h: Likewise.
2846 * sysdeps/pthread/pt-initfini.c: Likewise.
2847 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2848 * sysdeps/pthread/bits/sigthread.h: Likewise.
2849 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2850 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2851
9cfe5381
RM
28522005-02-16 Roland McGrath <roland@redhat.com>
2853
2854 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2855 Use unsigned int * for ptr_nthreads.
2856
7de00121
RM
28572005-02-14 Alan Modra <amodra@bigpond.net.au>
2858
20d511e0 2859 [BZ #721]
7de00121
RM
2860 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
2861 gcc4.
2862
4bae262d
UD
28632005-02-07 Richard Henderson <rth@redhat.com>
2864
613d8d52 2865 [BZ #787]
4bae262d
UD
2866 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
2867 argument.
2868
75df54b7
RM
28692004-11-03 Marcus Brinkmann <marcus@gnu.org>
2870
2871 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
2872 order of arguments in invocation of atomic_add_zero.
2873
ea9c93cc
UD
28742005-01-26 Jakub Jelinek <jakub@redhat.com>
2875
9cfe5381 2876 [BZ #737]
ea9c93cc
UD
2877 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
2878 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
2879 at least gotntpoff relocation and addition.
2880 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2881 Likewise.
2882 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
2883 Likewise.
2884 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2885 Likewise.
2886
9dcafc55
UD
28872005-01-06 Ulrich Drepper <drepper@redhat.com>
2888
2889 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
2890 entry for static tls deallocation fix.
2891 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
2892 also contains information whether the memory pointed to is static
2893 TLS or not.
2894 * sysdeps/i386/tls.h: Likewise.
2895 * sysdeps/ia64/tls.h: Likewise.
2896 * sysdeps/powerpc/tls.h: Likewise.
2897 * sysdeps/s390/tls.h: Likewise.
2898 * sysdeps/sh/tls.h: Likewise.
2899 * sysdeps/sparc/tls.h: Likewise.
2900 * sysdeps/x86_64/tls.h: Likewise.
2901
a71c152c
UD
29022004-12-27 Ulrich Drepper <drepper@redhat.com>
2903
2904 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
2905
d143c49e
UD
29062004-12-21 Jakub Jelinek <jakub@redhat.com>
2907
2908 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
2909 %esp.
2910 * Makefile (tests): Add tst-align2.
2911 * tst-align2.c: New test.
2912 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
2913 -mpreferred-stack-boundary=4.
2914
50130ded
RM
29152004-12-18 Roland McGrath <roland@redhat.com>
2916
2917 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
2918 New file removed withdrawn for the moment.
2919
cbc53df0
RH
29202004-12-17 Richard Henderson <rth@redhat.com>
2921
2922 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
2923 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
50130ded 2924
fb9d5c73
UD
29252004-12-16 Ulrich Drepper <drepper@redhat.com>
2926
03332aa6
UD
2927 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
2928 Increased PTHREAD_STACK_MIN.
2929
fb9d5c73
UD
2930 * tst-context1.c (stacks): Use bigger stack size.
2931
e853ea00
UD
29322004-12-16 Jakub Jelinek <jakub@redhat.com>
2933
2934 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
2935 * sysdeps/sparc/tcb-offsets.sym: Add TID.
2936
f23673fc
UD
29372004-12-15 Jakub Jelinek <jakub@redhat.com>
2938
2939 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
2940 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
2941 * sysdeps/s390/tcb-offsets.sym (TID): Add.
2942
917fbe70
UD
29432004-12-15 Ulrich Drepper <drepper@redhat.com>
2944
2945 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
2946
1f9d7c27
UD
29472004-12-14 Ulrich Drepper <drepper@redhat.com>
2948
2949 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
2950 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
2951
2952 * tst-getpid1.c: If child crashes, report this first. Print which
2953 signal.
2954
bf7c04cd
UD
29552004-12-09 Ulrich Drepper <drepper@redhat.com>
2956
2957 * init.c (__pthread_initialize_minimal_internal): Also unblock
2958 SIGSETXID.
2959
29602004-12-01 Jakub Jelinek <jakub@redhat.com>
2961
2962 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
2963 _POSIX_THREAD_CPUTIME): Define to 0.
2964 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
2965 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
2966 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
2967 __timer_signal_thread_tclk): Remove.
2968 (init_module): Remove their initialization.
2969 (thread_cleanup): Remove their cleanup assertions.
2970 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
2971 __timer_signal_thread_tclk): Remove.
2972 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
75df54b7 2973 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
bf7c04cd
UD
2974 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
2975
484cc801
UD
29762004-12-07 Jakub Jelinek <jakub@redhat.com>
2977
2978 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
2979 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
2980
2981 * Makefile (tests): Add tst-getpid2.
2982 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
2983 (do_test): Use it. Use __clone2 instead of clone on ia64.
2984 * tst-getpid2.c: New test.
2985
2da9a6a1
UD
29862004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2987
2988 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
2989
1ff241b8
UD
29902004-12-04 Ulrich Drepper <drepper@redhat.com>
2991
2992 * Makefile (tests): Add tst-getpid1.
2993 * tst-getpid1.c: New file.
2994 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
2995 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
2996
3f488b9c
RM
29972004-12-02 Roland McGrath <roland@redhat.com>
2998
2999 * Makefile (libpthread-nonshared): Variable removed.
3000 ($(objpfx)libpthread_nonshared.a): Target removed.
3001 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3002 These are now handled by generic magic from
3003 libpthread-static-only-routines being set.
3004
597ce09c
UD
30052004-11-27 Ulrich Drepper <drepper@redhat.com>
3006
3007 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3008 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3009 _POSIX_THREAD_PRIO_PROTECT): Define.
3010 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3011 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3012 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3013
60e4523a
UD
30142004-11-26 Jakub Jelinek <jakub@redhat.com>
3015
3016 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3017 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3018 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3019 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3020 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3021 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3022 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3023
f1f2cafc
UD
30242004-11-24 Ulrich Drepper <drepper@redhat.com>
3025
bca2d208
UD
3026 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3027
f1f2cafc
UD
3028 * Makefile (libpthread-routines): Add pthread_setschedprio.
3029 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3030 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3031 * pthread_setschedprio.c: New file.
3032
b639d0c9
UD
30332004-11-20 Jakub Jelinek <jakub@redhat.com>
3034
ef2bb413
UD
3035 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3036 * pthread_cancel.c (pthread_create): Likewise.
3037
b639d0c9
UD
3038 * Makefile (libpthread-routines): Add vars.
3039 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3040 * init.c (__default_stacksize, __is_smp): Remove.
3041 * vars.c: New file.
3042 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3043 and define a wrapper macro.
3044 (PTHREAD_STATIC_FN_REQUIRE): Define.
3045 * allocatestack.c (__find_thread_by_id): Undefine.
3046 * pthread_create (__pthread_keys): Remove.
3047 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3048 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3049 PTHREAD_STATIC_FN_REQUIRE.
3050
3defcff3
UD
30512004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3052
3053 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3054 parameter to REGISTER macro.
3055
ec188f92
RM
30562004-11-17 Roland McGrath <roland@redhat.com>
3057
3058 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3059 Make sure SIGCANCEL is blocked as well.
3060
ccd8de9a
UD
30612004-11-10 Jakub Jelinek <jakub@redhat.com>
3062
3063 * sysdeps/pthread/setxid.h: New file.
3064 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3065 (struct xid_command): Add forward decl.
3066 (struct pthread_functions): Change return type of __nptl_setxid hook
3067 to int.
3068 * pthreadP.h (__nptl_setxid): Change return type to int.
3069 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3070 calling thread, return its return value and set errno on failure.
3071 * descr.h (struct xid_command): Change id type to long array.
3072
3073 * Makefile: Add rules to build and test tst-setuid1 and
3074 tst-setuid1-static.
3075 * tst-setuid1.c: New test.
3076 * tst-setuid1-static.c: New test.
3077
ed2ced8a
UD
30782004-11-10 Jakub Jelinek <jakub@redhat.com>
3079
3080 * Makefile (tests): Add tst-exit3.
3081 * tst-exit3.c: New test.
3082
948603ee
UD
30832004-11-09 Ulrich Drepper <drepper@redhat.com>
3084
3085 * Makefile (tests): Add tst-exit2.
3086 * tst-exit2.c: New file.
3087
ba5ffd2a
RM
30882004-11-09 Roland McGrath <roland@redhat.com>
3089
3090 [BZ #530]
3091 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3092 here, before calling clone.
3093 * pthread_create.c (start_thread): Don't do it here.
3094
c4d7bd39
RM
30952004-11-02 Jakub Jelinek <jakub@redhat.com>
3096
3097 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3098
543fb0c8
UD
30992004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3100
3101 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3102 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3103 assembler warning.
3104
a1fbd858
UD
31052004-10-28 Jakub Jelinek <jakub@redhat.com>
3106
3107 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3108 if sched_priority is not between minprio and maxprio.
3109
c2a4357a
UD
31102004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3111
3112 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3113 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3114
3115 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3116 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3117
78d8d211
UD
31182004-10-24 Ulrich Drepper <drepper@redhat.com>
3119
3120 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3121 not-cancelable I/O functions.
3122
dd28590f
UD
31232004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3124
3125 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3126 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3127 make sure 2 is stored in the futex and we looked at the old value.
3128 Fix a few other problems to return the correct value.
3129
f8c97af7
RH
31302004-10-14 Richard Henderson <rth@redhat.com>
3131
3132 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3133 make gcc4 happy.
3134
3feb8efa
UD
31352004-10-06 Jakub Jelinek <jakub@redhat.com>
3136
3137 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3138 of pthread-functions.h and pthreaddef.h.
3139 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3140
3141 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3142 Change __data.__nwaiters from int to unsigned int.
3143
3144 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3145 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3146
3147 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3148 before return type.
3149
3150 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3151 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3152
67060ef5
UD
31532004-10-06 Ulrich Drepper <drepper@redhat.com>
3154
3155 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3156 test fails, remove message queue.
3157 (tf_msgsnd): Likewise.
3158
f38a3086
UD
31592004-10-05 Jakub Jelinek <jakub@redhat.com>
3160
3161 * tst-clock1.c: Change #ifdef to #if defined.
3162 * tst-clock2.c: Likewise.
3163 * tst-cond11.c: Likewise.
3164
2c03b6db
UD
3165 * sysdeps/pthread/timer_create.c (timer_create): Use
3166 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3167 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3168 THREAD_CPUTIME.
3169
6ab5f50d
UD
31702004-10-05 Jakub Jelinek <jakub@redhat.com>
3171
3172 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3173 _POSIX_THREAD_CPUTIME): Define to 0.
3174
e4bb4853
UD
31752004-10-04 Ulrich Drepper <drepper@redhat.com>
3176
3177 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3178 and _POSIX_THREAD_CPUTIME to zero.
3179 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3180 * tst-barrier2.c: Fix testing for POSIX feature.
3181 * tst-clock1.c: Likewise.
3182 * tst-clock2.c: Likewise.
3183 * tst-cond11.c: Likewise.
3184 * tst-cond4.c: Likewise.
3185 * tst-cond6.c: Likewise.
3186 * tst-flock2.c: Likewise.
3187 * tst-mutex4.c: Likewise.
3188 * tst-mutex9.c: Likewise.
3189 * tst-rwlock12.c: Likewise.
3190 * tst-rwlock4.c: Likewise.
3191 * tst-signal1.c: Likewise.
3192 * tst-spin2.c: Likewise.
3193 * sysdeps/pthread/posix-timer.h: Likewise.
3194 * sysdeps/pthread/timer_create.c: Likewise.
3195 * sysdeps/pthread/timer_routines.c: Likewise.
3196
c1b48791
UD
31972004-10-01 Ulrich Drepper <drepper@redhat.com>
3198
927f0673
UD
3199 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3200 (__lll_mutex_timedlock_wait): Address futex correctly.
3201
c1b48791 3202 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
b610fa2d 3203 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
c1b48791
UD
3204 make sure 2 is stored in the futex and we looked at the old value.
3205 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3206 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3207 which might very well made the code not working at all before.
7b87aca6 3208 [BZ #417]
c1b48791 3209
e9f4e844
UD
32102004-09-28 Ulrich Drepper <drepper@redhat.com>
3211
4f21c95d
UD
3212 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3213 allow SIGSETXID to be sent.
3214 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3215 for SIGSETXID to be defined.
3216 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3217 SIGSETXID cannot be blocked.
3218
e9f4e844
UD
3219 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3220 Add __extension__ to long long types.
3221 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3222 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3223 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3224 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3225 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3226 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3227 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3228
5f66b766
UD
32292004-09-25 Ulrich Drepper <drepper@redhat.com>
3230
3231 * descr.h (struct pthread): Add stopped_start field.
3232 * sysdeps/pthread/createthread.c (create_thread): Set
3233 start_stopped flag in descriptor for new thread appropriately.
3234 * pthread_create.c (start_thread): Only take lock to be stopped on
3235 startup if stopped_start flag says so.
3236
362038b0
UD
32372004-09-24 Ulrich Drepper <drepper@redhat.com>
3238
3f80a99b
UD
3239 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3240 is created detached and if yes, do not try to free the stack in case
3241 the thread creation failed.
3242 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3243 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3244 case there has been no error. [BZ #405]
3245
362038b0
UD
3246 * pthread_create.c (start_thread): Don't wait for scheduler data
3247 etc to be set at the beginning of the function. The cancellation
3248 infrastructure must have been set up. And enable async
3249 cancellation before potentially going to sleep. [BZ #401]
3250
65f0beb9
UD
32512004-09-20 Ulrich Drepper <drepper@redhat.com>
3252
3c12b91a 3253 * Versions: Remove exports for pthread_set*id_np functions.
65f0beb9
UD
3254 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3255 for now.
3256 * Makefile: Don't build pthread_set*id code for now.
3257
2edb61e3
UD
32582004-09-19 Ulrich Drepper <drepper@redhat.com>
3259
3260 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3261 internal use.
3262 * allocatestack.c (__nptl_setxid): New function.
3263 * descr.h (struct xid_command): Define type.
3264 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3265 (sighandler_setxid): New function.
3266 (__pthread_initialize_minimal): Register sighandler_setxid for
3267 SIGCANCEL.
3268 * pt-allocrtsig.c: Update comment.
3269 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3270 Declare __nptl_setxid.
3271 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3272 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3273 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3274 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3275 and pthread_setresuid_np.
3276 * pthread_setgid_np.c: New file.
3277 * pthread_setuid_np.c: New file.
3278 * pthread_setegid_np.c: New file.
3279 * pthread_seteuid_np.c: New file.
3280 * pthread_setregid_np.c: New file.
3281 * pthread_setreuid_np.c: New file.
3282 * pthread_setresgid_np.c: New file.
3283 * pthread_setresuid_np.c: New file.
3284 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3285 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3286 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3287 and pthread_setresuid_np.
3288 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3289 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3290 pthread_setregid, and pthread_setresgid.
3291
1ab1fa6f
UD
32922004-09-18 Ulrich Drepper <drepper@redhat.com>
3293
3294 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3295 ENOMEM when out of memory.
3296
ae9e6b36
RM
32972004-09-10 Roland McGrath <roland@redhat.com>
3298
3299 [BZ #379]
3300 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3301 code, since we don't try to use the broken CLONE_STOPPED any more.
3302 * pthread_create.c (start_thread): Likewise.
3303
424bd2f8
RH
33042004-09-15 Richard Henderson <rth@redhat.com>
3305
3306 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3307
17b8a52d
UD
33082004-09-01 David Mosberger <davidm@hpl.hp.com>
3309
3310 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3311 (__libc_unwind_longjmp): Delete macro and declare as function.
3312 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3313 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3314 nptl directory.
3315 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3316 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3317 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3318
ccc63b07
UD
33192004-09-12 Ulrich Drepper <drepper@redhat.com>
3320
3321 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3322 for __USE_XOPEN2K.
3323 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3324 types also for __USE_XOPEN2K.
3325 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3326 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3327 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3328 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3329 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3330 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3331 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3332 [BZ #320]
3333
31f93b3b
UD
33342004-09-08 Ulrich Drepper <drepper@redhat.com>
3335
3336 * sysdeps/pthread/pthread.h
3337 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3338 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3339 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3340 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3341 [BZ #375]
3342
e0329987
UD
33432004-09-07 Ulrich Drepper <drepper@redhat.com>
3344
590b40f7
UD
3345 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3346 PSEUDO to be used with . prefix.
3347
67254a97
UD
3348 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3349 Use atomic_increment instead of atomic_exchange_and_add.
3350 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3351 Likewise.
3352 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3353 Likewise.
3354 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3355 Likewise.
3356
3357 * allocatestack.c (allocate_stack): Use atomic_increment_val
3358 instead of atomic_exchange_and_add.
3359 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3360 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3361 Likewise.
3362 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3363 Likewise.
3364
e0329987
UD
3365 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3366 the initialization function might throw.
3367
42d86dd6 33682005-09-05 Richard Henderson <rth@redhat.com>
e0329987 3369
42d86dd6
RH
3370 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3371 Move definition inside libpthread, libc, librt check. Provide
3372 definition for rtld.
3373
73f7c32c
UD
33742004-09-02 Ulrich Drepper <drepper@redhat.com>
3375
f76c8499
UD
3376 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3377 * sysdeps/i386/jmpbuf-unwind.h: Likewise
3378 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3379 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3380 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3381 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3382 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3383 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3384 * unwind.c: Use it.
3385
73f7c32c
UD
3386 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3387 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3388 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3389 Likewise.
3390 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3391 Decrement __nwaiters. If pthread_cond_destroy has been called and
3392 this is the last waiter, signal pthread_cond_destroy caller and
3393 avoid using the pthread_cond_t structure after unlock.
3394 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3396 Read clock type from the least significant bits of __nwaiters instead
3397 of __clock.
3398 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3399 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3400
34012004-08-31 Jakub Jelinek <jakub@redhat.com>
3402
3403 [BZ #342]
3404 * Makefile (tests): Add tst-cond20 and tst-cond21.
3405 * tst-cond20.c: New test.
3406 * tst-cond21.c: New test.
3407 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3408 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3409 it unsigned int.
3410 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3411 Likewise.
3412 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3413 (pthread_cond_t): Likewise.
3414 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3415 Likewise.
3416 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3417 Likewise.
3418 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3419 Likewise.
3420 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3421 (cond_nwaiters): New.
3422 (clock_bits): New.
3423 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3424 if there are waiters not signalled yet.
3425 Wait until all already signalled waiters wake up.
3426 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3427 __nwaiters. If pthread_cond_destroy has been called and this is the
3428 last waiter, signal pthread_cond_destroy caller and avoid using
3429 the pthread_cond_t structure after unlock.
3430 (__pthread_cond_wait): Increment __nwaiters in the beginning,
3431 decrement it when leaving. If pthread_cond_destroy has been called
3432 and this is the last waiter, signal pthread_cond_destroy caller.
3433 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3434 Likewise. Read clock type from the least significant bits of
3435 __nwaiters instead of __clock.
3436 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3437 whether clock ID can be encoded in COND_CLOCK_BITS bits.
3438 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3439 clock type just from the last COND_CLOCK_BITS bits of value.
3440 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3441 instead of __clock, just from second bit of condattr's value.
3442
409f7493
UD
34432004-08-30 Jakub Jelinek <jakub@redhat.com>
3444
3445 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3446 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
3447 != 64.
3448 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3449
92c6ccd1
RM
34502004-08-15 Roland McGrath <roland@frob.com>
3451
3452 * pthread_atfork.c: Update copyright terms including special exception
3453 for these trivial files, which are statically linked into executables
3454 that use dynamic linking for the significant library code.
3455
4d004cfb
UD
34562004-08-09 Jakub Jelinek <jakub@redhat.com>
3457
3458 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3459 pthread_rwlock_rdlock.
3460 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3461 Decrease __nr_readers_queued after reacquiring lock.
3462 * sysdeps/pthread/pthread_rwlock_timedrdlock
3463 (pthread_rwlock_timedrdlock): Likewise.
3464 Reported by Bob Cook <bobcook47@hotmail.com>.
3465
90595fb6
RM
34662004-08-11 Jakub Jelinek <jakub@redhat.com>
3467
3468 * tst-rwlock14.c (tf): Read main thread handle from *ARG
3469 before pthread_barrier_wait.
3470
fa46f7ab
UD
34712004-08-07 Ulrich Drepper <drepper@redhat.com>
3472
3473 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3474 Remove unnecessary exception handling data.
3475
15ef4b55
UD
34762004-07-23 Jakub Jelinek <jakub@redhat.com>
3477
3478 [BZ #284]
3479 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3480 instead of clockid_t.
3481
4fb907b7
RM
34822004-07-21 Roland McGrath <roland@redhat.com>
3483
3484 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3485
34862004-07-19 Roland McGrath <roland@redhat.com>
3487
3488 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3489
8f73811b
RM
34902004-07-02 Roland McGrath <roland@redhat.com>
3491
3492 * configure: Don't exit.
3493
290639c3
UD
34942004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3495
3496 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3497 (__pthread_cond_timedwait): Check for invalid nanosecond in
3498 timeout value.
3499
8e5aaad9
UD
35002004-07-07 Ulrich Drepper <drepper@redhat.com>
3501
3502 * Makefile: Add rules to build and run tst-fini1.
3503 * tst-fini1.c: New file.
3504 * tst-fini1mod.c: New file.
3505
ce6e047f
UD
35062004-07-05 Ulrich Drepper <drepper@redhat.com>
3507
3508 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3509 if no cancellation support is needed.
3510 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3511 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3512 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3513 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3514 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3515 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3516 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3517 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3518 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3519
3520 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3521 only if not already defined.
3522
9b9ef823
UD
35232004-07-05 Jakub Jelinek <jakub@redhat.com>
3524
2dd18ce2
UD
3525 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3526 constraint "m" instead of "0" for futex.
3527
9b9ef823
UD
3528 * shlib-versions: Add powerpc64-.*-linux.*.
3529
38205402
UD
35302004-07-04 Jakub Jelinek <jakub@redhat.com>
3531
3532 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3533 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3534 for valid tv_nsec.
3535 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3536 1 billion and 64-bit tv_nsec which is valid when truncated to 32
3537 bits.
3538
78a9c837
RM
35392004-06-29 Roland McGrath <roland@redhat.com>
3540
3541 * Banner: NPTL no longer has its own version number.
3542 * Makefile (nptl-version): Variable removed.
3543 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3544 using $(version), the glibc version number.
3545
d3d35527
UD
35462004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3547
3548 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3549 Fix branch offset for a PLT entry.
3550 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3551 Likewise.
3552 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3553 Likewise.
3554 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3555 Likewise.
3556 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3557 Likewise.
3558
346f18ae
UD
35592004-06-28 Jakub Jelinek <jakub@redhat.com>
3560
3561 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3562 unconditionally.
3563
f3a19754
UD
35642004-06-28 Jakub Jelinek <jakub@redhat.com>
3565
3566 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3567 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3568 instead of tv_sec.
3569 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3570 (pthread_rwlock_timedrdlock): Likewise.
3571
539842a4
UD
35722004-06-22 Jakub Jelinek <jakub@redhat.com>
3573
3574 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3575 Set __r7 to val, not mutex.
3576
46f4c578
UD
35772004-06-27 Ulrich Drepper <drepper@redhat.com>
3578
3579 * Makefile: Add rules to build tst-rwlock14.
3580 * tst-rwlock14.c: New file.
3581
35822004-06-24 Boris Hu <boris.hu@intel.com>
3583
3584 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3585 check.
3586 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3587
9898e99c
AJ
35882004-06-19 Andreas Jaeger <aj@suse.de>
3589
3590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3591 assembler in last patch.
3592
7c3164bc
UD
35932004-06-17 Ulrich Drepper <drepper@redhat.com>
3594
3595 * sysdeps/pthread/pthread_cond_timedwait.c
3596 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3597 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3598 (__pthread_cond_timedwait): Check for invalid nanosecond in
3599 timeout value.
3600 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3601 * tst-cond19.c: New file.
3602 * Makefile: Add rules to build and run tst-cond19.
3603
72e61500
UD
36042004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
3605
3606 * tst-context1.c (GUARD_PATTERN): Defined.
3607 (tst_context_t): Define struct containing ucontext_t & guard words.
3608 (ctx): Declare as an array of tst_context_t.
3609 (fct): Verify uc_link & guard words are still valid.
3610 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
3611
7c370086
UD
36122004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3613
3614 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3615 Add __data.__futex field, reshuffle __data.__clock.
3616 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
3617 (__pthread_cond_signal): Increment __futex at the same time as
3618 __wakeup_seq or __total_seq. Pass address of __futex instead of
3619 address of low 32-bits of __wakeup_seq to futex syscall.
3620 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3621 (__pthread_cond_wait): Likewise. Pass __futex value from before
3622 releasing internal lock to FUTEX_WAIT.
3623 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3624 (__pthread_cond_timedwait): Likewise.
3625 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3626 (FUTEX_CMP_REQUEUE): Define.
3627 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3628 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3629 Pass __futex value from before the unlock and __futex address instead
3630 of address of low 32-bits of __wakeup_seq to futex syscall.
3631 Fallback to FUTEX_WAKE all on any errors.
3632
a9e526e7
RM
36332004-06-08 Jakub Jelinek <jakub@redhat.com>
3634
3635 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
3636 comment typo.
3637 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
3638 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
3639 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
3640 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
3641 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
3642
f1847a84
RM
36432004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
3644
3645 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
3646 Add memory clobber to inline assembly.
3647 (__lll_mutex_trylock): Likewise.
3648 (__lll_mutex_cond_trylock): Likewise.
3649
f7c81e1a
UD
36502004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
3651
3652 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3653 Pass val argument as 6th system call argument in %r7.
3654
75fccede
UD
36552004-05-21 Jakub Jelinek <jakub@redhat.com>
3656
3657 * Makefile (tests): Add tst-cond16.
3658 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
3659 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
3660 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3661 Add __data.__futex field, reshuffle __data.__clock.
3662 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
3663 (__pthread_cond_signal): Increment __futex at the same time as
3664 __wakeup_seq or __total_seq. Pass address of __futex instead of
3665 address of low 32-bits of __wakeup_seq to futex syscall.
3666 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
3667 (__pthread_cond_wait): Likewise. Pass __futex value from before
3668 releasing internal lock to FUTEX_WAIT.
3669 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
3670 (__pthread_cond_timedwait): Likewise.
3671 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
3672 (FUTEX_CMP_REQUEUE): Define.
3673 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3674 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3675 Pass __futex value from before the unlock and __futex address instead
3676 of address of low 32-bits of __wakeup_seq to futex syscall.
3677 Fallback to FUTEX_WAKE all on any errors.
3678 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
3679 Define.
3680 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3681 internally. Return non-zero if error, zero if success.
3682 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3683 Add __data.__futex field, reshuffle __data.__clock.
3684 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
3685 Define.
3686 (lll_futex_requeue): Add val argument, return 1 unconditionally
3687 for the time being.
3688 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3689 Add __data.__futex field, reshuffle __data.__clock.
3690 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3691 Define.
3692 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3693 internally. Return non-zero if error, zero if success.
3694 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3695 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
3696 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
3697 Define.
3698 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3699 internally. Return non-zero if error, zero if success.
3700 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3701 Add __data.__futex field, reshuffle __data.__clock.
3702 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
3703 Define.
3704 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
3705 internally. Return non-zero if error, zero if success.
3706 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3707 Add __data.__futex field, reshuffle __data.__clock.
3708 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3709 Add __data.__futex field, reshuffle __data.__clock.
3710 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
3711 Increment __futex at the same time as __wakeup_seq or __total_seq.
3712 Pass address of __futex instead of address of low 32-bits of
3713 __wakeup_seq to futex syscall.
3714 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3715 Pass __futex value from before releasing internal lock
3716 to FUTEX_WAIT.
3717 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3718 Likewise. Avoid unnecessary shadowing of variables.
3719 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
3720 Set __futex to 2 * __total_seq. Pass __futex value from before the
3721 unlock and __futex address instead of address of low 32-bits of
3722 __wakeup_seq to futex_requeue macro, adjust for new return value
3723 meaning.
3724 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3725 (__pthread_cond_signal): Increment __futex at the same time as
3726 __wakeup_seq or __total_seq. Pass address of __futex instead of
3727 address of low 32-bits of __wakeup_seq to futex syscall.
3728 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3729 (__pthread_cond_wait): Likewise. Pass __futex value from before
3730 releasing internal lock to FUTEX_WAIT.
3731 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3732 (__pthread_cond_timedwait): Likewise.
3733 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3734 (FUTEX_CMP_REQUEUE): Define.
3735 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
3736 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
3737 Pass __futex value from before the unlock and __futex address instead
3738 of address of low 32-bits of __wakeup_seq to futex syscall.
3739 Fallback to FUTEX_WAKE all on any errors.
3740
37412004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3742
3743 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
3744 Add nop to align the end of critical section.
3745 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
3746
fbf86dda
UD
37472004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3748
3749 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3750 Add __broadcast_seq field.
3751 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
3752 all waiters as woken with woken_seq and bump broadcast counter.
3753 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
3754 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
3755 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3756 Comment typo fixes. Avoid returning -ETIMEDOUT.
3757
37582004-06-01 Ulrich Drepper <drepper@redhat.com>
3759
3760 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3761 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
3762 Reported by Kaz Kojima.
3763
ffdd5e50
UD
37642004-05-25 Jakub Jelinek <jakub@redhat.com>
3765
3766 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
3767
3abc82c8
UD
37682004-05-21 Jakub Jelinek <jakub@redhat.com>
3769
3770 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
3771 __broadcast_seq with bc_seq after acquiring internal lock instead of
3772 before it.
3773
893a3511
UD
37742004-05-18 Jakub Jelinek <jakub@redhat.com>
3775
3776 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
3777 compilation.
3778 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3779 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
3780 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3781 (pthread_cond_t): Add __data.__broadcast_seq field.
3782 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3783 (FRAME_SIZE): Define.
3784 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
3785 Comment typo fixes.
3786 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
3787 Define.
3788 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
3789 typo fixes.
3790 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3791 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
3792 fixes.
3793
37942004-05-18 Ulrich Drepper <drepper@redhat.com>
3795
3796 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
3797 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
3798 Add __broadcast_seq field.
3799 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3800 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3801 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3802 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3803 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3804 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
3805 all waiters as woken with woken_seq and bump broadcast counter.
3806 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
3807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
3808 __broadcast_seq field.
3809 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3810 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3811 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3812 * pthread_cond_init.c: Initialize __broadcast_seq field.
3813 * Makefile (tests): Add tst-cond17 and tst-cond18.
3814 Add .NOTPARALLEL goal.
3815 * tst-cond16.c: New file. From Jakub.
3816 * tst-cond17.c: New file. From Jakub.
3817 * tst-cond18.c: New file. From Jakub.
3818
4123718e
UD
38192004-05-16 Ulrich Drepper <drepper@redhat.com>
3820
3821 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
3822 unwind info.
3823
3824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3825 Parametrize frame size. Correct some unwind info.
3826 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3827
2d7ae210
UD
38282004-05-04 Jakub Jelinek <jakub@redhat.com>
3829
3830 * tst-stack3.c: Note testing functionality beyond POSIX.
3831
50c2b6d7
UD
38322004-05-04 Jakub Jelinek <jakub@redhat.com>
3833
3834 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
3835 Change conditional from ifdef to if.
3836
27b02589
UD
38372004-04-23 Jakub Jelinek <jakub@redhat.com>
3838
3839 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
3840 SYSDEP_CANCEL_ERROR): Define.
3841 (PSEUDO): Use it.
3842
4bb8fc33
UD
38432004-05-01 Jakub Jelinek <jakub@redhat.com>
3844
3845 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
3846
f9a06dc1
UD
38472004-04-20 Jakub Jelinek <jakub@redhat.com>
3848
3849 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
3850
d3b52028
UD
38512004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3852
3853 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
3854 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3855 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
3856 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
3857
a5dd0a6c
UD
38582004-04-19 Ulrich Drepper <drepper@redhat.com>
3859
3860 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
3861 thread has all signals blocked.
3862
620c3354
AJ
38632004-04-18 Andreas Jaeger <aj@suse.de>
3864
3865 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
3866 (SEM_VALUE_MAX): Add missing brace.
3867
1683daeb
UD
38682004-04-17 Jakub Jelinek <jakub@redhat.com>
3869
3870 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
3871 in rt subdir.
3872 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
3873 * sysdeps/pthread/tst-mqueue8x.c: New test.
3874 * tst-cancel4.c: Update comment about message queues.
3875
3876 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
3877 return it_value { 0, 0 }.
3878 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
3879 like SIGEV_SIGNAL.
3880 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
3881 assertion for SIGEV_NONE.
3882 (thread_attr_compare): Compare all attributes, not just a partial
3883 subset.
3884
38852004-04-17 Jakub Jelinek <jakub@redhat.com>
3886
3887 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
3888
f532641d
UD
38892004-04-17 Ulrich Drepper <drepper@redhat.com>
3890
3891 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
3892 Just use a plain number.
3893 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
3894 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3895 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3896 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3897 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3898 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3899 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3900
7eb7fdda
UD
39012004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3902
53392906
UD
3903 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
3904 frame info.
3905 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7eb7fdda 3906
d7ba1313
UD
39072004-04-15 Jakub Jelinek <jakub@redhat.com>
3908
3909 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
3910 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
3911 of calling sigwaitinfo.
3912
5adac0e4
UD
39132004-04-16 Ulrich Drepper <drepper@redhat.com>
3914
3915 * allocatestack.c (allocate_stack): Set reported_guardsize
3916 unconditionally.
3917 * pthread_getattr_np.c (pthread_getattr_np): Use
3918 reported_guardsize instead of guardsize.
3919 * descr.h (struct pthread): Add reported_guardsize field.
3920
f93fa7d4
UD
39212004-04-13 Jakub Jelinek <jakub@redhat.com>
3922
3923 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
3924
1b82c6c7
UD
39252004-04-12 Ulrich Drepper <drepper@redhat.com>
3926
3927 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
3928
39292004-04-08 Jakub Jelinek <jakub@redhat.com>
3930
3931 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
3932 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
3933 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
3934 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
3935 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3936 Define.
3937 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
3938 (_POSIX_MESSAGE_PASSING): Define.
3939 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
3940 (_POSIX_MESSAGE_PASSING): Define.
3941 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
3942 (_POSIX_MESSAGE_PASSING): Define.
3943
e6eb894e
UD
39442004-04-04 Ulrich Drepper <drepper@redhat.com>
3945
3946 * tst-context1.c (fct): Check whether correct stack is used.
3947
1e084487
UD
39482004-04-03 Ulrich Drepper <drepper@redhat.com>
3949
4e73e115
UD
3950 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
3951 matching constraints for asm mem parameters.
3952
1e084487
UD
3953 * tst-clock2.c (tf): Don't define unless needed.
3954
feca5e0b
UD
39552004-03-30 H.J. Lu <hongjiu.lu@intel.com>
3956
3957 * Makefile (link-libc-static): Use $(static-gnulib) instead of
3958 $(gnulib).
3959
3fa21fd8
UD
39602004-03-30 Ulrich Drepper <drepper@redhat.com>
3961
3962 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
3963 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
3964 * pthreadP.h: Declare __nptl_deallocate_tsd.
3965 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
3966 Adjust caller.
3967
3968 * Makefile (tests): Add tst-tsd5.
3969 * tst-tsd5.c: New file.
3970
8e32efa6
UD
39712004-03-29 Ulrich Drepper <drepper@redhat.com>
3972
3973 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3974 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
3975 is SHLIB_COMPAT check.
3976 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3977 (__pthread_attr_getaffinity_old): Likewise.
3978 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3979 (__pthread_getaffinity_old): Likewise.
3980 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3981 (__pthread_setaffinity_old): Likewise.
3982
eec8b6ca
UD
39832004-03-26 Ulrich Drepper <drepper@redhat.com>
3984
3985 * allocatestack.c (_make_stacks_executable): Call
3986 _dl_make_stack_executable first.
3987
db2f05ba
RM
39882004-03-24 Roland McGrath <roland@redhat.com>
3989
3990 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
3991 constraint instead of "0".
3992
6abbc501
UD
39932004-03-24 Ulrich Drepper <drepper@redhat.com>
3994
68dc4dcb
UD
3995 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3996 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
3997
6abbc501
UD
3998 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
3999 code to avoid warning.
4000
865e14d9
AJ
40012004-03-24 Andreas Jaeger <aj@suse.de>
4002
4003 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4004 (__pthread_attr_setaffinity_old): Remove const.
4005
16b06b70
UD
40062004-03-23 Ulrich Drepper <drepper@redhat.com>
4007
2c0b891a
UD
4008 * sysdeps/unix/sysv/linux/smp.h: New file.
4009 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4010 * init.c: Define __is_smp.
4011 (__pthread_initialize_minimal_internal): Call is_smp_system to
4012 initialize __is_smp.
4013 * pthreadP.h: Declare __is_smp.
4014 Define MAX_ADAPTIVE_COUNT is necessary.
4015 * pthread_mutex_init.c: Add comment regarding __spins field.
4016 * pthread_mutex_lock.c: Implement adaptive mutex type.
4017 * pthread_mutex_timedlock.c: Likewise.
4018 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4019 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4020 Add __spins field.
4021 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4022 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4023 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4024 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4025 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4026 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4027 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4028 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4029 lll_mutex_cond_trylock.
4030 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4031 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4032 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4033 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4034 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4035 Define BUSY_WAIT_NOP.
4036 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4037 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4038
4039 * tst-mutex5.c: Add support for testing adaptive mutexes.
4040 * tst-mutex7.c: Likewise.
4041 * tst-mutex5a.c: New file.
4042 * tst-mutex7a.c: New file.
4043 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4044
565699e4
UD
4045 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4046 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6abbc501 4047 vgettimeofday call might destroy the content.
565699e4 4048
7fe1586f
UD
4049 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4050 @pause in the loop.
4051
e408880b
UD
4052 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4053 No need to restrict type of ret. Make it int. Add comment.
4054
16b06b70
UD
4055 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4056 Remove unnecessary setne instruction.
4057
61645263
UD
40582004-03-22 Jakub Jelinek <jakub@redhat.com>
4059
4060 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4061 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4062 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4063 If realloc fails, break out of the loop.
4064
e3d4c585
AJ
40652004-03-20 Andreas Jaeger <aj@suse.de>
4066
4067 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4068 (__pthread_setaffinity_old): Fix interface.
4069 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4070 (__pthread_getaffinity_old): Likewise.
4071
4072 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4073 (__pthread_setaffinity_new): Remove duplicate declaration.
4074
3abb1ff7
UD
40752004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4076
4077 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4078 the return value to a safe register.
4079 (CDISABLE): Set the function argument correctly.
4080
07bd2a3f
UD
40812004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4082
4083 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4084 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4085 Rewrite so that only one locked memory operation per round is needed.
4086 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4087 (pthread_barrier_wait): After wakeup, release lock only when the
4088 last thread stopped using the barrier object.
4089 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4090 (__pthread_cond_wait): Don't store mutex address if the current
4091 value is ~0l. Add correct cleanup support and unwind info.
4092 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4093 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4094 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4095 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4096 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4097 Add correct cleanup support and unwind info.
4098 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4099 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4100 information for syscall wrappers.
4101
14c35863
UD
41022004-03-18 Ulrich Drepper <drepper@redhat.com>
4103
4104 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4105 cpusetsize field, remove next.
4106 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4107 parameter for size of the CPU set.
4108 (pthread_setaffinity_np): Likewise.
4109 (pthread_attr_getaffinity_np): Likewise.
4110 (pthread_attr_setaffinity_np): Likewise.
4111 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4112 interface change, keep compatibility code.
4113 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4114 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4115 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4116 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4117 __pthread_getaffinity_np.
4118 * Versions: Add version for changed interfaces.
4119 * tst-attr3.c: Adjust test for interface change.
4120 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4121 increasing buffer sizes.
4122 * pthread_attr_destroy.c: Remove unused list handling.
4123 * pthread_attr_init.c: Likewise.
4124
8e115d80
RM
41252004-03-17 Roland McGrath <roland@redhat.com>
4126
4127 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4128 first argument to clock_getres so we ever enable kernel timers.
4129
e3b22ad3
UD
41302004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4131
4132 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4133
841153fa
RH
41342004-03-12 Richard Henderson <rth@redhat.com>
4135
e3b22ad3
UD
4136 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4137 oldvalue from CENABLE to CDISABLE.
841153fa 4138
932dfea7
UD
41392004-03-12 Ulrich Drepper <drepper@redhat.com>
4140
4141 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4142 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4143 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4144 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4145
9852f6dc
RH
41462004-03-11 Richard Henderson <rth@redhat.com>
4147
4148 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4149 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4150 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4151
43513fb7
UD
41522004-03-11 Jakub Jelinek <jakub@redhat.com>
4153
4154 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4155 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4156 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4157
41582004-03-11 Jakub Jelinek <jakub@redhat.com>
4159
4160 * forward.c (__pthread_cond_broadcast_2_0,
4161 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4162 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4163 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4164
8a3e10e0
UD
41652004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4166
4167 * sysdeps/sh/tcb-offsets.sym: Add PID.
4168 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4169 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4170
6d3a2bec
UD
41712004-03-10 Ulrich Drepper <drepper@redhat.com>
4172
4173 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4174 include <sysdep-cancel.h>, vfork is no cancellation point.
4175 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4176 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4177 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4178
d3a4a571
UD
41792004-03-10 Jakub Jelinek <jakub@redhat.com>
4180
73b4ce64
UD
4181 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4182 libc_hidden_def.
4183 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4184 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4185 Likewise.
4186 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4187 Likewise.
4188 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4189 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4190 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4191 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4192 of DO_CALL_VIA_BREAK. Work around a gas problem.
4193
d682a515
UD
4194 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4195 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4196 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4197 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4198 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4199 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4200
4201 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4202 a local register for saving old PID. Negate PID in parent upon exit.
4203
d3a4a571
UD
4204 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4205 tcb-offsets.h.
4206 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4207 before syscall, set to the old value in the parent afterwards.
4208 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4209 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4210 tcb-offsets.h.
4211 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4212 before syscall, set to the old value in the parent afterwards.
4213 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4214 * sysdeps/s390/tcb-offsets.sym: Add PID.
4215
4216 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4217 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4218 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4219 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4220 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4221 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4222
42232004-03-10 Andreas Schwab <schwab@suse.de>
4224
4225 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4226 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4227 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4228
3f2fb223 42292004-03-09 Jakub Jelinek <jakub@redhat.com>
f4c024d1 4230
3f2fb223
UD
4231 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4232 * tst-cancel21.c (do_one_test): Likewise.
4233 Reported by Gordon Jin <gordon.jin@intel.com>.
f4c024d1 4234
8b9d6054
UD
42352004-02-09 Jakub Jelinek <jakub@redhat.com>
4236
4237 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4238 if non-zero and set to INT_MIN if zero.
4239 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4240 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4241 (SAVE_PID, RESTORE_PID): Define.
4242 (__vfork): Use it.
4243 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4244 Use relative path to avoid including NPTL i386/vfork.S.
4245 (SAVE_PID, RESTORE_PID): Define.
4246 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4247 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4248 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4249 tst-vfork2x.
4250 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4251 * tst-vfork1.c: New test.
4252 * tst-vfork2.c: New test.
4253 * tst-vfork1x.c: New test.
4254 * tst-vfork2x.c: New test.
4255
02287d05
UD
42562004-03-08 Ulrich Drepper <drepper@redhat.com>
4257
c072ef6d 4258 * sysdeps/i386/tcb-offsets.sym: Add PID.
6fadea9f 4259 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
c072ef6d 4260 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6fadea9f 4261 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
02287d05 4262
d4acd24b
UD
42632004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4264
4265 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4266
8acb4b81
UD
42672004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4268
4269 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4270 _rtld_global_ro.
4271
4d1a02ef
UD
42722004-03-07 Ulrich Drepper <drepper@redhat.com>
4273
001836c8 4274 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
8acb4b81 4275 _rtld_global_ro.
001836c8 4276
4d1a02ef
UD
4277 * tst-once4.c: Remove unnecessary macro definition.
4278
4279 * tst-mutex7.c (do_test): Limit thread stack size.
4280 * tst-once2.c (do_test): Likewise.
4281 * tst-tls3.c (do_test): Likewise.
4282 * tst-tls1.c (do_test): Likewise.
4283 * tst-signal3.c (do_test): Likewise.
4284 * tst-kill6.c (do_test): Likewise.
4285 * tst-key4.c (do_test): Likewise.
4286 * tst-join4.c (do_test): Likewise.
4287 * tst-fork1.c (do_test): Likewise.
4288 * tst-context1.c (do_test): Likewise.
4289 * tst-cond2.c (do_test): Likewise.
4290 * tst-cond10.c (do_test): Likewise.
4291 * tst-clock2.c (do_test): Likewise.
4292 * tst-cancel10.c (do_test): Likewise.
4293 * tst-basic2.c (do_test): Likewise.
4294 * tst-barrier4.c (do_test): Likewise.
4295
aa420660
UD
42962004-03-05 Ulrich Drepper <drepper@redhat.com>
4297
4298 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4299
cff08c81
UD
43002004-03-01 Ulrich Drepper <drepper@redhat.com>
4301
4302 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4303 (__pthread_cond_timedwait): Optimize wakeup test.
4304 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4305 (__pthread_cond_wait): Likewise.
4306 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4307 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4308 Likewise.
4309
b7fe377c
UD
43102004-02-29 Ulrich Drepper <drepper@redhat.com>
4311
4312 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4313 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4314 the atomic instruction needed.
4315 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4316 (__lll_mutex_lock_wait): Likewise.
4317
4c771a3b
UD
43182004-02-28 Ulrich Drepper <drepper@redhat.com>
4319
4320 * Makefile (tests): Add tst-cond14 and tst-cond15.
4321 * tst-cond14.c: New file.
4322 * tst-cond15.c: New file.
4323
a2c33d5a
UD
43242004-02-27 Ulrich Drepper <drepper@redhat.com>
4325
4326 * sysdeps/pthread/createthread.c (create_thread): Remove use of
4327 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
4328 needs to be implemented differently to be useful.
4329
261eada2
UD
43302004-02-26 Ulrich Drepper <drepper@redhat.com>
4331
14ffbc83
UD
4332 * pthread_attr_setschedparam.c: Don't test priority against limits
4333 here. Set ATTR_FLAG_SCHED_SET flag.
4334 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4335 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4336 from parent thread to child. If attribute is used and scheduling
4337 parameters are not inherited, copy parameters from attribute or
4338 compute them. Check priority value.
4339 * pthread_getschedparam.c: If the parameters aren't known yet get
4340 them from the kernel.
4341 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4342 ATTR_FLAG_POLICY_SET flag for thread.
4343 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4344 and ATTR_FLAG_POLICY_SET.
4345
4346 * sysdeps/pthread/createthread.c: Use tgkill if possible.
4347
261eada2
UD
4348 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4349 fail if stack address hasn't been set. Just return 0.
4350
701d185c
UD
43512004-02-25 Ulrich Drepper <drepper@redhat.com>
4352
25b8e63c
UD
4353 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
4354 libpthread for the files in this list.
4355 (CFLAGS-tst-unload): Removed.
4356 * tst-unload.c (do_test): Don't use complete path for
4357 LIBPHREAD_SO.
4358
701d185c
UD
4359 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4360 tst-_res1mod2.
4361
a8fd5a02
UD
43622004-02-22 Ulrich Drepper <drepper@redhat.com>
4363
4364 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4365 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4366 operation per round is needed.
4367 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4368 (__lll_mutex_lock_wait): Likewise.
4369
dd0b7b19
UD
43702004-02-20 Ulrich Drepper <drepper@redhat.com>
4371
4372 * tst-cancel9.c (cleanup): Don't print to stderr.
4373
5990e1fe
UD
43742004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4375
4376 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4377
33ab3b66
UD
43782004-02-20 Jakub Jelinek <jakub@redhat.com>
4379
1be3130e
UD
4380 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4381 (__syscall_error_handler2): Call CDISABLE.
4382 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4383 (__syscall_error_handler2): Call CDISABLE.
4384
8ba5025a
UD
4385 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4386 Release lock before the loop, don't reacquire it.
8ba5025a 4387
33ab3b66
UD
4388 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4389
11986c68
UD
43902004-02-19 Andreas Schwab <schwab@suse.de>
4391
4392 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4393 Fix last change.
4394
dc391246
UD
43952004-02-18 Ulrich Drepper <drepper@redhat.com>
4396
37c054c7
UD
4397 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4398 (pthread_barrier_wait): After wakeup, release lock only when the
4399 last thread stopped using the barrier object.
4400 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4401 (pthread_barrier_wait): Likewise.
4402 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4403 Likewise.
4404 * Makefile (tests): Add tst-barrier4.
4405 * tst-barrier4.c: New file.
dc391246
UD
4406
4407 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4408 (__pthread_cond_timedwait): Perform timeout test while holding
4409 internal lock to prevent wakeup race.
4410 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4411 * sysdeps/pthread/pthread_cond_timedwait.c
4412 (__pthread_cond_timedwait): Likewise.
4413 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4414 (__pthread_cond_timedwait): Likewise.
4415
4a08113c
UD
44162004-02-18 Jakub Jelinek <jakub@redhat.com>
4417
4418 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4419 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4420 * Makefile (tests): Add tst-rwlock13.
4421 * tst-rwlock13.c: New test.
4422
71b1675e
UD
44232004-02-16 Ulrich Drepper <drepper@redhat.com>
4424
4425 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4426 (__condvar_tw_cleanup): Little optimization.
4427 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4428
cd9fdc72
UD
44292004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
4430
4431 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4432 libpthread as "lib" parameter to SHLIB_COMPAT.
4433 (__novmx_siglongjmp): Fix typo in function name.
4434 (__novmx_longjmp): Fix typo in function name.
4435
82038750
UD
44362004-02-13 Ulrich Drepper <drepper@redhat.com>
4437
b078c591
UD
4438 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4439 __builtin_expect.
4440
82038750
UD
4441 * sysdeps/generic/pt-longjmp.c: Moved to...
4442 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
4443
e2982bf0
UD
44442004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
4445
4446 * Makefile (libpthread-routines): Add pt-cleanup.
4447 * pt-longjmp.c: Removed.
4448 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4449 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4450 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4451 Version longjmp, siglongjmp for GLIBC_2.3.4.
4452 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4453
3730d95c
UD
44542004-02-13 Ulrich Drepper <drepper@redhat.com>
4455
219304ec
UD
4456 * sysdeps/pthread/pthread_cond_timedwait.c
4457 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
4458 Reuse code. Add __builtin_expects.
4459
3730d95c
UD
4460 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4461 (__pthread_cond_timedwait): Get internal lock in case timeout has
4462 passed before the futex syscall.
4463 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4464
5673ccc1
UD
44652004-01-20 Ulrich Drepper <drepper@redhat.com>
4466
debddf64
UD
4467 * allocatestack.c: Pretty printing.
4468
5673ccc1
UD
4469 * sysdeps/pthread/createthread.c (create_thread): Don't add
4470 CLONE_DETACHED bit if it is not necessary.
4471
6bae8725
UD
44722004-01-16 Ulrich Drepper <drepper@redhat.com>
4473
4474 * pthread_getattr_np.c: Include ldsodefs.h.
4475
ff151400
RH
44762004-01-16 Richard Henderson <rth@redhat.com>
4477
6bae8725
UD
4478 * allocatestack.c: Don't declare __libc_stack_end.
4479 * init.c (__pthread_initialize_minimal_internal): Likewise.
4480 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
ff151400 4481
ba683832
RH
44822004-01-15 Richard Henderson <rth@redhat.com>
4483
4484 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4485 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4486 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4487 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4488 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4489 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4490 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4491 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4492
630d93a7
UD
44932004-01-14 Ulrich Drepper <drepper@redhat.com>
4494
219304ec 4495 * init.c (pthread_functions): Make array const.
630d93a7 4496
d1fc817e
UD
44972004-01-13 Ulrich Drepper <drepper@redhat.com>
4498
4499 * allocatestack.c (__make_stacks_executable): Change interface.
4500 Check parameters. Pass parameter on to libc counterpart.
4501 * pthreadP.h: Change declaration.
4502
dc927809
RH
45032004-01-13 Richard Henderson <rth@redhat.com>
4504
10677727
UD
4505 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4506 prototype form.
4507 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4508 Likewise.
4509
d1fc817e
UD
4510 * sysdeps/alpha/Makefile: New file.
4511 * sysdeps/alpha/tcb-offsets.sym: New file.
4512 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4513 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
dc927809 4514
d1fc817e
UD
4515 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4516 on powerpc version.
dc927809 4517
249a3d0c
UD
45182004-01-08 Jakub Jelinek <jakub@redhat.com>
4519
4520 * Makefile (tests): Add tst-backtrace1.
4521 * tst-backtrace1.c: New test.
4522
763c0490
RM
45232003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
4524
4525 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4526 register as second parameter to the REGISTER macro.
4527 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4528 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4529 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4530 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4531 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4532 of thread register as second parameter to REGISTER macro in 64 case.
4533
c7baafd5
UD
45342004-01-03 Ulrich Drepper <drepper@redhat.com>
4535
4536 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4537 (CFLAGS-getpid.o): Defined.
4538 (CFLAGS-getpid.os): Defined.
4539
25ac0258
UD
45402003-12-31 Ulrich Drepper <drepper@redhat.com>
4541
4542 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4543 returned for main thread does not overlap with any other VMA.
4544 Patch by Jakub Jelinek.
4545
795985e4
UD
45462003-12-29 Jakub Jelinek <jakub@redhat.com>
4547
4548 * tst-raise1.c: Include stdio.h.
4549
cb5b9388
UD
45502003-12-23 Jakub Jelinek <jakub@redhat.com>
4551
4552 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4553 setting with __ASSUME_TGKILL || defined __NR_tgkill.
4554 If pid is 0, set it to selftid.
4555 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4556 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
4557 != 0, return self->tid without doing a syscall.
4558 * descr.h (struct pthread): Move pid field after tid.
4559
4560 * Makefile (tests): Add tst-raise1.
4561 * tst-raise1.c: New file.
4562
432aaf5b
RM
45632003-12-23 Roland McGrath <roland@redhat.com>
4564
4565 * tst-oddstacklimit.c: New file.
4566 * Makefile (tests): Add it.
4567 (tst-oddstacklimit-ENV): New variable.
4568
4569 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4570 value up to page size for __default_stacksize.
4571
33ebea17
UD
45722003-12-21 Ulrich Drepper <drepper@redhat.com>
4573
4574 * Makefile (tests): Add tst-eintr5.
4575 * tst-eintr5.c: New file.
4576
4577 * eintr.c (eintr_source): Prevent sending signal to self.
4578
4579 * tst-eintr2.c (tf1): Improve error message.
4580
bbe35eb5
UD
45812003-12-20 Ulrich Drepper <drepper@redhat.com>
4582
4583 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4584 * sysdeps/unix/sysv/linux/getpid.c: New file.
c0ecb80a
UD
4585 * pthread_cancel.c: Add comment explaining use of PID field.
4586 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4587 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4588 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4589 temporarily to signal the field must not be relied on and updated
4590 by getpid().
4591 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4592 temporarily negative.
4593 * sysdeps/unix/sysv/linux/raise.c: Likewise.
bbe35eb5 4594
4efdd8d3
UD
45952003-12-19 Ulrich Drepper <drepper@redhat.com>
4596
4597 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
4598 (eintr_source): If ARG != NULL, use pthread_kill.
4599 * tst-eintr1.c: Adjust for this change.
4600 * tst-eintr2.c: Likewise.
4601 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
4602 * tst-eintr3.c: New file.
4603 * tst-eintr4.c: New file.
4604
46052003-12-19 Jakub Jelinek <jakub@redhat.com>
4606
4607 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
4608 if CANCELSTATE_BITMASK is set.
4609 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
4610 Likewise.
4611
4612 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
4613 (tests-reverse): Add tst-cancel23.
4614 * tst-cancel22.c: New test.
4615 * tst-cancel23.c: New test.
4616
675620f7
UD
46172003-12-18 Ulrich Drepper <drepper@redhat.com>
4618
4619 * tst-eintr1.c: Better error messages.
4620
4621 * Makefile (tests): Add tst-eintr2.
4622 * tst-eintr2.c: New file.
4623
46242003-12-18 Jakub Jelinek <jakub@redhat.com>
4625
4626 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
4627 (CFLAGS-tst-cancelx21.c): Set.
4628 * tst-cancel21.c: New test.
4629 * tst-cancelx21.c: New test.
4630
4631 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
4632 comparison operand.
4633 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
4634 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
4635 * pt-longjmp.c: Include jmpbuf-unwind.h.
4636 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
4637 _JMPBUF_UNWINDS. Adjust compared pointers.
4638 * init.c (__pthread_initialize_minimal_internal): Initialize
4639 pd->stackblock_size.
4640 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
4641 * sysdeps/alpha/jmpbuf-unwind.h: New file.
4642 * sysdeps/i386/jmpbuf-unwind.h: New file.
4643 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
4644 * sysdeps/s390/jmpbuf-unwind.h: New file.
4645 * sysdeps/sh/jmpbuf-unwind.h: New file.
4646 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
4647 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
2e5e031d 4648 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
675620f7
UD
4649 (_JMPBUF_CFA_UNWINDS): Remove.
4650 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
4651
46522003-12-12 Jakub Jelinek <jakub@redhat.com>
4653
4654 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
4655 (CFLAGS-tst-cancelx20.c): Set.
4656 * tst-cancel20.c: New test.
4657 * tst-cancelx20.c: New test.
4658
2d951ab6
UD
46592003-12-17 Ulrich Drepper <drepper@redhat.com>
4660
4661 * init.c (__pthread_initialize_minimal_internal): Don't treat
4662 architectures with separate register stack special here when
4663 computing default stack size.
4664
f8a3a2e7
RM
46652003-12-17 Roland McGrath <roland@redhat.com>
4666
4667 * Makefile (tst-cancelx7-ARGS): New variable.
4668 Reportd by Greg Schafer <gschafer@zip.com.au>.
4669
e796f92f
UD
46702003-12-17 Jakub Jelinek <jakub@redhat.com>
4671
4672 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
4673 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
4674 (tst-stack3-ENV): Set.
4675 ($(objpfx)tst-stack3-mem): New.
4676 * tst-stack3.c: New test.
4677
092eb73c
UD
46782003-12-10 David Mosberger <davidm@hpl.hp.com>
4679
4680 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
4681 Add unwind directives. Drop unused .regstk directive.
4682 (_fini_EPILOG_BEGINS): Add unwind directives.
4683
ff48874d
UD
46842003-12-11 Ulrich Drepper <drepper@redhat.com>
4685
4686 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4687 Assume parameter is a pointer.
4688 (lll_futex_wake): Likewise.
20945457
UD
4689 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
4690 Likewise.
4691 (lll_futex_wake): Likewise.
ff48874d
UD
4692 Reported by Boris Hu.
4693 * sysdeps/unix/sysv/linux/unregister-atfork.c
4694 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
4695
4696 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
4697
1d9d0b80
UD
46982003-12-10 Ulrich Drepper <drepper@redhat.com>
4699
4700 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
4701 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
4702 __rtld_lock_initialize for ld.so lock.
4703 Patch in part by Adam Li <adam.li@intel.com>.
4704
c776b3d7
UD
47052003-12-02 David Mosberger <davidm@hpl.hp.com>
4706
4707 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
4708 in $(gnulib). Also, remove stale comment.
4709
47102003-11-12 David Mosberger <davidm@hpl.hp.com>
4711
4712 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
4713 advantage of new syscall stub and optimize accordingly.
4714
4715 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
4716 from SYS_futex, to match expectations of
4717 sysdep.h:DO_INLINE_SYSCALL.
4718 (lll_futex_clobbers): Remove.
4719 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
4720 (lll_futex_wake): Likewise.
4721 (lll_futex_requeue): Likewise.
4722 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
4723 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
4724 Jelinek).
4725 (__lll_mutex_lock): Likewise.
4726 (__lll_mutex_cond_lock): Likewise.
4727 (__lll_mutex_timed_lock): Likewise.
4728 (__lll_mutex_unlock): Likewise.
4729 (__lll_mutex_unlock_force): Likewise.
4730
4731 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
4732 comes before the include of <sysdep.h>.
4733 (THREAD_SELF_SYSINFO): New macro.
4734 (THREAD_SYSINFO): Likewise.
4735 (INIT_SYSINFO): New macro.
4736 (TLS_INIT_TP): Call INIT_SYSINFO.
4737
4738 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
4739
4740 * sysdeps/pthread/createthread.c (create_thread): Use
4741 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
4742 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
4743 THREAD_SELF_SYSINFO instead of open code.
4744 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
4745 (THREAD_SYSINFO): Likewise.
4746
4747 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
4748
4749 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
4750
57d20ee7
UD
47512003-12-06 Ulrich Drepper <drepper@redhat.com>
4752
4753 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
4754 instead of .init. Patch by David Mosberger.
4755
67aeab2a
AJ
47562003-11-30 Thorsten Kukuk <kukuk@suse.de>
4757
4758 * sysdeps/pthread/configure.in: Remove broken declaration in C
4759 cleanup handling check.
4760
8ca203e6
AJ
47612003-11-30 Andreas Jaeger <aj@suse.de>
4762
4763 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
4764 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
4765 Likewise.
4766
46bf9de7
UD
47672003-11-27 Jakub Jelinek <jakub@redhat.com>
4768
4769 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
4770 * pthread_attr_destroy.c: Include shlib-compat.h.
4771 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
4772 is set in iattr->flags.
4773 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
4774
1d9b73ab
UD
47752003-11-21 Jakub Jelinek <jakub@redhat.com>
4776
4777 * Makefile (distribute): Add tst-cleanup4aux.c.
4778
4779 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
4780 include.
4781
53f9084e
UD
47822003-11-21 Ulrich Drepper <drepper@redhat.com>
4783
1d9b73ab
UD
4784 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
4785 pthread_cond_signal.
4786
e42a990e
UD
4787 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
4788 store mutex address if the current value is ~0l.
4789 * sysdeps/pthread/pthread_cond_timedwait.c
4790 (__pthread_cond_timedwait): Likewise.
4791 * sysdeps/pthread/pthread_cond_broadcast.c
4792 (__pthread_cond_broadcast): Don't use requeue for pshared
4793 condvars.
4794
4795 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4796 (__pthread_cond_wait): Don't store mutex address if the current
4797 value is ~0l.
4798 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4799 (__pthread_cond_timedwait): Likewise.
4800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4801 (__pthread_cond_broadcast): Don't use requeue for pshared
4802 condvars.
4803
4804 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
4805 element with ~0l for pshared condvars, with NULL otherwise.
4806
4807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4808 (__pthread_cond_wait): Don't store mutex address if the current
4809 value is ~0l.
4810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4811 (__pthread_cond_timedwait): Likewise.
4812 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
4813 (__pthread_cond_broadcast): Don't use requeue for pshared
4814 condvars.
4815
bf68b236 4816 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
53f9084e 4817 * tst-cond12.c: New file.
bf68b236 4818 * tst-cond13.c: New file.
53f9084e 4819
9780c971
UD
48202003-11-17 Ulrich Drepper <drepper@redhat.com>
4821
4822 * sysdeps/pthread/configure.in: Make missing forced unwind support
4823 fatal.
4824
74e12fbc
UD
48252003-11-11 Ulrich Drepper <drepper@redhat.com>
4826
4827 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
4828
c685b2b0
UD
48292003-11-06 Ulrich Drepper <drepper@redhat.com>
4830
4831 * Makefile: Add magic to clean up correctly.
4832
44e94149
UD
48332003-11-05 Jakub Jelinek <jakub@redhat.com>
4834
4835 * unwind.c (FRAME_LEFT): Define.
4836 (unwind_stop): Handle old style cleanups here.
4837 (__pthread_unwind): Handle old style cleanups only if
4838 !HAVE_FORCED_UNWIND.
4839 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
4840 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
4841 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
4842 ($(objpfx)tst-cleanupx4): Likewise.
4843 * tst-cleanup4.c: New test.
4844 * tst-cleanup4aux.c: New.
4845 * tst-cleanupx4.c: New test.
4846
c28422b5
UD
48472003-11-04 Ulrich Drepper <drepper@redhat.com>
4848
4849 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
4850 lll_mutex_*lock macros to skip atomic operations on some archs.
4851
27176677
UD
48522003-11-03 Ulrich Drepper <drepper@redhat.com>
4853
4854 * sysdeps/pthread/tst-timer.c (main): Initialize
4855 sigev2.sigev_value as well.
4856
026395a2
RM
48572003-10-15 Roland McGrath <roland@redhat.com>
4858
4859 * sysdeps/pthread/configure.in: Barf if visibility attribute support
4860 is missing.
4861 * sysdeps/pthread/configure: Regenerated.
4862
fa3cbe3d
UD
48632003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4864
4865 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
4866 locking macros. No distinction between normal and mutex locking
4867 anymore.
4868 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
4869 Merge bits from lowlevelmutex.S we still need.
4870 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
4871 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
4872 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
4873 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
4874 new mutex implementation.
4875 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
4876 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
4877 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4878 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4879 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
4880 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4881 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4882 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4883 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4884 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
4885 symbol for entry point to avoid cancellation.
4886
e700a908
UD
48872003-10-07 Jakub Jelinek <jakub@redhat.com>
4888
4889 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
4890 changes.
4891 (SAVE_OLDTYPE_0): Fix a typo.
4892
c70a86b6
UD
48932003-10-03 Ulrich Drepper <drepper@redhat.com>
4894
4895 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
4896 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
4897
134abcb5
UD
48982003-10-02 Ulrich Drepper <drepper@redhat.com>
4899
4900 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
4901 correct offset.
4902
b77ca0e8
UD
49032003-10-02 Jakub Jelinek <jakub@redhat.com>
4904
4905 * Makefile (tests): Add tst-cancel19.
4906 * tst-cancel19.c: New test.
4907
4d961dc7
UD
49082003-10-02 Ulrich Drepper <drepper@redhat.com>
4909
4910 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
4911 restoring of the old cancellation type.
4912
1d5b20ad 49132003-09-30 Jakub Jelinek <jakub@redhat.com>
94ae6d75 4914
1d5b20ad
UD
4915 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
4916
4106a403
RM
49172003-09-27 Wolfram Gloger <wg@malloc.de>
4918
4d961dc7 4919 * sysdeps/pthread/malloc-machine.h: New file
94ae6d75 4920
fca9d8e4
RM
49212003-09-24 Roland McGrath <roland@redhat.com>
4922
4923 * allocatestack.c (__make_stacks_executable): Don't ignore return
4924 value from _dl_make_stack_executable.
4925
c9c60884
UD
49262003-09-24 Ulrich Drepper <drepper@redhat.com>
4927
69c9fa04
UD
4928 * allocatestack.c (__make_stacks_executable): Also change
4929 permission of the currently unused stacks.
4930
279f1143
UD
4931 * allocatestack.c (change_stack_perm): Split out from
4932 __make_stacks_executable.
4933 (allocate_stack): If the required permission changed between the time
4934 we started preparing the stack and queueing it, change the permission.
4935 (__make_stacks_executable): Call change_stack_perm.
4936
c9c60884
UD
4937 * Makefile: Build tst-execstack-mod locally.
4938 * tst-execstack-mod.c: New file.
4939
54ee14b3
UD
49402003-09-23 Jakub Jelinek <jakub@redhat.com>
4941
4942 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
4943
49442003-09-23 Roland McGrath <roland@redhat.com>
4945
4946 * tst-execstack.c: New file.
4947 * Makefile (tests): Add it.
4948 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
4949 (LDFLAGS-tst-execstack): New variable.
4950
4951 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
4952 whether to use PROT_EXEC for stack mmap.
4953 (__make_stacks_executable): New function.
4954 * pthreadP.h: Declare it.
4955 * init.c (__pthread_initialize_minimal_internal): Set
4956 GL(dl_make_stack_executable_hook) to that.
4957
365b1602
UD
49582003-09-22 Ulrich Drepper <drepper@redhat.com>
4959
4960 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
4961 recommendation from AMD re avoidance of lock prefix.
4962
39358e8b
UD
49632003-09-22 Jakub Jelinek <jakub@redhat.com>
4964
4965 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
4966 lll_futex_timed_wait instead of lll_futex_wait.
4967 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
4968 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
4969 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
4970 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
4971 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
4972 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
4973 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
4974 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
4975 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
4976 Completely revamp the locking macros. No distinction between
4977 normal and mutex locking anymore.
4978 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4979 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
4980 __lll_lock_timedwait): Fix prototypes.
4981 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
4982 __lll_lock_timedwait): Likewise.
4983 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
4984 macros, add __builtin_expect.
4985 (lll_mutex_timedlock): Likewise. Fix return value.
4986 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
4987 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
4988 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
4989 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
4990 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
4991 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
4992 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
4993 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
4994
9d08fbbb
UD
49952003-09-22 Ulrich Drepper <drepper@redhat.com>
4996
c0df57e1
UD
4997 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4998 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
4999 operation if possible.
5000
9d08fbbb
UD
5001 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5002 like jumping over the lock prefix.
5003
71451de2
UD
50042003-09-21 Ulrich Drepper <drepper@redhat.com>
5005
5006 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5007 locking macros. No distinction between normal and mutex locking
5008 anymore.
3a226d33 5009 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
5010 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5011 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
5012 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5013 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 5014 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 5015 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 5016 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 5017 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
5018 * Makefile (routines): Remove libc-lowlevelmutex.
5019 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
5020 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5021 for new mutex implementation.
5022 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5023 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5024 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5025 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5026 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5027 Likewise.
5028 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5029 Likewise.
5030 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5031 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5032 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5033 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5034 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5035 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5036 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5037 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5038 Likewise.
5039 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5040 Likewise.
5041 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5042 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5044 Don't use requeue.
5045 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 5046 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 5047
8f31c0ef
UD
50482003-09-20 Ulrich Drepper <drepper@redhat.com>
5049
56a4aa98
UD
5050 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5051 in parameters of asm with output parameters.
5052
8f31c0ef
UD
5053 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5054 type of DECR parameter to int.
5055 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5056
8b8074da
UD
50572003-09-18 Jakub Jelinek <jakub@redhat.com>
5058
5059 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5060 guardsize for each thread.
5061
65af7e61
UD
50622003-09-17 Jakub Jelinek <jakub@redhat.com>
5063
9ba96eda
UD
5064 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5065 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5066 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5067
06f6ca90
UD
5068 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5069 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5070 NULL.
5071 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5072 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5073 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5074 (pthread_getaffinity_np): Add hidden_def.
5075
5076 * Makefile (tests): Add tst-attr3.
5077 * tst-attr3.c: New test.
5078
65af7e61
UD
5079 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5080
3402852c
UD
50812003-09-15 Jakub Jelinek <jakub@redhat.com>
5082
5083 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5084 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5085
a4db3439
UD
50862003-09-17 Jakub Jelinek <jakub@redhat.com>
5087
5088 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5089 * tst-align.c: Include tst-stack-align.h.
5090 (tf, do_test): Use TEST_STACK_ALIGN macro.
5091
50922003-09-17 Ulrich Drepper <drepper@redhat.com>
5093
5094 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5095 variable.
5096
92ce4676
UD
50972003-09-16 Ulrich Drepper <drepper@redhat.com>
5098
5099 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5100 stack-related values for the initial thread.
5101
e07bb02a
UD
51022003-09-15 Jakub Jelinek <jakub@redhat.com>
5103
5104 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5105
d087b5dc
UD
51062003-09-11 Ulrich Drepper <drepper@redhat.com>
5107
5108 * pthread_mutex_lock.c: Minor code rearrangements.
5109
7f08f55a
RM
51102003-09-05 Roland McGrath <roland@redhat.com>
5111
5112 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5113 Instead, include ../nptl_db/db_info.c to do its magic.
5114 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5115 (__pthread_pthread_key_2ndlevel_size): Likewise.
5116 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5117 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5118 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5119 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5120 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5121 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5122 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5123 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5124 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5125 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5126 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5127 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5128 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5129 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5130 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5131 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5132 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5133
806e4a4a
UD
51342003-09-08 Ulrich Drepper <drepper@redhat.com>
5135
5136 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5137 of pthread_t to be compatible with LT.
5138 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5139 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5140 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5141 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5142 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5143 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5144 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5145
17f83e56
UD
51462003-09-04 Ulrich Drepper <drepper@redhat.com>
5147
5148 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5149
58e8ec84
UD
51502003-09-04 Jakub Jelinek <jakub@redhat.com>
5151
5152 * unwind-forcedunwind.c: Move to...
5153 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5154 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5155 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5156 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5157 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5158 * unwind.c: Include jmpbuf-unwind.h.
5159 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5160
abf1cf21
JJ
51612003-09-02 Jakub Jelinek <jakub@redhat.com>
5162
4a244f0d
UD
5163 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5164 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5165 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5166 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5167 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5168 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5169 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5170 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5171 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5172 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5173 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5174 function.
5175 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5176 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5177 * Makefile (tests): Add tst-stack2.
5178 * tst-stack2.c: New test.
5179 * tst-stack1.c: Include limits.h and sys/param.h.
5180 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5181
e29ef647
UD
5182 * pthread_condattr_setpshared.c: Include errno.h.
5183 (pthread_condattr_setpshared): Return EINVAL if pshared
5184 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5185
5777d565
UD
5186 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5187 defined symbol for entry point to avoid cancellation.
5188 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5189 Likewise.
5190 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5191 Likewise.
5192 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5193 Likewise.
5194 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5195 Likewise.
5196 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5197 Likewise.
5198 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5199 __close_nocancel, __read_nocancel, __write_nocancel,
5200 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5201 libpthread.so or librt.so, define to corresponding function
5202 without _nocancel suffix.
5203 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5204 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5205 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5206
abf1cf21
JJ
5207 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5208
8348dcc8
UD
52092003-09-02 Ulrich Drepper <drepper@redhat.com>
5210
5211 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 5212 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
5213
5214 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5215 in subsections has a symbol associated with it.
5216
5217 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5218 defined symbol for entry point to avoid cancellation.
5219 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5220
c874a32e
UD
52212003-09-01 Jakub Jelinek <jakub@redhat.com>
5222
5223 * Makefile (tests): Add tst-tls5.
5224 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5225 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5226 ($(objpfx)tst-tls5): New.
5227 ($(objpfx)tst-tls6.out): Likewise.
5228 (tests): Depend on $(objpfx)tst-tls6.out.
5229 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5230 (do_test): Check pthread_self () return value alignment.
5231 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5232 (tf): Check pthread_self () return value alignment.
5233 * tst-tls5.c: New test.
5234 * tst-tls5.h: New.
5235 * tst-tls5mod.c: New.
5236 * tst-tls5moda.c: New.
5237 * tst-tls5modb.c: New.
5238 * tst-tls5modc.c: New.
5239 * tst-tls5modd.c: New.
5240 * tst-tls5mode.c: New.
5241 * tst-tls5modf.c: New.
5242 * tst-tls6.sh: New test.
5243
c503d3dc
UD
5244 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5245 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5246 * init.c (pthread_functions): Initialize them.
5247 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5248 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5249 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5250 pthread_cond_timedwait@@GLIBC_2.3.2.
5251
48614753
JJ
52522003-09-01 Jakub Jelinek <jakub@redhat.com>
5253
56a1b877
JJ
5254 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5255 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5256 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5257 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5258 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5259 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5260
5261 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5262
48614753
JJ
5263 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5264 _POSIX_THREAD_PRIORITY_SCHEDULING.
5265 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5266
28c97261
UD
52672003-08-31 Ulrich Drepper <drepper@redhat.com>
5268
eef80cf8
UD
5269 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5270 nested function, use static inline function from libio.h.
5271 Code by Richard Henderson.
5272
28c97261
UD
5273 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5274 weak.
5275
cd2fbe58
UD
52762003-08-30 Jakub Jelinek <jakub@redhat.com>
5277
5278 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5279 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5280 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5281 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5282 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5283 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5284 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5285 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5286 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5287 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5288 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5289 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5290 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5291 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5292 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5293 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5294 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5295 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5296 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5297 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5298 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5299 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5300 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5301 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5302 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5303 * sysdeps/sparc/tls.h: New file.
5304 * sysdeps/sparc/tcb-offsets.sym: New file.
5305 * sysdeps/sparc/Makefile: New file.
5306 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5307 * init.c [__sparc__] (__NR_set_tid_address): Define.
5308
feda52c0
UD
53092003-08-29 Jakub Jelinek <jakub@redhat.com>
5310
5311 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5312 _IO_release_lock): Define.
5313
7c868816
JJ
53142003-08-29 Jakub Jelinek <jakuB@redhat.com>
5315
0261d33f 5316 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
5317 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5318
68b9e1ae
UD
53192003-08-27 Ulrich Drepper <drepper@redhat.com>
5320
5321 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5322 (__pthread_cleanup_class): Add missing return types of member
5323 functions.
5324
13b3edfc
UD
53252003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
5326
5327 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5328 (lll_mutex_unlock_force): Add memory barrier between store and futex
5329 syscall.
5330
bb606fbe
UD
53312003-08-25 Ulrich Drepper <drepper@redhat.com>
5332
5333 * tst-cancel4.c (do_test): Also unlink tempfname and remove
5334 tempmsg in first loop.
5335
ee4e5a3d
UD
53362003-08-18 Ulrich Drepper <drepper@redhat.com>
5337
5338 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5339 _POSIX_THREAD_PRIORITY_SCHEDULING.
5340 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5341
334fcf2a
UD
53422003-08-07 Jakub Jelinek <jakub@redhat.com>
5343
5344 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5345 (__rtld_lock_default_lock_recursive,
5346 __rtld_lock_default_unlock_recursive): Define.
5347 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5348 __rtld_lock_unlock_recursive): Define using
5349 GL(_dl_rtld_*lock_recursive).
5350 * init.c (__pthread_initialize_minimal_internal): Initialize
5351 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5352 Lock GL(_dl_load_lock) the same number of times as
5353 GL(_dl_load_lock) using non-mt implementation was nested.
5354
5355 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5356 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5357
a30fb2df
UD
53582003-08-06 Jakub Jelinek <jakub@redhat.com>
5359
5360 * tst-cancel17.c (do_test): Make len2 maximum of page size and
5361 PIPE_BUF.
5362
ce0d30a0
JJ
53632003-08-07 Jakub Jelinek <jakub@redhat.com>
5364
5365 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5366
9c988b83
UD
53672003-08-03 Jakub Jelinek <jakub@redhat.com>
5368
5369 * sysdeps/pthread/createthread.c (do_clone): Move error handling
5370 to first syscall error check. Move syscall error check for tkill
5371 into __ASSUME_CLONE_STOPPED #ifdef.
5372
5c5252bd
UD
53732003-08-02 Ulrich Drepper <drepper@redhat.com>
5374
f1205aa7
UD
5375 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5376 is not defined, do explicit synchronization.
5377 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
5378 is not defined also unlock pd->lock for non-debugging case in case
5379 it is necessary.
5380 * pthread_create.c (start_thread): Always get and release pd->lock
5381 if __ASSUME_CLONE_STOPPED is not defined.
5382 (start_thread_debug): Removed. Adjust users.
5383 * allocatestack.c (allocate_stack): Always initialize lock if
5384 __ASSUME_CLONE_STOPPED is not defined.
5385 * Makefile (tests): Add tst-sched1.
5386 * tst-sched1.c: New file.
5387
5c5252bd
UD
5388 * sysdeps/pthread/createthread.c (do_clone): Only use
5389 sched_setschduler and pass correct parameters.
5390
973d66e4
UD
53912003-07-31 Jakub Jelinek <jakub@redhat.com>
5392
5393 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5394 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5395 PTHREAD_STACK_MIN in comments.
5396
d347a4ab
UD
53972003-07-31 Jakub Jelinek <jakub@redhat.com>
5398
5399 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5400 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5401 argument.
5402 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5403 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5404 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5405 (__pthread_cleanup_upto): Fix prototype.
5406 (_longjmp_unwind): Adjust caller.
5407 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5408 Change second argument to const struct pointer.
5409 * tst-sem8.c (main): Remove unused s2 and s3 variables.
5410 * tst-sem9.c (main): Likewise.
5411 * unwind.c: Include string.h for strlen prototype.
5412
1b26e9a5
UD
54132003-07-31 Ulrich Drepper <drepper@redhat.com>
5414
5415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5416 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5417 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5418 Define HAVE_CMOV.
5419 Patch by Nicholas Miell <nmiell@attbi.com>.
5420
adc12574
UD
54212003-07-30 Jakub Jelinek <jakub@redhat.com>
5422
5423 * init.c (__pthread_initialize_minimal_internal): Initialize
5424 GL(dl_init_static_tls).
5425 * pthreadP.h (__pthread_init_static_tls): New prototype.
5426 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5427 New functions.
5428 * Makefile (tests): Add tst-tls4.
5429 (modules-names): Add tst-tls4moda and tst-tls4modb.
5430 ($(objpfx)tst-tls4): Link against libdl and libpthread.
5431 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5432 tst-tls4modb.so.
5433 * tst-tls4.c: New file.
5434 * tst-tls4moda.c: New file.
5435 * tst-tls4modb.c: New file.
5436
a7f6c66e
RM
54372003-06-19 Daniel Jacobowitz <drow@mvista.com>
5438
5439 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5440 before __timer_dealloc.
5441 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5442 Don't call list_unlink.
5443
172ce013
RM
54442003-07-29 Roland McGrath <roland@redhat.com>
5445
5446 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5447
7b787f85
UD
54482003-07-25 Jakub Jelinek <jakub@redhat.com>
5449
5450 * tst-cancel17.c (do_test): Check if aio_cancel failed.
5451 Don't reuse struct aiocb A if it failed.
5452 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5453 not just one byte, as that does not block.
5454
0e9d6240
UD
54552003-07-22 Jakub Jelinek <jakub@redhat.com>
5456
9d79e037
UD
5457 * sysdeps/pthread/unwind-resume.c: New file.
5458 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5459 unwind-resume in csu subdir.
5460 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5461 exceptions.
5462 (librt-sysdep_routines, librt-shared-only-routines): Add
5463 rt-unwind-resume.
5464 * sysdeps/pthread/rt-unwind-resume.c: New file.
5465 * unwind-forcedunwind.c: New file.
5466 * Makefile (libpthread-routines): Add unwind-forcedunwind.
5467 (libpthread-shared-only-routines): Likewise.
5468 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5469 * pthreadP.h (pthread_cancel_init): New prototype.
5470 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5471
5472 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5473 attr argument const struct pthread_attr *.
5474
0e9d6240
UD
5475 * res.c (__res_state): Return __resp.
5476 * descr.h: Include resolv.h.
5477 (struct pthread): Add res field.
5478 * pthread_create.c: Include resolv.h.
5479 (start_thread): Initialize __resp.
5480 * Makefile (tests): Add tst-_res1.
5481 (module-names): Add tst-_res1mod1, tst-_res1mod2.
5482 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5483 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5484 libpthread.
5485 * tst-_res1.c: New file.
5486 * tst-_res1mod1.c: New file.
5487 * tst-_res1mod2.c: New file.
5488
1a379ea0
UD
54892003-07-21 Ulrich Drepper <drepper@redhat.com>
5490
7e939b21
UD
5491 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5492
1a379ea0
UD
5493 * Makefile: Define various *-no-z-defs variables for test DSOs
5494 which has undefined symbols.
5495
ca86a763
UD
54962003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
5497
5498 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5499 Retry if the stwcx fails to store once_control.
5500
80f536db
UD
55012003-07-20 Ulrich Drepper <drepper@redhat.com>
5502
5503 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5504 pthread_attr_setaffinity.
5505 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5506 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5507 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5508 * pthread_attr_destroy.c: Free cpuset element if allocated.
5509 * pthread_create.c: Pass iattr as additional parameter to
5510 create_thread.
5511 * sysdeps/pthread/createthread.c: If attribute is provided and
5512 a new thread is created with affinity set or scheduling parameters,
5513 start thread with CLONE_STOPPED.
5514 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5515 pthread_attr_setaffinity.
5516 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5517 cpuset element.
5518
73299943
UD
55192003-07-15 Ulrich Drepper <drepper@redhat.com>
5520
5521 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5522
da35d15e
UD
55232003-07-14 Ulrich Drepper <drepper@redhat.com>
5524
5525 * sysdeps/pthread/configure.in: Require CFI directives also for
5526 ppc and s390.
5527
75540d8a
UD
55282003-07-15 Jakub Jelinek <jakub@redhat.com>
5529
5530 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5531 Add cfi directives.
5532
4a17085f
UD
55332003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5534
5535 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5536 CLEANUP_JMP_BUF.
5537 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5538 registers as variables. Call __pthread_mutex_unlock_usercnt.
5539 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5540 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5541 not self pointer in __writer. Compare with TID to determine
5542 deadlocks.
5543 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5544 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5545 Likewise.
5546 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5547 Likewise.
5548 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5549 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5550 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5551 macros also when compiling librt.
5552
6080ecdf
UD
55532003-07-11 Jakub Jelinek <jakub@redhat.com>
5554
5555 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5556 -fasynchronous-unwind-tables.
5557 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5558 (PSEUDO): Add cfi directives.
5559 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5560 Likewise.
5561 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5562 Likewise.
5563
da0c02ee
UD
55642003-07-08 Jakub Jelinek <jakub@redhat.com>
5565
5566 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5567 __pthread_unregister_cancel): Add prototypes and hidden_proto.
5568 * unwind.c (__pthread_unwind_next): Add hidden_def.
5569 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5570 Likewise.
5571 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5572 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5573 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5574 Likewise.
5575 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5576 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5577 Likewise.
5578 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5579 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5580 __pthread_unregister_cancel and __pthread_unwind_next.
5581
57a5ea02
UD
55822003-07-04 Jakub Jelinek <jakub@redhat.com>
5583
5584 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5585 different symbol for the cancellation syscall wrapper and
5586 non-cancellation syscall wrapper.
5587 (PSEUDO_END): Define.
5588
d810b358
UD
55892003-07-05 Richard Henderson <rth@redhat.com>
5590
5591 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5592 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
42d86dd6
RH
5593 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5594 return actual return value from the syscall, not 0.
d810b358 5595
db54f488
UD
55962003-07-07 Ulrich Drepper <drepper@redhat.com>
5597
5598 * descr.h (struct pthread): Add pid field.
5599 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5600 (__reclaim_stacks): Likewise.
5601 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
5602 also check for PID of the signal source.
5603 (__pthread_initialize_minimal_internal): Also initialize pid field
5604 of initial thread's descriptor.
5605 * pthread_cancel.c: Use tgkill instead of tkill if possible.
5606 * sysdeps/unix/sysv/linux/fork.c: Likewise.
5607 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
5608 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5609 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5610
5e497a41
UD
56112003-07-05 Ulrich Drepper <drepper@redhat.com>
5612
5613 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
5614 Fix use of parameter.
5615 (__libc_cleanup_pop): Likewise.
5616
86a0c4fa
UD
56172003-07-04 Ulrich Drepper <drepper@redhat.com>
5618
5619 * init.c (sigcancel_handler): Change parameters to match handler
5620 for SA_SIGACTION. Check signal number and code to recognize
5621 invalid invocations.
5622
bdbecaa3
RM
56232003-07-03 Roland McGrath <roland@redhat.com>
5624
5625 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
5626 Apply sizeof (struct pthread) bias to r13 value.
5627
56421b23
UD
56282003-07-03 Ulrich Drepper <drepper@redhat.com>
5629
fbd90f6c
UD
5630 * sysdeps/pthread/configure.in: Require CFI directives.
5631
56421b23
UD
5632 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
5633 definition.
5634 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
5635 libpthread compilation.
5636 * unwind.c (__pthread_unwind): Add hidden_def.
5637 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
5638
ca2b4cd7
UD
56392003-07-01 Ulrich Drepper <drepper@redhat.com>
5640
5641 * libc-cancellation.c (__libc_cleanup_routine): Define.
5642 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
5643 (__pthread_cleanup_pop): Define.
5644
f036e569
UD
56452003-07-01 Richard Henderson <rth@redhat.com>
5646
5647 * sysdeps/alpha/elf/pt-initfini.c: New file.
5648 * sysdeps/alpha/pthread_spin_lock.S: New file.
5649 * sysdeps/alpha/pthread_spin_trylock.S: New file.
5650 * sysdeps/alpha/pthreaddef.h: New file.
5651 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
5652 * sysdeps/alpha/tls.h: New file.
5653 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
5654 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
5655 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
5656 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
5657 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
5658 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
5659 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
5660 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
5661 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
5662 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
5663
3b985826
UD
56642003-07-01 Ulrich Drepper <drepper@redhat.com>
5665
5666 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
5667 cleanup support and unwind info.
5668
3a4d1e1e
UD
56692003-06-30 Ulrich Drepper <drepper@redhat.com>
5670
5671 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5672 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
5673 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
5674 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
5675 * tst-once3.c: Add cleanup handler and check it is called.
5676 * tst-once4.c: Likewise.
5677 * tst-oncex3.c: New file.
5678 * tst-oncex4.c: New file.
5679 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
5680
e479cc8e
UD
56812003-06-29 Ulrich Drepper <drepper@redhat.com>
5682
5683 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
5684
7d7ff54c
UD
56852003-06-27 Ulrich Drepper <drepper@redhat.com>
5686
483e95d0
UD
5687 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
5688 (tf_msgsnd): Likewise.
5689
7d7ff54c
UD
5690 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
5691 premature returns a bit more.
5692
7539c7ec
UD
56932003-06-26 Ulrich Drepper <drepper@redhat.com>
5694
5695 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
5696 definition to the front.
5697
5698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
5699 the cleanup functions to make the names unique. Fix dwarf opcode
5700 un unwind table.
5701 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
5702 functions to make the names unique. Fix CFA offset for two blocks.
5703
0af6a1d9
UD
57042003-06-25 Ulrich Drepper <drepper@redhat.com>
5705
5706 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
5707 missing closing braces.
5708 Patch by Christophe Saout <christophe@saout.de>.
5709
eef4a9f3
RM
57102003-06-24 Roland McGrath <roland@redhat.com>
5711
5712 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
5713
4165d44d
UD
57142003-06-24 Ulrich Drepper <drepper@redhat.com>
5715
7f8f7b9d
UD
5716 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
5717 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
5718
4165d44d
UD
5719 * pthreadP.h: Declare __find_thread_by_id.
5720 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
5721 * pthread_clock_gettime.c: Allow using other thread's clock.
5722 * pthread_clock_settime.c: Likewise.
5723 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
5724 * Makefile: Add rules to build and run tst-clock2.
5725 * tst-clock2.c: New file.
5726
67b78ef9
UD
57272003-06-23 Ulrich Drepper <drepper@redhat.com>
5728
5729 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
5730 to use exception-based cleanup handler.
5731 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5732
5733 * tst-cond8.c (ch): Announce that we are done.
5734
5735 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
5736
5737 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
5738 Also test aio_suspend with timeout value.
5739
61623643
UD
57402003-06-22 Ulrich Drepper <drepper@redhat.com>
5741
3a4f2043
UD
5742 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
5743 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
5744 attribute_hidden.
5745
61623643
UD
5746 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
5747 (__pthread_mutex_lock_internal): Likewise.
5748 (__pthread_mutex_unlock_internal): Likewise.
5749 (__pthread_mutex_unlock_usercnt): Declare.
5750 * pthread_mutex_destroy.c: Always fail if used in any way.
5751 * pthread_mutex_init.c: Update comment.
5752 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
5753 * pthread_mutex_timedlock.c: Adjust __nusers.
5754 * pthread_mutex_trylock.c: Adjust __nusers.
5755 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
5756 and public interfaces are wrapper with pass additional parameter.
5757 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
5758 parameter zero.
5759 * tst-mutex8.c: New file.
5760 * Makefile (tests): Add tst-mutex8.
5761 * sysdeps/pthread/pthread_cond_timedwait.c: Call
5762 __pthread_mutex_unlock_usercnt.
5763 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5764 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5765 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5766 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5767 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5768 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
5769 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5770 Add __nusers.
5771 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5772 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5773 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5774 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5775 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5776
5777 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
5778 * pthread_mutex_timedlock.c: Likewise.
5779 * pthread_mutex_trylock.c: Adjust __nusers.
5780 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
5781 * tst-mutex9.c: New file.
5782 * Makefile (tests): Add tst-mutex9.
5783 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
5784 * sysdeps/ia64/tls.h: Likewise.
5785 * sysdeps/powerpc/tls.h: Likewise.
5786 * sysdeps/s390/tls.h: Likewise.
5787 * sysdeps/sh/tls.h: Likewise.
5788 * sysdeps/x86_64/tls.h: Likewise.
5789 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5790 Change type of __owner.
5791 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5792 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5793 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5794 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5795 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5796
9bdabb94
UD
57972003-06-19 Jakub Jelinek <jakub@redhat.com>
5798
5799 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
5800 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
5801
5802 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
5803 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
5804 instead of nr to lll_futex_wake. Only set errno and return -1
5805 if err < 0.
5806
5807 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
5808 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5809 return actual return value from the syscall, not 0.
5810
f6c93bd9
UD
58112003-06-18 Ulrich Drepper <drepper@redhat.com>
5812
ca343e73
UD
5813 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
5814 find a random value.
5815 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
5816 errno==EIDRM.
5817
50441a98
UD
5818 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
5819 compat_timer_settime.
5820 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
5821 compat_timer_gettime.
5822 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 5823 compat_timer_getoverrun.
50441a98
UD
5824 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
5825 compat_timer_delete.
5826
f6c93bd9
UD
5827 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
5828 error-checking mutex detect busy mutexes.
5829
047aec8f
UD
58302003-06-17 Ulrich Drepper <drepper@redhat.com>
5831
1d53508d
UD
5832 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
5833 Add ax to clobber list.
5834 (lll_mutex_cond_lock): Likewise.
5835 (lll_mutex_unlock): Likewise.
5836 (lll_lock): Likewise.
5837 (lll_unlock): Likewise.
5838
f23b30e2
UD
5839 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
5840 * tst-cancel18.c: New file.
5841 * tst-cancelx18.c: New file.
5842
5843 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
5844 and tcdrain.
5845
5846 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
5847 * tst-cancel17.c: New file.
5848 * tst-cancelx17.c: New file.
5849
5850 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
5851 * sysdeps/unix/sysv/linux/sigwait.c: New file.
5852 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
5853
047aec8f
UD
5854 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
5855
bbde8527
UD
58562003-06-16 Jakub Jelinek <jakub@redhat.com>
5857
5858 * sysdeps/pthread/createthread.c (create_thread): Set
5859 header.multiple_threads unconditionally.
5860 * allocatestack.c (allocate_stack): Likewise.
5861 * descr.h (struct pthread): Add header.multiple_threads
5862 unconditionally.
5863 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
5864 Define for librt. #error if neither libpthread, libc nor librt.
5865 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
5866 Likewise.
5867 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
5868 CDISABLE): Likewise.
5869 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
5870 CDISABLE): Likewise.
5871 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
5872 CDISABLE): Likewise.
5873 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
5874 CDISABLE): Likewise. Access header.multiple_threads outside of
5875 libc and libpthread.
5876 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
5877 Likewise.
5878 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
5879 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
5880
26676450
UD
58812003-06-17 Ulrich Drepper <drepper@redhat.com>
5882
5883 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
5884 Also test early cancellation before the thread reaches the cancellation
5885 point.
5886
5887 * Makefile: Compile forward.c with exceptions.
5888
5889 * sysdeps/unix/sysv/linux/sleep.c: New file.
5890
301a6724
UD
58912003-06-16 Ulrich Drepper <drepper@redhat.com>
5892
0e0deb03
UD
5893 * Makefile: Add CFLAGS definition to compile function wrappers
5894 duplicated from libc with exceptions.
5895 * tst-cancel4.c: Also check cancellation handlers.
5896
301a6724
UD
5897 * Makefile: Add rules to build and run tst-cancel16 and
5898 tst-cancelx16. Add missing CFLAGS definitions.
5899 * tst-cancel16.c: New file.
5900 * tst-cancelx16.c: New file.
5901
7a114794
UD
59022003-06-15 Ulrich Drepper <drepper@redhat.com>
5903
452aea84
UD
5904 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5905 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
5906 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
5907 (DL_SYSINFO_IMPLEMENTATION): Likewise.
5908
7a114794
UD
5909 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
5910 (LIBC_CANCEL_RESET): Likewise.
5911 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
5912 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
5913 librt-cancellation.
5914 (CFLAGS-libcrt-cancellation.c): Define.
5915 * sysdeps/pthread/librt-cancellation.c: New file.
5916 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
5917 macros also when compiling librt.
5918 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5919 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5920 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5921 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5922 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5923 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5924 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5925
5926 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
5927 compat_timer_create.
5928
8ba1d429
UD
59292003-06-14 Ulrich Drepper <drepper@redhat.com>
5930
cc8fb6f3
UD
5931 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
5932
8ba1d429
UD
5933 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
5934 __register_atfork.
5935 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
5936 Add libc_hidden_def.
5937
d4f100e2
RM
59382003-06-13 Roland McGrath <roland@redhat.com>
5939
5940 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
5941 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
5942
dd9423a6
UD
59432003-06-11 Ulrich Drepper <drepper@redhat.com>
5944
5945 * allocatestack.c (queue_stack): Always inline.
5946 * ptreadhP.h (__do_cancel): Likewise.
5947
ed24330d
JJ
59482003-06-10 Jakub Jelinek <jakub@redhat.com>
5949
5950 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
5951 a typo.
5952
06120d79
UD
59532003-06-10 Ulrich Drepper <drepper@redhat.com>
5954
5955 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5956 (__pthread_cond_signal): Remove incorrect second addition for
5957 cond_lock!=0.
5958
b1720346
UD
59592003-06-09 Ulrich Drepper <drepper@redhat.com>
5960
5b318f85
UD
5961 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5962 (__pthread_cond_signal): Use correct futex pointer in
5963 __lll_mutex_lock_wait call.
5964
b1720346
UD
5965 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5966 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
5967
3e36c37d
UD
59682003-06-08 Ulrich Drepper <drepper@redhat.com>
5969
ecf7955d
UD
5970 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
5971 cancelable.
ed24330d 5972 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
5973 Likewise.
5974
3e36c37d
UD
5975 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
5976 hand-written CFI generation code. Since ENTRY/END also initiated
5977 CFI frames this caused two CFI sets to be generated.
5978
7726edc2
UD
59792003-06-07 Ulrich Drepper <drepper@redhat.com>
5980
5981 * cleanup_routine.c: New file.
5982 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
5983 * sysdeps/pthread/pthread.h: Add support for fully exception-based
5984 cleanup handling.
5985 * Makefile (libpthread-routines): Add cleanup_routine.
5986 Add more CFLAGS variables to compile with exceptions. Add comments
5987 why which file needs unwind tables.
5988 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
5989 tests.
5990 * tst-cancelx1.c: New file.
5991 * tst-cancelx2.c: New file.
5992 * tst-cancelx3.c: New file.
5993 * tst-cancelx4.c: New file.
5994 * tst-cancelx5.c: New file.
5995 * tst-cancelx6.c: New file.
5996 * tst-cancelx7.c: New file.
5997 * tst-cancelx8.c: New file.
5998 * tst-cancelx9.c: New file.
5999 * tst-cancelx10.c: New file.
6000 * tst-cancelx11.c: New file.
6001 * tst-cancelx12.c: New file.
6002 * tst-cancelx13.c: New file.
6003 * tst-cancelx14.c: New file.
6004 * tst-cancelx15.c: New file.
6005 * tst-cleanupx0.c: New file.
6006 * tst-cleanupx0.expect: New file.
6007 * tst-cleanupx1.c: New file.
6008 * tst-cleanupx2.c: New file.
6009 * tst-cleanupx3.c: New file.
6010
6011 * tst-cleanup0.c: Make standard compliant.
6012 * tst-cleanup1.c: Likewise.
6013
6014 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6015 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6016 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6017 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6018 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6019 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6020 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6021 CLEANUP_JMP_BUF.
6022 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6023 * tst-cancel12.c: New file.
6024 * tst-cancel13.c: New file.
6025 * tst-cancel14.c: New file.
6026 * tst-cancel15.c: New file.
6027 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6028 and tst-cancel15.
6029
6030 * tst-cancel1.c: Add some comments.
6031
6032 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6033 timeout correctly.
6034
7a8a8e21
UD
60352003-06-06 Ulrich Drepper <drepper@redhat.com>
6036
6037 * Makefile (CFLAGS-pthread_cancel.c): Define.
6038
4ad0bbf4
UD
60392003-06-05 Ulrich Drepper <drepper@redhat.com>
6040
6041 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6042 Change type of __writer element to int.
6043 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6044 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6045 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6046 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6047 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6048 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6049 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6050 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6051 Compare with TID to determine deadlocks.
6052 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6053 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6054 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6055 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6056 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6057 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6058 Likewise.
6059 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6060 Likewise.
6061 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6062 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6063 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6064 Likewise.
6065 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6066 Likewise.
6067 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6068 * Makefile (tests): Add tst-rwlock12.
6069 * tst-rwlock12.c: New file.
6070
332faa96
JJ
60712003-06-05 Jakub Jelinek <jakub@redhat.com>
6072
6073 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6074 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6075 Remove bogus hidden_proto.
6076 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6077 Likewise.
6078 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6079 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6080 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6081 ___lll_mutex_timedlock): Likewise.
6082
29d9e2fd
UD
60832003-06-04 Ulrich Drepper <drepper@redhat.com>
6084
6085 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6086 (__pthread_cond_signal): Add some code to eventually handle
6087 cond_lock!=0.
6088
6f1acb30
UD
60892003-06-01 Ulrich Drepper <drepper@redhat.com>
6090
6091 * Makefile (tests): Add tst-exec4.
6092 (tst-exec4-ARGS): Define.
6093 * tst-exec4.c: New file.
6094
49b65043
UD
60952003-05-31 Ulrich Drepper <drepper@redhat.com>
6096
31195be2
UD
6097 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6098 Also fail if tv_nsec < 0.
6099 (__lll_timedwait_tid): Likewise.
6100 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6101 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6102 Likewise.
6103 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6104 Likewise.
6105 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6106 Likewise.
6107 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6108 Likewise.
80b54217
UD
6109 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6110 Likewise.
6111 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6112 Likewise.
31195be2 6113
dcfc8224
UD
6114 * Makefile (tests): Add tst-sem8 and tst-sem9.
6115 * tst-sem8.c: New file.
6116 * tst-sem9.c: New file.
6117 * sem_open.c: Fix creation of in_use record if the file exists but
6118 no internal record.
6119
49b65043
UD
6120 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6121 definitions.
6122
6123 * sysdeps/pthread/timer_create.c (timer_create): In case
6124 evp==NULL, assign timer ID to sival_ptr.
6125
6126 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6127 struct pthread_unwind_buf *.
6128 (struct pthread): Likewise for cleanup_jmp_buf element.
6129
6130 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6131 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6132 * unwind.c (__pthread_unwind_next): Likewise.
6133
50794a45
UD
61342003-05-30 Ulrich Drepper <drepper@redhat.com>
6135
5d4f57bd
UD
6136 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6137 (lll_futex_timed_wait): Use int for futex value parameter.
6138 (lll_futex_wake): Likewise.
6139 (lll_futex_requeue): Likewise.
6140
6141 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6142 Replace one memory operation with one register operation.
6143
6144 * tst-join4.c (do_test): Fix error message.
6145
7ab7ea33
UD
6146 * tst-rwlock6.c (do_test): Use correct format specifier.
6147
6148 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6149 (__lll_mutex_lock_wait): Replace one memory operation with one
6150 register operation.
6151 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6152 (__lll_mutex_lock_wait): Likewise.
6153
50794a45
UD
6154 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6155 (__lll_mutex_cond_lock): Add one to value parameter of
6156 __lll_lock_wait to reflect reality in the futex syscall.
6157 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6158 (lll_mutex_cond_lock): Likewise.
6159
5a70784e
JJ
61602003-05-30 Jakub Jelinek <jakub@redhat.com>
6161
6162 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6163 New function.
6164 (lll_mutex_cond_lock): Define.
6165
e7c5ac68
UD
61662003-05-29 Ulrich Drepper <drepper@redhat.com>
6167
586d1748
UD
6168 * Makefile (tests): Add tst-signal6.
6169 * tst-signal6.c: New file.
6170
b8ba4a27
UD
6171 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6172 (__lll_mutex_unlock_force): New function
6173 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6174
65d46efe
UD
6175 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6176 (__lll_mutex_unlock_force): New function.
6177 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6178
6179 * tst-rwlock7.c (do_test): Use correct format specifier.
6180
e7c5ac68
UD
6181 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6182 Find break parameter in correct asm argument.
6183
284bdc42
UD
61842003-05-27 Jakub Jelinek <jakub@redhat.com>
6185
6186 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6187 Remove out4.
6188 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6189 error occured.
6190 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6191 Add __mutex.
6192 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6193 lll_futex_requeue, lll_mutex_unlock_force): Define.
6194
e7c5ac68
UD
61952003-05-30 Jakub Jelinek <jakub@redhat.com>
6196
6197 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6198 (pthread_cond_t): Add __mutex.
6199 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6200 lll_futex_requeue, lll_mutex_unlock_force): Define.
6201
ea2630c6
UD
62022003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6203
6204 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6205 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
42d86dd6 6206 Add __mutex field.
ea2630c6
UD
6207 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6208 Define.
6209 (lll_futex_wait, lll_futex_wake): Define.
6210 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6211 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6212 FUTEX_REQUEUE instead of FUTEX_WAIT.
6213 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6214 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6215 mutex which was used in condvar structure. Call
6216 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6217 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6218
6219 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6220 include tcb-offsets.h. Read wakeup value in locked region.
6221 Use the value of gbr register as THREAD_ID.
6222 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6223 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6224 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6225
6226 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6227 macros.
6228
5a77f150
UD
62292003-05-28 Ulrich Drepper <drepper@redhat.com>
6230
6231 * sysdeps/pthread/pthread_cond_broadcast.c
6232 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6233
7661d9f7
UD
62342003-05-26 Ulrich Drepper <drepper@redhat.com>
6235
6236 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6237 typo in register name.
6238 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6239 correctly. Actually use requeue. Little optimization.
6240 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6241 mutex address early. Handle cancellation state as 32-bit value.
6242 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6243 Remove unnecessary label.
6244
69431c9a
UD
62452003-05-25 Ulrich Drepper <drepper@redhat.com>
6246
6247 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6248 instead of FUTEX_WAIT.
6249 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6251 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6252 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6253 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6254 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6255 used in condvar structure. Call __pthread_mutex_cond_lock instead
6256 of __pthread_mutex_lock_internal.
6257 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6258 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6259 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6260 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6261 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6262 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6263 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6264 Add pthread_mutex_cond_lock.
6265 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6266 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6267 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6268 lll_mutex_cond_lock.
6269 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6270 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 6271 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 6272 Add __mutex field.
248a3490 6273 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
6274 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6275
6276 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6277 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6278
6279 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6280 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6281 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6282 macro don't define aliases.
6283
6284 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6285 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6286 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6287 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6288 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6289 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6290 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6291 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6292 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6293
fddfebbd
UD
62942003-05-17 Ulrich Drepper <drepper@redhat.com>
6295
6296 * sem_open.c: Fix one endless loop. Implement correct semantics
6297 wrt opening the same semaphore more then once.
6298 * sem_close.c: Adjust for sem_open change.
6299 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6300 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6301 * Makefile (tests): Add tst-sem7.
6302 * tst-sem7.c: New file.
6303
1eefffb0
RM
63042003-05-16 Roland McGrath <roland@redhat.com>
6305
6306 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6307 uninitialized variable braino.
6308
6e66dc78
UD
63092003-05-16 Ulrich Drepper <drepper@redhat.com>
6310
23ae6451
UD
6311 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6312 test for syscall availability.
6313
6314 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6315 __no_posix_timers to -1 if the syscalls don't exist.
6316
7ac5b8e2
UD
6317 * pthread_join.c (pthread_join): Set tid field of the joined
6318 thread to -1. This isn't necessary but helps to recognize some
6319 error conditions with almost no cost.
6320
6321 * allocatestack.c (FREE_P): Also negative values indicate an
6322 unused stack.
6323
6e66dc78
UD
6324 * unwind.c: Include <unistd.h>.
6325
855dba3c
UD
63262003-05-14 Ulrich Drepper <drepper@redhat.com>
6327
6328 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6329
81f3ac4c
UD
63302003-05-14 Jakub Jelinek <jakub@redhat.com>
6331
6332 * Makefile (crti-objs, crtn-objs): New variables.
6333 (omit-deps, extra-objs): Add crtn.
6334 ($(objpfx)libpthread.so): Depend on both crti and crtn
6335 and links to them in multidir.
6336 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6337
7158eae4
UD
63382003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
6339
6340 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6341 (lll_mutex_unlock): Use atomic_exchange_rel.
6342
edf205d5
UD
63432003-05-11 Ulrich Drepper <drepper@redhat.com>
6344
6345 * cond-perf.c (cons): Add missing locking around setting of alldone.
6346
a3f979a7
UD
63472003-05-10 Ulrich Drepper <drepper@redhat.com>
6348
6349 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6350 related macros.
6351 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6352
880867a4
UD
63532003-05-09 Ulrich Drepper <drepper@redhat.com>
6354
949ec764
UD
6355 * tst-sem6.c: New file.
6356 * Makefile (tests): Add tst-sem6.
6357
6358 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6359 Use atomic_exchange_rel instead of atomic_exchange.
6360 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6361 Likewise.
6362
6363 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6364 code for lll_futex_wait and lll_futex_wake in static apps. Use
6365 vsyscall is possible.
6366
6367 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6368 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6369 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6370 pthread_setaffinity_np.
6371 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6372 and pthread_setaffinity_np.
6373 * Makefile (libpthread-routines): Add pthread_getaffinity and
6374 pthread_setaffinity.
6375
880867a4
UD
6376 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6377 use it in case mmap to allocate the stack fails.
6378 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6379 ARCH_MAP_FLAGS here.
6380 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6381 ARCH_RETRY_MMAP.
6382
92d83c72
UD
63832003-05-08 Ulrich Drepper <drepper@redhat.com>
6384
6385 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6386 handler implementation. It is now lockless in fork().
6387 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6388 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6389 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
6390 declare the __fork_*_lists.
6391 (struct fork_handler): Include pointers to all three functions.
6392 Add next, refcntr and need_signal elements.
6393 (__fork_handlers): New declaration.
6394 (__register_atfork_malloc): Remove declaration.
6395 (HAVE_register_atfork_malloc): Remove definition.
6396 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6397 __pthread_child_handler variable.
6398 (__libc_pthread_init): Use __register_atfork instead of explicitly
6399 adding to the list.
6400 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6401 and lll_futex_wake.
6402 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6403
6404 * unwind.c (unwind_cleanup): Print error message and then abort. This
6405 function must never be reached.
6406
6407 * cond-perf.c: New file.
6408
be4d8038
UD
64092003-05-05 Ulrich Drepper <drepper@redhat.com>
6410
6411 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6412
c6696b79
RM
64132003-05-04 Roland McGrath <roland@redhat.com>
6414
6415 * Makefile ($(objpfx)../libc.so): New target.
6416
7da168bf
UD
64172003-05-02 Ulrich Drepper <drepper@redhat.com>
6418
6419 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6420 (pthread_condattr_t): Size is only an int, don't use long for
6421 alignment.
6422 (pthread_mutexattr_t): Likewise.
7da168bf
UD
6423 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6424 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6425 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6426
9a7178d6
UD
64272003-05-01 Ulrich Drepper <drepper@redhat.com>
6428
6429 * sysdeps/i386/tls.h: Define THREAD_ID.
6430 * sysdeps/ia64/tls.h: Likewise.
6431 * sysdeps/powerpc/tls.h: Likewise.
6432 * sysdeps/s390/tls.h: Likewise.
6433 * sysdeps/sh/tls.h: Likewise.
6434 * sysdeps/x86_64/tls.h: Likewise.
6435 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6436 record ownership.
6437 * pthread_mutex_timedlock.c: Likewise.
6438 * pthread_mutex_trylock.c: Likewise.
6439 * pthread_mutex_unlock.c: Likewise.
6440 * pthread_rwlock_trywrlock.c: Likewise.
6441 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6442 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6443 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6444 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6445
6446 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6447 flag.
6448
a234e27d
UD
64492003-04-29 Jakub Jelinek <jakub@redhat.com>
6450
6451 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6452 (__SIZEOF_PTHREAD_COND_T): Define to 48.
6453 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6454 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6455 Make __align long long instead of long.
6456 (pthread_rwlock_t): Formatting.
6457 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6458 (pthread_rwlock_t): Formatting.
6459 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6460 (pthread_cond_t): Make __align long long instead of long.
6461 (pthread_rwlock_t): Move __flags field to the same position as in
6462 linuxthreads.
6463
f025c136
UD
64642003-04-30 Ulrich Drepper <drepper@redhat.com>
6465
6466 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6467 * tst-rwlock7.c (do_test): Likewise.
6468
7531ab9e
RM
64692003-04-26 Roland McGrath <roland@redhat.com>
6470
6471 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6472
299601a1
UD
64732003-04-22 Jakub Jelinek <jakub@redhat.com>
6474
299601a1
UD
6475 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6476 sizeof (struct pthread).
6477 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 6478 1 struct pthread.
299601a1
UD
6479 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6480 to 0.
6481 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6482 struct pthread.
6483 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6484 to 32-bit bytes.
6485 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6486 tcbp.
6487 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6488 unneccessarily.
6489 (NO_TLS_OFFSET): Define.
299601a1
UD
6490 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6491 add TLS_TCB_SIZE unnecessarily.
299601a1 6492
950094f8
RM
64932003-04-22 Roland McGrath <roland@redhat.com>
6494
6495 * Makeconfig (shared-thread-library): Reverse link order to work
6496 around linker bug.
6497
dc2f6455
UD
64982003-04-22 Ulrich Drepper <drepper@redhat.com>
6499
6500 * semaphore.h: Fix typo in comment.
6501
e7608d77
UD
65022003-04-21 Ulrich Drepper <drepper@redhat.com>
6503
6a87ee19
UD
6504 * sysdeps/pthread/sigfillset.c: New file.
6505
e7608d77
UD
6506 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6507 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6508 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6509 * sysdeps/pthread/sigaction.c: Likewise.
6510 * sysdeps/pthread/sigprocmask.c: New file.
6511 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6512 __SIGRTMIN+1.
6513 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6514 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
6515 in this case.
6516
0b3df49e
UD
65172003-04-19 Ulrich Drepper <drepper@redhat.com>
6518
58a7a325
UD
6519 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6520 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6521
0b3df49e
UD
6522 * sysdeps/unix/sysv/linux/unregister-atfork.c
6523 (__unregister_atfork): Don't free memory not allocated dynamically.
6524
6525 * semaphore.h: Remove __THROW marker from cancellation points.
6526 * nptl/sysdeps/pthread/pthread.h: Likewise.
6527
7d74651e
UD
65282003-04-18 Ulrich Drepper <drepper@redhat.com>
6529
76a67697
UD
6530 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6531 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
6532 __THROW.
6533
dd9d6538
JJ
65342003-04-16 Jakub Jelinek <jakub@redhat.com>
6535
6536 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6537
4ab6f47c
RM
65382003-04-15 Roland McGrath <roland@redhat.com>
6539
6540 * forward.c (__pthread_unwind): Tweak to avoid warning.
6541
162434a6
UD
65422003-04-15 Ulrich Drepper <drepper@redhat.com>
6543
6544 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6545
35909161
UD
65462003-04-14 Ulrich Drepper <drepper@redhat.com>
6547
18ddd3aa 6548 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
6549 overflow CFA advance instructions.
6550 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6551
18a8e730
UD
65522003-04-14 Jakub Jelinek <jakub@redhat.com>
6553
bd4f43b4
UD
6554 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6555 * sysdeps/i386/pthread_spin_lock.c: Likewise.
6556 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
6557 defined.
6558
18a8e730
UD
6559 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6560 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6561 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6562 DW_CFA_advance_loc for .Laddl-.Lsubl.
6563
08c765fa
UD
65642003-04-13 Ulrich Drepper <drepper@redhat.com>
6565
18a8e730
UD
6566 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6567 position-independent unwind data for static libraries.
6568 Add missing unwind info. Add comments.
6569
ad2be852
UD
6570 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6571 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6572 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
6573 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6574
177d1ad3
UD
65752003-04-12 Ulrich Drepper <drepper@redhat.com>
6576
08c765fa
UD
6577 * Makefile: Make sure all cancellation points are compiled with
6578 exception and asynchronous unwind tables.
6579
177d1ad3
UD
6580 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6581 which mishandles loading of global object addresses in PIC.
6582 (THREAD_SETMEM_NC): Likewise.
6583
09d65ff3
UD
65842003-04-11 Ulrich Drepper <drepper@redhat.com>
6585
6586 * pthread.h: Define new data structure for cleanup buffer. Declare
6587 new cleanup handler interfaces.
6588 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
6589 (struct pthread): Add cleanup_jmp_buf pointer. Define
6590 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6591 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
6592 it. Declare old cleanup handler installation functions.
6593 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
6594 handling.
6595 * cleanup_defer.c: Likewise.
6596 * cleanup_compat.c: New file. Old cleanup code.
6597 * cleanup_def_compat.c: New file. Old cleanup code.
6598 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6599 if own thread descriptor.
6600 * unwind.c: New file.
6601 * forward.c: Add __pthread_unwind.
6602 * init.c (pthread_functions): Add __pthread_unwind.
6603 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
6604 Add ptr___pthread_unwind.
6605 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
6606 and unwind function.
6607 * Makefile (libpthread-routines): Add cleanup_compat,
6608 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
6609 table generation if necessary.
6610 * version.c: Record whether unwind support is compiled in.
6611 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
6612 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
6613 handler interfaces.
6614 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
6615 complication to generate unwind information for syscall wrappers.
68107ec0 6616 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
6617 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
6618 __cleanup_fct_attribute.
6619
6620 * Makefile: Add rules to build and run tst-cleanup0.
6621 * tst-cleanup0.c: New file.
6622 * tst-cleanup0.expect: New file.
6623
6624 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
6625 caller. Optimize to avoid often unecessary local variable.
6626
0dc44b51
RM
66272003-04-11 Roland McGrath <roland@redhat.com>
6628
6629 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
6630 sets variable `multidir'; include that.
6631 (generated): Add it.
6632 ($(objpfx)$(multidir)/crti.o): New target.
6633 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
6634
84a80719
UD
66352003-04-11 Ulrich Drepper <drepper@redhat.com>
6636
6637 * tst-attr2.c (do_test): Add cast to avoid warning.
6638 * tst-mutex4.c (do_test): Likewise.
6639
88ff4759
UD
66402003-04-10 Ulrich Drepper <drepper@redhat.com>
6641
6642 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
6643 in child.
6644
b2041097
UD
66452003-04-09 Ulrich Drepper <drepper@redhat.com>
6646
6647 * Makefile (tests): Add tst-detach1.
6648 * tst-detach1.c: New file.
6649
f9657e88
UD
66502003-04-08 Ulrich Drepper <drepper@redhat.com>
6651
9afe4964
UD
6652 * sysdeps/pthread/pthread.h: Remove duplicate
6653 pthread_cleanup_{push,pop} definitions.
6654
f9657e88
UD
6655 * tst-barrier2.c: Eliminate warnings.
6656 * tst-cancel4.c: Likewise.
6657 * tst-cond4.c: Likewise.
6658 * tst-cond6.c: Likewise.
6659 * tst-detach1.c: Likewise.
6660 * tst-rwlock4.c: Likewise.
6661 * tst-rwlock6.c: Likewise.
6662 * tst-rwlock7.c: Likewise.
6663 * tst-sem3.c: Likewise.
6664 * tst-spin2.c: Likewise.
6665 * tst-umask1.c: Likewise.
6666
69b35e86
UD
66672003-04-07 Ulrich Drepper <drepper@redhat.com>
6668
6669 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
6670
c70ad7d7
UD
66712003-04-06 Ulrich Drepper <drepper@redhat.com>
6672
6673 * descr.h (struct pthread): Move cancelhandling member to the front.
6674
54e0138f
UD
66752003-04-05 Ulrich Drepper <drepper@redhat.com>
6676
6677 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
6678 malloc_parent, and malloc_child statically.
6679 (__register_atfork_malloc): New function.
6680 (free_mem): Don't free any of the malloc_* variables on the list.
6681 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
6682 Define HAVE_register_atfork_malloc.
6683
b22d701b
UD
66842003-04-04 Ulrich Drepper <drepper@redhat.com>
6685
6686 * sysdeps/pthread/createthread.c (create_thread): Add some more
6687 comments explaining when to set multiple_threads and when not.
6688
6689 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6690 THREAD_ATOMIC_BIT_SET if not already defined.
6691 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
6692 THREAD_ATOMIC_BIT_SET:
6693 * sysdeps/x86_64/tls.h: Likewise.
6694 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
6695 THREAD_ATOMIC_CMPXCHG_VAL.
6696 (_pthread_cleanup_pop_restore): Likewise.
6697 * cancellation.c (__pthread_enable_asynccancel): Likewise.
6698 (__pthread_enable_asynccancel_2): Likewise.
6699 (__pthread_disable_asynccancel): Likewise.
6700 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6701 (__libc_disable_asynccancel): Likewise.
6702 * init.c (sigcancel_handler): Likewise.
6703 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
6704 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
6705
86246935
UD
67062003-04-03 Ulrich Drepper <drepper@redhat.com>
6707
6708 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
6709 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
6710 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
6711 * Makefile (tests): Add tst-cancel11.
6712 * tst-cancel11.c: New file.
6713
6b4686a5
UD
67142003-04-01 Ulrich Drepper <drepper@redhat.com>
6715
6716 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
6717 round, not the first. Use specific_used flag instead of local
6718 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
6719 (__free_tcb): Don't call deallocate_tsd here.
6720 (start_thread): Call deallocate_tsd here.
6721 * pthread_setspecific.c: Set specific_used flag really only when
6722 needed.
0d73a73b 6723 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 6724 * tst-tsd3.c: New file.
0d73a73b 6725 * tst-tsd4.c: New file.
6b4686a5 6726
42b2395d
UD
67272003-03-31 Ulrich Drepper <drepper@redhat.com>
6728
211d90c5
UD
6729 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
6730 Use atomic_exchange_and_add instead of __lll_add.
6731 (__lll_mutex_timedlock): Likewise.
6732 Patch by Ian Wienand.
6733
67342003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
6735
6736 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
6737 (SINGLE_THREAD_P): Fix typo.
6738 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
6739
67402003-03-31 Ulrich Drepper <drepper@redhat.com>
6741
6742 * Makefile (tests): Add tst-align.
6743 * tst-align.c: New file.
6744 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 6745
42b2395d
UD
6746 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
6747 function correctly.
6748
211d90c5
UD
6749 * tst-tsd2.c: Add casts to avoid warnings.
6750
163b180f
UD
67512003-03-30 Ulrich Drepper <drepper@redhat.com>
6752
6753 * descr.h (struct pthread): Move most often used elements to the front.
6754
ea473bad
UD
67552003-03-29 Ulrich Drepper <drepper@redhat.com>
6756
6757 * Makefile (libpthread-routines): Add pthread_atfork.
6758 (libpthread-static-only-routines): Add pthread_atfork.
6759
dd731d53
UD
67602003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6761
6762 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
6763 of TLS_DTV_AT_TP.
6764 (INSTALL_DTV): Add parens.
6765 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
6766 Use passed descr instead of THREAD_SELF.
6767 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
6768 (__lll_mutex_timedlock_wait): Correct expected value after
6769 spurious wakeup.
6770 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
6771 Release lock before waking up the waiters.
6772 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
6773 criteria. Reorderstruct passed to cleanup handler. Fix
6774 handling of cancellation and failung pthread_mutex_unlock call.
6775 Use __pthread_enable_asynccancel_2 instead of
6776 __pthread_enable_asynccancel.
6777 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6778 Return result of lock re-get if it fails.
6779 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
6780 for __pthread_cleanup_push.
6781 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
6782 completely broken rwlock implementation.
6783 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6784 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6785 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6786 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6787 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6788 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
6789 versioned_symbol macro.
6790 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
6791 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
6792
c75d02f0
UD
67932003-03-27 Ulrich Drepper <drepper@redhat.com>
6794
5f5004df
UD
6795 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
6796 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
6797 and __helper_tid.
6798 (struct timer): Remove th and bar field.
6799 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
6800 debugging code. Create only one helper thread.
6801 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
6802 helper thread.
6803 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6804 Renamed. Define statically. Use thread info from siginfo.
6805 (__helper_once): New variable.
6806 (__helper_tid): New variable.
6807 (__reset_helper_control): New function.
6808 (__start_helper_thread): New function.
6809
18d009ca
UD
6810 * pthread_create.c (start_thread): Don't use setjmp inside
6811 __builtin_expect to work around gcc bug.
6812
c75d02f0
UD
6813 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
6814 timer_delete syscall fails, but not with ENOSYS, set
6815 __no_posix_timers.
6816
6817 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
6818 (timer_settime): Fix typo.
28cf3058
UD
6819 * sysdeps/unix/sysv/linux/timer_getoverr.c
6820 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 6821
049ac259
JJ
68222003-03-27 Jakub Jelinek <jakub@redhat.com>
6823
6824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
6825 offset of cleanupbuf.__prev.
6826
f93d39dd
JJ
68272003-03-26 Jakub Jelinek <jakub@redhat.com>
6828
6829 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
6830 of included file.
6831
f064e4c5
UD
68322003-03-26 Ulrich Drepper <drepper@redhat.com>
6833
6834 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
6835 NULL provide default definition to syscall.
6836
83e886a3
RM
68372003-03-25 Roland McGrath <roland@redhat.com>
6838
6839 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
6840 (timer_id2ptr): Fix typo.
6841
09402f5b
UD
68422003-03-25 Ulrich Drepper <drepper@redhat.com>
6843
6844 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
6845 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
6846 * sysdeps/ia64/pthreaddef.h: Likewise.
6847 * sysdeps/powerpc/pthreaddef.h: Likewise.
6848 * sysdeps/s390/pthreaddef.h: Likewise.
6849 * sysdeps/sh/pthreaddef.h: Likewise.
6850 * sysdeps/x86_64/pthreaddef.h: Likewise.
6851 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
6852 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
6853 being changed.
6854 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6855 SIGTIMER is not unblocked.
6856 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
6857 RT signal taken.
6858 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
6859 be send.
6860 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
6861 pass pointer through as ID.
6862 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
6863 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
6864 * sysdeps/unix/sysv/linux/timer_create.c: New file.
6865 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
6866 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
6867 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
6868 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
6869 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
6870 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
6871 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
6872 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
6873 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
6874 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
6875 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
6876 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
6877 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
6878 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
6879 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
6880 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
6881 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
6882 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
6883 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
6884 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
6885 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
6886 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
6887 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
6888 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
6889 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
6890 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
6891 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
6892 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
6893 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
6894 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
6895
6896 * pthreadP.h: Remove FRAME_LEFT definition.
6897 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
6898 already left frame. Programs which have this problem are not POSIX
6899 compliant.
6900 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
6901
5e826ab5
UD
69022003-03-24 Ulrich Drepper <drepper@redhat.com>
6903
6904 * sysdeps/pthread/tst-timer.c: Check return values of the
6905 functions we test.
6906
b910f788
RM
69072003-03-23 Roland McGrath <roland@redhat.com>
6908
3045a1fe
RM
6909 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
6910 * tst-tls3mod.c: Likewise.
6911 * tst-tls1.c: Likewise.
6912 * tst-tls2.c: Likewise.
6913
85047fe3
RM
6914 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
6915 undefined behavior.
6916
b910f788
RM
6917 * tst-join5.c (tf1, tf2): Add a cast.
6918
6919 * Makeconfig (includes): Append -I$(..)nptl to this variable.
6920
6921 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
6922 Don't test anything.
6923 * tst-cond4.c: Likewise.
6924 * tst-cond6.c: Likewise.
6925 * tst-flock2.c: Likewise.
6926 * tst-mutex4.c: Likewise.
6927 * tst-rwlock4.c: Likewise.
6928 * tst-signal1.c: Likewise.
6929 * tst-spin2.c: Likewise.
6930 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
6931
6932 * tst-mutex4.c: Use test-skeleton.c.
6933 * tst-spin2.c: Likewise.
6934 * tst-sysconf.c: Likewise.
6935 * tst-barrier2.c: Likewise.
6936 * tst-cond4.c: Likewise.
6937 * tst-cond6.c: Likewise.
6938 * tst-rwlock4.c: Likewise.
6939 * tst-unload.c: Likewise.
6940 * tst-flock2.c (do_test): Use return instead of exit.
6941
4baa087a
RM
69422003-03-22 Jakub Jelinek <jakub@redhat.com>
6943
6944 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
6945
5a3ab2fc
UD
69462003-03-21 Ulrich Drepper <drepper@redhat.com>
6947
9f07eae2
UD
6948 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6949 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
6950 instead of __lll_compare_and_swap.
6951 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6952 Likewise.
6953 Removed definition if __lll_compare_and_swap.
6954
5a3ab2fc
UD
6955 * cancellation.c: Adjust for new form of compare&exchange macros.
6956 * cleanup_defer.c: Likewise.
6957 * init.c: Likewise.
6958 * libc-cancellation.c: Likewise.
6959 * old_pthread_cond_broadcast.c: Likewise.
6960 * old_pthread_cond_signal.c: Likewise.
6961 * old_pthread_cond_timedwait.c: Likewise.
6962 * old_pthread_cond_wait.c: Likewise.
6963 * pthread_cancel.c: Likewise.
6964 * pthread_create.c: Likewise.
6965 * pthread_detach.c: Likewise.
6966 * pthread_join.c: Likewise.
6967 * pthread_key_delete.c: Likewise.
6968 * pthread_setcancelstate.c: Likewise.
6969 * pthread_setcanceltype.c: Likewise.
6970 * pthread_timedjoin.c: Likewise.
6971 * pthread_tryjoin.c: Likewise.
6972 * sysdeps/pthread/createthread.c: Likewise.
6973
b1aea098
UD
69742003-03-20 Ulrich Drepper <drepper@redhat.com>
6975
6976 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 6977 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
6978 definitions. Replace uses with calls to atomic_* functions.
6979 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6980 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
6981 __lll_test_and_set calls with atomic_exchange_and_add and
6982 atomic_exchange calls respectively.
6983 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
6984 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
6985 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
6986 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6987 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
6988 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
6989 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
6990
6991 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
6992 returns the old value.
6993
100a7100
RM
69942003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
6995
6996 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
6997 int for variable OLDVAL and correct inline assembler contraint.
6998 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
6999 type int for variable OLD.
7000
7001 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7002 only for s390-32.
7003 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7004 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7005 instead of multiple_threads field in the TCB.
7006
95767b36
UD
70072003-03-19 Ulrich Drepper <drepper@redhat.com>
7008
4009bf40
UD
7009 * sysdeps/i386/i686/bits/atomic.h: Removed.
7010 * sysdeps/i386/i586/bits/atomic.h: Removed.
7011 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7012 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7013 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7014 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7015 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7016 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7017 * atomic.h: Removed. Moved to glibc.
7018
560a784f
UD
7019 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7020 support for clock selection.
7021
95767b36
UD
7022 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7023 signalling waiters.
7024
043ad426
RM
70252003-03-18 Roland McGrath <roland@redhat.com>
7026
94659495
RM
7027 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7028 Add __lll_rel_instr first. Add memory clobber.
7029 (lll_mutex_unlock): Use __lll_test_and_set.
7030 From Paul Mackerras <paulus@samba.org>.
7031
7032 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7033 unconditionally.
7034 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7035 (SINGLE_THREAD_P): Add `header.' prefix.
7036 From Paul Mackerras <paulus@samba.org>.
7037
043ad426
RM
7038 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7039 pthread_timedjoin_np to ...
7040 (libpthread: GLIBC_2.3.3): ... here.
7041 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7042
7043 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7044 Avoid shadowing VAL variable.
7045
7046 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7047 New macro.
7048
86a9ee5e
UD
70492003-03-18 Ulrich Drepper <drepper@redhat.com>
7050
ac9e0aa1
UD
7051 * Makefile (tests): Add tst-cond11.
7052 * tst-cond11.c: New file.
7053
a14b373c
UD
7054 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7055 struct passed to cleanup handler to eliminate one more
7056 instruction.
7057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7058
24a49f38
UD
7059 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7060 (pthrad_cond_t): Replace __unused field with __clock.
7061
7062 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7063 waken all waiters in cleanup handler.
7064 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7065 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7066
86a9ee5e
UD
7067 * pthread_condattr_getclock.c: New file.
7068 * pthread_condattr_setclock.c: New file.
7069 * sysdeps/pthread/pthread.h: Declare these new functions.
7070 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7071 * Makefile (libpthread-routines): Add the new functions.
7072 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7073 Renamed field to value. Document use of the bits.
7074 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7075 change.
7076 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 7077 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
7078 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7079 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7080 Add __clock field.
7081 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7082 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7083 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7084 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7085 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7086 Implement clock selection.
7087 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7088 * pthread-errnos.sym: Add ENOSYS.
7089 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7090 _POSIX_CLOCK_SELECTION.
7091 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7092
7093 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7094 invalid .size directive.
7095
98054a05
RM
70962003-03-17 Roland McGrath <roland@redhat.com>
7097
7098 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7099 Formatting tweaks.
7100
001bea71
UD
71012003-03-17 Ulrich Drepper <drepper@redhat.com>
7102
4773086e
UD
7103 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7104 Use __lll_add instead of spelling it out. Use protected symbol names.
7105 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7106 Use __lll_add.
7107 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7108 Renamed from lll_compare_and_swap. Use new name where necessary.
7109 (__lll_add): Defined.
7110 (__lll_dec_if_positive): Defined.
7111 (__lll_test_and_set): Defined.
7112 * sysdeps/ia64/pthread_spin_init.c: Removed.
7113 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7114 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7115 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7116 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7117 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7118 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7119 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
7120 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7121 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7122 __sync_lock_release_si.
7123 Patch by Jakub Jelinek.
7124
7125 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7126 Fix timeout handling.
7127 (__lll_timedwait_tid): Likewise.
7128 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7129 Patch by Jakub Jelinek.
7130
7131 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7132
de4471dd
RM
71332003-03-17 Roland McGrath <roland@redhat.com>
7134
7135 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7136 * sysdeps/pthread/pthread_spin_init.c: New file.
7137 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7138 * sysdeps/powerpc/Makefile: New file.
7139 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7140 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7141 * sysdeps/powerpc/pthreaddef.h: New file.
7142 * sysdeps/powerpc/tcb-offsets.sym: New file.
7143 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7144 * sysdeps/powerpc/tls.h: New file.
7145 * sysdeps/powerpc/bits/atomic.h: New file.
7146 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7147 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7148 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 7149
de4471dd
RM
7150 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7151 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7152 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7153 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7154 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7155 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7156 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7157 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7158 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7159 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7160 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7161 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7162 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7163 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7164 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7165
7166 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7167 not gettimeofday.
7168 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7169 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7170 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7171 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7172 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7173
5778033f
UD
71742003-03-17 Ulrich Drepper <drepper@redhat.com>
7175
7176 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7177 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7178 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7179 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7180 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7181
796038f8
RM
71822003-03-16 Roland McGrath <roland@redhat.com>
7183
7184 * tst-fork4.c: Include <string.h>.
7185 * tst-signal2.c: Likewise.
7186 * tst-mutex5.c (do_test): exit -> return.
7187 * tst-mutex2.c: Include <stdlib.h>.
7188
51d0678c
UD
71892003-03-16 Ulrich Drepper <drepper@redhat.com>
7190
5778033f
UD
7191 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7192 (__lll_mutex_timedlock_wait): Correct expected value after
7193 spurious wakeup. Otherwise we would never wait again.
7194
b6e2f87a
UD
7195 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7196 zone versus inline asm stupidity. Use correct instructions.
7197
51d0678c
UD
7198 * tst-rwlock6.c: Add some more status output.
7199
8112cc70
RM
72002003-03-15 Roland McGrath <roland@redhat.com>
7201
7202 * sysdeps/pthread/configure.in: New file.
7203 * sysdeps/pthread/configure: New file (generated).
7204
49773c19
UD
72052003-03-15 Ulrich Drepper <drepper@redhat.com>
7206
7207 * allocatestack.c (allocate_stack): Store the exact stack size of
7208 user allocated stacks.
7209
eec0ca9f
JJ
72102003-03-15 Jakub Jelinek <jakub@redhat.com>
7211
7212 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7213 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7214 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7215 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7216 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7217 Use `header.' prefix.
7218 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7219
a87731e2
UD
72202003-03-15 Ulrich Drepper <drepper@redhat.com>
7221
7222 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7223 __builtin_frame_address, use stack pointer.
7224
7225 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7226 instead of __builtin_frame_pointer.
7227
e22a221d
UD
72282003-03-14 Ulrich Drepper <drepper@redhat.com>
7229
92ed3daf
UD
7230 * tst-basic1.c (do_test): Add cast to avoid warning.
7231 * tst-basic2.c (do_test): Likewise.
7232
9b89567d
UD
7233 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7234 amount of stack correction.
7235
e22a221d
UD
7236 * tst-fork4.c: Use test-skeleton.c.
7237
2e49caba
RM
72382003-03-14 Roland McGrath <roland@redhat.com>
7239
7240 * init.c: Fix typo "#eli" for "#else".
7241
415ef7d8
RM
72422003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7243
7244 * allocatestack.c (__stack_user): Use hidden_data_def.
7245 * pthread_create.c (__pthread_keys): Likewise.
7246
7247 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7248
52287505
RM
72492003-03-14 Roland McGrath <roland@redhat.com>
7250
415ef7d8
RM
7251 * tst-fork4.c: New file.
7252 * Makefile (tests): Add it.
7253
52287505
RM
7254 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7255 we always define the padding space.
7256 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7257 stopped supporting its own extensions fully.
7258 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7259 struct also called `header', so `header.multiple_threads' is the field
7260 name to use on all machines.
7261 * allocatestack.c (allocate_stack): Use `header.' prefix.
7262 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7263 * pthread_create.c (__pthread_create_2_1): Likewise.
7264 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7265 (THREAD_SELF): Likewise.
7266 * sysdeps/x86_64/tls.h: Likewise.
7267 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7268 (SINGLE_THREAD_P): Likewise.
7269 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7270 (SINGLE_THREAD_P): Likewise.
7271 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7272 (SINGLE_THREAD_P): Likewise.
7273
7274 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7275 value directly.
7276
c44bf9aa
UD
72772003-03-14 Ulrich Drepper <drepper@redhat.com>
7278
e22a221d
UD
7279 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7280 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7281
0eb18281
UD
7282 * pthread_create.c (start_thread): setjmp is expected to return 0.
7283
c44bf9aa
UD
7284 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7285 (THREAD_GETMEM_NC): Likewise.
7286
564cd8b6
UD
72872003-03-13 Ulrich Drepper <drepper@redhat.com>
7288
7289 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7290 and the size of the stack which must be allocated is a multiple,
7291 allocate one more page.
7292 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7293 MULTI_PAGE_ALIASING.
7294
6461e577
RM
72952003-03-13 Roland McGrath <roland@redhat.com>
7296
7297 * pthread_create.c (start_thread): Set EXITING_BIT after the
7298 event-reporting (and destructors), not before.
7299
b5ec5617
UD
73002003-03-13 Jakub Jelinek <jakub@redhat.com>
7301
6461e577
RM
7302 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7303 lll_futex_wake): Declare register variables as long int instead of
7304 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7305 Make syscall arguments clobbered by the syscall.
7306 (lll_futex_wait): Define using lll_futex_timed_wait.
7307
7308 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7309 to void *.
7310
7311 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7312 PPID if [! NDEBUG].
7313
7314 * allocatestack.c (nptl_ncreated): Only declare if
7315 COLORING_INCREMENT != 0.
7316
7317 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7318 (__libc_enable_asynccancel_2): Remove prototype.
7319
b5ec5617
UD
7320 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7321 ctid to match kernel.
7322
d0369fb8
UD
73232003-03-12 Ulrich Drepper <drepper@redhat.com>
7324
7588880f
UD
7325 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7326 libc_multiple_threads.
7327 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7328 __libc_multiple_threads to...
7329 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
7330
7331 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7332 versioning.
7333 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7334 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7335
7336 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7337 (__pthread_once_internal): Define.
7338
7339 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7340 macros instead of .symver directly.
7341 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7342 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7343
d0369fb8
UD
7344 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7345 * sysdeps/x86_64/tcb-offsets.sym: New file.
7346 * sysdeps/x86_64/Makefile: New file.
7347
7348 * sysdeps/i386/tcb-offsets.sym: Add SELF.
7349 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7350 to access own pthread_t in TCB.
7351 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7352 Likewise.
7353 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7354 Likewise.
7355 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7356
0bb2ac85
RM
73572003-03-12 Roland McGrath <roland@redhat.com>
7358
7359 * pthread-errnos.sym: New file.
7360 * Makefile (gen-as-const-headers): New variable, list that file.
7361 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7362 header <pthread-errnos.h> instead of defining errno values here.
7363 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7364 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7365 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7366 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7367 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7368 Likewise.
7369 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7370 Likewise.
7371 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7373 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7374 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7375 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7376 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7377 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7378 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7379 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7380 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7381 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7382 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7383 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7384 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7385 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7386 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7387 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7388 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7389 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7390 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7391 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7392 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7393 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7394 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7395 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7396 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7397 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7398
7399 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7400 CLONE_CHILD_SETTID worked.
7401
35e148cb
UD
74022003-03-12 Ulrich Drepper <drepper@redhat.com>
7403
d0369fb8
UD
7404 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7405 file.
7406 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7407 file.
7408
7409 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7410 (pthread_cond_t): Add padding.
7411
da49194d
UD
7412 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7413 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7414 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7415
35e148cb
UD
7416 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7417 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7418 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7419 (__pthread_rwlock_timedrdlock): Likewise.
7420 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7421 (__pthread_rwlock_wrlock): Likewise.
7422 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7423 (__pthread_rwlock_rdlock): Likewise.
7424
7425 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7426
7427 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7428 result of lock re-get if it fails.
7429
3e976b96
UD
74302003-03-11 Ulrich Drepper <drepper@redhat.com>
7431
5a03acfe
UD
7432 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7433 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7434 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7435 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7436 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7437 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7438 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7439 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7440 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7441 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7442
7443 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7444 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7445
7446 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7447 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7448 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7449 (create_thread): Likewise.
7450 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7451 * init.c (__pthread_initialize_minimal_internal): Initialize
7452 __libc_multiple_threads_ptr if necessary.
7453 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
7454 __pthread_multiple_threads and __libc_multiple_threads_ptr.
7455 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7456 __libc_multiple_threads.
7457 (__libc_pthread_init): Return pointer to __libc_pthread_init if
7458 necessary.
7459
7460 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7461 (THREAD_SETMEM_NC): Likewise.
7462
7463 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7464 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7465 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7466 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7467
7468 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7469 Eliminate one entire instruction.
7470
32a589b1
UD
7471 * cancellation.c (__pthread_enable_asynccancel_2): New function.
7472 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7473 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7474 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7475 instead of __pthread_enable_asynccancel.
7476 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7477 (__pthread_cond_wait): Likewise.
7478 * sysdeps/pthread/pthread_cond_timedwait.c
7479 (__pthread_cond_timedwait): Likewise.
7480 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7481
3e976b96
UD
7482 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7483 (__condvar_cleanup): Wake up all waiters in case we got signaled
7484 after being woken up but before disabling asynchronous
7485 cancellation.
7486 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7487 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7488 (__condvar_cleanup): Likewise.
7489
7490 * init.c (__NR_set_tid_address): If already defined, don't redefine.
7491 Make it an error if architecture has no #if case. Add x86-64.
7492
7493 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7494 pt-initfini.s generation.
7495
7496 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7497 (TLS_INIT_TP): Fix typo.
7498
6c477888
UD
74992003-03-11 Jakub Jelinek <jakub@redhat.com>
7500
7501 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7502 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7503
7504 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7505 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7506 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7507 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7508 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7509 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7510 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7511 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7512
ea694823
UD
75132003-03-11 Ulrich Drepper <drepper@redhat.com>
7514
6c477888
UD
7515 * sysdeps/pthread/pthread_cond_timedwait.c
7516 (__pthread_cond_timedwait): Return the result of the final
7517 locking. If it succeeds, the regular function return value.
7518
7519 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7520 Return result of the final locking.
7521 * version.c (__nptl_main): Work around problems with the strange
7522 INTERNAL_SYSCALL macro on ppc32.
7523 * init.c (__pthread_initialize_minimal_internal): Unblock
7524 SIGCANCEL in case the parent blocked it.
7525 Reported by Paul Mackerras <paulus@samba.org>.
7526
ea694823
UD
7527 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7528 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7529 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7530
b33e6163
RM
75312003-03-11 Jakub Jelinek <jakub@redhat.com>
7532
7533 * sysdeps/pthread/pthread_cond_timedwait.c
7534 (__pthread_cond_timedwait): Unlock and fail if
7535 __pthread_mutex_unlock_internal failed.
7536
7537 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7538 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7539 Use ARCH_CLONE.
7540 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7541 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7542 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7543 ALLOCATE_STACK): New macros.
7544 (TLS_TPADJ): New macro.
7545 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7546 (allocate_stack): Handle TLS_DTV_AT_TP and
7547 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
7548 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7549 Don't set PD->self.
7550 * init.c [__ia64__] (__NR_set_tid_address): Define.
7551
7552 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7553 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7554 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7555 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7556 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7557 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7558 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7559 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7560 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7561 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7562 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7563 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7564 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7565 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7566 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7567 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7568 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7569 * sysdeps/ia64/bits/atomic.h: New file.
7570 * sysdeps/ia64/Makefile: New file.
7571 * sysdeps/ia64/pthread_spin_init.c: New file.
7572 * sysdeps/ia64/pthread_spin_lock.c: New file.
7573 * sysdeps/ia64/pthread_spin_trylock.c: New file.
7574 * sysdeps/ia64/pthread_spin_unlock.c: New file.
7575 * sysdeps/ia64/pthreaddef.h: New file.
7576 * sysdeps/ia64/tcb-offsets.sym: New file.
7577 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7578 * sysdeps/ia64/tls.h: New file.
7579
7580 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7581 to syscall instead of no arguments.
7582
2b30b2e5
UD
75832003-03-10 Ulrich Drepper <drepper@redhat.com>
7584
db5f2fc9
UD
7585 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7586 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7587 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7588 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7589
7590 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7591 unused code.
7592
6a4263e3
UD
7593 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7594
3de7c2a9
UD
7595 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7596 lowlevelbarrier.sym.
7597 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7598 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7599 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 7600 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 7601
2a544d82
UD
7602 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
7603 (__lll_mutex_lock_wait): Reverse order of first two parameters.
7604 (__lll_mutex_timedlock_wait): Likewise.
7605 (lll_mutex_lock): Adjust asm for that.
7606 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
7607 (lll_lock): Adjust asm for operand order change.
7608 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
7609 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
7610
ec06436c
UD
7611 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
7612 Reverse order of parameters.
7613 (__lll_timedwait_tid): Remove regparms attribute.
7614 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
7615 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
7616
3273832c
UD
7617 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7618 (__lll_timedwait_tid): Remove one unnecessary instruction.
7619
51f32ab8
UD
7620 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
7621 __lll_mutex_timedlock_wait only for NOT_IN_libc.
7622 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
7623 lowlevelmutex.S.
7624
7625 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
7626 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
7627 for NOT_IN_libc.
7628 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
7629 lowlevellock.S.
7630
fad48d9e
UD
7631 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
7632 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
7633 for libc.so.
7634 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
7635 define LOCK here (if UP is not defined). The actual code is in
7636 lowlevelmutex.S.
7637
9356d063
UD
7638 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
7639 LOCK is already defined. Don't define lll_unlock_wake_cb and
7640 __lll_timedwait_tid for libc.so.
7641 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
7642 define LOCK here (if UP is not defined). The actual code is in
7643 lowlevellock.S.
7644
ebf0cbc5 7645 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
7646 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
7647 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
7648 instead of lowlevelsem.h.
7649 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7650 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7651 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 7652
c915e5ad
UD
7653 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7654 lowlevelrwlock.sym.
7655 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
7656 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 7657 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 7658
4c3c2e8a
UD
7659 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
7660 register loading.
7661 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
7662 last changed. D'oh.
7663
2b30b2e5
UD
7664 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
7665
7666 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
7667 of __libc_locking_needed.
7668 (lll_trylock): Initialize %eax to zero.
7669
2b30b2e5
UD
7670 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
7671 pthread_cond_t definition.
7672
e48f9638
RM
76732003-03-10 Roland McGrath <roland@redhat.com>
7674
7675 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
7676 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
7677 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
7678 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
7679 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
7680
7681 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
7682 Instead of setting PD->multiple_threads, set globals
7683 __pthread_multiple_threads and __libc_multiple_threads.
7684 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7685 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
7686 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
7687
7688 * descr.h (struct pthread): Conditionalize first member on
7689 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
7690 containing an anonymous tcbhead_t. Move `list' member out.
7691 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
7692 * allocatestack.c: Remove use of `header.data.' prefix.
7693 * pthread_create.c: Likewise.
7694 * init.c (__pthread_initialize_minimal_internal): Likewise.
7695 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7696 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
7697 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
7698 * sysdeps/x86_64/tls.h: Likewise.
7699 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7700 (SINGLE_THREAD_P): Likewise.
7701 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7702 (SINGLE_THREAD_P): Likewise.
7703 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
7704 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
7705
c37cae9e
UD
77062003-03-09 Ulrich Drepper <drepper@redhat.com>
7707
d38c777e
RM
7708 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
7709
7b44a5e0 7710 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 7711 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 7712
c2e5e085
UD
7713 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
7714 leftovers from the ia32 code.
7715
7716 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
7717 memory load.
7718 (clear_once_control): Don't load %esi.
7719
7720 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
7721 handling.
7722
7723 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7724
cd4b2a55
UD
7725 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
7726 * sysdeps/unix/sysv/linux/createthread.c: ...here.
7727
c37cae9e
UD
7728 * Makefile (tests): Add tst-cond10.
7729 * tst-cond10.c: New file.
7730
d130a341
UD
77312003-03-08 Ulrich Drepper <drepper@redhat.com>
7732
ccf1d573
UD
7733 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
7734 * tst-signal3.c (do_test): Likewise.
7735 * tst-sem5.c (do_test): Likewise.
7736 * tst-kill6.c (do_test): Likewise.
7737 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
7738
7739 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
7740 of inc/dec.
7741 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
7742 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
7743 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7744 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7745 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7746 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7747 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7748 Likewise.
7749 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7750 Likewise.
7751 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7752 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7753 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7754 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7755 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7756 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
7757 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7758 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7759
d130a341
UD
7760 * allocatestack.c (allocate_stack): If mprotect() fails free the
7761 TLS memory.
7762
bc6389ad
UD
77632003-03-07 Ulrich Drepper <drepper@redhat.com>
7764
41d4d223
UD
7765 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
7766
7767 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
7768 lll_wake_tid. This was used only to work around kernel limits in
7769 the early days.
7770 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
7771 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
7772 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7773 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
7774
bc6389ad
UD
7775 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
7776 (__pthread_initialize_minimal_internal): Change initialization of
7777 __static_tls_align_m1 appropriately.
7778 * pthreadP.h (__static_tls_align_m1): Renamed from
7779 __static_tls_align.
7780 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
7781 instead of __static_tls_align-1.
7782
cc775edf
UD
77832003-03-04 Ulrich Drepper <drepper@redhat.com>
7784
0de28d5c 7785 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 7786
518b5308
UD
7787 * pthread_create.c: Define __pthread_keys using nocommon
7788 attribute, not by placing it explicitly in bss.
7789 Remove DEFINE_DEALLOC definition. Not needed anymore.
7790
7791 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
7792 Use it in mmap call to allocate stacks.
7793
7794 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
7795
cc775edf
UD
7796 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
7797 result of the thread function.
7798
4f6f0a8f
UD
77992003-03-03 Ulrich Drepper <drepper@redhat.com>
7800
f04a2721
UD
7801 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
7802 version is just fine.
7803
4f6f0a8f
UD
7804 * sysdeps/unix/sysv/linux/libc_pthread_init.c
7805 (__pthread_child_handler): Renamed from pthread_child_handler,
7806 exported, and marked hidden. Change all users.
7807 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
7808 free __pthread_child_handler from child list.
7809
7ce5c164
UD
78102003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
7811
7812 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
7813
7814 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7815 Fix handling of cancellation and failing pthread_mutex_unlock call.
7816 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7817 (__pthread_cond_wait): Likewise.
7818
7819 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
7820 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
7821 lll_futex_timed_wait call.
7822 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
7823 (pthread_rwlock_timedwrlock): Likewise.
7824
7825 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7826 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
7827 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
7828
7829 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
7830 check of lll_futex_wake return value.
7831
ea6a015b
RM
78322003-03-03 Roland McGrath <roland@redhat.com>
7833
7834 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
7835
7836 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
7837 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
7838 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
7839
4adacf57
UD
78402003-03-02 Ulrich Drepper <drepper@redhat.com>
7841
1be3d664
UD
7842 * sysdeps/pthread/timer_create.c (timer_create): Return correct
7843 error for CPU clocks.
7844
885bafa1
UD
7845 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7846 _POSIX_MONOTONIC_CLOCK.
7847 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7848
4adacf57
UD
7849 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
7850 recent kernels.
7851
86bfff4d
UD
78522003-03-01 Ulrich Drepper <drepper@redhat.com>
7853
7854 * descr.h (struct pthread): Move cleanup field to the front.
7855
d1149385
RM
78562003-03-01 Roland McGrath <roland@redhat.com>
7857
7858 * sem_open.c (sem_open): Braino fix.
7859
bd8bb78b
UD
78602003-03-01 Ulrich Drepper <drepper@redhat.com>
7861
748bec08
UD
7862 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
7863 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
7864 __pthread_cleanup_pop functionality.
7865 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7866
bd8bb78b
UD
7867 * descr.h (struct pthread): Move tid field to the front now that
7868 it is often used.
7869
7870 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
7871 (__lll_mutex_timedlock_wait): Remove.
7872 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
7873 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7874 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
7875 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7876 (lll_unlock_wake_cb): Don't save and restore %esi.
7877 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
7878 %esi.
7879 (__lll_timedwait_tid): Add alignment.
7880 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
7881 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
7882 %esi.
7883 (__lll_timedwait_tid): Removed.
7884 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7885 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
7886 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7887 (pthread_barrier_wait): Don't save, load, and restore %esi for
7888 last thread.
7889 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7890 (__pthread_cond_signal): Don't save, load, and restore %esi.
7891 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
7892 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
7893 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
7894 Don't save, load, and restore %esi.
7895
d2637c70
UD
78962003-02-27 Ulrich Drepper <drepper@redhat.com>
7897
567fb22a
UD
7898 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
7899 Release lock before waking up the waiters.
7900
427f5fa1
UD
7901 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
7902
a2d83cfb
UD
7903 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
7904 (reader_thread): Likewise.
7905
d2637c70
UD
7906 * sysdeps/pthread/pthread_rwlock_unlock.c
7907 (__pthread_rwlock_unlock): Release internal lock early. Don't try
7908 to wake up readers if there are none.
7909
7910 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
7911 Release internal lock before wake threads.
7912
b1531183
UD
79132003-02-26 Ulrich Drepper <drepper@redhat.com>
7914
dbf6131c
UD
7915 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
7916 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
7917 predefined.
7918 * tst-rwlock9.c: Likewise.
7919 * tst-rwlock10.c: New file.
7920 * tst-rwlock11.c: New file.
7921
695799fe
UD
7922 * Makefile (tests): Add tst-dlsym1.
7923 * tst-dlsym1.c: New file.
7924
b1531183
UD
7925 * init.c (__pthread_initialize_minimal_internal): Set
7926 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
7927 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
7928
3724f268
UD
79292003-02-24 Ulrich Drepper <drepper@redhat.com>
7930
3857ca78
UD
7931 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
7932
80d80779
UD
7933 * tst-cond2.c: Fix sychronization with child.
7934
86371308
UD
7935 * tst-rwlock8.c (reader_thread): Remove unused variable.
7936
ffeb4481
UD
7937 * Makefile: Add rules to build and run tst-tls3.
7938 * tst-tls3.c: New file.
7939 * tst-tls3mod.c: New file.
7940
3724f268
UD
7941 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
7942 * tst-rwlock8.c: New file.
7943 * tst-rwlock9.c: New file.
7944 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
7945 complete broken rwlock implementation.
7946 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7947 Likewise.
7948 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7949 Likewise.
7950 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7951 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
7952 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7953 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7954 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7955 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
7956 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 7957
8915cc40
RM
79582003-02-23 Roland McGrath <roland@redhat.com>
7959
7960 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
7961
fd1a0d0c
UD
79622003-02-23 Ulrich Drepper <drepper@redhat.com>
7963
ecf28959
UD
7964 * Makefile (tests): Add tst-context1.
7965 * tst-context1.c: New file.
7966
5e47b76b
UD
7967 * Makefile (tests): Add tst-tls1 and tst-tls2.
7968 * tst-tls1.c: New file.
7969 * tst-tls2.c: New file.
7970
5a6bbb41
UD
7971 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
7972 for failed cmpxchg.
7973
fd1a0d0c
UD
7974 * pthread_create.c (start_thread): Set EXITING_BIT early.
7975
7976 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
7977 (THREAD_GETMEM_NC): Likewise.
7978
757f9fcb
UD
79792003-02-22 Ulrich Drepper <drepper@redhat.com>
7980
b1b8e747
UD
7981 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
7982 off 3 more bytes by using offset-less instructions when possible.
7983
c780aa21 7984 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
7985
7986 * eintr.c (eintr_source): Add unnecessary return but the compiler
7987 insists.
7988
7989 * tst-kill3.c: Include <unistd.h>.
7990
5148559c
RM
79912003-02-21 Roland McGrath <roland@redhat.com>
7992
7993 * pthread_create.c (start_thread): Call __libc_thread_freeres.
7994
ab2d98e3
UD
79952003-02-21 Ulrich Drepper <drepper@redhat.com>
7996
71028edd
UD
7997 * Makefile (tests): Add tst-eintr1.
7998 (distribute): Add eintr.c.
7999 * tst-eintr1.c: New file.
8000 * eintr.c: New file.
8001
e814f748
UD
8002 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8003
8004 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8005 Disallow sending SIGCANCEL.
8006
ab2d98e3 8007 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 8008 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
8009 * tst-kill1.c: New file.
8010 * tst-kill2.c: New file.
8011 * tst-kill3.c: New file.
8012 * tst-kill5.c: New file.
9c03686d 8013 * tst-kill6.c: New file.
e814f748
UD
8014 * tst-basic7.c: Renamed to...
8015 * tst-kill4.c: ...this.
ab2d98e3 8016
59fed0e2
RM
80172003-02-21 Roland McGrath <roland@redhat.com>
8018
8019 * Makefile (install-lib-ldscripts): New variable.
8020
49dc759f
UD
80212003-02-21 Ulrich Drepper <drepper@redhat.com>
8022
8c2e9a29
UD
8023 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8024 * pthread_cancel.c: Use INVALID_TD_P.
8025 * pthread_detach.c: Likewise.
8026 * pthread_getschedparam.c: Likewise.
8027 * pthread_setschedparam.c: Likewise.
8028 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8029 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8030 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8031 * pthread_timedjoin.c: Likewise.
8032
8033 * tst-basic7.c: Include <signal.h>.
8034
49dc759f
UD
8035 * pthread_join.c (pthread_join): Limited checking for invalid
8036 descriptors.
8037 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8038
df5803bf
UD
80392003-02-20 Ulrich Drepper <drepper@redhat.com>
8040
c5acd3d7
UD
8041 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8042 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
8043 * Makefile (tests): Add tst-key4.
8044 * tst-key4.c: New file.
8045
729924a0
UD
80462003-02-18 Ulrich Drepper <drepper@redhat.com>
8047
2f7dc594
UD
8048 * Makefile (tests): Add tst-basic7.
8049 * tst-basic7.c: New file.
8050
ba25bb0f
UD
8051 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8052 Add some more __builtin_expect.
8053
12fd3c5f 8054 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 8055
5430d926
UD
80562003-02-17 Ulrich Drepper <drepper@redhat.com>
8057
b0db7fbe
UD
8058 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8059 _POSIX_THREAD_PRIORITY_SCHEDULING.
8060 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8061 _XOPEN_REALTIME_THREADS.
8062 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8063
8064 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8065 kernel returns EINVAL for PID <= 0, work around it.
8066
ecfda9bd
UD
8067 * Makefile (tests): Add tst-signal5.
8068 * tst-signal5.c: New file.
8069
7d78ab99
UD
8070 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8071 and LOGIN_NAME_MAX.
8072
371a2972
UD
8073 * tst-cancel1.c (tf): Block all signals.
8074
5430d926
UD
8075 * Makefile (tests): Add tst-basic6.
8076 * tst-basic6.c: New file.
8077
8078 * tst-basic1.c: Add test for process ID.
8079
8080 * Makefile (tests): Add tst-cancel10.
8081 * tst-cancel10.c: New file.
8082
8083 * Makefile (tests): Add tst-signal4.
8084 * tst-signal4.c: New file.
8085
8086 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8087 __sigismember instead of sigismember. Add __builtin_expect.
8088
1564916a
UD
80892003-02-16 Ulrich Drepper <drepper@redhat.com>
8090
179ff175
UD
8091 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8092 pthread_setcancelstate, and pthread_rwlock_setpshared.
8093
e4335f9a
UD
8094 * tst-cancel7.c (do_test): Make sure the pid file exists before
8095 canceling the thread.
8096
0a37669a
UD
8097 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8098 pthread_rwlock_timedrdlock tests.
8099 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8100 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8101 Check for invalid tv_nsec field.
8102 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8103 Likewise.
8104
8105 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8106 recursive mutex of overflow.
8107
8108 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8109
e4335f9a 8110 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
8111 going into an endless loop.
8112 * Makefile (tests): Add tst-cancel9.
8113 * tst-cancel9.c: New file.
8114
8115 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8116
b270b548
UD
81172003-02-15 Ulrich Drepper <drepper@redhat.com>
8118
1c82b97f
UD
8119 * tst-mutex5.c (do_test): Add more timedlock tests.
8120
b2f05465 8121 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
8122 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8123
e798b60f
UD
8124 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8125 use INLINE_SYSCALL. Error number is returned, not -1.
8126
90491dc4
UD
8127 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8128 and __deallocate_stack with internal_function.
8129 * pthread_create.c: Adjust definitions appropriately.
8130 * allocatestack.c: Likewise.
8131
8132 * pthread_join.c: Add one more __builtin_expect.
8133 * pthread_timedjoin.c: Likewise.
8134
8135 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8136 not data of sequence number does not match.
8137 Add one __builtin_expect.
8138
c6247c9d
UD
8139 * Makefile (tests): Add tst-clock1.
8140 * tst-clock1.c: New file.
8141
b270b548
UD
8142 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8143 negative arguments.
8144 * Makefile (tests): Add tst-basic5.
8145 * tst-basic5.c: New file.
8146
700bf7af
UD
81472003-02-14 Ulrich Drepper <drepper@redhat.com>
8148
757de559
UD
8149 * Makefile (tests): Add tst-basic4.
8150 * tst-basic4.c: New file.
8151
47202270
UD
8152 * pthreadP.h: Add declaraction for __nptl_nthreads.
8153 * pthread_create.c: Define __nptl_nthreads
8154 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 8155 after thread is done. If then zero, call exit(0).
47202270
UD
8156 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8157 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8158 * init.c (pthread_functions): Initialize ptr_nthreads.
8159 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8160 (__reclaim_stacks): Decrement __nptl_nthreads.
8161 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8162 Define.
8163 * Makefile (tests): Add tst-basic3.
8164 * tst-basic3.c: New file.
8165
e320ef46
UD
8166 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8167 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8168 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8169 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8170 if asynchronous canceling is enabled.
8171 * pthread_join.c (pthread_join): When recognizing circular joins,
8172 take into account the other thread might be already canceled.
8173 * Makefile (tests): Add tst-join5.
8174 * tst-join5.c: New file.
8175
700bf7af
UD
8176 * Makefile (tests): Add tst-join4.
8177 * tst-join4.c: New file.
8178
81792003-02-13 Ulrich Drepper <drepper@redhat.com>
8180
8181 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8182
dac0f772
UD
81832003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8184
8185 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8186 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8187 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8188 warning.
8189 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8190 to avoid warning.
8191 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8192 error if lll_futex_wake failed.
8193
e8cda341
UD
81942003-02-13 Ulrich Drepper <drepper@redhat.com>
8195
a7720b5e
UD
8196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8197 handling of cancellation and failung pthread_mutex_unlock call.
8198 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8199 * Makefile (tests): Add tst-cond8 and tst-cond9.
8200 * tst-cond8.c: New file.
8201 * tst-cond9.c: New file.
8202
a1ea4c06
UD
8203 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8204
8205 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8206 non-standard initializers with __USE_GNU.
8207
e8cda341
UD
8208 * Makefile (tests): Add tst-cleanup3.
8209 * tst-cleanup3.c: New file.
8210
2067577c
UD
82112003-02-12 Ulrich Drepper <drepper@redhat.com>
8212
89e78a95
UD
8213 * Makefile (tests): Add tst-attr1 and tst-attr2.
8214 * tst-attr1.c: New file.
8215 * tst-attr2.c: New file.
8216
dfdd294a
UD
8217 * Makefile: Add rules to build and run tst-atfork2 test.
8218 * tst-atfork2.c: New file.
8219 * tst-atfork2mod.c: New file.
8220
8221 * sysdeps/unix/sysv/linux/unregister-atfork.c
8222 (__unregister_atfork): Free the memory allocated for the handlers
8223 after removing them from the lists.
8224
8225 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8226 cleanup function.
8227
8228 * tst-atfork1.c (do_test): Wait for the child we forked.
8229 Report error in child.
8230
8231 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8232
2067577c
UD
8233 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8234
2a8a8a84
UD
82352003-02-10 Ulrich Drepper <drepper@redhat.com>
8236
d9dd121e
UD
8237 * Makefile (tests): Add tst-cancel8.
8238 * tst-cancel8.c: New file.
8239
2a8a8a84
UD
8240 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8241 clearing of control variable.
defd1870 8242 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 8243 * tst-once3.c: New file.
defd1870 8244 * tst-once4.c: New file.
2a8a8a84 8245
a54e8d33
UD
82462003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8247
8248 * sysdeps/sh/Makefile: New file.
8249 * sysdeps/sh/bits/atomic.h: New file.
8250 * sysdeps/sh/pthread_spin_init.c: New file.
8251 * sysdeps/sh/pthread_spin_lock.c: New file.
8252 * sysdeps/sh/pthread_spin_trylock.S: New file.
8253 * sysdeps/sh/pthread_spin_unlock.S: New file.
8254 * sysdeps/sh/pthreaddef.h: New file.
8255 * sysdeps/sh/tcb-offsets.sym: New file.
8256 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8257 * sysdeps/sh/tls.h: New file.
8258 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8259 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8260 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8261 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8262 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8263 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8264 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8265 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8266 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8267 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8268 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8269 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8270 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8271 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8272 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8273 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8274 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8275 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8276 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8277 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8278 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8279 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8280 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8281 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8282 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8283 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8284 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8285 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8286 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8287 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8288
696e556e
UD
82892003-02-08 Ulrich Drepper <drepper@redhat.com>
8290
8291 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8292 according to POSIX.
8293
8294 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8295
fef710d6
UD
82962003-02-07 Ulrich Drepper <drepper@redhat.com>
8297
c6180643
UD
8298 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8299 (TLS_GET_FS): New #define.
8300 (TLS_SET_FS): New #define.
8301 Correct value of __NR_set_thread_area.
8302
fef710d6
UD
8303 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8304
11090a99
UD
83052003-02-06 Ulrich Drepper <drepper@redhat.com>
8306
65c68990
UD
8307 * Makefile (tests): Add tst-popen1.
8308 * tst-popen1.c: New file.
8309
11090a99
UD
8310 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8311 but inactive generalization.
8312 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8313 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8314 Minor optimization, remove one instruction.
8315 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8316
a88c9263
UD
83172003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8318
8319 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8320
83212003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8322
8323 * init.c (__NR_set_tid_address): Add #ifdef for s390.
8324 * sysdeps/pthread/pthread_barrier_wait.c: New file.
8325 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8326 * sysdeps/pthread/pthread_cond_signal.c: New file.
8327 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8328 * sysdeps/pthread/pthread_cond_wait.c: New file.
8329 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8330 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8331 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8332 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8333 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8334 * sysdeps/s390/Makefile: New file.
8335 * sysdeps/s390/bits/atomic.h: New file.
8336 * sysdeps/s390/pthread_spin_init.c: New file.
8337 * sysdeps/s390/pthread_spin_lock.c: New file.
8338 * sysdeps/s390/pthread_spin_trylock.c: New file.
8339 * sysdeps/s390/pthread_spin_unlock.c: New file.
8340 * sysdeps/s390/pthreaddef.h: New file.
8341 * sysdeps/s390/tcb-offsets.sym: New file.
8342 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8343 * sysdeps/s390/tls.h: New file.
8344 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8345 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8346 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8347 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8348 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8349 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8350 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8351 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8352 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8353 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8354 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8355 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8356 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8357 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8358 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8359 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8360 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8361 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8362 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8363 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8364 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8365 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8366 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8367
6f1cff95
UD
83682003-02-04 Ulrich Drepper <drepper@redhat.com>
8369
ec609a8e
UD
8370 * atomic.h: Add a couple more default implementations.
8371 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
8372 __arch_compare_and_exchange_32_acq in return value definition. It
8373 always exists.
8374 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 8375 Add missing atomic_ prefixes.
e3ec8904 8376
6f1cff95
UD
8377 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8378 thread library is available, use correct value to mark initialized
8379 once variable.
8380
4f088329
UD
83812003-02-03 Ulrich Drepper <drepper@redhat.com>
8382
6f1cff95
UD
8383 * allocatestack.c (allocate_stack): Use __getpagesize instead of
8384 __sysconf to determine pagesize.
8385
3e4fc359 8386 * pthread_create.c: Include <atomic.h>.
4f088329
UD
8387 * allocatestack.c (allocate_stack): Implement coloring of the
8388 allocated stack memory. Rename pagesize to pagesize_m1. It's the
8389 size minus one. Adjust users.
3e4fc359 8390 * sysdeps/i386/i686/Makefile: New file.
4f088329 8391
2f42e8be
UD
83922003-02-02 Ulrich Drepper <drepper@redhat.com>
8393
4301f7e2
UD
8394 * allocatestack.c: Improve comment throughout the file.
8395
2f42e8be 8396 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 8397 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
8398 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8399 (__lll_lock_wait): Likewise.
8400 (lll_unlock_wake_cb): Removed.
8401
4a7d6545
UD
84022003-01-31 Ulrich Drepper <drepper@redhat.com>
8403
8404 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8405 _POSIX_THREAD_PRIORITY_SCHEDULING.
8406
886d5973
UD
84072003-01-30 Jakub Jelinek <jakub@redhat.com>
8408
8409 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8410 Fix return type of ptr___pthread_getspecific.
8411
e474ca78
UD
84122003-01-29 Ulrich Drepper <drepper@redhat.com>
8413
8414 * Makefile (tests): Add tst-umask1.
8415 (tst-umask1-ARGS): Define.
8416 * tst-umask1.c: New file.
8417
e6ebd2e4
UD
84182003-01-28 Ulrich Drepper <drepper@redhat.com>
8419
6cf26f41
UD
8420 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
8421 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8422 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8423 pthread_rwlock_unlock.
8424 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8425 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8426 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8427 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8428 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8429 New file.
8430 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8431 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8432 New file.
8433 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8434 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8435 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8436 New file.
8437 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8438 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8439 New file.
8440 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8441 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8442 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8443 New file.
8444 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8445 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8446 New file.
8447 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8448
1d087a7e
UD
8449 * Makefile (libpthread-routines): Remove lowlevelcond and
8450 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8451 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8452 and pthread_cond_broadcast.
4a99d160
UD
8453 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8454 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8455 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8456 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8457 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8458 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8459 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8460 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8461 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8462 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8463 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8464 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8465 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8466 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8467 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8468 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8469 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8470 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8471 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8472 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8473 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8474 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8475 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8476 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8477 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8478 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8479 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8480 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8481 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8482 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8483 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 8484
e6ebd2e4
UD
8485 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8486 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
8487 of the code is moved to ...
8488 * sysdeps/pthread/createthread.c: ...here. New file.
8489
a15698cb
UD
84902003-01-27 Ulrich Drepper <drepper@redhat.com>
8491
0566b130
UD
8492 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8493 (__new_sem_post): Clear %eax before returning.
8494 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8495
e6fb8846
UD
8496 * Makefile (tests): Add tst-cleanup2.
8497 * tst-cleanup2.c: New file.
8498
a15698cb
UD
8499 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8500 Interpret first parameter correctly.
8501
8824b0a1
UD
85022003-01-17 Ulrich Drepper <drepper@redhat.com>
8503
8504 * Makefile (headers): Add bits/semaphore.h.
8505
850dcfca
UD
85062003-01-16 Jakub Jelinek <jakub@redhat.com>
8507
8508 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8509 if not SHARED.
8510
574b892e
UD
85112003-01-14 Ulrich Drepper <drepper@redhat.com>
8512
a8d87c92
UD
8513 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8514 must be used and mapping failed.
8515 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8516
574b892e
UD
8517 * Makefile (CFLAGS-pthread_self.os): Define this, not
8518 CFLAGS-pthread_self.c.
8519
fb48047a
UD
85202003-01-13 Ulrich Drepper <drepper@redhat.com>
8521
47805511
UD
8522 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8523 lll_unlock_wake_cb.
8524
fb48047a
UD
8525 * Makefile (libpthread-routines): Add version. Add rules to build
8526 version.os and banner.h.
8527 * version.c: New file.
8528
115bb61d
UD
85292003-01-13 Jakub Jelinek <jakub@redhat.com>
8530
8531 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8532 the alias unconditional.
8533 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
8534
85352003-01-13 Ulrich Drepper <drepper@redhat.com>
8536
8537 * Makefile (CFLAGS-pthread_self.c): New definition.
8538
6aca81bb
UD
85392003-01-06 Jakub Jelinek <jakub@redhat.com>
8540
8541 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8542 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8543 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8544 * init.c (__pthread_initialize_minimal_internal): Likewise.
8545
e9c7764e
UD
85462003-01-07 Jakub Jelinek <jakub@redhat.com>
8547
b5facfda
UD
8548 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8549
e9c7764e
UD
8550 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8551 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8552 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8553 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8554 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8555 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8556
bef1e42f
UD
85572003-01-06 Jakub Jelinek <jakub@redhat.com>
8558
8559 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8560 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8561 * tst-cancel-wrappers.sh: Remove all exceptions.
8562
bbd17455
UD
85632003-01-05 Ulrich Drepper <drepper@redhat.com>
8564
a73ab6df
UD
8565 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8566 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
8567
bbd17455
UD
8568 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8569 Use __libc_pthread_functions array if SHARED.
8570
8571 * pthreadP.h: Move pthread_cond_2_0_t definition to...
8572 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8573
8574 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8575 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8576 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8577 __libc_ptf_call instead of __libc_maybe_call.
8578 (PTF): New #define.
8579 (__libc_cleanup_region_start): Wrap function name with PTF call.
8580 (__libc_cleanup_region_end): Likewise.
8581 (__libc_cleanup_end): Likewise.
8582
8583 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8584 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8585 * pthread_key_create.c: Add __pthread_key_create_internal alias.
8586 * pthreadP.h: Add prototypes.
8587
8588 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8589 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8590 __pthread_rwlock_unlock aliases.
8591 * pthreadP.h: Add prototypes for new aliases.
8592
8593 * pthreadP.h (struct pthead_functions): Moved to...
8594 * sysdeps/pthread/pthread-functions.h: ...here. New file.
8595 * init.c (pthread_functions): Add initializers for new elements.
8596
8597 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8598 __pthread_cleanup_pop_restore aliases.
8599 * pthreadP.h: Add prototypes.
8600
8601 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
8602 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
8603 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
8604 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
8605 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8606 * pthreadP.h: Adjust prototypes and callers.
8607
d27a78be
UD
86082003-01-04 Ulrich Drepper <drepper@redhat.com>
8609
b74121ae
UD
8610 * Makefile (tests): Add tst-cancel7.
8611 (tst-cancel7-ARGS): New variable.
bbd17455 8612 * tst-cancel7.c: New file.
b74121ae 8613
29bc410c
UD
8614 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
8615 around gcc defficiencies.
8616 * old_pthread_cond_signal.c: Likewise.
8617 * old_pthread_cond_timedwait.c: Likewise.
8618 * old_pthread_cond_wait.c: Likewise.
8619
d27a78be
UD
8620 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
8621
733f25e6
UD
86222003-01-03 Ulrich Drepper <drepper@redhat.com>
8623
7edb2ae3
UD
8624 * Makefile (tests): Add tst-cond7.
8625 * tst-cond7.c: New file.
8626
b1151300
UD
8627 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8628 (condvar_cleanup): Get condvar address from the right place.
8629
733f25e6
UD
8630 * atomic.h: Correct definitions of atomic_full_barrier,
8631 atomic_read_barrier, atomic_write_barrier.
8632
8633 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
8634 race-free.
8635 * old_pthread_cond_signal.c: Likewise.
8636 * old_pthread_cond_timedwait.c: Likewise.
8637 * old_pthread_cond_wait.c: Likewise.
8638
686b7223
UD
86392003-01-03 Jakub Jelinek <jakub@redhat.com>
8640
8641 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
8642
0e07706e
UD
86432003-01-03 Ulrich Drepper <drepper@redhat.com>
8644
997256dd
UD
8645 * pthreadP.h (pthread_cond_2_0_t): New type.
8646 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
8647 Use new type for the 2.0 condvar function prototypes.
8648 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
8649 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
8650 parameter.
8651 * old_pthread_cond_destroy.c: Likewise.
8652 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
8653 * old_pthread_cond_signal.c: Likewise.
8654 * old_pthread_cond_timedwait.c: Likewise.
8655 * old_pthread_cond_wait.c: Likewise.
8656
842d2817
UD
8657 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
8658 (__pthread_cond_wait): Don't save cancellation mode and seq value
8659 in same location.
8660
0e07706e
UD
8661 * herrno.c (__h_errno_location): Don't define as weak.
8662
bf293afe
UD
86632003-01-02 Jakub Jelinek <jakub@redhat.com>
8664
8665 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
8666 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
8667 and pthread_cond_wait.
8668 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
8669 Renamed to...
8670 (__pthread_cond_broadcast_2_0): ... this.
8671 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
8672 Renamed to...
8673 (__pthread_cond_destroy_2_0): ... this.
8674 * old_pthread_cond_init.c (__old_pthread_cond_init):
8675 Renamed to...
8676 (__pthread_cond_init_2_0): ... this.
8677 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
8678 Renamed to...
8679 (__pthread_cond_signal_2_0): ... this.
8680 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
8681 Renamed to...
8682 (__pthread_cond_wait_2_0): ... this.
8683 * pthread_cond_destroy.c: Include shlib-compat.h.
8684 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
8685 * pthread_cond_init.c: Include shlib-compat.h.
8686 (pthread_cond_init): Change strong_alias into versioned_symbol.
8687 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
8688 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
8689 fields.
8690 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
8691 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
8692 __pthread_cond_wait_2_0): New prototypes.
8693 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
8694 __old_pthread_cond_init, __old_pthread_cond_signal,
8695 __old_pthread_cond_wait): Removed.
8696 * init.c: Include shlib-compat.h.
8697 (pthread_functions): Guard ptr___pthread_attr_init_2_0
8698 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
8699 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
8700 ptr___pthread_cond_*_2_0 fields.
8701 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
8702 pthread_cond_*@GLIBC_2.0 compatibility symbols.
8703
8704 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
8705 LIBC_SIGACTION was not yet defined.
8706 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
8707 [!defined LIBC_SIGACTION] (__sigaction): New function and
8708 libc_hidden_weak.
8709 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
8710 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
8711
87122003-01-02 Jakub Jelinek <jakub@redhat.com>
8713
8714 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
8715
05df18c3
UD
87162003-01-02 Ulrich Drepper <drepper@redhat.com>
8717
8718 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8719 New, larger type definition.
8720 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
8721 implementation.
8722 * Versions [libpthread]: Add definitions for new pthread_cond_*
8723 interfaces for version GLIBC_2.3.2.
8724 * pthread_cond_init.c: Update initialization for new type definition.
8725 * Makefile (libpthread-routines): Remove pthread_cond_wait,
8726 pthread_cond_timedwait, pthread_cond_signal, and
8727 pthread_cond_broadcast. Add old_pthread_cond_init,
8728 old_pthread_cond_destroy, old_pthread_cond_wait,
8729 old_pthread_cond_timedwait, old_pthread_cond_signal, and
8730 old_pthread_cond_broadcast.
8731 * old_pthread_cond_broadcast.c: New file.
8732 * old_pthread_cond_destroy.c: New file.
8733 * old_pthread_cond_init.c: New file.
8734 * old_pthread_cond_signal.c: New file.
8735 * old_pthread_cond_timedwait.c: New file.
8736 * old_pthread_cond_wait.c: New file.
8737 * pthreadP.h: Add prototypes for the compatibility interfaces.
8738
8739 * pthread_cond_destroy.c: Don't include <errno.h>.
8740
fd8979e4
UD
87412003-01-01 Ulrich Drepper <drepper@redhat.com>
8742
8743 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
8744 unnecessary zero offset when addressing MUTEX.
8745
6d6ee629
UD
87462002-12-31 Ulrich Drepper <drepper@redhat.com>
8747
8748 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8749 __register_atfork.
8750 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
8751 for __register_atfork.
8752
a4baf360
UD
87532002-12-31 Jakub Jelinek <jakub@redhat.com>
8754
8755 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
8756 instead of ASSEMBLER test macro.
8757
8758 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
8759 __libc_current_sigrtmax): Add libc_hidden_def.
8760
8761 * sysdeps/pthread/list.h: Remove assert.h include.
8762
e9395a94
UD
87632002-12-31 Ulrich Drepper <drepper@redhat.com>
8764
8765 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
8766 __pthread_initialize_minimal_internal not
8767 __pthread_initialize_minimal.
8768
89d6e444
UD
87692002-12-30 Ulrich Drepper <drepper@redhat.com>
8770
416d2de6
UD
8771 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
8772 __pthread_initialize_minimal as hidden.
8773
89d6e444
UD
8774 * init.c (__pthread_initialize_minimal_internal): Don't mark as
8775 constructor.
8776
87772002-12-31 Jakub Jelinek <jakub@redhat.com>
8778
8779 * Makefile ($(inst_libdir)/libpthread.so): Depend on
8780 $(common-objpfx)format.lds, include that into the output script.
8781 Fix comment.
8782 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
8783
8cac677c
UD
87842002-12-28 Andreas Jaeger <aj@suse.de>
8785
8786 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
8787 nsec resolution changes.
8788 (xstat64_conv): Likewise.
8789 (xstat32_conv): Likewise.
8790 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
8791 struct kernel_stat.
8792 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
8793 structs stat and stat64.
8794 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 8795 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 8796
49e9f864
UD
87972002-12-30 Jakub Jelinek <jakub@redhat.com>
8798
8799 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
8800 argument.
8801 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
8802 (pthread_exit): Use strong_alias to avoid warnings.
8803 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
8804 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
8805 ptr___pthread_attr_init_2_*.
8806 * init.c (pthread_functions): Adjust.
8807
bab09b26
UD
88082002-12-29 Ulrich Drepper <drepper@redhat.com>
8809
598d7a42
UD
8810 * forward.c: Make all functions available by default again. It
8811 caused too much trouble.
8812
bab09b26
UD
8813 * pt-siglongjmp.c: Removed.
8814
3b7ed871
UD
88152002-12-28 Jakub Jelinek <jakub@redhat.com>
8816
8817 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
8818 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
8819 * sysdeps/i386/Makefile: New file.
8820 * sysdeps/i386/tcb-offsets.sym: New file.
8821 * sysdeps/pthread/tcb-offsets.h: New file.
8822 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
8823 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
8824
8825 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
8826 __register_atfork...
8827 (GLIBC_2.3.2): ...here.
8828
88292002-12-28 Ulrich Drepper <drepper@redhat.com>
8830
8831 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
8832 pthread_attr_setstackaddr with __attribute_deprecated__.
8833
270d9d47
UD
88342002-12-27 Jakub Jelinek <jakub@redhat.com>
8835
8836 * pt-system.c (system): Remove cancellation handling.
8837 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
8838 cancellation routines.
8839
131fd126
UD
88402002-12-28 Ulrich Drepper <drepper@redhat.com>
8841
afb2e954
UD
8842 * descr.h: Include <dl-sysdep.h>.
8843 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
8844 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
8845 (MULTIPLE_THREADS_OFFSET): Adjust offset.
8846 (SYSINFO_OFFSEET): Likewise.
8847
88482002-12-27 Jakub Jelinek <jakub@redhat.com>
8849
8850 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
8851 Define.
8852 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
8853 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
8854 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
8855 (USE_DL_SYSINFO): Undef.
8856
88572002-12-22 Jakub Jelinek <jakub@redhat.com>
8858
8859 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
8860 $(common-objpfx)libc.so.
8861 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
8862 it is bigger than pipe buffer size even on arches with bigger
8863 page size.
8864 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
8865
a218c9cf
UD
88662002-12-25 Ulrich Drepper <drepper@redhat.com>
8867
8868 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
8869 correct errno access for case that USE___THREAD is not defined.
8870
015a2dc9
UD
88712002-12-24 Ulrich Drepper <drepper@redhat.com>
8872
8873 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
8874 Patch by Marijn Ros <marijn@mad.scientist.com>.
8875
5220f9ac
RM
88762002-12-22 Roland McGrath <roland@redhat.com>
8877
8878 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
8879
1561bf63
UD
88802002-12-20 Ulrich Drepper <drepper@redhat.com>
8881
8882 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
8883
3325198e
UD
88842002-12-19 Ulrich Drepper <drepper@redhat.com>
8885
057c823f
UD
8886 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
8887 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
8888 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
8889
097eca29
UD
8890 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
8891 of int $0x80.
8892 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
8893 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
8894 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
8895 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8896 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8897 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
8898 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
8899 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8900
8901 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
8902 sysenter.
8903 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8904
8905 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
8906
5f5843e3
UD
8907 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
8908 in new TCB.
8909 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
8910 that sysinfo is properly initialized.
8911 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
8912 to 1 only for ld.so.
8913
3325198e
UD
8914 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
8915 RTLD_CORRECT_DYNAMIC_WEAK.
8916
74e8f2dc
UD
89172002-12-19 Jakub Jelinek <jakub@redhat.com>
8918
8919 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
8920 Use return 0 as 6th argument to FORWARD4.
8921 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
8922
df45b31e
UD
89232002-12-18 Ulrich Drepper <drepper@redhat.com>
8924
8925 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
8926 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
8927 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
8928 (INIT_SYSINFO): New #define.
8929 (TLS_TP_INIT): Use INIT_SYSINFO.
8930 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
8931 At test to make sure SYSINFO_OFFSET value is correct.
8932 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
8933
3d539579
UD
89342002-12-18 Jakub Jelinek <jakub@redhat.com>
8935
8936 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
8937 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
8938 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
8939 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
8940 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
8941 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
8942 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
8943
d7913e0e
UD
89442002-12-18 Ulrich Drepper <drepper@redhat.com>
8945
f051627f
UD
8946 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
8947 macro instead of using int $0x80 directly.
8948
d7913e0e
UD
8949 * sysdeps/pthread/bits/stdio-lock.h: New file.
8950 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
8951 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
8952 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
8953 * Makefile (routines): Add libc-lowlevelmutex.
8954
8955 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
8956 __i686.get_pc_thunk.dx.
8957
f077a4a9
UD
89582002-12-17 Jakub Jelinek <jakub@redhat.com>
8959
8960 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
8961 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
8962 ($(objpfx)tst-cancel-wrappers.out): New rule.
8963 * tst-cancel-wrappers.sh: New test.
8964 * tst-locale1.c: Include signal.h.
8965 (uselocale): Test static linking of __libc_current_sigrt*.
8966
89672002-12-17 Ulrich Drepper <drepper@redhat.com>
8968
8969 * Makefile (tests): Add tst-cancel6.
8970 * tst-cancel6.c: New file
8971
bd499a3b
UD
89722002-12-17 Jakub Jelinek <jakub@redhat.com>
8973
8974 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
8975 Define meaningfully for assembler as well.
8976 * pthreadP.h (struct pthread_functions): Remove
8977 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
8978 and ptr_pthread_attr_init_2_1 fields.
8979 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
8980 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
8981 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
8982 (FORWARD3): Define using FORWARD4.
8983 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
8984 versions.
8985 * pt-system.c: Remove duplicate stdlib.h include.
8986
0a1063f4
UD
89872002-12-16 Ulrich Drepper <drepper@redhat.com>
8988
87d60668
UD
8989 * sem_init.c: Define sem_init@GLIBC_2.0.
8990 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
8991 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
8992
0a1063f4
UD
8993 * flockfile.c: Moved to...
8994 * sysdeps/pthread/flockfile.c: ...here. New file.
8995 * funlockfile.c: Moved to...
8996 * sysdeps/pthread/funlockfile.c: ...here. New file.
8997 * ftrylockfile.c: Moved to...
8998 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
8999
9634cf9d
UD
90002002-12-16 Jakub Jelinek <jakub@redhat.com>
9001
9002 * libc-cancellation.c: Guard both function with
9003 #if !defined NOT_IN_libc.
9004 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9005 automatically provided pthread wrappers.
9006 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9007 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9008 nor in libpthread.
9009 * pt-open.c: Removed.
9010 * pt-fcntl.c: Removed.
9011 * pt-fsync.c: Removed.
9012 * pt-lseek.c: Removed.
9013 * pt-msgrcv.c: Removed.
9014 * pt-msgsnd.c: Removed.
9015 * pt-msync.c: Removed.
9016 * pt-nanosleep.c: Removed.
9017 * pt-open64.c: Removed.
9018 * pt-pause.c: Removed.
9019 * pt-pread.c: Removed.
9020 * pt-pread64.c: Removed.
9021 * pt-pwrite.c: Removed.
9022 * pt-pwrite64.c: Removed.
9023 * pt-read.c: Removed.
9024 * pt-recv.c: Removed.
9025 * pt-recvfrom.c: Removed.
9026 * pt-recvmsg.c: Removed.
9027 * pt-send.c: Removed.
9028 * pt-sendto.c: Removed.
9029 * pt-sigtimedwait.c: Removed.
9030 * pt-sigwait.c: Removed.
9031 * pt-wait.c: Removed.
9032 * pt-waitpid.c: Removed.
9033 * pt-write.c: Removed.
9034 * pt-accept.c: Removed.
9035 * pt-close.c: Removed.
9036 * pt-connect.c: Removed.
9037 * pt-lseek64.c: Removed.
9038 * pt-sendmsg.c: Removed.
9039 * pt-tcdrain.c: Removed.
9040
6ee8d334
UD
90412002-12-15 Ulrich Drepper <drepper@redhat.com>
9042
81fa9371
UD
9043 * init.c (__pthread_initialize_minimal_internal): Renamed from
9044 __pthread_initialize_minimal. Make old name an alias. This
9045 converts a normal relocation into a relative relocation.
9046
f3015aa5
UD
9047 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9048
4cbc1950
UD
9049 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9050 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9051 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9052 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9053 pt-sigwaitinfo, pt-waitid, and pt-writev.
9054 * pt-creat.c: Removed.
9055 * pt-poll.c: Removed.
9056 * pt-pselect.c: Removed.
9057 * pt-readv.c: Removed.
9058 * pt-select.c: Removed.
9059 * pt-sigpause.c: Removed.
9060 * pt-sigsuspend.c: Removed.
9061 * pt-sigwaitinfo.c: Removed.
9062 * pt-waitid.c: Removed.
9063 * pt-writev.c: Removed.
9064
8454830b
UD
9065 * init.c (pthread_functions): New variable.
9066 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9067 (or NULL) to __libc_pthread_init.
9068 * forward.c: Rewrite to use __libc:pthread_functions array to get
9069 function addresses.
9070 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9071 prototype.
9072 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9073 Take new parameter. Copy content of variable pointed to by it
9074 to __libc_pthread_init.
9075
9076 * pthreadP.h (struct pthread_functions): New type.
9077 (__libc_pthread_init): Declare.
9078
9079 * pthread_attr_destroy.c: Add namespace protected alias.
9080 * pthread_attr_getdetachstate.c: Likewise.
9081 * pthread_attr_getinheritsched.c: Likewise.
9082 * pthread_attr_getschedparam.c: Likewise.
9083 * pthread_attr_getschedpolicy.c: Likewise.
9084 * pthread_attr_getscope.c: Likewise.
9085 * pthread_attr_setdetachstate.c: Likewise.
9086 * pthread_attr_setinheritsched.c: Likewise.
9087 * pthread_attr_setschedparam.c: Likewise.
9088 * pthread_attr_setschedpolicy.c: Likewise.
9089 * pthread_attr_setscope.c: Likewise.
9090 * pthread_cond_broadcast.c: Likewise.
9091 * pthread_cond_destroy.c: Likewise.
9092 * pthread_cond_init.c: Likewise.
9093 * pthread_cond_signal.c: Likewise.
9094 * pthread_cond_wait.c: Likewise.
9095 * pthread_condattr_destroy.c: Likewise.
9096 * pthread_condattr_init.c: Likewise.
9097 * pthread_equal.c: Likewise.
9098 * pthread_exit.c: Likewise.
9099 * pthread_getschedparam.c: Likewise.
9100 * pthread_self.c: Likewise.
9101 * pthread_setcancelstate.c: Likewise.
9102 * pthread_setschedparam.c: Likewise.
9103 * pthread_mutex_destroy.c: Likewise.
9104 * pthread_mutex_init.c: Likewise.
9105 * pthreadP.h: Add prototypes for the aliases.
9106
0d5f4929
UD
9107 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9108 multiple_threads member in correct TCB to 1.
9109
6ee8d334
UD
9110 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9111 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9112 member of thread decriptor, otherwise return unconditionally 1.
9113
2fb6444d
UD
91142002-12-14 Ulrich Drepper <drepper@redhat.com>
9115
9116 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9117 regular Linux version. Remove file.
9118 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9119 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9120 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9121 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9122 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9123 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9124 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9125 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9126 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9127 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9128 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9129 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9130 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9131 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9132 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9133 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9134 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9135 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9136 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9137 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9138 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9139 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9140 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9141 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9142 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9143 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9144 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9145 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9146 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9147 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9148
86b2dc40
UD
91492002-12-14 Jakub Jelinek <jakub@redhat.com>
9150
9151 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9152 * sysdeps/unix/sysv/linux/open.c: Removed.
9153 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9154 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9155 * sysdeps/unix/sysv/linux/msync.c: Removed.
9156 * sysdeps/unix/sysv/linux/read.c: Removed.
9157 * sysdeps/unix/sysv/linux/close.c: Removed.
9158 * sysdeps/unix/sysv/linux/creat.c: Removed.
9159 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9160 * sysdeps/unix/sysv/linux/pause.c: Removed.
9161 * sysdeps/unix/sysv/linux/select.c: Removed.
9162 * sysdeps/unix/sysv/linux/write.c: Removed.
9163
9d263d72
UD
91642002-12-14 Ulrich Drepper <drepper@redhat.com>
9165
9166 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9167 element in TCB to see whether locking is needed.
9168
9169 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9170 MULTIPLE_THREADS_OFFSET value is correct.
9171
9172 * sysdeps/unix/sysv/linux/close.c: New file.
9173 * sysdeps/unix/sysv/linux/connect.S: New file.
9174 * sysdeps/unix/sysv/linux/creat.c: New file.
9175 * sysdeps/unix/sysv/linux/fsync.c: New file.
9176 * sysdeps/unix/sysv/linux/llseek.c: New file.
9177 * sysdeps/unix/sysv/linux/lseek.c: New file.
9178 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9179 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9180 * sysdeps/unix/sysv/linux/msync.c: New file.
9181 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9182 * sysdeps/unix/sysv/linux/open.c: New file.
9183 * sysdeps/unix/sysv/linux/open64.c: New file.
9184 * sysdeps/unix/sysv/linux/pause.c: New file.
9185 * sysdeps/unix/sysv/linux/poll.c: New file.
9186 * sysdeps/unix/sysv/linux/pread.c: New file.
9187 * sysdeps/unix/sysv/linux/pread64.c: New file.
9188 * sysdeps/unix/sysv/linux/pselect.c: New file.
9189 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9190 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9191 * sysdeps/unix/sysv/linux/readv.c: New file.
9192 * sysdeps/unix/sysv/linux/recv.S: New file.
9193 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9194 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9195 * sysdeps/unix/sysv/linux/select.c: New file.
9196 * sysdeps/unix/sysv/linux/send.S: New file.
9197 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9198 * sysdeps/unix/sysv/linux/sendto.S: New file.
9199 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9200 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9201 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9202 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9203 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9204 * sysdeps/unix/sysv/linux/system.c: New file.
9205 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9206 * sysdeps/unix/sysv/linux/wait.c: New file.
9207 * sysdeps/unix/sysv/linux/waitid.c: New file.
9208 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9209 * sysdeps/unix/sysv/linux/writev.c: New file.
9210 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9211
9212 * pt-readv.c: Fix comment.
9213
92142002-12-14 Jakub Jelinek <jakub@redhat.com>
9215
9216 * tst-cleanup1.c: Include stdlib.h.
9217
9218 * tst-cancel5.c: New test.
9219 * Makefile (tests): Add tst-cancel5.
9220 (tst-cancel5): Link against libc.so libpthread.so in that order.
9221
9ae0909b
UD
92222002-12-13 Ulrich Drepper <drepper@redhat.com>
9223
b7bdd9c4
UD
9224 * forward.c (test_loaded): Prevent recursive calls.
9225
9ae0909b
UD
9226 * Makefile (routines): Add libc-cancellation.
9227 * libc-cancellation.c: New file.
9228 * descr.h (struct pthread): Add multiple_threads field.
9229 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9230 new thread descriptor to 1.
9231 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9232 Initialize multiple_thread field after successful thread creation.
9233 * cancellation.c (__do_cancel): Move to pthreadP.h.
9234 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9235 (__pthread_disable_asynccancel): Add internal_function attribute.
9236 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9237 * pthread_setcancelstate.c: Likewise.
9238 * pthread_setcanceltype.c: Likewise.
9239 * pthread_exit.c: Likewise.
9240 * pthreadP.h (CANCELLATION_P): Likewise.
9241 (__do_cancel): Define as static inline.
9242 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9243 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9244 declarations.
9245 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9246 fields. Define MULTIPLE_THREADS_OFFSET.
9247 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9248 declaration.
9249 * sysdeps/unix/sysv/linux/accept.S: New file.
9250 * sysdeps/unix/sysv/linux/read.c: New file.
9251 * sysdeps/unix/sysv/linux/write.c: New file.
9252 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9253 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9254 initialization of __libc_locking_needed.
9255 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9256 __libc_locking_needed, use multiple_threads field in TCB.
9257 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9258
22f20674
UD
92592002-12-12 Ulrich Drepper <drepper@redhat.com>
9260
2ad2e1e7
UD
9261 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9262 version.
9263 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9264
22f20674
UD
9265 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9266 access to __libc_locking_needed for PIC.
9267
aa80bf86
UD
92682002-12-12 Jakub Jelinek <jakub@redhat.com>
9269
9270 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9271 declare for libc.so.
9272 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9273 expression.
9274 (__libc_lock_lock): Put into statement expression.
9275 (__libc_lock_unlock): Remove trailing semicolon.
9276 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9277
24021373
RM
92782002-12-12 Roland McGrath <roland@redhat.com>
9279
9280 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9281 "m" constraint to refer to __libc_locking_needed. Declare it here.
9282
14e7aece
UD
92832002-12-12 Ulrich Drepper <drepper@redhat.com>
9284
9285 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9286 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9287 Initialize __libc_locking_needed.
9288 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9289 instead of __register_pthread_fork_handler.
9290 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9291 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9292 fork-gen with libc_pthread_init.
9293 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9294 of __register_pthread_fork_handler.
9295 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9296 of __register_pthread_fork_handler.
9297 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9298 __libc_locking_needed to determine whether lock prefix can be avoided.
9299 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9300
85631c8e
UD
93012002-12-11 Ulrich Drepper <drepper@redhat.com>
9302
da63009e
UD
9303 * Makefile (tests): Add tst-cleanup1.
9304 * tst-cleanup1.c: New file.
9305 * cancellation.c (__cleanup_thread): Removed.
9306 (__do_cancel): Remove call to __cleanup_thread.
9307 * pthreadP.h: Remove __cleanup_thread prorotype.
9308
000160a2
UD
9309 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9310 Remember function and argument even if cancellation handler
9311 function is not available.
9312 (__libc_cleanup_region_end): Execute registered function directly if
9313 pthread functions are not available.
9314 (__libc_cleanup_end): Likewise.
9315
85631c8e
UD
9316 * init.c (__pthread_initialize_minimal): Fix initialization in
9317 static lib by preventing gcc from being too clever.
9318
dce8f2b6
UD
93192002-12-10 Ulrich Drepper <drepper@redhat.com>
9320
34a075be
UD
9321 * init.c (__pthread_initialize_minimal): Remove unneccesary
9322 sigaddset call.
9323
dce8f2b6
UD
9324 * Makefile (tests): We can run tst-locale2 now.
9325
e5e45b53
UD
93262002-12-09 Ulrich Drepper <drepper@redhat.com>
9327
9328 * Versions: Remove duplicated sigwait entry.
9329
bdb04f92
UD
93302002-12-08 Ulrich Drepper <drepper@redhat.com>
9331
1e506629
UD
9332 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9333 inside libpthread.
9334
a3957dd5
UD
9335 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9336
bdb04f92
UD
9337 * pthreadP.h: Declare __pthread_enable_asynccancel and
9338 __pthread_disable_asynccancel.
9339 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9340 (CANCEL_RESET): Use __pthread_disable_asynccancel.
9341 * cancellation.c (__pthread_enable_asynccancel): New function.
9342 (__pthread_disable_asynccancel): New function.
9343 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9344 * pt-close.c: Likewise.
9345 * pt-connect.c: Likewise.
9346 * pt-creat.c: Likewise.
9347 * pt-fcntl.c: Likewise.
9348 * pt-fsync.c: Likewise.
9349 * pt-lseek.c: Likewise.
9350 * pt-lseek64.c: Likewise.
9351 * pt-msgrcv.c: Likewise.
9352 * pt-msgsnd.c: Likewise.
9353 * pt-msync.c: Likewise.
9354 * pt-nanosleep.c: Likewise.
9355 * pt-open.c: Likewise.
9356 * pt-open64.c: Likewise.
9357 * pt-pause.c: Likewise.
9358 * pt-poll.c: Likewise.
9359 * pt-pread.c: Likewise.
9360 * pt-pread64.c: Likewise.
9361 * pt-pselect.c: Likewise.
9362 * pt-pwrite.c: Likewise.
9363 * pt-pwrite64.c: Likewise.
9364 * pt-read.c: Likewise.
9365 * pt-readv.c: Likewise.
9366 * pt-recv.c: Likewise.
9367 * pt-recvfrom.c: Likewise.
9368 * pt-recvmsg.c: Likewise.
9369 * pt-select.c: Likewise.
9370 * pt-send.c: Likewise.
9371 * pt-sendmsg.c: Likewise.
9372 * pt-sendto.c: Likewise.
9373 * pt-sigpause.c: Likewise.
9374 * pt-sigsuspend.c: Likewise.
9375 * pt-sigtimedwait.c: Likewise.
9376 * pt-sigwait.c: Likewise.
9377 * pt-sigwaitinfo.c: Likewise.
9378 * pt-system.c: Likewise.
9379 * pt-tcdrain.c: Likewise.
9380 * pt-wait.c: Likewise.
9381 * pt-waitid.c: Likewise.
9382 * pt-waitpid.c: Likewise.
9383 * pt-write.c: Likewise.
9384 * pt-writev.c: Likewise.
a3957dd5
UD
9385 * pthread_join.c: Likewise.
9386 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
9387
9388 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9389 (__xpg_sigpause): New function.
9390 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9391
6ccb3834
UD
93922002-12-07 Ulrich Drepper <drepper@redhat.com>
9393
09efc3ba
UD
9394 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9395
9396 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9397 _GI_pthread_cleanup_pop to pthreadP.h.
9398
9399 * ftrylockfile.c: Use _IO_lock_trylock instead of
9400 pthread_mutex_trylock.
9401
9402 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9403 (CANCEL_RESET): Likewise.
9404 (__pthread_setcanceltype_): Declare.
9405 (__pthread_mutex_lock_internal): Declare.
9406 (__pthread_mutex_unlock_internal): Declare.
9407 (__pthread_once_internal): Declare.
9408 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9409 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9410
9411 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9412 and pthread_mutex_unlock.
9413 * pthread_cond_wait.c: Likewise.
9414 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9415 * pthread_mutex_unlock.c: Likewise.
9416
9417 * pthread_setcanceltype.c: Add additional alias
9418 __pthread_setcanceltype.
9419
9420 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9421 * sem_open.c (sem_open): Likewise.
9422 Use __libc_open, __libc_write, and __libc_close instead of
9423 open, write, and close respectively.
9424
9425 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9426 Rewrite as statement expression since it must return a value.
9427
9428 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9429 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9430 __pthread_kill.
9431
9432 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9433 alias __pthread_once_internal.
9434
6ccb3834
UD
9435 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9436
d3c9f895
UD
94372002-12-06 Ulrich Drepper <drepper@redhat.com>
9438
4614167a
UD
9439 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9440 * tst-stdio1.c: New file.
9441 * tst-stdio2.c: New file.
9442
a4548cea
UD
9443 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9444
d3c9f895
UD
9445 * Makefile (tests): Comment out tst-locale2 for now.
9446 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9447
9448 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9449 -D_IO_MTSAFE_IO.
9450 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9451 Use _IO_lock_init instead of explicit assignment.
9452
9453 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9454 Define __libc_lock_* and __libc_lock_recursive macros with
9455 lowlevellock macros, not pthread mutexes.
9456
9457 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
9458 of pthread_mutex_lock.
9459 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
9460 instead of pthread_mutex_unlock.
9461
fde89ad0
RM
94622002-12-06 Roland McGrath <roland@redhat.com>
9463
9464 * allocatestack.c (__stack_user): Use uninitialized defn.
9465 * init.c (__pthread_initialize_minimal): Initialize it here.
9466
11767d47
RM
94672002-12-05 Roland McGrath <roland@redhat.com>
9468
fde89ad0
RM
9469 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9470 string.
9471 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9472
11767d47
RM
9473 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9474 missing & here too.
9475
440d8bc2
UD
94762002-12-05 Ulrich Drepper <drepper@redhat.com>
9477
9478 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9479 lowlevellock.
9480 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9481 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9482 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9483 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9484 for __libc_lock_* macros.
9485 * Makefile (routines): Add libc-lowlevellock.
9486
94872002-10-09 Roland McGrath <roland@redhat.com>
9488
9489 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9490 Under [__PIC__], call the function via the pointer fetched for
9491 comparison rather than a call by name that uses the PLT.
9492 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9493 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9494 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9495 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9496 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9497
d5ed0118
RM
94982002-12-04 Roland McGrath <roland@redhat.com>
9499
9500 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9501
9502 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9503 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9504
9505 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9506
eaa4099f
UD
95072002-12-04 Ulrich Drepper <drepper@redhat.com>
9508
9509 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9510 a completely opaque, non-integer type.
9511 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9512
33b5d0cc
UD
95132002-12-05 Jakub Jelinek <jakub@redhat.com>
9514
9515 * sysdeps/i386/tls.h: Include stdlib.h.
9516 * sysdeps/x86_64/tls.h: Likewise.
9517
7a5cdb30
UD
95182002-12-04 Ulrich Drepper <drepper@redhat.com>
9519
c4a6d859
UD
9520 * Makefile (tests): Add tst-locale2.
9521 (tests-static): Likewise.
9522 * tst-locale2.c: New file.
9523
7a5cdb30
UD
9524 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9525 volatile and add memory clobbers to lock operations.
9526
d82d5d12
UD
95272002-12-03 Ulrich Drepper <drepper@redhat.com>
9528
69cae3cf
UD
9529 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9530 * sysdeps/i386/i486/bits/atomic.h: New file.
9531 * sysdeps/i386/i586/bits/atomic.h: New file.
9532 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9533 include i486 version.
9534 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9535 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 9536 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 9537
e4044c01
UD
9538 * allocatestack.c (get_cached_stack): Don't crash if we first
9539 found a stack with a larger size then needed.
9540 Reported by Hui Huang <hui.huang@sun.com>.
9541
d82d5d12
UD
9542 * Makefile (tests): Add tst-sysconf.
9543 * tst-sysconf.c: New file.
9544
9545 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9546 PTHREAD_THREADS_MAX.
9547
fa9a4ff0
RM
95482002-12-02 Roland McGrath <roland@redhat.com>
9549
9550 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9551 Declare using hidden_proto instead of attribute_hidden, so there are
9552 non-.hidden static symbols for gdb to find.
9553 (__pthread_keys): Likewise.
9554 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9555 * allocatestack.c (__stack_user): Likewise.
9556 * pthread_create.c (__pthread_keys): Likewise.
9557 (__nptl_threads_events, __nptl_last_event): Make these static instead
9558 of hidden.
9559 * pthread_key_create.c (__pthread_pthread_keys_max,
9560 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9561
91949a33
UD
95622002-12-02 Ulrich Drepper <drepper@redhat.com>
9563
c22b52fa
UD
9564 * Makefile (tests): Add tst-locale1. If buid-static is yes link
9565 statically.
9566 * tst-locale1.c: New file.
9567
beb6aa41
UD
9568 * pthread_cond_timedwait.c: Include <stdlib.h>.
9569
91949a33
UD
9570 * Makefile (tests): Add tst-fork2 and tst-fork3.
9571 * tst-fork2.c: New file.
9572 * tst-fork3.c: New file.
9573
654dff90
UD
95742002-11-28 Ulrich Drepper <drepper@redhat.com>
9575
cb0e76b4
UD
9576 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9577
9578 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9579 require it to 200112L.
9580
9581 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9582 instruction only if HAVE_CMOV is defined.
9583 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9584
975aa229
UD
9585 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9586
654dff90
UD
9587 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9588
9589 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9590
9591 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9592
a3931336
UD
95932002-11-27 Ulrich Drepper <drepper@redhat.com>
9594
c10c099c
UD
9595 * sysdeps/x86_64/bits/atomic.h: New file.
9596
9597 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9598 16-bit operations.
9599
dca99d27
UD
9600 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
9601 possible since gettid cannot fail.
9602
f78deea6
UD
9603 * sysdeps/x86_64/pthreaddef.h: New file.
9604
9605 * sysdeps/i386/pthreaddef.h (gettid): Removed.
9606
9607 * sysdeps/x86_64/pthread_spin_init.c: New file.
9608 * sysdeps/x86_64/pthread_spin_lock.c: New file.
9609 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
9610 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
9611
9612 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
9613 Add missing lock prefix. Minute optimization.
9614
9615 * tst-spin2.c (main): Also check successful trylock call.
9616
9617 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
9618 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
9619
9620 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
9621 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
9622
9623 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
9624 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
9625 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
9626
9627 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
9628 value in case of an error.
9629
a3931336
UD
9630 * sysdeps/x86_64/tls.h: New file.
9631
76a50749
UD
96322002-11-26 Ulrich Drepper <drepper@redhat.com>
9633
117c452c
UD
9634 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
9635 takes the array member name and the index as parameters.
9636 (THREAD_SETMEM_NC): Likewise.
9637 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
9638 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
9639 interfaces.
9640
9641 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
9642 to decide which code to use.
9643 (THREAD_SETMEM_NC): Likewise.
9644
76a50749
UD
9645 * allocatestack.c (queue_stack): Don't remove stack from list here.
9646 Do it in the caller. Correct condition to prematurely terminate
9647 loop to free stacks.
9648 (__deallocate_stack): Remove stack from list here.
9649
96502002-11-26 Ulrich Drepper <drepper@redhat.com>
9651
9652 * Makefile (tests): Add tst-stack1.
9653 * tst-stack1.c: New file.
9654
9655 * allocatestack.c (allocate_stack): Initialize the TCB on a user
9656 provided stack.
9657
9658 * pthread_attr_getstack.c: Return bottom of the thread area.
9659
96602002-11-25 Ulrich Drepper <drepper@redhat.com>
9661
9662 * Makefile (libpthread-routines): Add pt-allocrtsig and
9663 pthread_kill_other_threads.
9664 * pt-allocrtsig.c: New file.
9665 * pthread_kill_other_threads.c: New file.
9666 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
9667 all three functions.
9668 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9669 allocrtsig.
9670 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
9671 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
9672 and __libc_allocate_rtsig_private.
9673 * Versions (libpthread): Export pthread_kill_other_threads_np,
9674 __libc_current_sigrtmin, and __libc_current_sigrtmax.
9675
96762002-11-24 Ulrich Drepper <drepper@redhat.com>
9677
9678 * allocatestack.c (allocate_stack): stackaddr in attribute points to
9679 the end of the stack. Adjust computations.
9680 When mprotect call fails dequeue stack and free it.
9681 * pthread_attr_setstack.c: Store top of the stack in stackaddr
9682 attribute.
9683 * pthread_getattr_np.c: Likewise.
9684
9685 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
9686 surprises.
9687
96882002-11-23 Ulrich Drepper <drepper@redhat.com>
9689
9690 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
9691 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
9692
96932002-11-22 Ulrich Drepper <drepper@redhat.com>
9694
9695 * pthread_getspecific.c: Optimize access to first 2nd-level array.
9696 * pthread_setspecific.c: Likewise.
9697
96982002-11-21 Ulrich Drepper <drepper@redhat.com>
9699
9700 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
9701 definitions. Get them from the official place.
9702 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
9703
9704 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
9705 Use new CLONE_ flags in clone() calls.
9706
9707 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
9708 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
9709
9710 * Versions: Add pthread_* functions for libc.
9711 * forward.c: New file.
9712
9713 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
9714 errno-loc.
9715 * herrno.c: New file.
9716 * res.c: New file.
9717
9718 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
9719 sem_trywait, and sem_timedwait. Add herrno and res.
9720 * sem_init.c: Don't initialize lock and waiters members.
9721 * sem_open.c: Likewise.
9722 * sem_post.c: Removed.
9723 * sem_wait.c: Removed.
9724 * sem_trywait.c: Removed.
9725 * sem_timedwait.c: Removed.
9726 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
9727 Includes full implementations of sem_post, sem_wait, sem_trywait,
9728 and sem_timedwait.
9729 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
9730 for new implementation.
9731 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
9732 and waiters fields.
9733
9734 * tst-sem3.c: Improve error message.
9735 * tst-signal3.c: Likewise.
9736
9737 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
9738 to tell the kernel about the termination futex and to initialize tid
9739 member. Don't initialize main_thread.
9740 * descr.h (struct pthread): Remove main_thread member.
9741 * cancelllation.c (__do_cancel): Remove code handling main thread.
9742 The main thread is not special anymore.
9743
9744 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
9745 size of the stacks to stack_cache_actsize.
9746
9747 * pt-readv.c: Add missing "defined".
9748 * pt-sigwait.c: Likewise.
9749 * pt-writev.c: Likewise.
9750
97512002-11-09 Ulrich Drepper <drepper@redhat.com>
9752
9753 * Versions: Export __connect from libpthread.
9754 Patch by Luca Barbieri <ldb@ldb.ods.org>.
9755
9756 * Makefile (libpthread-routines): Add pt-raise.
9757 * sysdeps/unix/sysv/linux/raise.c: New file.
9758 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
9759 * sysdeps/generic/pt-raise.c: New file.
9760
9761 * pthread_cond_init.c: Initialize all data elements of the condvar
9762 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
9763
9764 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
9765 * pthread_create.c: Likewise.
9766
9767 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
9768 * tst-key1.c: New file.
9769 * tst-key2.c: New file.
9770 * tst-key3.c: New file.
9771
9772 * Versions: Export pthread_detach for version GLIBC_2.0.
9773 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
9774
97752002-11-08 Ulrich Drepper <drepper@redhat.com>
9776
9777 * pthread_key_create.c: Terminate search after an unused key was found.
9778 Patch by Luca Barbieri <ldb@ldb.ods.org>.
9779
9780 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
9781 Patch by Luca Barbieri <ldb@ldb.ods.org>.
9782
97832002-10-10 Ulrich Drepper <drepper@redhat.com>
9784
9785 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
9786 dynamic lookup for errno in PIC.
9787
9788 * allocatestack.c (get_cached_stack): Rearrange code slightly to
9789 release the stack lock as soon as possible.
9790 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
9791 the static TLS block.
9792 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
9793
9794 * cancellation.c: Renamed from cancelation.c.
9795 * Makefile: Adjust accordingly.
9796 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
9797 * cleanup_defer.c: Use CANCELLATION_P.
9798 * pthread_testcancel.c: Likewise.
9799 * descr.h: Fix spelling in comments.
9800 * init.c: Likewise.
9801 * pthread_getattr_np.c: Likewise.
9802 * pthread_getschedparam.c: Likewise.
9803 * pthread_setschedparam.c: Likewise.
9804 * Versions: Likewise.
9805
9806 * pt-pselect.c: New file.
9807 * Makefile (libpthread-routines): Add pt-pselect.
9808 * Versions: Add pselect.
9809
9810 * tst-cancel4.c: New file.
9811 * Makefile (tests): Add tst-cancel4.
9812
98132002-10-09 Ulrich Drepper <drepper@redhat.com>
9814
9815 * pthread_mutex_lock.c: Always record lock ownership.
9816 * pthread_mutex_timedlock.c: Likewise.
9817 * pthread_mutex_trylock.c: Likewise.
9818
9819 * pt-readv.c: New file.
9820 * pt-writev.c: New file.
9821 * pt-creat.c: New file.
9822 * pt-msgrcv.c: New file.
9823 * pt-msgsnd.c: New file.
9824 * pt-poll.c: New file.
9825 * pt-select.c: New file.
9826 * pt-sigpause.c: New file.
9827 * pt-sigsuspend.c: New file.
9828 * pt-sigwait.c: New file.
9829 * pt-sigwaitinfo.c: New file.
9830 * pt-waitid.c: New file.
9831 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
9832 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
9833 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
9834 * Versions: Add all the new functions.
9835
9836 * tst-exit1.c: New file.
9837 * Makefile (tests): Add tst-exit1.
9838
9839 * sem_timedwait.c: Minor optimization for more optimal fastpath.
9840
98412002-10-08 Ulrich Drepper <drepper@redhat.com>
9842
9843 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
9844
9845 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
9846 call. pthread_join is an official cancellation point.
9847 * pthread_timedjoin.c: Likewise.
9848
9849 * pthread_cond_wait.c: Revert order in which internal lock are dropped
9850 and the condvar's mutex are retrieved.
9851 * pthread_cond_timedwait.c: Likewise.
9852 Reported by dice@saros.East.Sun.COM.
9853
98542002-10-07 Ulrich Drepper <drepper@redhat.com>
9855
9856 * pthreadP.h: Cut out all type definitions and move them...
9857 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
9858 * pthreadP.h: Include <internaltypes.h>.
9859
9860 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
9861 performance tweaks.
9862
9863 * sem_trywait.c: Shuffle #includes around to get right order.
9864 * sem_timedwait.c: Likewise.
9865 * sem_post.c: Likewise.
9866 * sem_wait.c: Likewise.
9867
9868 * nptl 0.3 released.
9869
9870 * Makefile (tests): Add tst-signal3.
9871 * tst-signal3.c: New file.
9872
98732002-10-05 Ulrich Drepper <drepper@redhat.com>
9874
9875 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
9876 the asms modify the sem object.
9877 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
9878
9879 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
9880 the actual members.
9881 * pthreadP.h (struct sem): New type. Actual semaphore type.
9882 * semaphoreP.h: Include pthreadP.h.
9883 * sem_getvalue.c: Adjust to sem_t change.
9884 * sem_init.c: Likewise.
9885 * sem_open.c: Likewise.
9886 * sem_post.c: Likewise.
9887 * sem_timedwait.c: Likewise.
9888 * sem_trywait.c: Likewise.
9889 * sem_wait.c: Likewise.
9890
98912002-10-04 Ulrich Drepper <drepper@redhat.com>
9892
9893 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
9894 * tst-basic2.c: New file.
9895 * tst-exec1.c: New file.
9896 * tst-exec2.c: New file.
9897 * tst-exec3.c: New file.
9898
9899 * tst-fork1.c: Remove extra */.
9900
9901 * nptl 0.2 released. The API for IA-32 is complete.