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