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