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