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