]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/ChangeLog
2003-03-25 Roland McGrath <roland@redhat.com>
[thirdparty/glibc.git] / nptl / ChangeLog
CommitLineData
09402f5b
UD
12003-03-25 Ulrich Drepper <drepper@redhat.com>
2
3 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
4 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
5 * sysdeps/ia64/pthreaddef.h: Likewise.
6 * sysdeps/powerpc/pthreaddef.h: Likewise.
7 * sysdeps/s390/pthreaddef.h: Likewise.
8 * sysdeps/sh/pthreaddef.h: Likewise.
9 * sysdeps/x86_64/pthreaddef.h: Likewise.
10 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
11 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
12 being changed.
13 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
14 SIGTIMER is not unblocked.
15 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
16 RT signal taken.
17 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
18 be send.
19 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
20 pass pointer through as ID.
21 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
22 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
23 * sysdeps/unix/sysv/linux/timer_create.c: New file.
24 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
25 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
26 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
27 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
28 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
29 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
30 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
31 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
32 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
33 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
34 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
35 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
36 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
37 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
38 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
39 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
40 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
41 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
42 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
43 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
44 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
45 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
46 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
47 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
48 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
49 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
50 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
51 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
52 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
53 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
54
55 * pthreadP.h: Remove FRAME_LEFT definition.
56 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
57 already left frame. Programs which have this problem are not POSIX
58 compliant.
59 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
60
5e826ab5
UD
612003-03-24 Ulrich Drepper <drepper@redhat.com>
62
63 * sysdeps/pthread/tst-timer.c: Check return values of the
64 functions we test.
65
b910f788
RM
662003-03-23 Roland McGrath <roland@redhat.com>
67
3045a1fe
RM
68 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
69 * tst-tls3mod.c: Likewise.
70 * tst-tls1.c: Likewise.
71 * tst-tls2.c: Likewise.
72
85047fe3
RM
73 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
74 undefined behavior.
75
b910f788
RM
76 * tst-join5.c (tf1, tf2): Add a cast.
77
78 * Makeconfig (includes): Append -I$(..)nptl to this variable.
79
80 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
81 Don't test anything.
82 * tst-cond4.c: Likewise.
83 * tst-cond6.c: Likewise.
84 * tst-flock2.c: Likewise.
85 * tst-mutex4.c: Likewise.
86 * tst-rwlock4.c: Likewise.
87 * tst-signal1.c: Likewise.
88 * tst-spin2.c: Likewise.
89 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
90
91 * tst-mutex4.c: Use test-skeleton.c.
92 * tst-spin2.c: Likewise.
93 * tst-sysconf.c: Likewise.
94 * tst-barrier2.c: Likewise.
95 * tst-cond4.c: Likewise.
96 * tst-cond6.c: Likewise.
97 * tst-rwlock4.c: Likewise.
98 * tst-unload.c: Likewise.
99 * tst-flock2.c (do_test): Use return instead of exit.
100
4baa087a
RM
1012003-03-22 Jakub Jelinek <jakub@redhat.com>
102
103 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
104
5a3ab2fc
UD
1052003-03-21 Ulrich Drepper <drepper@redhat.com>
106
9f07eae2
UD
107 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
108 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
109 instead of __lll_compare_and_swap.
110 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
111 Likewise.
112 Removed definition if __lll_compare_and_swap.
113
5a3ab2fc
UD
114 * cancellation.c: Adjust for new form of compare&exchange macros.
115 * cleanup_defer.c: Likewise.
116 * init.c: Likewise.
117 * libc-cancellation.c: Likewise.
118 * old_pthread_cond_broadcast.c: Likewise.
119 * old_pthread_cond_signal.c: Likewise.
120 * old_pthread_cond_timedwait.c: Likewise.
121 * old_pthread_cond_wait.c: Likewise.
122 * pthread_cancel.c: Likewise.
123 * pthread_create.c: Likewise.
124 * pthread_detach.c: Likewise.
125 * pthread_join.c: Likewise.
126 * pthread_key_delete.c: Likewise.
127 * pthread_setcancelstate.c: Likewise.
128 * pthread_setcanceltype.c: Likewise.
129 * pthread_timedjoin.c: Likewise.
130 * pthread_tryjoin.c: Likewise.
131 * sysdeps/pthread/createthread.c: Likewise.
132
b1aea098
UD
1332003-03-20 Ulrich Drepper <drepper@redhat.com>
134
135 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
4baa087a 136 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
b1aea098
UD
137 definitions. Replace uses with calls to atomic_* functions.
138 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
139 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
140 __lll_test_and_set calls with atomic_exchange_and_add and
141 atomic_exchange calls respectively.
142 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
143 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
144 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
145 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
146 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
147 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
148 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
149
150 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
151 returns the old value.
152
100a7100
RM
1532003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
154
155 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
156 int for variable OLDVAL and correct inline assembler contraint.
157 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
158 type int for variable OLD.
159
160 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
161 only for s390-32.
162 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
163 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
164 instead of multiple_threads field in the TCB.
165
95767b36
UD
1662003-03-19 Ulrich Drepper <drepper@redhat.com>
167
4009bf40
UD
168 * sysdeps/i386/i686/bits/atomic.h: Removed.
169 * sysdeps/i386/i586/bits/atomic.h: Removed.
170 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
171 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
172 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
173 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
174 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
175 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
176 * atomic.h: Removed. Moved to glibc.
177
560a784f
UD
178 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
179 support for clock selection.
180
95767b36
UD
181 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
182 signalling waiters.
183
043ad426
RM
1842003-03-18 Roland McGrath <roland@redhat.com>
185
94659495
RM
186 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
187 Add __lll_rel_instr first. Add memory clobber.
188 (lll_mutex_unlock): Use __lll_test_and_set.
189 From Paul Mackerras <paulus@samba.org>.
190
191 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
192 unconditionally.
193 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
194 (SINGLE_THREAD_P): Add `header.' prefix.
195 From Paul Mackerras <paulus@samba.org>.
196
043ad426
RM
197 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
198 pthread_timedjoin_np to ...
199 (libpthread: GLIBC_2.3.3): ... here.
200 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
201
202 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
203 Avoid shadowing VAL variable.
204
205 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
206 New macro.
207
86a9ee5e
UD
2082003-03-18 Ulrich Drepper <drepper@redhat.com>
209
ac9e0aa1
UD
210 * Makefile (tests): Add tst-cond11.
211 * tst-cond11.c: New file.
212
a14b373c
UD
213 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
214 struct passed to cleanup handler to eliminate one more
215 instruction.
216 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
217
24a49f38
UD
218 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
219 (pthrad_cond_t): Replace __unused field with __clock.
220
221 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
222 waken all waiters in cleanup handler.
223 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
224 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
225
86a9ee5e
UD
226 * pthread_condattr_getclock.c: New file.
227 * pthread_condattr_setclock.c: New file.
228 * sysdeps/pthread/pthread.h: Declare these new functions.
229 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
230 * Makefile (libpthread-routines): Add the new functions.
231 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
232 Renamed field to value. Document use of the bits.
233 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
234 change.
235 * pthread_condattr_setpshared.c: Likewise.
d5cb8389 236 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
86a9ee5e
UD
237 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
238 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
239 Add __clock field.
240 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
241 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
242 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
243 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
245 Implement clock selection.
246 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
247 * pthread-errnos.sym: Add ENOSYS.
248 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
249 _POSIX_CLOCK_SELECTION.
250 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
251
252 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
253 invalid .size directive.
254
98054a05
RM
2552003-03-17 Roland McGrath <roland@redhat.com>
256
257 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
258 Formatting tweaks.
259
001bea71
UD
2602003-03-17 Ulrich Drepper <drepper@redhat.com>
261
4773086e
UD
262 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
263 Use __lll_add instead of spelling it out. Use protected symbol names.
264 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
265 Use __lll_add.
266 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
267 Renamed from lll_compare_and_swap. Use new name where necessary.
268 (__lll_add): Defined.
269 (__lll_dec_if_positive): Defined.
270 (__lll_test_and_set): Defined.
271 * sysdeps/ia64/pthread_spin_init.c: Removed.
272 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
273 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
274 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
275 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
276 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
277 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
278 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
001bea71
UD
279 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
280 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
281 __sync_lock_release_si.
282 Patch by Jakub Jelinek.
283
284 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
285 Fix timeout handling.
286 (__lll_timedwait_tid): Likewise.
287 (lll_unlock_wake_cb): Wake up other waiters if necessary.
288 Patch by Jakub Jelinek.
289
290 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
291
de4471dd
RM
2922003-03-17 Roland McGrath <roland@redhat.com>
293
294 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
295 * sysdeps/pthread/pthread_spin_init.c: New file.
296 * sysdeps/pthread/pthread_spin_unlock.c: New file.
297 * sysdeps/powerpc/Makefile: New file.
298 * sysdeps/powerpc/pthread_spin_lock.c: New file.
299 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
300 * sysdeps/powerpc/pthreaddef.h: New file.
301 * sysdeps/powerpc/tcb-offsets.sym: New file.
302 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
303 * sysdeps/powerpc/tls.h: New file.
304 * sysdeps/powerpc/bits/atomic.h: New file.
305 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
306 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
307 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
98054a05 308
de4471dd
RM
309 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
310 * sysdeps/unix/sysv/linux/sem_post.c: New file.
311 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
312 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
313 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
314 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
315 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
316 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
317 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
318 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
319 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
320 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
321 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
322 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
323 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
324
325 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
326 not gettimeofday.
327 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
328 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
329 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
330 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
331 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
332
5778033f
UD
3332003-03-17 Ulrich Drepper <drepper@redhat.com>
334
335 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
336 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
337 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
338 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
339 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
340
796038f8
RM
3412003-03-16 Roland McGrath <roland@redhat.com>
342
343 * tst-fork4.c: Include <string.h>.
344 * tst-signal2.c: Likewise.
345 * tst-mutex5.c (do_test): exit -> return.
346 * tst-mutex2.c: Include <stdlib.h>.
347
51d0678c
UD
3482003-03-16 Ulrich Drepper <drepper@redhat.com>
349
5778033f
UD
350 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
351 (__lll_mutex_timedlock_wait): Correct expected value after
352 spurious wakeup. Otherwise we would never wait again.
353
b6e2f87a
UD
354 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
355 zone versus inline asm stupidity. Use correct instructions.
356
51d0678c
UD
357 * tst-rwlock6.c: Add some more status output.
358
8112cc70
RM
3592003-03-15 Roland McGrath <roland@redhat.com>
360
361 * sysdeps/pthread/configure.in: New file.
362 * sysdeps/pthread/configure: New file (generated).
363
49773c19
UD
3642003-03-15 Ulrich Drepper <drepper@redhat.com>
365
366 * allocatestack.c (allocate_stack): Store the exact stack size of
367 user allocated stacks.
368
eec0ca9f
JJ
3692003-03-15 Jakub Jelinek <jakub@redhat.com>
370
371 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
372 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
373 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
374 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
375 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
376 Use `header.' prefix.
377 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
378
a87731e2
UD
3792003-03-15 Ulrich Drepper <drepper@redhat.com>
380
381 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
382 __builtin_frame_address, use stack pointer.
383
384 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
385 instead of __builtin_frame_pointer.
386
e22a221d
UD
3872003-03-14 Ulrich Drepper <drepper@redhat.com>
388
92ed3daf
UD
389 * tst-basic1.c (do_test): Add cast to avoid warning.
390 * tst-basic2.c (do_test): Likewise.
391
9b89567d
UD
392 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
393 amount of stack correction.
394
e22a221d
UD
395 * tst-fork4.c: Use test-skeleton.c.
396
2e49caba
RM
3972003-03-14 Roland McGrath <roland@redhat.com>
398
399 * init.c: Fix typo "#eli" for "#else".
400
415ef7d8
RM
4012003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
402
403 * allocatestack.c (__stack_user): Use hidden_data_def.
404 * pthread_create.c (__pthread_keys): Likewise.
405
406 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
407
52287505
RM
4082003-03-14 Roland McGrath <roland@redhat.com>
409
415ef7d8
RM
410 * tst-fork4.c: New file.
411 * Makefile (tests): Add it.
412
52287505
RM
413 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
414 we always define the padding space.
415 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
416 stopped supporting its own extensions fully.
417 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
418 struct also called `header', so `header.multiple_threads' is the field
419 name to use on all machines.
420 * allocatestack.c (allocate_stack): Use `header.' prefix.
421 * sysdeps/pthread/createthread.c (create_thread): Likewise.
422 * pthread_create.c (__pthread_create_2_1): Likewise.
423 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
424 (THREAD_SELF): Likewise.
425 * sysdeps/x86_64/tls.h: Likewise.
426 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
427 (SINGLE_THREAD_P): Likewise.
428 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
429 (SINGLE_THREAD_P): Likewise.
430 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
431 (SINGLE_THREAD_P): Likewise.
432
433 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
434 value directly.
435
c44bf9aa
UD
4362003-03-14 Ulrich Drepper <drepper@redhat.com>
437
e22a221d
UD
438 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
439 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
440
0eb18281
UD
441 * pthread_create.c (start_thread): setjmp is expected to return 0.
442
c44bf9aa
UD
443 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
444 (THREAD_GETMEM_NC): Likewise.
445
564cd8b6
UD
4462003-03-13 Ulrich Drepper <drepper@redhat.com>
447
448 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
449 and the size of the stack which must be allocated is a multiple,
450 allocate one more page.
451 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
452 MULTI_PAGE_ALIASING.
453
6461e577
RM
4542003-03-13 Roland McGrath <roland@redhat.com>
455
456 * pthread_create.c (start_thread): Set EXITING_BIT after the
457 event-reporting (and destructors), not before.
458
b5ec5617
UD
4592003-03-13 Jakub Jelinek <jakub@redhat.com>
460
6461e577
RM
461 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
462 lll_futex_wake): Declare register variables as long int instead of
463 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
464 Make syscall arguments clobbered by the syscall.
465 (lll_futex_wait): Define using lll_futex_timed_wait.
466
467 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
468 to void *.
469
470 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
471 PPID if [! NDEBUG].
472
473 * allocatestack.c (nptl_ncreated): Only declare if
474 COLORING_INCREMENT != 0.
475
476 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
477 (__libc_enable_asynccancel_2): Remove prototype.
478
b5ec5617
UD
479 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
480 ctid to match kernel.
481
d0369fb8
UD
4822003-03-12 Ulrich Drepper <drepper@redhat.com>
483
7588880f
UD
484 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
485 libc_multiple_threads.
486 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
487 __libc_multiple_threads to...
488 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
489
490 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
491 versioning.
492 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
493 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
494
495 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
496 (__pthread_once_internal): Define.
497
498 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
499 macros instead of .symver directly.
500 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
501 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
502
d0369fb8
UD
503 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
504 * sysdeps/x86_64/tcb-offsets.sym: New file.
505 * sysdeps/x86_64/Makefile: New file.
506
507 * sysdeps/i386/tcb-offsets.sym: Add SELF.
508 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
509 to access own pthread_t in TCB.
510 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
511 Likewise.
512 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
513 Likewise.
514 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
515
0bb2ac85
RM
5162003-03-12 Roland McGrath <roland@redhat.com>
517
518 * pthread-errnos.sym: New file.
519 * Makefile (gen-as-const-headers): New variable, list that file.
520 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
521 header <pthread-errnos.h> instead of defining errno values here.
522 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
523 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
524 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
525 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
526 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
527 Likewise.
528 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
529 Likewise.
530 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
532 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
533 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
534 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
535 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
536 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
537 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
538 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
539 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
540 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
541 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
542 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
543 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
544 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
545 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
546 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
547 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
548 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
549 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
550 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
551 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
552 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
553 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
554 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
555 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
556 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
557
558 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
559 CLONE_CHILD_SETTID worked.
560
35e148cb
UD
5612003-03-12 Ulrich Drepper <drepper@redhat.com>
562
d0369fb8
UD
563 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
564 file.
565 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
566 file.
567
568 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
569 (pthread_cond_t): Add padding.
570
da49194d
UD
571 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
572 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
573 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
574
35e148cb
UD
575 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
576 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
577 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
578 (__pthread_rwlock_timedrdlock): Likewise.
579 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
580 (__pthread_rwlock_wrlock): Likewise.
581 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
582 (__pthread_rwlock_rdlock): Likewise.
583
584 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
585
586 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
587 result of lock re-get if it fails.
588
3e976b96
UD
5892003-03-11 Ulrich Drepper <drepper@redhat.com>
590
5a03acfe
UD
591 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
592 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
593 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
594 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
596 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
597 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
598 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
599 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
600 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
601
602 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
603 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
604
605 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
606 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
607 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
608 (create_thread): Likewise.
609 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
610 * init.c (__pthread_initialize_minimal_internal): Initialize
611 __libc_multiple_threads_ptr if necessary.
612 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
613 __pthread_multiple_threads and __libc_multiple_threads_ptr.
614 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
615 __libc_multiple_threads.
616 (__libc_pthread_init): Return pointer to __libc_pthread_init if
617 necessary.
618
619 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
620 (THREAD_SETMEM_NC): Likewise.
621
622 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
623 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
624 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
625 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
626
627 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
628 Eliminate one entire instruction.
629
32a589b1
UD
630 * cancellation.c (__pthread_enable_asynccancel_2): New function.
631 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
632 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
633 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
634 instead of __pthread_enable_asynccancel.
635 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
636 (__pthread_cond_wait): Likewise.
637 * sysdeps/pthread/pthread_cond_timedwait.c
638 (__pthread_cond_timedwait): Likewise.
639 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
640
3e976b96
UD
641 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
642 (__condvar_cleanup): Wake up all waiters in case we got signaled
643 after being woken up but before disabling asynchronous
644 cancellation.
645 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
646 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
647 (__condvar_cleanup): Likewise.
648
649 * init.c (__NR_set_tid_address): If already defined, don't redefine.
650 Make it an error if architecture has no #if case. Add x86-64.
651
652 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
653 pt-initfini.s generation.
654
655 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
656 (TLS_INIT_TP): Fix typo.
657
6c477888
UD
6582003-03-11 Jakub Jelinek <jakub@redhat.com>
659
660 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
661 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
662
663 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
664 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
665 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
666 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
667 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
668 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
669 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
670 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
671
ea694823
UD
6722003-03-11 Ulrich Drepper <drepper@redhat.com>
673
6c477888
UD
674 * sysdeps/pthread/pthread_cond_timedwait.c
675 (__pthread_cond_timedwait): Return the result of the final
676 locking. If it succeeds, the regular function return value.
677
678 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
679 Return result of the final locking.
680 * version.c (__nptl_main): Work around problems with the strange
681 INTERNAL_SYSCALL macro on ppc32.
682 * init.c (__pthread_initialize_minimal_internal): Unblock
683 SIGCANCEL in case the parent blocked it.
684 Reported by Paul Mackerras <paulus@samba.org>.
685
ea694823
UD
686 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
687 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
688 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
689
b33e6163
RM
6902003-03-11 Jakub Jelinek <jakub@redhat.com>
691
692 * sysdeps/pthread/pthread_cond_timedwait.c
693 (__pthread_cond_timedwait): Unlock and fail if
694 __pthread_mutex_unlock_internal failed.
695
696 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
697 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
698 Use ARCH_CLONE.
699 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
700 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
701 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
702 ALLOCATE_STACK): New macros.
703 (TLS_TPADJ): New macro.
704 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
705 (allocate_stack): Handle TLS_DTV_AT_TP and
706 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
707 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
708 Don't set PD->self.
709 * init.c [__ia64__] (__NR_set_tid_address): Define.
710
711 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
712 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
713 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
714 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
715 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
716 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
717 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
718 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
719 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
720 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
721 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
722 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
723 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
724 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
725 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
726 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
727 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
728 * sysdeps/ia64/bits/atomic.h: New file.
729 * sysdeps/ia64/Makefile: New file.
730 * sysdeps/ia64/pthread_spin_init.c: New file.
731 * sysdeps/ia64/pthread_spin_lock.c: New file.
732 * sysdeps/ia64/pthread_spin_trylock.c: New file.
733 * sysdeps/ia64/pthread_spin_unlock.c: New file.
734 * sysdeps/ia64/pthreaddef.h: New file.
735 * sysdeps/ia64/tcb-offsets.sym: New file.
736 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
737 * sysdeps/ia64/tls.h: New file.
738
739 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
740 to syscall instead of no arguments.
741
2b30b2e5
UD
7422003-03-10 Ulrich Drepper <drepper@redhat.com>
743
db5f2fc9
UD
744 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
745 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
746 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
747 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
748
749 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
750 unused code.
751
6a4263e3
UD
752 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
753
3de7c2a9
UD
754 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
755 lowlevelbarrier.sym.
756 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
757 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
758 Include lowlevelbarrier.h and don't define offsets locally.
6a4263e3 759 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3de7c2a9 760
2a544d82
UD
761 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
762 (__lll_mutex_lock_wait): Reverse order of first two parameters.
763 (__lll_mutex_timedlock_wait): Likewise.
764 (lll_mutex_lock): Adjust asm for that.
765 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
766 (lll_lock): Adjust asm for operand order change.
767 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
768 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
769
ec06436c
UD
770 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
771 Reverse order of parameters.
772 (__lll_timedwait_tid): Remove regparms attribute.
773 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
774 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
775
3273832c
UD
776 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
777 (__lll_timedwait_tid): Remove one unnecessary instruction.
778
51f32ab8
UD
779 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
780 __lll_mutex_timedlock_wait only for NOT_IN_libc.
781 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
782 lowlevelmutex.S.
783
784 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
785 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
786 for NOT_IN_libc.
787 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
788 lowlevellock.S.
789
fad48d9e
UD
790 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
791 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
792 for libc.so.
793 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
794 define LOCK here (if UP is not defined). The actual code is in
795 lowlevelmutex.S.
796
9356d063
UD
797 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
798 LOCK is already defined. Don't define lll_unlock_wake_cb and
799 __lll_timedwait_tid for libc.so.
800 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
801 define LOCK here (if UP is not defined). The actual code is in
802 lowlevellock.S.
803
ebf0cbc5 804 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
106f6f9d
UD
805 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
806 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
807 instead of lowlevelsem.h.
808 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
809 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
810 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
0be8ee21 811
c915e5ad
UD
812 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
813 lowlevelrwlock.sym.
814 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
815 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
146fa1ee 816 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
c915e5ad 817
4c3c2e8a
UD
818 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
819 register loading.
820 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
821 last changed. D'oh.
822
2b30b2e5
UD
823 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
824
825 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
826 of __libc_locking_needed.
827 (lll_trylock): Initialize %eax to zero.
828
2b30b2e5
UD
829 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
830 pthread_cond_t definition.
831
e48f9638
RM
8322003-03-10 Roland McGrath <roland@redhat.com>
833
834 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
835 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
836 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
837 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
838 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
839
840 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
841 Instead of setting PD->multiple_threads, set globals
842 __pthread_multiple_threads and __libc_multiple_threads.
843 * sysdeps/pthread/createthread.c (create_thread): Likewise.
844 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
845 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
846
847 * descr.h (struct pthread): Conditionalize first member on
848 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
849 containing an anonymous tcbhead_t. Move `list' member out.
850 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
851 * allocatestack.c: Remove use of `header.data.' prefix.
852 * pthread_create.c: Likewise.
853 * init.c (__pthread_initialize_minimal_internal): Likewise.
854 * sysdeps/pthread/createthread.c (create_thread): Likewise.
855 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
856 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
857 * sysdeps/x86_64/tls.h: Likewise.
858 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
859 (SINGLE_THREAD_P): Likewise.
860 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
861 (SINGLE_THREAD_P): Likewise.
862 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
863 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
864
c37cae9e
UD
8652003-03-09 Ulrich Drepper <drepper@redhat.com>
866
d38c777e
RM
867 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
868
7b44a5e0 869 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2b30b2e5 870 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
7b44a5e0 871
c2e5e085
UD
872 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
873 leftovers from the ia32 code.
874
875 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
876 memory load.
877 (clear_once_control): Don't load %esi.
878
879 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
880 handling.
881
882 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
883
cd4b2a55
UD
884 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
885 * sysdeps/unix/sysv/linux/createthread.c: ...here.
886
c37cae9e
UD
887 * Makefile (tests): Add tst-cond10.
888 * tst-cond10.c: New file.
889
d130a341
UD
8902003-03-08 Ulrich Drepper <drepper@redhat.com>
891
ccf1d573
UD
892 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
893 * tst-signal3.c (do_test): Likewise.
894 * tst-sem5.c (do_test): Likewise.
895 * tst-kill6.c (do_test): Likewise.
896 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
897
898 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
899 of inc/dec.
900 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
901 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
902 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
903 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
904 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
905 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
906 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
907 Likewise.
908 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
909 Likewise.
910 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
911 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
912 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
914 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
915 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
916 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
917 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
918
d130a341
UD
919 * allocatestack.c (allocate_stack): If mprotect() fails free the
920 TLS memory.
921
bc6389ad
UD
9222003-03-07 Ulrich Drepper <drepper@redhat.com>
923
41d4d223
UD
924 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
925
926 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
927 lll_wake_tid. This was used only to work around kernel limits in
928 the early days.
929 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
930 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
931 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
932 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
933
bc6389ad
UD
934 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
935 (__pthread_initialize_minimal_internal): Change initialization of
936 __static_tls_align_m1 appropriately.
937 * pthreadP.h (__static_tls_align_m1): Renamed from
938 __static_tls_align.
939 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
940 instead of __static_tls_align-1.
941
cc775edf
UD
9422003-03-04 Ulrich Drepper <drepper@redhat.com>
943
0de28d5c 944 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
6245b6ae 945
518b5308
UD
946 * pthread_create.c: Define __pthread_keys using nocommon
947 attribute, not by placing it explicitly in bss.
948 Remove DEFINE_DEALLOC definition. Not needed anymore.
949
950 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
951 Use it in mmap call to allocate stacks.
952
953 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
954
cc775edf
UD
955 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
956 result of the thread function.
957
4f6f0a8f
UD
9582003-03-03 Ulrich Drepper <drepper@redhat.com>
959
f04a2721
UD
960 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
961 version is just fine.
962
4f6f0a8f
UD
963 * sysdeps/unix/sysv/linux/libc_pthread_init.c
964 (__pthread_child_handler): Renamed from pthread_child_handler,
965 exported, and marked hidden. Change all users.
966 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
967 free __pthread_child_handler from child list.
968
7ce5c164
UD
9692003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
970
971 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
972
973 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
974 Fix handling of cancellation and failing pthread_mutex_unlock call.
975 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
976 (__pthread_cond_wait): Likewise.
977
978 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
979 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
980 lll_futex_timed_wait call.
981 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
982 (pthread_rwlock_timedwrlock): Likewise.
983
984 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
985 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
986 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
987
988 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
989 check of lll_futex_wake return value.
990
ea6a015b
RM
9912003-03-03 Roland McGrath <roland@redhat.com>
992
993 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
994
995 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
996 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
997 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
998
4adacf57
UD
9992003-03-02 Ulrich Drepper <drepper@redhat.com>
1000
1be3d664
UD
1001 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1002 error for CPU clocks.
1003
885bafa1
UD
1004 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1005 _POSIX_MONOTONIC_CLOCK.
1006 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1007
4adacf57
UD
1008 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1009 recent kernels.
1010
86bfff4d
UD
10112003-03-01 Ulrich Drepper <drepper@redhat.com>
1012
1013 * descr.h (struct pthread): Move cleanup field to the front.
1014
d1149385
RM
10152003-03-01 Roland McGrath <roland@redhat.com>
1016
1017 * sem_open.c (sem_open): Braino fix.
1018
bd8bb78b
UD
10192003-03-01 Ulrich Drepper <drepper@redhat.com>
1020
748bec08
UD
1021 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
1022 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
1023 __pthread_cleanup_pop functionality.
1024 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1025
bd8bb78b
UD
1026 * descr.h (struct pthread): Move tid field to the front now that
1027 it is often used.
1028
1029 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
1030 (__lll_mutex_timedlock_wait): Remove.
1031 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1032 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1033 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1034 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1035 (lll_unlock_wake_cb): Don't save and restore %esi.
1036 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1037 %esi.
1038 (__lll_timedwait_tid): Add alignment.
1039 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
1040 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1041 %esi.
1042 (__lll_timedwait_tid): Removed.
1043 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1044 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
1045 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
1046 (pthread_barrier_wait): Don't save, load, and restore %esi for
1047 last thread.
1048 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1049 (__pthread_cond_signal): Don't save, load, and restore %esi.
1050 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1051 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
1052 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1053 Don't save, load, and restore %esi.
1054
d2637c70
UD
10552003-02-27 Ulrich Drepper <drepper@redhat.com>
1056
567fb22a
UD
1057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1058 Release lock before waking up the waiters.
1059
427f5fa1
UD
1060 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
1061
a2d83cfb
UD
1062 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
1063 (reader_thread): Likewise.
1064
d2637c70
UD
1065 * sysdeps/pthread/pthread_rwlock_unlock.c
1066 (__pthread_rwlock_unlock): Release internal lock early. Don't try
1067 to wake up readers if there are none.
1068
1069 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1070 Release internal lock before wake threads.
1071
b1531183
UD
10722003-02-26 Ulrich Drepper <drepper@redhat.com>
1073
dbf6131c
UD
1074 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
1075 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
1076 predefined.
1077 * tst-rwlock9.c: Likewise.
1078 * tst-rwlock10.c: New file.
1079 * tst-rwlock11.c: New file.
1080
695799fe
UD
1081 * Makefile (tests): Add tst-dlsym1.
1082 * tst-dlsym1.c: New file.
1083
b1531183
UD
1084 * init.c (__pthread_initialize_minimal_internal): Set
1085 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
1086 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
1087
3724f268
UD
10882003-02-24 Ulrich Drepper <drepper@redhat.com>
1089
3857ca78
UD
1090 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
1091
80d80779
UD
1092 * tst-cond2.c: Fix sychronization with child.
1093
86371308
UD
1094 * tst-rwlock8.c (reader_thread): Remove unused variable.
1095
ffeb4481
UD
1096 * Makefile: Add rules to build and run tst-tls3.
1097 * tst-tls3.c: New file.
1098 * tst-tls3mod.c: New file.
1099
3724f268
UD
1100 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
1101 * tst-rwlock8.c: New file.
1102 * tst-rwlock9.c: New file.
1103 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
1104 complete broken rwlock implementation.
1105 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1106 Likewise.
1107 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1108 Likewise.
1109 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1110 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
18a53579
UD
1111 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
1112 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1113 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1114 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
1115 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3724f268 1116
8915cc40
RM
11172003-02-23 Roland McGrath <roland@redhat.com>
1118
1119 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
1120
fd1a0d0c
UD
11212003-02-23 Ulrich Drepper <drepper@redhat.com>
1122
ecf28959
UD
1123 * Makefile (tests): Add tst-context1.
1124 * tst-context1.c: New file.
1125
5e47b76b
UD
1126 * Makefile (tests): Add tst-tls1 and tst-tls2.
1127 * tst-tls1.c: New file.
1128 * tst-tls2.c: New file.
1129
5a6bbb41
UD
1130 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
1131 for failed cmpxchg.
1132
fd1a0d0c
UD
1133 * pthread_create.c (start_thread): Set EXITING_BIT early.
1134
1135 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
1136 (THREAD_GETMEM_NC): Likewise.
1137
757f9fcb
UD
11382003-02-22 Ulrich Drepper <drepper@redhat.com>
1139
b1b8e747
UD
1140 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
1141 off 3 more bytes by using offset-less instructions when possible.
1142
c780aa21 1143 * Makefile: Add dependency for $(objpfx)version.d.
757f9fcb
UD
1144
1145 * eintr.c (eintr_source): Add unnecessary return but the compiler
1146 insists.
1147
1148 * tst-kill3.c: Include <unistd.h>.
1149
5148559c
RM
11502003-02-21 Roland McGrath <roland@redhat.com>
1151
1152 * pthread_create.c (start_thread): Call __libc_thread_freeres.
1153
ab2d98e3
UD
11542003-02-21 Ulrich Drepper <drepper@redhat.com>
1155
71028edd
UD
1156 * Makefile (tests): Add tst-eintr1.
1157 (distribute): Add eintr.c.
1158 * tst-eintr1.c: New file.
1159 * eintr.c: New file.
1160
e814f748
UD
1161 * pthread_cancel.c (pthread_cancel): Use tkill directly.
1162
1163 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
1164 Disallow sending SIGCANCEL.
1165
ab2d98e3 1166 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
9c03686d 1167 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
e814f748
UD
1168 * tst-kill1.c: New file.
1169 * tst-kill2.c: New file.
1170 * tst-kill3.c: New file.
1171 * tst-kill5.c: New file.
9c03686d 1172 * tst-kill6.c: New file.
e814f748
UD
1173 * tst-basic7.c: Renamed to...
1174 * tst-kill4.c: ...this.
ab2d98e3 1175
59fed0e2
RM
11762003-02-21 Roland McGrath <roland@redhat.com>
1177
1178 * Makefile (install-lib-ldscripts): New variable.
1179
49dc759f
UD
11802003-02-21 Ulrich Drepper <drepper@redhat.com>
1181
8c2e9a29
UD
1182 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
1183 * pthread_cancel.c: Use INVALID_TD_P.
1184 * pthread_detach.c: Likewise.
1185 * pthread_getschedparam.c: Likewise.
1186 * pthread_setschedparam.c: Likewise.
1187 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
1188 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1189 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
1190 * pthread_timedjoin.c: Likewise.
1191
1192 * tst-basic7.c: Include <signal.h>.
1193
49dc759f
UD
1194 * pthread_join.c (pthread_join): Limited checking for invalid
1195 descriptors.
1196 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
1197
df5803bf
UD
11982003-02-20 Ulrich Drepper <drepper@redhat.com>
1199
c5acd3d7
UD
1200 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
1201 beginning of the loop. Clear the entire first block of TSD.
df5803bf
UD
1202 * Makefile (tests): Add tst-key4.
1203 * tst-key4.c: New file.
1204
729924a0
UD
12052003-02-18 Ulrich Drepper <drepper@redhat.com>
1206
2f7dc594
UD
1207 * Makefile (tests): Add tst-basic7.
1208 * tst-basic7.c: New file.
1209
ba25bb0f
UD
1210 * pthread_create.c (deallocate_tsd): Mark as internal_function.
1211 Add some more __builtin_expect.
1212
12fd3c5f 1213 * pthreadP.h: Define dummy version of DEBUGGING_P.
729924a0 1214
5430d926
UD
12152003-02-17 Ulrich Drepper <drepper@redhat.com>
1216
b0db7fbe
UD
1217 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
1218 _POSIX_THREAD_PRIORITY_SCHEDULING.
1219 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1220 _XOPEN_REALTIME_THREADS.
1221 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1222
1223 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
1224 kernel returns EINVAL for PID <= 0, work around it.
1225
ecfda9bd
UD
1226 * Makefile (tests): Add tst-signal5.
1227 * tst-signal5.c: New file.
1228
7d78ab99
UD
1229 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1230 and LOGIN_NAME_MAX.
1231
371a2972
UD
1232 * tst-cancel1.c (tf): Block all signals.
1233
5430d926
UD
1234 * Makefile (tests): Add tst-basic6.
1235 * tst-basic6.c: New file.
1236
1237 * tst-basic1.c: Add test for process ID.
1238
1239 * Makefile (tests): Add tst-cancel10.
1240 * tst-cancel10.c: New file.
1241
1242 * Makefile (tests): Add tst-signal4.
1243 * tst-signal4.c: New file.
1244
1245 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
1246 __sigismember instead of sigismember. Add __builtin_expect.
1247
1564916a
UD
12482003-02-16 Ulrich Drepper <drepper@redhat.com>
1249
179ff175
UD
1250 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
1251 pthread_setcancelstate, and pthread_rwlock_setpshared.
1252
e4335f9a
UD
1253 * tst-cancel7.c (do_test): Make sure the pid file exists before
1254 canceling the thread.
1255
0a37669a
UD
1256 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
1257 pthread_rwlock_timedrdlock tests.
1258 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
1259 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1260 Check for invalid tv_nsec field.
1261 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1262 Likewise.
1263
1264 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
1265 recursive mutex of overflow.
1266
1267 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
1268
e4335f9a 1269 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1564916a
UD
1270 going into an endless loop.
1271 * Makefile (tests): Add tst-cancel9.
1272 * tst-cancel9.c: New file.
1273
1274 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
1275
b270b548
UD
12762003-02-15 Ulrich Drepper <drepper@redhat.com>
1277
1c82b97f
UD
1278 * tst-mutex5.c (do_test): Add more timedlock tests.
1279
b2f05465 1280 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
c3bb9ee1
UD
1281 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
1282
e798b60f
UD
1283 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1284 use INLINE_SYSCALL. Error number is returned, not -1.
1285
90491dc4
UD
1286 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
1287 and __deallocate_stack with internal_function.
1288 * pthread_create.c: Adjust definitions appropriately.
1289 * allocatestack.c: Likewise.
1290
1291 * pthread_join.c: Add one more __builtin_expect.
1292 * pthread_timedjoin.c: Likewise.
1293
1294 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
1295 not data of sequence number does not match.
1296 Add one __builtin_expect.
1297
c6247c9d
UD
1298 * Makefile (tests): Add tst-clock1.
1299 * tst-clock1.c: New file.
1300
b270b548
UD
1301 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
1302 negative arguments.
1303 * Makefile (tests): Add tst-basic5.
1304 * tst-basic5.c: New file.
1305
700bf7af
UD
13062003-02-14 Ulrich Drepper <drepper@redhat.com>
1307
757de559
UD
1308 * Makefile (tests): Add tst-basic4.
1309 * tst-basic4.c: New file.
1310
47202270
UD
1311 * pthreadP.h: Add declaraction for __nptl_nthreads.
1312 * pthread_create.c: Define __nptl_nthreads
1313 (start_thread): Increment __nptl_nthreads at beginning. Decrement
b270b548 1314 after thread is done. If then zero, call exit(0).
47202270
UD
1315 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1316 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
1317 * init.c (pthread_functions): Initialize ptr_nthreads.
1318 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
1319 (__reclaim_stacks): Decrement __nptl_nthreads.
1320 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
1321 Define.
1322 * Makefile (tests): Add tst-basic3.
1323 * tst-basic3.c: New file.
1324
e320ef46
UD
1325 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
1326 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
1327 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
1328 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
1329 if asynchronous canceling is enabled.
1330 * pthread_join.c (pthread_join): When recognizing circular joins,
1331 take into account the other thread might be already canceled.
1332 * Makefile (tests): Add tst-join5.
1333 * tst-join5.c: New file.
1334
700bf7af
UD
1335 * Makefile (tests): Add tst-join4.
1336 * tst-join4.c: New file.
1337
13382003-02-13 Ulrich Drepper <drepper@redhat.com>
1339
1340 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
1341
dac0f772
UD
13422003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1343
1344 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
1345 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
1346 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
1347 warning.
1348 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
1349 to avoid warning.
1350 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
1351 error if lll_futex_wake failed.
1352
e8cda341
UD
13532003-02-13 Ulrich Drepper <drepper@redhat.com>
1354
a7720b5e
UD
1355 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
1356 handling of cancellation and failung pthread_mutex_unlock call.
1357 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1358 * Makefile (tests): Add tst-cond8 and tst-cond9.
1359 * tst-cond8.c: New file.
1360 * tst-cond9.c: New file.
1361
a1ea4c06
UD
1362 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
1363
1364 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
1365 non-standard initializers with __USE_GNU.
1366
e8cda341
UD
1367 * Makefile (tests): Add tst-cleanup3.
1368 * tst-cleanup3.c: New file.
1369
2067577c
UD
13702003-02-12 Ulrich Drepper <drepper@redhat.com>
1371
89e78a95
UD
1372 * Makefile (tests): Add tst-attr1 and tst-attr2.
1373 * tst-attr1.c: New file.
1374 * tst-attr2.c: New file.
1375
dfdd294a
UD
1376 * Makefile: Add rules to build and run tst-atfork2 test.
1377 * tst-atfork2.c: New file.
1378 * tst-atfork2mod.c: New file.
1379
1380 * sysdeps/unix/sysv/linux/unregister-atfork.c
1381 (__unregister_atfork): Free the memory allocated for the handlers
1382 after removing them from the lists.
1383
1384 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
1385 cleanup function.
1386
1387 * tst-atfork1.c (do_test): Wait for the child we forked.
1388 Report error in child.
1389
1390 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
1391
2067577c
UD
1392 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1393
2a8a8a84
UD
13942003-02-10 Ulrich Drepper <drepper@redhat.com>
1395
d9dd121e
UD
1396 * Makefile (tests): Add tst-cancel8.
1397 * tst-cancel8.c: New file.
1398
2a8a8a84
UD
1399 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
1400 clearing of control variable.
defd1870 1401 * Makefile (tests): Add tst-once3 and tst-once4.
2a8a8a84 1402 * tst-once3.c: New file.
defd1870 1403 * tst-once4.c: New file.
2a8a8a84 1404
a54e8d33
UD
14052003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1406
1407 * sysdeps/sh/Makefile: New file.
1408 * sysdeps/sh/bits/atomic.h: New file.
1409 * sysdeps/sh/pthread_spin_init.c: New file.
1410 * sysdeps/sh/pthread_spin_lock.c: New file.
1411 * sysdeps/sh/pthread_spin_trylock.S: New file.
1412 * sysdeps/sh/pthread_spin_unlock.S: New file.
1413 * sysdeps/sh/pthreaddef.h: New file.
1414 * sysdeps/sh/tcb-offsets.sym: New file.
1415 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
1416 * sysdeps/sh/tls.h: New file.
1417 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
1418 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
1419 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
1420 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
1421 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
1422 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
1423 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
1424 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
1425 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
1426 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
1427 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
1428 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
1429 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1430 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
1431 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
1432 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
1433 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
1434 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
1435 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
1436 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
1437 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
1438 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
1439 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
1440 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
1441 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
1442 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
1443 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
1444 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
1445 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
1446 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1447
696e556e
UD
14482003-02-08 Ulrich Drepper <drepper@redhat.com>
1449
1450 * tst-cond2.c: Rearrange code to not rely on behavior undefined
1451 according to POSIX.
1452
1453 * tst-basic2.c (do_test): Lock mutex before creating the thread.
1454
fef710d6
UD
14552003-02-07 Ulrich Drepper <drepper@redhat.com>
1456
c6180643
UD
1457 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
1458 (TLS_GET_FS): New #define.
1459 (TLS_SET_FS): New #define.
1460 Correct value of __NR_set_thread_area.
1461
fef710d6
UD
1462 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
1463
11090a99
UD
14642003-02-06 Ulrich Drepper <drepper@redhat.com>
1465
65c68990
UD
1466 * Makefile (tests): Add tst-popen1.
1467 * tst-popen1.c: New file.
1468
11090a99
UD
1469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
1470 but inactive generalization.
1471 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1472 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1473 Minor optimization, remove one instruction.
1474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1475
a88c9263
UD
14762003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
1477
1478 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
1479
14802003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
1481
1482 * init.c (__NR_set_tid_address): Add #ifdef for s390.
1483 * sysdeps/pthread/pthread_barrier_wait.c: New file.
1484 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
1485 * sysdeps/pthread/pthread_cond_signal.c: New file.
1486 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
1487 * sysdeps/pthread/pthread_cond_wait.c: New file.
1488 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
1489 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
1490 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
1491 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
1492 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
1493 * sysdeps/s390/Makefile: New file.
1494 * sysdeps/s390/bits/atomic.h: New file.
1495 * sysdeps/s390/pthread_spin_init.c: New file.
1496 * sysdeps/s390/pthread_spin_lock.c: New file.
1497 * sysdeps/s390/pthread_spin_trylock.c: New file.
1498 * sysdeps/s390/pthread_spin_unlock.c: New file.
1499 * sysdeps/s390/pthreaddef.h: New file.
1500 * sysdeps/s390/tcb-offsets.sym: New file.
1501 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
1502 * sysdeps/s390/tls.h: New file.
1503 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
1504 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
1505 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
1506 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
1507 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
1508 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
1509 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
1510 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
1511 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
1512 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
1513 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
1514 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
1515 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
1516 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
1517 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
1518 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1519 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1520 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
1521 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1522 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
1523 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
1524 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
1525 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
1526
6f1cff95
UD
15272003-02-04 Ulrich Drepper <drepper@redhat.com>
1528
ec609a8e
UD
1529 * atomic.h: Add a couple more default implementations.
1530 (atomic_compare_and_exchange_acq): Use
d45e8740
UD
1531 __arch_compare_and_exchange_32_acq in return value definition. It
1532 always exists.
1533 (atomic_bit_set): Renamed from atomic_set_bit.
0289bef9 1534 Add missing atomic_ prefixes.
e3ec8904 1535
6f1cff95
UD
1536 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
1537 thread library is available, use correct value to mark initialized
1538 once variable.
1539
4f088329
UD
15402003-02-03 Ulrich Drepper <drepper@redhat.com>
1541
6f1cff95
UD
1542 * allocatestack.c (allocate_stack): Use __getpagesize instead of
1543 __sysconf to determine pagesize.
1544
3e4fc359 1545 * pthread_create.c: Include <atomic.h>.
4f088329
UD
1546 * allocatestack.c (allocate_stack): Implement coloring of the
1547 allocated stack memory. Rename pagesize to pagesize_m1. It's the
1548 size minus one. Adjust users.
3e4fc359 1549 * sysdeps/i386/i686/Makefile: New file.
4f088329 1550
2f42e8be
UD
15512003-02-02 Ulrich Drepper <drepper@redhat.com>
1552
4301f7e2
UD
1553 * allocatestack.c: Improve comment throughout the file.
1554
2f42e8be 1555 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
a37818b3 1556 (__lll_lock_wait): Add branch prediction.
2f42e8be
UD
1557 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
1558 (__lll_lock_wait): Likewise.
1559 (lll_unlock_wake_cb): Removed.
1560
4a7d6545
UD
15612003-01-31 Ulrich Drepper <drepper@redhat.com>
1562
1563 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
1564 _POSIX_THREAD_PRIORITY_SCHEDULING.
1565
886d5973
UD
15662003-01-30 Jakub Jelinek <jakub@redhat.com>
1567
1568 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1569 Fix return type of ptr___pthread_getspecific.
1570
e474ca78
UD
15712003-01-29 Ulrich Drepper <drepper@redhat.com>
1572
1573 * Makefile (tests): Add tst-umask1.
1574 (tst-umask1-ARGS): Define.
1575 * tst-umask1.c: New file.
1576
e6ebd2e4
UD
15772003-01-28 Ulrich Drepper <drepper@redhat.com>
1578
6cf26f41
UD
1579 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
1580 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
1581 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
1582 pthread_rwlock_unlock.
1583 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
1584 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
1585 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
1586 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
1587 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1588 New file.
1589 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
1590 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1591 New file.
1592 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
1593 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
1594 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
1595 New file.
1596 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
1597 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
1598 New file.
1599 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
1600 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
1601 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
1602 New file.
1603 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
1604 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
1605 New file.
1606 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
1607
1d087a7e
UD
1608 * Makefile (libpthread-routines): Remove lowlevelcond and
1609 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
1610 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
1611 and pthread_cond_broadcast.
4a99d160
UD
1612 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
1613 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
1614 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
1615 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
1616 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
1617 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
1618 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
1619 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
1620 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
1621 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
1622 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
1623 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
1624 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
1625 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
1626 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
1627 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
1628 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
1629 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
1630 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
1631 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
1632 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
1633 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
1634 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
1635 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
1636 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
1637 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
1638 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
1639 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
1640 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
1641 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
1642 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1d087a7e 1643
e6ebd2e4
UD
1644 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
1645 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
1646 of the code is moved to ...
1647 * sysdeps/pthread/createthread.c: ...here. New file.
1648
a15698cb
UD
16492003-01-27 Ulrich Drepper <drepper@redhat.com>
1650
0566b130
UD
1651 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
1652 (__new_sem_post): Clear %eax before returning.
1653 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
1654
e6fb8846
UD
1655 * Makefile (tests): Add tst-cleanup2.
1656 * tst-cleanup2.c: New file.
1657
a15698cb
UD
1658 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
1659 Interpret first parameter correctly.
1660
8824b0a1
UD
16612003-01-17 Ulrich Drepper <drepper@redhat.com>
1662
1663 * Makefile (headers): Add bits/semaphore.h.
1664
850dcfca
UD
16652003-01-16 Jakub Jelinek <jakub@redhat.com>
1666
1667 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
1668 if not SHARED.
1669
574b892e
UD
16702003-01-14 Ulrich Drepper <drepper@redhat.com>
1671
a8d87c92
UD
1672 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
1673 must be used and mapping failed.
1674 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
1675
574b892e
UD
1676 * Makefile (CFLAGS-pthread_self.os): Define this, not
1677 CFLAGS-pthread_self.c.
1678
fb48047a
UD
16792003-01-13 Ulrich Drepper <drepper@redhat.com>
1680
47805511
UD
1681 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
1682 lll_unlock_wake_cb.
1683
fb48047a
UD
1684 * Makefile (libpthread-routines): Add version. Add rules to build
1685 version.os and banner.h.
1686 * version.c: New file.
1687
115bb61d
UD
16882003-01-13 Jakub Jelinek <jakub@redhat.com>
1689
1690 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
1691 the alias unconditional.
1692 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
1693
16942003-01-13 Ulrich Drepper <drepper@redhat.com>
1695
1696 * Makefile (CFLAGS-pthread_self.c): New definition.
1697
6aca81bb
UD
16982003-01-06 Jakub Jelinek <jakub@redhat.com>
1699
1700 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
1701 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1702 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
1703 * init.c (__pthread_initialize_minimal_internal): Likewise.
1704
e9c7764e
UD
17052003-01-07 Jakub Jelinek <jakub@redhat.com>
1706
b5facfda
UD
1707 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
1708
e9c7764e
UD
1709 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1710 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
1711 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
1712 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1713 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
1714 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
1715
bef1e42f
UD
17162003-01-06 Jakub Jelinek <jakub@redhat.com>
1717
1718 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
1719 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1720 * tst-cancel-wrappers.sh: Remove all exceptions.
1721
bbd17455
UD
17222003-01-05 Ulrich Drepper <drepper@redhat.com>
1723
a73ab6df
UD
1724 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1725 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1726
bbd17455
UD
1727 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
1728 Use __libc_pthread_functions array if SHARED.
1729
1730 * pthreadP.h: Move pthread_cond_2_0_t definition to...
1731 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
1732
1733 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
1734 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
1735 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
1736 __libc_ptf_call instead of __libc_maybe_call.
1737 (PTF): New #define.
1738 (__libc_cleanup_region_start): Wrap function name with PTF call.
1739 (__libc_cleanup_region_end): Likewise.
1740 (__libc_cleanup_end): Likewise.
1741
1742 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
1743 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
1744 * pthread_key_create.c: Add __pthread_key_create_internal alias.
1745 * pthreadP.h: Add prototypes.
1746
1747 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
1748 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
1749 __pthread_rwlock_unlock aliases.
1750 * pthreadP.h: Add prototypes for new aliases.
1751
1752 * pthreadP.h (struct pthead_functions): Moved to...
1753 * sysdeps/pthread/pthread-functions.h: ...here. New file.
1754 * init.c (pthread_functions): Add initializers for new elements.
1755
1756 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
1757 __pthread_cleanup_pop_restore aliases.
1758 * pthreadP.h: Add prototypes.
1759
1760 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
1761 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
1762 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
1763 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1764 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1765 * pthreadP.h: Adjust prototypes and callers.
1766
d27a78be
UD
17672003-01-04 Ulrich Drepper <drepper@redhat.com>
1768
b74121ae
UD
1769 * Makefile (tests): Add tst-cancel7.
1770 (tst-cancel7-ARGS): New variable.
bbd17455 1771 * tst-cancel7.c: New file.
b74121ae 1772
29bc410c
UD
1773 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
1774 around gcc defficiencies.
1775 * old_pthread_cond_signal.c: Likewise.
1776 * old_pthread_cond_timedwait.c: Likewise.
1777 * old_pthread_cond_wait.c: Likewise.
1778
d27a78be
UD
1779 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
1780
733f25e6
UD
17812003-01-03 Ulrich Drepper <drepper@redhat.com>
1782
7edb2ae3
UD
1783 * Makefile (tests): Add tst-cond7.
1784 * tst-cond7.c: New file.
1785
b1151300
UD
1786 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
1787 (condvar_cleanup): Get condvar address from the right place.
1788
733f25e6
UD
1789 * atomic.h: Correct definitions of atomic_full_barrier,
1790 atomic_read_barrier, atomic_write_barrier.
1791
1792 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
1793 race-free.
1794 * old_pthread_cond_signal.c: Likewise.
1795 * old_pthread_cond_timedwait.c: Likewise.
1796 * old_pthread_cond_wait.c: Likewise.
1797
686b7223
UD
17982003-01-03 Jakub Jelinek <jakub@redhat.com>
1799
1800 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1801
0e07706e
UD
18022003-01-03 Ulrich Drepper <drepper@redhat.com>
1803
997256dd
UD
1804 * pthreadP.h (pthread_cond_2_0_t): New type.
1805 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
1806 Use new type for the 2.0 condvar function prototypes.
1807 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
1808 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
1809 parameter.
1810 * old_pthread_cond_destroy.c: Likewise.
1811 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
1812 * old_pthread_cond_signal.c: Likewise.
1813 * old_pthread_cond_timedwait.c: Likewise.
1814 * old_pthread_cond_wait.c: Likewise.
1815
842d2817
UD
1816 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
1817 (__pthread_cond_wait): Don't save cancellation mode and seq value
1818 in same location.
1819
0e07706e
UD
1820 * herrno.c (__h_errno_location): Don't define as weak.
1821
bf293afe
UD
18222003-01-02 Jakub Jelinek <jakub@redhat.com>
1823
1824 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1825 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1826 and pthread_cond_wait.
1827 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
1828 Renamed to...
1829 (__pthread_cond_broadcast_2_0): ... this.
1830 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
1831 Renamed to...
1832 (__pthread_cond_destroy_2_0): ... this.
1833 * old_pthread_cond_init.c (__old_pthread_cond_init):
1834 Renamed to...
1835 (__pthread_cond_init_2_0): ... this.
1836 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
1837 Renamed to...
1838 (__pthread_cond_signal_2_0): ... this.
1839 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
1840 Renamed to...
1841 (__pthread_cond_wait_2_0): ... this.
1842 * pthread_cond_destroy.c: Include shlib-compat.h.
1843 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
1844 * pthread_cond_init.c: Include shlib-compat.h.
1845 (pthread_cond_init): Change strong_alias into versioned_symbol.
1846 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
1847 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
1848 fields.
1849 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
1850 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
1851 __pthread_cond_wait_2_0): New prototypes.
1852 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
1853 __old_pthread_cond_init, __old_pthread_cond_signal,
1854 __old_pthread_cond_wait): Removed.
1855 * init.c: Include shlib-compat.h.
1856 (pthread_functions): Guard ptr___pthread_attr_init_2_0
1857 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
1858 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
1859 ptr___pthread_cond_*_2_0 fields.
1860 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1861 pthread_cond_*@GLIBC_2.0 compatibility symbols.
1862
1863 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
1864 LIBC_SIGACTION was not yet defined.
1865 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
1866 [!defined LIBC_SIGACTION] (__sigaction): New function and
1867 libc_hidden_weak.
1868 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
1869 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
1870
18712003-01-02 Jakub Jelinek <jakub@redhat.com>
1872
1873 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1874
05df18c3
UD
18752003-01-02 Ulrich Drepper <drepper@redhat.com>
1876
1877 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1878 New, larger type definition.
1879 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
1880 implementation.
1881 * Versions [libpthread]: Add definitions for new pthread_cond_*
1882 interfaces for version GLIBC_2.3.2.
1883 * pthread_cond_init.c: Update initialization for new type definition.
1884 * Makefile (libpthread-routines): Remove pthread_cond_wait,
1885 pthread_cond_timedwait, pthread_cond_signal, and
1886 pthread_cond_broadcast. Add old_pthread_cond_init,
1887 old_pthread_cond_destroy, old_pthread_cond_wait,
1888 old_pthread_cond_timedwait, old_pthread_cond_signal, and
1889 old_pthread_cond_broadcast.
1890 * old_pthread_cond_broadcast.c: New file.
1891 * old_pthread_cond_destroy.c: New file.
1892 * old_pthread_cond_init.c: New file.
1893 * old_pthread_cond_signal.c: New file.
1894 * old_pthread_cond_timedwait.c: New file.
1895 * old_pthread_cond_wait.c: New file.
1896 * pthreadP.h: Add prototypes for the compatibility interfaces.
1897
1898 * pthread_cond_destroy.c: Don't include <errno.h>.
1899
fd8979e4
UD
19002003-01-01 Ulrich Drepper <drepper@redhat.com>
1901
1902 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
1903 unnecessary zero offset when addressing MUTEX.
1904
6d6ee629
UD
19052002-12-31 Ulrich Drepper <drepper@redhat.com>
1906
1907 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1908 __register_atfork.
1909 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1910 for __register_atfork.
1911
a4baf360
UD
19122002-12-31 Jakub Jelinek <jakub@redhat.com>
1913
1914 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
1915 instead of ASSEMBLER test macro.
1916
1917 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1918 __libc_current_sigrtmax): Add libc_hidden_def.
1919
1920 * sysdeps/pthread/list.h: Remove assert.h include.
1921
e9395a94
UD
19222002-12-31 Ulrich Drepper <drepper@redhat.com>
1923
1924 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
1925 __pthread_initialize_minimal_internal not
1926 __pthread_initialize_minimal.
1927
89d6e444
UD
19282002-12-30 Ulrich Drepper <drepper@redhat.com>
1929
416d2de6
UD
1930 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
1931 __pthread_initialize_minimal as hidden.
1932
89d6e444
UD
1933 * init.c (__pthread_initialize_minimal_internal): Don't mark as
1934 constructor.
1935
19362002-12-31 Jakub Jelinek <jakub@redhat.com>
1937
1938 * Makefile ($(inst_libdir)/libpthread.so): Depend on
1939 $(common-objpfx)format.lds, include that into the output script.
1940 Fix comment.
1941 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
1942
8cac677c
UD
19432002-12-28 Andreas Jaeger <aj@suse.de>
1944
1945 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
1946 nsec resolution changes.
1947 (xstat64_conv): Likewise.
1948 (xstat32_conv): Likewise.
1949 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
1950 struct kernel_stat.
1951 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
1952 structs stat and stat64.
1953 * time/time.h (__timespec_defined): Define for __USE_MISC.
89d6e444 1954 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
8cac677c 1955
49e9f864
UD
19562002-12-30 Jakub Jelinek <jakub@redhat.com>
1957
1958 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
1959 argument.
1960 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
1961 (pthread_exit): Use strong_alias to avoid warnings.
1962 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
1963 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1964 ptr___pthread_attr_init_2_*.
1965 * init.c (pthread_functions): Adjust.
1966
bab09b26
UD
19672002-12-29 Ulrich Drepper <drepper@redhat.com>
1968
598d7a42
UD
1969 * forward.c: Make all functions available by default again. It
1970 caused too much trouble.
1971
bab09b26
UD
1972 * pt-siglongjmp.c: Removed.
1973
3b7ed871
UD
19742002-12-28 Jakub Jelinek <jakub@redhat.com>
1975
1976 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1977 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
1978 * sysdeps/i386/Makefile: New file.
1979 * sysdeps/i386/tcb-offsets.sym: New file.
1980 * sysdeps/pthread/tcb-offsets.h: New file.
1981 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1982 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
1983
1984 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
1985 __register_atfork...
1986 (GLIBC_2.3.2): ...here.
1987
19882002-12-28 Ulrich Drepper <drepper@redhat.com>
1989
1990 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
1991 pthread_attr_setstackaddr with __attribute_deprecated__.
1992
270d9d47
UD
19932002-12-27 Jakub Jelinek <jakub@redhat.com>
1994
1995 * pt-system.c (system): Remove cancellation handling.
1996 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1997 cancellation routines.
1998
131fd126
UD
19992002-12-28 Ulrich Drepper <drepper@redhat.com>
2000
afb2e954
UD
2001 * descr.h: Include <dl-sysdep.h>.
2002 (struct pthread): Move header.data.list to the back of the struct.
131fd126
UD
2003 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
2004 (MULTIPLE_THREADS_OFFSET): Adjust offset.
2005 (SYSINFO_OFFSEET): Likewise.
2006
20072002-12-27 Jakub Jelinek <jakub@redhat.com>
2008
2009 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
2010 Define.
2011 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
2012 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
2013 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
2014 (USE_DL_SYSINFO): Undef.
2015
20162002-12-22 Jakub Jelinek <jakub@redhat.com>
2017
2018 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
2019 $(common-objpfx)libc.so.
2020 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
2021 it is bigger than pipe buffer size even on arches with bigger
2022 page size.
2023 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
2024
a218c9cf
UD
20252002-12-25 Ulrich Drepper <drepper@redhat.com>
2026
2027 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
2028 correct errno access for case that USE___THREAD is not defined.
2029
015a2dc9
UD
20302002-12-24 Ulrich Drepper <drepper@redhat.com>
2031
2032 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
2033 Patch by Marijn Ros <marijn@mad.scientist.com>.
2034
5220f9ac
RM
20352002-12-22 Roland McGrath <roland@redhat.com>
2036
2037 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2038
1561bf63
UD
20392002-12-20 Ulrich Drepper <drepper@redhat.com>
2040
2041 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
2042
3325198e
UD
20432002-12-19 Ulrich Drepper <drepper@redhat.com>
2044
057c823f
UD
2045 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
2046 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
2047 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
2048
097eca29
UD
2049 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
2050 of int $0x80.
2051 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2052 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
2053 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
2054 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2055 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2056 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
2057 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
2058 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2059
2060 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
2061 sysenter.
2062 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
2063
2064 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
2065
5f5843e3
UD
2066 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
2067 in new TCB.
2068 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
2069 that sysinfo is properly initialized.
2070 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
2071 to 1 only for ld.so.
2072
3325198e
UD
2073 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2074 RTLD_CORRECT_DYNAMIC_WEAK.
2075
74e8f2dc
UD
20762002-12-19 Jakub Jelinek <jakub@redhat.com>
2077
2078 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2079 Use return 0 as 6th argument to FORWARD4.
2080 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
2081
df45b31e
UD
20822002-12-18 Ulrich Drepper <drepper@redhat.com>
2083
2084 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
2085 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
2086 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
2087 (INIT_SYSINFO): New #define.
2088 (TLS_TP_INIT): Use INIT_SYSINFO.
2089 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2090 At test to make sure SYSINFO_OFFSET value is correct.
2091 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
2092
3d539579
UD
20932002-12-18 Jakub Jelinek <jakub@redhat.com>
2094
2095 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2096 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
2097 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
2098 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
2099 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
2100 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
2101 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
2102
d7913e0e
UD
21032002-12-18 Ulrich Drepper <drepper@redhat.com>
2104
f051627f
UD
2105 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
2106 macro instead of using int $0x80 directly.
2107
d7913e0e
UD
2108 * sysdeps/pthread/bits/stdio-lock.h: New file.
2109 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
2110 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
2111 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
2112 * Makefile (routines): Add libc-lowlevelmutex.
2113
2114 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
2115 __i686.get_pc_thunk.dx.
2116
f077a4a9
UD
21172002-12-17 Jakub Jelinek <jakub@redhat.com>
2118
2119 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
2120 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2121 ($(objpfx)tst-cancel-wrappers.out): New rule.
2122 * tst-cancel-wrappers.sh: New test.
2123 * tst-locale1.c: Include signal.h.
2124 (uselocale): Test static linking of __libc_current_sigrt*.
2125
21262002-12-17 Ulrich Drepper <drepper@redhat.com>
2127
2128 * Makefile (tests): Add tst-cancel6.
2129 * tst-cancel6.c: New file
2130
bd499a3b
UD
21312002-12-17 Jakub Jelinek <jakub@redhat.com>
2132
2133 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2134 Define meaningfully for assembler as well.
2135 * pthreadP.h (struct pthread_functions): Remove
2136 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
2137 and ptr_pthread_attr_init_2_1 fields.
2138 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
2139 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
2140 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
2141 (FORWARD3): Define using FORWARD4.
2142 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
2143 versions.
2144 * pt-system.c: Remove duplicate stdlib.h include.
2145
0a1063f4
UD
21462002-12-16 Ulrich Drepper <drepper@redhat.com>
2147
87d60668
UD
2148 * sem_init.c: Define sem_init@GLIBC_2.0.
2149 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
2150 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
2151
0a1063f4
UD
2152 * flockfile.c: Moved to...
2153 * sysdeps/pthread/flockfile.c: ...here. New file.
2154 * funlockfile.c: Moved to...
2155 * sysdeps/pthread/funlockfile.c: ...here. New file.
2156 * ftrylockfile.c: Moved to...
2157 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
2158
9634cf9d
UD
21592002-12-16 Jakub Jelinek <jakub@redhat.com>
2160
2161 * libc-cancellation.c: Guard both function with
2162 #if !defined NOT_IN_libc.
2163 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
2164 automatically provided pthread wrappers.
2165 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
2166 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
2167 nor in libpthread.
2168 * pt-open.c: Removed.
2169 * pt-fcntl.c: Removed.
2170 * pt-fsync.c: Removed.
2171 * pt-lseek.c: Removed.
2172 * pt-msgrcv.c: Removed.
2173 * pt-msgsnd.c: Removed.
2174 * pt-msync.c: Removed.
2175 * pt-nanosleep.c: Removed.
2176 * pt-open64.c: Removed.
2177 * pt-pause.c: Removed.
2178 * pt-pread.c: Removed.
2179 * pt-pread64.c: Removed.
2180 * pt-pwrite.c: Removed.
2181 * pt-pwrite64.c: Removed.
2182 * pt-read.c: Removed.
2183 * pt-recv.c: Removed.
2184 * pt-recvfrom.c: Removed.
2185 * pt-recvmsg.c: Removed.
2186 * pt-send.c: Removed.
2187 * pt-sendto.c: Removed.
2188 * pt-sigtimedwait.c: Removed.
2189 * pt-sigwait.c: Removed.
2190 * pt-wait.c: Removed.
2191 * pt-waitpid.c: Removed.
2192 * pt-write.c: Removed.
2193 * pt-accept.c: Removed.
2194 * pt-close.c: Removed.
2195 * pt-connect.c: Removed.
2196 * pt-lseek64.c: Removed.
2197 * pt-sendmsg.c: Removed.
2198 * pt-tcdrain.c: Removed.
2199
6ee8d334
UD
22002002-12-15 Ulrich Drepper <drepper@redhat.com>
2201
81fa9371
UD
2202 * init.c (__pthread_initialize_minimal_internal): Renamed from
2203 __pthread_initialize_minimal. Make old name an alias. This
2204 converts a normal relocation into a relative relocation.
2205
f3015aa5
UD
2206 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
2207
4cbc1950
UD
2208 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2209 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2210 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
2211 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
2212 pt-sigwaitinfo, pt-waitid, and pt-writev.
2213 * pt-creat.c: Removed.
2214 * pt-poll.c: Removed.
2215 * pt-pselect.c: Removed.
2216 * pt-readv.c: Removed.
2217 * pt-select.c: Removed.
2218 * pt-sigpause.c: Removed.
2219 * pt-sigsuspend.c: Removed.
2220 * pt-sigwaitinfo.c: Removed.
2221 * pt-waitid.c: Removed.
2222 * pt-writev.c: Removed.
2223
8454830b
UD
2224 * init.c (pthread_functions): New variable.
2225 (__pthread_initialize_minimal): Pass pointer to pthread_functions
2226 (or NULL) to __libc_pthread_init.
2227 * forward.c: Rewrite to use __libc:pthread_functions array to get
2228 function addresses.
2229 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
2230 prototype.
2231 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2232 Take new parameter. Copy content of variable pointed to by it
2233 to __libc_pthread_init.
2234
2235 * pthreadP.h (struct pthread_functions): New type.
2236 (__libc_pthread_init): Declare.
2237
2238 * pthread_attr_destroy.c: Add namespace protected alias.
2239 * pthread_attr_getdetachstate.c: Likewise.
2240 * pthread_attr_getinheritsched.c: Likewise.
2241 * pthread_attr_getschedparam.c: Likewise.
2242 * pthread_attr_getschedpolicy.c: Likewise.
2243 * pthread_attr_getscope.c: Likewise.
2244 * pthread_attr_setdetachstate.c: Likewise.
2245 * pthread_attr_setinheritsched.c: Likewise.
2246 * pthread_attr_setschedparam.c: Likewise.
2247 * pthread_attr_setschedpolicy.c: Likewise.
2248 * pthread_attr_setscope.c: Likewise.
2249 * pthread_cond_broadcast.c: Likewise.
2250 * pthread_cond_destroy.c: Likewise.
2251 * pthread_cond_init.c: Likewise.
2252 * pthread_cond_signal.c: Likewise.
2253 * pthread_cond_wait.c: Likewise.
2254 * pthread_condattr_destroy.c: Likewise.
2255 * pthread_condattr_init.c: Likewise.
2256 * pthread_equal.c: Likewise.
2257 * pthread_exit.c: Likewise.
2258 * pthread_getschedparam.c: Likewise.
2259 * pthread_self.c: Likewise.
2260 * pthread_setcancelstate.c: Likewise.
2261 * pthread_setschedparam.c: Likewise.
2262 * pthread_mutex_destroy.c: Likewise.
2263 * pthread_mutex_init.c: Likewise.
2264 * pthreadP.h: Add prototypes for the aliases.
2265
0d5f4929
UD
2266 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
2267 multiple_threads member in correct TCB to 1.
2268
6ee8d334
UD
2269 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
2270 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
2271 member of thread decriptor, otherwise return unconditionally 1.
2272
2fb6444d
UD
22732002-12-14 Ulrich Drepper <drepper@redhat.com>
2274
2275 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
2276 regular Linux version. Remove file.
2277 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
2278 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
2279 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
2280 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
2281 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
2282 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
2283 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
2284 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
2285 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
2286 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
2287 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
2288 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
2289 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
2290 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
2291 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
2292 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
2293 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
2294 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
2295 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
2296 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
2297 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
2298 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
2299 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
2300 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
2301 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
2302 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
2303 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
2304 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
2305 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
2306 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
2307
86b2dc40
UD
23082002-12-14 Jakub Jelinek <jakub@redhat.com>
2309
2310 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2311 * sysdeps/unix/sysv/linux/open.c: Removed.
2312 * sysdeps/unix/sysv/linux/fsync.c: Removed.
2313 * sysdeps/unix/sysv/linux/lseek.c: Removed.
2314 * sysdeps/unix/sysv/linux/msync.c: Removed.
2315 * sysdeps/unix/sysv/linux/read.c: Removed.
2316 * sysdeps/unix/sysv/linux/close.c: Removed.
2317 * sysdeps/unix/sysv/linux/creat.c: Removed.
2318 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
2319 * sysdeps/unix/sysv/linux/pause.c: Removed.
2320 * sysdeps/unix/sysv/linux/select.c: Removed.
2321 * sysdeps/unix/sysv/linux/write.c: Removed.
2322
9d263d72
UD
23232002-12-14 Ulrich Drepper <drepper@redhat.com>
2324
2325 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
2326 element in TCB to see whether locking is needed.
2327
2328 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
2329 MULTIPLE_THREADS_OFFSET value is correct.
2330
2331 * sysdeps/unix/sysv/linux/close.c: New file.
2332 * sysdeps/unix/sysv/linux/connect.S: New file.
2333 * sysdeps/unix/sysv/linux/creat.c: New file.
2334 * sysdeps/unix/sysv/linux/fsync.c: New file.
2335 * sysdeps/unix/sysv/linux/llseek.c: New file.
2336 * sysdeps/unix/sysv/linux/lseek.c: New file.
2337 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
2338 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
2339 * sysdeps/unix/sysv/linux/msync.c: New file.
2340 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
2341 * sysdeps/unix/sysv/linux/open.c: New file.
2342 * sysdeps/unix/sysv/linux/open64.c: New file.
2343 * sysdeps/unix/sysv/linux/pause.c: New file.
2344 * sysdeps/unix/sysv/linux/poll.c: New file.
2345 * sysdeps/unix/sysv/linux/pread.c: New file.
2346 * sysdeps/unix/sysv/linux/pread64.c: New file.
2347 * sysdeps/unix/sysv/linux/pselect.c: New file.
2348 * sysdeps/unix/sysv/linux/pwrite.c: New file.
2349 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
2350 * sysdeps/unix/sysv/linux/readv.c: New file.
2351 * sysdeps/unix/sysv/linux/recv.S: New file.
2352 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
2353 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
2354 * sysdeps/unix/sysv/linux/select.c: New file.
2355 * sysdeps/unix/sysv/linux/send.S: New file.
2356 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
2357 * sysdeps/unix/sysv/linux/sendto.S: New file.
2358 * sysdeps/unix/sysv/linux/sigpause.c: New file.
2359 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
2360 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
2361 * sysdeps/unix/sysv/linux/sigwait.c: New file.
2362 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
2363 * sysdeps/unix/sysv/linux/system.c: New file.
2364 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
2365 * sysdeps/unix/sysv/linux/wait.c: New file.
2366 * sysdeps/unix/sysv/linux/waitid.c: New file.
2367 * sysdeps/unix/sysv/linux/waitpid.c: New file.
2368 * sysdeps/unix/sysv/linux/writev.c: New file.
2369 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
2370
2371 * pt-readv.c: Fix comment.
2372
23732002-12-14 Jakub Jelinek <jakub@redhat.com>
2374
2375 * tst-cleanup1.c: Include stdlib.h.
2376
2377 * tst-cancel5.c: New test.
2378 * Makefile (tests): Add tst-cancel5.
2379 (tst-cancel5): Link against libc.so libpthread.so in that order.
2380
9ae0909b
UD
23812002-12-13 Ulrich Drepper <drepper@redhat.com>
2382
b7bdd9c4
UD
2383 * forward.c (test_loaded): Prevent recursive calls.
2384
9ae0909b
UD
2385 * Makefile (routines): Add libc-cancellation.
2386 * libc-cancellation.c: New file.
2387 * descr.h (struct pthread): Add multiple_threads field.
2388 * allocatestack.c (allocate_stack): Initialize multiple_header field of
2389 new thread descriptor to 1.
2390 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
2391 Initialize multiple_thread field after successful thread creation.
2392 * cancellation.c (__do_cancel): Move to pthreadP.h.
2393 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
2394 (__pthread_disable_asynccancel): Add internal_function attribute.
2395 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
2396 * pthread_setcancelstate.c: Likewise.
2397 * pthread_setcanceltype.c: Likewise.
2398 * pthread_exit.c: Likewise.
2399 * pthreadP.h (CANCELLATION_P): Likewise.
2400 (__do_cancel): Define as static inline.
2401 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
2402 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
2403 declarations.
2404 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
2405 fields. Define MULTIPLE_THREADS_OFFSET.
2406 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
2407 declaration.
2408 * sysdeps/unix/sysv/linux/accept.S: New file.
2409 * sysdeps/unix/sysv/linux/read.c: New file.
2410 * sysdeps/unix/sysv/linux/write.c: New file.
2411 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
2412 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
2413 initialization of __libc_locking_needed.
2414 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
2415 __libc_locking_needed, use multiple_threads field in TCB.
2416 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2417
22f20674
UD
24182002-12-12 Ulrich Drepper <drepper@redhat.com>
2419
2ad2e1e7
UD
2420 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
2421 version.
2422 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
2423
22f20674
UD
2424 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
2425 access to __libc_locking_needed for PIC.
2426
aa80bf86
UD
24272002-12-12 Jakub Jelinek <jakub@redhat.com>
2428
2429 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
2430 declare for libc.so.
2431 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
2432 expression.
2433 (__libc_lock_lock): Put into statement expression.
2434 (__libc_lock_unlock): Remove trailing semicolon.
2435 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
2436
24021373
RM
24372002-12-12 Roland McGrath <roland@redhat.com>
2438
2439 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
2440 "m" constraint to refer to __libc_locking_needed. Declare it here.
2441
14e7aece
UD
24422002-12-12 Ulrich Drepper <drepper@redhat.com>
2443
2444 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
2445 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
2446 Initialize __libc_locking_needed.
2447 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
2448 instead of __register_pthread_fork_handler.
2449 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
2450 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
2451 fork-gen with libc_pthread_init.
2452 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
2453 of __register_pthread_fork_handler.
2454 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
2455 of __register_pthread_fork_handler.
2456 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
2457 __libc_locking_needed to determine whether lock prefix can be avoided.
2458 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2459
85631c8e
UD
24602002-12-11 Ulrich Drepper <drepper@redhat.com>
2461
da63009e
UD
2462 * Makefile (tests): Add tst-cleanup1.
2463 * tst-cleanup1.c: New file.
2464 * cancellation.c (__cleanup_thread): Removed.
2465 (__do_cancel): Remove call to __cleanup_thread.
2466 * pthreadP.h: Remove __cleanup_thread prorotype.
2467
000160a2
UD
2468 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
2469 Remember function and argument even if cancellation handler
2470 function is not available.
2471 (__libc_cleanup_region_end): Execute registered function directly if
2472 pthread functions are not available.
2473 (__libc_cleanup_end): Likewise.
2474
85631c8e
UD
2475 * init.c (__pthread_initialize_minimal): Fix initialization in
2476 static lib by preventing gcc from being too clever.
2477
dce8f2b6
UD
24782002-12-10 Ulrich Drepper <drepper@redhat.com>
2479
34a075be
UD
2480 * init.c (__pthread_initialize_minimal): Remove unneccesary
2481 sigaddset call.
2482
dce8f2b6
UD
2483 * Makefile (tests): We can run tst-locale2 now.
2484
e5e45b53
UD
24852002-12-09 Ulrich Drepper <drepper@redhat.com>
2486
2487 * Versions: Remove duplicated sigwait entry.
2488
bdb04f92
UD
24892002-12-08 Ulrich Drepper <drepper@redhat.com>
2490
1e506629
UD
2491 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
2492 inside libpthread.
2493
a3957dd5
UD
2494 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
2495
bdb04f92
UD
2496 * pthreadP.h: Declare __pthread_enable_asynccancel and
2497 __pthread_disable_asynccancel.
2498 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
2499 (CANCEL_RESET): Use __pthread_disable_asynccancel.
2500 * cancellation.c (__pthread_enable_asynccancel): New function.
2501 (__pthread_disable_asynccancel): New function.
2502 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
2503 * pt-close.c: Likewise.
2504 * pt-connect.c: Likewise.
2505 * pt-creat.c: Likewise.
2506 * pt-fcntl.c: Likewise.
2507 * pt-fsync.c: Likewise.
2508 * pt-lseek.c: Likewise.
2509 * pt-lseek64.c: Likewise.
2510 * pt-msgrcv.c: Likewise.
2511 * pt-msgsnd.c: Likewise.
2512 * pt-msync.c: Likewise.
2513 * pt-nanosleep.c: Likewise.
2514 * pt-open.c: Likewise.
2515 * pt-open64.c: Likewise.
2516 * pt-pause.c: Likewise.
2517 * pt-poll.c: Likewise.
2518 * pt-pread.c: Likewise.
2519 * pt-pread64.c: Likewise.
2520 * pt-pselect.c: Likewise.
2521 * pt-pwrite.c: Likewise.
2522 * pt-pwrite64.c: Likewise.
2523 * pt-read.c: Likewise.
2524 * pt-readv.c: Likewise.
2525 * pt-recv.c: Likewise.
2526 * pt-recvfrom.c: Likewise.
2527 * pt-recvmsg.c: Likewise.
2528 * pt-select.c: Likewise.
2529 * pt-send.c: Likewise.
2530 * pt-sendmsg.c: Likewise.
2531 * pt-sendto.c: Likewise.
2532 * pt-sigpause.c: Likewise.
2533 * pt-sigsuspend.c: Likewise.
2534 * pt-sigtimedwait.c: Likewise.
2535 * pt-sigwait.c: Likewise.
2536 * pt-sigwaitinfo.c: Likewise.
2537 * pt-system.c: Likewise.
2538 * pt-tcdrain.c: Likewise.
2539 * pt-wait.c: Likewise.
2540 * pt-waitid.c: Likewise.
2541 * pt-waitpid.c: Likewise.
2542 * pt-write.c: Likewise.
2543 * pt-writev.c: Likewise.
a3957dd5
UD
2544 * pthread_join.c: Likewise.
2545 * pthread_timedjoin.c: Likewise.
bdb04f92
UD
2546
2547 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
2548 (__xpg_sigpause): New function.
2549 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
2550
6ccb3834
UD
25512002-12-07 Ulrich Drepper <drepper@redhat.com>
2552
09efc3ba
UD
2553 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
2554
2555 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
2556 _GI_pthread_cleanup_pop to pthreadP.h.
2557
2558 * ftrylockfile.c: Use _IO_lock_trylock instead of
2559 pthread_mutex_trylock.
2560
2561 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
2562 (CANCEL_RESET): Likewise.
2563 (__pthread_setcanceltype_): Declare.
2564 (__pthread_mutex_lock_internal): Declare.
2565 (__pthread_mutex_unlock_internal): Declare.
2566 (__pthread_once_internal): Declare.
2567 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
2568 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
2569
2570 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
2571 and pthread_mutex_unlock.
2572 * pthread_cond_wait.c: Likewise.
2573 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
2574 * pthread_mutex_unlock.c: Likewise.
2575
2576 * pthread_setcanceltype.c: Add additional alias
2577 __pthread_setcanceltype.
2578
2579 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
2580 * sem_open.c (sem_open): Likewise.
2581 Use __libc_open, __libc_write, and __libc_close instead of
2582 open, write, and close respectively.
2583
2584 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
2585 Rewrite as statement expression since it must return a value.
2586
2587 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
2588 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
2589 __pthread_kill.
2590
2591 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
2592 alias __pthread_once_internal.
2593
6ccb3834
UD
2594 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
2595
d3c9f895
UD
25962002-12-06 Ulrich Drepper <drepper@redhat.com>
2597
4614167a
UD
2598 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
2599 * tst-stdio1.c: New file.
2600 * tst-stdio2.c: New file.
2601
a4548cea
UD
2602 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
2603
d3c9f895
UD
2604 * Makefile (tests): Comment out tst-locale2 for now.
2605 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
2606
2607 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
2608 -D_IO_MTSAFE_IO.
2609 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
2610 Use _IO_lock_init instead of explicit assignment.
2611
2612 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2613 Define __libc_lock_* and __libc_lock_recursive macros with
2614 lowlevellock macros, not pthread mutexes.
2615
2616 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
2617 of pthread_mutex_lock.
2618 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
2619 instead of pthread_mutex_unlock.
2620
fde89ad0
RM
26212002-12-06 Roland McGrath <roland@redhat.com>
2622
2623 * allocatestack.c (__stack_user): Use uninitialized defn.
2624 * init.c (__pthread_initialize_minimal): Initialize it here.
2625
11767d47
RM
26262002-12-05 Roland McGrath <roland@redhat.com>
2627
fde89ad0
RM
2628 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2629 string.
2630 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2631
11767d47
RM
2632 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
2633 missing & here too.
2634
440d8bc2
UD
26352002-12-05 Ulrich Drepper <drepper@redhat.com>
2636
2637 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
2638 lowlevellock.
2639 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
2640 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
2641 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
2642 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
2643 for __libc_lock_* macros.
2644 * Makefile (routines): Add libc-lowlevellock.
2645
26462002-10-09 Roland McGrath <roland@redhat.com>
2647
2648 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2649 Under [__PIC__], call the function via the pointer fetched for
2650 comparison rather than a call by name that uses the PLT.
2651 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2652 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2653 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2654 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2655 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
2656
d5ed0118
RM
26572002-12-04 Roland McGrath <roland@redhat.com>
2658
2659 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
2660
2661 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
2662 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
2663
2664 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
2665
eaa4099f
UD
26662002-12-04 Ulrich Drepper <drepper@redhat.com>
2667
2668 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
2669 a completely opaque, non-integer type.
2670 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2671
33b5d0cc
UD
26722002-12-05 Jakub Jelinek <jakub@redhat.com>
2673
2674 * sysdeps/i386/tls.h: Include stdlib.h.
2675 * sysdeps/x86_64/tls.h: Likewise.
2676
7a5cdb30
UD
26772002-12-04 Ulrich Drepper <drepper@redhat.com>
2678
c4a6d859
UD
2679 * Makefile (tests): Add tst-locale2.
2680 (tests-static): Likewise.
2681 * tst-locale2.c: New file.
2682
7a5cdb30
UD
2683 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
2684 volatile and add memory clobbers to lock operations.
2685
d82d5d12
UD
26862002-12-03 Ulrich Drepper <drepper@redhat.com>
2687
69cae3cf
UD
2688 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
2689 * sysdeps/i386/i486/bits/atomic.h: New file.
2690 * sysdeps/i386/i586/bits/atomic.h: New file.
2691 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
2692 include i486 version.
2693 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
2694 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
c97c64de 2695 Patch by Marijn Ros <marijn@mad.scientist.com>.
69cae3cf 2696
e4044c01
UD
2697 * allocatestack.c (get_cached_stack): Don't crash if we first
2698 found a stack with a larger size then needed.
2699 Reported by Hui Huang <hui.huang@sun.com>.
2700
d82d5d12
UD
2701 * Makefile (tests): Add tst-sysconf.
2702 * tst-sysconf.c: New file.
2703
2704 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
2705 PTHREAD_THREADS_MAX.
2706
fa9a4ff0
RM
27072002-12-02 Roland McGrath <roland@redhat.com>
2708
2709 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
2710 Declare using hidden_proto instead of attribute_hidden, so there are
2711 non-.hidden static symbols for gdb to find.
2712 (__pthread_keys): Likewise.
2713 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
2714 * allocatestack.c (__stack_user): Likewise.
2715 * pthread_create.c (__pthread_keys): Likewise.
2716 (__nptl_threads_events, __nptl_last_event): Make these static instead
2717 of hidden.
2718 * pthread_key_create.c (__pthread_pthread_keys_max,
2719 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
2720
91949a33
UD
27212002-12-02 Ulrich Drepper <drepper@redhat.com>
2722
c22b52fa
UD
2723 * Makefile (tests): Add tst-locale1. If buid-static is yes link
2724 statically.
2725 * tst-locale1.c: New file.
2726
beb6aa41
UD
2727 * pthread_cond_timedwait.c: Include <stdlib.h>.
2728
91949a33
UD
2729 * Makefile (tests): Add tst-fork2 and tst-fork3.
2730 * tst-fork2.c: New file.
2731 * tst-fork3.c: New file.
2732
654dff90
UD
27332002-11-28 Ulrich Drepper <drepper@redhat.com>
2734
cb0e76b4
UD
2735 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2736
2737 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2738 require it to 200112L.
2739
2740 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
2741 instruction only if HAVE_CMOV is defined.
2742 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
2743
975aa229
UD
2744 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
2745
654dff90
UD
2746 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
2747
2748 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
2749
2750 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
2751
a3931336
UD
27522002-11-27 Ulrich Drepper <drepper@redhat.com>
2753
c10c099c
UD
2754 * sysdeps/x86_64/bits/atomic.h: New file.
2755
2756 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
2757 16-bit operations.
2758
dca99d27
UD
2759 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
2760 possible since gettid cannot fail.
2761
f78deea6
UD
2762 * sysdeps/x86_64/pthreaddef.h: New file.
2763
2764 * sysdeps/i386/pthreaddef.h (gettid): Removed.
2765
2766 * sysdeps/x86_64/pthread_spin_init.c: New file.
2767 * sysdeps/x86_64/pthread_spin_lock.c: New file.
2768 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
2769 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
2770
2771 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
2772 Add missing lock prefix. Minute optimization.
2773
2774 * tst-spin2.c (main): Also check successful trylock call.
2775
2776 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
2777 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
2778
2779 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
2780 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
2781
2782 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
2783 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
2784 value in case of an error. Add support for INTERNAL_SYSCALL.
b54e18eb
UD
2785
2786 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
2787 value in case of an error.
2788
a3931336
UD
2789 * sysdeps/x86_64/tls.h: New file.
2790
76a50749
UD
27912002-11-26 Ulrich Drepper <drepper@redhat.com>
2792
117c452c
UD
2793 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
2794 takes the array member name and the index as parameters.
2795 (THREAD_SETMEM_NC): Likewise.
2796 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
2797 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
2798 interfaces.
2799
2800 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
2801 to decide which code to use.
2802 (THREAD_SETMEM_NC): Likewise.
2803
76a50749
UD
2804 * allocatestack.c (queue_stack): Don't remove stack from list here.
2805 Do it in the caller. Correct condition to prematurely terminate
2806 loop to free stacks.
2807 (__deallocate_stack): Remove stack from list here.
2808
28092002-11-26 Ulrich Drepper <drepper@redhat.com>
2810
2811 * Makefile (tests): Add tst-stack1.
2812 * tst-stack1.c: New file.
2813
2814 * allocatestack.c (allocate_stack): Initialize the TCB on a user
2815 provided stack.
2816
2817 * pthread_attr_getstack.c: Return bottom of the thread area.
2818
28192002-11-25 Ulrich Drepper <drepper@redhat.com>
2820
2821 * Makefile (libpthread-routines): Add pt-allocrtsig and
2822 pthread_kill_other_threads.
2823 * pt-allocrtsig.c: New file.
2824 * pthread_kill_other_threads.c: New file.
2825 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
2826 all three functions.
2827 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
2828 allocrtsig.
2829 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
2830 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2831 and __libc_allocate_rtsig_private.
2832 * Versions (libpthread): Export pthread_kill_other_threads_np,
2833 __libc_current_sigrtmin, and __libc_current_sigrtmax.
2834
28352002-11-24 Ulrich Drepper <drepper@redhat.com>
2836
2837 * allocatestack.c (allocate_stack): stackaddr in attribute points to
2838 the end of the stack. Adjust computations.
2839 When mprotect call fails dequeue stack and free it.
2840 * pthread_attr_setstack.c: Store top of the stack in stackaddr
2841 attribute.
2842 * pthread_getattr_np.c: Likewise.
2843
2844 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
2845 surprises.
2846
28472002-11-23 Ulrich Drepper <drepper@redhat.com>
2848
2849 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
2850 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
2851
28522002-11-22 Ulrich Drepper <drepper@redhat.com>
2853
2854 * pthread_getspecific.c: Optimize access to first 2nd-level array.
2855 * pthread_setspecific.c: Likewise.
2856
28572002-11-21 Ulrich Drepper <drepper@redhat.com>
2858
2859 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
2860 definitions. Get them from the official place.
2861 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
2862
2863 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
2864 Use new CLONE_ flags in clone() calls.
2865
2866 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
2867 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
2868
2869 * Versions: Add pthread_* functions for libc.
2870 * forward.c: New file.
2871
2872 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
2873 errno-loc.
2874 * herrno.c: New file.
2875 * res.c: New file.
2876
2877 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
2878 sem_trywait, and sem_timedwait. Add herrno and res.
2879 * sem_init.c: Don't initialize lock and waiters members.
2880 * sem_open.c: Likewise.
2881 * sem_post.c: Removed.
2882 * sem_wait.c: Removed.
2883 * sem_trywait.c: Removed.
2884 * sem_timedwait.c: Removed.
2885 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
2886 Includes full implementations of sem_post, sem_wait, sem_trywait,
2887 and sem_timedwait.
2888 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
2889 for new implementation.
2890 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
2891 and waiters fields.
2892
2893 * tst-sem3.c: Improve error message.
2894 * tst-signal3.c: Likewise.
2895
2896 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
2897 to tell the kernel about the termination futex and to initialize tid
2898 member. Don't initialize main_thread.
2899 * descr.h (struct pthread): Remove main_thread member.
2900 * cancelllation.c (__do_cancel): Remove code handling main thread.
2901 The main thread is not special anymore.
2902
2903 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
2904 size of the stacks to stack_cache_actsize.
2905
2906 * pt-readv.c: Add missing "defined".
2907 * pt-sigwait.c: Likewise.
2908 * pt-writev.c: Likewise.
2909
29102002-11-09 Ulrich Drepper <drepper@redhat.com>
2911
2912 * Versions: Export __connect from libpthread.
2913 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2914
2915 * Makefile (libpthread-routines): Add pt-raise.
2916 * sysdeps/unix/sysv/linux/raise.c: New file.
2917 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
2918 * sysdeps/generic/pt-raise.c: New file.
2919
2920 * pthread_cond_init.c: Initialize all data elements of the condvar
2921 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
2922
2923 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
2924 * pthread_create.c: Likewise.
2925
2926 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
2927 * tst-key1.c: New file.
2928 * tst-key2.c: New file.
2929 * tst-key3.c: New file.
2930
2931 * Versions: Export pthread_detach for version GLIBC_2.0.
2932 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
2933
29342002-11-08 Ulrich Drepper <drepper@redhat.com>
2935
2936 * pthread_key_create.c: Terminate search after an unused key was found.
2937 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2938
2939 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
2940 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2941
29422002-10-10 Ulrich Drepper <drepper@redhat.com>
2943
2944 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
2945 dynamic lookup for errno in PIC.
2946
2947 * allocatestack.c (get_cached_stack): Rearrange code slightly to
2948 release the stack lock as soon as possible.
2949 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
2950 the static TLS block.
2951 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
2952
2953 * cancellation.c: Renamed from cancelation.c.
2954 * Makefile: Adjust accordingly.
2955 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
2956 * cleanup_defer.c: Use CANCELLATION_P.
2957 * pthread_testcancel.c: Likewise.
2958 * descr.h: Fix spelling in comments.
2959 * init.c: Likewise.
2960 * pthread_getattr_np.c: Likewise.
2961 * pthread_getschedparam.c: Likewise.
2962 * pthread_setschedparam.c: Likewise.
2963 * Versions: Likewise.
2964
2965 * pt-pselect.c: New file.
2966 * Makefile (libpthread-routines): Add pt-pselect.
2967 * Versions: Add pselect.
2968
2969 * tst-cancel4.c: New file.
2970 * Makefile (tests): Add tst-cancel4.
2971
29722002-10-09 Ulrich Drepper <drepper@redhat.com>
2973
2974 * pthread_mutex_lock.c: Always record lock ownership.
2975 * pthread_mutex_timedlock.c: Likewise.
2976 * pthread_mutex_trylock.c: Likewise.
2977
2978 * pt-readv.c: New file.
2979 * pt-writev.c: New file.
2980 * pt-creat.c: New file.
2981 * pt-msgrcv.c: New file.
2982 * pt-msgsnd.c: New file.
2983 * pt-poll.c: New file.
2984 * pt-select.c: New file.
2985 * pt-sigpause.c: New file.
2986 * pt-sigsuspend.c: New file.
2987 * pt-sigwait.c: New file.
2988 * pt-sigwaitinfo.c: New file.
2989 * pt-waitid.c: New file.
2990 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
2991 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
2992 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
2993 * Versions: Add all the new functions.
2994
2995 * tst-exit1.c: New file.
2996 * Makefile (tests): Add tst-exit1.
2997
2998 * sem_timedwait.c: Minor optimization for more optimal fastpath.
2999
30002002-10-08 Ulrich Drepper <drepper@redhat.com>
3001
3002 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
3003
3004 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
3005 call. pthread_join is an official cancellation point.
3006 * pthread_timedjoin.c: Likewise.
3007
3008 * pthread_cond_wait.c: Revert order in which internal lock are dropped
3009 and the condvar's mutex are retrieved.
3010 * pthread_cond_timedwait.c: Likewise.
3011 Reported by dice@saros.East.Sun.COM.
3012
30132002-10-07 Ulrich Drepper <drepper@redhat.com>
3014
3015 * pthreadP.h: Cut out all type definitions and move them...
3016 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
3017 * pthreadP.h: Include <internaltypes.h>.
3018
3019 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
3020 performance tweaks.
3021
3022 * sem_trywait.c: Shuffle #includes around to get right order.
3023 * sem_timedwait.c: Likewise.
3024 * sem_post.c: Likewise.
3025 * sem_wait.c: Likewise.
3026
3027 * nptl 0.3 released.
3028
3029 * Makefile (tests): Add tst-signal3.
3030 * tst-signal3.c: New file.
3031
30322002-10-05 Ulrich Drepper <drepper@redhat.com>
3033
3034 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
3035 the asms modify the sem object.
3036 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
3037
3038 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
3039 the actual members.
3040 * pthreadP.h (struct sem): New type. Actual semaphore type.
3041 * semaphoreP.h: Include pthreadP.h.
3042 * sem_getvalue.c: Adjust to sem_t change.
3043 * sem_init.c: Likewise.
3044 * sem_open.c: Likewise.
3045 * sem_post.c: Likewise.
3046 * sem_timedwait.c: Likewise.
3047 * sem_trywait.c: Likewise.
3048 * sem_wait.c: Likewise.
3049
30502002-10-04 Ulrich Drepper <drepper@redhat.com>
3051
3052 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
3053 * tst-basic2.c: New file.
3054 * tst-exec1.c: New file.
3055 * tst-exec2.c: New file.
3056 * tst-exec3.c: New file.
3057
3058 * tst-fork1.c: Remove extra */.
3059
3060 * nptl 0.2 released. The API for IA-32 is complete.