1 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
4 offset of cleanupbuf.__prev.
6 2003-03-26 Jakub Jelinek <jakub@redhat.com>
8 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
11 2003-03-26 Ulrich Drepper <drepper@redhat.com>
13 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
14 NULL provide default definition to syscall.
16 2003-03-25 Roland McGrath <roland@redhat.com>
18 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
19 (timer_id2ptr): Fix typo.
21 2003-03-25 Ulrich Drepper <drepper@redhat.com>
23 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
24 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
25 * sysdeps/ia64/pthreaddef.h: Likewise.
26 * sysdeps/powerpc/pthreaddef.h: Likewise.
27 * sysdeps/s390/pthreaddef.h: Likewise.
28 * sysdeps/sh/pthreaddef.h: Likewise.
29 * sysdeps/x86_64/pthreaddef.h: Likewise.
30 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
31 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
33 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
34 SIGTIMER is not unblocked.
35 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
37 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
39 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
40 pass pointer through as ID.
41 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
42 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
43 * sysdeps/unix/sysv/linux/timer_create.c: New file.
44 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
45 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
46 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
47 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
48 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
49 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
50 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
51 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
52 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
53 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
54 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
55 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
56 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
57 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
58 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
59 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
60 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
61 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
62 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
63 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
64 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
65 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
66 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
67 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
68 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
69 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
70 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
71 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
72 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
73 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
75 * pthreadP.h: Remove FRAME_LEFT definition.
76 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
77 already left frame. Programs which have this problem are not POSIX
79 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
81 2003-03-24 Ulrich Drepper <drepper@redhat.com>
83 * sysdeps/pthread/tst-timer.c: Check return values of the
86 2003-03-23 Roland McGrath <roland@redhat.com>
88 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
89 * tst-tls3mod.c: Likewise.
90 * tst-tls1.c: Likewise.
91 * tst-tls2.c: Likewise.
93 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
96 * tst-join5.c (tf1, tf2): Add a cast.
98 * Makeconfig (includes): Append -I$(..)nptl to this variable.
100 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
102 * tst-cond4.c: Likewise.
103 * tst-cond6.c: Likewise.
104 * tst-flock2.c: Likewise.
105 * tst-mutex4.c: Likewise.
106 * tst-rwlock4.c: Likewise.
107 * tst-signal1.c: Likewise.
108 * tst-spin2.c: Likewise.
109 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
111 * tst-mutex4.c: Use test-skeleton.c.
112 * tst-spin2.c: Likewise.
113 * tst-sysconf.c: Likewise.
114 * tst-barrier2.c: Likewise.
115 * tst-cond4.c: Likewise.
116 * tst-cond6.c: Likewise.
117 * tst-rwlock4.c: Likewise.
118 * tst-unload.c: Likewise.
119 * tst-flock2.c (do_test): Use return instead of exit.
121 2003-03-22 Jakub Jelinek <jakub@redhat.com>
123 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
125 2003-03-21 Ulrich Drepper <drepper@redhat.com>
127 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
128 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
129 instead of __lll_compare_and_swap.
130 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
132 Removed definition if __lll_compare_and_swap.
134 * cancellation.c: Adjust for new form of compare&exchange macros.
135 * cleanup_defer.c: Likewise.
137 * libc-cancellation.c: Likewise.
138 * old_pthread_cond_broadcast.c: Likewise.
139 * old_pthread_cond_signal.c: Likewise.
140 * old_pthread_cond_timedwait.c: Likewise.
141 * old_pthread_cond_wait.c: Likewise.
142 * pthread_cancel.c: Likewise.
143 * pthread_create.c: Likewise.
144 * pthread_detach.c: Likewise.
145 * pthread_join.c: Likewise.
146 * pthread_key_delete.c: Likewise.
147 * pthread_setcancelstate.c: Likewise.
148 * pthread_setcanceltype.c: Likewise.
149 * pthread_timedjoin.c: Likewise.
150 * pthread_tryjoin.c: Likewise.
151 * sysdeps/pthread/createthread.c: Likewise.
153 2003-03-20 Ulrich Drepper <drepper@redhat.com>
155 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
156 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
157 definitions. Replace uses with calls to atomic_* functions.
158 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
159 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
160 __lll_test_and_set calls with atomic_exchange_and_add and
161 atomic_exchange calls respectively.
162 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
163 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
164 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
165 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
166 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
167 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
168 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
170 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
171 returns the old value.
173 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
175 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
176 int for variable OLDVAL and correct inline assembler contraint.
177 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
178 type int for variable OLD.
180 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
182 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
183 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
184 instead of multiple_threads field in the TCB.
186 2003-03-19 Ulrich Drepper <drepper@redhat.com>
188 * sysdeps/i386/i686/bits/atomic.h: Removed.
189 * sysdeps/i386/i586/bits/atomic.h: Removed.
190 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
191 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
192 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
193 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
194 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
195 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
196 * atomic.h: Removed. Moved to glibc.
198 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
199 support for clock selection.
201 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
204 2003-03-18 Roland McGrath <roland@redhat.com>
206 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
207 Add __lll_rel_instr first. Add memory clobber.
208 (lll_mutex_unlock): Use __lll_test_and_set.
209 From Paul Mackerras <paulus@samba.org>.
211 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
213 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
214 (SINGLE_THREAD_P): Add `header.' prefix.
215 From Paul Mackerras <paulus@samba.org>.
217 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
218 pthread_timedjoin_np to ...
219 (libpthread: GLIBC_2.3.3): ... here.
220 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
222 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
223 Avoid shadowing VAL variable.
225 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
228 2003-03-18 Ulrich Drepper <drepper@redhat.com>
230 * Makefile (tests): Add tst-cond11.
231 * tst-cond11.c: New file.
233 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
234 struct passed to cleanup handler to eliminate one more
236 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
238 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
239 (pthrad_cond_t): Replace __unused field with __clock.
241 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
242 waken all waiters in cleanup handler.
243 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
246 * pthread_condattr_getclock.c: New file.
247 * pthread_condattr_setclock.c: New file.
248 * sysdeps/pthread/pthread.h: Declare these new functions.
249 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
250 * Makefile (libpthread-routines): Add the new functions.
251 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
252 Renamed field to value. Document use of the bits.
253 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
255 * pthread_condattr_setpshared.c: Likewise.
256 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
257 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
258 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
260 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
261 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
262 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
263 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
265 Implement clock selection.
266 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
267 * pthread-errnos.sym: Add ENOSYS.
268 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
269 _POSIX_CLOCK_SELECTION.
270 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
272 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
273 invalid .size directive.
275 2003-03-17 Roland McGrath <roland@redhat.com>
277 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
280 2003-03-17 Ulrich Drepper <drepper@redhat.com>
282 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
283 Use __lll_add instead of spelling it out. Use protected symbol names.
284 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
286 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
287 Renamed from lll_compare_and_swap. Use new name where necessary.
288 (__lll_add): Defined.
289 (__lll_dec_if_positive): Defined.
290 (__lll_test_and_set): Defined.
291 * sysdeps/ia64/pthread_spin_init.c: Removed.
292 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
293 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
294 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
295 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
296 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
297 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
298 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
299 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
300 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
301 __sync_lock_release_si.
302 Patch by Jakub Jelinek.
304 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
305 Fix timeout handling.
306 (__lll_timedwait_tid): Likewise.
307 (lll_unlock_wake_cb): Wake up other waiters if necessary.
308 Patch by Jakub Jelinek.
310 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
312 2003-03-17 Roland McGrath <roland@redhat.com>
314 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
315 * sysdeps/pthread/pthread_spin_init.c: New file.
316 * sysdeps/pthread/pthread_spin_unlock.c: New file.
317 * sysdeps/powerpc/Makefile: New file.
318 * sysdeps/powerpc/pthread_spin_lock.c: New file.
319 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
320 * sysdeps/powerpc/pthreaddef.h: New file.
321 * sysdeps/powerpc/tcb-offsets.sym: New file.
322 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
323 * sysdeps/powerpc/tls.h: New file.
324 * sysdeps/powerpc/bits/atomic.h: New file.
325 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
326 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
327 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
329 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
330 * sysdeps/unix/sysv/linux/sem_post.c: New file.
331 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
332 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
333 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
334 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
335 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
336 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
337 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
338 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
339 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
340 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
341 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
342 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
343 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
345 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
347 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
348 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
349 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
350 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
351 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
353 2003-03-17 Ulrich Drepper <drepper@redhat.com>
355 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
356 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
357 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
358 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
359 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
361 2003-03-16 Roland McGrath <roland@redhat.com>
363 * tst-fork4.c: Include <string.h>.
364 * tst-signal2.c: Likewise.
365 * tst-mutex5.c (do_test): exit -> return.
366 * tst-mutex2.c: Include <stdlib.h>.
368 2003-03-16 Ulrich Drepper <drepper@redhat.com>
370 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
371 (__lll_mutex_timedlock_wait): Correct expected value after
372 spurious wakeup. Otherwise we would never wait again.
374 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
375 zone versus inline asm stupidity. Use correct instructions.
377 * tst-rwlock6.c: Add some more status output.
379 2003-03-15 Roland McGrath <roland@redhat.com>
381 * sysdeps/pthread/configure.in: New file.
382 * sysdeps/pthread/configure: New file (generated).
384 2003-03-15 Ulrich Drepper <drepper@redhat.com>
386 * allocatestack.c (allocate_stack): Store the exact stack size of
387 user allocated stacks.
389 2003-03-15 Jakub Jelinek <jakub@redhat.com>
391 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
392 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
393 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
394 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
395 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
396 Use `header.' prefix.
397 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
399 2003-03-15 Ulrich Drepper <drepper@redhat.com>
401 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
402 __builtin_frame_address, use stack pointer.
404 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
405 instead of __builtin_frame_pointer.
407 2003-03-14 Ulrich Drepper <drepper@redhat.com>
409 * tst-basic1.c (do_test): Add cast to avoid warning.
410 * tst-basic2.c (do_test): Likewise.
412 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
413 amount of stack correction.
415 * tst-fork4.c: Use test-skeleton.c.
417 2003-03-14 Roland McGrath <roland@redhat.com>
419 * init.c: Fix typo "#eli" for "#else".
421 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
423 * allocatestack.c (__stack_user): Use hidden_data_def.
424 * pthread_create.c (__pthread_keys): Likewise.
426 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
428 2003-03-14 Roland McGrath <roland@redhat.com>
430 * tst-fork4.c: New file.
431 * Makefile (tests): Add it.
433 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
434 we always define the padding space.
435 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
436 stopped supporting its own extensions fully.
437 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
438 struct also called `header', so `header.multiple_threads' is the field
439 name to use on all machines.
440 * allocatestack.c (allocate_stack): Use `header.' prefix.
441 * sysdeps/pthread/createthread.c (create_thread): Likewise.
442 * pthread_create.c (__pthread_create_2_1): Likewise.
443 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
444 (THREAD_SELF): Likewise.
445 * sysdeps/x86_64/tls.h: Likewise.
446 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
447 (SINGLE_THREAD_P): Likewise.
448 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
449 (SINGLE_THREAD_P): Likewise.
450 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
451 (SINGLE_THREAD_P): Likewise.
453 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
456 2003-03-14 Ulrich Drepper <drepper@redhat.com>
458 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
459 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
461 * pthread_create.c (start_thread): setjmp is expected to return 0.
463 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
464 (THREAD_GETMEM_NC): Likewise.
466 2003-03-13 Ulrich Drepper <drepper@redhat.com>
468 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
469 and the size of the stack which must be allocated is a multiple,
470 allocate one more page.
471 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
474 2003-03-13 Roland McGrath <roland@redhat.com>
476 * pthread_create.c (start_thread): Set EXITING_BIT after the
477 event-reporting (and destructors), not before.
479 2003-03-13 Jakub Jelinek <jakub@redhat.com>
481 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
482 lll_futex_wake): Declare register variables as long int instead of
483 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
484 Make syscall arguments clobbered by the syscall.
485 (lll_futex_wait): Define using lll_futex_timed_wait.
487 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
490 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
493 * allocatestack.c (nptl_ncreated): Only declare if
494 COLORING_INCREMENT != 0.
496 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
497 (__libc_enable_asynccancel_2): Remove prototype.
499 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
500 ctid to match kernel.
502 2003-03-12 Ulrich Drepper <drepper@redhat.com>
504 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
505 libc_multiple_threads.
506 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
507 __libc_multiple_threads to...
508 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
510 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
512 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
513 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
515 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
516 (__pthread_once_internal): Define.
518 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
519 macros instead of .symver directly.
520 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
521 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
523 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
524 * sysdeps/x86_64/tcb-offsets.sym: New file.
525 * sysdeps/x86_64/Makefile: New file.
527 * sysdeps/i386/tcb-offsets.sym: Add SELF.
528 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
529 to access own pthread_t in TCB.
530 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
532 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
534 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
536 2003-03-12 Roland McGrath <roland@redhat.com>
538 * pthread-errnos.sym: New file.
539 * Makefile (gen-as-const-headers): New variable, list that file.
540 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
541 header <pthread-errnos.h> instead of defining errno values here.
542 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
543 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
544 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
545 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
546 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
548 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
550 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
551 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
552 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
553 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
554 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
555 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
556 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
557 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
558 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
559 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
560 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
561 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
562 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
563 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
564 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
565 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
566 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
567 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
568 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
569 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
570 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
571 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
572 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
573 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
574 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
575 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
576 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
578 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
579 CLONE_CHILD_SETTID worked.
581 2003-03-12 Ulrich Drepper <drepper@redhat.com>
583 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
585 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
588 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
589 (pthread_cond_t): Add padding.
591 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
592 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
593 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
595 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
596 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
597 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
598 (__pthread_rwlock_timedrdlock): Likewise.
599 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
600 (__pthread_rwlock_wrlock): Likewise.
601 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
602 (__pthread_rwlock_rdlock): Likewise.
604 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
606 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
607 result of lock re-get if it fails.
609 2003-03-11 Ulrich Drepper <drepper@redhat.com>
611 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
612 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
613 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
614 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
615 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
616 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
617 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
618 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
619 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
620 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
622 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
623 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
625 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
626 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
627 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
628 (create_thread): Likewise.
629 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
630 * init.c (__pthread_initialize_minimal_internal): Initialize
631 __libc_multiple_threads_ptr if necessary.
632 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
633 __pthread_multiple_threads and __libc_multiple_threads_ptr.
634 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
635 __libc_multiple_threads.
636 (__libc_pthread_init): Return pointer to __libc_pthread_init if
639 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
640 (THREAD_SETMEM_NC): Likewise.
642 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
643 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
644 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
645 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
647 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
648 Eliminate one entire instruction.
650 * cancellation.c (__pthread_enable_asynccancel_2): New function.
651 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
652 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
653 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
654 instead of __pthread_enable_asynccancel.
655 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
656 (__pthread_cond_wait): Likewise.
657 * sysdeps/pthread/pthread_cond_timedwait.c
658 (__pthread_cond_timedwait): Likewise.
659 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
661 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
662 (__condvar_cleanup): Wake up all waiters in case we got signaled
663 after being woken up but before disabling asynchronous
665 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
666 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
667 (__condvar_cleanup): Likewise.
669 * init.c (__NR_set_tid_address): If already defined, don't redefine.
670 Make it an error if architecture has no #if case. Add x86-64.
672 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
673 pt-initfini.s generation.
675 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
676 (TLS_INIT_TP): Fix typo.
678 2003-03-11 Jakub Jelinek <jakub@redhat.com>
680 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
681 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
683 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
684 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
685 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
686 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
687 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
688 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
689 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
690 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
692 2003-03-11 Ulrich Drepper <drepper@redhat.com>
694 * sysdeps/pthread/pthread_cond_timedwait.c
695 (__pthread_cond_timedwait): Return the result of the final
696 locking. If it succeeds, the regular function return value.
698 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
699 Return result of the final locking.
700 * version.c (__nptl_main): Work around problems with the strange
701 INTERNAL_SYSCALL macro on ppc32.
702 * init.c (__pthread_initialize_minimal_internal): Unblock
703 SIGCANCEL in case the parent blocked it.
704 Reported by Paul Mackerras <paulus@samba.org>.
706 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
707 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
708 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
710 2003-03-11 Jakub Jelinek <jakub@redhat.com>
712 * sysdeps/pthread/pthread_cond_timedwait.c
713 (__pthread_cond_timedwait): Unlock and fail if
714 __pthread_mutex_unlock_internal failed.
716 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
717 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
719 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
720 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
721 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
722 ALLOCATE_STACK): New macros.
723 (TLS_TPADJ): New macro.
724 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
725 (allocate_stack): Handle TLS_DTV_AT_TP and
726 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
727 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
729 * init.c [__ia64__] (__NR_set_tid_address): Define.
731 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
732 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
733 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
734 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
735 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
736 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
737 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
738 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
739 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
740 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
741 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
742 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
743 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
744 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
745 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
746 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
747 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
748 * sysdeps/ia64/bits/atomic.h: New file.
749 * sysdeps/ia64/Makefile: New file.
750 * sysdeps/ia64/pthread_spin_init.c: New file.
751 * sysdeps/ia64/pthread_spin_lock.c: New file.
752 * sysdeps/ia64/pthread_spin_trylock.c: New file.
753 * sysdeps/ia64/pthread_spin_unlock.c: New file.
754 * sysdeps/ia64/pthreaddef.h: New file.
755 * sysdeps/ia64/tcb-offsets.sym: New file.
756 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
757 * sysdeps/ia64/tls.h: New file.
759 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
760 to syscall instead of no arguments.
762 2003-03-10 Ulrich Drepper <drepper@redhat.com>
764 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
765 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
766 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
767 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
769 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
772 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
774 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
776 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
777 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
778 Include lowlevelbarrier.h and don't define offsets locally.
779 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
781 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
782 (__lll_mutex_lock_wait): Reverse order of first two parameters.
783 (__lll_mutex_timedlock_wait): Likewise.
784 (lll_mutex_lock): Adjust asm for that.
785 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
786 (lll_lock): Adjust asm for operand order change.
787 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
788 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
790 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
791 Reverse order of parameters.
792 (__lll_timedwait_tid): Remove regparms attribute.
793 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
794 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
796 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
797 (__lll_timedwait_tid): Remove one unnecessary instruction.
799 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
800 __lll_mutex_timedlock_wait only for NOT_IN_libc.
801 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
804 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
805 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
807 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
810 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
811 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
813 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
814 define LOCK here (if UP is not defined). The actual code is in
817 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
818 LOCK is already defined. Don't define lll_unlock_wake_cb and
819 __lll_timedwait_tid for libc.so.
820 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
821 define LOCK here (if UP is not defined). The actual code is in
824 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
825 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
826 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
827 instead of lowlevelsem.h.
828 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
829 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
830 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
832 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
834 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
835 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
836 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
838 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
840 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
843 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
845 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
846 of __libc_locking_needed.
847 (lll_trylock): Initialize %eax to zero.
849 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
850 pthread_cond_t definition.
852 2003-03-10 Roland McGrath <roland@redhat.com>
854 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
855 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
856 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
857 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
858 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
860 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
861 Instead of setting PD->multiple_threads, set globals
862 __pthread_multiple_threads and __libc_multiple_threads.
863 * sysdeps/pthread/createthread.c (create_thread): Likewise.
864 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
865 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
867 * descr.h (struct pthread): Conditionalize first member on
868 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
869 containing an anonymous tcbhead_t. Move `list' member out.
870 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
871 * allocatestack.c: Remove use of `header.data.' prefix.
872 * pthread_create.c: Likewise.
873 * init.c (__pthread_initialize_minimal_internal): Likewise.
874 * sysdeps/pthread/createthread.c (create_thread): Likewise.
875 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
876 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
877 * sysdeps/x86_64/tls.h: Likewise.
878 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
879 (SINGLE_THREAD_P): Likewise.
880 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
881 (SINGLE_THREAD_P): Likewise.
882 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
883 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
885 2003-03-09 Ulrich Drepper <drepper@redhat.com>
887 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
889 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
890 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
892 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
893 leftovers from the ia32 code.
895 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
897 (clear_once_control): Don't load %esi.
899 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
902 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
904 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
905 * sysdeps/unix/sysv/linux/createthread.c: ...here.
907 * Makefile (tests): Add tst-cond10.
908 * tst-cond10.c: New file.
910 2003-03-08 Ulrich Drepper <drepper@redhat.com>
912 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
913 * tst-signal3.c (do_test): Likewise.
914 * tst-sem5.c (do_test): Likewise.
915 * tst-kill6.c (do_test): Likewise.
916 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
918 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
920 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
921 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
922 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
923 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
924 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
925 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
926 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
928 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
930 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
931 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
932 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
933 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
934 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
935 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
936 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
937 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
939 * allocatestack.c (allocate_stack): If mprotect() fails free the
942 2003-03-07 Ulrich Drepper <drepper@redhat.com>
944 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
946 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
947 lll_wake_tid. This was used only to work around kernel limits in
949 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
950 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
951 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
952 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
954 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
955 (__pthread_initialize_minimal_internal): Change initialization of
956 __static_tls_align_m1 appropriately.
957 * pthreadP.h (__static_tls_align_m1): Renamed from
959 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
960 instead of __static_tls_align-1.
962 2003-03-04 Ulrich Drepper <drepper@redhat.com>
964 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
966 * pthread_create.c: Define __pthread_keys using nocommon
967 attribute, not by placing it explicitly in bss.
968 Remove DEFINE_DEALLOC definition. Not needed anymore.
970 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
971 Use it in mmap call to allocate stacks.
973 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
975 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
976 result of the thread function.
978 2003-03-03 Ulrich Drepper <drepper@redhat.com>
980 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
981 version is just fine.
983 * sysdeps/unix/sysv/linux/libc_pthread_init.c
984 (__pthread_child_handler): Renamed from pthread_child_handler,
985 exported, and marked hidden. Change all users.
986 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
987 free __pthread_child_handler from child list.
989 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
991 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
993 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
994 Fix handling of cancellation and failing pthread_mutex_unlock call.
995 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
996 (__pthread_cond_wait): Likewise.
998 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
999 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
1000 lll_futex_timed_wait call.
1001 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1002 (pthread_rwlock_timedwrlock): Likewise.
1004 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
1005 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
1006 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
1008 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
1009 check of lll_futex_wake return value.
1011 2003-03-03 Roland McGrath <roland@redhat.com>
1013 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
1015 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1016 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
1017 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1019 2003-03-02 Ulrich Drepper <drepper@redhat.com>
1021 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1022 error for CPU clocks.
1024 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1025 _POSIX_MONOTONIC_CLOCK.
1026 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1028 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1031 2003-03-01 Ulrich Drepper <drepper@redhat.com>
1033 * descr.h (struct pthread): Move cleanup field to the front.
1035 2003-03-01 Roland McGrath <roland@redhat.com>
1037 * sem_open.c (sem_open): Braino fix.
1039 2003-03-01 Ulrich Drepper <drepper@redhat.com>
1041 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
1042 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
1043 __pthread_cleanup_pop functionality.
1044 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1046 * descr.h (struct pthread): Move tid field to the front now that
1049 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
1050 (__lll_mutex_timedlock_wait): Remove.
1051 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1052 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1053 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
1054 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1055 (lll_unlock_wake_cb): Don't save and restore %esi.
1056 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1058 (__lll_timedwait_tid): Add alignment.
1059 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
1060 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
1062 (__lll_timedwait_tid): Removed.
1063 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1064 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
1065 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
1066 (pthread_barrier_wait): Don't save, load, and restore %esi for
1068 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1069 (__pthread_cond_signal): Don't save, load, and restore %esi.
1070 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1071 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
1072 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1073 Don't save, load, and restore %esi.
1075 2003-02-27 Ulrich Drepper <drepper@redhat.com>
1077 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1078 Release lock before waking up the waiters.
1080 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
1082 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
1083 (reader_thread): Likewise.
1085 * sysdeps/pthread/pthread_rwlock_unlock.c
1086 (__pthread_rwlock_unlock): Release internal lock early. Don't try
1087 to wake up readers if there are none.
1089 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1090 Release internal lock before wake threads.
1092 2003-02-26 Ulrich Drepper <drepper@redhat.com>
1094 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
1095 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
1097 * tst-rwlock9.c: Likewise.
1098 * tst-rwlock10.c: New file.
1099 * tst-rwlock11.c: New file.
1101 * Makefile (tests): Add tst-dlsym1.
1102 * tst-dlsym1.c: New file.
1104 * init.c (__pthread_initialize_minimal_internal): Set
1105 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
1106 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
1108 2003-02-24 Ulrich Drepper <drepper@redhat.com>
1110 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
1112 * tst-cond2.c: Fix sychronization with child.
1114 * tst-rwlock8.c (reader_thread): Remove unused variable.
1116 * Makefile: Add rules to build and run tst-tls3.
1117 * tst-tls3.c: New file.
1118 * tst-tls3mod.c: New file.
1120 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
1121 * tst-rwlock8.c: New file.
1122 * tst-rwlock9.c: New file.
1123 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
1124 complete broken rwlock implementation.
1125 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1127 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1129 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1131 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
1132 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1133 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1134 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
1135 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1137 2003-02-23 Roland McGrath <roland@redhat.com>
1139 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
1141 2003-02-23 Ulrich Drepper <drepper@redhat.com>
1143 * Makefile (tests): Add tst-context1.
1144 * tst-context1.c: New file.
1146 * Makefile (tests): Add tst-tls1 and tst-tls2.
1147 * tst-tls1.c: New file.
1148 * tst-tls2.c: New file.
1150 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
1153 * pthread_create.c (start_thread): Set EXITING_BIT early.
1155 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
1156 (THREAD_GETMEM_NC): Likewise.
1158 2003-02-22 Ulrich Drepper <drepper@redhat.com>
1160 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
1161 off 3 more bytes by using offset-less instructions when possible.
1163 * Makefile: Add dependency for $(objpfx)version.d.
1165 * eintr.c (eintr_source): Add unnecessary return but the compiler
1168 * tst-kill3.c: Include <unistd.h>.
1170 2003-02-21 Roland McGrath <roland@redhat.com>
1172 * pthread_create.c (start_thread): Call __libc_thread_freeres.
1174 2003-02-21 Ulrich Drepper <drepper@redhat.com>
1176 * Makefile (tests): Add tst-eintr1.
1177 (distribute): Add eintr.c.
1178 * tst-eintr1.c: New file.
1179 * eintr.c: New file.
1181 * pthread_cancel.c (pthread_cancel): Use tkill directly.
1183 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
1184 Disallow sending SIGCANCEL.
1186 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
1187 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
1188 * tst-kill1.c: New file.
1189 * tst-kill2.c: New file.
1190 * tst-kill3.c: New file.
1191 * tst-kill5.c: New file.
1192 * tst-kill6.c: New file.
1193 * tst-basic7.c: Renamed to...
1194 * tst-kill4.c: ...this.
1196 2003-02-21 Roland McGrath <roland@redhat.com>
1198 * Makefile (install-lib-ldscripts): New variable.
1200 2003-02-21 Ulrich Drepper <drepper@redhat.com>
1202 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
1203 * pthread_cancel.c: Use INVALID_TD_P.
1204 * pthread_detach.c: Likewise.
1205 * pthread_getschedparam.c: Likewise.
1206 * pthread_setschedparam.c: Likewise.
1207 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
1208 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1209 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
1210 * pthread_timedjoin.c: Likewise.
1212 * tst-basic7.c: Include <signal.h>.
1214 * pthread_join.c (pthread_join): Limited checking for invalid
1216 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
1218 2003-02-20 Ulrich Drepper <drepper@redhat.com>
1220 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
1221 beginning of the loop. Clear the entire first block of TSD.
1222 * Makefile (tests): Add tst-key4.
1223 * tst-key4.c: New file.
1225 2003-02-18 Ulrich Drepper <drepper@redhat.com>
1227 * Makefile (tests): Add tst-basic7.
1228 * tst-basic7.c: New file.
1230 * pthread_create.c (deallocate_tsd): Mark as internal_function.
1231 Add some more __builtin_expect.
1233 * pthreadP.h: Define dummy version of DEBUGGING_P.
1235 2003-02-17 Ulrich Drepper <drepper@redhat.com>
1237 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
1238 _POSIX_THREAD_PRIORITY_SCHEDULING.
1239 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
1240 _XOPEN_REALTIME_THREADS.
1241 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1243 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
1244 kernel returns EINVAL for PID <= 0, work around it.
1246 * Makefile (tests): Add tst-signal5.
1247 * tst-signal5.c: New file.
1249 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1252 * tst-cancel1.c (tf): Block all signals.
1254 * Makefile (tests): Add tst-basic6.
1255 * tst-basic6.c: New file.
1257 * tst-basic1.c: Add test for process ID.
1259 * Makefile (tests): Add tst-cancel10.
1260 * tst-cancel10.c: New file.
1262 * Makefile (tests): Add tst-signal4.
1263 * tst-signal4.c: New file.
1265 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
1266 __sigismember instead of sigismember. Add __builtin_expect.
1268 2003-02-16 Ulrich Drepper <drepper@redhat.com>
1270 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
1271 pthread_setcancelstate, and pthread_rwlock_setpshared.
1273 * tst-cancel7.c (do_test): Make sure the pid file exists before
1274 canceling the thread.
1276 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
1277 pthread_rwlock_timedrdlock tests.
1278 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
1279 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1280 Check for invalid tv_nsec field.
1281 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1284 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
1285 recursive mutex of overflow.
1287 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
1289 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
1290 going into an endless loop.
1291 * Makefile (tests): Add tst-cancel9.
1292 * tst-cancel9.c: New file.
1294 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
1296 2003-02-15 Ulrich Drepper <drepper@redhat.com>
1298 * tst-mutex5.c (do_test): Add more timedlock tests.
1300 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
1301 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
1303 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
1304 use INLINE_SYSCALL. Error number is returned, not -1.
1306 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
1307 and __deallocate_stack with internal_function.
1308 * pthread_create.c: Adjust definitions appropriately.
1309 * allocatestack.c: Likewise.
1311 * pthread_join.c: Add one more __builtin_expect.
1312 * pthread_timedjoin.c: Likewise.
1314 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
1315 not data of sequence number does not match.
1316 Add one __builtin_expect.
1318 * Makefile (tests): Add tst-clock1.
1319 * tst-clock1.c: New file.
1321 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
1323 * Makefile (tests): Add tst-basic5.
1324 * tst-basic5.c: New file.
1326 2003-02-14 Ulrich Drepper <drepper@redhat.com>
1328 * Makefile (tests): Add tst-basic4.
1329 * tst-basic4.c: New file.
1331 * pthreadP.h: Add declaraction for __nptl_nthreads.
1332 * pthread_create.c: Define __nptl_nthreads
1333 (start_thread): Increment __nptl_nthreads at beginning. Decrement
1334 after thread is done. If then zero, call exit(0).
1335 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1336 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
1337 * init.c (pthread_functions): Initialize ptr_nthreads.
1338 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
1339 (__reclaim_stacks): Decrement __nptl_nthreads.
1340 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
1342 * Makefile (tests): Add tst-basic3.
1343 * tst-basic3.c: New file.
1345 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
1346 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
1347 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
1348 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
1349 if asynchronous canceling is enabled.
1350 * pthread_join.c (pthread_join): When recognizing circular joins,
1351 take into account the other thread might be already canceled.
1352 * Makefile (tests): Add tst-join5.
1353 * tst-join5.c: New file.
1355 * Makefile (tests): Add tst-join4.
1356 * tst-join4.c: New file.
1358 2003-02-13 Ulrich Drepper <drepper@redhat.com>
1360 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
1362 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1364 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
1365 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
1366 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
1368 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
1370 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
1371 error if lll_futex_wake failed.
1373 2003-02-13 Ulrich Drepper <drepper@redhat.com>
1375 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
1376 handling of cancellation and failung pthread_mutex_unlock call.
1377 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1378 * Makefile (tests): Add tst-cond8 and tst-cond9.
1379 * tst-cond8.c: New file.
1380 * tst-cond9.c: New file.
1382 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
1384 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
1385 non-standard initializers with __USE_GNU.
1387 * Makefile (tests): Add tst-cleanup3.
1388 * tst-cleanup3.c: New file.
1390 2003-02-12 Ulrich Drepper <drepper@redhat.com>
1392 * Makefile (tests): Add tst-attr1 and tst-attr2.
1393 * tst-attr1.c: New file.
1394 * tst-attr2.c: New file.
1396 * Makefile: Add rules to build and run tst-atfork2 test.
1397 * tst-atfork2.c: New file.
1398 * tst-atfork2mod.c: New file.
1400 * sysdeps/unix/sysv/linux/unregister-atfork.c
1401 (__unregister_atfork): Free the memory allocated for the handlers
1402 after removing them from the lists.
1404 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
1407 * tst-atfork1.c (do_test): Wait for the child we forked.
1408 Report error in child.
1410 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
1412 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1414 2003-02-10 Ulrich Drepper <drepper@redhat.com>
1416 * Makefile (tests): Add tst-cancel8.
1417 * tst-cancel8.c: New file.
1419 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
1420 clearing of control variable.
1421 * Makefile (tests): Add tst-once3 and tst-once4.
1422 * tst-once3.c: New file.
1423 * tst-once4.c: New file.
1425 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1427 * sysdeps/sh/Makefile: New file.
1428 * sysdeps/sh/bits/atomic.h: New file.
1429 * sysdeps/sh/pthread_spin_init.c: New file.
1430 * sysdeps/sh/pthread_spin_lock.c: New file.
1431 * sysdeps/sh/pthread_spin_trylock.S: New file.
1432 * sysdeps/sh/pthread_spin_unlock.S: New file.
1433 * sysdeps/sh/pthreaddef.h: New file.
1434 * sysdeps/sh/tcb-offsets.sym: New file.
1435 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
1436 * sysdeps/sh/tls.h: New file.
1437 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
1438 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
1439 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
1440 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
1441 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
1442 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
1443 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
1444 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
1445 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
1446 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
1447 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
1448 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
1449 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
1450 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
1451 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
1452 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
1453 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
1454 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
1455 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
1456 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
1457 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
1458 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
1459 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
1460 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
1461 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
1462 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
1463 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
1464 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
1465 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
1466 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1468 2003-02-08 Ulrich Drepper <drepper@redhat.com>
1470 * tst-cond2.c: Rearrange code to not rely on behavior undefined
1473 * tst-basic2.c (do_test): Lock mutex before creating the thread.
1475 2003-02-07 Ulrich Drepper <drepper@redhat.com>
1477 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
1478 (TLS_GET_FS): New #define.
1479 (TLS_SET_FS): New #define.
1480 Correct value of __NR_set_thread_area.
1482 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
1484 2003-02-06 Ulrich Drepper <drepper@redhat.com>
1486 * Makefile (tests): Add tst-popen1.
1487 * tst-popen1.c: New file.
1489 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
1490 but inactive generalization.
1491 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1492 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1493 Minor optimization, remove one instruction.
1494 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1496 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
1498 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
1500 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
1502 * init.c (__NR_set_tid_address): Add #ifdef for s390.
1503 * sysdeps/pthread/pthread_barrier_wait.c: New file.
1504 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
1505 * sysdeps/pthread/pthread_cond_signal.c: New file.
1506 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
1507 * sysdeps/pthread/pthread_cond_wait.c: New file.
1508 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
1509 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
1510 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
1511 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
1512 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
1513 * sysdeps/s390/Makefile: New file.
1514 * sysdeps/s390/bits/atomic.h: New file.
1515 * sysdeps/s390/pthread_spin_init.c: New file.
1516 * sysdeps/s390/pthread_spin_lock.c: New file.
1517 * sysdeps/s390/pthread_spin_trylock.c: New file.
1518 * sysdeps/s390/pthread_spin_unlock.c: New file.
1519 * sysdeps/s390/pthreaddef.h: New file.
1520 * sysdeps/s390/tcb-offsets.sym: New file.
1521 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
1522 * sysdeps/s390/tls.h: New file.
1523 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
1524 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
1525 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
1526 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
1527 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
1528 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
1529 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
1530 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
1531 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
1532 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
1533 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
1534 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
1535 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
1536 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
1537 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
1538 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1539 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
1540 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
1541 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1542 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
1543 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
1544 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
1545 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
1547 2003-02-04 Ulrich Drepper <drepper@redhat.com>
1549 * atomic.h: Add a couple more default implementations.
1550 (atomic_compare_and_exchange_acq): Use
1551 __arch_compare_and_exchange_32_acq in return value definition. It
1553 (atomic_bit_set): Renamed from atomic_set_bit.
1554 Add missing atomic_ prefixes.
1556 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
1557 thread library is available, use correct value to mark initialized
1560 2003-02-03 Ulrich Drepper <drepper@redhat.com>
1562 * allocatestack.c (allocate_stack): Use __getpagesize instead of
1563 __sysconf to determine pagesize.
1565 * pthread_create.c: Include <atomic.h>.
1566 * allocatestack.c (allocate_stack): Implement coloring of the
1567 allocated stack memory. Rename pagesize to pagesize_m1. It's the
1568 size minus one. Adjust users.
1569 * sysdeps/i386/i686/Makefile: New file.
1571 2003-02-02 Ulrich Drepper <drepper@redhat.com>
1573 * allocatestack.c: Improve comment throughout the file.
1575 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1576 (__lll_lock_wait): Add branch prediction.
1577 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
1578 (__lll_lock_wait): Likewise.
1579 (lll_unlock_wake_cb): Removed.
1581 2003-01-31 Ulrich Drepper <drepper@redhat.com>
1583 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
1584 _POSIX_THREAD_PRIORITY_SCHEDULING.
1586 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1588 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1589 Fix return type of ptr___pthread_getspecific.
1591 2003-01-29 Ulrich Drepper <drepper@redhat.com>
1593 * Makefile (tests): Add tst-umask1.
1594 (tst-umask1-ARGS): Define.
1595 * tst-umask1.c: New file.
1597 2003-01-28 Ulrich Drepper <drepper@redhat.com>
1599 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
1600 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
1601 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
1602 pthread_rwlock_unlock.
1603 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
1604 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
1605 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
1606 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
1607 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1609 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
1610 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1612 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
1613 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
1614 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
1616 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
1617 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
1619 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
1620 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
1621 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
1623 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
1624 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
1626 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
1628 * Makefile (libpthread-routines): Remove lowlevelcond and
1629 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
1630 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
1631 and pthread_cond_broadcast.
1632 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
1633 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
1634 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
1635 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
1636 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
1637 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
1638 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
1639 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
1640 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
1641 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
1642 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
1643 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
1644 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
1645 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
1646 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
1647 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
1648 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
1649 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
1650 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
1651 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
1652 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
1653 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
1654 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
1655 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
1656 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
1657 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
1658 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
1659 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
1660 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
1661 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
1662 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
1664 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
1665 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
1666 of the code is moved to ...
1667 * sysdeps/pthread/createthread.c: ...here. New file.
1669 2003-01-27 Ulrich Drepper <drepper@redhat.com>
1671 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
1672 (__new_sem_post): Clear %eax before returning.
1673 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
1675 * Makefile (tests): Add tst-cleanup2.
1676 * tst-cleanup2.c: New file.
1678 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
1679 Interpret first parameter correctly.
1681 2003-01-17 Ulrich Drepper <drepper@redhat.com>
1683 * Makefile (headers): Add bits/semaphore.h.
1685 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1687 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
1690 2003-01-14 Ulrich Drepper <drepper@redhat.com>
1692 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
1693 must be used and mapping failed.
1694 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
1696 * Makefile (CFLAGS-pthread_self.os): Define this, not
1697 CFLAGS-pthread_self.c.
1699 2003-01-13 Ulrich Drepper <drepper@redhat.com>
1701 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
1704 * Makefile (libpthread-routines): Add version. Add rules to build
1705 version.os and banner.h.
1706 * version.c: New file.
1708 2003-01-13 Jakub Jelinek <jakub@redhat.com>
1710 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
1711 the alias unconditional.
1712 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
1714 2003-01-13 Ulrich Drepper <drepper@redhat.com>
1716 * Makefile (CFLAGS-pthread_self.c): New definition.
1718 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1720 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
1721 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1722 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
1723 * init.c (__pthread_initialize_minimal_internal): Likewise.
1725 2003-01-07 Jakub Jelinek <jakub@redhat.com>
1727 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
1729 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1730 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
1731 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
1732 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1733 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
1734 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
1736 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1738 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
1739 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1740 * tst-cancel-wrappers.sh: Remove all exceptions.
1742 2003-01-05 Ulrich Drepper <drepper@redhat.com>
1744 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1745 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1747 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
1748 Use __libc_pthread_functions array if SHARED.
1750 * pthreadP.h: Move pthread_cond_2_0_t definition to...
1751 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
1753 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
1754 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
1755 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
1756 __libc_ptf_call instead of __libc_maybe_call.
1758 (__libc_cleanup_region_start): Wrap function name with PTF call.
1759 (__libc_cleanup_region_end): Likewise.
1760 (__libc_cleanup_end): Likewise.
1762 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
1763 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
1764 * pthread_key_create.c: Add __pthread_key_create_internal alias.
1765 * pthreadP.h: Add prototypes.
1767 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
1768 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
1769 __pthread_rwlock_unlock aliases.
1770 * pthreadP.h: Add prototypes for new aliases.
1772 * pthreadP.h (struct pthead_functions): Moved to...
1773 * sysdeps/pthread/pthread-functions.h: ...here. New file.
1774 * init.c (pthread_functions): Add initializers for new elements.
1776 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
1777 __pthread_cleanup_pop_restore aliases.
1778 * pthreadP.h: Add prototypes.
1780 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
1781 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
1782 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
1783 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1784 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1785 * pthreadP.h: Adjust prototypes and callers.
1787 2003-01-04 Ulrich Drepper <drepper@redhat.com>
1789 * Makefile (tests): Add tst-cancel7.
1790 (tst-cancel7-ARGS): New variable.
1791 * tst-cancel7.c: New file.
1793 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
1794 around gcc defficiencies.
1795 * old_pthread_cond_signal.c: Likewise.
1796 * old_pthread_cond_timedwait.c: Likewise.
1797 * old_pthread_cond_wait.c: Likewise.
1799 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
1801 2003-01-03 Ulrich Drepper <drepper@redhat.com>
1803 * Makefile (tests): Add tst-cond7.
1804 * tst-cond7.c: New file.
1806 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
1807 (condvar_cleanup): Get condvar address from the right place.
1809 * atomic.h: Correct definitions of atomic_full_barrier,
1810 atomic_read_barrier, atomic_write_barrier.
1812 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
1814 * old_pthread_cond_signal.c: Likewise.
1815 * old_pthread_cond_timedwait.c: Likewise.
1816 * old_pthread_cond_wait.c: Likewise.
1818 2003-01-03 Jakub Jelinek <jakub@redhat.com>
1820 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1822 2003-01-03 Ulrich Drepper <drepper@redhat.com>
1824 * pthreadP.h (pthread_cond_2_0_t): New type.
1825 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
1826 Use new type for the 2.0 condvar function prototypes.
1827 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
1828 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
1830 * old_pthread_cond_destroy.c: Likewise.
1831 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
1832 * old_pthread_cond_signal.c: Likewise.
1833 * old_pthread_cond_timedwait.c: Likewise.
1834 * old_pthread_cond_wait.c: Likewise.
1836 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
1837 (__pthread_cond_wait): Don't save cancellation mode and seq value
1840 * herrno.c (__h_errno_location): Don't define as weak.
1842 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1844 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1845 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1846 and pthread_cond_wait.
1847 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
1849 (__pthread_cond_broadcast_2_0): ... this.
1850 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
1852 (__pthread_cond_destroy_2_0): ... this.
1853 * old_pthread_cond_init.c (__old_pthread_cond_init):
1855 (__pthread_cond_init_2_0): ... this.
1856 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
1858 (__pthread_cond_signal_2_0): ... this.
1859 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
1861 (__pthread_cond_wait_2_0): ... this.
1862 * pthread_cond_destroy.c: Include shlib-compat.h.
1863 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
1864 * pthread_cond_init.c: Include shlib-compat.h.
1865 (pthread_cond_init): Change strong_alias into versioned_symbol.
1866 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
1867 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
1869 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
1870 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
1871 __pthread_cond_wait_2_0): New prototypes.
1872 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
1873 __old_pthread_cond_init, __old_pthread_cond_signal,
1874 __old_pthread_cond_wait): Removed.
1875 * init.c: Include shlib-compat.h.
1876 (pthread_functions): Guard ptr___pthread_attr_init_2_0
1877 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
1878 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
1879 ptr___pthread_cond_*_2_0 fields.
1880 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1881 pthread_cond_*@GLIBC_2.0 compatibility symbols.
1883 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
1884 LIBC_SIGACTION was not yet defined.
1885 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
1886 [!defined LIBC_SIGACTION] (__sigaction): New function and
1888 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
1889 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
1891 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1893 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1895 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1897 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1898 New, larger type definition.
1899 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
1901 * Versions [libpthread]: Add definitions for new pthread_cond_*
1902 interfaces for version GLIBC_2.3.2.
1903 * pthread_cond_init.c: Update initialization for new type definition.
1904 * Makefile (libpthread-routines): Remove pthread_cond_wait,
1905 pthread_cond_timedwait, pthread_cond_signal, and
1906 pthread_cond_broadcast. Add old_pthread_cond_init,
1907 old_pthread_cond_destroy, old_pthread_cond_wait,
1908 old_pthread_cond_timedwait, old_pthread_cond_signal, and
1909 old_pthread_cond_broadcast.
1910 * old_pthread_cond_broadcast.c: New file.
1911 * old_pthread_cond_destroy.c: New file.
1912 * old_pthread_cond_init.c: New file.
1913 * old_pthread_cond_signal.c: New file.
1914 * old_pthread_cond_timedwait.c: New file.
1915 * old_pthread_cond_wait.c: New file.
1916 * pthreadP.h: Add prototypes for the compatibility interfaces.
1918 * pthread_cond_destroy.c: Don't include <errno.h>.
1920 2003-01-01 Ulrich Drepper <drepper@redhat.com>
1922 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
1923 unnecessary zero offset when addressing MUTEX.
1925 2002-12-31 Ulrich Drepper <drepper@redhat.com>
1927 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1929 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1930 for __register_atfork.
1932 2002-12-31 Jakub Jelinek <jakub@redhat.com>
1934 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
1935 instead of ASSEMBLER test macro.
1937 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1938 __libc_current_sigrtmax): Add libc_hidden_def.
1940 * sysdeps/pthread/list.h: Remove assert.h include.
1942 2002-12-31 Ulrich Drepper <drepper@redhat.com>
1944 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
1945 __pthread_initialize_minimal_internal not
1946 __pthread_initialize_minimal.
1948 2002-12-30 Ulrich Drepper <drepper@redhat.com>
1950 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
1951 __pthread_initialize_minimal as hidden.
1953 * init.c (__pthread_initialize_minimal_internal): Don't mark as
1956 2002-12-31 Jakub Jelinek <jakub@redhat.com>
1958 * Makefile ($(inst_libdir)/libpthread.so): Depend on
1959 $(common-objpfx)format.lds, include that into the output script.
1961 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
1963 2002-12-28 Andreas Jaeger <aj@suse.de>
1965 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
1966 nsec resolution changes.
1967 (xstat64_conv): Likewise.
1968 (xstat32_conv): Likewise.
1969 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
1971 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
1972 structs stat and stat64.
1973 * time/time.h (__timespec_defined): Define for __USE_MISC.
1974 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
1976 2002-12-30 Jakub Jelinek <jakub@redhat.com>
1978 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
1980 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
1981 (pthread_exit): Use strong_alias to avoid warnings.
1982 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
1983 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1984 ptr___pthread_attr_init_2_*.
1985 * init.c (pthread_functions): Adjust.
1987 2002-12-29 Ulrich Drepper <drepper@redhat.com>
1989 * forward.c: Make all functions available by default again. It
1990 caused too much trouble.
1992 * pt-siglongjmp.c: Removed.
1994 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1996 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1997 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
1998 * sysdeps/i386/Makefile: New file.
1999 * sysdeps/i386/tcb-offsets.sym: New file.
2000 * sysdeps/pthread/tcb-offsets.h: New file.
2001 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2002 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
2004 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
2005 __register_atfork...
2006 (GLIBC_2.3.2): ...here.
2008 2002-12-28 Ulrich Drepper <drepper@redhat.com>
2010 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
2011 pthread_attr_setstackaddr with __attribute_deprecated__.
2013 2002-12-27 Jakub Jelinek <jakub@redhat.com>
2015 * pt-system.c (system): Remove cancellation handling.
2016 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
2017 cancellation routines.
2019 2002-12-28 Ulrich Drepper <drepper@redhat.com>
2021 * descr.h: Include <dl-sysdep.h>.
2022 (struct pthread): Move header.data.list to the back of the struct.
2023 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
2024 (MULTIPLE_THREADS_OFFSET): Adjust offset.
2025 (SYSINFO_OFFSEET): Likewise.
2027 2002-12-27 Jakub Jelinek <jakub@redhat.com>
2029 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
2031 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
2032 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
2033 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
2034 (USE_DL_SYSINFO): Undef.
2036 2002-12-22 Jakub Jelinek <jakub@redhat.com>
2038 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
2039 $(common-objpfx)libc.so.
2040 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
2041 it is bigger than pipe buffer size even on arches with bigger
2043 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
2045 2002-12-25 Ulrich Drepper <drepper@redhat.com>
2047 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
2048 correct errno access for case that USE___THREAD is not defined.
2050 2002-12-24 Ulrich Drepper <drepper@redhat.com>
2052 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
2053 Patch by Marijn Ros <marijn@mad.scientist.com>.
2055 2002-12-22 Roland McGrath <roland@redhat.com>
2057 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2059 2002-12-20 Ulrich Drepper <drepper@redhat.com>
2061 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
2063 2002-12-19 Ulrich Drepper <drepper@redhat.com>
2065 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
2066 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
2067 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
2069 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
2071 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2072 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
2073 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
2074 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2075 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2076 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
2077 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
2078 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2080 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
2082 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
2084 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
2086 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
2088 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
2089 that sysinfo is properly initialized.
2090 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
2091 to 1 only for ld.so.
2093 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2094 RTLD_CORRECT_DYNAMIC_WEAK.
2096 2002-12-19 Jakub Jelinek <jakub@redhat.com>
2098 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2099 Use return 0 as 6th argument to FORWARD4.
2100 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
2102 2002-12-18 Ulrich Drepper <drepper@redhat.com>
2104 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
2105 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
2106 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
2107 (INIT_SYSINFO): New #define.
2108 (TLS_TP_INIT): Use INIT_SYSINFO.
2109 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2110 At test to make sure SYSINFO_OFFSET value is correct.
2111 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
2113 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2115 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2116 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
2117 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
2118 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
2119 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
2120 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
2121 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
2123 2002-12-18 Ulrich Drepper <drepper@redhat.com>
2125 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
2126 macro instead of using int $0x80 directly.
2128 * sysdeps/pthread/bits/stdio-lock.h: New file.
2129 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
2130 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
2131 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
2132 * Makefile (routines): Add libc-lowlevelmutex.
2134 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
2135 __i686.get_pc_thunk.dx.
2137 2002-12-17 Jakub Jelinek <jakub@redhat.com>
2139 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
2140 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2141 ($(objpfx)tst-cancel-wrappers.out): New rule.
2142 * tst-cancel-wrappers.sh: New test.
2143 * tst-locale1.c: Include signal.h.
2144 (uselocale): Test static linking of __libc_current_sigrt*.
2146 2002-12-17 Ulrich Drepper <drepper@redhat.com>
2148 * Makefile (tests): Add tst-cancel6.
2149 * tst-cancel6.c: New file
2151 2002-12-17 Jakub Jelinek <jakub@redhat.com>
2153 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2154 Define meaningfully for assembler as well.
2155 * pthreadP.h (struct pthread_functions): Remove
2156 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
2157 and ptr_pthread_attr_init_2_1 fields.
2158 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
2159 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
2160 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
2161 (FORWARD3): Define using FORWARD4.
2162 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
2164 * pt-system.c: Remove duplicate stdlib.h include.
2166 2002-12-16 Ulrich Drepper <drepper@redhat.com>
2168 * sem_init.c: Define sem_init@GLIBC_2.0.
2169 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
2170 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
2172 * flockfile.c: Moved to...
2173 * sysdeps/pthread/flockfile.c: ...here. New file.
2174 * funlockfile.c: Moved to...
2175 * sysdeps/pthread/funlockfile.c: ...here. New file.
2176 * ftrylockfile.c: Moved to...
2177 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
2179 2002-12-16 Jakub Jelinek <jakub@redhat.com>
2181 * libc-cancellation.c: Guard both function with
2182 #if !defined NOT_IN_libc.
2183 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
2184 automatically provided pthread wrappers.
2185 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
2186 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
2188 * pt-open.c: Removed.
2189 * pt-fcntl.c: Removed.
2190 * pt-fsync.c: Removed.
2191 * pt-lseek.c: Removed.
2192 * pt-msgrcv.c: Removed.
2193 * pt-msgsnd.c: Removed.
2194 * pt-msync.c: Removed.
2195 * pt-nanosleep.c: Removed.
2196 * pt-open64.c: Removed.
2197 * pt-pause.c: Removed.
2198 * pt-pread.c: Removed.
2199 * pt-pread64.c: Removed.
2200 * pt-pwrite.c: Removed.
2201 * pt-pwrite64.c: Removed.
2202 * pt-read.c: Removed.
2203 * pt-recv.c: Removed.
2204 * pt-recvfrom.c: Removed.
2205 * pt-recvmsg.c: Removed.
2206 * pt-send.c: Removed.
2207 * pt-sendto.c: Removed.
2208 * pt-sigtimedwait.c: Removed.
2209 * pt-sigwait.c: Removed.
2210 * pt-wait.c: Removed.
2211 * pt-waitpid.c: Removed.
2212 * pt-write.c: Removed.
2213 * pt-accept.c: Removed.
2214 * pt-close.c: Removed.
2215 * pt-connect.c: Removed.
2216 * pt-lseek64.c: Removed.
2217 * pt-sendmsg.c: Removed.
2218 * pt-tcdrain.c: Removed.
2220 2002-12-15 Ulrich Drepper <drepper@redhat.com>
2222 * init.c (__pthread_initialize_minimal_internal): Renamed from
2223 __pthread_initialize_minimal. Make old name an alias. This
2224 converts a normal relocation into a relative relocation.
2226 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
2228 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2229 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2230 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
2231 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
2232 pt-sigwaitinfo, pt-waitid, and pt-writev.
2233 * pt-creat.c: Removed.
2234 * pt-poll.c: Removed.
2235 * pt-pselect.c: Removed.
2236 * pt-readv.c: Removed.
2237 * pt-select.c: Removed.
2238 * pt-sigpause.c: Removed.
2239 * pt-sigsuspend.c: Removed.
2240 * pt-sigwaitinfo.c: Removed.
2241 * pt-waitid.c: Removed.
2242 * pt-writev.c: Removed.
2244 * init.c (pthread_functions): New variable.
2245 (__pthread_initialize_minimal): Pass pointer to pthread_functions
2246 (or NULL) to __libc_pthread_init.
2247 * forward.c: Rewrite to use __libc:pthread_functions array to get
2249 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
2251 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2252 Take new parameter. Copy content of variable pointed to by it
2253 to __libc_pthread_init.
2255 * pthreadP.h (struct pthread_functions): New type.
2256 (__libc_pthread_init): Declare.
2258 * pthread_attr_destroy.c: Add namespace protected alias.
2259 * pthread_attr_getdetachstate.c: Likewise.
2260 * pthread_attr_getinheritsched.c: Likewise.
2261 * pthread_attr_getschedparam.c: Likewise.
2262 * pthread_attr_getschedpolicy.c: Likewise.
2263 * pthread_attr_getscope.c: Likewise.
2264 * pthread_attr_setdetachstate.c: Likewise.
2265 * pthread_attr_setinheritsched.c: Likewise.
2266 * pthread_attr_setschedparam.c: Likewise.
2267 * pthread_attr_setschedpolicy.c: Likewise.
2268 * pthread_attr_setscope.c: Likewise.
2269 * pthread_cond_broadcast.c: Likewise.
2270 * pthread_cond_destroy.c: Likewise.
2271 * pthread_cond_init.c: Likewise.
2272 * pthread_cond_signal.c: Likewise.
2273 * pthread_cond_wait.c: Likewise.
2274 * pthread_condattr_destroy.c: Likewise.
2275 * pthread_condattr_init.c: Likewise.
2276 * pthread_equal.c: Likewise.
2277 * pthread_exit.c: Likewise.
2278 * pthread_getschedparam.c: Likewise.
2279 * pthread_self.c: Likewise.
2280 * pthread_setcancelstate.c: Likewise.
2281 * pthread_setschedparam.c: Likewise.
2282 * pthread_mutex_destroy.c: Likewise.
2283 * pthread_mutex_init.c: Likewise.
2284 * pthreadP.h: Add prototypes for the aliases.
2286 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
2287 multiple_threads member in correct TCB to 1.
2289 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
2290 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
2291 member of thread decriptor, otherwise return unconditionally 1.
2293 2002-12-14 Ulrich Drepper <drepper@redhat.com>
2295 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
2296 regular Linux version. Remove file.
2297 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
2298 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
2299 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
2300 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
2301 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
2302 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
2303 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
2304 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
2305 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
2306 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
2307 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
2308 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
2309 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
2310 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
2311 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
2312 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
2313 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
2314 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
2315 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
2316 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
2317 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
2318 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
2319 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
2320 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
2321 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
2322 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
2323 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
2324 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
2325 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
2326 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
2328 2002-12-14 Jakub Jelinek <jakub@redhat.com>
2330 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2331 * sysdeps/unix/sysv/linux/open.c: Removed.
2332 * sysdeps/unix/sysv/linux/fsync.c: Removed.
2333 * sysdeps/unix/sysv/linux/lseek.c: Removed.
2334 * sysdeps/unix/sysv/linux/msync.c: Removed.
2335 * sysdeps/unix/sysv/linux/read.c: Removed.
2336 * sysdeps/unix/sysv/linux/close.c: Removed.
2337 * sysdeps/unix/sysv/linux/creat.c: Removed.
2338 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
2339 * sysdeps/unix/sysv/linux/pause.c: Removed.
2340 * sysdeps/unix/sysv/linux/select.c: Removed.
2341 * sysdeps/unix/sysv/linux/write.c: Removed.
2343 2002-12-14 Ulrich Drepper <drepper@redhat.com>
2345 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
2346 element in TCB to see whether locking is needed.
2348 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
2349 MULTIPLE_THREADS_OFFSET value is correct.
2351 * sysdeps/unix/sysv/linux/close.c: New file.
2352 * sysdeps/unix/sysv/linux/connect.S: New file.
2353 * sysdeps/unix/sysv/linux/creat.c: New file.
2354 * sysdeps/unix/sysv/linux/fsync.c: New file.
2355 * sysdeps/unix/sysv/linux/llseek.c: New file.
2356 * sysdeps/unix/sysv/linux/lseek.c: New file.
2357 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
2358 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
2359 * sysdeps/unix/sysv/linux/msync.c: New file.
2360 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
2361 * sysdeps/unix/sysv/linux/open.c: New file.
2362 * sysdeps/unix/sysv/linux/open64.c: New file.
2363 * sysdeps/unix/sysv/linux/pause.c: New file.
2364 * sysdeps/unix/sysv/linux/poll.c: New file.
2365 * sysdeps/unix/sysv/linux/pread.c: New file.
2366 * sysdeps/unix/sysv/linux/pread64.c: New file.
2367 * sysdeps/unix/sysv/linux/pselect.c: New file.
2368 * sysdeps/unix/sysv/linux/pwrite.c: New file.
2369 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
2370 * sysdeps/unix/sysv/linux/readv.c: New file.
2371 * sysdeps/unix/sysv/linux/recv.S: New file.
2372 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
2373 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
2374 * sysdeps/unix/sysv/linux/select.c: New file.
2375 * sysdeps/unix/sysv/linux/send.S: New file.
2376 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
2377 * sysdeps/unix/sysv/linux/sendto.S: New file.
2378 * sysdeps/unix/sysv/linux/sigpause.c: New file.
2379 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
2380 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
2381 * sysdeps/unix/sysv/linux/sigwait.c: New file.
2382 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
2383 * sysdeps/unix/sysv/linux/system.c: New file.
2384 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
2385 * sysdeps/unix/sysv/linux/wait.c: New file.
2386 * sysdeps/unix/sysv/linux/waitid.c: New file.
2387 * sysdeps/unix/sysv/linux/waitpid.c: New file.
2388 * sysdeps/unix/sysv/linux/writev.c: New file.
2389 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
2391 * pt-readv.c: Fix comment.
2393 2002-12-14 Jakub Jelinek <jakub@redhat.com>
2395 * tst-cleanup1.c: Include stdlib.h.
2397 * tst-cancel5.c: New test.
2398 * Makefile (tests): Add tst-cancel5.
2399 (tst-cancel5): Link against libc.so libpthread.so in that order.
2401 2002-12-13 Ulrich Drepper <drepper@redhat.com>
2403 * forward.c (test_loaded): Prevent recursive calls.
2405 * Makefile (routines): Add libc-cancellation.
2406 * libc-cancellation.c: New file.
2407 * descr.h (struct pthread): Add multiple_threads field.
2408 * allocatestack.c (allocate_stack): Initialize multiple_header field of
2409 new thread descriptor to 1.
2410 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
2411 Initialize multiple_thread field after successful thread creation.
2412 * cancellation.c (__do_cancel): Move to pthreadP.h.
2413 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
2414 (__pthread_disable_asynccancel): Add internal_function attribute.
2415 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
2416 * pthread_setcancelstate.c: Likewise.
2417 * pthread_setcanceltype.c: Likewise.
2418 * pthread_exit.c: Likewise.
2419 * pthreadP.h (CANCELLATION_P): Likewise.
2420 (__do_cancel): Define as static inline.
2421 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
2422 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
2424 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
2425 fields. Define MULTIPLE_THREADS_OFFSET.
2426 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
2428 * sysdeps/unix/sysv/linux/accept.S: New file.
2429 * sysdeps/unix/sysv/linux/read.c: New file.
2430 * sysdeps/unix/sysv/linux/write.c: New file.
2431 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
2432 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
2433 initialization of __libc_locking_needed.
2434 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
2435 __libc_locking_needed, use multiple_threads field in TCB.
2436 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2438 2002-12-12 Ulrich Drepper <drepper@redhat.com>
2440 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
2442 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
2444 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
2445 access to __libc_locking_needed for PIC.
2447 2002-12-12 Jakub Jelinek <jakub@redhat.com>
2449 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
2450 declare for libc.so.
2451 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
2453 (__libc_lock_lock): Put into statement expression.
2454 (__libc_lock_unlock): Remove trailing semicolon.
2455 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
2457 2002-12-12 Roland McGrath <roland@redhat.com>
2459 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
2460 "m" constraint to refer to __libc_locking_needed. Declare it here.
2462 2002-12-12 Ulrich Drepper <drepper@redhat.com>
2464 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
2465 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
2466 Initialize __libc_locking_needed.
2467 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
2468 instead of __register_pthread_fork_handler.
2469 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
2470 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
2471 fork-gen with libc_pthread_init.
2472 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
2473 of __register_pthread_fork_handler.
2474 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
2475 of __register_pthread_fork_handler.
2476 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
2477 __libc_locking_needed to determine whether lock prefix can be avoided.
2478 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2480 2002-12-11 Ulrich Drepper <drepper@redhat.com>
2482 * Makefile (tests): Add tst-cleanup1.
2483 * tst-cleanup1.c: New file.
2484 * cancellation.c (__cleanup_thread): Removed.
2485 (__do_cancel): Remove call to __cleanup_thread.
2486 * pthreadP.h: Remove __cleanup_thread prorotype.
2488 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
2489 Remember function and argument even if cancellation handler
2490 function is not available.
2491 (__libc_cleanup_region_end): Execute registered function directly if
2492 pthread functions are not available.
2493 (__libc_cleanup_end): Likewise.
2495 * init.c (__pthread_initialize_minimal): Fix initialization in
2496 static lib by preventing gcc from being too clever.
2498 2002-12-10 Ulrich Drepper <drepper@redhat.com>
2500 * init.c (__pthread_initialize_minimal): Remove unneccesary
2503 * Makefile (tests): We can run tst-locale2 now.
2505 2002-12-09 Ulrich Drepper <drepper@redhat.com>
2507 * Versions: Remove duplicated sigwait entry.
2509 2002-12-08 Ulrich Drepper <drepper@redhat.com>
2511 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
2514 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
2516 * pthreadP.h: Declare __pthread_enable_asynccancel and
2517 __pthread_disable_asynccancel.
2518 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
2519 (CANCEL_RESET): Use __pthread_disable_asynccancel.
2520 * cancellation.c (__pthread_enable_asynccancel): New function.
2521 (__pthread_disable_asynccancel): New function.
2522 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
2523 * pt-close.c: Likewise.
2524 * pt-connect.c: Likewise.
2525 * pt-creat.c: Likewise.
2526 * pt-fcntl.c: Likewise.
2527 * pt-fsync.c: Likewise.
2528 * pt-lseek.c: Likewise.
2529 * pt-lseek64.c: Likewise.
2530 * pt-msgrcv.c: Likewise.
2531 * pt-msgsnd.c: Likewise.
2532 * pt-msync.c: Likewise.
2533 * pt-nanosleep.c: Likewise.
2534 * pt-open.c: Likewise.
2535 * pt-open64.c: Likewise.
2536 * pt-pause.c: Likewise.
2537 * pt-poll.c: Likewise.
2538 * pt-pread.c: Likewise.
2539 * pt-pread64.c: Likewise.
2540 * pt-pselect.c: Likewise.
2541 * pt-pwrite.c: Likewise.
2542 * pt-pwrite64.c: Likewise.
2543 * pt-read.c: Likewise.
2544 * pt-readv.c: Likewise.
2545 * pt-recv.c: Likewise.
2546 * pt-recvfrom.c: Likewise.
2547 * pt-recvmsg.c: Likewise.
2548 * pt-select.c: Likewise.
2549 * pt-send.c: Likewise.
2550 * pt-sendmsg.c: Likewise.
2551 * pt-sendto.c: Likewise.
2552 * pt-sigpause.c: Likewise.
2553 * pt-sigsuspend.c: Likewise.
2554 * pt-sigtimedwait.c: Likewise.
2555 * pt-sigwait.c: Likewise.
2556 * pt-sigwaitinfo.c: Likewise.
2557 * pt-system.c: Likewise.
2558 * pt-tcdrain.c: Likewise.
2559 * pt-wait.c: Likewise.
2560 * pt-waitid.c: Likewise.
2561 * pt-waitpid.c: Likewise.
2562 * pt-write.c: Likewise.
2563 * pt-writev.c: Likewise.
2564 * pthread_join.c: Likewise.
2565 * pthread_timedjoin.c: Likewise.
2567 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
2568 (__xpg_sigpause): New function.
2569 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
2571 2002-12-07 Ulrich Drepper <drepper@redhat.com>
2573 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
2575 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
2576 _GI_pthread_cleanup_pop to pthreadP.h.
2578 * ftrylockfile.c: Use _IO_lock_trylock instead of
2579 pthread_mutex_trylock.
2581 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
2582 (CANCEL_RESET): Likewise.
2583 (__pthread_setcanceltype_): Declare.
2584 (__pthread_mutex_lock_internal): Declare.
2585 (__pthread_mutex_unlock_internal): Declare.
2586 (__pthread_once_internal): Declare.
2587 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
2588 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
2590 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
2591 and pthread_mutex_unlock.
2592 * pthread_cond_wait.c: Likewise.
2593 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
2594 * pthread_mutex_unlock.c: Likewise.
2596 * pthread_setcanceltype.c: Add additional alias
2597 __pthread_setcanceltype.
2599 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
2600 * sem_open.c (sem_open): Likewise.
2601 Use __libc_open, __libc_write, and __libc_close instead of
2602 open, write, and close respectively.
2604 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
2605 Rewrite as statement expression since it must return a value.
2607 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
2608 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
2611 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
2612 alias __pthread_once_internal.
2614 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
2616 2002-12-06 Ulrich Drepper <drepper@redhat.com>
2618 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
2619 * tst-stdio1.c: New file.
2620 * tst-stdio2.c: New file.
2622 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
2624 * Makefile (tests): Comment out tst-locale2 for now.
2625 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
2627 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
2629 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
2630 Use _IO_lock_init instead of explicit assignment.
2632 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2633 Define __libc_lock_* and __libc_lock_recursive macros with
2634 lowlevellock macros, not pthread mutexes.
2636 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
2637 of pthread_mutex_lock.
2638 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
2639 instead of pthread_mutex_unlock.
2641 2002-12-06 Roland McGrath <roland@redhat.com>
2643 * allocatestack.c (__stack_user): Use uninitialized defn.
2644 * init.c (__pthread_initialize_minimal): Initialize it here.
2646 2002-12-05 Roland McGrath <roland@redhat.com>
2648 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2650 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2652 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
2655 2002-12-05 Ulrich Drepper <drepper@redhat.com>
2657 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
2659 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
2660 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
2661 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
2662 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
2663 for __libc_lock_* macros.
2664 * Makefile (routines): Add libc-lowlevellock.
2666 2002-10-09 Roland McGrath <roland@redhat.com>
2668 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2669 Under [__PIC__], call the function via the pointer fetched for
2670 comparison rather than a call by name that uses the PLT.
2671 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2672 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2673 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2674 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2675 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
2677 2002-12-04 Roland McGrath <roland@redhat.com>
2679 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
2681 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
2682 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
2684 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
2686 2002-12-04 Ulrich Drepper <drepper@redhat.com>
2688 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
2689 a completely opaque, non-integer type.
2690 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2692 2002-12-05 Jakub Jelinek <jakub@redhat.com>
2694 * sysdeps/i386/tls.h: Include stdlib.h.
2695 * sysdeps/x86_64/tls.h: Likewise.
2697 2002-12-04 Ulrich Drepper <drepper@redhat.com>
2699 * Makefile (tests): Add tst-locale2.
2700 (tests-static): Likewise.
2701 * tst-locale2.c: New file.
2703 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
2704 volatile and add memory clobbers to lock operations.
2706 2002-12-03 Ulrich Drepper <drepper@redhat.com>
2708 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
2709 * sysdeps/i386/i486/bits/atomic.h: New file.
2710 * sysdeps/i386/i586/bits/atomic.h: New file.
2711 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
2712 include i486 version.
2713 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
2714 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
2715 Patch by Marijn Ros <marijn@mad.scientist.com>.
2717 * allocatestack.c (get_cached_stack): Don't crash if we first
2718 found a stack with a larger size then needed.
2719 Reported by Hui Huang <hui.huang@sun.com>.
2721 * Makefile (tests): Add tst-sysconf.
2722 * tst-sysconf.c: New file.
2724 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
2725 PTHREAD_THREADS_MAX.
2727 2002-12-02 Roland McGrath <roland@redhat.com>
2729 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
2730 Declare using hidden_proto instead of attribute_hidden, so there are
2731 non-.hidden static symbols for gdb to find.
2732 (__pthread_keys): Likewise.
2733 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
2734 * allocatestack.c (__stack_user): Likewise.
2735 * pthread_create.c (__pthread_keys): Likewise.
2736 (__nptl_threads_events, __nptl_last_event): Make these static instead
2738 * pthread_key_create.c (__pthread_pthread_keys_max,
2739 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
2741 2002-12-02 Ulrich Drepper <drepper@redhat.com>
2743 * Makefile (tests): Add tst-locale1. If buid-static is yes link
2745 * tst-locale1.c: New file.
2747 * pthread_cond_timedwait.c: Include <stdlib.h>.
2749 * Makefile (tests): Add tst-fork2 and tst-fork3.
2750 * tst-fork2.c: New file.
2751 * tst-fork3.c: New file.
2753 2002-11-28 Ulrich Drepper <drepper@redhat.com>
2755 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
2757 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2758 require it to 200112L.
2760 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
2761 instruction only if HAVE_CMOV is defined.
2762 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
2764 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
2766 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
2768 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
2770 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
2772 2002-11-27 Ulrich Drepper <drepper@redhat.com>
2774 * sysdeps/x86_64/bits/atomic.h: New file.
2776 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
2779 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
2780 possible since gettid cannot fail.
2782 * sysdeps/x86_64/pthreaddef.h: New file.
2784 * sysdeps/i386/pthreaddef.h (gettid): Removed.
2786 * sysdeps/x86_64/pthread_spin_init.c: New file.
2787 * sysdeps/x86_64/pthread_spin_lock.c: New file.
2788 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
2789 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
2791 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
2792 Add missing lock prefix. Minute optimization.
2794 * tst-spin2.c (main): Also check successful trylock call.
2796 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
2797 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
2799 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
2800 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
2802 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
2803 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
2804 value in case of an error. Add support for INTERNAL_SYSCALL.
2806 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
2807 value in case of an error.
2809 * sysdeps/x86_64/tls.h: New file.
2811 2002-11-26 Ulrich Drepper <drepper@redhat.com>
2813 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
2814 takes the array member name and the index as parameters.
2815 (THREAD_SETMEM_NC): Likewise.
2816 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
2817 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
2820 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
2821 to decide which code to use.
2822 (THREAD_SETMEM_NC): Likewise.
2824 * allocatestack.c (queue_stack): Don't remove stack from list here.
2825 Do it in the caller. Correct condition to prematurely terminate
2826 loop to free stacks.
2827 (__deallocate_stack): Remove stack from list here.
2829 2002-11-26 Ulrich Drepper <drepper@redhat.com>
2831 * Makefile (tests): Add tst-stack1.
2832 * tst-stack1.c: New file.
2834 * allocatestack.c (allocate_stack): Initialize the TCB on a user
2837 * pthread_attr_getstack.c: Return bottom of the thread area.
2839 2002-11-25 Ulrich Drepper <drepper@redhat.com>
2841 * Makefile (libpthread-routines): Add pt-allocrtsig and
2842 pthread_kill_other_threads.
2843 * pt-allocrtsig.c: New file.
2844 * pthread_kill_other_threads.c: New file.
2845 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
2846 all three functions.
2847 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
2849 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
2850 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2851 and __libc_allocate_rtsig_private.
2852 * Versions (libpthread): Export pthread_kill_other_threads_np,
2853 __libc_current_sigrtmin, and __libc_current_sigrtmax.
2855 2002-11-24 Ulrich Drepper <drepper@redhat.com>
2857 * allocatestack.c (allocate_stack): stackaddr in attribute points to
2858 the end of the stack. Adjust computations.
2859 When mprotect call fails dequeue stack and free it.
2860 * pthread_attr_setstack.c: Store top of the stack in stackaddr
2862 * pthread_getattr_np.c: Likewise.
2864 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
2867 2002-11-23 Ulrich Drepper <drepper@redhat.com>
2869 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
2870 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
2872 2002-11-22 Ulrich Drepper <drepper@redhat.com>
2874 * pthread_getspecific.c: Optimize access to first 2nd-level array.
2875 * pthread_setspecific.c: Likewise.
2877 2002-11-21 Ulrich Drepper <drepper@redhat.com>
2879 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
2880 definitions. Get them from the official place.
2881 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
2883 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
2884 Use new CLONE_ flags in clone() calls.
2886 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
2887 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
2889 * Versions: Add pthread_* functions for libc.
2890 * forward.c: New file.
2892 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
2894 * herrno.c: New file.
2897 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
2898 sem_trywait, and sem_timedwait. Add herrno and res.
2899 * sem_init.c: Don't initialize lock and waiters members.
2900 * sem_open.c: Likewise.
2901 * sem_post.c: Removed.
2902 * sem_wait.c: Removed.
2903 * sem_trywait.c: Removed.
2904 * sem_timedwait.c: Removed.
2905 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
2906 Includes full implementations of sem_post, sem_wait, sem_trywait,
2908 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
2909 for new implementation.
2910 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
2913 * tst-sem3.c: Improve error message.
2914 * tst-signal3.c: Likewise.
2916 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
2917 to tell the kernel about the termination futex and to initialize tid
2918 member. Don't initialize main_thread.
2919 * descr.h (struct pthread): Remove main_thread member.
2920 * cancelllation.c (__do_cancel): Remove code handling main thread.
2921 The main thread is not special anymore.
2923 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
2924 size of the stacks to stack_cache_actsize.
2926 * pt-readv.c: Add missing "defined".
2927 * pt-sigwait.c: Likewise.
2928 * pt-writev.c: Likewise.
2930 2002-11-09 Ulrich Drepper <drepper@redhat.com>
2932 * Versions: Export __connect from libpthread.
2933 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2935 * Makefile (libpthread-routines): Add pt-raise.
2936 * sysdeps/unix/sysv/linux/raise.c: New file.
2937 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
2938 * sysdeps/generic/pt-raise.c: New file.
2940 * pthread_cond_init.c: Initialize all data elements of the condvar
2941 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
2943 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
2944 * pthread_create.c: Likewise.
2946 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
2947 * tst-key1.c: New file.
2948 * tst-key2.c: New file.
2949 * tst-key3.c: New file.
2951 * Versions: Export pthread_detach for version GLIBC_2.0.
2952 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
2954 2002-11-08 Ulrich Drepper <drepper@redhat.com>
2956 * pthread_key_create.c: Terminate search after an unused key was found.
2957 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2959 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
2960 Patch by Luca Barbieri <ldb@ldb.ods.org>.
2962 2002-10-10 Ulrich Drepper <drepper@redhat.com>
2964 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
2965 dynamic lookup for errno in PIC.
2967 * allocatestack.c (get_cached_stack): Rearrange code slightly to
2968 release the stack lock as soon as possible.
2969 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
2970 the static TLS block.
2971 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
2973 * cancellation.c: Renamed from cancelation.c.
2974 * Makefile: Adjust accordingly.
2975 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
2976 * cleanup_defer.c: Use CANCELLATION_P.
2977 * pthread_testcancel.c: Likewise.
2978 * descr.h: Fix spelling in comments.
2980 * pthread_getattr_np.c: Likewise.
2981 * pthread_getschedparam.c: Likewise.
2982 * pthread_setschedparam.c: Likewise.
2983 * Versions: Likewise.
2985 * pt-pselect.c: New file.
2986 * Makefile (libpthread-routines): Add pt-pselect.
2987 * Versions: Add pselect.
2989 * tst-cancel4.c: New file.
2990 * Makefile (tests): Add tst-cancel4.
2992 2002-10-09 Ulrich Drepper <drepper@redhat.com>
2994 * pthread_mutex_lock.c: Always record lock ownership.
2995 * pthread_mutex_timedlock.c: Likewise.
2996 * pthread_mutex_trylock.c: Likewise.
2998 * pt-readv.c: New file.
2999 * pt-writev.c: New file.
3000 * pt-creat.c: New file.
3001 * pt-msgrcv.c: New file.
3002 * pt-msgsnd.c: New file.
3003 * pt-poll.c: New file.
3004 * pt-select.c: New file.
3005 * pt-sigpause.c: New file.
3006 * pt-sigsuspend.c: New file.
3007 * pt-sigwait.c: New file.
3008 * pt-sigwaitinfo.c: New file.
3009 * pt-waitid.c: New file.
3010 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
3011 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
3012 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
3013 * Versions: Add all the new functions.
3015 * tst-exit1.c: New file.
3016 * Makefile (tests): Add tst-exit1.
3018 * sem_timedwait.c: Minor optimization for more optimal fastpath.
3020 2002-10-08 Ulrich Drepper <drepper@redhat.com>
3022 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
3024 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
3025 call. pthread_join is an official cancellation point.
3026 * pthread_timedjoin.c: Likewise.
3028 * pthread_cond_wait.c: Revert order in which internal lock are dropped
3029 and the condvar's mutex are retrieved.
3030 * pthread_cond_timedwait.c: Likewise.
3031 Reported by dice@saros.East.Sun.COM.
3033 2002-10-07 Ulrich Drepper <drepper@redhat.com>
3035 * pthreadP.h: Cut out all type definitions and move them...
3036 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
3037 * pthreadP.h: Include <internaltypes.h>.
3039 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
3042 * sem_trywait.c: Shuffle #includes around to get right order.
3043 * sem_timedwait.c: Likewise.
3044 * sem_post.c: Likewise.
3045 * sem_wait.c: Likewise.
3047 * nptl 0.3 released.
3049 * Makefile (tests): Add tst-signal3.
3050 * tst-signal3.c: New file.
3052 2002-10-05 Ulrich Drepper <drepper@redhat.com>
3054 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
3055 the asms modify the sem object.
3056 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
3058 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
3060 * pthreadP.h (struct sem): New type. Actual semaphore type.
3061 * semaphoreP.h: Include pthreadP.h.
3062 * sem_getvalue.c: Adjust to sem_t change.
3063 * sem_init.c: Likewise.
3064 * sem_open.c: Likewise.
3065 * sem_post.c: Likewise.
3066 * sem_timedwait.c: Likewise.
3067 * sem_trywait.c: Likewise.
3068 * sem_wait.c: Likewise.
3070 2002-10-04 Ulrich Drepper <drepper@redhat.com>
3072 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
3073 * tst-basic2.c: New file.
3074 * tst-exec1.c: New file.
3075 * tst-exec2.c: New file.
3076 * tst-exec3.c: New file.
3078 * tst-fork1.c: Remove extra */.
3080 * nptl 0.2 released. The API for IA-32 is complete.