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