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