]> sourceware.org Git - glibc.git/blame - nptl/ChangeLog
Update.
[glibc.git] / nptl / ChangeLog
CommitLineData
3e36c37d
UD
12003-06-08 Ulrich Drepper <drepper@redhat.com>
2
3 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
4 hand-written CFI generation code. Since ENTRY/END also initiated
5 CFI frames this caused two CFI sets to be generated.
6
7726edc2
UD
72003-06-07 Ulrich Drepper <drepper@redhat.com>
8
9 * cleanup_routine.c: New file.
10 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
11 * sysdeps/pthread/pthread.h: Add support for fully exception-based
12 cleanup handling.
13 * Makefile (libpthread-routines): Add cleanup_routine.
14 Add more CFLAGS variables to compile with exceptions. Add comments
15 why which file needs unwind tables.
16 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
17 tests.
18 * tst-cancelx1.c: New file.
19 * tst-cancelx2.c: New file.
20 * tst-cancelx3.c: New file.
21 * tst-cancelx4.c: New file.
22 * tst-cancelx5.c: New file.
23 * tst-cancelx6.c: New file.
24 * tst-cancelx7.c: New file.
25 * tst-cancelx8.c: New file.
26 * tst-cancelx9.c: New file.
27 * tst-cancelx10.c: New file.
28 * tst-cancelx11.c: New file.
29 * tst-cancelx12.c: New file.
30 * tst-cancelx13.c: New file.
31 * tst-cancelx14.c: New file.
32 * tst-cancelx15.c: New file.
33 * tst-cleanupx0.c: New file.
34 * tst-cleanupx0.expect: New file.
35 * tst-cleanupx1.c: New file.
36 * tst-cleanupx2.c: New file.
37 * tst-cleanupx3.c: New file.
38
39 * tst-cleanup0.c: Make standard compliant.
40 * tst-cleanup1.c: Likewise.
41
42 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
43 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
44 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
45 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
46 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
47 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
48 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
49 CLEANUP_JMP_BUF.
50 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
51 * tst-cancel12.c: New file.
52 * tst-cancel13.c: New file.
53 * tst-cancel14.c: New file.
54 * tst-cancel15.c: New file.
55 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
56 and tst-cancel15.
57
58 * tst-cancel1.c: Add some comments.
59
60 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
61 timeout correctly.
62
7a8a8e21
UD
632003-06-06 Ulrich Drepper <drepper@redhat.com>
64
65 * Makefile (CFLAGS-pthread_cancel.c): Define.
66
4ad0bbf4
UD
672003-06-05 Ulrich Drepper <drepper@redhat.com>
68
69 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
70 Change type of __writer element to int.
71 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
72 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
73 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
74 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
75 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
76 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
77 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
78 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
79 Compare with TID to determine deadlocks.
80 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
81 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
82 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
83 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
84 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
85 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
86 Likewise.
87 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
88 Likewise.
89 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
90 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
91 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
92 Likewise.
93 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
94 Likewise.
95 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
96 * Makefile (tests): Add tst-rwlock12.
97 * tst-rwlock12.c: New file.
98
332faa96
JJ
992003-06-05 Jakub Jelinek <jakub@redhat.com>
100
101 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
102 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
103 Remove bogus hidden_proto.
104 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
105 Likewise.
106 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
107 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
108 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
109 ___lll_mutex_timedlock): Likewise.
110
29d9e2fd
UD
1112003-06-04 Ulrich Drepper <drepper@redhat.com>
112
113 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
114 (__pthread_cond_signal): Add some code to eventually handle
115 cond_lock!=0.
116
6f1acb30
UD
1172003-06-01 Ulrich Drepper <drepper@redhat.com>
118
119 * Makefile (tests): Add tst-exec4.
120 (tst-exec4-ARGS): Define.
121 * tst-exec4.c: New file.
122
49b65043
UD
1232003-05-31 Ulrich Drepper <drepper@redhat.com>
124
31195be2
UD
125 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
126 Also fail if tv_nsec < 0.
127 (__lll_timedwait_tid): Likewise.
128 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
129 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
130 Likewise.
131 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
132 Likewise.
133 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
134 Likewise.
135 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
136 Likewise.
80b54217
UD
137 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
138 Likewise.
139 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
140 Likewise.
31195be2 141
dcfc8224
UD
142 * Makefile (tests): Add tst-sem8 and tst-sem9.
143 * tst-sem8.c: New file.
144 * tst-sem9.c: New file.
145 * sem_open.c: Fix creation of in_use record if the file exists but
146 no internal record.
147
49b65043
UD
148 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
149 definitions.
150
151 * sysdeps/pthread/timer_create.c (timer_create): In case
152 evp==NULL, assign timer ID to sival_ptr.
153
154 * descr.h (struct pthread_unwind_buf): Change type of prev element to
155 struct pthread_unwind_buf *.
156 (struct pthread): Likewise for cleanup_jmp_buf element.
157
158 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
159 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
160 * unwind.c (__pthread_unwind_next): Likewise.
161
50794a45
UD
1622003-05-30 Ulrich Drepper <drepper@redhat.com>
163
5d4f57bd
UD
164 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
165 (lll_futex_timed_wait): Use int for futex value parameter.
166 (lll_futex_wake): Likewise.
167 (lll_futex_requeue): Likewise.
168
169 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
170 Replace one memory operation with one register operation.
171
172 * tst-join4.c (do_test): Fix error message.
173
7ab7ea33
UD
174 * tst-rwlock6.c (do_test): Use correct format specifier.
175
176 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
177 (__lll_mutex_lock_wait): Replace one memory operation with one
178 register operation.
179 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
180 (__lll_mutex_lock_wait): Likewise.
181
50794a45
UD
182 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
183 (__lll_mutex_cond_lock): Add one to value parameter of
184 __lll_lock_wait to reflect reality in the futex syscall.
185 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
186 (lll_mutex_cond_lock): Likewise.
187
5a70784e
JJ
1882003-05-30 Jakub Jelinek <jakub@redhat.com>
189
190 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
191 New function.
192 (lll_mutex_cond_lock): Define.
193
e7c5ac68
UD
1942003-05-29 Ulrich Drepper <drepper@redhat.com>
195
586d1748
UD
196 * Makefile (tests): Add tst-signal6.
197 * tst-signal6.c: New file.
198
b8ba4a27
UD
199 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
200 (__lll_mutex_unlock_force): New function
201 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
202
65d46efe
UD
203 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
204 (__lll_mutex_unlock_force): New function.
205 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
206
207 * tst-rwlock7.c (do_test): Use correct format specifier.
208
e7c5ac68
UD
209 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
210 Find break parameter in correct asm argument.
211
284bdc42
UD
2122003-05-27 Jakub Jelinek <jakub@redhat.com>
213
214 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
215 Remove out4.
216 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
217 error occured.
218 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
219 Add __mutex.
220 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
221 lll_futex_requeue, lll_mutex_unlock_force): Define.
222
e7c5ac68
UD
2232003-05-30 Jakub Jelinek <jakub@redhat.com>
224
225 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
226 (pthread_cond_t): Add __mutex.
227 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
228 lll_futex_requeue, lll_mutex_unlock_force): Define.
229
ea2630c6
UD
2302003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
231
232 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
233 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
234 Add __mutex field.
235 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
236 Define.
237 (lll_futex_wait, lll_futex_wake): Define.
238 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
239 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
240 FUTEX_REQUEUE instead of FUTEX_WAIT.
241 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
242 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
243 mutex which was used in condvar structure. Call
244 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
245 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
246
247 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
248 include tcb-offsets.h. Read wakeup value in locked region.
249 Use the value of gbr register as THREAD_ID.
250 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
251 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
252 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
253
254 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
255 macros.
256
5a77f150
UD
2572003-05-28 Ulrich Drepper <drepper@redhat.com>
258
259 * sysdeps/pthread/pthread_cond_broadcast.c
260 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
261
7661d9f7
UD
2622003-05-26 Ulrich Drepper <drepper@redhat.com>
263
264 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
265 typo in register name.
266 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
267 correctly. Actually use requeue. Little optimization.
268 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
269 mutex address early. Handle cancellation state as 32-bit value.
270 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
271 Remove unnecessary label.
272
69431c9a
UD
2732003-05-25 Ulrich Drepper <drepper@redhat.com>
274
275 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
276 instead of FUTEX_WAIT.
277 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
278 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
279 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
280 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
281 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
282 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
283 used in condvar structure. Call __pthread_mutex_cond_lock instead
284 of __pthread_mutex_lock_internal.
285 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
286 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
287 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
288 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
289 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
290 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
291 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
292 Add pthread_mutex_cond_lock.
293 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
294 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
295 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
296 lll_mutex_cond_lock.
297 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
298 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
248a3490 299 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
69431c9a 300 Add __mutex field.
248a3490 301 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
69431c9a
UD
302 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
303
304 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
305 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
306
307 * pthreadP.h: Declare __pthread_mutex_cond_lock.
308 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
309 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
310 macro don't define aliases.
311
312 * cancellation.c: Remove __pthread_enable_asynccancel_2.
313 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
314 * sysdeps/pthread/pthread_cond_timedwait.c: Use
315 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
316 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
317 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
318 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
319 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
320 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
321
fddfebbd
UD
3222003-05-17 Ulrich Drepper <drepper@redhat.com>
323
324 * sem_open.c: Fix one endless loop. Implement correct semantics
325 wrt opening the same semaphore more then once.
326 * sem_close.c: Adjust for sem_open change.
327 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
328 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
329 * Makefile (tests): Add tst-sem7.
330 * tst-sem7.c: New file.
331
1eefffb0
RM
3322003-05-16 Roland McGrath <roland@redhat.com>
333
334 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
335 uninitialized variable braino.
336
6e66dc78
UD
3372003-05-16 Ulrich Drepper <drepper@redhat.com>
338
23ae6451
UD
339 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
340 test for syscall availability.
341
342 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
343 __no_posix_timers to -1 if the syscalls don't exist.
344
7ac5b8e2
UD
345 * pthread_join.c (pthread_join): Set tid field of the joined
346 thread to -1. This isn't necessary but helps to recognize some
347 error conditions with almost no cost.
348
349 * allocatestack.c (FREE_P): Also negative values indicate an
350 unused stack.
351
6e66dc78
UD
352 * unwind.c: Include <unistd.h>.
353
855dba3c
UD
3542003-05-14 Ulrich Drepper <drepper@redhat.com>
355
356 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
357
81f3ac4c
UD
3582003-05-14 Jakub Jelinek <jakub@redhat.com>
359
360 * Makefile (crti-objs, crtn-objs): New variables.
361 (omit-deps, extra-objs): Add crtn.
362 ($(objpfx)libpthread.so): Depend on both crti and crtn
363 and links to them in multidir.
364 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
365
7158eae4
UD
3662003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
367
368 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
369 (lll_mutex_unlock): Use atomic_exchange_rel.
370
edf205d5
UD
3712003-05-11 Ulrich Drepper <drepper@redhat.com>
372
373 * cond-perf.c (cons): Add missing locking around setting of alldone.
374
a3f979a7
UD
3752003-05-10 Ulrich Drepper <drepper@redhat.com>
376
377 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
378 related macros.
379 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
380
880867a4
UD
3812003-05-09 Ulrich Drepper <drepper@redhat.com>
382
949ec764
UD
383 * tst-sem6.c: New file.
384 * Makefile (tests): Add tst-sem6.
385
386 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
387 Use atomic_exchange_rel instead of atomic_exchange.
388 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
389 Likewise.
390
391 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
392 code for lll_futex_wait and lll_futex_wake in static apps. Use
393 vsyscall is possible.
394
395 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
396 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
397 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
398 pthread_setaffinity_np.
399 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
400 and pthread_setaffinity_np.
401 * Makefile (libpthread-routines): Add pthread_getaffinity and
402 pthread_setaffinity.
403
880867a4
UD
404 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
405 use it in case mmap to allocate the stack fails.
406 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
407 ARCH_MAP_FLAGS here.
408 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
409 ARCH_RETRY_MMAP.
410
92d83c72
UD
4112003-05-08 Ulrich Drepper <drepper@redhat.com>
412
413 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
414 handler implementation. It is now lockless in fork().
415 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
416 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
417 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
418 declare the __fork_*_lists.
419 (struct fork_handler): Include pointers to all three functions.
420 Add next, refcntr and need_signal elements.
421 (__fork_handlers): New declaration.
422 (__register_atfork_malloc): Remove declaration.
423 (HAVE_register_atfork_malloc): Remove definition.
424 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
425 __pthread_child_handler variable.
426 (__libc_pthread_init): Use __register_atfork instead of explicitly
427 adding to the list.
428 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
429 and lll_futex_wake.
430 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
431
432 * unwind.c (unwind_cleanup): Print error message and then abort. This
433 function must never be reached.
434
435 * cond-perf.c: New file.
436
be4d8038
UD
4372003-05-05 Ulrich Drepper <drepper@redhat.com>
438
439 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
440
c6696b79
RM
4412003-05-04 Roland McGrath <roland@redhat.com>
442
443 * Makefile ($(objpfx)../libc.so): New target.
444
7da168bf
UD
4452003-05-02 Ulrich Drepper <drepper@redhat.com>
446
447 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
448 (pthread_condattr_t): Size is only an int, don't use long for
449 alignment.
450 (pthread_mutexattr_t): Likewise.
7da168bf
UD
451 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
452 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
453 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
454
9a7178d6
UD
4552003-05-01 Ulrich Drepper <drepper@redhat.com>
456
457 * sysdeps/i386/tls.h: Define THREAD_ID.
458 * sysdeps/ia64/tls.h: Likewise.
459 * sysdeps/powerpc/tls.h: Likewise.
460 * sysdeps/s390/tls.h: Likewise.
461 * sysdeps/sh/tls.h: Likewise.
462 * sysdeps/x86_64/tls.h: Likewise.
463 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
464 record ownership.
465 * pthread_mutex_timedlock.c: Likewise.
466 * pthread_mutex_trylock.c: Likewise.
467 * pthread_mutex_unlock.c: Likewise.
468 * pthread_rwlock_trywrlock.c: Likewise.
469 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
470 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
471 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
472 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
473
474 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
475 flag.
476
a234e27d
UD
4772003-04-29 Jakub Jelinek <jakub@redhat.com>
478
479 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
480 (__SIZEOF_PTHREAD_COND_T): Define to 48.
481 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
482 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
483 Make __align long long instead of long.
484 (pthread_rwlock_t): Formatting.
485 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
486 (pthread_rwlock_t): Formatting.
487 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
488 (pthread_cond_t): Make __align long long instead of long.
489 (pthread_rwlock_t): Move __flags field to the same position as in
490 linuxthreads.
491
f025c136
UD
4922003-04-30 Ulrich Drepper <drepper@redhat.com>
493
494 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
495 * tst-rwlock7.c (do_test): Likewise.
496
7531ab9e
RM
4972003-04-26 Roland McGrath <roland@redhat.com>
498
499 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
500
299601a1
UD
5012003-04-22 Jakub Jelinek <jakub@redhat.com>
502
299601a1
UD
503 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
504 sizeof (struct pthread).
505 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
468777e1 506 1 struct pthread.
299601a1
UD
507 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
508 to 0.
509 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
510 struct pthread.
511 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
512 to 32-bit bytes.
513 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
514 tcbp.
515 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
516 unneccessarily.
517 (NO_TLS_OFFSET): Define.
299601a1
UD
518 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
519 add TLS_TCB_SIZE unnecessarily.
299601a1 520
950094f8
RM
5212003-04-22 Roland McGrath <roland@redhat.com>
522
523 * Makeconfig (shared-thread-library): Reverse link order to work
524 around linker bug.
525
dc2f6455
UD
5262003-04-22 Ulrich Drepper <drepper@redhat.com>
527
528 * semaphore.h: Fix typo in comment.
529
e7608d77
UD
5302003-04-21 Ulrich Drepper <drepper@redhat.com>
531
6a87ee19
UD
532 * sysdeps/pthread/sigfillset.c: New file.
533
e7608d77
UD
534 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
535 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
536 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
537 * sysdeps/pthread/sigaction.c: Likewise.
538 * sysdeps/pthread/sigprocmask.c: New file.
539 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
540 __SIGRTMIN+1.
541 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
542 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
543 in this case.
544
0b3df49e
UD
5452003-04-19 Ulrich Drepper <drepper@redhat.com>
546
58a7a325
UD
547 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
548 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
549
0b3df49e
UD
550 * sysdeps/unix/sysv/linux/unregister-atfork.c
551 (__unregister_atfork): Don't free memory not allocated dynamically.
552
553 * semaphore.h: Remove __THROW marker from cancellation points.
554 * nptl/sysdeps/pthread/pthread.h: Likewise.
555
7d74651e
UD
5562003-04-18 Ulrich Drepper <drepper@redhat.com>
557
76a67697
UD
558 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
559 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7d74651e
UD
560 __THROW.
561
dd9d6538
JJ
5622003-04-16 Jakub Jelinek <jakub@redhat.com>
563
564 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
565
4ab6f47c
RM
5662003-04-15 Roland McGrath <roland@redhat.com>
567
568 * forward.c (__pthread_unwind): Tweak to avoid warning.
569
162434a6
UD
5702003-04-15 Ulrich Drepper <drepper@redhat.com>
571
572 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
573
35909161
UD
5742003-04-14 Ulrich Drepper <drepper@redhat.com>
575
18ddd3aa 576 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
35909161
UD
577 overflow CFA advance instructions.
578 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
579
18a8e730
UD
5802003-04-14 Jakub Jelinek <jakub@redhat.com>
581
bd4f43b4
UD
582 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
583 * sysdeps/i386/pthread_spin_lock.c: Likewise.
584 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
585 defined.
586
18a8e730
UD
587 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
588 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
589 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
590 DW_CFA_advance_loc for .Laddl-.Lsubl.
591
08c765fa
UD
5922003-04-13 Ulrich Drepper <drepper@redhat.com>
593
18a8e730
UD
594 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
595 position-independent unwind data for static libraries.
596 Add missing unwind info. Add comments.
597
ad2be852
UD
598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
599 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
600 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
08c765fa
UD
601 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
602
177d1ad3
UD
6032003-04-12 Ulrich Drepper <drepper@redhat.com>
604
08c765fa
UD
605 * Makefile: Make sure all cancellation points are compiled with
606 exception and asynchronous unwind tables.
607
177d1ad3
UD
608 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
609 which mishandles loading of global object addresses in PIC.
610 (THREAD_SETMEM_NC): Likewise.
611
09d65ff3
UD
6122003-04-11 Ulrich Drepper <drepper@redhat.com>
613
614 * pthread.h: Define new data structure for cleanup buffer. Declare
615 new cleanup handler interfaces.
616 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
617 (struct pthread): Add cleanup_jmp_buf pointer. Define
618 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
619 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
620 it. Declare old cleanup handler installation functions.
621 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
622 handling.
623 * cleanup_defer.c: Likewise.
624 * cleanup_compat.c: New file. Old cleanup code.
625 * cleanup_def_compat.c: New file. Old cleanup code.
626 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
627 if own thread descriptor.
628 * unwind.c: New file.
629 * forward.c: Add __pthread_unwind.
630 * init.c (pthread_functions): Add __pthread_unwind.
631 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
632 Add ptr___pthread_unwind.
633 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
634 and unwind function.
635 * Makefile (libpthread-routines): Add cleanup_compat,
636 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
637 table generation if necessary.
638 * version.c: Record whether unwind support is compiled in.
639 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
640 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
641 handler interfaces.
642 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
643 complication to generate unwind information for syscall wrappers.
68107ec0 644 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
09d65ff3
UD
645 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
646 __cleanup_fct_attribute.
647
648 * Makefile: Add rules to build and run tst-cleanup0.
649 * tst-cleanup0.c: New file.
650 * tst-cleanup0.expect: New file.
651
652 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
653 caller. Optimize to avoid often unecessary local variable.
654
0dc44b51
RM
6552003-04-11 Roland McGrath <roland@redhat.com>
656
657 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
658 sets variable `multidir'; include that.
659 (generated): Add it.
660 ($(objpfx)$(multidir)/crti.o): New target.
661 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
662
84a80719
UD
6632003-04-11 Ulrich Drepper <drepper@redhat.com>
664
665 * tst-attr2.c (do_test): Add cast to avoid warning.
666 * tst-mutex4.c (do_test): Likewise.
667
88ff4759
UD
6682003-04-10 Ulrich Drepper <drepper@redhat.com>
669
670 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
671 in child.
672
b2041097
UD
6732003-04-09 Ulrich Drepper <drepper@redhat.com>
674
675 * Makefile (tests): Add tst-detach1.
676 * tst-detach1.c: New file.
677
f9657e88
UD
6782003-04-08 Ulrich Drepper <drepper@redhat.com>
679
9afe4964
UD
680 * sysdeps/pthread/pthread.h: Remove duplicate
681 pthread_cleanup_{push,pop} definitions.
682
f9657e88
UD
683 * tst-barrier2.c: Eliminate warnings.
684 * tst-cancel4.c: Likewise.
685 * tst-cond4.c: Likewise.
686 * tst-cond6.c: Likewise.
687 * tst-detach1.c: Likewise.
688 * tst-rwlock4.c: Likewise.
689 * tst-rwlock6.c: Likewise.
690 * tst-rwlock7.c: Likewise.
691 * tst-sem3.c: Likewise.
692 * tst-spin2.c: Likewise.
693 * tst-umask1.c: Likewise.
694
69b35e86
UD
6952003-04-07 Ulrich Drepper <drepper@redhat.com>
696
697 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
698
c70ad7d7
UD
6992003-04-06 Ulrich Drepper <drepper@redhat.com>
700
701 * descr.h (struct pthread): Move cancelhandling member to the front.
702
54e0138f
UD
7032003-04-05 Ulrich Drepper <drepper@redhat.com>
704
705 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
706 malloc_parent, and malloc_child statically.
707 (__register_atfork_malloc): New function.
708 (free_mem): Don't free any of the malloc_* variables on the list.
709 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
710 Define HAVE_register_atfork_malloc.
711
b22d701b
UD
7122003-04-04 Ulrich Drepper <drepper@redhat.com>
713
714 * sysdeps/pthread/createthread.c (create_thread): Add some more
715 comments explaining when to set multiple_threads and when not.
716
717 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
718 THREAD_ATOMIC_BIT_SET if not already defined.
719 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
720 THREAD_ATOMIC_BIT_SET:
721 * sysdeps/x86_64/tls.h: Likewise.
722 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
723 THREAD_ATOMIC_CMPXCHG_VAL.
724 (_pthread_cleanup_pop_restore): Likewise.
725 * cancellation.c (__pthread_enable_asynccancel): Likewise.
726 (__pthread_enable_asynccancel_2): Likewise.
727 (__pthread_disable_asynccancel): Likewise.
728 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
729 (__libc_disable_asynccancel): Likewise.
730 * init.c (sigcancel_handler): Likewise.
731 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
732 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
733
86246935
UD
7342003-04-03 Ulrich Drepper <drepper@redhat.com>
735
736 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
737 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
738 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
739 * Makefile (tests): Add tst-cancel11.
740 * tst-cancel11.c: New file.
741
6b4686a5
UD
7422003-04-01 Ulrich Drepper <drepper@redhat.com>
743
744 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
745 round, not the first. Use specific_used flag instead of local
746 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
747 (__free_tcb): Don't call deallocate_tsd here.
748 (start_thread): Call deallocate_tsd here.
749 * pthread_setspecific.c: Set specific_used flag really only when
750 needed.
0d73a73b 751 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
6b4686a5 752 * tst-tsd3.c: New file.
0d73a73b 753 * tst-tsd4.c: New file.
6b4686a5 754
42b2395d
UD
7552003-03-31 Ulrich Drepper <drepper@redhat.com>
756
211d90c5
UD
757 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
758 Use atomic_exchange_and_add instead of __lll_add.
759 (__lll_mutex_timedlock): Likewise.
760 Patch by Ian Wienand.
761
7622003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
763
764 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
765 (SINGLE_THREAD_P): Fix typo.
766 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
767
7682003-03-31 Ulrich Drepper <drepper@redhat.com>
769
770 * Makefile (tests): Add tst-align.
771 * tst-align.c: New file.
772 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
211d90c5 773
42b2395d
UD
774 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
775 function correctly.
776
211d90c5
UD
777 * tst-tsd2.c: Add casts to avoid warnings.
778
163b180f
UD
7792003-03-30 Ulrich Drepper <drepper@redhat.com>
780
781 * descr.h (struct pthread): Move most often used elements to the front.
782
ea473bad
UD
7832003-03-29 Ulrich Drepper <drepper@redhat.com>
784
785 * Makefile (libpthread-routines): Add pthread_atfork.
786 (libpthread-static-only-routines): Add pthread_atfork.
787
dd731d53
UD
7882003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
789
790 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
791 of TLS_DTV_AT_TP.
792 (INSTALL_DTV): Add parens.
793 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
794 Use passed descr instead of THREAD_SELF.
795 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
796 (__lll_mutex_timedlock_wait): Correct expected value after
797 spurious wakeup.
798 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
799 Release lock before waking up the waiters.
800 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
801 criteria. Reorderstruct passed to cleanup handler. Fix
802 handling of cancellation and failung pthread_mutex_unlock call.
803 Use __pthread_enable_asynccancel_2 instead of
804 __pthread_enable_asynccancel.
805 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
806 Return result of lock re-get if it fails.
807 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
808 for __pthread_cleanup_push.
809 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
810 completely broken rwlock implementation.
811 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
812 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
813 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
814 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
815 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
816 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
817 versioned_symbol macro.
818 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
819 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
820
c75d02f0
UD
8212003-03-27 Ulrich Drepper <drepper@redhat.com>
822
5f5004df
UD
823 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
824 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
825 and __helper_tid.
826 (struct timer): Remove th and bar field.
827 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
828 debugging code. Create only one helper thread.
829 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
830 helper thread.
831 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
832 Renamed. Define statically. Use thread info from siginfo.
833 (__helper_once): New variable.
834 (__helper_tid): New variable.
835 (__reset_helper_control): New function.
836 (__start_helper_thread): New function.
837
18d009ca
UD
838 * pthread_create.c (start_thread): Don't use setjmp inside
839 __builtin_expect to work around gcc bug.
840
c75d02f0
UD
841 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
842 timer_delete syscall fails, but not with ENOSYS, set
843 __no_posix_timers.
844
845 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
846 (timer_settime): Fix typo.
28cf3058
UD
847 * sysdeps/unix/sysv/linux/timer_getoverr.c
848 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
c75d02f0 849
049ac259
JJ
8502003-03-27 Jakub Jelinek <jakub@redhat.com>
851
852 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
853 offset of cleanupbuf.__prev.
854
f93d39dd
JJ
8552003-03-26 Jakub Jelinek <jakub@redhat.com>
856
857 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
858 of included file.
859
f064e4c5
UD
8602003-03-26 Ulrich Drepper <drepper@redhat.com>
861
862 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
863 NULL provide default definition to syscall.
864
83e886a3
RM
8652003-03-25 Roland McGrath <roland@redhat.com>
866
867 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
868 (timer_id2ptr): Fix typo.
869
09402f5b
UD
8702003-03-25 Ulrich Drepper <drepper@redhat.com>
871
872 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
873 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
874 * sysdeps/ia64/pthreaddef.h: Likewise.
875 * sysdeps/powerpc/pthreaddef.h: Likewise.
876 * sysdeps/s390/pthreaddef.h: Likewise.
877 * sysdeps/sh/pthreaddef.h: Likewise.
878 * sysdeps/x86_64/pthreaddef.h: Likewise.
879 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
880 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
881 being changed.
882 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
883 SIGTIMER is not unblocked.
884 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
885 RT signal taken.
886 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
887 be send.
888 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
889 pass pointer through as ID.
890 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
891 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
892 * sysdeps/unix/sysv/linux/timer_create.c: New file.
893 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
894 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
895 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
896 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
897 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
898 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
899 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
900 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
901 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
902 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
903 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
904 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
905 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
906 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
907 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
908 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
909 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
910 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
911 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
912 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
913 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
914 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
915 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
916 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
917 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
918 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
919 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
920 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
921 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
922 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
923
924 * pthreadP.h: Remove FRAME_LEFT definition.
925 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
926 already left frame. Programs which have this problem are not POSIX
927 compliant.
928 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
929
5e826ab5
UD
9302003-03-24 Ulrich Drepper <drepper@redhat.com>
931
932 * sysdeps/pthread/tst-timer.c: Check return values of the
933 functions we test.
934
b910f788
RM
9352003-03-23 Roland McGrath <roland@redhat.com>
936
3045a1fe
RM
937 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
938 * tst-tls3mod.c: Likewise.
939 * tst-tls1.c: Likewise.
940 * tst-tls2.c: Likewise.
941
85047fe3
RM
942 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
943 undefined behavior.
944
b910f788
RM
945 * tst-join5.c (tf1, tf2): Add a cast.
946
947 * Makeconfig (includes): Append -I$(..)nptl to this variable.
948
949 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
950 Don't test anything.
951 * tst-cond4.c: Likewise.
952 * tst-cond6.c: Likewise.
953 * tst-flock2.c: Likewise.
954 * tst-mutex4.c: Likewise.
955 * tst-rwlock4.c: Likewise.
956 * tst-signal1.c: Likewise.
957 * tst-spin2.c: Likewise.
958 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
959
960 * tst-mutex4.c: Use test-skeleton.c.
961 * tst-spin2.c: Likewise.
962 * tst-sysconf.c: Likewise.
963 * tst-barrier2.c: Likewise.
964 * tst-cond4.c: Likewise.
965 * tst-cond6.c: Likewise.
966 * tst-rwlock4.c: Likewise.
967 * tst-unload.c: Likewise.
968 * tst-flock2.c (do_test): Use return instead of exit.
969
4baa087a
RM
9702003-03-22 Jakub Jelinek <jakub@redhat.com>
971
972 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
973
5a3ab2fc
UD
9742003-03-21 Ulrich Drepper <drepper@redhat.com>
975
9f07eae2
UD
976 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
977 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
978 instead of __lll_compare_and_swap.
979 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
980 Likewise.
981 Removed definition if __lll_compare_and_swap.
982
5a3ab2fc
UD
983 * cancellation.c: Adjust for new form of compare&exchange macros.
984 * cleanup_defer.c: Likewise.
985 * init.c: Likewise.
986 * libc-cancellation.c: Likewise.
987 * old_pthread_cond_broadcast.c: Likewise.
988 * old_pthread_cond_signal.c: Likewise.
989 * old_pthread_cond_timedwait.c: Likewise.
990 * old_pthread_cond_wait.c: Likewise.
991 * pthread_cancel.c: Likewise.
992 * pthread_create.c: Likewise.
993 * pthread_detach.c: Likewise.
994 * pthread_join.c: Likewise.
995 * pthread_key_delete.c: Likewise.
996 * pthread_setcancelstate.c: Likewise.
997 * pthread_setcanceltype.c: Likewise.
998 * pthread_timedjoin.c: Likewise.
999 * pthread_tryjoin.c: Likewise.
1000 * sysdeps/pthread/createthread.c: Likewise.
1001
b1aea098
UD
10022003-03-20 Ulrich Drepper <drepper@redhat.com>
1003
1004 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 1005 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
1006 definitions. Replace uses with calls to atomic_* functions.
1007 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1008 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
1009 __lll_test_and_set calls with atomic_exchange_and_add and
1010 atomic_exchange calls respectively.
1011 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1012 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1013 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
1014 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1015 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
1016 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
1017 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1018
1019 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
1020 returns the old value.
1021
100a7100
RM
10222003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
1023
1024 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
1025 int for variable OLDVAL and correct inline assembler contraint.
1026 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
1027 type int for variable OLD.
1028
1029 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
1030 only for s390-32.
1031 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1032 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
1033 instead of multiple_threads field in the TCB.
1034
95767b36
UD
10352003-03-19 Ulrich Drepper <drepper@redhat.com>
1036
4009bf40
UD
1037 * sysdeps/i386/i686/bits/atomic.h: Removed.
1038 * sysdeps/i386/i586/bits/atomic.h: Removed.
1039 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
1040 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
1041 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
1042 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
1043 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
1044 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
1045 * atomic.h: Removed. Moved to glibc.
1046
560a784f
UD
1047 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
1048 support for clock selection.
1049
95767b36
UD
1050 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
1051 signalling waiters.
1052
043ad426
RM
10532003-03-18 Roland McGrath <roland@redhat.com>
1054
94659495
RM
1055 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
1056 Add __lll_rel_instr first. Add memory clobber.
1057 (lll_mutex_unlock): Use __lll_test_and_set.
1058 From Paul Mackerras <paulus@samba.org>.
1059
1060 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
1061 unconditionally.
1062 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1063 (SINGLE_THREAD_P): Add `header.' prefix.
1064 From Paul Mackerras <paulus@samba.org>.
1065
043ad426
RM
1066 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
1067 pthread_timedjoin_np to ...
1068 (libpthread: GLIBC_2.3.3): ... here.
1069 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
1070
1071 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1072 Avoid shadowing VAL variable.
1073
1074 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
1075 New macro.
1076
86a9ee5e
UD
10772003-03-18 Ulrich Drepper <drepper@redhat.com>
1078
ac9e0aa1
UD
1079 * Makefile (tests): Add tst-cond11.
1080 * tst-cond11.c: New file.
1081
a14b373c
UD
1082 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
1083 struct passed to cleanup handler to eliminate one more
1084 instruction.
1085 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1086
24a49f38
UD
1087 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1088 (pthrad_cond_t): Replace __unused field with __clock.
1089
1090 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
1091 waken all waiters in cleanup handler.
1092 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1093 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1094
86a9ee5e
UD
1095 * pthread_condattr_getclock.c: New file.
1096 * pthread_condattr_setclock.c: New file.
1097 * sysdeps/pthread/pthread.h: Declare these new functions.
1098 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
1099 * Makefile (libpthread-routines): Add the new functions.
1100 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
1101 Renamed field to value. Document use of the bits.
1102 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
1103 change.
1104 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 1105 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
1106 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
1107 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1108 Add __clock field.
1109 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1110 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1111 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1112 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1113 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1114 Implement clock selection.
1115 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1116 * pthread-errnos.sym: Add ENOSYS.
1117 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1118 _POSIX_CLOCK_SELECTION.
1119 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1120
1121 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
1122 invalid .size directive.
1123
98054a05
RM
11242003-03-17 Roland McGrath <roland@redhat.com>
1125
1126 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
1127 Formatting tweaks.
1128
001bea71
UD
11292003-03-17 Ulrich Drepper <drepper@redhat.com>
1130
4773086e
UD
1131 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
1132 Use __lll_add instead of spelling it out. Use protected symbol names.
1133 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
1134 Use __lll_add.
1135 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
1136 Renamed from lll_compare_and_swap. Use new name where necessary.
1137 (__lll_add): Defined.
1138 (__lll_dec_if_positive): Defined.
1139 (__lll_test_and_set): Defined.
1140 * sysdeps/ia64/pthread_spin_init.c: Removed.
1141 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
1142 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
1143 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
1144 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
1145 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
1146 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
1147 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
1148 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
1149 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1150 __sync_lock_release_si.
1151 Patch by Jakub Jelinek.
1152
1153 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1154 Fix timeout handling.
1155 (__lll_timedwait_tid): Likewise.
1156 (lll_unlock_wake_cb): Wake up other waiters if necessary.
1157 Patch by Jakub Jelinek.
1158
1159 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
1160
de4471dd
RM
11612003-03-17 Roland McGrath <roland@redhat.com>
1162
1163 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
1164 * sysdeps/pthread/pthread_spin_init.c: New file.
1165 * sysdeps/pthread/pthread_spin_unlock.c: New file.
1166 * sysdeps/powerpc/Makefile: New file.
1167 * sysdeps/powerpc/pthread_spin_lock.c: New file.
1168 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
1169 * sysdeps/powerpc/pthreaddef.h: New file.
1170 * sysdeps/powerpc/tcb-offsets.sym: New file.
1171 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
1172 * sysdeps/powerpc/tls.h: New file.
1173 * sysdeps/powerpc/bits/atomic.h: New file.
1174 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
1175 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
1176 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 1177
de4471dd
RM
1178 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
1179 * sysdeps/unix/sysv/linux/sem_post.c: New file.
1180 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
1181 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
1182 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
1183 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
1184 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
1185 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
1186 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
1187 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
1188 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
1189 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
1190 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
1191 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1192 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
1193
1194 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
1195 not gettimeofday.
1196 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
1197 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
1198 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
1199 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
1200 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
1201
5778033f
UD
12022003-03-17 Ulrich Drepper <drepper@redhat.com>
1203
1204 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
1205 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
1206 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1207 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1208 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
1209
796038f8
RM
12102003-03-16 Roland McGrath <roland@redhat.com>
1211
1212 * tst-fork4.c: Include <string.h>.
1213 * tst-signal2.c: Likewise.
1214 * tst-mutex5.c (do_test): exit -> return.
1215 * tst-mutex2.c: Include <stdlib.h>.
1216
51d0678c
UD
12172003-03-16 Ulrich Drepper <drepper@redhat.com>
1218
5778033f
UD
1219 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1220 (__lll_mutex_timedlock_wait): Correct expected value after
1221 spurious wakeup. Otherwise we would never wait again.
1222
b6e2f87a
UD
1223 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
1224 zone versus inline asm stupidity. Use correct instructions.
1225
51d0678c
UD
1226 * tst-rwlock6.c: Add some more status output.
1227
8112cc70
RM
12282003-03-15 Roland McGrath <roland@redhat.com>
1229
1230 * sysdeps/pthread/configure.in: New file.
1231 * sysdeps/pthread/configure: New file (generated).
1232
49773c19
UD
12332003-03-15 Ulrich Drepper <drepper@redhat.com>
1234
1235 * allocatestack.c (allocate_stack): Store the exact stack size of
1236 user allocated stacks.
1237
eec0ca9f
JJ
12382003-03-15 Jakub Jelinek <jakub@redhat.com>
1239
1240 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1241 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
1242 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
1243 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1244 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1245 Use `header.' prefix.
1246 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
1247
a87731e2
UD
12482003-03-15 Ulrich Drepper <drepper@redhat.com>
1249
1250 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
1251 __builtin_frame_address, use stack pointer.
1252
1253 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
1254 instead of __builtin_frame_pointer.
1255
e22a221d
UD
12562003-03-14 Ulrich Drepper <drepper@redhat.com>
1257
92ed3daf
UD
1258 * tst-basic1.c (do_test): Add cast to avoid warning.
1259 * tst-basic2.c (do_test): Likewise.
1260
9b89567d
UD
1261 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
1262 amount of stack correction.
1263
e22a221d
UD
1264 * tst-fork4.c: Use test-skeleton.c.
1265
2e49caba
RM
12662003-03-14 Roland McGrath <roland@redhat.com>
1267
1268 * init.c: Fix typo "#eli" for "#else".
1269
415ef7d8
RM
12702003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
1271
1272 * allocatestack.c (__stack_user): Use hidden_data_def.
1273 * pthread_create.c (__pthread_keys): Likewise.
1274
1275 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
1276
52287505
RM
12772003-03-14 Roland McGrath <roland@redhat.com>
1278
415ef7d8
RM
1279 * tst-fork4.c: New file.
1280 * Makefile (tests): Add it.
1281
52287505
RM
1282 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
1283 we always define the padding space.
1284 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
1285 stopped supporting its own extensions fully.
1286 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
1287 struct also called `header', so `header.multiple_threads' is the field
1288 name to use on all machines.
1289 * allocatestack.c (allocate_stack): Use `header.' prefix.
1290 * sysdeps/pthread/createthread.c (create_thread): Likewise.
1291 * pthread_create.c (__pthread_create_2_1): Likewise.
1292 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
1293 (THREAD_SELF): Likewise.
1294 * sysdeps/x86_64/tls.h: Likewise.
1295 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1296 (SINGLE_THREAD_P): Likewise.
1297 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1298 (SINGLE_THREAD_P): Likewise.
1299 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1300 (SINGLE_THREAD_P): Likewise.
1301
1302 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
1303 value directly.
1304
c44bf9aa
UD
13052003-03-14 Ulrich Drepper <drepper@redhat.com>
1306
e22a221d
UD
1307 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
1308 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
1309
0eb18281
UD
1310 * pthread_create.c (start_thread): setjmp is expected to return 0.
1311
c44bf9aa
UD
1312 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
1313 (THREAD_GETMEM_NC): Likewise.
1314
564cd8b6
UD
13152003-03-13 Ulrich Drepper <drepper@redhat.com>
1316
1317 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
1318 and the size of the stack which must be allocated is a multiple,
1319 allocate one more page.
1320 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
1321 MULTI_PAGE_ALIASING.
1322
6461e577
RM
13232003-03-13 Roland McGrath <roland@redhat.com>
1324
1325 * pthread_create.c (start_thread): Set EXITING_BIT after the
1326 event-reporting (and destructors), not before.
1327
b5ec5617
UD
13282003-03-13 Jakub Jelinek <jakub@redhat.com>
1329
6461e577
RM
1330 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
1331 lll_futex_wake): Declare register variables as long int instead of
1332 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
1333 Make syscall arguments clobbered by the syscall.
1334 (lll_futex_wait): Define using lll_futex_timed_wait.
1335
1336 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
1337 to void *.
1338
1339 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
1340 PPID if [! NDEBUG].
1341
1342 * allocatestack.c (nptl_ncreated): Only declare if
1343 COLORING_INCREMENT != 0.
1344
1345 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
1346 (__libc_enable_asynccancel_2): Remove prototype.
1347
b5ec5617
UD
1348 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
1349 ctid to match kernel.
1350
d0369fb8
UD
13512003-03-12 Ulrich Drepper <drepper@redhat.com>
1352
7588880f
UD
1353 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
1354 libc_multiple_threads.
1355 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
1356 __libc_multiple_threads to...
1357 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
1358
1359 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
1360 versioning.
1361 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1362 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1363
1364 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1365 (__pthread_once_internal): Define.
1366
1367 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
1368 macros instead of .symver directly.
1369 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1370 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1371
d0369fb8
UD
1372 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
1373 * sysdeps/x86_64/tcb-offsets.sym: New file.
1374 * sysdeps/x86_64/Makefile: New file.
1375
1376 * sysdeps/i386/tcb-offsets.sym: Add SELF.
1377 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
1378 to access own pthread_t in TCB.
1379 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1380 Likewise.
1381 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1382 Likewise.
1383 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1384
0bb2ac85
RM
13852003-03-12 Roland McGrath <roland@redhat.com>
1386
1387 * pthread-errnos.sym: New file.
1388 * Makefile (gen-as-const-headers): New variable, list that file.
1389 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
1390 header <pthread-errnos.h> instead of defining errno values here.
1391 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1392 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1393 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1394 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1395 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1396 Likewise.
1397 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1398 Likewise.
1399 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1400 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1401 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
1402 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1403 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1404 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1405 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1406 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1407 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1408 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
1409 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1410 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1411 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1412 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1413 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1414 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1415 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1416 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1417 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1418 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1419 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1420 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
1421 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
1422 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
1423 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
1424 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1425 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1426
1427 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
1428 CLONE_CHILD_SETTID worked.
1429
35e148cb
UD
14302003-03-12 Ulrich Drepper <drepper@redhat.com>
1431
d0369fb8
UD
1432 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
1433 file.
1434 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
1435 file.
1436
1437 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1438 (pthread_cond_t): Add padding.
1439
da49194d
UD
1440 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
1441 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
1442 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
1443
35e148cb
UD
1444 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1445 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
1446 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1447 (__pthread_rwlock_timedrdlock): Likewise.
1448 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
1449 (__pthread_rwlock_wrlock): Likewise.
1450 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
1451 (__pthread_rwlock_rdlock): Likewise.
1452
1453 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
1454
1455 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
1456 result of lock re-get if it fails.
1457
3e976b96
UD
14582003-03-11 Ulrich Drepper <drepper@redhat.com>
1459
5a03acfe
UD
1460 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
1461 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1462 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
1463 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1464 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1465 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1466 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1467 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1468 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1469 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1470
1471 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
1472 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
1473
1474 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
1475 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
1476 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
1477 (create_thread): Likewise.
1478 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
1479 * init.c (__pthread_initialize_minimal_internal): Initialize
1480 __libc_multiple_threads_ptr if necessary.
1481 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
1482 __pthread_multiple_threads and __libc_multiple_threads_ptr.
1483 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
1484 __libc_multiple_threads.
1485 (__libc_pthread_init): Return pointer to __libc_pthread_init if
1486 necessary.
1487
1488 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
1489 (THREAD_SETMEM_NC): Likewise.
1490
1491 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
1492 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
1493 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
1494 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
1495
1496 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
1497 Eliminate one entire instruction.
1498
32a589b1
UD
1499 * cancellation.c (__pthread_enable_asynccancel_2): New function.
1500 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
1501 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1502 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
1503 instead of __pthread_enable_asynccancel.
1504 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1505 (__pthread_cond_wait): Likewise.
1506 * sysdeps/pthread/pthread_cond_timedwait.c
1507 (__pthread_cond_timedwait): Likewise.
1508 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1509
3e976b96
UD
1510 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1511 (__condvar_cleanup): Wake up all waiters in case we got signaled
1512 after being woken up but before disabling asynchronous
1513 cancellation.
1514 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
1515 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1516 (__condvar_cleanup): Likewise.
1517
1518 * init.c (__NR_set_tid_address): If already defined, don't redefine.
1519 Make it an error if architecture has no #if case. Add x86-64.
1520
1521 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
1522 pt-initfini.s generation.
1523
1524 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
1525 (TLS_INIT_TP): Fix typo.
1526
6c477888
UD
15272003-03-11 Jakub Jelinek <jakub@redhat.com>
1528
1529 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
1530 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
1531
1532 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
1533 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
1534 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
1535 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
1536 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
1537 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
1538 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
1539 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
1540
ea694823
UD
15412003-03-11 Ulrich Drepper <drepper@redhat.com>
1542
6c477888
UD
1543 * sysdeps/pthread/pthread_cond_timedwait.c
1544 (__pthread_cond_timedwait): Return the result of the final
1545 locking. If it succeeds, the regular function return value.
1546
1547 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
1548 Return result of the final locking.
1549 * version.c (__nptl_main): Work around problems with the strange
1550 INTERNAL_SYSCALL macro on ppc32.
1551 * init.c (__pthread_initialize_minimal_internal): Unblock
1552 SIGCANCEL in case the parent blocked it.
1553 Reported by Paul Mackerras <paulus@samba.org>.
1554
ea694823
UD
1555 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
1556 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
1557 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
1558
b33e6163
RM
15592003-03-11 Jakub Jelinek <jakub@redhat.com>
1560
1561 * sysdeps/pthread/pthread_cond_timedwait.c
1562 (__pthread_cond_timedwait): Unlock and fail if
1563 __pthread_mutex_unlock_internal failed.
1564
1565 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
1566 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
1567 Use ARCH_CLONE.
1568 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
1569 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
1570 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
1571 ALLOCATE_STACK): New macros.
1572 (TLS_TPADJ): New macro.
1573 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
1574 (allocate_stack): Handle TLS_DTV_AT_TP and
1575 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
1576 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
1577 Don't set PD->self.
1578 * init.c [__ia64__] (__NR_set_tid_address): Define.
1579
1580 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
1581 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
1582 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
1583 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
1584 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
1585 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
1586 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
1587 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
1588 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
1589 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
1590 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
1591 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
1592 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
1593 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
1594 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
1595 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
1596 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1597 * sysdeps/ia64/bits/atomic.h: New file.
1598 * sysdeps/ia64/Makefile: New file.
1599 * sysdeps/ia64/pthread_spin_init.c: New file.
1600 * sysdeps/ia64/pthread_spin_lock.c: New file.
1601 * sysdeps/ia64/pthread_spin_trylock.c: New file.
1602 * sysdeps/ia64/pthread_spin_unlock.c: New file.
1603 * sysdeps/ia64/pthreaddef.h: New file.
1604 * sysdeps/ia64/tcb-offsets.sym: New file.
1605 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
1606 * sysdeps/ia64/tls.h: New file.
1607
1608 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
1609 to syscall instead of no arguments.
1610
2b30b2e5
UD
16112003-03-10 Ulrich Drepper <drepper@redhat.com>
1612
db5f2fc9
UD
1613 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
1614 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
1615 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
1616 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
1617
1618 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
1619 unused code.
1620
6a4263e3
UD
1621 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
1622
3de7c2a9
UD
1623 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
1624 lowlevelbarrier.sym.
1625 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
1626 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
1627 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 1628 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 1629
2a544d82
UD
1630 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1631 (__lll_mutex_lock_wait): Reverse order of first two parameters.
1632 (__lll_mutex_timedlock_wait): Likewise.
1633 (lll_mutex_lock): Adjust asm for that.
1634 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
1635 (lll_lock): Adjust asm for operand order change.
1636 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
1637 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
1638
ec06436c
UD
1639 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
1640 Reverse order of parameters.
1641 (__lll_timedwait_tid): Remove regparms attribute.
1642 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
1643 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
1644
3273832c
UD
1645 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1646 (__lll_timedwait_tid): Remove one unnecessary instruction.
1647
51f32ab8
UD
1648 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
1649 __lll_mutex_timedlock_wait only for NOT_IN_libc.
1650 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
1651 lowlevelmutex.S.
1652
1653 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1654 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
1655 for NOT_IN_libc.
1656 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
1657 lowlevellock.S.
1658
fad48d9e
UD
1659 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
1660 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
1661 for libc.so.
1662 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
1663 define LOCK here (if UP is not defined). The actual code is in
1664 lowlevelmutex.S.
1665
9356d063
UD
1666 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
1667 LOCK is already defined. Don't define lll_unlock_wake_cb and
1668 __lll_timedwait_tid for libc.so.
1669 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
1670 define LOCK here (if UP is not defined). The actual code is in
1671 lowlevellock.S.
1672
ebf0cbc5 1673 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
1674 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
1675 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
1676 instead of lowlevelsem.h.
1677 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
1678 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
1679 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 1680
c915e5ad
UD
1681 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
1682 lowlevelrwlock.sym.
1683 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
1684 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 1685 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 1686
4c3c2e8a
UD
1687 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
1688 register loading.
1689 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
1690 last changed. D'oh.
1691
2b30b2e5
UD
1692 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
1693
1694 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
1695 of __libc_locking_needed.
1696 (lll_trylock): Initialize %eax to zero.
1697
2b30b2e5
UD
1698 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
1699 pthread_cond_t definition.
1700
e48f9638
RM
17012003-03-10 Roland McGrath <roland@redhat.com>
1702
1703 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
1704 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
1705 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
1706 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
1707 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
1708
1709 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
1710 Instead of setting PD->multiple_threads, set globals
1711 __pthread_multiple_threads and __libc_multiple_threads.
1712 * sysdeps/pthread/createthread.c (create_thread): Likewise.
1713 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
1714 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
1715
1716 * descr.h (struct pthread): Conditionalize first member on
1717 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
1718 containing an anonymous tcbhead_t. Move `list' member out.
1719 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
1720 * allocatestack.c: Remove use of `header.data.' prefix.
1721 * pthread_create.c: Likewise.
1722 * init.c (__pthread_initialize_minimal_internal): Likewise.
1723 * sysdeps/pthread/createthread.c (create_thread): Likewise.
1724 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
1725 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
1726 * sysdeps/x86_64/tls.h: Likewise.
1727 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1728 (SINGLE_THREAD_P): Likewise.
1729 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1730 (SINGLE_THREAD_P): Likewise.
1731 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
1732 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
1733
c37cae9e
UD
17342003-03-09 Ulrich Drepper <drepper@redhat.com>
1735
d38c777e
RM
1736 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
1737
7b44a5e0 1738 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 1739 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 1740
c2e5e085
UD
1741 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
1742 leftovers from the ia32 code.
1743
1744 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
1745 memory load.
1746 (clear_once_control): Don't load %esi.
1747
1748 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
1749 handling.
1750
1751 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
1752
cd4b2a55
UD
1753 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
1754 * sysdeps/unix/sysv/linux/createthread.c: ...here.
1755
c37cae9e
UD
1756 * Makefile (tests): Add tst-cond10.
1757 * tst-cond10.c: New file.
1758
d130a341
UD
17592003-03-08 Ulrich Drepper <drepper@redhat.com>
1760
ccf1d573
UD
1761 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
1762 * tst-signal3.c (do_test): Likewise.
1763 * tst-sem5.c (do_test): Likewise.
1764 * tst-kill6.c (do_test): Likewise.
1765 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
1766
1767 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
1768 of inc/dec.
1769 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
1770 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
1771 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1772 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1773 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1774 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1775 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1776 Likewise.
1777 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1778 Likewise.
1779 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1780 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1781 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1782 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1783 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1784 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
1785 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
1786 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1787
d130a341
UD
1788 * allocatestack.c (allocate_stack): If mprotect() fails free the
1789 TLS memory.
1790
bc6389ad
UD
17912003-03-07 Ulrich Drepper <drepper@redhat.com>
1792
41d4d223
UD
1793 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
1794
1795 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
1796 lll_wake_tid. This was used only to work around kernel limits in
1797 the early days.
1798 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1799 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
1800 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1801 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1802
bc6389ad
UD
1803 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
1804 (__pthread_initialize_minimal_internal): Change initialization of
1805 __static_tls_align_m1 appropriately.
1806 * pthreadP.h (__static_tls_align_m1): Renamed from
1807 __static_tls_align.
1808 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
1809 instead of __static_tls_align-1.
1810
cc775edf
UD
18112003-03-04 Ulrich Drepper <drepper@redhat.com>
1812
0de28d5c 1813 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 1814
518b5308
UD
1815 * pthread_create.c: Define __pthread_keys using nocommon
1816 attribute, not by placing it explicitly in bss.
1817 Remove DEFINE_DEALLOC definition. Not needed anymore.
1818
1819 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
1820 Use it in mmap call to allocate stacks.
1821
1822 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
1823
cc775edf
UD
1824 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
1825 result of the thread function.
1826
4f6f0a8f
UD
18272003-03-03 Ulrich Drepper <drepper@redhat.com>
1828
f04a2721
UD
1829 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
1830 version is just fine.
1831
4f6f0a8f
UD
1832 * sysdeps/unix/sysv/linux/libc_pthread_init.c
1833 (__pthread_child_handler): Renamed from pthread_child_handler,
1834 exported, and marked hidden. Change all users.
1835 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
1836 free __pthread_child_handler from child list.
1837
7ce5c164
UD
18382003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
1839
1840 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
1841
1842 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1843 Fix handling of cancellation and failing pthread_mutex_unlock call.
1844 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
1845 (__pthread_cond_wait): Likewise.
1846
1847 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
1848 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
1849 lll_futex_timed_wait call.
1850 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1851 (pthread_rwlock_timedwrlock): Likewise.
1852
1853 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
1854 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
1855 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
1856
1857 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
1858 check of lll_futex_wake return value.
1859
ea6a015b
RM
18602003-03-03 Roland McGrath <roland@redhat.com>
1861
1862 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
1863
1864 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1865 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
1866 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1867
4adacf57
UD
18682003-03-02 Ulrich Drepper <drepper@redhat.com>
1869
1be3d664
UD
1870 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1871 error for CPU clocks.
1872
885bafa1
UD
1873 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1874 _POSIX_MONOTONIC_CLOCK.
1875 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1876
4adacf57
UD
1877 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1878 recent kernels.
1879
86bfff4d
UD
18802003-03-01 Ulrich Drepper <drepper@redhat.com>
1881
1882 * descr.h (struct pthread): Move cleanup field to the front.
1883
d1149385
RM
18842003-03-01 Roland McGrath <roland@redhat.com>
1885
1886 * sem_open.c (sem_open): Braino fix.
1887
bd8bb78b
UD
18882003-03-01 Ulrich Drepper <drepper@redhat.com>
1889
748bec08
UD
1890 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
1891 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
1892 __pthread_cleanup_pop functionality.
1893 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1894
bd8bb78b
UD
1895 * descr.h (struct pthread): Move tid field to the front now that
1896 it is often used.
1897
1898 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
1899 (__lll_mutex_timedlock_wait): Remove.
1900 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1901 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1902 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1903 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1904 (lll_unlock_wake_cb): Don't save and restore %esi.
1905 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1906 %esi.
1907 (__lll_timedwait_tid): Add alignment.
1908 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
1909 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1910 %esi.
1911 (__lll_timedwait_tid): Removed.
1912 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1913 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
1914 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
1915 (pthread_barrier_wait): Don't save, load, and restore %esi for
1916 last thread.
1917 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1918 (__pthread_cond_signal): Don't save, load, and restore %esi.
1919 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1920 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
1921 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1922 Don't save, load, and restore %esi.
1923
d2637c70
UD
19242003-02-27 Ulrich Drepper <drepper@redhat.com>
1925
567fb22a
UD
1926 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1927 Release lock before waking up the waiters.
1928
427f5fa1
UD
1929 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
1930
a2d83cfb
UD
1931 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
1932 (reader_thread): Likewise.
1933
d2637c70
UD
1934 * sysdeps/pthread/pthread_rwlock_unlock.c
1935 (__pthread_rwlock_unlock): Release internal lock early. Don't try
1936 to wake up readers if there are none.
1937
1938 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1939 Release internal lock before wake threads.
1940
b1531183
UD
19412003-02-26 Ulrich Drepper <drepper@redhat.com>
1942
dbf6131c
UD
1943 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
1944 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
1945 predefined.
1946 * tst-rwlock9.c: Likewise.
1947 * tst-rwlock10.c: New file.
1948 * tst-rwlock11.c: New file.
1949
695799fe
UD
1950 * Makefile (tests): Add tst-dlsym1.
1951 * tst-dlsym1.c: New file.
1952
b1531183
UD
1953 * init.c (__pthread_initialize_minimal_internal): Set
1954 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
1955 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
1956
3724f268
UD
19572003-02-24 Ulrich Drepper <drepper@redhat.com>
1958
3857ca78
UD
1959 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
1960
80d80779
UD
1961 * tst-cond2.c: Fix sychronization with child.
1962
86371308
UD
1963 * tst-rwlock8.c (reader_thread): Remove unused variable.
1964
ffeb4481
UD
1965 * Makefile: Add rules to build and run tst-tls3.
1966 * tst-tls3.c: New file.
1967 * tst-tls3mod.c: New file.
1968
3724f268
UD
1969 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
1970 * tst-rwlock8.c: New file.
1971 * tst-rwlock9.c: New file.
1972 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
1973 complete broken rwlock implementation.
1974 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1975 Likewise.
1976 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1977 Likewise.
1978 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1979 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
1980 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
1981 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1982 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1983 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
1984 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 1985
8915cc40
RM
19862003-02-23 Roland McGrath <roland@redhat.com>
1987
1988 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
1989
fd1a0d0c
UD
19902003-02-23 Ulrich Drepper <drepper@redhat.com>
1991
ecf28959
UD
1992 * Makefile (tests): Add tst-context1.
1993 * tst-context1.c: New file.
1994
5e47b76b
UD
1995 * Makefile (tests): Add tst-tls1 and tst-tls2.
1996 * tst-tls1.c: New file.
1997 * tst-tls2.c: New file.
1998
5a6bbb41
UD
1999 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
2000 for failed cmpxchg.
2001
fd1a0d0c
UD
2002 * pthread_create.c (start_thread): Set EXITING_BIT early.
2003
2004 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
2005 (THREAD_GETMEM_NC): Likewise.
2006
757f9fcb
UD
20072003-02-22 Ulrich Drepper <drepper@redhat.com>
2008
b1b8e747
UD
2009 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
2010 off 3 more bytes by using offset-less instructions when possible.
2011
c780aa21 2012 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
2013
2014 * eintr.c (eintr_source): Add unnecessary return but the compiler
2015 insists.
2016
2017 * tst-kill3.c: Include <unistd.h>.
2018
5148559c
RM
20192003-02-21 Roland McGrath <roland@redhat.com>
2020
2021 * pthread_create.c (start_thread): Call __libc_thread_freeres.
2022
ab2d98e3
UD
20232003-02-21 Ulrich Drepper <drepper@redhat.com>
2024
71028edd
UD
2025 * Makefile (tests): Add tst-eintr1.
2026 (distribute): Add eintr.c.
2027 * tst-eintr1.c: New file.
2028 * eintr.c: New file.
2029
e814f748
UD
2030 * pthread_cancel.c (pthread_cancel): Use tkill directly.
2031
2032 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
2033 Disallow sending SIGCANCEL.
2034
ab2d98e3 2035 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 2036 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
2037 * tst-kill1.c: New file.
2038 * tst-kill2.c: New file.
2039 * tst-kill3.c: New file.
2040 * tst-kill5.c: New file.
9c03686d 2041 * tst-kill6.c: New file.
e814f748
UD
2042 * tst-basic7.c: Renamed to...
2043 * tst-kill4.c: ...this.
ab2d98e3 2044
59fed0e2
RM
20452003-02-21 Roland McGrath <roland@redhat.com>
2046
2047 * Makefile (install-lib-ldscripts): New variable.
2048
49dc759f
UD
20492003-02-21 Ulrich Drepper <drepper@redhat.com>
2050
8c2e9a29
UD
2051 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
2052 * pthread_cancel.c: Use INVALID_TD_P.
2053 * pthread_detach.c: Likewise.
2054 * pthread_getschedparam.c: Likewise.
2055 * pthread_setschedparam.c: Likewise.
2056 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
2057 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2058 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
2059 * pthread_timedjoin.c: Likewise.
2060
2061 * tst-basic7.c: Include <signal.h>.
2062
49dc759f
UD
2063 * pthread_join.c (pthread_join): Limited checking for invalid
2064 descriptors.
2065 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
2066
df5803bf
UD
20672003-02-20 Ulrich Drepper <drepper@redhat.com>
2068
c5acd3d7
UD
2069 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
2070 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
2071 * Makefile (tests): Add tst-key4.
2072 * tst-key4.c: New file.
2073
729924a0
UD
20742003-02-18 Ulrich Drepper <drepper@redhat.com>
2075
2f7dc594
UD
2076 * Makefile (tests): Add tst-basic7.
2077 * tst-basic7.c: New file.
2078
ba25bb0f
UD
2079 * pthread_create.c (deallocate_tsd): Mark as internal_function.
2080 Add some more __builtin_expect.
2081
12fd3c5f 2082 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 2083
5430d926
UD
20842003-02-17 Ulrich Drepper <drepper@redhat.com>
2085
b0db7fbe
UD
2086 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
2087 _POSIX_THREAD_PRIORITY_SCHEDULING.
2088 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2089 _XOPEN_REALTIME_THREADS.
2090 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2091
2092 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
2093 kernel returns EINVAL for PID <= 0, work around it.
2094
ecfda9bd
UD
2095 * Makefile (tests): Add tst-signal5.
2096 * tst-signal5.c: New file.
2097
7d78ab99
UD
2098 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
2099 and LOGIN_NAME_MAX.
2100
371a2972
UD
2101 * tst-cancel1.c (tf): Block all signals.
2102
5430d926
UD
2103 * Makefile (tests): Add tst-basic6.
2104 * tst-basic6.c: New file.
2105
2106 * tst-basic1.c: Add test for process ID.
2107
2108 * Makefile (tests): Add tst-cancel10.
2109 * tst-cancel10.c: New file.
2110
2111 * Makefile (tests): Add tst-signal4.
2112 * tst-signal4.c: New file.
2113
2114 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
2115 __sigismember instead of sigismember. Add __builtin_expect.
2116
1564916a
UD
21172003-02-16 Ulrich Drepper <drepper@redhat.com>
2118
179ff175
UD
2119 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
2120 pthread_setcancelstate, and pthread_rwlock_setpshared.
2121
e4335f9a
UD
2122 * tst-cancel7.c (do_test): Make sure the pid file exists before
2123 canceling the thread.
2124
0a37669a
UD
2125 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
2126 pthread_rwlock_timedrdlock tests.
2127 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
2128 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2129 Check for invalid tv_nsec field.
2130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2131 Likewise.
2132
2133 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
2134 recursive mutex of overflow.
2135
2136 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
2137
e4335f9a 2138 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
2139 going into an endless loop.
2140 * Makefile (tests): Add tst-cancel9.
2141 * tst-cancel9.c: New file.
2142
2143 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
2144
b270b548
UD
21452003-02-15 Ulrich Drepper <drepper@redhat.com>
2146
1c82b97f
UD
2147 * tst-mutex5.c (do_test): Add more timedlock tests.
2148
b2f05465 2149 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
2150 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
2151
e798b60f
UD
2152 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
2153 use INLINE_SYSCALL. Error number is returned, not -1.
2154
90491dc4
UD
2155 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
2156 and __deallocate_stack with internal_function.
2157 * pthread_create.c: Adjust definitions appropriately.
2158 * allocatestack.c: Likewise.
2159
2160 * pthread_join.c: Add one more __builtin_expect.
2161 * pthread_timedjoin.c: Likewise.
2162
2163 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
2164 not data of sequence number does not match.
2165 Add one __builtin_expect.
2166
c6247c9d
UD
2167 * Makefile (tests): Add tst-clock1.
2168 * tst-clock1.c: New file.
2169
b270b548
UD
2170 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
2171 negative arguments.
2172 * Makefile (tests): Add tst-basic5.
2173 * tst-basic5.c: New file.
2174
700bf7af
UD
21752003-02-14 Ulrich Drepper <drepper@redhat.com>
2176
757de559
UD
2177 * Makefile (tests): Add tst-basic4.
2178 * tst-basic4.c: New file.
2179
47202270
UD
2180 * pthreadP.h: Add declaraction for __nptl_nthreads.
2181 * pthread_create.c: Define __nptl_nthreads
2182 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 2183 after thread is done. If then zero, call exit(0).
47202270
UD
2184 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2185 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
2186 * init.c (pthread_functions): Initialize ptr_nthreads.
2187 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
2188 (__reclaim_stacks): Decrement __nptl_nthreads.
2189 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
2190 Define.
2191 * Makefile (tests): Add tst-basic3.
2192 * tst-basic3.c: New file.
2193
e320ef46
UD
2194 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
2195 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
2196 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
2197 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
2198 if asynchronous canceling is enabled.
2199 * pthread_join.c (pthread_join): When recognizing circular joins,
2200 take into account the other thread might be already canceled.
2201 * Makefile (tests): Add tst-join5.
2202 * tst-join5.c: New file.
2203
700bf7af
UD
2204 * Makefile (tests): Add tst-join4.
2205 * tst-join4.c: New file.
2206
22072003-02-13 Ulrich Drepper <drepper@redhat.com>
2208
2209 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
2210
dac0f772
UD
22112003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
2212
2213 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
2214 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
2215 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
2216 warning.
2217 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
2218 to avoid warning.
2219 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
2220 error if lll_futex_wake failed.
2221
e8cda341
UD
22222003-02-13 Ulrich Drepper <drepper@redhat.com>
2223
a7720b5e
UD
2224 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
2225 handling of cancellation and failung pthread_mutex_unlock call.
2226 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2227 * Makefile (tests): Add tst-cond8 and tst-cond9.
2228 * tst-cond8.c: New file.
2229 * tst-cond9.c: New file.
2230
a1ea4c06
UD
2231 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
2232
2233 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
2234 non-standard initializers with __USE_GNU.
2235
e8cda341
UD
2236 * Makefile (tests): Add tst-cleanup3.
2237 * tst-cleanup3.c: New file.
2238
2067577c
UD
22392003-02-12 Ulrich Drepper <drepper@redhat.com>
2240
89e78a95
UD
2241 * Makefile (tests): Add tst-attr1 and tst-attr2.
2242 * tst-attr1.c: New file.
2243 * tst-attr2.c: New file.
2244
dfdd294a
UD
2245 * Makefile: Add rules to build and run tst-atfork2 test.
2246 * tst-atfork2.c: New file.
2247 * tst-atfork2mod.c: New file.
2248
2249 * sysdeps/unix/sysv/linux/unregister-atfork.c
2250 (__unregister_atfork): Free the memory allocated for the handlers
2251 after removing them from the lists.
2252
2253 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
2254 cleanup function.
2255
2256 * tst-atfork1.c (do_test): Wait for the child we forked.
2257 Report error in child.
2258
2259 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
2260
2067577c
UD
2261 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
2262
2a8a8a84
UD
22632003-02-10 Ulrich Drepper <drepper@redhat.com>
2264
d9dd121e
UD
2265 * Makefile (tests): Add tst-cancel8.
2266 * tst-cancel8.c: New file.
2267
2a8a8a84
UD
2268 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
2269 clearing of control variable.
defd1870 2270 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 2271 * tst-once3.c: New file.
defd1870 2272 * tst-once4.c: New file.
2a8a8a84 2273
a54e8d33
UD
22742003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2275
2276 * sysdeps/sh/Makefile: New file.
2277 * sysdeps/sh/bits/atomic.h: New file.
2278 * sysdeps/sh/pthread_spin_init.c: New file.
2279 * sysdeps/sh/pthread_spin_lock.c: New file.
2280 * sysdeps/sh/pthread_spin_trylock.S: New file.
2281 * sysdeps/sh/pthread_spin_unlock.S: New file.
2282 * sysdeps/sh/pthreaddef.h: New file.
2283 * sysdeps/sh/tcb-offsets.sym: New file.
2284 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
2285 * sysdeps/sh/tls.h: New file.
2286 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
2287 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
2288 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
2289 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
2290 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
2291 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
2292 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
2293 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
2294 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
2295 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
2296 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
2297 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
2298 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2299 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
2300 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
2301 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
2302 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
2303 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
2304 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
2305 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
2306 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
2307 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
2308 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
2309 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
2310 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
2311 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
2312 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
2313 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
2314 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
2315 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
2316
696e556e
UD
23172003-02-08 Ulrich Drepper <drepper@redhat.com>
2318
2319 * tst-cond2.c: Rearrange code to not rely on behavior undefined
2320 according to POSIX.
2321
2322 * tst-basic2.c (do_test): Lock mutex before creating the thread.
2323
fef710d6
UD
23242003-02-07 Ulrich Drepper <drepper@redhat.com>
2325
c6180643
UD
2326 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
2327 (TLS_GET_FS): New #define.
2328 (TLS_SET_FS): New #define.
2329 Correct value of __NR_set_thread_area.
2330
fef710d6
UD
2331 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
2332
11090a99
UD
23332003-02-06 Ulrich Drepper <drepper@redhat.com>
2334
65c68990
UD
2335 * Makefile (tests): Add tst-popen1.
2336 * tst-popen1.c: New file.
2337
11090a99
UD
2338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
2339 but inactive generalization.
2340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2341 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2342 Minor optimization, remove one instruction.
2343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2344
a88c9263
UD
23452003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
2346
2347 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
2348
23492003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
2350
2351 * init.c (__NR_set_tid_address): Add #ifdef for s390.
2352 * sysdeps/pthread/pthread_barrier_wait.c: New file.
2353 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
2354 * sysdeps/pthread/pthread_cond_signal.c: New file.
2355 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
2356 * sysdeps/pthread/pthread_cond_wait.c: New file.
2357 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
2358 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
2359 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
2360 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
2361 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
2362 * sysdeps/s390/Makefile: New file.
2363 * sysdeps/s390/bits/atomic.h: New file.
2364 * sysdeps/s390/pthread_spin_init.c: New file.
2365 * sysdeps/s390/pthread_spin_lock.c: New file.
2366 * sysdeps/s390/pthread_spin_trylock.c: New file.
2367 * sysdeps/s390/pthread_spin_unlock.c: New file.
2368 * sysdeps/s390/pthreaddef.h: New file.
2369 * sysdeps/s390/tcb-offsets.sym: New file.
2370 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
2371 * sysdeps/s390/tls.h: New file.
2372 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
2373 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
2374 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
2375 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
2376 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
2377 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
2378 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
2379 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
2380 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
2381 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
2382 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
2383 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
2384 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
2385 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
2386 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
2387 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
2388 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
2389 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
2390 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
2391 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
2392 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
2393 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
2394 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
2395
6f1cff95
UD
23962003-02-04 Ulrich Drepper <drepper@redhat.com>
2397
ec609a8e
UD
2398 * atomic.h: Add a couple more default implementations.
2399 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
2400 __arch_compare_and_exchange_32_acq in return value definition. It
2401 always exists.
2402 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 2403 Add missing atomic_ prefixes.
e3ec8904 2404
6f1cff95
UD
2405 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
2406 thread library is available, use correct value to mark initialized
2407 once variable.
2408
4f088329
UD
24092003-02-03 Ulrich Drepper <drepper@redhat.com>
2410
6f1cff95
UD
2411 * allocatestack.c (allocate_stack): Use __getpagesize instead of
2412 __sysconf to determine pagesize.
2413
3e4fc359 2414 * pthread_create.c: Include <atomic.h>.
4f088329
UD
2415 * allocatestack.c (allocate_stack): Implement coloring of the
2416 allocated stack memory. Rename pagesize to pagesize_m1. It's the
2417 size minus one. Adjust users.
3e4fc359 2418 * sysdeps/i386/i686/Makefile: New file.
4f088329 2419
2f42e8be
UD
24202003-02-02 Ulrich Drepper <drepper@redhat.com>
2421
4301f7e2
UD
2422 * allocatestack.c: Improve comment throughout the file.
2423
2f42e8be 2424 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 2425 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
2426 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
2427 (__lll_lock_wait): Likewise.
2428 (lll_unlock_wake_cb): Removed.
2429
4a7d6545
UD
24302003-01-31 Ulrich Drepper <drepper@redhat.com>
2431
2432 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
2433 _POSIX_THREAD_PRIORITY_SCHEDULING.
2434
886d5973
UD
24352003-01-30 Jakub Jelinek <jakub@redhat.com>
2436
2437 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2438 Fix return type of ptr___pthread_getspecific.
2439
e474ca78
UD
24402003-01-29 Ulrich Drepper <drepper@redhat.com>
2441
2442 * Makefile (tests): Add tst-umask1.
2443 (tst-umask1-ARGS): Define.
2444 * tst-umask1.c: New file.
2445
e6ebd2e4
UD
24462003-01-28 Ulrich Drepper <drepper@redhat.com>
2447
6cf26f41
UD
2448 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
2449 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
2450 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
2451 pthread_rwlock_unlock.
2452 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
2453 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
2454 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
2455 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
2456 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2457 New file.
2458 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
2459 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2460 New file.
2461 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
2462 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
2463 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
2464 New file.
2465 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
2466 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
2467 New file.
2468 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
2469 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
2470 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
2471 New file.
2472 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
2473 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
2474 New file.
2475 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
2476
1d087a7e
UD
2477 * Makefile (libpthread-routines): Remove lowlevelcond and
2478 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
2479 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
2480 and pthread_cond_broadcast.
4a99d160
UD
2481 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
2482 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
2483 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
2484 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
2485 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
2486 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
2487 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
2488 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
2489 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
2490 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
2491 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
2492 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
2493 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
2494 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
2495 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
2496 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
2497 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
2498 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
2499 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
2500 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
2501 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
2502 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
2503 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
2504 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
2505 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
2506 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
2507 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
2508 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
2509 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
2510 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
2511 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 2512
e6ebd2e4
UD
2513 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
2514 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
2515 of the code is moved to ...
2516 * sysdeps/pthread/createthread.c: ...here. New file.
2517
a15698cb
UD
25182003-01-27 Ulrich Drepper <drepper@redhat.com>
2519
0566b130
UD
2520 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
2521 (__new_sem_post): Clear %eax before returning.
2522 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
2523
e6fb8846
UD
2524 * Makefile (tests): Add tst-cleanup2.
2525 * tst-cleanup2.c: New file.
2526
a15698cb
UD
2527 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
2528 Interpret first parameter correctly.
2529
8824b0a1
UD
25302003-01-17 Ulrich Drepper <drepper@redhat.com>
2531
2532 * Makefile (headers): Add bits/semaphore.h.
2533
850dcfca
UD
25342003-01-16 Jakub Jelinek <jakub@redhat.com>
2535
2536 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
2537 if not SHARED.
2538
574b892e
UD
25392003-01-14 Ulrich Drepper <drepper@redhat.com>
2540
a8d87c92
UD
2541 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
2542 must be used and mapping failed.
2543 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
2544
574b892e
UD
2545 * Makefile (CFLAGS-pthread_self.os): Define this, not
2546 CFLAGS-pthread_self.c.
2547
fb48047a
UD
25482003-01-13 Ulrich Drepper <drepper@redhat.com>
2549
47805511
UD
2550 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
2551 lll_unlock_wake_cb.
2552
fb48047a
UD
2553 * Makefile (libpthread-routines): Add version. Add rules to build
2554 version.os and banner.h.
2555 * version.c: New file.
2556
115bb61d
UD
25572003-01-13 Jakub Jelinek <jakub@redhat.com>
2558
2559 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
2560 the alias unconditional.
2561 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
2562
25632003-01-13 Ulrich Drepper <drepper@redhat.com>
2564
2565 * Makefile (CFLAGS-pthread_self.c): New definition.
2566
6aca81bb
UD
25672003-01-06 Jakub Jelinek <jakub@redhat.com>
2568
2569 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
2570 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
2571 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
2572 * init.c (__pthread_initialize_minimal_internal): Likewise.
2573
e9c7764e
UD
25742003-01-07 Jakub Jelinek <jakub@redhat.com>
2575
b5facfda
UD
2576 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
2577
e9c7764e
UD
2578 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2579 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
2580 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
2581 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
2582 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
2583 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
2584
bef1e42f
UD
25852003-01-06 Jakub Jelinek <jakub@redhat.com>
2586
2587 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
2588 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
2589 * tst-cancel-wrappers.sh: Remove all exceptions.
2590
bbd17455
UD
25912003-01-05 Ulrich Drepper <drepper@redhat.com>
2592
a73ab6df
UD
2593 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
2594 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
2595
bbd17455
UD
2596 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
2597 Use __libc_pthread_functions array if SHARED.
2598
2599 * pthreadP.h: Move pthread_cond_2_0_t definition to...
2600 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
2601
2602 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
2603 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
2604 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
2605 __libc_ptf_call instead of __libc_maybe_call.
2606 (PTF): New #define.
2607 (__libc_cleanup_region_start): Wrap function name with PTF call.
2608 (__libc_cleanup_region_end): Likewise.
2609 (__libc_cleanup_end): Likewise.
2610
2611 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
2612 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
2613 * pthread_key_create.c: Add __pthread_key_create_internal alias.
2614 * pthreadP.h: Add prototypes.
2615
2616 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
2617 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
2618 __pthread_rwlock_unlock aliases.
2619 * pthreadP.h: Add prototypes for new aliases.
2620
2621 * pthreadP.h (struct pthead_functions): Moved to...
2622 * sysdeps/pthread/pthread-functions.h: ...here. New file.
2623 * init.c (pthread_functions): Add initializers for new elements.
2624
2625 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
2626 __pthread_cleanup_pop_restore aliases.
2627 * pthreadP.h: Add prototypes.
2628
2629 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
2630 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
2631 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
2632 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2633 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2634 * pthreadP.h: Adjust prototypes and callers.
2635
d27a78be
UD
26362003-01-04 Ulrich Drepper <drepper@redhat.com>
2637
b74121ae
UD
2638 * Makefile (tests): Add tst-cancel7.
2639 (tst-cancel7-ARGS): New variable.
bbd17455 2640 * tst-cancel7.c: New file.
b74121ae 2641
29bc410c
UD
2642 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
2643 around gcc defficiencies.
2644 * old_pthread_cond_signal.c: Likewise.
2645 * old_pthread_cond_timedwait.c: Likewise.
2646 * old_pthread_cond_wait.c: Likewise.
2647
d27a78be
UD
2648 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
2649
733f25e6
UD
26502003-01-03 Ulrich Drepper <drepper@redhat.com>
2651
7edb2ae3
UD
2652 * Makefile (tests): Add tst-cond7.
2653 * tst-cond7.c: New file.
2654
b1151300
UD
2655 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
2656 (condvar_cleanup): Get condvar address from the right place.
2657
733f25e6
UD
2658 * atomic.h: Correct definitions of atomic_full_barrier,
2659 atomic_read_barrier, atomic_write_barrier.
2660
2661 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
2662 race-free.
2663 * old_pthread_cond_signal.c: Likewise.
2664 * old_pthread_cond_timedwait.c: Likewise.
2665 * old_pthread_cond_wait.c: Likewise.
2666
686b7223
UD
26672003-01-03 Jakub Jelinek <jakub@redhat.com>
2668
2669 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
2670
0e07706e
UD
26712003-01-03 Ulrich Drepper <drepper@redhat.com>
2672
997256dd
UD
2673 * pthreadP.h (pthread_cond_2_0_t): New type.
2674 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
2675 Use new type for the 2.0 condvar function prototypes.
2676 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
2677 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
2678 parameter.
2679 * old_pthread_cond_destroy.c: Likewise.
2680 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
2681 * old_pthread_cond_signal.c: Likewise.
2682 * old_pthread_cond_timedwait.c: Likewise.
2683 * old_pthread_cond_wait.c: Likewise.
2684
842d2817
UD
2685 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
2686 (__pthread_cond_wait): Don't save cancellation mode and seq value
2687 in same location.
2688
0e07706e
UD
2689 * herrno.c (__h_errno_location): Don't define as weak.
2690
bf293afe
UD
26912003-01-02 Jakub Jelinek <jakub@redhat.com>
2692
2693 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
2694 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
2695 and pthread_cond_wait.
2696 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
2697 Renamed to...
2698 (__pthread_cond_broadcast_2_0): ... this.
2699 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
2700 Renamed to...
2701 (__pthread_cond_destroy_2_0): ... this.
2702 * old_pthread_cond_init.c (__old_pthread_cond_init):
2703 Renamed to...
2704 (__pthread_cond_init_2_0): ... this.
2705 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
2706 Renamed to...
2707 (__pthread_cond_signal_2_0): ... this.
2708 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
2709 Renamed to...
2710 (__pthread_cond_wait_2_0): ... this.
2711 * pthread_cond_destroy.c: Include shlib-compat.h.
2712 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
2713 * pthread_cond_init.c: Include shlib-compat.h.
2714 (pthread_cond_init): Change strong_alias into versioned_symbol.
2715 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
2716 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
2717 fields.
2718 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
2719 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
2720 __pthread_cond_wait_2_0): New prototypes.
2721 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
2722 __old_pthread_cond_init, __old_pthread_cond_signal,
2723 __old_pthread_cond_wait): Removed.
2724 * init.c: Include shlib-compat.h.
2725 (pthread_functions): Guard ptr___pthread_attr_init_2_0
2726 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
2727 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
2728 ptr___pthread_cond_*_2_0 fields.
2729 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
2730 pthread_cond_*@GLIBC_2.0 compatibility symbols.
2731
2732 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
2733 LIBC_SIGACTION was not yet defined.
2734 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
2735 [!defined LIBC_SIGACTION] (__sigaction): New function and
2736 libc_hidden_weak.
2737 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
2738 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
2739
27402003-01-02 Jakub Jelinek <jakub@redhat.com>
2741
2742 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
2743
05df18c3
UD
27442003-01-02 Ulrich Drepper <drepper@redhat.com>
2745
2746 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2747 New, larger type definition.
2748 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
2749 implementation.
2750 * Versions [libpthread]: Add definitions for new pthread_cond_*
2751 interfaces for version GLIBC_2.3.2.
2752 * pthread_cond_init.c: Update initialization for new type definition.
2753 * Makefile (libpthread-routines): Remove pthread_cond_wait,
2754 pthread_cond_timedwait, pthread_cond_signal, and
2755 pthread_cond_broadcast. Add old_pthread_cond_init,
2756 old_pthread_cond_destroy, old_pthread_cond_wait,
2757 old_pthread_cond_timedwait, old_pthread_cond_signal, and
2758 old_pthread_cond_broadcast.
2759 * old_pthread_cond_broadcast.c: New file.
2760 * old_pthread_cond_destroy.c: New file.
2761 * old_pthread_cond_init.c: New file.
2762 * old_pthread_cond_signal.c: New file.
2763 * old_pthread_cond_timedwait.c: New file.
2764 * old_pthread_cond_wait.c: New file.
2765 * pthreadP.h: Add prototypes for the compatibility interfaces.
2766
2767 * pthread_cond_destroy.c: Don't include <errno.h>.
2768
fd8979e4
UD
27692003-01-01 Ulrich Drepper <drepper@redhat.com>
2770
2771 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
2772 unnecessary zero offset when addressing MUTEX.
2773
6d6ee629
UD
27742002-12-31 Ulrich Drepper <drepper@redhat.com>
2775
2776 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
2777 __register_atfork.
2778 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
2779 for __register_atfork.
2780
a4baf360
UD
27812002-12-31 Jakub Jelinek <jakub@redhat.com>
2782
2783 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
2784 instead of ASSEMBLER test macro.
2785
2786 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
2787 __libc_current_sigrtmax): Add libc_hidden_def.
2788
2789 * sysdeps/pthread/list.h: Remove assert.h include.
2790
e9395a94
UD
27912002-12-31 Ulrich Drepper <drepper@redhat.com>
2792
2793 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
2794 __pthread_initialize_minimal_internal not
2795 __pthread_initialize_minimal.
2796
89d6e444
UD
27972002-12-30 Ulrich Drepper <drepper@redhat.com>
2798
416d2de6
UD
2799 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
2800 __pthread_initialize_minimal as hidden.
2801
89d6e444
UD
2802 * init.c (__pthread_initialize_minimal_internal): Don't mark as
2803 constructor.
2804
28052002-12-31 Jakub Jelinek <jakub@redhat.com>
2806
2807 * Makefile ($(inst_libdir)/libpthread.so): Depend on
2808 $(common-objpfx)format.lds, include that into the output script.
2809 Fix comment.
2810 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
2811
8cac677c
UD
28122002-12-28 Andreas Jaeger <aj@suse.de>
2813
2814 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
2815 nsec resolution changes.
2816 (xstat64_conv): Likewise.
2817 (xstat32_conv): Likewise.
2818 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
2819 struct kernel_stat.
2820 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
2821 structs stat and stat64.
2822 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 2823 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 2824
49e9f864
UD
28252002-12-30 Jakub Jelinek <jakub@redhat.com>
2826
2827 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
2828 argument.
2829 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
2830 (pthread_exit): Use strong_alias to avoid warnings.
2831 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
2832 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
2833 ptr___pthread_attr_init_2_*.
2834 * init.c (pthread_functions): Adjust.
2835
bab09b26
UD
28362002-12-29 Ulrich Drepper <drepper@redhat.com>
2837
598d7a42
UD
2838 * forward.c: Make all functions available by default again. It
2839 caused too much trouble.
2840
bab09b26
UD
2841 * pt-siglongjmp.c: Removed.
2842
3b7ed871
UD
28432002-12-28 Jakub Jelinek <jakub@redhat.com>
2844
2845 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
2846 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
2847 * sysdeps/i386/Makefile: New file.
2848 * sysdeps/i386/tcb-offsets.sym: New file.
2849 * sysdeps/pthread/tcb-offsets.h: New file.
2850 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2851 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
2852
2853 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
2854 __register_atfork...
2855 (GLIBC_2.3.2): ...here.
2856
28572002-12-28 Ulrich Drepper <drepper@redhat.com>
2858
2859 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
2860 pthread_attr_setstackaddr with __attribute_deprecated__.
2861
270d9d47
UD
28622002-12-27 Jakub Jelinek <jakub@redhat.com>
2863
2864 * pt-system.c (system): Remove cancellation handling.
2865 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
2866 cancellation routines.
2867
131fd126
UD
28682002-12-28 Ulrich Drepper <drepper@redhat.com>
2869
afb2e954
UD
2870 * descr.h: Include <dl-sysdep.h>.
2871 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
2872 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
2873 (MULTIPLE_THREADS_OFFSET): Adjust offset.
2874 (SYSINFO_OFFSEET): Likewise.
2875
28762002-12-27 Jakub Jelinek <jakub@redhat.com>
2877
2878 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
2879 Define.
2880 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
2881 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
2882 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
2883 (USE_DL_SYSINFO): Undef.
2884
28852002-12-22 Jakub Jelinek <jakub@redhat.com>
2886
2887 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
2888 $(common-objpfx)libc.so.
2889 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
2890 it is bigger than pipe buffer size even on arches with bigger
2891 page size.
2892 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
2893
a218c9cf
UD
28942002-12-25 Ulrich Drepper <drepper@redhat.com>
2895
2896 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
2897 correct errno access for case that USE___THREAD is not defined.
2898
015a2dc9
UD
28992002-12-24 Ulrich Drepper <drepper@redhat.com>
2900
2901 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
2902 Patch by Marijn Ros <marijn@mad.scientist.com>.
2903
5220f9ac
RM
29042002-12-22 Roland McGrath <roland@redhat.com>
2905
2906 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2907
1561bf63
UD
29082002-12-20 Ulrich Drepper <drepper@redhat.com>
2909
2910 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
2911
3325198e
UD
29122002-12-19 Ulrich Drepper <drepper@redhat.com>
2913
057c823f
UD
2914 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
2915 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
2916 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
2917
097eca29
UD
2918 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
2919 of int $0x80.
2920 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2921 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
2922 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
2923 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2924 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2925 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
2926 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
2927 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2928
2929 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
2930 sysenter.
2931 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
2932
2933 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
2934
5f5843e3
UD
2935 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
2936 in new TCB.
2937 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
2938 that sysinfo is properly initialized.
2939 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
2940 to 1 only for ld.so.
2941
3325198e
UD
2942 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2943 RTLD_CORRECT_DYNAMIC_WEAK.
2944
74e8f2dc
UD
29452002-12-19 Jakub Jelinek <jakub@redhat.com>
2946
2947 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2948 Use return 0 as 6th argument to FORWARD4.
2949 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
2950
df45b31e
UD
29512002-12-18 Ulrich Drepper <drepper@redhat.com>
2952
2953 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
2954 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
2955 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
2956 (INIT_SYSINFO): New #define.
2957 (TLS_TP_INIT): Use INIT_SYSINFO.
2958 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2959 At test to make sure SYSINFO_OFFSET value is correct.
2960 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
2961
3d539579
UD
29622002-12-18 Jakub Jelinek <jakub@redhat.com>
2963
2964 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2965 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
2966 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
2967 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
2968 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
2969 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
2970 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
2971
d7913e0e
UD
29722002-12-18 Ulrich Drepper <drepper@redhat.com>
2973
f051627f
UD
2974 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
2975 macro instead of using int $0x80 directly.
2976
d7913e0e
UD
2977 * sysdeps/pthread/bits/stdio-lock.h: New file.
2978 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
2979 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
2980 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
2981 * Makefile (routines): Add libc-lowlevelmutex.
2982
2983 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
2984 __i686.get_pc_thunk.dx.
2985
f077a4a9
UD
29862002-12-17 Jakub Jelinek <jakub@redhat.com>
2987
2988 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
2989 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2990 ($(objpfx)tst-cancel-wrappers.out): New rule.
2991 * tst-cancel-wrappers.sh: New test.
2992 * tst-locale1.c: Include signal.h.
2993 (uselocale): Test static linking of __libc_current_sigrt*.
2994
29952002-12-17 Ulrich Drepper <drepper@redhat.com>
2996
2997 * Makefile (tests): Add tst-cancel6.
2998 * tst-cancel6.c: New file
2999
bd499a3b
UD
30002002-12-17 Jakub Jelinek <jakub@redhat.com>
3001
3002 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3003 Define meaningfully for assembler as well.
3004 * pthreadP.h (struct pthread_functions): Remove
3005 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
3006 and ptr_pthread_attr_init_2_1 fields.
3007 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
3008 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
3009 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
3010 (FORWARD3): Define using FORWARD4.
3011 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
3012 versions.
3013 * pt-system.c: Remove duplicate stdlib.h include.
3014
0a1063f4
UD
30152002-12-16 Ulrich Drepper <drepper@redhat.com>
3016
87d60668
UD
3017 * sem_init.c: Define sem_init@GLIBC_2.0.
3018 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
3019 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
3020
0a1063f4
UD
3021 * flockfile.c: Moved to...
3022 * sysdeps/pthread/flockfile.c: ...here. New file.
3023 * funlockfile.c: Moved to...
3024 * sysdeps/pthread/funlockfile.c: ...here. New file.
3025 * ftrylockfile.c: Moved to...
3026 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
3027
9634cf9d
UD
30282002-12-16 Jakub Jelinek <jakub@redhat.com>
3029
3030 * libc-cancellation.c: Guard both function with
3031 #if !defined NOT_IN_libc.
3032 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
3033 automatically provided pthread wrappers.
3034 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
3035 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
3036 nor in libpthread.
3037 * pt-open.c: Removed.
3038 * pt-fcntl.c: Removed.
3039 * pt-fsync.c: Removed.
3040 * pt-lseek.c: Removed.
3041 * pt-msgrcv.c: Removed.
3042 * pt-msgsnd.c: Removed.
3043 * pt-msync.c: Removed.
3044 * pt-nanosleep.c: Removed.
3045 * pt-open64.c: Removed.
3046 * pt-pause.c: Removed.
3047 * pt-pread.c: Removed.
3048 * pt-pread64.c: Removed.
3049 * pt-pwrite.c: Removed.
3050 * pt-pwrite64.c: Removed.
3051 * pt-read.c: Removed.
3052 * pt-recv.c: Removed.
3053 * pt-recvfrom.c: Removed.
3054 * pt-recvmsg.c: Removed.
3055 * pt-send.c: Removed.
3056 * pt-sendto.c: Removed.
3057 * pt-sigtimedwait.c: Removed.
3058 * pt-sigwait.c: Removed.
3059 * pt-wait.c: Removed.
3060 * pt-waitpid.c: Removed.
3061 * pt-write.c: Removed.
3062 * pt-accept.c: Removed.
3063 * pt-close.c: Removed.
3064 * pt-connect.c: Removed.
3065 * pt-lseek64.c: Removed.
3066 * pt-sendmsg.c: Removed.
3067 * pt-tcdrain.c: Removed.
3068
6ee8d334
UD
30692002-12-15 Ulrich Drepper <drepper@redhat.com>
3070
81fa9371
UD
3071 * init.c (__pthread_initialize_minimal_internal): Renamed from
3072 __pthread_initialize_minimal. Make old name an alias. This
3073 converts a normal relocation into a relative relocation.
3074
f3015aa5
UD
3075 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
3076
4cbc1950
UD
3077 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
3078 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
3079 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
3080 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
3081 pt-sigwaitinfo, pt-waitid, and pt-writev.
3082 * pt-creat.c: Removed.
3083 * pt-poll.c: Removed.
3084 * pt-pselect.c: Removed.
3085 * pt-readv.c: Removed.
3086 * pt-select.c: Removed.
3087 * pt-sigpause.c: Removed.
3088 * pt-sigsuspend.c: Removed.
3089 * pt-sigwaitinfo.c: Removed.
3090 * pt-waitid.c: Removed.
3091 * pt-writev.c: Removed.
3092
8454830b
UD
3093 * init.c (pthread_functions): New variable.
3094 (__pthread_initialize_minimal): Pass pointer to pthread_functions
3095 (or NULL) to __libc_pthread_init.
3096 * forward.c: Rewrite to use __libc:pthread_functions array to get
3097 function addresses.
3098 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
3099 prototype.
3100 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3101 Take new parameter. Copy content of variable pointed to by it
3102 to __libc_pthread_init.
3103
3104 * pthreadP.h (struct pthread_functions): New type.
3105 (__libc_pthread_init): Declare.
3106
3107 * pthread_attr_destroy.c: Add namespace protected alias.
3108 * pthread_attr_getdetachstate.c: Likewise.
3109 * pthread_attr_getinheritsched.c: Likewise.
3110 * pthread_attr_getschedparam.c: Likewise.
3111 * pthread_attr_getschedpolicy.c: Likewise.
3112 * pthread_attr_getscope.c: Likewise.
3113 * pthread_attr_setdetachstate.c: Likewise.
3114 * pthread_attr_setinheritsched.c: Likewise.
3115 * pthread_attr_setschedparam.c: Likewise.
3116 * pthread_attr_setschedpolicy.c: Likewise.
3117 * pthread_attr_setscope.c: Likewise.
3118 * pthread_cond_broadcast.c: Likewise.
3119 * pthread_cond_destroy.c: Likewise.
3120 * pthread_cond_init.c: Likewise.
3121 * pthread_cond_signal.c: Likewise.
3122 * pthread_cond_wait.c: Likewise.
3123 * pthread_condattr_destroy.c: Likewise.
3124 * pthread_condattr_init.c: Likewise.
3125 * pthread_equal.c: Likewise.
3126 * pthread_exit.c: Likewise.
3127 * pthread_getschedparam.c: Likewise.
3128 * pthread_self.c: Likewise.
3129 * pthread_setcancelstate.c: Likewise.
3130 * pthread_setschedparam.c: Likewise.
3131 * pthread_mutex_destroy.c: Likewise.
3132 * pthread_mutex_init.c: Likewise.
3133 * pthreadP.h: Add prototypes for the aliases.
3134
0d5f4929
UD
3135 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
3136 multiple_threads member in correct TCB to 1.
3137
6ee8d334
UD
3138 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
3139 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
3140 member of thread decriptor, otherwise return unconditionally 1.
3141
2fb6444d
UD
31422002-12-14 Ulrich Drepper <drepper@redhat.com>
3143
3144 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
3145 regular Linux version. Remove file.
3146 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
3147 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
3148 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
3149 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
3150 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
3151 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
3152 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
3153 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
3154 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
3155 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
3156 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
3157 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
3158 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
3159 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
3160 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
3161 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
3162 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
3163 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
3164 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
3165 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
3166 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
3167 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
3168 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
3169 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
3170 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
3171 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
3172 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
3173 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
3174 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
3175 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
3176
86b2dc40
UD
31772002-12-14 Jakub Jelinek <jakub@redhat.com>
3178
3179 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
3180 * sysdeps/unix/sysv/linux/open.c: Removed.
3181 * sysdeps/unix/sysv/linux/fsync.c: Removed.
3182 * sysdeps/unix/sysv/linux/lseek.c: Removed.
3183 * sysdeps/unix/sysv/linux/msync.c: Removed.
3184 * sysdeps/unix/sysv/linux/read.c: Removed.
3185 * sysdeps/unix/sysv/linux/close.c: Removed.
3186 * sysdeps/unix/sysv/linux/creat.c: Removed.
3187 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
3188 * sysdeps/unix/sysv/linux/pause.c: Removed.
3189 * sysdeps/unix/sysv/linux/select.c: Removed.
3190 * sysdeps/unix/sysv/linux/write.c: Removed.
3191
9d263d72
UD
31922002-12-14 Ulrich Drepper <drepper@redhat.com>
3193
3194 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
3195 element in TCB to see whether locking is needed.
3196
3197 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
3198 MULTIPLE_THREADS_OFFSET value is correct.
3199
3200 * sysdeps/unix/sysv/linux/close.c: New file.
3201 * sysdeps/unix/sysv/linux/connect.S: New file.
3202 * sysdeps/unix/sysv/linux/creat.c: New file.
3203 * sysdeps/unix/sysv/linux/fsync.c: New file.
3204 * sysdeps/unix/sysv/linux/llseek.c: New file.
3205 * sysdeps/unix/sysv/linux/lseek.c: New file.
3206 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
3207 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
3208 * sysdeps/unix/sysv/linux/msync.c: New file.
3209 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
3210 * sysdeps/unix/sysv/linux/open.c: New file.
3211 * sysdeps/unix/sysv/linux/open64.c: New file.
3212 * sysdeps/unix/sysv/linux/pause.c: New file.
3213 * sysdeps/unix/sysv/linux/poll.c: New file.
3214 * sysdeps/unix/sysv/linux/pread.c: New file.
3215 * sysdeps/unix/sysv/linux/pread64.c: New file.
3216 * sysdeps/unix/sysv/linux/pselect.c: New file.
3217 * sysdeps/unix/sysv/linux/pwrite.c: New file.
3218 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
3219 * sysdeps/unix/sysv/linux/readv.c: New file.
3220 * sysdeps/unix/sysv/linux/recv.S: New file.
3221 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
3222 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
3223 * sysdeps/unix/sysv/linux/select.c: New file.
3224 * sysdeps/unix/sysv/linux/send.S: New file.
3225 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
3226 * sysdeps/unix/sysv/linux/sendto.S: New file.
3227 * sysdeps/unix/sysv/linux/sigpause.c: New file.
3228 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
3229 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
3230 * sysdeps/unix/sysv/linux/sigwait.c: New file.
3231 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
3232 * sysdeps/unix/sysv/linux/system.c: New file.
3233 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
3234 * sysdeps/unix/sysv/linux/wait.c: New file.
3235 * sysdeps/unix/sysv/linux/waitid.c: New file.
3236 * sysdeps/unix/sysv/linux/waitpid.c: New file.
3237 * sysdeps/unix/sysv/linux/writev.c: New file.
3238 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
3239
3240 * pt-readv.c: Fix comment.
3241
32422002-12-14 Jakub Jelinek <jakub@redhat.com>
3243
3244 * tst-cleanup1.c: Include stdlib.h.
3245
3246 * tst-cancel5.c: New test.
3247 * Makefile (tests): Add tst-cancel5.
3248 (tst-cancel5): Link against libc.so libpthread.so in that order.
3249
9ae0909b
UD
32502002-12-13 Ulrich Drepper <drepper@redhat.com>
3251
b7bdd9c4
UD
3252 * forward.c (test_loaded): Prevent recursive calls.
3253
9ae0909b
UD
3254 * Makefile (routines): Add libc-cancellation.
3255 * libc-cancellation.c: New file.
3256 * descr.h (struct pthread): Add multiple_threads field.
3257 * allocatestack.c (allocate_stack): Initialize multiple_header field of
3258 new thread descriptor to 1.
3259 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
3260 Initialize multiple_thread field after successful thread creation.
3261 * cancellation.c (__do_cancel): Move to pthreadP.h.
3262 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
3263 (__pthread_disable_asynccancel): Add internal_function attribute.
3264 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
3265 * pthread_setcancelstate.c: Likewise.
3266 * pthread_setcanceltype.c: Likewise.
3267 * pthread_exit.c: Likewise.
3268 * pthreadP.h (CANCELLATION_P): Likewise.
3269 (__do_cancel): Define as static inline.
3270 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
3271 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
3272 declarations.
3273 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
3274 fields. Define MULTIPLE_THREADS_OFFSET.
3275 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
3276 declaration.
3277 * sysdeps/unix/sysv/linux/accept.S: New file.
3278 * sysdeps/unix/sysv/linux/read.c: New file.
3279 * sysdeps/unix/sysv/linux/write.c: New file.
3280 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
3281 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
3282 initialization of __libc_locking_needed.
3283 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
3284 __libc_locking_needed, use multiple_threads field in TCB.
3285 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3286
22f20674
UD
32872002-12-12 Ulrich Drepper <drepper@redhat.com>
3288
2ad2e1e7
UD
3289 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
3290 version.
3291 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
3292
22f20674
UD
3293 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
3294 access to __libc_locking_needed for PIC.
3295
aa80bf86
UD
32962002-12-12 Jakub Jelinek <jakub@redhat.com>
3297
3298 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
3299 declare for libc.so.
3300 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
3301 expression.
3302 (__libc_lock_lock): Put into statement expression.
3303 (__libc_lock_unlock): Remove trailing semicolon.
3304 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
3305
24021373
RM
33062002-12-12 Roland McGrath <roland@redhat.com>
3307
3308 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
3309 "m" constraint to refer to __libc_locking_needed. Declare it here.
3310
14e7aece
UD
33112002-12-12 Ulrich Drepper <drepper@redhat.com>
3312
3313 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
3314 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
3315 Initialize __libc_locking_needed.
3316 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
3317 instead of __register_pthread_fork_handler.
3318 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
3319 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
3320 fork-gen with libc_pthread_init.
3321 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
3322 of __register_pthread_fork_handler.
3323 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
3324 of __register_pthread_fork_handler.
3325 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
3326 __libc_locking_needed to determine whether lock prefix can be avoided.
3327 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3328
85631c8e
UD
33292002-12-11 Ulrich Drepper <drepper@redhat.com>
3330
da63009e
UD
3331 * Makefile (tests): Add tst-cleanup1.
3332 * tst-cleanup1.c: New file.
3333 * cancellation.c (__cleanup_thread): Removed.
3334 (__do_cancel): Remove call to __cleanup_thread.
3335 * pthreadP.h: Remove __cleanup_thread prorotype.
3336
000160a2
UD
3337 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
3338 Remember function and argument even if cancellation handler
3339 function is not available.
3340 (__libc_cleanup_region_end): Execute registered function directly if
3341 pthread functions are not available.
3342 (__libc_cleanup_end): Likewise.
3343
85631c8e
UD
3344 * init.c (__pthread_initialize_minimal): Fix initialization in
3345 static lib by preventing gcc from being too clever.
3346
dce8f2b6
UD
33472002-12-10 Ulrich Drepper <drepper@redhat.com>
3348
34a075be
UD
3349 * init.c (__pthread_initialize_minimal): Remove unneccesary
3350 sigaddset call.
3351
dce8f2b6
UD
3352 * Makefile (tests): We can run tst-locale2 now.
3353
e5e45b53
UD
33542002-12-09 Ulrich Drepper <drepper@redhat.com>
3355
3356 * Versions: Remove duplicated sigwait entry.
3357
bdb04f92
UD
33582002-12-08 Ulrich Drepper <drepper@redhat.com>
3359
1e506629
UD
3360 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
3361 inside libpthread.
3362
a3957dd5
UD
3363 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
3364
bdb04f92
UD
3365 * pthreadP.h: Declare __pthread_enable_asynccancel and
3366 __pthread_disable_asynccancel.
3367 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
3368 (CANCEL_RESET): Use __pthread_disable_asynccancel.
3369 * cancellation.c (__pthread_enable_asynccancel): New function.
3370 (__pthread_disable_asynccancel): New function.
3371 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
3372 * pt-close.c: Likewise.
3373 * pt-connect.c: Likewise.
3374 * pt-creat.c: Likewise.
3375 * pt-fcntl.c: Likewise.
3376 * pt-fsync.c: Likewise.
3377 * pt-lseek.c: Likewise.
3378 * pt-lseek64.c: Likewise.
3379 * pt-msgrcv.c: Likewise.
3380 * pt-msgsnd.c: Likewise.
3381 * pt-msync.c: Likewise.
3382 * pt-nanosleep.c: Likewise.
3383 * pt-open.c: Likewise.
3384 * pt-open64.c: Likewise.
3385 * pt-pause.c: Likewise.
3386 * pt-poll.c: Likewise.
3387 * pt-pread.c: Likewise.
3388 * pt-pread64.c: Likewise.
3389 * pt-pselect.c: Likewise.
3390 * pt-pwrite.c: Likewise.
3391 * pt-pwrite64.c: Likewise.
3392 * pt-read.c: Likewise.
3393 * pt-readv.c: Likewise.
3394 * pt-recv.c: Likewise.
3395 * pt-recvfrom.c: Likewise.
3396 * pt-recvmsg.c: Likewise.
3397 * pt-select.c: Likewise.
3398 * pt-send.c: Likewise.
3399 * pt-sendmsg.c: Likewise.
3400 * pt-sendto.c: Likewise.
3401 * pt-sigpause.c: Likewise.
3402 * pt-sigsuspend.c: Likewise.
3403 * pt-sigtimedwait.c: Likewise.
3404 * pt-sigwait.c: Likewise.
3405 * pt-sigwaitinfo.c: Likewise.
3406 * pt-system.c: Likewise.
3407 * pt-tcdrain.c: Likewise.
3408 * pt-wait.c: Likewise.
3409 * pt-waitid.c: Likewise.
3410 * pt-waitpid.c: Likewise.
3411 * pt-write.c: Likewise.
3412 * pt-writev.c: Likewise.
a3957dd5
UD
3413 * pthread_join.c: Likewise.
3414 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
3415
3416 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
3417 (__xpg_sigpause): New function.
3418 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
3419
6ccb3834
UD
34202002-12-07 Ulrich Drepper <drepper@redhat.com>
3421
09efc3ba
UD
3422 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
3423
3424 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
3425 _GI_pthread_cleanup_pop to pthreadP.h.
3426
3427 * ftrylockfile.c: Use _IO_lock_trylock instead of
3428 pthread_mutex_trylock.
3429
3430 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
3431 (CANCEL_RESET): Likewise.
3432 (__pthread_setcanceltype_): Declare.
3433 (__pthread_mutex_lock_internal): Declare.
3434 (__pthread_mutex_unlock_internal): Declare.
3435 (__pthread_once_internal): Declare.
3436 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
3437 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
3438
3439 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
3440 and pthread_mutex_unlock.
3441 * pthread_cond_wait.c: Likewise.
3442 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
3443 * pthread_mutex_unlock.c: Likewise.
3444
3445 * pthread_setcanceltype.c: Add additional alias
3446 __pthread_setcanceltype.
3447
3448 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
3449 * sem_open.c (sem_open): Likewise.
3450 Use __libc_open, __libc_write, and __libc_close instead of
3451 open, write, and close respectively.
3452
3453 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
3454 Rewrite as statement expression since it must return a value.
3455
3456 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
3457 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
3458 __pthread_kill.
3459
3460 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
3461 alias __pthread_once_internal.
3462
6ccb3834
UD
3463 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
3464
d3c9f895
UD
34652002-12-06 Ulrich Drepper <drepper@redhat.com>
3466
4614167a
UD
3467 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
3468 * tst-stdio1.c: New file.
3469 * tst-stdio2.c: New file.
3470
a4548cea
UD
3471 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
3472
d3c9f895
UD
3473 * Makefile (tests): Comment out tst-locale2 for now.
3474 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
3475
3476 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
3477 -D_IO_MTSAFE_IO.
3478 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
3479 Use _IO_lock_init instead of explicit assignment.
3480
3481 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
3482 Define __libc_lock_* and __libc_lock_recursive macros with
3483 lowlevellock macros, not pthread mutexes.
3484
3485 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
3486 of pthread_mutex_lock.
3487 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
3488 instead of pthread_mutex_unlock.
3489
fde89ad0
RM
34902002-12-06 Roland McGrath <roland@redhat.com>
3491
3492 * allocatestack.c (__stack_user): Use uninitialized defn.
3493 * init.c (__pthread_initialize_minimal): Initialize it here.
3494
11767d47
RM
34952002-12-05 Roland McGrath <roland@redhat.com>
3496
fde89ad0
RM
3497 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
3498 string.
3499 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
3500
11767d47
RM
3501 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
3502 missing & here too.
3503
440d8bc2
UD
35042002-12-05 Ulrich Drepper <drepper@redhat.com>
3505
3506 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
3507 lowlevellock.
3508 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
3509 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
3510 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
3511 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
3512 for __libc_lock_* macros.
3513 * Makefile (routines): Add libc-lowlevellock.
3514
35152002-10-09 Roland McGrath <roland@redhat.com>
3516
3517 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
3518 Under [__PIC__], call the function via the pointer fetched for
3519 comparison rather than a call by name that uses the PLT.
3520 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
3521 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
3522 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
3523 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
3524 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
3525
d5ed0118
RM
35262002-12-04 Roland McGrath <roland@redhat.com>
3527
3528 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
3529
3530 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
3531 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
3532
3533 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
3534
eaa4099f
UD
35352002-12-04 Ulrich Drepper <drepper@redhat.com>
3536
3537 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
3538 a completely opaque, non-integer type.
3539 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3540
33b5d0cc
UD
35412002-12-05 Jakub Jelinek <jakub@redhat.com>
3542
3543 * sysdeps/i386/tls.h: Include stdlib.h.
3544 * sysdeps/x86_64/tls.h: Likewise.
3545
7a5cdb30
UD
35462002-12-04 Ulrich Drepper <drepper@redhat.com>
3547
c4a6d859
UD
3548 * Makefile (tests): Add tst-locale2.
3549 (tests-static): Likewise.
3550 * tst-locale2.c: New file.
3551
7a5cdb30
UD
3552 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
3553 volatile and add memory clobbers to lock operations.
3554
d82d5d12
UD
35552002-12-03 Ulrich Drepper <drepper@redhat.com>
3556
69cae3cf
UD
3557 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
3558 * sysdeps/i386/i486/bits/atomic.h: New file.
3559 * sysdeps/i386/i586/bits/atomic.h: New file.
3560 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
3561 include i486 version.
3562 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
3563 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 3564 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 3565
e4044c01
UD
3566 * allocatestack.c (get_cached_stack): Don't crash if we first
3567 found a stack with a larger size then needed.
3568 Reported by Hui Huang <hui.huang@sun.com>.
3569
d82d5d12
UD
3570 * Makefile (tests): Add tst-sysconf.
3571 * tst-sysconf.c: New file.
3572
3573 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
3574 PTHREAD_THREADS_MAX.
3575
fa9a4ff0
RM
35762002-12-02 Roland McGrath <roland@redhat.com>
3577
3578 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
3579 Declare using hidden_proto instead of attribute_hidden, so there are
3580 non-.hidden static symbols for gdb to find.
3581 (__pthread_keys): Likewise.
3582 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
3583 * allocatestack.c (__stack_user): Likewise.
3584 * pthread_create.c (__pthread_keys): Likewise.
3585 (__nptl_threads_events, __nptl_last_event): Make these static instead
3586 of hidden.
3587 * pthread_key_create.c (__pthread_pthread_keys_max,
3588 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
3589
91949a33
UD
35902002-12-02 Ulrich Drepper <drepper@redhat.com>
3591
c22b52fa
UD
3592 * Makefile (tests): Add tst-locale1. If buid-static is yes link
3593 statically.
3594 * tst-locale1.c: New file.
3595
beb6aa41
UD
3596 * pthread_cond_timedwait.c: Include <stdlib.h>.
3597
91949a33
UD
3598 * Makefile (tests): Add tst-fork2 and tst-fork3.
3599 * tst-fork2.c: New file.
3600 * tst-fork3.c: New file.
3601
654dff90
UD
36022002-11-28 Ulrich Drepper <drepper@redhat.com>
3603
cb0e76b4
UD
3604 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
3605
3606 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
3607 require it to 200112L.
3608
3609 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
3610 instruction only if HAVE_CMOV is defined.
3611 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
3612
975aa229
UD
3613 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
3614
654dff90
UD
3615 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
3616
3617 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
3618
3619 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
3620
a3931336
UD
36212002-11-27 Ulrich Drepper <drepper@redhat.com>
3622
c10c099c
UD
3623 * sysdeps/x86_64/bits/atomic.h: New file.
3624
3625 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
3626 16-bit operations.
3627
dca99d27
UD
3628 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
3629 possible since gettid cannot fail.
3630
f78deea6
UD
3631 * sysdeps/x86_64/pthreaddef.h: New file.
3632
3633 * sysdeps/i386/pthreaddef.h (gettid): Removed.
3634
3635 * sysdeps/x86_64/pthread_spin_init.c: New file.
3636 * sysdeps/x86_64/pthread_spin_lock.c: New file.
3637 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
3638 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
3639
3640 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
3641 Add missing lock prefix. Minute optimization.
3642
3643 * tst-spin2.c (main): Also check successful trylock call.
3644
3645 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
3646 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
3647
3648 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
3649 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
3650
3651 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
3652 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
3653 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
3654
3655 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
3656 value in case of an error.
3657
a3931336
UD
3658 * sysdeps/x86_64/tls.h: New file.
3659
76a50749
UD
36602002-11-26 Ulrich Drepper <drepper@redhat.com>
3661
117c452c
UD
3662 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
3663 takes the array member name and the index as parameters.
3664 (THREAD_SETMEM_NC): Likewise.
3665 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
3666 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
3667 interfaces.
3668
3669 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
3670 to decide which code to use.
3671 (THREAD_SETMEM_NC): Likewise.
3672
76a50749
UD
3673 * allocatestack.c (queue_stack): Don't remove stack from list here.
3674 Do it in the caller. Correct condition to prematurely terminate
3675 loop to free stacks.
3676 (__deallocate_stack): Remove stack from list here.
3677
36782002-11-26 Ulrich Drepper <drepper@redhat.com>
3679
3680 * Makefile (tests): Add tst-stack1.
3681 * tst-stack1.c: New file.
3682
3683 * allocatestack.c (allocate_stack): Initialize the TCB on a user
3684 provided stack.
3685
3686 * pthread_attr_getstack.c: Return bottom of the thread area.
3687
36882002-11-25 Ulrich Drepper <drepper@redhat.com>
3689
3690 * Makefile (libpthread-routines): Add pt-allocrtsig and
3691 pthread_kill_other_threads.
3692 * pt-allocrtsig.c: New file.
3693 * pthread_kill_other_threads.c: New file.
3694 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
3695 all three functions.
3696 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
3697 allocrtsig.
3698 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
3699 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
3700 and __libc_allocate_rtsig_private.
3701 * Versions (libpthread): Export pthread_kill_other_threads_np,
3702 __libc_current_sigrtmin, and __libc_current_sigrtmax.
3703
37042002-11-24 Ulrich Drepper <drepper@redhat.com>
3705
3706 * allocatestack.c (allocate_stack): stackaddr in attribute points to
3707 the end of the stack. Adjust computations.
3708 When mprotect call fails dequeue stack and free it.
3709 * pthread_attr_setstack.c: Store top of the stack in stackaddr
3710 attribute.
3711 * pthread_getattr_np.c: Likewise.
3712
3713 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
3714 surprises.
3715
37162002-11-23 Ulrich Drepper <drepper@redhat.com>
3717
3718 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
3719 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
3720
37212002-11-22 Ulrich Drepper <drepper@redhat.com>
3722
3723 * pthread_getspecific.c: Optimize access to first 2nd-level array.
3724 * pthread_setspecific.c: Likewise.
3725
37262002-11-21 Ulrich Drepper <drepper@redhat.com>
3727
3728 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
3729 definitions. Get them from the official place.
3730 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
3731
3732 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
3733 Use new CLONE_ flags in clone() calls.
3734
3735 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
3736 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
3737
3738 * Versions: Add pthread_* functions for libc.
3739 * forward.c: New file.
3740
3741 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
3742 errno-loc.
3743 * herrno.c: New file.
3744 * res.c: New file.
3745
3746 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
3747 sem_trywait, and sem_timedwait. Add herrno and res.
3748 * sem_init.c: Don't initialize lock and waiters members.
3749 * sem_open.c: Likewise.
3750 * sem_post.c: Removed.
3751 * sem_wait.c: Removed.
3752 * sem_trywait.c: Removed.
3753 * sem_timedwait.c: Removed.
3754 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
3755 Includes full implementations of sem_post, sem_wait, sem_trywait,
3756 and sem_timedwait.
3757 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
3758 for new implementation.
3759 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
3760 and waiters fields.
3761
3762 * tst-sem3.c: Improve error message.
3763 * tst-signal3.c: Likewise.
3764
3765 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
3766 to tell the kernel about the termination futex and to initialize tid
3767 member. Don't initialize main_thread.
3768 * descr.h (struct pthread): Remove main_thread member.
3769 * cancelllation.c (__do_cancel): Remove code handling main thread.
3770 The main thread is not special anymore.
3771
3772 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
3773 size of the stacks to stack_cache_actsize.
3774
3775 * pt-readv.c: Add missing "defined".
3776 * pt-sigwait.c: Likewise.
3777 * pt-writev.c: Likewise.
3778
37792002-11-09 Ulrich Drepper <drepper@redhat.com>
3780
3781 * Versions: Export __connect from libpthread.
3782 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3783
3784 * Makefile (libpthread-routines): Add pt-raise.
3785 * sysdeps/unix/sysv/linux/raise.c: New file.
3786 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
3787 * sysdeps/generic/pt-raise.c: New file.
3788
3789 * pthread_cond_init.c: Initialize all data elements of the condvar
3790 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
3791
3792 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
3793 * pthread_create.c: Likewise.
3794
3795 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
3796 * tst-key1.c: New file.
3797 * tst-key2.c: New file.
3798 * tst-key3.c: New file.
3799
3800 * Versions: Export pthread_detach for version GLIBC_2.0.
3801 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
3802
38032002-11-08 Ulrich Drepper <drepper@redhat.com>
3804
3805 * pthread_key_create.c: Terminate search after an unused key was found.
3806 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3807
3808 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
3809 Patch by Luca Barbieri <ldb@ldb.ods.org>.
3810
38112002-10-10 Ulrich Drepper <drepper@redhat.com>
3812
3813 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
3814 dynamic lookup for errno in PIC.
3815
3816 * allocatestack.c (get_cached_stack): Rearrange code slightly to
3817 release the stack lock as soon as possible.
3818 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
3819 the static TLS block.
3820 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
3821
3822 * cancellation.c: Renamed from cancelation.c.
3823 * Makefile: Adjust accordingly.
3824 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
3825 * cleanup_defer.c: Use CANCELLATION_P.
3826 * pthread_testcancel.c: Likewise.
3827 * descr.h: Fix spelling in comments.
3828 * init.c: Likewise.
3829 * pthread_getattr_np.c: Likewise.
3830 * pthread_getschedparam.c: Likewise.
3831 * pthread_setschedparam.c: Likewise.
3832 * Versions: Likewise.
3833
3834 * pt-pselect.c: New file.
3835 * Makefile (libpthread-routines): Add pt-pselect.
3836 * Versions: Add pselect.
3837
3838 * tst-cancel4.c: New file.
3839 * Makefile (tests): Add tst-cancel4.
3840
38412002-10-09 Ulrich Drepper <drepper@redhat.com>
3842
3843 * pthread_mutex_lock.c: Always record lock ownership.
3844 * pthread_mutex_timedlock.c: Likewise.
3845 * pthread_mutex_trylock.c: Likewise.
3846
3847 * pt-readv.c: New file.
3848 * pt-writev.c: New file.
3849 * pt-creat.c: New file.
3850 * pt-msgrcv.c: New file.
3851 * pt-msgsnd.c: New file.
3852 * pt-poll.c: New file.
3853 * pt-select.c: New file.
3854 * pt-sigpause.c: New file.
3855 * pt-sigsuspend.c: New file.
3856 * pt-sigwait.c: New file.
3857 * pt-sigwaitinfo.c: New file.
3858 * pt-waitid.c: New file.
3859 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
3860 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
3861 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
3862 * Versions: Add all the new functions.
3863
3864 * tst-exit1.c: New file.
3865 * Makefile (tests): Add tst-exit1.
3866
3867 * sem_timedwait.c: Minor optimization for more optimal fastpath.
3868
38692002-10-08 Ulrich Drepper <drepper@redhat.com>
3870
3871 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
3872
3873 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
3874 call. pthread_join is an official cancellation point.
3875 * pthread_timedjoin.c: Likewise.
3876
3877 * pthread_cond_wait.c: Revert order in which internal lock are dropped
3878 and the condvar's mutex are retrieved.
3879 * pthread_cond_timedwait.c: Likewise.
3880 Reported by dice@saros.East.Sun.COM.
3881
38822002-10-07 Ulrich Drepper <drepper@redhat.com>
3883
3884 * pthreadP.h: Cut out all type definitions and move them...
3885 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
3886 * pthreadP.h: Include <internaltypes.h>.
3887
3888 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
3889 performance tweaks.
3890
3891 * sem_trywait.c: Shuffle #includes around to get right order.
3892 * sem_timedwait.c: Likewise.
3893 * sem_post.c: Likewise.
3894 * sem_wait.c: Likewise.
3895
3896 * nptl 0.3 released.
3897
3898 * Makefile (tests): Add tst-signal3.
3899 * tst-signal3.c: New file.
3900
39012002-10-05 Ulrich Drepper <drepper@redhat.com>
3902
3903 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
3904 the asms modify the sem object.
3905 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
3906
3907 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
3908 the actual members.
3909 * pthreadP.h (struct sem): New type. Actual semaphore type.
3910 * semaphoreP.h: Include pthreadP.h.
3911 * sem_getvalue.c: Adjust to sem_t change.
3912 * sem_init.c: Likewise.
3913 * sem_open.c: Likewise.
3914 * sem_post.c: Likewise.
3915 * sem_timedwait.c: Likewise.
3916 * sem_trywait.c: Likewise.
3917 * sem_wait.c: Likewise.
3918
39192002-10-04 Ulrich Drepper <drepper@redhat.com>
3920
3921 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
3922 * tst-basic2.c: New file.
3923 * tst-exec1.c: New file.
3924 * tst-exec2.c: New file.
3925 * tst-exec3.c: New file.
3926
3927 * tst-fork1.c: Remove extra */.
3928
3929 * nptl 0.2 released. The API for IA-32 is complete.
This page took 0.479238 seconds and 5 git commands to generate.