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