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