]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
Test for changing stack exec permission.
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
365b1602
UD
12003-09-22 Ulrich Drepper <drepper@redhat.com>
2
3 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
4 recommendation from AMD re avoidance of lock prefix.
5
39358e8b
UD
62003-09-22 Jakub Jelinek <jakub@redhat.com>
7
8 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
9 lll_futex_timed_wait instead of lll_futex_wait.
10 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
11 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
12 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
13 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
14 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
15 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
16 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
17 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
18 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
19 Completely revamp the locking macros. No distinction between
20 normal and mutex locking anymore.
21 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
22 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
23 __lll_lock_timedwait): Fix prototypes.
24 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
25 __lll_lock_timedwait): Likewise.
26 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
27 macros, add __builtin_expect.
28 (lll_mutex_timedlock): Likewise. Fix return value.
29 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
30 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
31 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
32 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
33 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
34 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
35 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
36 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
37
9d08fbbb
UD
382003-09-22 Ulrich Drepper <drepper@redhat.com>
39
c0df57e1
UD
40 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
41 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
42 operation if possible.
43
9d08fbbb
UD
44 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
45 like jumping over the lock prefix.
46
71451de2
UD
472003-09-21 Ulrich Drepper <drepper@redhat.com>
48
49 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
50 locking macros. No distinction between normal and mutex locking
51 anymore.
3a226d33 52 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
bc1989aa
UD
53 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
54 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
71451de2
UD
55 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
56 locking. Merge bits from lowlevelmutex.S we still need.
3a226d33 57 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
bc1989aa 58 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
71451de2 59 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
3a226d33 60 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
71451de2
UD
61 * Makefile (routines): Remove libc-lowlevelmutex.
62 (libpthread-rountines): Remove lowlevelmutex.
3a226d33
UD
63 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
64 for new mutex implementation.
65 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
66 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
67 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
68 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
69 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
70 Likewise.
71 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
72 Likewise.
73 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
74 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
75 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
76 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
77 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
78 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
79 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
80 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
81 Likewise.
82 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
83 Likewise.
84 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
85 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
86 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
87 Don't use requeue.
88 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
bc1989aa 89 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
71451de2 90
8f31c0ef
UD
912003-09-20 Ulrich Drepper <drepper@redhat.com>
92
56a4aa98
UD
93 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
94 in parameters of asm with output parameters.
95
8f31c0ef
UD
96 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
97 type of DECR parameter to int.
98 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
99
8b8074da
UD
1002003-09-18 Jakub Jelinek <jakub@redhat.com>
101
102 * tst-attr3.c (tf, do_test): Print stack start/end/size and
103 guardsize for each thread.
104
65af7e61
UD
1052003-09-17 Jakub Jelinek <jakub@redhat.com>
106
9ba96eda
UD
107 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
108 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
109 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
110
06f6ca90
UD
111 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
112 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
113 NULL.
114 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
115 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
116 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
117 (pthread_getaffinity_np): Add hidden_def.
118
119 * Makefile (tests): Add tst-attr3.
120 * tst-attr3.c: New test.
121
65af7e61
UD
122 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
123
3402852c
UD
1242003-09-15 Jakub Jelinek <jakub@redhat.com>
125
126 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
127 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
128
a4db3439
UD
1292003-09-17 Jakub Jelinek <jakub@redhat.com>
130
131 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
132 * tst-align.c: Include tst-stack-align.h.
133 (tf, do_test): Use TEST_STACK_ALIGN macro.
134
1352003-09-17 Ulrich Drepper <drepper@redhat.com>
136
137 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
138 variable.
139
92ce4676
UD
1402003-09-16 Ulrich Drepper <drepper@redhat.com>
141
142 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
143 stack-related values for the initial thread.
144
e07bb02a
UD
1452003-09-15 Jakub Jelinek <jakub@redhat.com>
146
147 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
148
d087b5dc
UD
1492003-09-11 Ulrich Drepper <drepper@redhat.com>
150
151 * pthread_mutex_lock.c: Minor code rearrangements.
152
7f08f55a
RM
1532003-09-05 Roland McGrath <roland@redhat.com>
154
155 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
156 Instead, include ../nptl_db/db_info.c to do its magic.
157 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
158 (__pthread_pthread_key_2ndlevel_size): Likewise.
159 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
160 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
161 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
162 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
163 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
164 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
165 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
166 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
167 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
168 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
169 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
170 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
171 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
172 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
173 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
174 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
175 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
176
806e4a4a
UD
1772003-09-08 Ulrich Drepper <drepper@redhat.com>
178
179 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
180 of pthread_t to be compatible with LT.
181 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
182 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
183 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
184 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
185 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
186 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
187 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
188
17f83e56
UD
1892003-09-04 Ulrich Drepper <drepper@redhat.com>
190
191 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
192
58e8ec84
UD
1932003-09-04 Jakub Jelinek <jakub@redhat.com>
194
195 * unwind-forcedunwind.c: Move to...
196 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
197 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
198 * sysdeps/pthread/jmpbuf-unwind.h: New file.
199 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
200 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
201 * unwind.c: Include jmpbuf-unwind.h.
202 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
203
abf1cf21
JJ
2042003-09-02 Jakub Jelinek <jakub@redhat.com>
205
4a244f0d
UD
206 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
207 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
208 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
209 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
210 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
211 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
212 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
213 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
214 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
215 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
216 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
217 function.
218 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
219 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
220 * Makefile (tests): Add tst-stack2.
221 * tst-stack2.c: New test.
222 * tst-stack1.c: Include limits.h and sys/param.h.
223 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
224
e29ef647
UD
225 * pthread_condattr_setpshared.c: Include errno.h.
226 (pthread_condattr_setpshared): Return EINVAL if pshared
227 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
228
5777d565
UD
229 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
230 defined symbol for entry point to avoid cancellation.
231 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
232 Likewise.
233 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
234 Likewise.
235 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
236 Likewise.
237 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
238 Likewise.
239 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
240 Likewise.
241 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
242 __close_nocancel, __read_nocancel, __write_nocancel,
243 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
244 libpthread.so or librt.so, define to corresponding function
245 without _nocancel suffix.
246 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
247 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
248 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
249
abf1cf21
JJ
250 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
251
8348dcc8
UD
2522003-09-02 Ulrich Drepper <drepper@redhat.com>
253
254 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1e03e0af 255 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8348dcc8
UD
256
257 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
258 in subsections has a symbol associated with it.
259
260 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
261 defined symbol for entry point to avoid cancellation.
262 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
263
c874a32e
UD
2642003-09-01 Jakub Jelinek <jakub@redhat.com>
265
266 * Makefile (tests): Add tst-tls5.
267 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
268 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
269 ($(objpfx)tst-tls5): New.
270 ($(objpfx)tst-tls6.out): Likewise.
271 (tests): Depend on $(objpfx)tst-tls6.out.
272 * tst-tls3.c: Include stdint.h and pthreaddef.h.
273 (do_test): Check pthread_self () return value alignment.
274 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
275 (tf): Check pthread_self () return value alignment.
276 * tst-tls5.c: New test.
277 * tst-tls5.h: New.
278 * tst-tls5mod.c: New.
279 * tst-tls5moda.c: New.
280 * tst-tls5modb.c: New.
281 * tst-tls5modc.c: New.
282 * tst-tls5modd.c: New.
283 * tst-tls5mode.c: New.
284 * tst-tls5modf.c: New.
285 * tst-tls6.sh: New test.
286
c503d3dc
UD
287 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
288 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
289 * init.c (pthread_functions): Initialize them.
290 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
291 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
292 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
293 pthread_cond_timedwait@@GLIBC_2.3.2.
294
48614753
JJ
2952003-09-01 Jakub Jelinek <jakub@redhat.com>
296
56a1b877
JJ
297 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
298 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
299 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
300 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
301 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
302 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
303
304 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
305
48614753
JJ
306 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
307 _POSIX_THREAD_PRIORITY_SCHEDULING.
308 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
309
28c97261
UD
3102003-08-31 Ulrich Drepper <drepper@redhat.com>
311
eef80cf8
UD
312 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
313 nested function, use static inline function from libio.h.
314 Code by Richard Henderson.
315
28c97261
UD
316 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
317 weak.
318
cd2fbe58
UD
3192003-08-30 Jakub Jelinek <jakub@redhat.com>
320
321 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
322 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
323 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
324 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
325 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
326 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
327 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
328 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
329 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
330 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
331 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
332 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
333 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
334 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
335 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
336 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
337 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
338 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
339 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
340 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
341 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
342 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
343 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
344 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
345 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
346 * sysdeps/sparc/tls.h: New file.
347 * sysdeps/sparc/tcb-offsets.sym: New file.
348 * sysdeps/sparc/Makefile: New file.
349 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
350 * init.c [__sparc__] (__NR_set_tid_address): Define.
351
feda52c0
UD
3522003-08-29 Jakub Jelinek <jakub@redhat.com>
353
354 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
355 _IO_release_lock): Define.
356
7c868816
JJ
3572003-08-29 Jakub Jelinek <jakuB@redhat.com>
358
0261d33f 359 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7c868816
JJ
360 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
361
68b9e1ae
UD
3622003-08-27 Ulrich Drepper <drepper@redhat.com>
363
364 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
365 (__pthread_cleanup_class): Add missing return types of member
366 functions.
367
13b3edfc
UD
3682003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
369
370 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
371 (lll_mutex_unlock_force): Add memory barrier between store and futex
372 syscall.
373
bb606fbe
UD
3742003-08-25 Ulrich Drepper <drepper@redhat.com>
375
376 * tst-cancel4.c (do_test): Also unlink tempfname and remove
377 tempmsg in first loop.
378
ee4e5a3d
UD
3792003-08-18 Ulrich Drepper <drepper@redhat.com>
380
381 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
382 _POSIX_THREAD_PRIORITY_SCHEDULING.
383 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
384
334fcf2a
UD
3852003-08-07 Jakub Jelinek <jakub@redhat.com>
386
387 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
388 (__rtld_lock_default_lock_recursive,
389 __rtld_lock_default_unlock_recursive): Define.
390 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
391 __rtld_lock_unlock_recursive): Define using
392 GL(_dl_rtld_*lock_recursive).
393 * init.c (__pthread_initialize_minimal_internal): Initialize
394 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
395 Lock GL(_dl_load_lock) the same number of times as
396 GL(_dl_load_lock) using non-mt implementation was nested.
397
398 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
399 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
400
a30fb2df
UD
4012003-08-06 Jakub Jelinek <jakub@redhat.com>
402
403 * tst-cancel17.c (do_test): Make len2 maximum of page size and
404 PIPE_BUF.
405
ce0d30a0
JJ
4062003-08-07 Jakub Jelinek <jakub@redhat.com>
407
408 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
409
9c988b83
UD
4102003-08-03 Jakub Jelinek <jakub@redhat.com>
411
412 * sysdeps/pthread/createthread.c (do_clone): Move error handling
413 to first syscall error check. Move syscall error check for tkill
414 into __ASSUME_CLONE_STOPPED #ifdef.
415
5c5252bd
UD
4162003-08-02 Ulrich Drepper <drepper@redhat.com>
417
f1205aa7
UD
418 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
419 is not defined, do explicit synchronization.
420 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
421 is not defined also unlock pd->lock for non-debugging case in case
422 it is necessary.
423 * pthread_create.c (start_thread): Always get and release pd->lock
424 if __ASSUME_CLONE_STOPPED is not defined.
425 (start_thread_debug): Removed. Adjust users.
426 * allocatestack.c (allocate_stack): Always initialize lock if
427 __ASSUME_CLONE_STOPPED is not defined.
428 * Makefile (tests): Add tst-sched1.
429 * tst-sched1.c: New file.
430
5c5252bd
UD
431 * sysdeps/pthread/createthread.c (do_clone): Only use
432 sched_setschduler and pass correct parameters.
433
973d66e4
UD
4342003-07-31 Jakub Jelinek <jakub@redhat.com>
435
436 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
437 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
438 PTHREAD_STACK_MIN in comments.
439
d347a4ab
UD
4402003-07-31 Jakub Jelinek <jakub@redhat.com>
441
442 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
443 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
444 argument.
445 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
446 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
447 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
448 (__pthread_cleanup_upto): Fix prototype.
449 (_longjmp_unwind): Adjust caller.
450 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
451 Change second argument to const struct pointer.
452 * tst-sem8.c (main): Remove unused s2 and s3 variables.
453 * tst-sem9.c (main): Likewise.
454 * unwind.c: Include string.h for strlen prototype.
455
1b26e9a5
UD
4562003-07-31 Ulrich Drepper <drepper@redhat.com>
457
458 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
459 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
460 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
461 Define HAVE_CMOV.
462 Patch by Nicholas Miell <nmiell@attbi.com>.
463
adc12574
UD
4642003-07-30 Jakub Jelinek <jakub@redhat.com>
465
466 * init.c (__pthread_initialize_minimal_internal): Initialize
467 GL(dl_init_static_tls).
468 * pthreadP.h (__pthread_init_static_tls): New prototype.
469 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
470 New functions.
471 * Makefile (tests): Add tst-tls4.
472 (modules-names): Add tst-tls4moda and tst-tls4modb.
473 ($(objpfx)tst-tls4): Link against libdl and libpthread.
474 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
475 tst-tls4modb.so.
476 * tst-tls4.c: New file.
477 * tst-tls4moda.c: New file.
478 * tst-tls4modb.c: New file.
479
a7f6c66e
RM
4802003-06-19 Daniel Jacobowitz <drow@mvista.com>
481
482 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
483 before __timer_dealloc.
484 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
485 Don't call list_unlink.
486
172ce013
RM
4872003-07-29 Roland McGrath <roland@redhat.com>
488
489 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
490
7b787f85
UD
4912003-07-25 Jakub Jelinek <jakub@redhat.com>
492
493 * tst-cancel17.c (do_test): Check if aio_cancel failed.
494 Don't reuse struct aiocb A if it failed.
495 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
496 not just one byte, as that does not block.
497
0e9d6240
UD
4982003-07-22 Jakub Jelinek <jakub@redhat.com>
499
9d79e037
UD
500 * sysdeps/pthread/unwind-resume.c: New file.
501 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
502 unwind-resume in csu subdir.
503 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
504 exceptions.
505 (librt-sysdep_routines, librt-shared-only-routines): Add
506 rt-unwind-resume.
507 * sysdeps/pthread/rt-unwind-resume.c: New file.
508 * unwind-forcedunwind.c: New file.
509 * Makefile (libpthread-routines): Add unwind-forcedunwind.
510 (libpthread-shared-only-routines): Likewise.
511 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
512 * pthreadP.h (pthread_cancel_init): New prototype.
513 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
514
515 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
516 attr argument const struct pthread_attr *.
517
0e9d6240
UD
518 * res.c (__res_state): Return __resp.
519 * descr.h: Include resolv.h.
520 (struct pthread): Add res field.
521 * pthread_create.c: Include resolv.h.
522 (start_thread): Initialize __resp.
523 * Makefile (tests): Add tst-_res1.
524 (module-names): Add tst-_res1mod1, tst-_res1mod2.
525 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
526 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
527 libpthread.
528 * tst-_res1.c: New file.
529 * tst-_res1mod1.c: New file.
530 * tst-_res1mod2.c: New file.
531
1a379ea0
UD
5322003-07-21 Ulrich Drepper <drepper@redhat.com>
533
7e939b21
UD
534 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
535
1a379ea0
UD
536 * Makefile: Define various *-no-z-defs variables for test DSOs
537 which has undefined symbols.
538
ca86a763
UD
5392003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
540
541 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
542 Retry if the stwcx fails to store once_control.
543
80f536db
UD
5442003-07-20 Ulrich Drepper <drepper@redhat.com>
545
546 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
547 pthread_attr_setaffinity.
548 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
549 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
550 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
551 * pthread_attr_destroy.c: Free cpuset element if allocated.
552 * pthread_create.c: Pass iattr as additional parameter to
553 create_thread.
554 * sysdeps/pthread/createthread.c: If attribute is provided and
555 a new thread is created with affinity set or scheduling parameters,
556 start thread with CLONE_STOPPED.
557 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
558 pthread_attr_setaffinity.
559 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
560 cpuset element.
561
73299943
UD
5622003-07-15 Ulrich Drepper <drepper@redhat.com>
563
564 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
565
da35d15e
UD
5662003-07-14 Ulrich Drepper <drepper@redhat.com>
567
568 * sysdeps/pthread/configure.in: Require CFI directives also for
569 ppc and s390.
570
75540d8a
UD
5712003-07-15 Jakub Jelinek <jakub@redhat.com>
572
573 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
574 Add cfi directives.
575
4a17085f
UD
5762003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
577
578 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
579 CLEANUP_JMP_BUF.
580 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
581 registers as variables. Call __pthread_mutex_unlock_usercnt.
582 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
583 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
584 not self pointer in __writer. Compare with TID to determine
585 deadlocks.
586 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
587 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
588 Likewise.
589 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
590 Likewise.
591 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
592 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
593 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
594 macros also when compiling librt.
595
6080ecdf
UD
5962003-07-11 Jakub Jelinek <jakub@redhat.com>
597
598 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
599 -fasynchronous-unwind-tables.
600 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
601 (PSEUDO): Add cfi directives.
602 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
603 Likewise.
604 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
605 Likewise.
606
da0c02ee
UD
6072003-07-08 Jakub Jelinek <jakub@redhat.com>
608
609 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
610 __pthread_unregister_cancel): Add prototypes and hidden_proto.
611 * unwind.c (__pthread_unwind_next): Add hidden_def.
612 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
613 Likewise.
614 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
615 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
616 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
617 Likewise.
618 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
619 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
620 Likewise.
621 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
622 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
623 __pthread_unregister_cancel and __pthread_unwind_next.
624
57a5ea02
UD
6252003-07-04 Jakub Jelinek <jakub@redhat.com>
626
627 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
628 different symbol for the cancellation syscall wrapper and
629 non-cancellation syscall wrapper.
630 (PSEUDO_END): Define.
631
d810b358
UD
6322003-07-05 Richard Henderson <rth@redhat.com>
633
634 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
635 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
636 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
637 return actual return value from the syscall, not 0.
638
db54f488
UD
6392003-07-07 Ulrich Drepper <drepper@redhat.com>
640
641 * descr.h (struct pthread): Add pid field.
642 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
643 (__reclaim_stacks): Likewise.
644 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
645 also check for PID of the signal source.
646 (__pthread_initialize_minimal_internal): Also initialize pid field
647 of initial thread's descriptor.
648 * pthread_cancel.c: Use tgkill instead of tkill if possible.
649 * sysdeps/unix/sysv/linux/fork.c: Likewise.
650 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
651 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
652 * sysdeps/unix/sysv/linux/raise.c: Likewise.
653
5e497a41
UD
6542003-07-05 Ulrich Drepper <drepper@redhat.com>
655
656 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
657 Fix use of parameter.
658 (__libc_cleanup_pop): Likewise.
659
86a0c4fa
UD
6602003-07-04 Ulrich Drepper <drepper@redhat.com>
661
662 * init.c (sigcancel_handler): Change parameters to match handler
663 for SA_SIGACTION. Check signal number and code to recognize
664 invalid invocations.
665
bdbecaa3
RM
6662003-07-03 Roland McGrath <roland@redhat.com>
667
668 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
669 Apply sizeof (struct pthread) bias to r13 value.
670
56421b23
UD
6712003-07-03 Ulrich Drepper <drepper@redhat.com>
672
fbd90f6c
UD
673 * sysdeps/pthread/configure.in: Require CFI directives.
674
56421b23
UD
675 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
676 definition.
677 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
678 libpthread compilation.
679 * unwind.c (__pthread_unwind): Add hidden_def.
680 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
681
ca2b4cd7
UD
6822003-07-01 Ulrich Drepper <drepper@redhat.com>
683
684 * libc-cancellation.c (__libc_cleanup_routine): Define.
685 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
686 (__pthread_cleanup_pop): Define.
687
f036e569
UD
6882003-07-01 Richard Henderson <rth@redhat.com>
689
690 * sysdeps/alpha/elf/pt-initfini.c: New file.
691 * sysdeps/alpha/pthread_spin_lock.S: New file.
692 * sysdeps/alpha/pthread_spin_trylock.S: New file.
693 * sysdeps/alpha/pthreaddef.h: New file.
694 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
695 * sysdeps/alpha/tls.h: New file.
696 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
697 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
698 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
699 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
700 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
701 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
702 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
703 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
704 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
705 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
706
3b985826
UD
7072003-07-01 Ulrich Drepper <drepper@redhat.com>
708
709 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
710 cleanup support and unwind info.
711
3a4d1e1e
UD
7122003-06-30 Ulrich Drepper <drepper@redhat.com>
713
714 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
715 Use correct cleanup handler registration. Add unwind info.
96c814d3
UD
716 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
717 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
3a4d1e1e
UD
718 * tst-once3.c: Add cleanup handler and check it is called.
719 * tst-once4.c: Likewise.
720 * tst-oncex3.c: New file.
721 * tst-oncex4.c: New file.
722 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
723
e479cc8e
UD
7242003-06-29 Ulrich Drepper <drepper@redhat.com>
725
726 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
727
7d7ff54c
UD
7282003-06-27 Ulrich Drepper <drepper@redhat.com>
729
483e95d0
UD
730 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
731 (tf_msgsnd): Likewise.
732
7d7ff54c
UD
733 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
734 premature returns a bit more.
735
7539c7ec
UD
7362003-06-26 Ulrich Drepper <drepper@redhat.com>
737
738 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
739 definition to the front.
740
741 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
742 the cleanup functions to make the names unique. Fix dwarf opcode
743 un unwind table.
744 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
745 functions to make the names unique. Fix CFA offset for two blocks.
746
0af6a1d9
UD
7472003-06-25 Ulrich Drepper <drepper@redhat.com>
748
749 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
750 missing closing braces.
751 Patch by Christophe Saout <christophe@saout.de>.
752
eef4a9f3
RM
7532003-06-24 Roland McGrath <roland@redhat.com>
754
755 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
756
4165d44d
UD
7572003-06-24 Ulrich Drepper <drepper@redhat.com>
758
7f8f7b9d
UD
759 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
760 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
761
4165d44d
UD
762 * pthreadP.h: Declare __find_thread_by_id.
763 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
764 * pthread_clock_gettime.c: Allow using other thread's clock.
765 * pthread_clock_settime.c: Likewise.
766 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
767 * Makefile: Add rules to build and run tst-clock2.
768 * tst-clock2.c: New file.
769
67b78ef9
UD
7702003-06-23 Ulrich Drepper <drepper@redhat.com>
771
772 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
773 to use exception-based cleanup handler.
774 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
775
776 * tst-cond8.c (ch): Announce that we are done.
777
778 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
779
780 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
781 Also test aio_suspend with timeout value.
782
61623643
UD
7832003-06-22 Ulrich Drepper <drepper@redhat.com>
784
3a4f2043
UD
785 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
786 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
787 attribute_hidden.
788
61623643
UD
789 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
790 (__pthread_mutex_lock_internal): Likewise.
791 (__pthread_mutex_unlock_internal): Likewise.
792 (__pthread_mutex_unlock_usercnt): Declare.
793 * pthread_mutex_destroy.c: Always fail if used in any way.
794 * pthread_mutex_init.c: Update comment.
795 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
796 * pthread_mutex_timedlock.c: Adjust __nusers.
797 * pthread_mutex_trylock.c: Adjust __nusers.
798 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
799 and public interfaces are wrapper with pass additional parameter.
800 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
801 parameter zero.
802 * tst-mutex8.c: New file.
803 * Makefile (tests): Add tst-mutex8.
804 * sysdeps/pthread/pthread_cond_timedwait.c: Call
805 __pthread_mutex_unlock_usercnt.
806 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
808 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
809 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
810 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
811 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
812 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
813 Add __nusers.
814 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
815 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
816 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
817 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
818 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
819
820 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
821 * pthread_mutex_timedlock.c: Likewise.
822 * pthread_mutex_trylock.c: Adjust __nusers.
823 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
824 * tst-mutex9.c: New file.
825 * Makefile (tests): Add tst-mutex9.
826 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
827 * sysdeps/ia64/tls.h: Likewise.
828 * sysdeps/powerpc/tls.h: Likewise.
829 * sysdeps/s390/tls.h: Likewise.
830 * sysdeps/sh/tls.h: Likewise.
831 * sysdeps/x86_64/tls.h: Likewise.
832 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
833 Change type of __owner.
834 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
835 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
836 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
837 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
838 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
839
9bdabb94
UD
8402003-06-19 Jakub Jelinek <jakub@redhat.com>
841
842 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
843 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
844
845 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
846 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
847 instead of nr to lll_futex_wake. Only set errno and return -1
848 if err < 0.
849
850 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
851 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
852 return actual return value from the syscall, not 0.
853
f6c93bd9
UD
8542003-06-18 Ulrich Drepper <drepper@redhat.com>
855
ca343e73
UD
856 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
857 find a random value.
858 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
859 errno==EIDRM.
860
50441a98
UD
861 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
862 compat_timer_settime.
863 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
864 compat_timer_gettime.
865 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9bdabb94 866 compat_timer_getoverrun.
50441a98
UD
867 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
868 compat_timer_delete.
869
f6c93bd9
UD
870 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
871 error-checking mutex detect busy mutexes.
872
047aec8f
UD
8732003-06-17 Ulrich Drepper <drepper@redhat.com>
874
1d53508d
UD
875 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
876 Add ax to clobber list.
877 (lll_mutex_cond_lock): Likewise.
878 (lll_mutex_unlock): Likewise.
879 (lll_lock): Likewise.
880 (lll_unlock): Likewise.
881
f23b30e2
UD
882 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
883 * tst-cancel18.c: New file.
884 * tst-cancelx18.c: New file.
885
886 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
887 and tcdrain.
888
889 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
890 * tst-cancel17.c: New file.
891 * tst-cancelx17.c: New file.
892
893 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
894 * sysdeps/unix/sysv/linux/sigwait.c: New file.
895 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
896
047aec8f
UD
897 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
898
bbde8527
UD
8992003-06-16 Jakub Jelinek <jakub@redhat.com>
900
901 * sysdeps/pthread/createthread.c (create_thread): Set
902 header.multiple_threads unconditionally.
903 * allocatestack.c (allocate_stack): Likewise.
904 * descr.h (struct pthread): Add header.multiple_threads
905 unconditionally.
906 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
907 Define for librt. #error if neither libpthread, libc nor librt.
908 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
909 Likewise.
910 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
911 CDISABLE): Likewise.
912 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
913 CDISABLE): Likewise.
914 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
915 CDISABLE): Likewise.
916 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
917 CDISABLE): Likewise. Access header.multiple_threads outside of
918 libc and libpthread.
919 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
920 Likewise.
921 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
922 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
923
26676450
UD
9242003-06-17 Ulrich Drepper <drepper@redhat.com>
925
926 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
927 Also test early cancellation before the thread reaches the cancellation
928 point.
929
930 * Makefile: Compile forward.c with exceptions.
931
932 * sysdeps/unix/sysv/linux/sleep.c: New file.
933
301a6724
UD
9342003-06-16 Ulrich Drepper <drepper@redhat.com>
935
0e0deb03
UD
936 * Makefile: Add CFLAGS definition to compile function wrappers
937 duplicated from libc with exceptions.
938 * tst-cancel4.c: Also check cancellation handlers.
939
301a6724
UD
940 * Makefile: Add rules to build and run tst-cancel16 and
941 tst-cancelx16. Add missing CFLAGS definitions.
942 * tst-cancel16.c: New file.
943 * tst-cancelx16.c: New file.
944
7a114794
UD
9452003-06-15 Ulrich Drepper <drepper@redhat.com>
946
452aea84
UD
947 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
948 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
949 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
950 (DL_SYSINFO_IMPLEMENTATION): Likewise.
951
7a114794
UD
952 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
953 (LIBC_CANCEL_RESET): Likewise.
954 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
955 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
956 librt-cancellation.
957 (CFLAGS-libcrt-cancellation.c): Define.
958 * sysdeps/pthread/librt-cancellation.c: New file.
959 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
960 macros also when compiling librt.
961 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
962 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
963 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
964 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
965 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
966 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
967 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
968
969 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
970 compat_timer_create.
971
8ba1d429
UD
9722003-06-14 Ulrich Drepper <drepper@redhat.com>
973
cc8fb6f3
UD
974 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
975
8ba1d429
UD
976 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
977 __register_atfork.
978 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
979 Add libc_hidden_def.
980
d4f100e2
RM
9812003-06-13 Roland McGrath <roland@redhat.com>
982
983 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
984 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
985
dd9423a6
UD
9862003-06-11 Ulrich Drepper <drepper@redhat.com>
987
988 * allocatestack.c (queue_stack): Always inline.
989 * ptreadhP.h (__do_cancel): Likewise.
990
ed24330d
JJ
9912003-06-10 Jakub Jelinek <jakub@redhat.com>
992
993 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
994 a typo.
995
06120d79
UD
9962003-06-10 Ulrich Drepper <drepper@redhat.com>
997
998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
999 (__pthread_cond_signal): Remove incorrect second addition for
1000 cond_lock!=0.
1001
b1720346
UD
10022003-06-09 Ulrich Drepper <drepper@redhat.com>
1003
5b318f85
UD
1004 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1005 (__pthread_cond_signal): Use correct futex pointer in
1006 __lll_mutex_lock_wait call.
1007
b1720346
UD
1008 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1009 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
1010
3e36c37d
UD
10112003-06-08 Ulrich Drepper <drepper@redhat.com>
1012
ecf7955d
UD
1013 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
1014 cancelable.
ed24330d 1015 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
ecf7955d
UD
1016 Likewise.
1017
3e36c37d
UD
1018 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
1019 hand-written CFI generation code. Since ENTRY/END also initiated
1020 CFI frames this caused two CFI sets to be generated.
1021
7726edc2
UD
10222003-06-07 Ulrich Drepper <drepper@redhat.com>
1023
1024 * cleanup_routine.c: New file.
1025 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
1026 * sysdeps/pthread/pthread.h: Add support for fully exception-based
1027 cleanup handling.
1028 * Makefile (libpthread-routines): Add cleanup_routine.
1029 Add more CFLAGS variables to compile with exceptions. Add comments
1030 why which file needs unwind tables.
1031 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
1032 tests.
1033 * tst-cancelx1.c: New file.
1034 * tst-cancelx2.c: New file.
1035 * tst-cancelx3.c: New file.
1036 * tst-cancelx4.c: New file.
1037 * tst-cancelx5.c: New file.
1038 * tst-cancelx6.c: New file.
1039 * tst-cancelx7.c: New file.
1040 * tst-cancelx8.c: New file.
1041 * tst-cancelx9.c: New file.
1042 * tst-cancelx10.c: New file.
1043 * tst-cancelx11.c: New file.
1044 * tst-cancelx12.c: New file.
1045 * tst-cancelx13.c: New file.
1046 * tst-cancelx14.c: New file.
1047 * tst-cancelx15.c: New file.
1048 * tst-cleanupx0.c: New file.
1049 * tst-cleanupx0.expect: New file.
1050 * tst-cleanupx1.c: New file.
1051 * tst-cleanupx2.c: New file.
1052 * tst-cleanupx3.c: New file.
1053
1054 * tst-cleanup0.c: Make standard compliant.
1055 * tst-cleanup1.c: Likewise.
1056
1057 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
1058 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1059 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1060 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1061 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1062 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1063 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
1064 CLEANUP_JMP_BUF.
1065 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1066 * tst-cancel12.c: New file.
1067 * tst-cancel13.c: New file.
1068 * tst-cancel14.c: New file.
1069 * tst-cancel15.c: New file.
1070 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
1071 and tst-cancel15.
1072
1073 * tst-cancel1.c: Add some comments.
1074
1075 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
1076 timeout correctly.
1077
7a8a8e21
UD
10782003-06-06 Ulrich Drepper <drepper@redhat.com>
1079
1080 * Makefile (CFLAGS-pthread_cancel.c): Define.
1081
4ad0bbf4
UD
10822003-06-05 Ulrich Drepper <drepper@redhat.com>
1083
1084 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
1085 Change type of __writer element to int.
1086 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1087 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1088 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1089 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1090 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1091 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
1092 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1093 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
1094 Compare with TID to determine deadlocks.
1095 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
1096 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1097 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
1098 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1099 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1100 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1101 Likewise.
1102 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1103 Likewise.
1104 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1105 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1106 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1107 Likewise.
1108 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1109 Likewise.
1110 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1111 * Makefile (tests): Add tst-rwlock12.
1112 * tst-rwlock12.c: New file.
1113
332faa96
JJ
11142003-06-05 Jakub Jelinek <jakub@redhat.com>
1115
1116 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
1117 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
1118 Remove bogus hidden_proto.
1119 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
1120 Likewise.
1121 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
1122 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
1123 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
1124 ___lll_mutex_timedlock): Likewise.
1125
29d9e2fd
UD
11262003-06-04 Ulrich Drepper <drepper@redhat.com>
1127
1128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1129 (__pthread_cond_signal): Add some code to eventually handle
1130 cond_lock!=0.
1131
6f1acb30
UD
11322003-06-01 Ulrich Drepper <drepper@redhat.com>
1133
1134 * Makefile (tests): Add tst-exec4.
1135 (tst-exec4-ARGS): Define.
1136 * tst-exec4.c: New file.
1137
49b65043
UD
11382003-05-31 Ulrich Drepper <drepper@redhat.com>
1139
31195be2
UD
1140 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1141 Also fail if tv_nsec < 0.
1142 (__lll_timedwait_tid): Likewise.
1143 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1144 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
1145 Likewise.
1146 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
1147 Likewise.
1148 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
1149 Likewise.
1150 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
1151 Likewise.
80b54217
UD
1152 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
1153 Likewise.
1154 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
1155 Likewise.
31195be2 1156
dcfc8224
UD
1157 * Makefile (tests): Add tst-sem8 and tst-sem9.
1158 * tst-sem8.c: New file.
1159 * tst-sem9.c: New file.
1160 * sem_open.c: Fix creation of in_use record if the file exists but
1161 no internal record.
1162
49b65043
UD
1163 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
1164 definitions.
1165
1166 * sysdeps/pthread/timer_create.c (timer_create): In case
1167 evp==NULL, assign timer ID to sival_ptr.
1168
1169 * descr.h (struct pthread_unwind_buf): Change type of prev element to
1170 struct pthread_unwind_buf *.
1171 (struct pthread): Likewise for cleanup_jmp_buf element.
1172
1173 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
1174 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
1175 * unwind.c (__pthread_unwind_next): Likewise.
1176
50794a45
UD
11772003-05-30 Ulrich Drepper <drepper@redhat.com>
1178
5d4f57bd
UD
1179 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1180 (lll_futex_timed_wait): Use int for futex value parameter.
1181 (lll_futex_wake): Likewise.
1182 (lll_futex_requeue): Likewise.
1183
1184 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
1185 Replace one memory operation with one register operation.
1186
1187 * tst-join4.c (do_test): Fix error message.
1188
7ab7ea33
UD
1189 * tst-rwlock6.c (do_test): Use correct format specifier.
1190
1191 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1192 (__lll_mutex_lock_wait): Replace one memory operation with one
1193 register operation.
1194 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
1195 (__lll_mutex_lock_wait): Likewise.
1196
50794a45
UD
1197 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1198 (__lll_mutex_cond_lock): Add one to value parameter of
1199 __lll_lock_wait to reflect reality in the futex syscall.
1200 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1201 (lll_mutex_cond_lock): Likewise.
1202
5a70784e
JJ
12032003-05-30 Jakub Jelinek <jakub@redhat.com>
1204
1205 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
1206 New function.
1207 (lll_mutex_cond_lock): Define.
1208
e7c5ac68
UD
12092003-05-29 Ulrich Drepper <drepper@redhat.com>
1210
586d1748
UD
1211 * Makefile (tests): Add tst-signal6.
1212 * tst-signal6.c: New file.
1213
b8ba4a27
UD
1214 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
1215 (__lll_mutex_unlock_force): New function
1216 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
1217
65d46efe
UD
1218 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1219 (__lll_mutex_unlock_force): New function.
1220 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
1221
1222 * tst-rwlock7.c (do_test): Use correct format specifier.
1223
e7c5ac68
UD
1224 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
1225 Find break parameter in correct asm argument.
1226
284bdc42
UD
12272003-05-27 Jakub Jelinek <jakub@redhat.com>
1228
1229 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
1230 Remove out4.
1231 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
1232 error occured.
1233 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1234 Add __mutex.
1235 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
1236 lll_futex_requeue, lll_mutex_unlock_force): Define.
1237
e7c5ac68
UD
12382003-05-30 Jakub Jelinek <jakub@redhat.com>
1239
1240 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1241 (pthread_cond_t): Add __mutex.
1242 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
1243 lll_futex_requeue, lll_mutex_unlock_force): Define.
1244
ea2630c6
UD
12452003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1246
1247 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
1248 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1249 Add __mutex field.
1250 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
1251 Define.
1252 (lll_futex_wait, lll_futex_wake): Define.
1253 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
1254 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
1255 FUTEX_REQUEUE instead of FUTEX_WAIT.
1256 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
1257 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
1258 mutex which was used in condvar structure. Call
1259 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
1260 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1261
1262 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
1263 include tcb-offsets.h. Read wakeup value in locked region.
1264 Use the value of gbr register as THREAD_ID.
1265 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1266 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1267 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1268
1269 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
1270 macros.
1271
5a77f150
UD
12722003-05-28 Ulrich Drepper <drepper@redhat.com>
1273
1274 * sysdeps/pthread/pthread_cond_broadcast.c
1275 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
1276
7661d9f7
UD
12772003-05-26 Ulrich Drepper <drepper@redhat.com>
1278
1279 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
1280 typo in register name.
1281 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
1282 correctly. Actually use requeue. Little optimization.
1283 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
1284 mutex address early. Handle cancellation state as 32-bit value.
1285 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1286 Remove unnecessary label.
1287
69431c9a
UD
12882003-05-25 Ulrich Drepper <drepper@redhat.com>
1289
1290 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
1291 instead of FUTEX_WAIT.
1292 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
1293 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1294 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1295 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1296 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1297 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
1298 used in condvar structure. Call __pthread_mutex_cond_lock instead
1299 of __pthread_mutex_lock_internal.
1300 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1301 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1302 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1303 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
1304 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1305 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1306 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
1307 Add pthread_mutex_cond_lock.
1308 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
1309 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
1310 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
1311 lll_mutex_cond_lock.
1312 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1313 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 1314 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 1315 Add __mutex field.
248a3490 1316 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
1317 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1318
1319 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
1320 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1321
1322 * pthreadP.h: Declare __pthread_mutex_cond_lock.
1323 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
1324 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
1325 macro don't define aliases.
1326
1327 * cancellation.c: Remove __pthread_enable_asynccancel_2.
1328 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
1329 * sysdeps/pthread/pthread_cond_timedwait.c: Use
1330 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
1331 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1332 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1333 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1334 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1335 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1336
fddfebbd
UD
13372003-05-17 Ulrich Drepper <drepper@redhat.com>
1338
1339 * sem_open.c: Fix one endless loop. Implement correct semantics
1340 wrt opening the same semaphore more then once.
1341 * sem_close.c: Adjust for sem_open change.
1342 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
1343 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
1344 * Makefile (tests): Add tst-sem7.
1345 * tst-sem7.c: New file.
1346
1eefffb0
RM
13472003-05-16 Roland McGrath <roland@redhat.com>
1348
1349 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
1350 uninitialized variable braino.
1351
6e66dc78
UD
13522003-05-16 Ulrich Drepper <drepper@redhat.com>
1353
23ae6451
UD
1354 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
1355 test for syscall availability.
1356
1357 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
1358 __no_posix_timers to -1 if the syscalls don't exist.
1359
7ac5b8e2
UD
1360 * pthread_join.c (pthread_join): Set tid field of the joined
1361 thread to -1. This isn't necessary but helps to recognize some
1362 error conditions with almost no cost.
1363
1364 * allocatestack.c (FREE_P): Also negative values indicate an
1365 unused stack.
1366
6e66dc78
UD
1367 * unwind.c: Include <unistd.h>.
1368
855dba3c
UD
13692003-05-14 Ulrich Drepper <drepper@redhat.com>
1370
1371 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
1372
81f3ac4c
UD
13732003-05-14 Jakub Jelinek <jakub@redhat.com>
1374
1375 * Makefile (crti-objs, crtn-objs): New variables.
1376 (omit-deps, extra-objs): Add crtn.
1377 ($(objpfx)libpthread.so): Depend on both crti and crtn
1378 and links to them in multidir.
1379 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
1380
7158eae4
UD
13812003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
1382
1383 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1384 (lll_mutex_unlock): Use atomic_exchange_rel.
1385
edf205d5
UD
13862003-05-11 Ulrich Drepper <drepper@redhat.com>
1387
1388 * cond-perf.c (cons): Add missing locking around setting of alldone.
1389
a3f979a7
UD
13902003-05-10 Ulrich Drepper <drepper@redhat.com>
1391
1392 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
1393 related macros.
1394 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1395
880867a4
UD
13962003-05-09 Ulrich Drepper <drepper@redhat.com>
1397
949ec764
UD
1398 * tst-sem6.c: New file.
1399 * Makefile (tests): Add tst-sem6.
1400
1401 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
1402 Use atomic_exchange_rel instead of atomic_exchange.
1403 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
1404 Likewise.
1405
1406 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
1407 code for lll_futex_wait and lll_futex_wake in static apps. Use
1408 vsyscall is possible.
1409
1410 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
1411 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
1412 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
1413 pthread_setaffinity_np.
1414 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
1415 and pthread_setaffinity_np.
1416 * Makefile (libpthread-routines): Add pthread_getaffinity and
1417 pthread_setaffinity.
1418
880867a4
UD
1419 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
1420 use it in case mmap to allocate the stack fails.
1421 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
1422 ARCH_MAP_FLAGS here.
1423 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
1424 ARCH_RETRY_MMAP.
1425
92d83c72
UD
14262003-05-08 Ulrich Drepper <drepper@redhat.com>
1427
1428 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
1429 handler implementation. It is now lockless in fork().
1430 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
1431 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1432 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
1433 declare the __fork_*_lists.
1434 (struct fork_handler): Include pointers to all three functions.
1435 Add next, refcntr and need_signal elements.
1436 (__fork_handlers): New declaration.
1437 (__register_atfork_malloc): Remove declaration.
1438 (HAVE_register_atfork_malloc): Remove definition.
1439 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
1440 __pthread_child_handler variable.
1441 (__libc_pthread_init): Use __register_atfork instead of explicitly
1442 adding to the list.
1443 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
1444 and lll_futex_wake.
1445 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1446
1447 * unwind.c (unwind_cleanup): Print error message and then abort. This
1448 function must never be reached.
1449
1450 * cond-perf.c: New file.
1451
be4d8038
UD
14522003-05-05 Ulrich Drepper <drepper@redhat.com>
1453
1454 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
1455
c6696b79
RM
14562003-05-04 Roland McGrath <roland@redhat.com>
1457
1458 * Makefile ($(objpfx)../libc.so): New target.
1459
7da168bf
UD
14602003-05-02 Ulrich Drepper <drepper@redhat.com>
1461
1462 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1463 (pthread_condattr_t): Size is only an int, don't use long for
1464 alignment.
1465 (pthread_mutexattr_t): Likewise.
7da168bf
UD
1466 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1467 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1468 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1469
9a7178d6
UD
14702003-05-01 Ulrich Drepper <drepper@redhat.com>
1471
1472 * sysdeps/i386/tls.h: Define THREAD_ID.
1473 * sysdeps/ia64/tls.h: Likewise.
1474 * sysdeps/powerpc/tls.h: Likewise.
1475 * sysdeps/s390/tls.h: Likewise.
1476 * sysdeps/sh/tls.h: Likewise.
1477 * sysdeps/x86_64/tls.h: Likewise.
1478 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
1479 record ownership.
1480 * pthread_mutex_timedlock.c: Likewise.
1481 * pthread_mutex_trylock.c: Likewise.
1482 * pthread_mutex_unlock.c: Likewise.
1483 * pthread_rwlock_trywrlock.c: Likewise.
1484 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
1485 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1486 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1487 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1488
1489 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
1490 flag.
1491
a234e27d
UD
14922003-04-29 Jakub Jelinek <jakub@redhat.com>
1493
1494 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1495 (__SIZEOF_PTHREAD_COND_T): Define to 48.
1496 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
1497 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1498 Make __align long long instead of long.
1499 (pthread_rwlock_t): Formatting.
1500 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
1501 (pthread_rwlock_t): Formatting.
1502 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1503 (pthread_cond_t): Make __align long long instead of long.
1504 (pthread_rwlock_t): Move __flags field to the same position as in
1505 linuxthreads.
1506
f025c136
UD
15072003-04-30 Ulrich Drepper <drepper@redhat.com>
1508
1509 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
1510 * tst-rwlock7.c (do_test): Likewise.
1511
7531ab9e
RM
15122003-04-26 Roland McGrath <roland@redhat.com>
1513
1514 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
1515
299601a1
UD
15162003-04-22 Jakub Jelinek <jakub@redhat.com>
1517
299601a1
UD
1518 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
1519 sizeof (struct pthread).
1520 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 1521 1 struct pthread.
299601a1
UD
1522 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
1523 to 0.
1524 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1525 struct pthread.
1526 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1527 to 32-bit bytes.
1528 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1529 tcbp.
1530 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1531 unneccessarily.
1532 (NO_TLS_OFFSET): Define.
299601a1
UD
1533 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
1534 add TLS_TCB_SIZE unnecessarily.
299601a1 1535
950094f8
RM
15362003-04-22 Roland McGrath <roland@redhat.com>
1537
1538 * Makeconfig (shared-thread-library): Reverse link order to work
1539 around linker bug.
1540
dc2f6455
UD
15412003-04-22 Ulrich Drepper <drepper@redhat.com>
1542
1543 * semaphore.h: Fix typo in comment.
1544
e7608d77
UD
15452003-04-21 Ulrich Drepper <drepper@redhat.com>
1546
6a87ee19
UD
1547 * sysdeps/pthread/sigfillset.c: New file.
1548
e7608d77
UD
1549 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
1550 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
1551 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
1552 * sysdeps/pthread/sigaction.c: Likewise.
1553 * sysdeps/pthread/sigprocmask.c: New file.
1554 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
1555 __SIGRTMIN+1.
1556 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1557 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
1558 in this case.
1559
0b3df49e
UD
15602003-04-19 Ulrich Drepper <drepper@redhat.com>
1561
58a7a325
UD
1562 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1563 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
1564
0b3df49e
UD
1565 * sysdeps/unix/sysv/linux/unregister-atfork.c
1566 (__unregister_atfork): Don't free memory not allocated dynamically.
1567
1568 * semaphore.h: Remove __THROW marker from cancellation points.
1569 * nptl/sysdeps/pthread/pthread.h: Likewise.
1570
7d74651e
UD
15712003-04-18 Ulrich Drepper <drepper@redhat.com>
1572
76a67697
UD
1573 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
1574 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
1575 __THROW.
1576
dd9d6538
JJ
15772003-04-16 Jakub Jelinek <jakub@redhat.com>
1578
1579 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
1580
4ab6f47c
RM
15812003-04-15 Roland McGrath <roland@redhat.com>
1582
1583 * forward.c (__pthread_unwind): Tweak to avoid warning.
1584
162434a6
UD
15852003-04-15 Ulrich Drepper <drepper@redhat.com>
1586
1587 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
1588
35909161
UD
15892003-04-14 Ulrich Drepper <drepper@redhat.com>
1590
18ddd3aa 1591 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
1592 overflow CFA advance instructions.
1593 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1594
18a8e730
UD
15952003-04-14 Jakub Jelinek <jakub@redhat.com>
1596
bd4f43b4
UD
1597 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
1598 * sysdeps/i386/pthread_spin_lock.c: Likewise.
1599 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
1600 defined.
1601
18a8e730
UD
1602 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
1603 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
1604 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1605 DW_CFA_advance_loc for .Laddl-.Lsubl.
1606
08c765fa
UD
16072003-04-13 Ulrich Drepper <drepper@redhat.com>
1608
18a8e730
UD
1609 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
1610 position-independent unwind data for static libraries.
1611 Add missing unwind info. Add comments.
1612
ad2be852
UD
1613 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
1614 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1615 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
1616 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1617
177d1ad3
UD
16182003-04-12 Ulrich Drepper <drepper@redhat.com>
1619
08c765fa
UD
1620 * Makefile: Make sure all cancellation points are compiled with
1621 exception and asynchronous unwind tables.
1622
177d1ad3
UD
1623 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
1624 which mishandles loading of global object addresses in PIC.
1625 (THREAD_SETMEM_NC): Likewise.
1626
09d65ff3
UD
16272003-04-11 Ulrich Drepper <drepper@redhat.com>
1628
1629 * pthread.h: Define new data structure for cleanup buffer. Declare
1630 new cleanup handler interfaces.
1631 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
1632 (struct pthread): Add cleanup_jmp_buf pointer. Define
1633 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
1634 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
1635 it. Declare old cleanup handler installation functions.
1636 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
1637 handling.
1638 * cleanup_defer.c: Likewise.
1639 * cleanup_compat.c: New file. Old cleanup code.
1640 * cleanup_def_compat.c: New file. Old cleanup code.
1641 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
1642 if own thread descriptor.
1643 * unwind.c: New file.
1644 * forward.c: Add __pthread_unwind.
1645 * init.c (pthread_functions): Add __pthread_unwind.
1646 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
1647 Add ptr___pthread_unwind.
1648 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
1649 and unwind function.
1650 * Makefile (libpthread-routines): Add cleanup_compat,
1651 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
1652 table generation if necessary.
1653 * version.c: Record whether unwind support is compiled in.
1654 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
1655 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
1656 handler interfaces.
1657 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
1658 complication to generate unwind information for syscall wrappers.
68107ec0 1659 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
1660 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
1661 __cleanup_fct_attribute.
1662
1663 * Makefile: Add rules to build and run tst-cleanup0.
1664 * tst-cleanup0.c: New file.
1665 * tst-cleanup0.expect: New file.
1666
1667 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
1668 caller. Optimize to avoid often unecessary local variable.
1669
0dc44b51
RM
16702003-04-11 Roland McGrath <roland@redhat.com>
1671
1672 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
1673 sets variable `multidir'; include that.
1674 (generated): Add it.
1675 ($(objpfx)$(multidir)/crti.o): New target.
1676 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
1677
84a80719
UD
16782003-04-11 Ulrich Drepper <drepper@redhat.com>
1679
1680 * tst-attr2.c (do_test): Add cast to avoid warning.
1681 * tst-mutex4.c (do_test): Likewise.
1682
88ff4759
UD
16832003-04-10 Ulrich Drepper <drepper@redhat.com>
1684
1685 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
1686 in child.
1687
b2041097
UD
16882003-04-09 Ulrich Drepper <drepper@redhat.com>
1689
1690 * Makefile (tests): Add tst-detach1.
1691 * tst-detach1.c: New file.
1692
f9657e88
UD
16932003-04-08 Ulrich Drepper <drepper@redhat.com>
1694
9afe4964
UD
1695 * sysdeps/pthread/pthread.h: Remove duplicate
1696 pthread_cleanup_{push,pop} definitions.
1697
f9657e88
UD
1698 * tst-barrier2.c: Eliminate warnings.
1699 * tst-cancel4.c: Likewise.
1700 * tst-cond4.c: Likewise.
1701 * tst-cond6.c: Likewise.
1702 * tst-detach1.c: Likewise.
1703 * tst-rwlock4.c: Likewise.
1704 * tst-rwlock6.c: Likewise.
1705 * tst-rwlock7.c: Likewise.
1706 * tst-sem3.c: Likewise.
1707 * tst-spin2.c: Likewise.
1708 * tst-umask1.c: Likewise.
1709
69b35e86
UD
17102003-04-07 Ulrich Drepper <drepper@redhat.com>
1711
1712 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
1713
c70ad7d7
UD
17142003-04-06 Ulrich Drepper <drepper@redhat.com>
1715
1716 * descr.h (struct pthread): Move cancelhandling member to the front.
1717
54e0138f
UD
17182003-04-05 Ulrich Drepper <drepper@redhat.com>
1719
1720 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
1721 malloc_parent, and malloc_child statically.
1722 (__register_atfork_malloc): New function.
1723 (free_mem): Don't free any of the malloc_* variables on the list.
1724 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
1725 Define HAVE_register_atfork_malloc.
1726
b22d701b
UD
17272003-04-04 Ulrich Drepper <drepper@redhat.com>
1728
1729 * sysdeps/pthread/createthread.c (create_thread): Add some more
1730 comments explaining when to set multiple_threads and when not.
1731
1732 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
1733 THREAD_ATOMIC_BIT_SET if not already defined.
1734 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
1735 THREAD_ATOMIC_BIT_SET:
1736 * sysdeps/x86_64/tls.h: Likewise.
1737 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
1738 THREAD_ATOMIC_CMPXCHG_VAL.
1739 (_pthread_cleanup_pop_restore): Likewise.
1740 * cancellation.c (__pthread_enable_asynccancel): Likewise.
1741 (__pthread_enable_asynccancel_2): Likewise.
1742 (__pthread_disable_asynccancel): Likewise.
1743 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
1744 (__libc_disable_asynccancel): Likewise.
1745 * init.c (sigcancel_handler): Likewise.
1746 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
1747 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
1748
86246935
UD
17492003-04-03 Ulrich Drepper <drepper@redhat.com>
1750
1751 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
1752 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
1753 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
1754 * Makefile (tests): Add tst-cancel11.
1755 * tst-cancel11.c: New file.
1756
6b4686a5
UD
17572003-04-01 Ulrich Drepper <drepper@redhat.com>
1758
1759 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
1760 round, not the first. Use specific_used flag instead of local
1761 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
1762 (__free_tcb): Don't call deallocate_tsd here.
1763 (start_thread): Call deallocate_tsd here.
1764 * pthread_setspecific.c: Set specific_used flag really only when
1765 needed.
0d73a73b 1766 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 1767 * tst-tsd3.c: New file.
0d73a73b 1768 * tst-tsd4.c: New file.
6b4686a5 1769
42b2395d
UD
17702003-03-31 Ulrich Drepper <drepper@redhat.com>
1771
211d90c5
UD
1772 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
1773 Use atomic_exchange_and_add instead of __lll_add.
1774 (__lll_mutex_timedlock): Likewise.
1775 Patch by Ian Wienand.
1776
17772003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
1778
1779 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1780 (SINGLE_THREAD_P): Fix typo.
1781 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
1782
17832003-03-31 Ulrich Drepper <drepper@redhat.com>
1784
1785 * Makefile (tests): Add tst-align.
1786 * tst-align.c: New file.
1787 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 1788
42b2395d
UD
1789 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
1790 function correctly.
1791
211d90c5
UD
1792 * tst-tsd2.c: Add casts to avoid warnings.
1793
163b180f
UD
17942003-03-30 Ulrich Drepper <drepper@redhat.com>
1795
1796 * descr.h (struct pthread): Move most often used elements to the front.
1797
ea473bad
UD
17982003-03-29 Ulrich Drepper <drepper@redhat.com>
1799
1800 * Makefile (libpthread-routines): Add pthread_atfork.
1801 (libpthread-static-only-routines): Add pthread_atfork.
1802
dd731d53
UD
18032003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1804
1805 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
1806 of TLS_DTV_AT_TP.
1807 (INSTALL_DTV): Add parens.
1808 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1809 Use passed descr instead of THREAD_SELF.
1810 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
1811 (__lll_mutex_timedlock_wait): Correct expected value after
1812 spurious wakeup.
1813 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
1814 Release lock before waking up the waiters.
1815 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
1816 criteria. Reorderstruct passed to cleanup handler. Fix
1817 handling of cancellation and failung pthread_mutex_unlock call.
1818 Use __pthread_enable_asynccancel_2 instead of
1819 __pthread_enable_asynccancel.
1820 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1821 Return result of lock re-get if it fails.
1822 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
1823 for __pthread_cleanup_push.
1824 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
1825 completely broken rwlock implementation.
1826 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1827 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1828 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1829 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1830 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1831 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
1832 versioned_symbol macro.
1833 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
1834 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1835
c75d02f0
UD
18362003-03-27 Ulrich Drepper <drepper@redhat.com>
1837
5f5004df
UD
1838 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
1839 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
1840 and __helper_tid.
1841 (struct timer): Remove th and bar field.
1842 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
1843 debugging code. Create only one helper thread.
1844 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
1845 helper thread.
1846 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1847 Renamed. Define statically. Use thread info from siginfo.
1848 (__helper_once): New variable.
1849 (__helper_tid): New variable.
1850 (__reset_helper_control): New function.
1851 (__start_helper_thread): New function.
1852
18d009ca
UD
1853 * pthread_create.c (start_thread): Don't use setjmp inside
1854 __builtin_expect to work around gcc bug.
1855
c75d02f0
UD
1856 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
1857 timer_delete syscall fails, but not with ENOSYS, set
1858 __no_posix_timers.
1859
1860 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
1861 (timer_settime): Fix typo.
28cf3058
UD
1862 * sysdeps/unix/sysv/linux/timer_getoverr.c
1863 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 1864
049ac259
JJ
18652003-03-27 Jakub Jelinek <jakub@redhat.com>
1866
1867 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
1868 offset of cleanupbuf.__prev.
1869
f93d39dd
JJ
18702003-03-26 Jakub Jelinek <jakub@redhat.com>
1871
1872 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
1873 of included file.
1874
f064e4c5
UD
18752003-03-26 Ulrich Drepper <drepper@redhat.com>
1876
1877 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
1878 NULL provide default definition to syscall.
1879
83e886a3
RM
18802003-03-25 Roland McGrath <roland@redhat.com>
1881
1882 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
1883 (timer_id2ptr): Fix typo.
1884
09402f5b
UD
18852003-03-25 Ulrich Drepper <drepper@redhat.com>
1886
1887 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
1888 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
1889 * sysdeps/ia64/pthreaddef.h: Likewise.
1890 * sysdeps/powerpc/pthreaddef.h: Likewise.
1891 * sysdeps/s390/pthreaddef.h: Likewise.
1892 * sysdeps/sh/pthreaddef.h: Likewise.
1893 * sysdeps/x86_64/pthreaddef.h: Likewise.
1894 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
1895 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
1896 being changed.
1897 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
1898 SIGTIMER is not unblocked.
1899 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
1900 RT signal taken.
1901 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
1902 be send.
1903 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
1904 pass pointer through as ID.
1905 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
1906 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
1907 * sysdeps/unix/sysv/linux/timer_create.c: New file.
1908 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
1909 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
1910 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
1911 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
1912 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
1913 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
1914 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
1915 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
1916 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
1917 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
1918 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
1919 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
1920 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
1921 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
1922 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
1923 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
1924 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
1925 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
1926 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
1927 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
1928 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
1929 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
1930 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
1931 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
1932 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
1933 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
1934 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
1935 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
1936 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
1937 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
1938
1939 * pthreadP.h: Remove FRAME_LEFT definition.
1940 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
1941 already left frame. Programs which have this problem are not POSIX
1942 compliant.
1943 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
1944
5e826ab5
UD
19452003-03-24 Ulrich Drepper <drepper@redhat.com>
1946
1947 * sysdeps/pthread/tst-timer.c: Check return values of the
1948 functions we test.
1949
b910f788
RM
19502003-03-23 Roland McGrath <roland@redhat.com>
1951
3045a1fe
RM
1952 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
1953 * tst-tls3mod.c: Likewise.
1954 * tst-tls1.c: Likewise.
1955 * tst-tls2.c: Likewise.
1956
85047fe3
RM
1957 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
1958 undefined behavior.
1959
b910f788
RM
1960 * tst-join5.c (tf1, tf2): Add a cast.
1961
1962 * Makeconfig (includes): Append -I$(..)nptl to this variable.
1963
1964 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
1965 Don't test anything.
1966 * tst-cond4.c: Likewise.
1967 * tst-cond6.c: Likewise.
1968 * tst-flock2.c: Likewise.
1969 * tst-mutex4.c: Likewise.
1970 * tst-rwlock4.c: Likewise.
1971 * tst-signal1.c: Likewise.
1972 * tst-spin2.c: Likewise.
1973 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
1974
1975 * tst-mutex4.c: Use test-skeleton.c.
1976 * tst-spin2.c: Likewise.
1977 * tst-sysconf.c: Likewise.
1978 * tst-barrier2.c: Likewise.
1979 * tst-cond4.c: Likewise.
1980 * tst-cond6.c: Likewise.
1981 * tst-rwlock4.c: Likewise.
1982 * tst-unload.c: Likewise.
1983 * tst-flock2.c (do_test): Use return instead of exit.
1984
4baa087a
RM
19852003-03-22 Jakub Jelinek <jakub@redhat.com>
1986
1987 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1988
5a3ab2fc
UD
19892003-03-21 Ulrich Drepper <drepper@redhat.com>
1990
9f07eae2
UD
1991 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1992 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
1993 instead of __lll_compare_and_swap.
1994 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
1995 Likewise.
1996 Removed definition if __lll_compare_and_swap.
1997
5a3ab2fc
UD
1998 * cancellation.c: Adjust for new form of compare&exchange macros.
1999 * cleanup_defer.c: Likewise.
2000 * init.c: Likewise.
2001 * libc-cancellation.c: Likewise.
2002 * old_pthread_cond_broadcast.c: Likewise.
2003 * old_pthread_cond_signal.c: Likewise.
2004 * old_pthread_cond_timedwait.c: Likewise.
2005 * old_pthread_cond_wait.c: Likewise.
2006 * pthread_cancel.c: Likewise.
2007 * pthread_create.c: Likewise.
2008 * pthread_detach.c: Likewise.
2009 * pthread_join.c: Likewise.
2010 * pthread_key_delete.c: Likewise.
2011 * pthread_setcancelstate.c: Likewise.
2012 * pthread_setcanceltype.c: Likewise.
2013 * pthread_timedjoin.c: Likewise.
2014 * pthread_tryjoin.c: Likewise.
2015 * sysdeps/pthread/createthread.c: Likewise.
2016
b1aea098
UD
20172003-03-20 Ulrich Drepper <drepper@redhat.com>
2018
2019 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 2020 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
2021 definitions. Replace uses with calls to atomic_* functions.
2022 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2023 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
2024 __lll_test_and_set calls with atomic_exchange_and_add and
2025 atomic_exchange calls respectively.
2026 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2027 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2028 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
2029 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2030 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
2031 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
2032 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
2033
2034 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
2035 returns the old value.
2036
100a7100
RM
20372003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
2038
2039 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
2040 int for variable OLDVAL and correct inline assembler contraint.
2041 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
2042 type int for variable OLD.
2043
2044 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
2045 only for s390-32.
2046 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2047 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
2048 instead of multiple_threads field in the TCB.
2049
95767b36
UD
20502003-03-19 Ulrich Drepper <drepper@redhat.com>
2051
4009bf40
UD
2052 * sysdeps/i386/i686/bits/atomic.h: Removed.
2053 * sysdeps/i386/i586/bits/atomic.h: Removed.
2054 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
2055 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
2056 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
2057 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
2058 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
2059 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
2060 * atomic.h: Removed. Moved to glibc.
2061
560a784f
UD
2062 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
2063 support for clock selection.
2064
95767b36
UD
2065 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
2066 signalling waiters.
2067
043ad426
RM
20682003-03-18 Roland McGrath <roland@redhat.com>
2069
94659495
RM
2070 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
2071 Add __lll_rel_instr first. Add memory clobber.
2072 (lll_mutex_unlock): Use __lll_test_and_set.
2073 From Paul Mackerras <paulus@samba.org>.
2074
2075 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
2076 unconditionally.
2077 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2078 (SINGLE_THREAD_P): Add `header.' prefix.
2079 From Paul Mackerras <paulus@samba.org>.
2080
043ad426
RM
2081 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
2082 pthread_timedjoin_np to ...
2083 (libpthread: GLIBC_2.3.3): ... here.
2084 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
2085
2086 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2087 Avoid shadowing VAL variable.
2088
2089 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
2090 New macro.
2091
86a9ee5e
UD
20922003-03-18 Ulrich Drepper <drepper@redhat.com>
2093
ac9e0aa1
UD
2094 * Makefile (tests): Add tst-cond11.
2095 * tst-cond11.c: New file.
2096
a14b373c
UD
2097 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
2098 struct passed to cleanup handler to eliminate one more
2099 instruction.
2100 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2101
24a49f38
UD
2102 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2103 (pthrad_cond_t): Replace __unused field with __clock.
2104
2105 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
2106 waken all waiters in cleanup handler.
2107 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2108 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2109
86a9ee5e
UD
2110 * pthread_condattr_getclock.c: New file.
2111 * pthread_condattr_setclock.c: New file.
2112 * sysdeps/pthread/pthread.h: Declare these new functions.
2113 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
2114 * Makefile (libpthread-routines): Add the new functions.
2115 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
2116 Renamed field to value. Document use of the bits.
2117 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
2118 change.
2119 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 2120 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
2121 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
2122 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2123 Add __clock field.
2124 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2125 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2126 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2127 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2129 Implement clock selection.
2130 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2131 * pthread-errnos.sym: Add ENOSYS.
2132 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2133 _POSIX_CLOCK_SELECTION.
2134 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2135
2136 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
2137 invalid .size directive.
2138
98054a05
RM
21392003-03-17 Roland McGrath <roland@redhat.com>
2140
2141 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
2142 Formatting tweaks.
2143
001bea71
UD
21442003-03-17 Ulrich Drepper <drepper@redhat.com>
2145
4773086e
UD
2146 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
2147 Use __lll_add instead of spelling it out. Use protected symbol names.
2148 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
2149 Use __lll_add.
2150 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
2151 Renamed from lll_compare_and_swap. Use new name where necessary.
2152 (__lll_add): Defined.
2153 (__lll_dec_if_positive): Defined.
2154 (__lll_test_and_set): Defined.
2155 * sysdeps/ia64/pthread_spin_init.c: Removed.
2156 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
2157 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
2158 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
2159 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
2160 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
2161 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
2162 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
2163 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
2164 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2165 __sync_lock_release_si.
2166 Patch by Jakub Jelinek.
2167
2168 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2169 Fix timeout handling.
2170 (__lll_timedwait_tid): Likewise.
2171 (lll_unlock_wake_cb): Wake up other waiters if necessary.
2172 Patch by Jakub Jelinek.
2173
2174 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
2175
de4471dd
RM
21762003-03-17 Roland McGrath <roland@redhat.com>
2177
2178 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
2179 * sysdeps/pthread/pthread_spin_init.c: New file.
2180 * sysdeps/pthread/pthread_spin_unlock.c: New file.
2181 * sysdeps/powerpc/Makefile: New file.
2182 * sysdeps/powerpc/pthread_spin_lock.c: New file.
2183 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
2184 * sysdeps/powerpc/pthreaddef.h: New file.
2185 * sysdeps/powerpc/tcb-offsets.sym: New file.
2186 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
2187 * sysdeps/powerpc/tls.h: New file.
2188 * sysdeps/powerpc/bits/atomic.h: New file.
2189 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
2190 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
2191 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 2192
de4471dd
RM
2193 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
2194 * sysdeps/unix/sysv/linux/sem_post.c: New file.
2195 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
2196 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
2197 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
2198 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
2199 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
2200 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
2201 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
2202 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
2203 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
2204 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
2205 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
2206 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
2207 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
2208
2209 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
2210 not gettimeofday.
2211 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
2212 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
2213 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
2214 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
2215 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2216
5778033f
UD
22172003-03-17 Ulrich Drepper <drepper@redhat.com>
2218
2219 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
2220 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2221 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2222 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2223 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
2224
796038f8
RM
22252003-03-16 Roland McGrath <roland@redhat.com>
2226
2227 * tst-fork4.c: Include <string.h>.
2228 * tst-signal2.c: Likewise.
2229 * tst-mutex5.c (do_test): exit -> return.
2230 * tst-mutex2.c: Include <stdlib.h>.
2231
51d0678c
UD
22322003-03-16 Ulrich Drepper <drepper@redhat.com>
2233
5778033f
UD
2234 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2235 (__lll_mutex_timedlock_wait): Correct expected value after
2236 spurious wakeup. Otherwise we would never wait again.
2237
b6e2f87a
UD
2238 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
2239 zone versus inline asm stupidity. Use correct instructions.
2240
51d0678c
UD
2241 * tst-rwlock6.c: Add some more status output.
2242
8112cc70
RM
22432003-03-15 Roland McGrath <roland@redhat.com>
2244
2245 * sysdeps/pthread/configure.in: New file.
2246 * sysdeps/pthread/configure: New file (generated).
2247
49773c19
UD
22482003-03-15 Ulrich Drepper <drepper@redhat.com>
2249
2250 * allocatestack.c (allocate_stack): Store the exact stack size of
2251 user allocated stacks.
2252
eec0ca9f
JJ
22532003-03-15 Jakub Jelinek <jakub@redhat.com>
2254
2255 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2256 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
2257 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
2258 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
2259 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2260 Use `header.' prefix.
2261 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
2262
a87731e2
UD
22632003-03-15 Ulrich Drepper <drepper@redhat.com>
2264
2265 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
2266 __builtin_frame_address, use stack pointer.
2267
2268 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
2269 instead of __builtin_frame_pointer.
2270
e22a221d
UD
22712003-03-14 Ulrich Drepper <drepper@redhat.com>
2272
92ed3daf
UD
2273 * tst-basic1.c (do_test): Add cast to avoid warning.
2274 * tst-basic2.c (do_test): Likewise.
2275
9b89567d
UD
2276 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
2277 amount of stack correction.
2278
e22a221d
UD
2279 * tst-fork4.c: Use test-skeleton.c.
2280
2e49caba
RM
22812003-03-14 Roland McGrath <roland@redhat.com>
2282
2283 * init.c: Fix typo "#eli" for "#else".
2284
415ef7d8
RM
22852003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
2286
2287 * allocatestack.c (__stack_user): Use hidden_data_def.
2288 * pthread_create.c (__pthread_keys): Likewise.
2289
2290 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
2291
52287505
RM
22922003-03-14 Roland McGrath <roland@redhat.com>
2293
415ef7d8
RM
2294 * tst-fork4.c: New file.
2295 * Makefile (tests): Add it.
2296
52287505
RM
2297 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
2298 we always define the padding space.
2299 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
2300 stopped supporting its own extensions fully.
2301 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
2302 struct also called `header', so `header.multiple_threads' is the field
2303 name to use on all machines.
2304 * allocatestack.c (allocate_stack): Use `header.' prefix.
2305 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2306 * pthread_create.c (__pthread_create_2_1): Likewise.
2307 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
2308 (THREAD_SELF): Likewise.
2309 * sysdeps/x86_64/tls.h: Likewise.
2310 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2311 (SINGLE_THREAD_P): Likewise.
2312 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
2313 (SINGLE_THREAD_P): Likewise.
2314 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2315 (SINGLE_THREAD_P): Likewise.
2316
2317 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
2318 value directly.
2319
c44bf9aa
UD
23202003-03-14 Ulrich Drepper <drepper@redhat.com>
2321
e22a221d
UD
2322 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
2323 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
2324
0eb18281
UD
2325 * pthread_create.c (start_thread): setjmp is expected to return 0.
2326
c44bf9aa
UD
2327 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
2328 (THREAD_GETMEM_NC): Likewise.
2329
564cd8b6
UD
23302003-03-13 Ulrich Drepper <drepper@redhat.com>
2331
2332 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
2333 and the size of the stack which must be allocated is a multiple,
2334 allocate one more page.
2335 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
2336 MULTI_PAGE_ALIASING.
2337
6461e577
RM
23382003-03-13 Roland McGrath <roland@redhat.com>
2339
2340 * pthread_create.c (start_thread): Set EXITING_BIT after the
2341 event-reporting (and destructors), not before.
2342
b5ec5617
UD
23432003-03-13 Jakub Jelinek <jakub@redhat.com>
2344
6461e577
RM
2345 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
2346 lll_futex_wake): Declare register variables as long int instead of
2347 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
2348 Make syscall arguments clobbered by the syscall.
2349 (lll_futex_wait): Define using lll_futex_timed_wait.
2350
2351 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
2352 to void *.
2353
2354 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
2355 PPID if [! NDEBUG].
2356
2357 * allocatestack.c (nptl_ncreated): Only declare if
2358 COLORING_INCREMENT != 0.
2359
2360 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
2361 (__libc_enable_asynccancel_2): Remove prototype.
2362
b5ec5617
UD
2363 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
2364 ctid to match kernel.
2365
d0369fb8
UD
23662003-03-12 Ulrich Drepper <drepper@redhat.com>
2367
7588880f
UD
2368 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
2369 libc_multiple_threads.
2370 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
2371 __libc_multiple_threads to...
2372 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
2373
2374 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
2375 versioning.
2376 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2377 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2378
2379 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
2380 (__pthread_once_internal): Define.
2381
2382 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
2383 macros instead of .symver directly.
2384 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2385 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2386
d0369fb8
UD
2387 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
2388 * sysdeps/x86_64/tcb-offsets.sym: New file.
2389 * sysdeps/x86_64/Makefile: New file.
2390
2391 * sysdeps/i386/tcb-offsets.sym: Add SELF.
2392 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
2393 to access own pthread_t in TCB.
2394 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2395 Likewise.
2396 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2397 Likewise.
2398 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2399
0bb2ac85
RM
24002003-03-12 Roland McGrath <roland@redhat.com>
2401
2402 * pthread-errnos.sym: New file.
2403 * Makefile (gen-as-const-headers): New variable, list that file.
2404 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
2405 header <pthread-errnos.h> instead of defining errno values here.
2406 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2407 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2408 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2409 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2410 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2411 Likewise.
2412 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2413 Likewise.
2414 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2416 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2417 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2418 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2419 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2420 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2421 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2422 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2423 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
2424 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2425 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
2426 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
2427 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
2428 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
2429 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2430 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2431 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2432 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2433 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2434 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2435 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
2436 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
2437 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
2438 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
2439 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2440 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2441
2442 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
2443 CLONE_CHILD_SETTID worked.
2444
35e148cb
UD
24452003-03-12 Ulrich Drepper <drepper@redhat.com>
2446
d0369fb8
UD
2447 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
2448 file.
2449 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
2450 file.
2451
2452 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2453 (pthread_cond_t): Add padding.
2454
da49194d
UD
2455 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
2456 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
2457 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
2458
35e148cb
UD
2459 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2460 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
2461 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2462 (__pthread_rwlock_timedrdlock): Likewise.
2463 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
2464 (__pthread_rwlock_wrlock): Likewise.
2465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
2466 (__pthread_rwlock_rdlock): Likewise.
2467
2468 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
2469
2470 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
2471 result of lock re-get if it fails.
2472
3e976b96
UD
24732003-03-11 Ulrich Drepper <drepper@redhat.com>
2474
5a03acfe
UD
2475 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
2476 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2477 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
2478 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2479 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2480 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2481 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2482 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2483 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2484 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2485
2486 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
2487 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
2488
2489 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
2490 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
2491 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
2492 (create_thread): Likewise.
2493 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
2494 * init.c (__pthread_initialize_minimal_internal): Initialize
2495 __libc_multiple_threads_ptr if necessary.
2496 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
2497 __pthread_multiple_threads and __libc_multiple_threads_ptr.
2498 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
2499 __libc_multiple_threads.
2500 (__libc_pthread_init): Return pointer to __libc_pthread_init if
2501 necessary.
2502
2503 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
2504 (THREAD_SETMEM_NC): Likewise.
2505
2506 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
2507 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
2508 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
2509 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
2510
2511 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
2512 Eliminate one entire instruction.
2513
32a589b1
UD
2514 * cancellation.c (__pthread_enable_asynccancel_2): New function.
2515 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
2516 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2517 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
2518 instead of __pthread_enable_asynccancel.
2519 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2520 (__pthread_cond_wait): Likewise.
2521 * sysdeps/pthread/pthread_cond_timedwait.c
2522 (__pthread_cond_timedwait): Likewise.
2523 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2524
3e976b96
UD
2525 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2526 (__condvar_cleanup): Wake up all waiters in case we got signaled
2527 after being woken up but before disabling asynchronous
2528 cancellation.
2529 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
2530 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2531 (__condvar_cleanup): Likewise.
2532
2533 * init.c (__NR_set_tid_address): If already defined, don't redefine.
2534 Make it an error if architecture has no #if case. Add x86-64.
2535
2536 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
2537 pt-initfini.s generation.
2538
2539 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
2540 (TLS_INIT_TP): Fix typo.
2541
6c477888
UD
25422003-03-11 Jakub Jelinek <jakub@redhat.com>
2543
2544 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
2545 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
2546
2547 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
2548 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
2549 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
2550 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
2551 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
2552 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2553 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
2554 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
2555
ea694823
UD
25562003-03-11 Ulrich Drepper <drepper@redhat.com>
2557
6c477888
UD
2558 * sysdeps/pthread/pthread_cond_timedwait.c
2559 (__pthread_cond_timedwait): Return the result of the final
2560 locking. If it succeeds, the regular function return value.
2561
2562 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
2563 Return result of the final locking.
2564 * version.c (__nptl_main): Work around problems with the strange
2565 INTERNAL_SYSCALL macro on ppc32.
2566 * init.c (__pthread_initialize_minimal_internal): Unblock
2567 SIGCANCEL in case the parent blocked it.
2568 Reported by Paul Mackerras <paulus@samba.org>.
2569
ea694823
UD
2570 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
2571 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
2572 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
2573
b33e6163
RM
25742003-03-11 Jakub Jelinek <jakub@redhat.com>
2575
2576 * sysdeps/pthread/pthread_cond_timedwait.c
2577 (__pthread_cond_timedwait): Unlock and fail if
2578 __pthread_mutex_unlock_internal failed.
2579
2580 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
2581 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
2582 Use ARCH_CLONE.
2583 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
2584 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
2585 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
2586 ALLOCATE_STACK): New macros.
2587 (TLS_TPADJ): New macro.
2588 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
2589 (allocate_stack): Handle TLS_DTV_AT_TP and
2590 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
2591 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
2592 Don't set PD->self.
2593 * init.c [__ia64__] (__NR_set_tid_address): Define.
2594
2595 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
2596 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
2597 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
2598 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
2599 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
2600 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
2601 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
2602 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
2603 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
2604 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2605 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
2606 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
2607 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
2608 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
2609 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
2610 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
2611 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
2612 * sysdeps/ia64/bits/atomic.h: New file.
2613 * sysdeps/ia64/Makefile: New file.
2614 * sysdeps/ia64/pthread_spin_init.c: New file.
2615 * sysdeps/ia64/pthread_spin_lock.c: New file.
2616 * sysdeps/ia64/pthread_spin_trylock.c: New file.
2617 * sysdeps/ia64/pthread_spin_unlock.c: New file.
2618 * sysdeps/ia64/pthreaddef.h: New file.
2619 * sysdeps/ia64/tcb-offsets.sym: New file.
2620 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
2621 * sysdeps/ia64/tls.h: New file.
2622
2623 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
2624 to syscall instead of no arguments.
2625
2b30b2e5
UD
26262003-03-10 Ulrich Drepper <drepper@redhat.com>
2627
db5f2fc9
UD
2628 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
2629 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
2630 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
2631 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
2632
2633 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
2634 unused code.
2635
6a4263e3
UD
2636 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
2637
3de7c2a9
UD
2638 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2639 lowlevelbarrier.sym.
2640 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
2641 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
2642 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 2643 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 2644
2a544d82
UD
2645 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2646 (__lll_mutex_lock_wait): Reverse order of first two parameters.
2647 (__lll_mutex_timedlock_wait): Likewise.
2648 (lll_mutex_lock): Adjust asm for that.
2649 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
2650 (lll_lock): Adjust asm for operand order change.
2651 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
2652 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
2653
ec06436c
UD
2654 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
2655 Reverse order of parameters.
2656 (__lll_timedwait_tid): Remove regparms attribute.
2657 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
2658 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
2659
3273832c
UD
2660 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2661 (__lll_timedwait_tid): Remove one unnecessary instruction.
2662
51f32ab8
UD
2663 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
2664 __lll_mutex_timedlock_wait only for NOT_IN_libc.
2665 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
2666 lowlevelmutex.S.
2667
2668 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2669 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
2670 for NOT_IN_libc.
2671 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
2672 lowlevellock.S.
2673
fad48d9e
UD
2674 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
2675 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
2676 for libc.so.
2677 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
2678 define LOCK here (if UP is not defined). The actual code is in
2679 lowlevelmutex.S.
2680
9356d063
UD
2681 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
2682 LOCK is already defined. Don't define lll_unlock_wake_cb and
2683 __lll_timedwait_tid for libc.so.
2684 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
2685 define LOCK here (if UP is not defined). The actual code is in
2686 lowlevellock.S.
2687
ebf0cbc5 2688 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
2689 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
2690 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
2691 instead of lowlevelsem.h.
2692 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2693 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
2694 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 2695
c915e5ad
UD
2696 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2697 lowlevelrwlock.sym.
2698 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
2699 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 2700 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 2701
4c3c2e8a
UD
2702 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
2703 register loading.
2704 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
2705 last changed. D'oh.
2706
2b30b2e5
UD
2707 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
2708
2709 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
2710 of __libc_locking_needed.
2711 (lll_trylock): Initialize %eax to zero.
2712
2b30b2e5
UD
2713 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
2714 pthread_cond_t definition.
2715
e48f9638
RM
27162003-03-10 Roland McGrath <roland@redhat.com>
2717
2718 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
2719 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
2720 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
2721 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
2722 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
2723
2724 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
2725 Instead of setting PD->multiple_threads, set globals
2726 __pthread_multiple_threads and __libc_multiple_threads.
2727 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2728 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
2729 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
2730
2731 * descr.h (struct pthread): Conditionalize first member on
2732 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
2733 containing an anonymous tcbhead_t. Move `list' member out.
2734 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
2735 * allocatestack.c: Remove use of `header.data.' prefix.
2736 * pthread_create.c: Likewise.
2737 * init.c (__pthread_initialize_minimal_internal): Likewise.
2738 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2739 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
2740 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
2741 * sysdeps/x86_64/tls.h: Likewise.
2742 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2743 (SINGLE_THREAD_P): Likewise.
2744 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
2745 (SINGLE_THREAD_P): Likewise.
2746 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
2747 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
2748
c37cae9e
UD
27492003-03-09 Ulrich Drepper <drepper@redhat.com>
2750
d38c777e
RM
2751 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
2752
7b44a5e0 2753 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 2754 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 2755
c2e5e085
UD
2756 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
2757 leftovers from the ia32 code.
2758
2759 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
2760 memory load.
2761 (clear_once_control): Don't load %esi.
2762
2763 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
2764 handling.
2765
2766 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
2767
cd4b2a55
UD
2768 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
2769 * sysdeps/unix/sysv/linux/createthread.c: ...here.
2770
c37cae9e
UD
2771 * Makefile (tests): Add tst-cond10.
2772 * tst-cond10.c: New file.
2773
d130a341
UD
27742003-03-08 Ulrich Drepper <drepper@redhat.com>
2775
ccf1d573
UD
2776 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
2777 * tst-signal3.c (do_test): Likewise.
2778 * tst-sem5.c (do_test): Likewise.
2779 * tst-kill6.c (do_test): Likewise.
2780 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
2781
2782 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
2783 of inc/dec.
2784 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
2785 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
2786 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2787 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2788 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2789 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2790 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2791 Likewise.
2792 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2793 Likewise.
2794 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2795 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2796 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2797 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2798 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2799 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2800 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2801 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2802
d130a341
UD
2803 * allocatestack.c (allocate_stack): If mprotect() fails free the
2804 TLS memory.
2805
bc6389ad
UD
28062003-03-07 Ulrich Drepper <drepper@redhat.com>
2807
41d4d223
UD
2808 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
2809
2810 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
2811 lll_wake_tid. This was used only to work around kernel limits in
2812 the early days.
2813 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2814 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
2815 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2816 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2817
bc6389ad
UD
2818 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
2819 (__pthread_initialize_minimal_internal): Change initialization of
2820 __static_tls_align_m1 appropriately.
2821 * pthreadP.h (__static_tls_align_m1): Renamed from
2822 __static_tls_align.
2823 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
2824 instead of __static_tls_align-1.
2825
cc775edf
UD
28262003-03-04 Ulrich Drepper <drepper@redhat.com>
2827
0de28d5c 2828 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 2829
518b5308
UD
2830 * pthread_create.c: Define __pthread_keys using nocommon
2831 attribute, not by placing it explicitly in bss.
2832 Remove DEFINE_DEALLOC definition. Not needed anymore.
2833
2834 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
2835 Use it in mmap call to allocate stacks.
2836
2837 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
2838
cc775edf
UD
2839 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
2840 result of the thread function.
2841
4f6f0a8f
UD
28422003-03-03 Ulrich Drepper <drepper@redhat.com>
2843
f04a2721
UD
2844 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
2845 version is just fine.
2846
4f6f0a8f
UD
2847 * sysdeps/unix/sysv/linux/libc_pthread_init.c
2848 (__pthread_child_handler): Renamed from pthread_child_handler,
2849 exported, and marked hidden. Change all users.
2850 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
2851 free __pthread_child_handler from child list.
2852
7ce5c164
UD
28532003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
2854
2855 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
2856
2857 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2858 Fix handling of cancellation and failing pthread_mutex_unlock call.
2859 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
2860 (__pthread_cond_wait): Likewise.
2861
2862 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2863 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
2864 lll_futex_timed_wait call.
2865 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2866 (pthread_rwlock_timedwrlock): Likewise.
2867
2868 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
2869 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
2870 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
2871
2872 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
2873 check of lll_futex_wake return value.
2874
ea6a015b
RM
28752003-03-03 Roland McGrath <roland@redhat.com>
2876
2877 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
2878
2879 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2880 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
2881 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2882
4adacf57
UD
28832003-03-02 Ulrich Drepper <drepper@redhat.com>
2884
1be3d664
UD
2885 * sysdeps/pthread/timer_create.c (timer_create): Return correct
2886 error for CPU clocks.
2887
885bafa1
UD
2888 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2889 _POSIX_MONOTONIC_CLOCK.
2890 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2891
4adacf57
UD
2892 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
2893 recent kernels.
2894
86bfff4d
UD
28952003-03-01 Ulrich Drepper <drepper@redhat.com>
2896
2897 * descr.h (struct pthread): Move cleanup field to the front.
2898
d1149385
RM
28992003-03-01 Roland McGrath <roland@redhat.com>
2900
2901 * sem_open.c (sem_open): Braino fix.
2902
bd8bb78b
UD
29032003-03-01 Ulrich Drepper <drepper@redhat.com>
2904
748bec08
UD
2905 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
2906 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
2907 __pthread_cleanup_pop functionality.
2908 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2909
bd8bb78b
UD
2910 * descr.h (struct pthread): Move tid field to the front now that
2911 it is often used.
2912
2913 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
2914 (__lll_mutex_timedlock_wait): Remove.
2915 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
2916 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2917 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
2918 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2919 (lll_unlock_wake_cb): Don't save and restore %esi.
2920 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
2921 %esi.
2922 (__lll_timedwait_tid): Add alignment.
2923 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
2924 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
2925 %esi.
2926 (__lll_timedwait_tid): Removed.
2927 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2928 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
2929 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
2930 (pthread_barrier_wait): Don't save, load, and restore %esi for
2931 last thread.
2932 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2933 (__pthread_cond_signal): Don't save, load, and restore %esi.
2934 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2935 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
2936 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
2937 Don't save, load, and restore %esi.
2938
d2637c70
UD
29392003-02-27 Ulrich Drepper <drepper@redhat.com>
2940
567fb22a
UD
2941 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2942 Release lock before waking up the waiters.
2943
427f5fa1
UD
2944 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
2945
a2d83cfb
UD
2946 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
2947 (reader_thread): Likewise.
2948
d2637c70
UD
2949 * sysdeps/pthread/pthread_rwlock_unlock.c
2950 (__pthread_rwlock_unlock): Release internal lock early. Don't try
2951 to wake up readers if there are none.
2952
2953 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2954 Release internal lock before wake threads.
2955
b1531183
UD
29562003-02-26 Ulrich Drepper <drepper@redhat.com>
2957
dbf6131c
UD
2958 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
2959 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
2960 predefined.
2961 * tst-rwlock9.c: Likewise.
2962 * tst-rwlock10.c: New file.
2963 * tst-rwlock11.c: New file.
2964
695799fe
UD
2965 * Makefile (tests): Add tst-dlsym1.
2966 * tst-dlsym1.c: New file.
2967
b1531183
UD
2968 * init.c (__pthread_initialize_minimal_internal): Set
2969 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
2970 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
2971
3724f268
UD
29722003-02-24 Ulrich Drepper <drepper@redhat.com>
2973
3857ca78
UD
2974 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
2975
80d80779
UD
2976 * tst-cond2.c: Fix sychronization with child.
2977
86371308
UD
2978 * tst-rwlock8.c (reader_thread): Remove unused variable.
2979
ffeb4481
UD
2980 * Makefile: Add rules to build and run tst-tls3.
2981 * tst-tls3.c: New file.
2982 * tst-tls3mod.c: New file.
2983
3724f268
UD
2984 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
2985 * tst-rwlock8.c: New file.
2986 * tst-rwlock9.c: New file.
2987 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
2988 complete broken rwlock implementation.
2989 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2990 Likewise.
2991 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2992 Likewise.
2993 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2994 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
2995 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
2996 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2997 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2998 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
2999 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 3000
8915cc40
RM
30012003-02-23 Roland McGrath <roland@redhat.com>
3002
3003 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
3004
fd1a0d0c
UD
30052003-02-23 Ulrich Drepper <drepper@redhat.com>
3006
ecf28959
UD
3007 * Makefile (tests): Add tst-context1.
3008 * tst-context1.c: New file.
3009
5e47b76b
UD
3010 * Makefile (tests): Add tst-tls1 and tst-tls2.
3011 * tst-tls1.c: New file.
3012 * tst-tls2.c: New file.
3013
5a6bbb41
UD
3014 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
3015 for failed cmpxchg.
3016
fd1a0d0c
UD
3017 * pthread_create.c (start_thread): Set EXITING_BIT early.
3018
3019 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
3020 (THREAD_GETMEM_NC): Likewise.
3021
757f9fcb
UD
30222003-02-22 Ulrich Drepper <drepper@redhat.com>
3023
b1b8e747
UD
3024 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
3025 off 3 more bytes by using offset-less instructions when possible.
3026
c780aa21 3027 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
3028
3029 * eintr.c (eintr_source): Add unnecessary return but the compiler
3030 insists.
3031
3032 * tst-kill3.c: Include <unistd.h>.
3033
5148559c
RM
30342003-02-21 Roland McGrath <roland@redhat.com>
3035
3036 * pthread_create.c (start_thread): Call __libc_thread_freeres.
3037
ab2d98e3
UD
30382003-02-21 Ulrich Drepper <drepper@redhat.com>
3039
71028edd
UD
3040 * Makefile (tests): Add tst-eintr1.
3041 (distribute): Add eintr.c.
3042 * tst-eintr1.c: New file.
3043 * eintr.c: New file.
3044
e814f748
UD
3045 * pthread_cancel.c (pthread_cancel): Use tkill directly.
3046
3047 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
3048 Disallow sending SIGCANCEL.
3049
ab2d98e3 3050 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 3051 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
3052 * tst-kill1.c: New file.
3053 * tst-kill2.c: New file.
3054 * tst-kill3.c: New file.
3055 * tst-kill5.c: New file.
9c03686d 3056 * tst-kill6.c: New file.
e814f748
UD
3057 * tst-basic7.c: Renamed to...
3058 * tst-kill4.c: ...this.
ab2d98e3 3059
59fed0e2
RM
30602003-02-21 Roland McGrath <roland@redhat.com>
3061
3062 * Makefile (install-lib-ldscripts): New variable.
3063
49dc759f
UD
30642003-02-21 Ulrich Drepper <drepper@redhat.com>
3065
8c2e9a29
UD
3066 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
3067 * pthread_cancel.c: Use INVALID_TD_P.
3068 * pthread_detach.c: Likewise.
3069 * pthread_getschedparam.c: Likewise.
3070 * pthread_setschedparam.c: Likewise.
3071 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
3072 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3073 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
3074 * pthread_timedjoin.c: Likewise.
3075
3076 * tst-basic7.c: Include <signal.h>.
3077
49dc759f
UD
3078 * pthread_join.c (pthread_join): Limited checking for invalid
3079 descriptors.
3080 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
3081
df5803bf
UD
30822003-02-20 Ulrich Drepper <drepper@redhat.com>
3083
c5acd3d7
UD
3084 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
3085 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
3086 * Makefile (tests): Add tst-key4.
3087 * tst-key4.c: New file.
3088
729924a0
UD
30892003-02-18 Ulrich Drepper <drepper@redhat.com>
3090
2f7dc594
UD
3091 * Makefile (tests): Add tst-basic7.
3092 * tst-basic7.c: New file.
3093
ba25bb0f
UD
3094 * pthread_create.c (deallocate_tsd): Mark as internal_function.
3095 Add some more __builtin_expect.
3096
12fd3c5f 3097 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 3098
5430d926
UD
30992003-02-17 Ulrich Drepper <drepper@redhat.com>
3100
b0db7fbe
UD
3101 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
3102 _POSIX_THREAD_PRIORITY_SCHEDULING.
3103 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3104 _XOPEN_REALTIME_THREADS.
3105 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3106
3107 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
3108 kernel returns EINVAL for PID <= 0, work around it.
3109
ecfda9bd
UD
3110 * Makefile (tests): Add tst-signal5.
3111 * tst-signal5.c: New file.
3112
7d78ab99
UD
3113 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
3114 and LOGIN_NAME_MAX.
3115
371a2972
UD
3116 * tst-cancel1.c (tf): Block all signals.
3117
5430d926
UD
3118 * Makefile (tests): Add tst-basic6.
3119 * tst-basic6.c: New file.
3120
3121 * tst-basic1.c: Add test for process ID.
3122
3123 * Makefile (tests): Add tst-cancel10.
3124 * tst-cancel10.c: New file.
3125
3126 * Makefile (tests): Add tst-signal4.
3127 * tst-signal4.c: New file.
3128
3129 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
3130 __sigismember instead of sigismember. Add __builtin_expect.
3131
1564916a
UD
31322003-02-16 Ulrich Drepper <drepper@redhat.com>
3133
179ff175
UD
3134 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
3135 pthread_setcancelstate, and pthread_rwlock_setpshared.
3136
e4335f9a
UD
3137 * tst-cancel7.c (do_test): Make sure the pid file exists before
3138 canceling the thread.
3139
0a37669a
UD
3140 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
3141 pthread_rwlock_timedrdlock tests.
3142 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
3143 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3144 Check for invalid tv_nsec field.
3145 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3146 Likewise.
3147
3148 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
3149 recursive mutex of overflow.
3150
3151 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
3152
e4335f9a 3153 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
3154 going into an endless loop.
3155 * Makefile (tests): Add tst-cancel9.
3156 * tst-cancel9.c: New file.
3157
3158 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
3159
b270b548
UD
31602003-02-15 Ulrich Drepper <drepper@redhat.com>
3161
1c82b97f
UD
3162 * tst-mutex5.c (do_test): Add more timedlock tests.
3163
b2f05465 3164 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
3165 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
3166
e798b60f
UD
3167 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3168 use INLINE_SYSCALL. Error number is returned, not -1.
3169
90491dc4
UD
3170 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
3171 and __deallocate_stack with internal_function.
3172 * pthread_create.c: Adjust definitions appropriately.
3173 * allocatestack.c: Likewise.
3174
3175 * pthread_join.c: Add one more __builtin_expect.
3176 * pthread_timedjoin.c: Likewise.
3177
3178 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
3179 not data of sequence number does not match.
3180 Add one __builtin_expect.
3181
c6247c9d
UD
3182 * Makefile (tests): Add tst-clock1.
3183 * tst-clock1.c: New file.
3184
b270b548
UD
3185 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
3186 negative arguments.
3187 * Makefile (tests): Add tst-basic5.
3188 * tst-basic5.c: New file.
3189
700bf7af
UD
31902003-02-14 Ulrich Drepper <drepper@redhat.com>
3191
757de559
UD
3192 * Makefile (tests): Add tst-basic4.
3193 * tst-basic4.c: New file.
3194
47202270
UD
3195 * pthreadP.h: Add declaraction for __nptl_nthreads.
3196 * pthread_create.c: Define __nptl_nthreads
3197 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 3198 after thread is done. If then zero, call exit(0).
47202270
UD
3199 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3200 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
3201 * init.c (pthread_functions): Initialize ptr_nthreads.
3202 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
3203 (__reclaim_stacks): Decrement __nptl_nthreads.
3204 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
3205 Define.
3206 * Makefile (tests): Add tst-basic3.
3207 * tst-basic3.c: New file.
3208
e320ef46
UD
3209 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
3210 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
3211 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
3212 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
3213 if asynchronous canceling is enabled.
3214 * pthread_join.c (pthread_join): When recognizing circular joins,
3215 take into account the other thread might be already canceled.
3216 * Makefile (tests): Add tst-join5.
3217 * tst-join5.c: New file.
3218
700bf7af
UD
3219 * Makefile (tests): Add tst-join4.
3220 * tst-join4.c: New file.
3221
32222003-02-13 Ulrich Drepper <drepper@redhat.com>
3223
3224 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
3225
dac0f772
UD
32262003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3227
3228 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
3229 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
3230 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
3231 warning.
3232 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
3233 to avoid warning.
3234 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
3235 error if lll_futex_wake failed.
3236
e8cda341
UD
32372003-02-13 Ulrich Drepper <drepper@redhat.com>
3238
a7720b5e
UD
3239 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
3240 handling of cancellation and failung pthread_mutex_unlock call.
3241 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3242 * Makefile (tests): Add tst-cond8 and tst-cond9.
3243 * tst-cond8.c: New file.
3244 * tst-cond9.c: New file.
3245
a1ea4c06
UD
3246 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
3247
3248 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
3249 non-standard initializers with __USE_GNU.
3250
e8cda341
UD
3251 * Makefile (tests): Add tst-cleanup3.
3252 * tst-cleanup3.c: New file.
3253
2067577c
UD
32542003-02-12 Ulrich Drepper <drepper@redhat.com>
3255
89e78a95
UD
3256 * Makefile (tests): Add tst-attr1 and tst-attr2.
3257 * tst-attr1.c: New file.
3258 * tst-attr2.c: New file.
3259
dfdd294a
UD
3260 * Makefile: Add rules to build and run tst-atfork2 test.
3261 * tst-atfork2.c: New file.
3262 * tst-atfork2mod.c: New file.
3263
3264 * sysdeps/unix/sysv/linux/unregister-atfork.c
3265 (__unregister_atfork): Free the memory allocated for the handlers
3266 after removing them from the lists.
3267
3268 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
3269 cleanup function.
3270
3271 * tst-atfork1.c (do_test): Wait for the child we forked.
3272 Report error in child.
3273
3274 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
3275
2067577c
UD
3276 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
3277
2a8a8a84
UD
32782003-02-10 Ulrich Drepper <drepper@redhat.com>
3279
d9dd121e
UD
3280 * Makefile (tests): Add tst-cancel8.
3281 * tst-cancel8.c: New file.
3282
2a8a8a84
UD
3283 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
3284 clearing of control variable.
defd1870 3285 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 3286 * tst-once3.c: New file.
defd1870 3287 * tst-once4.c: New file.
2a8a8a84 3288
a54e8d33
UD
32892003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
3290
3291 * sysdeps/sh/Makefile: New file.
3292 * sysdeps/sh/bits/atomic.h: New file.
3293 * sysdeps/sh/pthread_spin_init.c: New file.
3294 * sysdeps/sh/pthread_spin_lock.c: New file.
3295 * sysdeps/sh/pthread_spin_trylock.S: New file.
3296 * sysdeps/sh/pthread_spin_unlock.S: New file.
3297 * sysdeps/sh/pthreaddef.h: New file.
3298 * sysdeps/sh/tcb-offsets.sym: New file.
3299 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
3300 * sysdeps/sh/tls.h: New file.
3301 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
3302 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
3303 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
3304 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
3305 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
3306 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
3307 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
3308 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
3309 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
3310 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
3311 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
3312 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
3313 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3314 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
3315 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
3316 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
3317 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
3318 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
3319 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
3320 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
3321 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
3322 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
3323 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
3324 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
3325 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
3326 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
3327 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
3328 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
3329 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
3330 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
3331
696e556e
UD
33322003-02-08 Ulrich Drepper <drepper@redhat.com>
3333
3334 * tst-cond2.c: Rearrange code to not rely on behavior undefined
3335 according to POSIX.
3336
3337 * tst-basic2.c (do_test): Lock mutex before creating the thread.
3338
fef710d6
UD
33392003-02-07 Ulrich Drepper <drepper@redhat.com>
3340
c6180643
UD
3341 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
3342 (TLS_GET_FS): New #define.
3343 (TLS_SET_FS): New #define.
3344 Correct value of __NR_set_thread_area.
3345
fef710d6
UD
3346 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
3347
11090a99
UD
33482003-02-06 Ulrich Drepper <drepper@redhat.com>
3349
65c68990
UD
3350 * Makefile (tests): Add tst-popen1.
3351 * tst-popen1.c: New file.
3352
11090a99
UD
3353 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
3354 but inactive generalization.
3355 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3356 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3357 Minor optimization, remove one instruction.
3358 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3359
a88c9263
UD
33602003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
3361
3362 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
3363
33642003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
3365
3366 * init.c (__NR_set_tid_address): Add #ifdef for s390.
3367 * sysdeps/pthread/pthread_barrier_wait.c: New file.
3368 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
3369 * sysdeps/pthread/pthread_cond_signal.c: New file.
3370 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
3371 * sysdeps/pthread/pthread_cond_wait.c: New file.
3372 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
3373 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
3374 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
3375 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
3376 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
3377 * sysdeps/s390/Makefile: New file.
3378 * sysdeps/s390/bits/atomic.h: New file.
3379 * sysdeps/s390/pthread_spin_init.c: New file.
3380 * sysdeps/s390/pthread_spin_lock.c: New file.
3381 * sysdeps/s390/pthread_spin_trylock.c: New file.
3382 * sysdeps/s390/pthread_spin_unlock.c: New file.
3383 * sysdeps/s390/pthreaddef.h: New file.
3384 * sysdeps/s390/tcb-offsets.sym: New file.
3385 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
3386 * sysdeps/s390/tls.h: New file.
3387 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
3388 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
3389 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
3390 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
3391 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
3392 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
3393 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
3394 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
3395 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
3396 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
3397 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
3398 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
3399 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
3400 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
3401 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
3402 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
3403 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3404 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
3405 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
3406 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
3407 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
3408 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
3409 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
3410
6f1cff95
UD
34112003-02-04 Ulrich Drepper <drepper@redhat.com>
3412
ec609a8e
UD
3413 * atomic.h: Add a couple more default implementations.
3414 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
3415 __arch_compare_and_exchange_32_acq in return value definition. It
3416 always exists.
3417 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 3418 Add missing atomic_ prefixes.
e3ec8904 3419
6f1cff95
UD
3420 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
3421 thread library is available, use correct value to mark initialized
3422 once variable.
3423
4f088329
UD
34242003-02-03 Ulrich Drepper <drepper@redhat.com>
3425
6f1cff95
UD
3426 * allocatestack.c (allocate_stack): Use __getpagesize instead of
3427 __sysconf to determine pagesize.
3428
3e4fc359 3429 * pthread_create.c: Include <atomic.h>.
4f088329
UD
3430 * allocatestack.c (allocate_stack): Implement coloring of the
3431 allocated stack memory. Rename pagesize to pagesize_m1. It's the
3432 size minus one. Adjust users.
3e4fc359 3433 * sysdeps/i386/i686/Makefile: New file.
4f088329 3434
2f42e8be
UD
34352003-02-02 Ulrich Drepper <drepper@redhat.com>
3436
4301f7e2
UD
3437 * allocatestack.c: Improve comment throughout the file.
3438
2f42e8be 3439 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 3440 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
3441 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
3442 (__lll_lock_wait): Likewise.
3443 (lll_unlock_wake_cb): Removed.
3444
4a7d6545
UD
34452003-01-31 Ulrich Drepper <drepper@redhat.com>
3446
3447 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
3448 _POSIX_THREAD_PRIORITY_SCHEDULING.
3449
886d5973
UD
34502003-01-30 Jakub Jelinek <jakub@redhat.com>
3451
3452 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3453 Fix return type of ptr___pthread_getspecific.
3454
e474ca78
UD
34552003-01-29 Ulrich Drepper <drepper@redhat.com>
3456
3457 * Makefile (tests): Add tst-umask1.
3458 (tst-umask1-ARGS): Define.
3459 * tst-umask1.c: New file.
3460
e6ebd2e4
UD
34612003-01-28 Ulrich Drepper <drepper@redhat.com>
3462
6cf26f41
UD
3463 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
3464 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
3465 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
3466 pthread_rwlock_unlock.
3467 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
3468 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
3469 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
3470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
3471 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3472 New file.
3473 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
3474 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3475 New file.
3476 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
3477 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
3478 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
3479 New file.
3480 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
3481 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
3482 New file.
3483 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
3484 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
3485 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
3486 New file.
3487 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
3488 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
3489 New file.
3490 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
3491
1d087a7e
UD
3492 * Makefile (libpthread-routines): Remove lowlevelcond and
3493 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
3494 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
3495 and pthread_cond_broadcast.
4a99d160
UD
3496 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
3497 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
3498 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
3499 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
3500 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
3501 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
3502 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
3503 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
3504 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
3505 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
3506 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
3507 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
3508 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
3509 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
3510 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
3511 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
3512 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
3513 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
3514 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
3515 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
3516 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
3517 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
3518 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
3519 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
3520 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
3521 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
3522 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
3523 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
3524 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
3525 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
3526 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 3527
e6ebd2e4
UD
3528 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
3529 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
3530 of the code is moved to ...
3531 * sysdeps/pthread/createthread.c: ...here. New file.
3532
a15698cb
UD
35332003-01-27 Ulrich Drepper <drepper@redhat.com>
3534
0566b130
UD
3535 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
3536 (__new_sem_post): Clear %eax before returning.
3537 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
3538
e6fb8846
UD
3539 * Makefile (tests): Add tst-cleanup2.
3540 * tst-cleanup2.c: New file.
3541
a15698cb
UD
3542 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
3543 Interpret first parameter correctly.
3544
8824b0a1
UD
35452003-01-17 Ulrich Drepper <drepper@redhat.com>
3546
3547 * Makefile (headers): Add bits/semaphore.h.
3548
850dcfca
UD
35492003-01-16 Jakub Jelinek <jakub@redhat.com>
3550
3551 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
3552 if not SHARED.
3553
574b892e
UD
35542003-01-14 Ulrich Drepper <drepper@redhat.com>
3555
a8d87c92
UD
3556 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
3557 must be used and mapping failed.
3558 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
3559
574b892e
UD
3560 * Makefile (CFLAGS-pthread_self.os): Define this, not
3561 CFLAGS-pthread_self.c.
3562
fb48047a
UD
35632003-01-13 Ulrich Drepper <drepper@redhat.com>
3564
47805511
UD
3565 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
3566 lll_unlock_wake_cb.
3567
fb48047a
UD
3568 * Makefile (libpthread-routines): Add version. Add rules to build
3569 version.os and banner.h.
3570 * version.c: New file.
3571
115bb61d
UD
35722003-01-13 Jakub Jelinek <jakub@redhat.com>
3573
3574 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
3575 the alias unconditional.
3576 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
3577
35782003-01-13 Ulrich Drepper <drepper@redhat.com>
3579
3580 * Makefile (CFLAGS-pthread_self.c): New definition.
3581
6aca81bb
UD
35822003-01-06 Jakub Jelinek <jakub@redhat.com>
3583
3584 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
3585 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
3586 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
3587 * init.c (__pthread_initialize_minimal_internal): Likewise.
3588
e9c7764e
UD
35892003-01-07 Jakub Jelinek <jakub@redhat.com>
3590
b5facfda
UD
3591 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
3592
e9c7764e
UD
3593 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3594 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
3595 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
3596 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
3597 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
3598 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
3599
bef1e42f
UD
36002003-01-06 Jakub Jelinek <jakub@redhat.com>
3601
3602 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
3603 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
3604 * tst-cancel-wrappers.sh: Remove all exceptions.
3605
bbd17455
UD
36062003-01-05 Ulrich Drepper <drepper@redhat.com>
3607
a73ab6df
UD
3608 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
3609 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
3610
bbd17455
UD
3611 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
3612 Use __libc_pthread_functions array if SHARED.
3613
3614 * pthreadP.h: Move pthread_cond_2_0_t definition to...
3615 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
3616
3617 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
3618 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
3619 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
3620 __libc_ptf_call instead of __libc_maybe_call.
3621 (PTF): New #define.
3622 (__libc_cleanup_region_start): Wrap function name with PTF call.
3623 (__libc_cleanup_region_end): Likewise.
3624 (__libc_cleanup_end): Likewise.
3625
3626 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
3627 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
3628 * pthread_key_create.c: Add __pthread_key_create_internal alias.
3629 * pthreadP.h: Add prototypes.
3630
3631 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
3632 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
3633 __pthread_rwlock_unlock aliases.
3634 * pthreadP.h: Add prototypes for new aliases.
3635
3636 * pthreadP.h (struct pthead_functions): Moved to...
3637 * sysdeps/pthread/pthread-functions.h: ...here. New file.
3638 * init.c (pthread_functions): Add initializers for new elements.
3639
3640 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
3641 __pthread_cleanup_pop_restore aliases.
3642 * pthreadP.h: Add prototypes.
3643
3644 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
3645 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
3646 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
3647 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3648 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3649 * pthreadP.h: Adjust prototypes and callers.
3650
d27a78be
UD
36512003-01-04 Ulrich Drepper <drepper@redhat.com>
3652
b74121ae
UD
3653 * Makefile (tests): Add tst-cancel7.
3654 (tst-cancel7-ARGS): New variable.
bbd17455 3655 * tst-cancel7.c: New file.
b74121ae 3656
29bc410c
UD
3657 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
3658 around gcc defficiencies.
3659 * old_pthread_cond_signal.c: Likewise.
3660 * old_pthread_cond_timedwait.c: Likewise.
3661 * old_pthread_cond_wait.c: Likewise.
3662
d27a78be
UD
3663 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
3664
733f25e6
UD
36652003-01-03 Ulrich Drepper <drepper@redhat.com>
3666
7edb2ae3
UD
3667 * Makefile (tests): Add tst-cond7.
3668 * tst-cond7.c: New file.
3669
b1151300
UD
3670 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
3671 (condvar_cleanup): Get condvar address from the right place.
3672
733f25e6
UD
3673 * atomic.h: Correct definitions of atomic_full_barrier,
3674 atomic_read_barrier, atomic_write_barrier.
3675
3676 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
3677 race-free.
3678 * old_pthread_cond_signal.c: Likewise.
3679 * old_pthread_cond_timedwait.c: Likewise.
3680 * old_pthread_cond_wait.c: Likewise.
3681
686b7223
UD
36822003-01-03 Jakub Jelinek <jakub@redhat.com>
3683
3684 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
3685
0e07706e
UD
36862003-01-03 Ulrich Drepper <drepper@redhat.com>
3687
997256dd
UD
3688 * pthreadP.h (pthread_cond_2_0_t): New type.
3689 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
3690 Use new type for the 2.0 condvar function prototypes.
3691 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
3692 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
3693 parameter.
3694 * old_pthread_cond_destroy.c: Likewise.
3695 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
3696 * old_pthread_cond_signal.c: Likewise.
3697 * old_pthread_cond_timedwait.c: Likewise.
3698 * old_pthread_cond_wait.c: Likewise.
3699
842d2817
UD
3700 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
3701 (__pthread_cond_wait): Don't save cancellation mode and seq value
3702 in same location.
3703
0e07706e
UD
3704 * herrno.c (__h_errno_location): Don't define as weak.
3705
bf293afe
UD
37062003-01-02 Jakub Jelinek <jakub@redhat.com>
3707
3708 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
3709 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
3710 and pthread_cond_wait.
3711 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
3712 Renamed to...
3713 (__pthread_cond_broadcast_2_0): ... this.
3714 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
3715 Renamed to...
3716 (__pthread_cond_destroy_2_0): ... this.
3717 * old_pthread_cond_init.c (__old_pthread_cond_init):
3718 Renamed to...
3719 (__pthread_cond_init_2_0): ... this.
3720 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
3721 Renamed to...
3722 (__pthread_cond_signal_2_0): ... this.
3723 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
3724 Renamed to...
3725 (__pthread_cond_wait_2_0): ... this.
3726 * pthread_cond_destroy.c: Include shlib-compat.h.
3727 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
3728 * pthread_cond_init.c: Include shlib-compat.h.
3729 (pthread_cond_init): Change strong_alias into versioned_symbol.
3730 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
3731 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
3732 fields.
3733 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
3734 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
3735 __pthread_cond_wait_2_0): New prototypes.
3736 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
3737 __old_pthread_cond_init, __old_pthread_cond_signal,
3738 __old_pthread_cond_wait): Removed.
3739 * init.c: Include shlib-compat.h.
3740 (pthread_functions): Guard ptr___pthread_attr_init_2_0
3741 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
3742 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
3743 ptr___pthread_cond_*_2_0 fields.
3744 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
3745 pthread_cond_*@GLIBC_2.0 compatibility symbols.
3746
3747 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
3748 LIBC_SIGACTION was not yet defined.
3749 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
3750 [!defined LIBC_SIGACTION] (__sigaction): New function and
3751 libc_hidden_weak.
3752 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
3753 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
3754
37552003-01-02 Jakub Jelinek <jakub@redhat.com>
3756
3757 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
3758
05df18c3
UD
37592003-01-02 Ulrich Drepper <drepper@redhat.com>
3760
3761 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3762 New, larger type definition.
3763 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
3764 implementation.
3765 * Versions [libpthread]: Add definitions for new pthread_cond_*
3766 interfaces for version GLIBC_2.3.2.
3767 * pthread_cond_init.c: Update initialization for new type definition.
3768 * Makefile (libpthread-routines): Remove pthread_cond_wait,
3769 pthread_cond_timedwait, pthread_cond_signal, and
3770 pthread_cond_broadcast. Add old_pthread_cond_init,
3771 old_pthread_cond_destroy, old_pthread_cond_wait,
3772 old_pthread_cond_timedwait, old_pthread_cond_signal, and
3773 old_pthread_cond_broadcast.
3774 * old_pthread_cond_broadcast.c: New file.
3775 * old_pthread_cond_destroy.c: New file.
3776 * old_pthread_cond_init.c: New file.
3777 * old_pthread_cond_signal.c: New file.
3778 * old_pthread_cond_timedwait.c: New file.
3779 * old_pthread_cond_wait.c: New file.
3780 * pthreadP.h: Add prototypes for the compatibility interfaces.
3781
3782 * pthread_cond_destroy.c: Don't include <errno.h>.
3783
fd8979e4
UD
37842003-01-01 Ulrich Drepper <drepper@redhat.com>
3785
3786 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
3787 unnecessary zero offset when addressing MUTEX.
3788
6d6ee629
UD
37892002-12-31 Ulrich Drepper <drepper@redhat.com>
3790
3791 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
3792 __register_atfork.
3793 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
3794 for __register_atfork.
3795
a4baf360
UD
37962002-12-31 Jakub Jelinek <jakub@redhat.com>
3797
3798 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
3799 instead of ASSEMBLER test macro.
3800
3801 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
3802 __libc_current_sigrtmax): Add libc_hidden_def.
3803
3804 * sysdeps/pthread/list.h: Remove assert.h include.
3805
e9395a94
UD
38062002-12-31 Ulrich Drepper <drepper@redhat.com>
3807
3808 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
3809 __pthread_initialize_minimal_internal not
3810 __pthread_initialize_minimal.
3811
89d6e444
UD
38122002-12-30 Ulrich Drepper <drepper@redhat.com>
3813
416d2de6
UD
3814 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
3815 __pthread_initialize_minimal as hidden.
3816
89d6e444
UD
3817 * init.c (__pthread_initialize_minimal_internal): Don't mark as
3818 constructor.
3819
38202002-12-31 Jakub Jelinek <jakub@redhat.com>
3821
3822 * Makefile ($(inst_libdir)/libpthread.so): Depend on
3823 $(common-objpfx)format.lds, include that into the output script.
3824 Fix comment.
3825 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
3826
8cac677c
UD
38272002-12-28 Andreas Jaeger <aj@suse.de>
3828
3829 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
3830 nsec resolution changes.
3831 (xstat64_conv): Likewise.
3832 (xstat32_conv): Likewise.
3833 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
3834 struct kernel_stat.
3835 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
3836 structs stat and stat64.
3837 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 3838 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 3839
49e9f864
UD
38402002-12-30 Jakub Jelinek <jakub@redhat.com>
3841
3842 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
3843 argument.
3844 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
3845 (pthread_exit): Use strong_alias to avoid warnings.
3846 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
3847 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
3848 ptr___pthread_attr_init_2_*.
3849 * init.c (pthread_functions): Adjust.
3850
bab09b26
UD
38512002-12-29 Ulrich Drepper <drepper@redhat.com>
3852
598d7a42
UD
3853 * forward.c: Make all functions available by default again. It
3854 caused too much trouble.
3855
bab09b26
UD
3856 * pt-siglongjmp.c: Removed.
3857
3b7ed871
UD
38582002-12-28 Jakub Jelinek <jakub@redhat.com>
3859
3860 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
3861 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
3862 * sysdeps/i386/Makefile: New file.
3863 * sysdeps/i386/tcb-offsets.sym: New file.
3864 * sysdeps/pthread/tcb-offsets.h: New file.
3865 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3866 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
3867
3868 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
3869 __register_atfork...
3870 (GLIBC_2.3.2): ...here.
3871
38722002-12-28 Ulrich Drepper <drepper@redhat.com>
3873
3874 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
3875 pthread_attr_setstackaddr with __attribute_deprecated__.
3876
270d9d47
UD
38772002-12-27 Jakub Jelinek <jakub@redhat.com>
3878
3879 * pt-system.c (system): Remove cancellation handling.
3880 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
3881 cancellation routines.
3882
131fd126
UD
38832002-12-28 Ulrich Drepper <drepper@redhat.com>
3884
afb2e954
UD
3885 * descr.h: Include <dl-sysdep.h>.
3886 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
3887 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
3888 (MULTIPLE_THREADS_OFFSET): Adjust offset.
3889 (SYSINFO_OFFSEET): Likewise.
3890
38912002-12-27 Jakub Jelinek <jakub@redhat.com>
3892
3893 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
3894 Define.
3895 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
3896 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
3897 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
3898 (USE_DL_SYSINFO): Undef.
3899
39002002-12-22 Jakub Jelinek <jakub@redhat.com>
3901
3902 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
3903 $(common-objpfx)libc.so.
3904 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
3905 it is bigger than pipe buffer size even on arches with bigger
3906 page size.
3907 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
3908
a218c9cf
UD
39092002-12-25 Ulrich Drepper <drepper@redhat.com>
3910
3911 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
3912 correct errno access for case that USE___THREAD is not defined.
3913
015a2dc9
UD
39142002-12-24 Ulrich Drepper <drepper@redhat.com>
3915
3916 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
3917 Patch by Marijn Ros <marijn@mad.scientist.com>.
3918
5220f9ac
RM
39192002-12-22 Roland McGrath <roland@redhat.com>
3920
3921 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
3922
1561bf63
UD
39232002-12-20 Ulrich Drepper <drepper@redhat.com>
3924
3925 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
3926
3325198e
UD
39272002-12-19 Ulrich Drepper <drepper@redhat.com>
3928
057c823f
UD
3929 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
3930 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
3931 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
3932
097eca29
UD
3933 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
3934 of int $0x80.
3935 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3936 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
3937 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
3938 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3939 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
3940 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
3941 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
3942 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3943
3944 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
3945 sysenter.
3946 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
3947
3948 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
3949
5f5843e3
UD
3950 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
3951 in new TCB.
3952 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
3953 that sysinfo is properly initialized.
3954 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
3955 to 1 only for ld.so.
3956
3325198e
UD
3957 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
3958 RTLD_CORRECT_DYNAMIC_WEAK.
3959
74e8f2dc
UD
39602002-12-19 Jakub Jelinek <jakub@redhat.com>
3961
3962 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
3963 Use return 0 as 6th argument to FORWARD4.
3964 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
3965
df45b31e
UD
39662002-12-18 Ulrich Drepper <drepper@redhat.com>
3967
3968 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
3969 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
3970 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
3971 (INIT_SYSINFO): New #define.
3972 (TLS_TP_INIT): Use INIT_SYSINFO.
3973 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3974 At test to make sure SYSINFO_OFFSET value is correct.
3975 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
3976
3d539579
UD
39772002-12-18 Jakub Jelinek <jakub@redhat.com>
3978
3979 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
3980 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
3981 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
3982 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
3983 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
3984 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
3985 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
3986
d7913e0e
UD
39872002-12-18 Ulrich Drepper <drepper@redhat.com>
3988
f051627f
UD
3989 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
3990 macro instead of using int $0x80 directly.
3991
d7913e0e
UD
3992 * sysdeps/pthread/bits/stdio-lock.h: New file.
3993 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
3994 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
3995 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
3996 * Makefile (routines): Add libc-lowlevelmutex.
3997
3998 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
3999 __i686.get_pc_thunk.dx.
4000
f077a4a9
UD
40012002-12-17 Jakub Jelinek <jakub@redhat.com>
4002
4003 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
4004 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
4005 ($(objpfx)tst-cancel-wrappers.out): New rule.
4006 * tst-cancel-wrappers.sh: New test.
4007 * tst-locale1.c: Include signal.h.
4008 (uselocale): Test static linking of __libc_current_sigrt*.
4009
40102002-12-17 Ulrich Drepper <drepper@redhat.com>
4011
4012 * Makefile (tests): Add tst-cancel6.
4013 * tst-cancel6.c: New file
4014
bd499a3b
UD
40152002-12-17 Jakub Jelinek <jakub@redhat.com>
4016
4017 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4018 Define meaningfully for assembler as well.
4019 * pthreadP.h (struct pthread_functions): Remove
4020 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
4021 and ptr_pthread_attr_init_2_1 fields.
4022 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
4023 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
4024 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
4025 (FORWARD3): Define using FORWARD4.
4026 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
4027 versions.
4028 * pt-system.c: Remove duplicate stdlib.h include.
4029
0a1063f4
UD
40302002-12-16 Ulrich Drepper <drepper@redhat.com>
4031
87d60668
UD
4032 * sem_init.c: Define sem_init@GLIBC_2.0.
4033 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
4034 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
4035
0a1063f4
UD
4036 * flockfile.c: Moved to...
4037 * sysdeps/pthread/flockfile.c: ...here. New file.
4038 * funlockfile.c: Moved to...
4039 * sysdeps/pthread/funlockfile.c: ...here. New file.
4040 * ftrylockfile.c: Moved to...
4041 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
4042
9634cf9d
UD
40432002-12-16 Jakub Jelinek <jakub@redhat.com>
4044
4045 * libc-cancellation.c: Guard both function with
4046 #if !defined NOT_IN_libc.
4047 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
4048 automatically provided pthread wrappers.
4049 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
4050 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
4051 nor in libpthread.
4052 * pt-open.c: Removed.
4053 * pt-fcntl.c: Removed.
4054 * pt-fsync.c: Removed.
4055 * pt-lseek.c: Removed.
4056 * pt-msgrcv.c: Removed.
4057 * pt-msgsnd.c: Removed.
4058 * pt-msync.c: Removed.
4059 * pt-nanosleep.c: Removed.
4060 * pt-open64.c: Removed.
4061 * pt-pause.c: Removed.
4062 * pt-pread.c: Removed.
4063 * pt-pread64.c: Removed.
4064 * pt-pwrite.c: Removed.
4065 * pt-pwrite64.c: Removed.
4066 * pt-read.c: Removed.
4067 * pt-recv.c: Removed.
4068 * pt-recvfrom.c: Removed.
4069 * pt-recvmsg.c: Removed.
4070 * pt-send.c: Removed.
4071 * pt-sendto.c: Removed.
4072 * pt-sigtimedwait.c: Removed.
4073 * pt-sigwait.c: Removed.
4074 * pt-wait.c: Removed.
4075 * pt-waitpid.c: Removed.
4076 * pt-write.c: Removed.
4077 * pt-accept.c: Removed.
4078 * pt-close.c: Removed.
4079 * pt-connect.c: Removed.
4080 * pt-lseek64.c: Removed.
4081 * pt-sendmsg.c: Removed.
4082 * pt-tcdrain.c: Removed.
4083
6ee8d334
UD
40842002-12-15 Ulrich Drepper <drepper@redhat.com>
4085
81fa9371
UD
4086 * init.c (__pthread_initialize_minimal_internal): Renamed from
4087 __pthread_initialize_minimal. Make old name an alias. This
4088 converts a normal relocation into a relative relocation.
4089
f3015aa5
UD
4090 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
4091
4cbc1950
UD
4092 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
4093 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
4094 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
4095 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
4096 pt-sigwaitinfo, pt-waitid, and pt-writev.
4097 * pt-creat.c: Removed.
4098 * pt-poll.c: Removed.
4099 * pt-pselect.c: Removed.
4100 * pt-readv.c: Removed.
4101 * pt-select.c: Removed.
4102 * pt-sigpause.c: Removed.
4103 * pt-sigsuspend.c: Removed.
4104 * pt-sigwaitinfo.c: Removed.
4105 * pt-waitid.c: Removed.
4106 * pt-writev.c: Removed.
4107
8454830b
UD
4108 * init.c (pthread_functions): New variable.
4109 (__pthread_initialize_minimal): Pass pointer to pthread_functions
4110 (or NULL) to __libc_pthread_init.
4111 * forward.c: Rewrite to use __libc:pthread_functions array to get
4112 function addresses.
4113 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
4114 prototype.
4115 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4116 Take new parameter. Copy content of variable pointed to by it
4117 to __libc_pthread_init.
4118
4119 * pthreadP.h (struct pthread_functions): New type.
4120 (__libc_pthread_init): Declare.
4121
4122 * pthread_attr_destroy.c: Add namespace protected alias.
4123 * pthread_attr_getdetachstate.c: Likewise.
4124 * pthread_attr_getinheritsched.c: Likewise.
4125 * pthread_attr_getschedparam.c: Likewise.
4126 * pthread_attr_getschedpolicy.c: Likewise.
4127 * pthread_attr_getscope.c: Likewise.
4128 * pthread_attr_setdetachstate.c: Likewise.
4129 * pthread_attr_setinheritsched.c: Likewise.
4130 * pthread_attr_setschedparam.c: Likewise.
4131 * pthread_attr_setschedpolicy.c: Likewise.
4132 * pthread_attr_setscope.c: Likewise.
4133 * pthread_cond_broadcast.c: Likewise.
4134 * pthread_cond_destroy.c: Likewise.
4135 * pthread_cond_init.c: Likewise.
4136 * pthread_cond_signal.c: Likewise.
4137 * pthread_cond_wait.c: Likewise.
4138 * pthread_condattr_destroy.c: Likewise.
4139 * pthread_condattr_init.c: Likewise.
4140 * pthread_equal.c: Likewise.
4141 * pthread_exit.c: Likewise.
4142 * pthread_getschedparam.c: Likewise.
4143 * pthread_self.c: Likewise.
4144 * pthread_setcancelstate.c: Likewise.
4145 * pthread_setschedparam.c: Likewise.
4146 * pthread_mutex_destroy.c: Likewise.
4147 * pthread_mutex_init.c: Likewise.
4148 * pthreadP.h: Add prototypes for the aliases.
4149
0d5f4929
UD
4150 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
4151 multiple_threads member in correct TCB to 1.
4152
6ee8d334
UD
4153 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
4154 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
4155 member of thread decriptor, otherwise return unconditionally 1.
4156
2fb6444d
UD
41572002-12-14 Ulrich Drepper <drepper@redhat.com>
4158
4159 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
4160 regular Linux version. Remove file.
4161 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
4162 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
4163 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
4164 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
4165 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
4166 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
4167 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
4168 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
4169 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
4170 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
4171 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
4172 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
4173 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
4174 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
4175 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
4176 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
4177 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
4178 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
4179 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
4180 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
4181 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
4182 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
4183 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
4184 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
4185 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
4186 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
4187 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
4188 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
4189 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
4190 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
4191
86b2dc40
UD
41922002-12-14 Jakub Jelinek <jakub@redhat.com>
4193
4194 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
4195 * sysdeps/unix/sysv/linux/open.c: Removed.
4196 * sysdeps/unix/sysv/linux/fsync.c: Removed.
4197 * sysdeps/unix/sysv/linux/lseek.c: Removed.
4198 * sysdeps/unix/sysv/linux/msync.c: Removed.
4199 * sysdeps/unix/sysv/linux/read.c: Removed.
4200 * sysdeps/unix/sysv/linux/close.c: Removed.
4201 * sysdeps/unix/sysv/linux/creat.c: Removed.
4202 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
4203 * sysdeps/unix/sysv/linux/pause.c: Removed.
4204 * sysdeps/unix/sysv/linux/select.c: Removed.
4205 * sysdeps/unix/sysv/linux/write.c: Removed.
4206
9d263d72
UD
42072002-12-14 Ulrich Drepper <drepper@redhat.com>
4208
4209 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
4210 element in TCB to see whether locking is needed.
4211
4212 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
4213 MULTIPLE_THREADS_OFFSET value is correct.
4214
4215 * sysdeps/unix/sysv/linux/close.c: New file.
4216 * sysdeps/unix/sysv/linux/connect.S: New file.
4217 * sysdeps/unix/sysv/linux/creat.c: New file.
4218 * sysdeps/unix/sysv/linux/fsync.c: New file.
4219 * sysdeps/unix/sysv/linux/llseek.c: New file.
4220 * sysdeps/unix/sysv/linux/lseek.c: New file.
4221 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
4222 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
4223 * sysdeps/unix/sysv/linux/msync.c: New file.
4224 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
4225 * sysdeps/unix/sysv/linux/open.c: New file.
4226 * sysdeps/unix/sysv/linux/open64.c: New file.
4227 * sysdeps/unix/sysv/linux/pause.c: New file.
4228 * sysdeps/unix/sysv/linux/poll.c: New file.
4229 * sysdeps/unix/sysv/linux/pread.c: New file.
4230 * sysdeps/unix/sysv/linux/pread64.c: New file.
4231 * sysdeps/unix/sysv/linux/pselect.c: New file.
4232 * sysdeps/unix/sysv/linux/pwrite.c: New file.
4233 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
4234 * sysdeps/unix/sysv/linux/readv.c: New file.
4235 * sysdeps/unix/sysv/linux/recv.S: New file.
4236 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
4237 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
4238 * sysdeps/unix/sysv/linux/select.c: New file.
4239 * sysdeps/unix/sysv/linux/send.S: New file.
4240 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
4241 * sysdeps/unix/sysv/linux/sendto.S: New file.
4242 * sysdeps/unix/sysv/linux/sigpause.c: New file.
4243 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
4244 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4245 * sysdeps/unix/sysv/linux/sigwait.c: New file.
4246 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4247 * sysdeps/unix/sysv/linux/system.c: New file.
4248 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
4249 * sysdeps/unix/sysv/linux/wait.c: New file.
4250 * sysdeps/unix/sysv/linux/waitid.c: New file.
4251 * sysdeps/unix/sysv/linux/waitpid.c: New file.
4252 * sysdeps/unix/sysv/linux/writev.c: New file.
4253 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
4254
4255 * pt-readv.c: Fix comment.
4256
42572002-12-14 Jakub Jelinek <jakub@redhat.com>
4258
4259 * tst-cleanup1.c: Include stdlib.h.
4260
4261 * tst-cancel5.c: New test.
4262 * Makefile (tests): Add tst-cancel5.
4263 (tst-cancel5): Link against libc.so libpthread.so in that order.
4264
9ae0909b
UD
42652002-12-13 Ulrich Drepper <drepper@redhat.com>
4266
b7bdd9c4
UD
4267 * forward.c (test_loaded): Prevent recursive calls.
4268
9ae0909b
UD
4269 * Makefile (routines): Add libc-cancellation.
4270 * libc-cancellation.c: New file.
4271 * descr.h (struct pthread): Add multiple_threads field.
4272 * allocatestack.c (allocate_stack): Initialize multiple_header field of
4273 new thread descriptor to 1.
4274 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
4275 Initialize multiple_thread field after successful thread creation.
4276 * cancellation.c (__do_cancel): Move to pthreadP.h.
4277 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
4278 (__pthread_disable_asynccancel): Add internal_function attribute.
4279 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
4280 * pthread_setcancelstate.c: Likewise.
4281 * pthread_setcanceltype.c: Likewise.
4282 * pthread_exit.c: Likewise.
4283 * pthreadP.h (CANCELLATION_P): Likewise.
4284 (__do_cancel): Define as static inline.
4285 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
4286 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
4287 declarations.
4288 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
4289 fields. Define MULTIPLE_THREADS_OFFSET.
4290 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
4291 declaration.
4292 * sysdeps/unix/sysv/linux/accept.S: New file.
4293 * sysdeps/unix/sysv/linux/read.c: New file.
4294 * sysdeps/unix/sysv/linux/write.c: New file.
4295 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
4296 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
4297 initialization of __libc_locking_needed.
4298 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
4299 __libc_locking_needed, use multiple_threads field in TCB.
4300 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4301
22f20674
UD
43022002-12-12 Ulrich Drepper <drepper@redhat.com>
4303
2ad2e1e7
UD
4304 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
4305 version.
4306 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
4307
22f20674
UD
4308 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
4309 access to __libc_locking_needed for PIC.
4310
aa80bf86
UD
43112002-12-12 Jakub Jelinek <jakub@redhat.com>
4312
4313 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
4314 declare for libc.so.
4315 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
4316 expression.
4317 (__libc_lock_lock): Put into statement expression.
4318 (__libc_lock_unlock): Remove trailing semicolon.
4319 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
4320
24021373
RM
43212002-12-12 Roland McGrath <roland@redhat.com>
4322
4323 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
4324 "m" constraint to refer to __libc_locking_needed. Declare it here.
4325
14e7aece
UD
43262002-12-12 Ulrich Drepper <drepper@redhat.com>
4327
4328 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
4329 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
4330 Initialize __libc_locking_needed.
4331 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
4332 instead of __register_pthread_fork_handler.
4333 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
4334 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
4335 fork-gen with libc_pthread_init.
4336 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
4337 of __register_pthread_fork_handler.
4338 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
4339 of __register_pthread_fork_handler.
4340 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
4341 __libc_locking_needed to determine whether lock prefix can be avoided.
4342 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4343
85631c8e
UD
43442002-12-11 Ulrich Drepper <drepper@redhat.com>
4345
da63009e
UD
4346 * Makefile (tests): Add tst-cleanup1.
4347 * tst-cleanup1.c: New file.
4348 * cancellation.c (__cleanup_thread): Removed.
4349 (__do_cancel): Remove call to __cleanup_thread.
4350 * pthreadP.h: Remove __cleanup_thread prorotype.
4351
000160a2
UD
4352 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
4353 Remember function and argument even if cancellation handler
4354 function is not available.
4355 (__libc_cleanup_region_end): Execute registered function directly if
4356 pthread functions are not available.
4357 (__libc_cleanup_end): Likewise.
4358
85631c8e
UD
4359 * init.c (__pthread_initialize_minimal): Fix initialization in
4360 static lib by preventing gcc from being too clever.
4361
dce8f2b6
UD
43622002-12-10 Ulrich Drepper <drepper@redhat.com>
4363
34a075be
UD
4364 * init.c (__pthread_initialize_minimal): Remove unneccesary
4365 sigaddset call.
4366
dce8f2b6
UD
4367 * Makefile (tests): We can run tst-locale2 now.
4368
e5e45b53
UD
43692002-12-09 Ulrich Drepper <drepper@redhat.com>
4370
4371 * Versions: Remove duplicated sigwait entry.
4372
bdb04f92
UD
43732002-12-08 Ulrich Drepper <drepper@redhat.com>
4374
1e506629
UD
4375 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
4376 inside libpthread.
4377
a3957dd5
UD
4378 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
4379
bdb04f92
UD
4380 * pthreadP.h: Declare __pthread_enable_asynccancel and
4381 __pthread_disable_asynccancel.
4382 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
4383 (CANCEL_RESET): Use __pthread_disable_asynccancel.
4384 * cancellation.c (__pthread_enable_asynccancel): New function.
4385 (__pthread_disable_asynccancel): New function.
4386 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
4387 * pt-close.c: Likewise.
4388 * pt-connect.c: Likewise.
4389 * pt-creat.c: Likewise.
4390 * pt-fcntl.c: Likewise.
4391 * pt-fsync.c: Likewise.
4392 * pt-lseek.c: Likewise.
4393 * pt-lseek64.c: Likewise.
4394 * pt-msgrcv.c: Likewise.
4395 * pt-msgsnd.c: Likewise.
4396 * pt-msync.c: Likewise.
4397 * pt-nanosleep.c: Likewise.
4398 * pt-open.c: Likewise.
4399 * pt-open64.c: Likewise.
4400 * pt-pause.c: Likewise.
4401 * pt-poll.c: Likewise.
4402 * pt-pread.c: Likewise.
4403 * pt-pread64.c: Likewise.
4404 * pt-pselect.c: Likewise.
4405 * pt-pwrite.c: Likewise.
4406 * pt-pwrite64.c: Likewise.
4407 * pt-read.c: Likewise.
4408 * pt-readv.c: Likewise.
4409 * pt-recv.c: Likewise.
4410 * pt-recvfrom.c: Likewise.
4411 * pt-recvmsg.c: Likewise.
4412 * pt-select.c: Likewise.
4413 * pt-send.c: Likewise.
4414 * pt-sendmsg.c: Likewise.
4415 * pt-sendto.c: Likewise.
4416 * pt-sigpause.c: Likewise.
4417 * pt-sigsuspend.c: Likewise.
4418 * pt-sigtimedwait.c: Likewise.
4419 * pt-sigwait.c: Likewise.
4420 * pt-sigwaitinfo.c: Likewise.
4421 * pt-system.c: Likewise.
4422 * pt-tcdrain.c: Likewise.
4423 * pt-wait.c: Likewise.
4424 * pt-waitid.c: Likewise.
4425 * pt-waitpid.c: Likewise.
4426 * pt-write.c: Likewise.
4427 * pt-writev.c: Likewise.
a3957dd5
UD
4428 * pthread_join.c: Likewise.
4429 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
4430
4431 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
4432 (__xpg_sigpause): New function.
4433 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
4434
6ccb3834
UD
44352002-12-07 Ulrich Drepper <drepper@redhat.com>
4436
09efc3ba
UD
4437 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
4438
4439 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
4440 _GI_pthread_cleanup_pop to pthreadP.h.
4441
4442 * ftrylockfile.c: Use _IO_lock_trylock instead of
4443 pthread_mutex_trylock.
4444
4445 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
4446 (CANCEL_RESET): Likewise.
4447 (__pthread_setcanceltype_): Declare.
4448 (__pthread_mutex_lock_internal): Declare.
4449 (__pthread_mutex_unlock_internal): Declare.
4450 (__pthread_once_internal): Declare.
4451 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
4452 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
4453
4454 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
4455 and pthread_mutex_unlock.
4456 * pthread_cond_wait.c: Likewise.
4457 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
4458 * pthread_mutex_unlock.c: Likewise.
4459
4460 * pthread_setcanceltype.c: Add additional alias
4461 __pthread_setcanceltype.
4462
4463 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
4464 * sem_open.c (sem_open): Likewise.
4465 Use __libc_open, __libc_write, and __libc_close instead of
4466 open, write, and close respectively.
4467
4468 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
4469 Rewrite as statement expression since it must return a value.
4470
4471 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
4472 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
4473 __pthread_kill.
4474
4475 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
4476 alias __pthread_once_internal.
4477
6ccb3834
UD
4478 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
4479
d3c9f895
UD
44802002-12-06 Ulrich Drepper <drepper@redhat.com>
4481
4614167a
UD
4482 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
4483 * tst-stdio1.c: New file.
4484 * tst-stdio2.c: New file.
4485
a4548cea
UD
4486 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
4487
d3c9f895
UD
4488 * Makefile (tests): Comment out tst-locale2 for now.
4489 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
4490
4491 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
4492 -D_IO_MTSAFE_IO.
4493 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
4494 Use _IO_lock_init instead of explicit assignment.
4495
4496 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
4497 Define __libc_lock_* and __libc_lock_recursive macros with
4498 lowlevellock macros, not pthread mutexes.
4499
4500 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
4501 of pthread_mutex_lock.
4502 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
4503 instead of pthread_mutex_unlock.
4504
fde89ad0
RM
45052002-12-06 Roland McGrath <roland@redhat.com>
4506
4507 * allocatestack.c (__stack_user): Use uninitialized defn.
4508 * init.c (__pthread_initialize_minimal): Initialize it here.
4509
11767d47
RM
45102002-12-05 Roland McGrath <roland@redhat.com>
4511
fde89ad0
RM
4512 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
4513 string.
4514 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
4515
11767d47
RM
4516 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
4517 missing & here too.
4518
440d8bc2
UD
45192002-12-05 Ulrich Drepper <drepper@redhat.com>
4520
4521 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
4522 lowlevellock.
4523 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
4524 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
4525 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
4526 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
4527 for __libc_lock_* macros.
4528 * Makefile (routines): Add libc-lowlevellock.
4529
45302002-10-09 Roland McGrath <roland@redhat.com>
4531
4532 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
4533 Under [__PIC__], call the function via the pointer fetched for
4534 comparison rather than a call by name that uses the PLT.
4535 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
4536 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
4537 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
4538 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
4539 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
4540
d5ed0118
RM
45412002-12-04 Roland McGrath <roland@redhat.com>
4542
4543 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
4544
4545 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
4546 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
4547
4548 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
4549
eaa4099f
UD
45502002-12-04 Ulrich Drepper <drepper@redhat.com>
4551
4552 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
4553 a completely opaque, non-integer type.
4554 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4555
33b5d0cc
UD
45562002-12-05 Jakub Jelinek <jakub@redhat.com>
4557
4558 * sysdeps/i386/tls.h: Include stdlib.h.
4559 * sysdeps/x86_64/tls.h: Likewise.
4560
7a5cdb30
UD
45612002-12-04 Ulrich Drepper <drepper@redhat.com>
4562
c4a6d859
UD
4563 * Makefile (tests): Add tst-locale2.
4564 (tests-static): Likewise.
4565 * tst-locale2.c: New file.
4566
7a5cdb30
UD
4567 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
4568 volatile and add memory clobbers to lock operations.
4569
d82d5d12
UD
45702002-12-03 Ulrich Drepper <drepper@redhat.com>
4571
69cae3cf
UD
4572 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
4573 * sysdeps/i386/i486/bits/atomic.h: New file.
4574 * sysdeps/i386/i586/bits/atomic.h: New file.
4575 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
4576 include i486 version.
4577 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
4578 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 4579 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 4580
e4044c01
UD
4581 * allocatestack.c (get_cached_stack): Don't crash if we first
4582 found a stack with a larger size then needed.
4583 Reported by Hui Huang <hui.huang@sun.com>.
4584
d82d5d12
UD
4585 * Makefile (tests): Add tst-sysconf.
4586 * tst-sysconf.c: New file.
4587
4588 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
4589 PTHREAD_THREADS_MAX.
4590
fa9a4ff0
RM
45912002-12-02 Roland McGrath <roland@redhat.com>
4592
4593 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
4594 Declare using hidden_proto instead of attribute_hidden, so there are
4595 non-.hidden static symbols for gdb to find.
4596 (__pthread_keys): Likewise.
4597 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
4598 * allocatestack.c (__stack_user): Likewise.
4599 * pthread_create.c (__pthread_keys): Likewise.
4600 (__nptl_threads_events, __nptl_last_event): Make these static instead
4601 of hidden.
4602 * pthread_key_create.c (__pthread_pthread_keys_max,
4603 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
4604
91949a33
UD
46052002-12-02 Ulrich Drepper <drepper@redhat.com>
4606
c22b52fa
UD
4607 * Makefile (tests): Add tst-locale1. If buid-static is yes link
4608 statically.
4609 * tst-locale1.c: New file.
4610
beb6aa41
UD
4611 * pthread_cond_timedwait.c: Include <stdlib.h>.
4612
91949a33
UD
4613 * Makefile (tests): Add tst-fork2 and tst-fork3.
4614 * tst-fork2.c: New file.
4615 * tst-fork3.c: New file.
4616
654dff90
UD
46172002-11-28 Ulrich Drepper <drepper@redhat.com>
4618
cb0e76b4
UD
4619 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4620
4621 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
4622 require it to 200112L.
4623
4624 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
4625 instruction only if HAVE_CMOV is defined.
4626 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
4627
975aa229
UD
4628 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
4629
654dff90
UD
4630 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
4631
4632 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
4633
4634 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
4635
a3931336
UD
46362002-11-27 Ulrich Drepper <drepper@redhat.com>
4637
c10c099c
UD
4638 * sysdeps/x86_64/bits/atomic.h: New file.
4639
4640 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
4641 16-bit operations.
4642
dca99d27
UD
4643 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
4644 possible since gettid cannot fail.
4645
f78deea6
UD
4646 * sysdeps/x86_64/pthreaddef.h: New file.
4647
4648 * sysdeps/i386/pthreaddef.h (gettid): Removed.
4649
4650 * sysdeps/x86_64/pthread_spin_init.c: New file.
4651 * sysdeps/x86_64/pthread_spin_lock.c: New file.
4652 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
4653 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
4654
4655 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
4656 Add missing lock prefix. Minute optimization.
4657
4658 * tst-spin2.c (main): Also check successful trylock call.
4659
4660 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
4661 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
4662
4663 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
4664 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
4665
4666 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
4667 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
4668 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
4669
4670 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
4671 value in case of an error.
4672
a3931336
UD
4673 * sysdeps/x86_64/tls.h: New file.
4674
76a50749
UD
46752002-11-26 Ulrich Drepper <drepper@redhat.com>
4676
117c452c
UD
4677 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
4678 takes the array member name and the index as parameters.
4679 (THREAD_SETMEM_NC): Likewise.
4680 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
4681 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
4682 interfaces.
4683
4684 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
4685 to decide which code to use.
4686 (THREAD_SETMEM_NC): Likewise.
4687
76a50749
UD
4688 * allocatestack.c (queue_stack): Don't remove stack from list here.
4689 Do it in the caller. Correct condition to prematurely terminate
4690 loop to free stacks.
4691 (__deallocate_stack): Remove stack from list here.
4692
46932002-11-26 Ulrich Drepper <drepper@redhat.com>
4694
4695 * Makefile (tests): Add tst-stack1.
4696 * tst-stack1.c: New file.
4697
4698 * allocatestack.c (allocate_stack): Initialize the TCB on a user
4699 provided stack.
4700
4701 * pthread_attr_getstack.c: Return bottom of the thread area.
4702
47032002-11-25 Ulrich Drepper <drepper@redhat.com>
4704
4705 * Makefile (libpthread-routines): Add pt-allocrtsig and
4706 pthread_kill_other_threads.
4707 * pt-allocrtsig.c: New file.
4708 * pthread_kill_other_threads.c: New file.
4709 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
4710 all three functions.
4711 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
4712 allocrtsig.
4713 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
4714 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
4715 and __libc_allocate_rtsig_private.
4716 * Versions (libpthread): Export pthread_kill_other_threads_np,
4717 __libc_current_sigrtmin, and __libc_current_sigrtmax.
4718
47192002-11-24 Ulrich Drepper <drepper@redhat.com>
4720
4721 * allocatestack.c (allocate_stack): stackaddr in attribute points to
4722 the end of the stack. Adjust computations.
4723 When mprotect call fails dequeue stack and free it.
4724 * pthread_attr_setstack.c: Store top of the stack in stackaddr
4725 attribute.
4726 * pthread_getattr_np.c: Likewise.
4727
4728 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
4729 surprises.
4730
47312002-11-23 Ulrich Drepper <drepper@redhat.com>
4732
4733 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
4734 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
4735
47362002-11-22 Ulrich Drepper <drepper@redhat.com>
4737
4738 * pthread_getspecific.c: Optimize access to first 2nd-level array.
4739 * pthread_setspecific.c: Likewise.
4740
47412002-11-21 Ulrich Drepper <drepper@redhat.com>
4742
4743 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
4744 definitions. Get them from the official place.
4745 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
4746
4747 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
4748 Use new CLONE_ flags in clone() calls.
4749
4750 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
4751 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
4752
4753 * Versions: Add pthread_* functions for libc.
4754 * forward.c: New file.
4755
4756 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
4757 errno-loc.
4758 * herrno.c: New file.
4759 * res.c: New file.
4760
4761 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
4762 sem_trywait, and sem_timedwait. Add herrno and res.
4763 * sem_init.c: Don't initialize lock and waiters members.
4764 * sem_open.c: Likewise.
4765 * sem_post.c: Removed.
4766 * sem_wait.c: Removed.
4767 * sem_trywait.c: Removed.
4768 * sem_timedwait.c: Removed.
4769 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
4770 Includes full implementations of sem_post, sem_wait, sem_trywait,
4771 and sem_timedwait.
4772 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
4773 for new implementation.
4774 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
4775 and waiters fields.
4776
4777 * tst-sem3.c: Improve error message.
4778 * tst-signal3.c: Likewise.
4779
4780 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
4781 to tell the kernel about the termination futex and to initialize tid
4782 member. Don't initialize main_thread.
4783 * descr.h (struct pthread): Remove main_thread member.
4784 * cancelllation.c (__do_cancel): Remove code handling main thread.
4785 The main thread is not special anymore.
4786
4787 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
4788 size of the stacks to stack_cache_actsize.
4789
4790 * pt-readv.c: Add missing "defined".
4791 * pt-sigwait.c: Likewise.
4792 * pt-writev.c: Likewise.
4793
47942002-11-09 Ulrich Drepper <drepper@redhat.com>
4795
4796 * Versions: Export __connect from libpthread.
4797 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4798
4799 * Makefile (libpthread-routines): Add pt-raise.
4800 * sysdeps/unix/sysv/linux/raise.c: New file.
4801 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
4802 * sysdeps/generic/pt-raise.c: New file.
4803
4804 * pthread_cond_init.c: Initialize all data elements of the condvar
4805 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
4806
4807 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
4808 * pthread_create.c: Likewise.
4809
4810 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
4811 * tst-key1.c: New file.
4812 * tst-key2.c: New file.
4813 * tst-key3.c: New file.
4814
4815 * Versions: Export pthread_detach for version GLIBC_2.0.
4816 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
4817
48182002-11-08 Ulrich Drepper <drepper@redhat.com>
4819
4820 * pthread_key_create.c: Terminate search after an unused key was found.
4821 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4822
4823 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
4824 Patch by Luca Barbieri <ldb@ldb.ods.org>.
4825
48262002-10-10 Ulrich Drepper <drepper@redhat.com>
4827
4828 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
4829 dynamic lookup for errno in PIC.
4830
4831 * allocatestack.c (get_cached_stack): Rearrange code slightly to
4832 release the stack lock as soon as possible.
4833 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
4834 the static TLS block.
4835 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
4836
4837 * cancellation.c: Renamed from cancelation.c.
4838 * Makefile: Adjust accordingly.
4839 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
4840 * cleanup_defer.c: Use CANCELLATION_P.
4841 * pthread_testcancel.c: Likewise.
4842 * descr.h: Fix spelling in comments.
4843 * init.c: Likewise.
4844 * pthread_getattr_np.c: Likewise.
4845 * pthread_getschedparam.c: Likewise.
4846 * pthread_setschedparam.c: Likewise.
4847 * Versions: Likewise.
4848
4849 * pt-pselect.c: New file.
4850 * Makefile (libpthread-routines): Add pt-pselect.
4851 * Versions: Add pselect.
4852
4853 * tst-cancel4.c: New file.
4854 * Makefile (tests): Add tst-cancel4.
4855
48562002-10-09 Ulrich Drepper <drepper@redhat.com>
4857
4858 * pthread_mutex_lock.c: Always record lock ownership.
4859 * pthread_mutex_timedlock.c: Likewise.
4860 * pthread_mutex_trylock.c: Likewise.
4861
4862 * pt-readv.c: New file.
4863 * pt-writev.c: New file.
4864 * pt-creat.c: New file.
4865 * pt-msgrcv.c: New file.
4866 * pt-msgsnd.c: New file.
4867 * pt-poll.c: New file.
4868 * pt-select.c: New file.
4869 * pt-sigpause.c: New file.
4870 * pt-sigsuspend.c: New file.
4871 * pt-sigwait.c: New file.
4872 * pt-sigwaitinfo.c: New file.
4873 * pt-waitid.c: New file.
4874 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
4875 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
4876 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
4877 * Versions: Add all the new functions.
4878
4879 * tst-exit1.c: New file.
4880 * Makefile (tests): Add tst-exit1.
4881
4882 * sem_timedwait.c: Minor optimization for more optimal fastpath.
4883
48842002-10-08 Ulrich Drepper <drepper@redhat.com>
4885
4886 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
4887
4888 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
4889 call. pthread_join is an official cancellation point.
4890 * pthread_timedjoin.c: Likewise.
4891
4892 * pthread_cond_wait.c: Revert order in which internal lock are dropped
4893 and the condvar's mutex are retrieved.
4894 * pthread_cond_timedwait.c: Likewise.
4895 Reported by dice@saros.East.Sun.COM.
4896
48972002-10-07 Ulrich Drepper <drepper@redhat.com>
4898
4899 * pthreadP.h: Cut out all type definitions and move them...
4900 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
4901 * pthreadP.h: Include <internaltypes.h>.
4902
4903 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
4904 performance tweaks.
4905
4906 * sem_trywait.c: Shuffle #includes around to get right order.
4907 * sem_timedwait.c: Likewise.
4908 * sem_post.c: Likewise.
4909 * sem_wait.c: Likewise.
4910
4911 * nptl 0.3 released.
4912
4913 * Makefile (tests): Add tst-signal3.
4914 * tst-signal3.c: New file.
4915
49162002-10-05 Ulrich Drepper <drepper@redhat.com>
4917
4918 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
4919 the asms modify the sem object.
4920 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
4921
4922 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
4923 the actual members.
4924 * pthreadP.h (struct sem): New type. Actual semaphore type.
4925 * semaphoreP.h: Include pthreadP.h.
4926 * sem_getvalue.c: Adjust to sem_t change.
4927 * sem_init.c: Likewise.
4928 * sem_open.c: Likewise.
4929 * sem_post.c: Likewise.
4930 * sem_timedwait.c: Likewise.
4931 * sem_trywait.c: Likewise.
4932 * sem_wait.c: Likewise.
4933
49342002-10-04 Ulrich Drepper <drepper@redhat.com>
4935
4936 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
4937 * tst-basic2.c: New file.
4938 * tst-exec1.c: New file.
4939 * tst-exec2.c: New file.
4940 * tst-exec3.c: New file.
4941
4942 * tst-fork1.c: Remove extra */.
4943
4944 * nptl 0.2 released. The API for IA-32 is complete.