1 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4 (__lll_mutex_timedlock_wait): I woken but cannot get the lock,
5 make sure 2 is stored in the futex and we looked at the old value.
6 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
8 which might very well made the code not working at all before.
10 2004-09-28 Ulrich Drepper <drepper@redhat.com>
12 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
13 allow SIGSETXID to be sent.
14 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
15 for SIGSETXID to be defined.
16 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
17 SIGSETXID cannot be blocked.
19 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
20 Add __extension__ to long long types.
21 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
22 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
23 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
24 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
25 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
26 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
27 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
29 2004-09-25 Ulrich Drepper <drepper@redhat.com>
31 * descr.h (struct pthread): Add stopped_start field.
32 * sysdeps/pthread/createthread.c (create_thread): Set
33 start_stopped flag in descriptor for new thread appropriately.
34 * pthread_create.c (start_thread): Only take lock to be stopped on
35 startup if stopped_start flag says so.
37 2004-09-24 Ulrich Drepper <drepper@redhat.com>
39 * pthread_create.c (__pthread_create_2_1): Remember whether thread
40 is created detached and if yes, do not try to free the stack in case
41 the thread creation failed.
42 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
43 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
44 case there has been no error. [BZ #405]
46 * pthread_create.c (start_thread): Don't wait for scheduler data
47 etc to be set at the beginning of the function. The cancellation
48 infrastructure must have been set up. And enable async
49 cancellation before potentially going to sleep. [BZ #401]
51 2004-09-20 Ulrich Drepper <drepper@redhat.com>
53 * Versions: Remove exports for pthread_set*id_np functions.
54 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
56 * Makefile: Don't build pthread_set*id code for now.
58 2004-09-19 Ulrich Drepper <drepper@redhat.com>
60 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
62 * allocatestack.c (__nptl_setxid): New function.
63 * descr.h (struct xid_command): Define type.
64 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
65 (sighandler_setxid): New function.
66 (__pthread_initialize_minimal): Register sighandler_setxid for
68 * pt-allocrtsig.c: Update comment.
69 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
70 Declare __nptl_setxid.
71 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
72 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
73 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
74 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
75 and pthread_setresuid_np.
76 * pthread_setgid_np.c: New file.
77 * pthread_setuid_np.c: New file.
78 * pthread_setegid_np.c: New file.
79 * pthread_seteuid_np.c: New file.
80 * pthread_setregid_np.c: New file.
81 * pthread_setreuid_np.c: New file.
82 * pthread_setresgid_np.c: New file.
83 * pthread_setresuid_np.c: New file.
84 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
85 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
86 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
87 and pthread_setresuid_np.
88 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
89 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
90 pthread_setregid, and pthread_setresgid.
92 2004-09-18 Ulrich Drepper <drepper@redhat.com>
94 * allocatestack.c (allocate_stack): Return EAGAIN instead of
95 ENOMEM when out of memory.
97 2004-09-10 Roland McGrath <roland@redhat.com>
100 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
101 code, since we don't try to use the broken CLONE_STOPPED any more.
102 * pthread_create.c (start_thread): Likewise.
104 2004-09-15 Richard Henderson <rth@redhat.com>
106 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
108 2004-09-01 David Mosberger <davidm@hpl.hp.com>
110 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
111 (__libc_unwind_longjmp): Delete macro and declare as function.
112 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
113 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
115 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
116 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
117 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
119 2004-09-12 Ulrich Drepper <drepper@redhat.com>
121 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
123 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
124 types also for __USE_XOPEN2K.
125 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
126 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
127 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
128 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
129 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
130 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
131 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
134 2004-09-08 Ulrich Drepper <drepper@redhat.com>
136 * sysdeps/pthread/pthread.h
137 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
138 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
139 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
140 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
143 2004-09-07 Ulrich Drepper <drepper@redhat.com>
145 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
146 PSEUDO to be used with . prefix.
148 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
149 Use atomic_increment instead of atomic_exchange_and_add.
150 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
152 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
154 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
157 * allocatestack.c (allocate_stack): Use atomic_increment_val
158 instead of atomic_exchange_and_add.
159 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
160 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
162 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
165 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
166 the initialization function might throw.
168 2005-09-05 Richard Henderson <rth@redhat.com>
170 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
171 Move definition inside libpthread, libc, librt check. Provide
174 2004-09-02 Ulrich Drepper <drepper@redhat.com>
176 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
177 * sysdeps/i386/jmpbuf-unwind.h: Likewise
178 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
179 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
180 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
181 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
182 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
183 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
186 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
187 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
188 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
190 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
191 Decrement __nwaiters. If pthread_cond_destroy has been called and
192 this is the last waiter, signal pthread_cond_destroy caller and
193 avoid using the pthread_cond_t structure after unlock.
194 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
195 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
196 Read clock type from the least significant bits of __nwaiters instead
198 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
199 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
201 2004-08-31 Jakub Jelinek <jakub@redhat.com>
204 * Makefile (tests): Add tst-cond20 and tst-cond21.
205 * tst-cond20.c: New test.
206 * tst-cond21.c: New test.
207 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
208 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
210 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
212 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
213 (pthread_cond_t): Likewise.
214 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
216 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
218 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
220 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
221 (cond_nwaiters): New.
223 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
224 if there are waiters not signalled yet.
225 Wait until all already signalled waiters wake up.
226 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
227 __nwaiters. If pthread_cond_destroy has been called and this is the
228 last waiter, signal pthread_cond_destroy caller and avoid using
229 the pthread_cond_t structure after unlock.
230 (__pthread_cond_wait): Increment __nwaiters in the beginning,
231 decrement it when leaving. If pthread_cond_destroy has been called
232 and this is the last waiter, signal pthread_cond_destroy caller.
233 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
234 Likewise. Read clock type from the least significant bits of
235 __nwaiters instead of __clock.
236 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
237 whether clock ID can be encoded in COND_CLOCK_BITS bits.
238 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
239 clock type just from the last COND_CLOCK_BITS bits of value.
240 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
241 instead of __clock, just from second bit of condattr's value.
243 2004-08-30 Jakub Jelinek <jakub@redhat.com>
245 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
246 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
248 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
250 2004-08-15 Roland McGrath <roland@frob.com>
252 * pthread_atfork.c: Update copyright terms including special exception
253 for these trivial files, which are statically linked into executables
254 that use dynamic linking for the significant library code.
256 2004-08-09 Jakub Jelinek <jakub@redhat.com>
258 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
259 pthread_rwlock_rdlock.
260 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
261 Decrease __nr_readers_queued after reacquiring lock.
262 * sysdeps/pthread/pthread_rwlock_timedrdlock
263 (pthread_rwlock_timedrdlock): Likewise.
264 Reported by Bob Cook <bobcook47@hotmail.com>.
266 2004-08-11 Jakub Jelinek <jakub@redhat.com>
268 * tst-rwlock14.c (tf): Read main thread handle from *ARG
269 before pthread_barrier_wait.
271 2004-08-07 Ulrich Drepper <drepper@redhat.com>
273 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
274 Remove unnecessary exception handling data.
276 2004-07-23 Jakub Jelinek <jakub@redhat.com>
279 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
280 instead of clockid_t.
282 2004-07-21 Roland McGrath <roland@redhat.com>
284 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
286 2004-07-19 Roland McGrath <roland@redhat.com>
288 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
290 2004-07-02 Roland McGrath <roland@redhat.com>
292 * configure: Don't exit.
294 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
296 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
297 (__pthread_cond_timedwait): Check for invalid nanosecond in
300 2004-07-07 Ulrich Drepper <drepper@redhat.com>
302 * Makefile: Add rules to build and run tst-fini1.
303 * tst-fini1.c: New file.
304 * tst-fini1mod.c: New file.
306 2004-07-05 Ulrich Drepper <drepper@redhat.com>
308 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
309 if no cancellation support is needed.
310 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
311 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
312 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
313 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
314 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
315 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
316 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
317 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
318 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
320 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
321 only if not already defined.
323 2004-07-05 Jakub Jelinek <jakub@redhat.com>
325 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
326 constraint "m" instead of "0" for futex.
328 * shlib-versions: Add powerpc64-.*-linux.*.
330 2004-07-04 Jakub Jelinek <jakub@redhat.com>
332 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
333 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
335 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
336 1 billion and 64-bit tv_nsec which is valid when truncated to 32
339 2004-06-29 Roland McGrath <roland@redhat.com>
341 * Banner: NPTL no longer has its own version number.
342 * Makefile (nptl-version): Variable removed.
343 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
344 using $(version), the glibc version number.
346 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
348 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
349 Fix branch offset for a PLT entry.
350 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
352 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
354 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
356 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
359 2004-06-28 Jakub Jelinek <jakub@redhat.com>
361 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
364 2004-06-28 Jakub Jelinek <jakub@redhat.com>
366 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
367 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
369 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
370 (pthread_rwlock_timedrdlock): Likewise.
372 2004-06-22 Jakub Jelinek <jakub@redhat.com>
374 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
375 Set __r7 to val, not mutex.
377 2004-06-27 Ulrich Drepper <drepper@redhat.com>
379 * Makefile: Add rules to build tst-rwlock14.
380 * tst-rwlock14.c: New file.
382 2004-06-24 Boris Hu <boris.hu@intel.com>
384 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
386 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
388 2004-06-19 Andreas Jaeger <aj@suse.de>
390 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
391 assembler in last patch.
393 2004-06-17 Ulrich Drepper <drepper@redhat.com>
395 * sysdeps/pthread/pthread_cond_timedwait.c
396 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
397 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
398 (__pthread_cond_timedwait): Check for invalid nanosecond in
400 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
401 * tst-cond19.c: New file.
402 * Makefile: Add rules to build and run tst-cond19.
404 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
406 * tst-context1.c (GUARD_PATTERN): Defined.
407 (tst_context_t): Define struct containing ucontext_t & guard words.
408 (ctx): Declare as an array of tst_context_t.
409 (fct): Verify uc_link & guard words are still valid.
410 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
412 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
414 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
415 Add __data.__futex field, reshuffle __data.__clock.
416 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
417 (__pthread_cond_signal): Increment __futex at the same time as
418 __wakeup_seq or __total_seq. Pass address of __futex instead of
419 address of low 32-bits of __wakeup_seq to futex syscall.
420 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
421 (__pthread_cond_wait): Likewise. Pass __futex value from before
422 releasing internal lock to FUTEX_WAIT.
423 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
424 (__pthread_cond_timedwait): Likewise.
425 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
426 (FUTEX_CMP_REQUEUE): Define.
427 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
428 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
429 Pass __futex value from before the unlock and __futex address instead
430 of address of low 32-bits of __wakeup_seq to futex syscall.
431 Fallback to FUTEX_WAKE all on any errors.
433 2004-06-08 Jakub Jelinek <jakub@redhat.com>
435 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
437 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
438 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
439 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
440 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
441 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
443 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
445 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
446 Add memory clobber to inline assembly.
447 (__lll_mutex_trylock): Likewise.
448 (__lll_mutex_cond_trylock): Likewise.
450 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
452 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
453 Pass val argument as 6th system call argument in %r7.
455 2004-05-21 Jakub Jelinek <jakub@redhat.com>
457 * Makefile (tests): Add tst-cond16.
458 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
459 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
460 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
461 Add __data.__futex field, reshuffle __data.__clock.
462 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
463 (__pthread_cond_signal): Increment __futex at the same time as
464 __wakeup_seq or __total_seq. Pass address of __futex instead of
465 address of low 32-bits of __wakeup_seq to futex syscall.
466 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
467 (__pthread_cond_wait): Likewise. Pass __futex value from before
468 releasing internal lock to FUTEX_WAIT.
469 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
470 (__pthread_cond_timedwait): Likewise.
471 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
472 (FUTEX_CMP_REQUEUE): Define.
473 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
474 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
475 Pass __futex value from before the unlock and __futex address instead
476 of address of low 32-bits of __wakeup_seq to futex syscall.
477 Fallback to FUTEX_WAKE all on any errors.
478 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
480 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
481 internally. Return non-zero if error, zero if success.
482 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
483 Add __data.__futex field, reshuffle __data.__clock.
484 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
486 (lll_futex_requeue): Add val argument, return 1 unconditionally
488 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
489 Add __data.__futex field, reshuffle __data.__clock.
490 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
492 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
493 internally. Return non-zero if error, zero if success.
494 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
495 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
496 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
498 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
499 internally. Return non-zero if error, zero if success.
500 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
501 Add __data.__futex field, reshuffle __data.__clock.
502 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
504 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
505 internally. Return non-zero if error, zero if success.
506 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
507 Add __data.__futex field, reshuffle __data.__clock.
508 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
509 Add __data.__futex field, reshuffle __data.__clock.
510 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
511 Increment __futex at the same time as __wakeup_seq or __total_seq.
512 Pass address of __futex instead of address of low 32-bits of
513 __wakeup_seq to futex syscall.
514 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
515 Pass __futex value from before releasing internal lock
517 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
518 Likewise. Avoid unnecessary shadowing of variables.
519 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
520 Set __futex to 2 * __total_seq. Pass __futex value from before the
521 unlock and __futex address instead of address of low 32-bits of
522 __wakeup_seq to futex_requeue macro, adjust for new return value
524 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
525 (__pthread_cond_signal): Increment __futex at the same time as
526 __wakeup_seq or __total_seq. Pass address of __futex instead of
527 address of low 32-bits of __wakeup_seq to futex syscall.
528 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
529 (__pthread_cond_wait): Likewise. Pass __futex value from before
530 releasing internal lock to FUTEX_WAIT.
531 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
532 (__pthread_cond_timedwait): Likewise.
533 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
534 (FUTEX_CMP_REQUEUE): Define.
535 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
536 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
537 Pass __futex value from before the unlock and __futex address instead
538 of address of low 32-bits of __wakeup_seq to futex syscall.
539 Fallback to FUTEX_WAKE all on any errors.
541 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
543 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
544 Add nop to align the end of critical section.
545 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
547 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
549 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
550 Add __broadcast_seq field.
551 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
552 all waiters as woken with woken_seq and bump broadcast counter.
553 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
554 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
555 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
556 Comment typo fixes. Avoid returning -ETIMEDOUT.
558 2004-06-01 Ulrich Drepper <drepper@redhat.com>
560 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
561 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
562 Reported by Kaz Kojima.
564 2004-05-25 Jakub Jelinek <jakub@redhat.com>
566 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
568 2004-05-21 Jakub Jelinek <jakub@redhat.com>
570 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
571 __broadcast_seq with bc_seq after acquiring internal lock instead of
574 2004-05-18 Jakub Jelinek <jakub@redhat.com>
576 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
578 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
579 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
580 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
581 (pthread_cond_t): Add __data.__broadcast_seq field.
582 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
583 (FRAME_SIZE): Define.
584 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
586 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
588 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
590 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
591 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
594 2004-05-18 Ulrich Drepper <drepper@redhat.com>
596 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
597 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
598 Add __broadcast_seq field.
599 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
600 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
601 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
602 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
603 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
604 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
605 all waiters as woken with woken_seq and bump broadcast counter.
606 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
607 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
608 __broadcast_seq field.
609 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
610 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
611 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
612 * pthread_cond_init.c: Initialize __broadcast_seq field.
613 * Makefile (tests): Add tst-cond17 and tst-cond18.
614 Add .NOTPARALLEL goal.
615 * tst-cond16.c: New file. From Jakub.
616 * tst-cond17.c: New file. From Jakub.
617 * tst-cond18.c: New file. From Jakub.
619 2004-05-16 Ulrich Drepper <drepper@redhat.com>
621 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
624 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
625 Parametrize frame size. Correct some unwind info.
626 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
628 2004-05-04 Jakub Jelinek <jakub@redhat.com>
630 * tst-stack3.c: Note testing functionality beyond POSIX.
632 2004-05-04 Jakub Jelinek <jakub@redhat.com>
634 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
635 Change conditional from ifdef to if.
637 2004-04-23 Jakub Jelinek <jakub@redhat.com>
639 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
640 SYSDEP_CANCEL_ERROR): Define.
643 2004-05-01 Jakub Jelinek <jakub@redhat.com>
645 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
647 2004-04-20 Jakub Jelinek <jakub@redhat.com>
649 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
651 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
653 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
654 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
655 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
656 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
658 2004-04-19 Ulrich Drepper <drepper@redhat.com>
660 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
661 thread has all signals blocked.
663 2004-04-18 Andreas Jaeger <aj@suse.de>
665 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
666 (SEM_VALUE_MAX): Add missing brace.
668 2004-04-17 Jakub Jelinek <jakub@redhat.com>
670 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
672 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
673 * sysdeps/pthread/tst-mqueue8x.c: New test.
674 * tst-cancel4.c: Update comment about message queues.
676 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
677 return it_value { 0, 0 }.
678 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
680 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
681 assertion for SIGEV_NONE.
682 (thread_attr_compare): Compare all attributes, not just a partial
685 2004-04-17 Jakub Jelinek <jakub@redhat.com>
687 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
689 2004-04-17 Ulrich Drepper <drepper@redhat.com>
691 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
692 Just use a plain number.
693 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
694 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
695 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
696 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
697 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
698 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
699 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
701 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
703 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
705 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
707 2004-04-15 Jakub Jelinek <jakub@redhat.com>
709 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
710 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
711 of calling sigwaitinfo.
713 2004-04-16 Ulrich Drepper <drepper@redhat.com>
715 * allocatestack.c (allocate_stack): Set reported_guardsize
717 * pthread_getattr_np.c (pthread_getattr_np): Use
718 reported_guardsize instead of guardsize.
719 * descr.h (struct pthread): Add reported_guardsize field.
721 2004-04-13 Jakub Jelinek <jakub@redhat.com>
723 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
725 2004-04-12 Ulrich Drepper <drepper@redhat.com>
727 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
729 2004-04-08 Jakub Jelinek <jakub@redhat.com>
731 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
732 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
733 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
734 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
735 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
737 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
738 (_POSIX_MESSAGE_PASSING): Define.
739 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
740 (_POSIX_MESSAGE_PASSING): Define.
741 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
742 (_POSIX_MESSAGE_PASSING): Define.
744 2004-04-04 Ulrich Drepper <drepper@redhat.com>
746 * tst-context1.c (fct): Check whether correct stack is used.
748 2004-04-03 Ulrich Drepper <drepper@redhat.com>
750 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
751 matching constraints for asm mem parameters.
753 * tst-clock2.c (tf): Don't define unless needed.
755 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
757 * Makefile (link-libc-static): Use $(static-gnulib) instead of
760 2004-03-30 Ulrich Drepper <drepper@redhat.com>
762 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
763 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
764 * pthreadP.h: Declare __nptl_deallocate_tsd.
765 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
768 * Makefile (tests): Add tst-tsd5.
769 * tst-tsd5.c: New file.
771 2004-03-29 Ulrich Drepper <drepper@redhat.com>
773 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
774 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
775 is SHLIB_COMPAT check.
776 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
777 (__pthread_attr_getaffinity_old): Likewise.
778 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
779 (__pthread_getaffinity_old): Likewise.
780 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
781 (__pthread_setaffinity_old): Likewise.
783 2004-03-26 Ulrich Drepper <drepper@redhat.com>
785 * allocatestack.c (_make_stacks_executable): Call
786 _dl_make_stack_executable first.
788 2004-03-24 Roland McGrath <roland@redhat.com>
790 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
791 constraint instead of "0".
793 2004-03-24 Ulrich Drepper <drepper@redhat.com>
795 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
796 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
798 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
799 code to avoid warning.
801 2004-03-24 Andreas Jaeger <aj@suse.de>
803 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
804 (__pthread_attr_setaffinity_old): Remove const.
806 2004-03-23 Ulrich Drepper <drepper@redhat.com>
808 * sysdeps/unix/sysv/linux/smp.h: New file.
809 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
810 * init.c: Define __is_smp.
811 (__pthread_initialize_minimal_internal): Call is_smp_system to
813 * pthreadP.h: Declare __is_smp.
814 Define MAX_ADAPTIVE_COUNT is necessary.
815 * pthread_mutex_init.c: Add comment regarding __spins field.
816 * pthread_mutex_lock.c: Implement adaptive mutex type.
817 * pthread_mutex_timedlock.c: Likewise.
818 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
819 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
821 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
822 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
823 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
824 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
825 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
826 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
827 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
828 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
829 lll_mutex_cond_trylock.
830 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
831 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
832 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
833 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
834 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
835 Define BUSY_WAIT_NOP.
836 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
837 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
839 * tst-mutex5.c: Add support for testing adaptive mutexes.
840 * tst-mutex7.c: Likewise.
841 * tst-mutex5a.c: New file.
842 * tst-mutex7a.c: New file.
843 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
845 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
846 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
847 vgettimeofday call might destroy the content.
849 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
852 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
853 No need to restrict type of ret. Make it int. Add comment.
855 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
856 Remove unnecessary setne instruction.
858 2004-03-22 Jakub Jelinek <jakub@redhat.com>
860 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
861 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
862 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
863 If realloc fails, break out of the loop.
865 2004-03-20 Andreas Jaeger <aj@suse.de>
867 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
868 (__pthread_setaffinity_old): Fix interface.
869 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
870 (__pthread_getaffinity_old): Likewise.
872 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
873 (__pthread_setaffinity_new): Remove duplicate declaration.
875 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
877 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
878 the return value to a safe register.
879 (CDISABLE): Set the function argument correctly.
881 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
883 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
884 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
885 Rewrite so that only one locked memory operation per round is needed.
886 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
887 (pthread_barrier_wait): After wakeup, release lock only when the
888 last thread stopped using the barrier object.
889 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
890 (__pthread_cond_wait): Don't store mutex address if the current
891 value is ~0l. Add correct cleanup support and unwind info.
892 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
893 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
894 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
895 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
896 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
897 Add correct cleanup support and unwind info.
898 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
899 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
900 information for syscall wrappers.
902 2004-03-18 Ulrich Drepper <drepper@redhat.com>
904 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
905 cpusetsize field, remove next.
906 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
907 parameter for size of the CPU set.
908 (pthread_setaffinity_np): Likewise.
909 (pthread_attr_getaffinity_np): Likewise.
910 (pthread_attr_setaffinity_np): Likewise.
911 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
912 interface change, keep compatibility code.
913 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
914 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
915 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
916 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
917 __pthread_getaffinity_np.
918 * Versions: Add version for changed interfaces.
919 * tst-attr3.c: Adjust test for interface change.
920 * pthread_getattr_np.c: Query the kernel about the affinity mask with
921 increasing buffer sizes.
922 * pthread_attr_destroy.c: Remove unused list handling.
923 * pthread_attr_init.c: Likewise.
925 2004-03-17 Roland McGrath <roland@redhat.com>
927 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
928 first argument to clock_getres so we ever enable kernel timers.
930 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
932 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
934 2004-03-12 Richard Henderson <rth@redhat.com>
936 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
937 oldvalue from CENABLE to CDISABLE.
939 2004-03-12 Ulrich Drepper <drepper@redhat.com>
941 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
942 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
943 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
944 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
946 2004-03-11 Richard Henderson <rth@redhat.com>
948 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
949 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
950 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
952 2004-03-11 Jakub Jelinek <jakub@redhat.com>
954 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
955 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
956 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
958 2004-03-11 Jakub Jelinek <jakub@redhat.com>
960 * forward.c (__pthread_cond_broadcast_2_0,
961 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
962 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
963 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
965 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
967 * sysdeps/sh/tcb-offsets.sym: Add PID.
968 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
969 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
971 2004-03-10 Ulrich Drepper <drepper@redhat.com>
973 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
974 include <sysdep-cancel.h>, vfork is no cancellation point.
975 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
976 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
977 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
979 2004-03-10 Jakub Jelinek <jakub@redhat.com>
981 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
983 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
984 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
986 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
988 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
989 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
990 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
991 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
992 of DO_CALL_VIA_BREAK. Work around a gas problem.
994 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
995 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
996 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
997 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
998 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
999 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
1001 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
1002 a local register for saving old PID. Negate PID in parent upon exit.
1004 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
1006 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
1007 before syscall, set to the old value in the parent afterwards.
1008 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1009 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
1011 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
1012 before syscall, set to the old value in the parent afterwards.
1013 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1014 * sysdeps/s390/tcb-offsets.sym: Add PID.
1016 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
1017 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1018 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
1019 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1020 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
1021 * sysdeps/sparc/tcb-offsets.sym: Add PID.
1023 2004-03-10 Andreas Schwab <schwab@suse.de>
1025 * sysdeps/ia64/tcb-offsets.sym: Add PID.
1026 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1027 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
1029 2004-03-09 Jakub Jelinek <jakub@redhat.com>
1031 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
1032 * tst-cancel21.c (do_one_test): Likewise.
1033 Reported by Gordon Jin <gordon.jin@intel.com>.
1035 2004-02-09 Jakub Jelinek <jakub@redhat.com>
1037 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
1038 if non-zero and set to INT_MIN if zero.
1039 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
1040 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
1041 (SAVE_PID, RESTORE_PID): Define.
1043 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
1044 Use relative path to avoid including NPTL i386/vfork.S.
1045 (SAVE_PID, RESTORE_PID): Define.
1046 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
1047 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
1048 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
1050 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
1051 * tst-vfork1.c: New test.
1052 * tst-vfork2.c: New test.
1053 * tst-vfork1x.c: New test.
1054 * tst-vfork2x.c: New test.
1056 2004-03-08 Ulrich Drepper <drepper@redhat.com>
1058 * sysdeps/i386/tcb-offsets.sym: Add PID.
1059 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1060 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1061 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1063 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
1065 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
1067 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
1069 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
1072 2004-03-07 Ulrich Drepper <drepper@redhat.com>
1074 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
1077 * tst-once4.c: Remove unnecessary macro definition.
1079 * tst-mutex7.c (do_test): Limit thread stack size.
1080 * tst-once2.c (do_test): Likewise.
1081 * tst-tls3.c (do_test): Likewise.
1082 * tst-tls1.c (do_test): Likewise.
1083 * tst-signal3.c (do_test): Likewise.
1084 * tst-kill6.c (do_test): Likewise.
1085 * tst-key4.c (do_test): Likewise.
1086 * tst-join4.c (do_test): Likewise.
1087 * tst-fork1.c (do_test): Likewise.
1088 * tst-context1.c (do_test): Likewise.
1089 * tst-cond2.c (do_test): Likewise.
1090 * tst-cond10.c (do_test): Likewise.
1091 * tst-clock2.c (do_test): Likewise.
1092 * tst-cancel10.c (do_test): Likewise.
1093 * tst-basic2.c (do_test): Likewise.
1094 * tst-barrier4.c (do_test): Likewise.
1096 2004-03-05 Ulrich Drepper <drepper@redhat.com>
1098 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
1100 2004-03-01 Ulrich Drepper <drepper@redhat.com>
1102 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1103 (__pthread_cond_timedwait): Optimize wakeup test.
1104 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1105 (__pthread_cond_wait): Likewise.
1106 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
1107 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1110 2004-02-29 Ulrich Drepper <drepper@redhat.com>
1112 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1113 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
1114 the atomic instruction needed.
1115 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1116 (__lll_mutex_lock_wait): Likewise.
1118 2004-02-28 Ulrich Drepper <drepper@redhat.com>
1120 * Makefile (tests): Add tst-cond14 and tst-cond15.
1121 * tst-cond14.c: New file.
1122 * tst-cond15.c: New file.
1124 2004-02-27 Ulrich Drepper <drepper@redhat.com>
1126 * sysdeps/pthread/createthread.c (create_thread): Remove use of
1127 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
1128 needs to be implemented differently to be useful.
1130 2004-02-26 Ulrich Drepper <drepper@redhat.com>
1132 * pthread_attr_setschedparam.c: Don't test priority against limits
1133 here. Set ATTR_FLAG_SCHED_SET flag.
1134 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
1135 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
1136 from parent thread to child. If attribute is used and scheduling
1137 parameters are not inherited, copy parameters from attribute or
1138 compute them. Check priority value.
1139 * pthread_getschedparam.c: If the parameters aren't known yet get
1140 them from the kernel.
1141 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
1142 ATTR_FLAG_POLICY_SET flag for thread.
1143 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
1144 and ATTR_FLAG_POLICY_SET.
1146 * sysdeps/pthread/createthread.c: Use tgkill if possible.
1148 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
1149 fail if stack address hasn't been set. Just return 0.
1151 2004-02-25 Ulrich Drepper <drepper@redhat.com>
1153 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
1154 libpthread for the files in this list.
1155 (CFLAGS-tst-unload): Removed.
1156 * tst-unload.c (do_test): Don't use complete path for
1159 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
1162 2004-02-22 Ulrich Drepper <drepper@redhat.com>
1164 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1165 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
1166 operation per round is needed.
1167 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1168 (__lll_mutex_lock_wait): Likewise.
1170 2004-02-20 Ulrich Drepper <drepper@redhat.com>
1172 * tst-cancel9.c (cleanup): Don't print to stderr.
1174 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1176 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
1178 2004-02-20 Jakub Jelinek <jakub@redhat.com>
1180 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1181 (__syscall_error_handler2): Call CDISABLE.
1182 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1183 (__syscall_error_handler2): Call CDISABLE.
1185 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1186 Release lock before the loop, don't reacquire it.
1188 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
1190 2004-02-19 Andreas Schwab <schwab@suse.de>
1192 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1195 2004-02-18 Ulrich Drepper <drepper@redhat.com>
1197 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
1198 (pthread_barrier_wait): After wakeup, release lock only when the
1199 last thread stopped using the barrier object.
1200 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
1201 (pthread_barrier_wait): Likewise.
1202 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
1204 * Makefile (tests): Add tst-barrier4.
1205 * tst-barrier4.c: New file.
1207 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1208 (__pthread_cond_timedwait): Perform timeout test while holding
1209 internal lock to prevent wakeup race.
1210 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
1211 * sysdeps/pthread/pthread_cond_timedwait.c
1212 (__pthread_cond_timedwait): Likewise.
1213 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1214 (__pthread_cond_timedwait): Likewise.
1216 2004-02-18 Jakub Jelinek <jakub@redhat.com>
1218 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
1219 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
1220 * Makefile (tests): Add tst-rwlock13.
1221 * tst-rwlock13.c: New test.
1223 2004-02-16 Ulrich Drepper <drepper@redhat.com>
1225 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1226 (__condvar_tw_cleanup): Little optimization.
1227 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
1229 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
1231 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
1232 libpthread as "lib" parameter to SHLIB_COMPAT.
1233 (__novmx_siglongjmp): Fix typo in function name.
1234 (__novmx_longjmp): Fix typo in function name.
1236 2004-02-13 Ulrich Drepper <drepper@redhat.com>
1238 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
1241 * sysdeps/generic/pt-longjmp.c: Moved to...
1242 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
1244 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
1246 * Makefile (libpthread-routines): Add pt-cleanup.
1247 * pt-longjmp.c: Removed.
1248 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
1249 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
1250 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
1251 Version longjmp, siglongjmp for GLIBC_2.3.4.
1252 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
1254 2004-02-13 Ulrich Drepper <drepper@redhat.com>
1256 * sysdeps/pthread/pthread_cond_timedwait.c
1257 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
1258 Reuse code. Add __builtin_expects.
1260 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1261 (__pthread_cond_timedwait): Get internal lock in case timeout has
1262 passed before the futex syscall.
1263 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1265 2004-01-20 Ulrich Drepper <drepper@redhat.com>
1267 * allocatestack.c: Pretty printing.
1269 * sysdeps/pthread/createthread.c (create_thread): Don't add
1270 CLONE_DETACHED bit if it is not necessary.
1272 2004-01-16 Ulrich Drepper <drepper@redhat.com>
1274 * pthread_getattr_np.c: Include ldsodefs.h.
1276 2004-01-16 Richard Henderson <rth@redhat.com>
1278 * allocatestack.c: Don't declare __libc_stack_end.
1279 * init.c (__pthread_initialize_minimal_internal): Likewise.
1280 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
1282 2004-01-15 Richard Henderson <rth@redhat.com>
1284 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
1285 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
1286 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
1287 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
1288 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
1289 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
1290 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1291 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
1293 2004-01-14 Ulrich Drepper <drepper@redhat.com>
1295 * init.c (pthread_functions): Make array const.
1297 2004-01-13 Ulrich Drepper <drepper@redhat.com>
1299 * allocatestack.c (__make_stacks_executable): Change interface.
1300 Check parameters. Pass parameter on to libc counterpart.
1301 * pthreadP.h: Change declaration.
1303 2004-01-13 Richard Henderson <rth@redhat.com>
1305 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
1307 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
1310 * sysdeps/alpha/Makefile: New file.
1311 * sysdeps/alpha/tcb-offsets.sym: New file.
1312 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1313 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
1315 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
1318 2004-01-08 Jakub Jelinek <jakub@redhat.com>
1320 * Makefile (tests): Add tst-backtrace1.
1321 * tst-backtrace1.c: New test.
1323 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
1325 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
1326 register as second parameter to the REGISTER macro.
1327 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
1328 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
1329 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
1330 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
1331 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
1332 of thread register as second parameter to REGISTER macro in 64 case.
1334 2004-01-03 Ulrich Drepper <drepper@redhat.com>
1336 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
1337 (CFLAGS-getpid.o): Defined.
1338 (CFLAGS-getpid.os): Defined.
1340 2003-12-31 Ulrich Drepper <drepper@redhat.com>
1342 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
1343 returned for main thread does not overlap with any other VMA.
1344 Patch by Jakub Jelinek.
1346 2003-12-29 Jakub Jelinek <jakub@redhat.com>
1348 * tst-raise1.c: Include stdio.h.
1350 2003-12-23 Jakub Jelinek <jakub@redhat.com>
1352 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
1353 setting with __ASSUME_TGKILL || defined __NR_tgkill.
1354 If pid is 0, set it to selftid.
1355 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
1356 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
1357 != 0, return self->tid without doing a syscall.
1358 * descr.h (struct pthread): Move pid field after tid.
1360 * Makefile (tests): Add tst-raise1.
1361 * tst-raise1.c: New file.
1363 2003-12-23 Roland McGrath <roland@redhat.com>
1365 * tst-oddstacklimit.c: New file.
1366 * Makefile (tests): Add it.
1367 (tst-oddstacklimit-ENV): New variable.
1369 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
1370 value up to page size for __default_stacksize.
1372 2003-12-21 Ulrich Drepper <drepper@redhat.com>
1374 * Makefile (tests): Add tst-eintr5.
1375 * tst-eintr5.c: New file.
1377 * eintr.c (eintr_source): Prevent sending signal to self.
1379 * tst-eintr2.c (tf1): Improve error message.
1381 2003-12-20 Ulrich Drepper <drepper@redhat.com>
1383 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
1384 * sysdeps/unix/sysv/linux/getpid.c: New file.
1385 * pthread_cancel.c: Add comment explaining use of PID field.
1386 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1387 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
1388 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
1389 temporarily to signal the field must not be relied on and updated
1391 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
1392 temporarily negative.
1393 * sysdeps/unix/sysv/linux/raise.c: Likewise.
1395 2003-12-19 Ulrich Drepper <drepper@redhat.com>
1397 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
1398 (eintr_source): If ARG != NULL, use pthread_kill.
1399 * tst-eintr1.c: Adjust for this change.
1400 * tst-eintr2.c: Likewise.
1401 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
1402 * tst-eintr3.c: New file.
1403 * tst-eintr4.c: New file.
1405 2003-12-19 Jakub Jelinek <jakub@redhat.com>
1407 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
1408 if CANCELSTATE_BITMASK is set.
1409 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
1412 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
1413 (tests-reverse): Add tst-cancel23.
1414 * tst-cancel22.c: New test.
1415 * tst-cancel23.c: New test.
1417 2003-12-18 Ulrich Drepper <drepper@redhat.com>
1419 * tst-eintr1.c: Better error messages.
1421 * Makefile (tests): Add tst-eintr2.
1422 * tst-eintr2.c: New file.
1424 2003-12-18 Jakub Jelinek <jakub@redhat.com>
1426 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
1427 (CFLAGS-tst-cancelx21.c): Set.
1428 * tst-cancel21.c: New test.
1429 * tst-cancelx21.c: New test.
1431 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
1433 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
1434 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
1435 * pt-longjmp.c: Include jmpbuf-unwind.h.
1436 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
1437 _JMPBUF_UNWINDS. Adjust compared pointers.
1438 * init.c (__pthread_initialize_minimal_internal): Initialize
1439 pd->stackblock_size.
1440 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
1441 * sysdeps/alpha/jmpbuf-unwind.h: New file.
1442 * sysdeps/i386/jmpbuf-unwind.h: New file.
1443 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
1444 * sysdeps/s390/jmpbuf-unwind.h: New file.
1445 * sysdeps/sh/jmpbuf-unwind.h: New file.
1446 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
1447 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
1448 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
1449 (_JMPBUF_CFA_UNWINDS): Remove.
1450 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
1452 2003-12-12 Jakub Jelinek <jakub@redhat.com>
1454 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
1455 (CFLAGS-tst-cancelx20.c): Set.
1456 * tst-cancel20.c: New test.
1457 * tst-cancelx20.c: New test.
1459 2003-12-17 Ulrich Drepper <drepper@redhat.com>
1461 * init.c (__pthread_initialize_minimal_internal): Don't treat
1462 architectures with separate register stack special here when
1463 computing default stack size.
1465 2003-12-17 Roland McGrath <roland@redhat.com>
1467 * Makefile (tst-cancelx7-ARGS): New variable.
1468 Reportd by Greg Schafer <gschafer@zip.com.au>.
1470 2003-12-17 Jakub Jelinek <jakub@redhat.com>
1472 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
1473 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
1474 (tst-stack3-ENV): Set.
1475 ($(objpfx)tst-stack3-mem): New.
1476 * tst-stack3.c: New test.
1478 2003-12-10 David Mosberger <davidm@hpl.hp.com>
1480 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
1481 Add unwind directives. Drop unused .regstk directive.
1482 (_fini_EPILOG_BEGINS): Add unwind directives.
1484 2003-12-11 Ulrich Drepper <drepper@redhat.com>
1486 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
1487 Assume parameter is a pointer.
1488 (lll_futex_wake): Likewise.
1489 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
1491 (lll_futex_wake): Likewise.
1492 Reported by Boris Hu.
1493 * sysdeps/unix/sysv/linux/unregister-atfork.c
1494 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
1496 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
1498 2003-12-10 Ulrich Drepper <drepper@redhat.com>
1500 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
1501 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
1502 __rtld_lock_initialize for ld.so lock.
1503 Patch in part by Adam Li <adam.li@intel.com>.
1505 2003-12-02 David Mosberger <davidm@hpl.hp.com>
1507 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
1508 in $(gnulib). Also, remove stale comment.
1510 2003-11-12 David Mosberger <davidm@hpl.hp.com>
1512 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
1513 advantage of new syscall stub and optimize accordingly.
1515 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
1516 from SYS_futex, to match expectations of
1517 sysdep.h:DO_INLINE_SYSCALL.
1518 (lll_futex_clobbers): Remove.
1519 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
1520 (lll_futex_wake): Likewise.
1521 (lll_futex_requeue): Likewise.
1522 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
1523 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
1525 (__lll_mutex_lock): Likewise.
1526 (__lll_mutex_cond_lock): Likewise.
1527 (__lll_mutex_timed_lock): Likewise.
1528 (__lll_mutex_unlock): Likewise.
1529 (__lll_mutex_unlock_force): Likewise.
1531 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
1532 comes before the include of <sysdep.h>.
1533 (THREAD_SELF_SYSINFO): New macro.
1534 (THREAD_SYSINFO): Likewise.
1535 (INIT_SYSINFO): New macro.
1536 (TLS_INIT_TP): Call INIT_SYSINFO.
1538 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
1540 * sysdeps/pthread/createthread.c (create_thread): Use
1541 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
1542 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
1543 THREAD_SELF_SYSINFO instead of open code.
1544 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
1545 (THREAD_SYSINFO): Likewise.
1547 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
1549 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
1551 2003-12-06 Ulrich Drepper <drepper@redhat.com>
1553 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
1554 instead of .init. Patch by David Mosberger.
1556 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
1558 * sysdeps/pthread/configure.in: Remove broken declaration in C
1559 cleanup handling check.
1561 2003-11-30 Andreas Jaeger <aj@suse.de>
1563 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
1564 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1567 2003-11-27 Jakub Jelinek <jakub@redhat.com>
1569 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
1570 * pthread_attr_destroy.c: Include shlib-compat.h.
1571 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
1572 is set in iattr->flags.
1573 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
1575 2003-11-21 Jakub Jelinek <jakub@redhat.com>
1577 * Makefile (distribute): Add tst-cleanup4aux.c.
1579 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
1582 2003-11-21 Ulrich Drepper <drepper@redhat.com>
1584 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
1585 pthread_cond_signal.
1587 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
1588 store mutex address if the current value is ~0l.
1589 * sysdeps/pthread/pthread_cond_timedwait.c
1590 (__pthread_cond_timedwait): Likewise.
1591 * sysdeps/pthread/pthread_cond_broadcast.c
1592 (__pthread_cond_broadcast): Don't use requeue for pshared
1595 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1596 (__pthread_cond_wait): Don't store mutex address if the current
1598 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1599 (__pthread_cond_timedwait): Likewise.
1600 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1601 (__pthread_cond_broadcast): Don't use requeue for pshared
1604 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
1605 element with ~0l for pshared condvars, with NULL otherwise.
1607 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1608 (__pthread_cond_wait): Don't store mutex address if the current
1610 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1611 (__pthread_cond_timedwait): Likewise.
1612 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1613 (__pthread_cond_broadcast): Don't use requeue for pshared
1616 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
1617 * tst-cond12.c: New file.
1618 * tst-cond13.c: New file.
1620 2003-11-17 Ulrich Drepper <drepper@redhat.com>
1622 * sysdeps/pthread/configure.in: Make missing forced unwind support
1625 2003-11-11 Ulrich Drepper <drepper@redhat.com>
1627 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
1629 2003-11-06 Ulrich Drepper <drepper@redhat.com>
1631 * Makefile: Add magic to clean up correctly.
1633 2003-11-05 Jakub Jelinek <jakub@redhat.com>
1635 * unwind.c (FRAME_LEFT): Define.
1636 (unwind_stop): Handle old style cleanups here.
1637 (__pthread_unwind): Handle old style cleanups only if
1638 !HAVE_FORCED_UNWIND.
1639 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
1640 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
1641 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
1642 ($(objpfx)tst-cleanupx4): Likewise.
1643 * tst-cleanup4.c: New test.
1644 * tst-cleanup4aux.c: New.
1645 * tst-cleanupx4.c: New test.
1647 2003-11-04 Ulrich Drepper <drepper@redhat.com>
1649 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
1650 lll_mutex_*lock macros to skip atomic operations on some archs.
1652 2003-11-03 Ulrich Drepper <drepper@redhat.com>
1654 * sysdeps/pthread/tst-timer.c (main): Initialize
1655 sigev2.sigev_value as well.
1657 2003-10-15 Roland McGrath <roland@redhat.com>
1659 * sysdeps/pthread/configure.in: Barf if visibility attribute support
1661 * sysdeps/pthread/configure: Regenerated.
1663 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1665 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
1666 locking macros. No distinction between normal and mutex locking
1668 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
1669 Merge bits from lowlevelmutex.S we still need.
1670 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
1671 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
1672 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
1673 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
1674 new mutex implementation.
1675 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
1676 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
1677 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1678 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1679 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1680 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1681 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1682 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1683 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1684 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
1685 symbol for entry point to avoid cancellation.
1687 2003-10-07 Jakub Jelinek <jakub@redhat.com>
1689 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
1691 (SAVE_OLDTYPE_0): Fix a typo.
1693 2003-10-03 Ulrich Drepper <drepper@redhat.com>
1695 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
1696 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
1698 2003-10-02 Ulrich Drepper <drepper@redhat.com>
1700 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
1703 2003-10-02 Jakub Jelinek <jakub@redhat.com>
1705 * Makefile (tests): Add tst-cancel19.
1706 * tst-cancel19.c: New test.
1708 2003-10-02 Ulrich Drepper <drepper@redhat.com>
1710 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
1711 restoring of the old cancellation type.
1713 2003-09-30 Jakub Jelinek <jakub@redhat.com>
1715 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
1717 2003-09-27 Wolfram Gloger <wg@malloc.de>
1719 * sysdeps/pthread/malloc-machine.h: New file
1721 2003-09-24 Roland McGrath <roland@redhat.com>
1723 * allocatestack.c (__make_stacks_executable): Don't ignore return
1724 value from _dl_make_stack_executable.
1726 2003-09-24 Ulrich Drepper <drepper@redhat.com>
1728 * allocatestack.c (__make_stacks_executable): Also change
1729 permission of the currently unused stacks.
1731 * allocatestack.c (change_stack_perm): Split out from
1732 __make_stacks_executable.
1733 (allocate_stack): If the required permission changed between the time
1734 we started preparing the stack and queueing it, change the permission.
1735 (__make_stacks_executable): Call change_stack_perm.
1737 * Makefile: Build tst-execstack-mod locally.
1738 * tst-execstack-mod.c: New file.
1740 2003-09-23 Jakub Jelinek <jakub@redhat.com>
1742 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
1744 2003-09-23 Roland McGrath <roland@redhat.com>
1746 * tst-execstack.c: New file.
1747 * Makefile (tests): Add it.
1748 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
1749 (LDFLAGS-tst-execstack): New variable.
1751 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
1752 whether to use PROT_EXEC for stack mmap.
1753 (__make_stacks_executable): New function.
1754 * pthreadP.h: Declare it.
1755 * init.c (__pthread_initialize_minimal_internal): Set
1756 GL(dl_make_stack_executable_hook) to that.
1758 2003-09-22 Ulrich Drepper <drepper@redhat.com>
1760 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
1761 recommendation from AMD re avoidance of lock prefix.
1763 2003-09-22 Jakub Jelinek <jakub@redhat.com>
1765 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
1766 lll_futex_timed_wait instead of lll_futex_wait.
1767 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
1768 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
1769 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
1770 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
1771 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
1772 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
1773 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
1774 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
1775 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
1776 Completely revamp the locking macros. No distinction between
1777 normal and mutex locking anymore.
1778 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1779 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
1780 __lll_lock_timedwait): Fix prototypes.
1781 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
1782 __lll_lock_timedwait): Likewise.
1783 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
1784 macros, add __builtin_expect.
1785 (lll_mutex_timedlock): Likewise. Fix return value.
1786 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
1787 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
1788 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
1789 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
1790 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
1791 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
1792 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
1793 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
1795 2003-09-22 Ulrich Drepper <drepper@redhat.com>
1797 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1798 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
1799 operation if possible.
1801 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
1802 like jumping over the lock prefix.
1804 2003-09-21 Ulrich Drepper <drepper@redhat.com>
1806 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
1807 locking macros. No distinction between normal and mutex locking
1809 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1810 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1811 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1812 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
1813 locking. Merge bits from lowlevelmutex.S we still need.
1814 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1815 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1816 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
1817 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
1818 * Makefile (routines): Remove libc-lowlevelmutex.
1819 (libpthread-rountines): Remove lowlevelmutex.
1820 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
1821 for new mutex implementation.
1822 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1823 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1825 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1826 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1828 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1830 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1831 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1832 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
1833 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1834 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1835 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1836 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1837 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1839 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1841 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1842 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1843 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1845 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1846 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
1848 2003-09-20 Ulrich Drepper <drepper@redhat.com>
1850 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
1851 in parameters of asm with output parameters.
1853 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
1854 type of DECR parameter to int.
1855 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
1857 2003-09-18 Jakub Jelinek <jakub@redhat.com>
1859 * tst-attr3.c (tf, do_test): Print stack start/end/size and
1860 guardsize for each thread.
1862 2003-09-17 Jakub Jelinek <jakub@redhat.com>
1864 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
1865 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1866 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
1868 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
1869 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
1871 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
1872 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
1873 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1874 (pthread_getaffinity_np): Add hidden_def.
1876 * Makefile (tests): Add tst-attr3.
1877 * tst-attr3.c: New test.
1879 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
1881 2003-09-15 Jakub Jelinek <jakub@redhat.com>
1883 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
1884 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
1886 2003-09-17 Jakub Jelinek <jakub@redhat.com>
1888 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
1889 * tst-align.c: Include tst-stack-align.h.
1890 (tf, do_test): Use TEST_STACK_ALIGN macro.
1892 2003-09-17 Ulrich Drepper <drepper@redhat.com>
1894 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
1897 2003-09-16 Ulrich Drepper <drepper@redhat.com>
1899 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
1900 stack-related values for the initial thread.
1902 2003-09-15 Jakub Jelinek <jakub@redhat.com>
1904 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
1906 2003-09-11 Ulrich Drepper <drepper@redhat.com>
1908 * pthread_mutex_lock.c: Minor code rearrangements.
1910 2003-09-05 Roland McGrath <roland@redhat.com>
1912 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
1913 Instead, include ../nptl_db/db_info.c to do its magic.
1914 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
1915 (__pthread_pthread_key_2ndlevel_size): Likewise.
1916 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
1917 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
1918 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
1919 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
1920 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
1921 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
1922 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
1923 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
1924 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
1925 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
1926 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
1927 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
1928 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
1929 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
1930 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
1931 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
1932 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
1934 2003-09-08 Ulrich Drepper <drepper@redhat.com>
1936 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
1937 of pthread_t to be compatible with LT.
1938 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1939 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1940 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1941 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1942 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1943 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1944 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1946 2003-09-04 Ulrich Drepper <drepper@redhat.com>
1948 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
1950 2003-09-04 Jakub Jelinek <jakub@redhat.com>
1952 * unwind-forcedunwind.c: Move to...
1953 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
1954 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
1955 * sysdeps/pthread/jmpbuf-unwind.h: New file.
1956 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
1957 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
1958 * unwind.c: Include jmpbuf-unwind.h.
1959 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
1961 2003-09-02 Jakub Jelinek <jakub@redhat.com>
1963 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
1964 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
1965 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
1966 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
1967 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1968 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
1969 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
1970 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
1971 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
1972 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
1973 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
1975 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
1976 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
1977 * Makefile (tests): Add tst-stack2.
1978 * tst-stack2.c: New test.
1979 * tst-stack1.c: Include limits.h and sys/param.h.
1980 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
1982 * pthread_condattr_setpshared.c: Include errno.h.
1983 (pthread_condattr_setpshared): Return EINVAL if pshared
1984 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
1986 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
1987 defined symbol for entry point to avoid cancellation.
1988 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1990 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1992 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
1994 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
1996 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1998 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
1999 __close_nocancel, __read_nocancel, __write_nocancel,
2000 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
2001 libpthread.so or librt.so, define to corresponding function
2002 without _nocancel suffix.
2003 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
2004 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
2005 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
2007 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
2009 2003-09-02 Ulrich Drepper <drepper@redhat.com>
2011 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
2012 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
2014 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
2015 in subsections has a symbol associated with it.
2017 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
2018 defined symbol for entry point to avoid cancellation.
2019 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
2021 2003-09-01 Jakub Jelinek <jakub@redhat.com>
2023 * Makefile (tests): Add tst-tls5.
2024 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
2025 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
2026 ($(objpfx)tst-tls5): New.
2027 ($(objpfx)tst-tls6.out): Likewise.
2028 (tests): Depend on $(objpfx)tst-tls6.out.
2029 * tst-tls3.c: Include stdint.h and pthreaddef.h.
2030 (do_test): Check pthread_self () return value alignment.
2031 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
2032 (tf): Check pthread_self () return value alignment.
2033 * tst-tls5.c: New test.
2035 * tst-tls5mod.c: New.
2036 * tst-tls5moda.c: New.
2037 * tst-tls5modb.c: New.
2038 * tst-tls5modc.c: New.
2039 * tst-tls5modd.c: New.
2040 * tst-tls5mode.c: New.
2041 * tst-tls5modf.c: New.
2042 * tst-tls6.sh: New test.
2044 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
2045 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
2046 * init.c (pthread_functions): Initialize them.
2047 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
2048 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
2049 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
2050 pthread_cond_timedwait@@GLIBC_2.3.2.
2052 2003-09-01 Jakub Jelinek <jakub@redhat.com>
2054 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
2055 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
2056 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
2057 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
2058 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
2059 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
2061 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2063 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
2064 _POSIX_THREAD_PRIORITY_SCHEDULING.
2065 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
2067 2003-08-31 Ulrich Drepper <drepper@redhat.com>
2069 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
2070 nested function, use static inline function from libio.h.
2071 Code by Richard Henderson.
2073 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
2076 2003-08-30 Jakub Jelinek <jakub@redhat.com>
2078 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
2079 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
2080 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
2081 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
2082 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
2083 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
2084 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
2085 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
2086 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
2087 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
2088 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
2089 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
2090 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
2091 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
2092 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2093 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
2094 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
2095 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
2096 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
2097 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
2098 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
2099 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
2100 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
2101 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
2102 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
2103 * sysdeps/sparc/tls.h: New file.
2104 * sysdeps/sparc/tcb-offsets.sym: New file.
2105 * sysdeps/sparc/Makefile: New file.
2106 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
2107 * init.c [__sparc__] (__NR_set_tid_address): Define.
2109 2003-08-29 Jakub Jelinek <jakub@redhat.com>
2111 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
2112 _IO_release_lock): Define.
2114 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
2116 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
2117 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
2119 2003-08-27 Ulrich Drepper <drepper@redhat.com>
2121 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
2122 (__pthread_cleanup_class): Add missing return types of member
2125 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
2127 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2128 (lll_mutex_unlock_force): Add memory barrier between store and futex
2131 2003-08-25 Ulrich Drepper <drepper@redhat.com>
2133 * tst-cancel4.c (do_test): Also unlink tempfname and remove
2134 tempmsg in first loop.
2136 2003-08-18 Ulrich Drepper <drepper@redhat.com>
2138 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2139 _POSIX_THREAD_PRIORITY_SCHEDULING.
2140 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2142 2003-08-07 Jakub Jelinek <jakub@redhat.com>
2144 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
2145 (__rtld_lock_default_lock_recursive,
2146 __rtld_lock_default_unlock_recursive): Define.
2147 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
2148 __rtld_lock_unlock_recursive): Define using
2149 GL(_dl_rtld_*lock_recursive).
2150 * init.c (__pthread_initialize_minimal_internal): Initialize
2151 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
2152 Lock GL(_dl_load_lock) the same number of times as
2153 GL(_dl_load_lock) using non-mt implementation was nested.
2155 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
2156 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
2158 2003-08-06 Jakub Jelinek <jakub@redhat.com>
2160 * tst-cancel17.c (do_test): Make len2 maximum of page size and
2163 2003-08-07 Jakub Jelinek <jakub@redhat.com>
2165 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
2167 2003-08-03 Jakub Jelinek <jakub@redhat.com>
2169 * sysdeps/pthread/createthread.c (do_clone): Move error handling
2170 to first syscall error check. Move syscall error check for tkill
2171 into __ASSUME_CLONE_STOPPED #ifdef.
2173 2003-08-02 Ulrich Drepper <drepper@redhat.com>
2175 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
2176 is not defined, do explicit synchronization.
2177 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
2178 is not defined also unlock pd->lock for non-debugging case in case
2180 * pthread_create.c (start_thread): Always get and release pd->lock
2181 if __ASSUME_CLONE_STOPPED is not defined.
2182 (start_thread_debug): Removed. Adjust users.
2183 * allocatestack.c (allocate_stack): Always initialize lock if
2184 __ASSUME_CLONE_STOPPED is not defined.
2185 * Makefile (tests): Add tst-sched1.
2186 * tst-sched1.c: New file.
2188 * sysdeps/pthread/createthread.c (do_clone): Only use
2189 sched_setschduler and pass correct parameters.
2191 2003-07-31 Jakub Jelinek <jakub@redhat.com>
2193 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
2194 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
2195 PTHREAD_STACK_MIN in comments.
2197 2003-07-31 Jakub Jelinek <jakub@redhat.com>
2199 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2200 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
2202 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
2203 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
2204 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
2205 (__pthread_cleanup_upto): Fix prototype.
2206 (_longjmp_unwind): Adjust caller.
2207 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
2208 Change second argument to const struct pointer.
2209 * tst-sem8.c (main): Remove unused s2 and s3 variables.
2210 * tst-sem9.c (main): Likewise.
2211 * unwind.c: Include string.h for strlen prototype.
2213 2003-07-31 Ulrich Drepper <drepper@redhat.com>
2215 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2216 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
2217 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
2219 Patch by Nicholas Miell <nmiell@attbi.com>.
2221 2003-07-30 Jakub Jelinek <jakub@redhat.com>
2223 * init.c (__pthread_initialize_minimal_internal): Initialize
2224 GL(dl_init_static_tls).
2225 * pthreadP.h (__pthread_init_static_tls): New prototype.
2226 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
2228 * Makefile (tests): Add tst-tls4.
2229 (modules-names): Add tst-tls4moda and tst-tls4modb.
2230 ($(objpfx)tst-tls4): Link against libdl and libpthread.
2231 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
2233 * tst-tls4.c: New file.
2234 * tst-tls4moda.c: New file.
2235 * tst-tls4modb.c: New file.
2237 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
2239 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
2240 before __timer_dealloc.
2241 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
2242 Don't call list_unlink.
2244 2003-07-29 Roland McGrath <roland@redhat.com>
2246 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
2248 2003-07-25 Jakub Jelinek <jakub@redhat.com>
2250 * tst-cancel17.c (do_test): Check if aio_cancel failed.
2251 Don't reuse struct aiocb A if it failed.
2252 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
2253 not just one byte, as that does not block.
2255 2003-07-22 Jakub Jelinek <jakub@redhat.com>
2257 * sysdeps/pthread/unwind-resume.c: New file.
2258 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
2259 unwind-resume in csu subdir.
2260 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
2262 (librt-sysdep_routines, librt-shared-only-routines): Add
2264 * sysdeps/pthread/rt-unwind-resume.c: New file.
2265 * unwind-forcedunwind.c: New file.
2266 * Makefile (libpthread-routines): Add unwind-forcedunwind.
2267 (libpthread-shared-only-routines): Likewise.
2268 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
2269 * pthreadP.h (pthread_cancel_init): New prototype.
2270 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
2272 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
2273 attr argument const struct pthread_attr *.
2275 * res.c (__res_state): Return __resp.
2276 * descr.h: Include resolv.h.
2277 (struct pthread): Add res field.
2278 * pthread_create.c: Include resolv.h.
2279 (start_thread): Initialize __resp.
2280 * Makefile (tests): Add tst-_res1.
2281 (module-names): Add tst-_res1mod1, tst-_res1mod2.
2282 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
2283 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
2285 * tst-_res1.c: New file.
2286 * tst-_res1mod1.c: New file.
2287 * tst-_res1mod2.c: New file.
2289 2003-07-21 Ulrich Drepper <drepper@redhat.com>
2291 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
2293 * Makefile: Define various *-no-z-defs variables for test DSOs
2294 which has undefined symbols.
2296 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
2298 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2299 Retry if the stwcx fails to store once_control.
2301 2003-07-20 Ulrich Drepper <drepper@redhat.com>
2303 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
2304 pthread_attr_setaffinity.
2305 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
2306 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
2307 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
2308 * pthread_attr_destroy.c: Free cpuset element if allocated.
2309 * pthread_create.c: Pass iattr as additional parameter to
2311 * sysdeps/pthread/createthread.c: If attribute is provided and
2312 a new thread is created with affinity set or scheduling parameters,
2313 start thread with CLONE_STOPPED.
2314 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
2315 pthread_attr_setaffinity.
2316 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2319 2003-07-15 Ulrich Drepper <drepper@redhat.com>
2321 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
2323 2003-07-14 Ulrich Drepper <drepper@redhat.com>
2325 * sysdeps/pthread/configure.in: Require CFI directives also for
2328 2003-07-15 Jakub Jelinek <jakub@redhat.com>
2330 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
2333 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2335 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
2337 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
2338 registers as variables. Call __pthread_mutex_unlock_usercnt.
2339 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2340 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
2341 not self pointer in __writer. Compare with TID to determine
2343 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2344 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2346 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2348 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
2349 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
2350 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
2351 macros also when compiling librt.
2353 2003-07-11 Jakub Jelinek <jakub@redhat.com>
2355 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
2356 -fasynchronous-unwind-tables.
2357 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2358 (PSEUDO): Add cfi directives.
2359 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
2361 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
2364 2003-07-08 Jakub Jelinek <jakub@redhat.com>
2366 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
2367 __pthread_unregister_cancel): Add prototypes and hidden_proto.
2368 * unwind.c (__pthread_unwind_next): Add hidden_def.
2369 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
2371 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2372 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2373 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2375 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2376 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2378 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
2379 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
2380 __pthread_unregister_cancel and __pthread_unwind_next.
2382 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2384 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
2385 different symbol for the cancellation syscall wrapper and
2386 non-cancellation syscall wrapper.
2387 (PSEUDO_END): Define.
2389 2003-07-05 Richard Henderson <rth@redhat.com>
2391 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
2392 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
2393 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
2394 return actual return value from the syscall, not 0.
2396 2003-07-07 Ulrich Drepper <drepper@redhat.com>
2398 * descr.h (struct pthread): Add pid field.
2399 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
2400 (__reclaim_stacks): Likewise.
2401 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
2402 also check for PID of the signal source.
2403 (__pthread_initialize_minimal_internal): Also initialize pid field
2404 of initial thread's descriptor.
2405 * pthread_cancel.c: Use tgkill instead of tkill if possible.
2406 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2407 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
2408 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2409 * sysdeps/unix/sysv/linux/raise.c: Likewise.
2411 2003-07-05 Ulrich Drepper <drepper@redhat.com>
2413 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
2414 Fix use of parameter.
2415 (__libc_cleanup_pop): Likewise.
2417 2003-07-04 Ulrich Drepper <drepper@redhat.com>
2419 * init.c (sigcancel_handler): Change parameters to match handler
2420 for SA_SIGACTION. Check signal number and code to recognize
2421 invalid invocations.
2423 2003-07-03 Roland McGrath <roland@redhat.com>
2425 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
2426 Apply sizeof (struct pthread) bias to r13 value.
2428 2003-07-03 Ulrich Drepper <drepper@redhat.com>
2430 * sysdeps/pthread/configure.in: Require CFI directives.
2432 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
2434 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
2435 libpthread compilation.
2436 * unwind.c (__pthread_unwind): Add hidden_def.
2437 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
2439 2003-07-01 Ulrich Drepper <drepper@redhat.com>
2441 * libc-cancellation.c (__libc_cleanup_routine): Define.
2442 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
2443 (__pthread_cleanup_pop): Define.
2445 2003-07-01 Richard Henderson <rth@redhat.com>
2447 * sysdeps/alpha/elf/pt-initfini.c: New file.
2448 * sysdeps/alpha/pthread_spin_lock.S: New file.
2449 * sysdeps/alpha/pthread_spin_trylock.S: New file.
2450 * sysdeps/alpha/pthreaddef.h: New file.
2451 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
2452 * sysdeps/alpha/tls.h: New file.
2453 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
2454 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
2455 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
2456 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
2457 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
2458 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
2459 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
2460 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
2461 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
2462 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
2464 2003-07-01 Ulrich Drepper <drepper@redhat.com>
2466 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
2467 cleanup support and unwind info.
2469 2003-06-30 Ulrich Drepper <drepper@redhat.com>
2471 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
2472 Use correct cleanup handler registration. Add unwind info.
2473 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
2474 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
2475 * tst-once3.c: Add cleanup handler and check it is called.
2476 * tst-once4.c: Likewise.
2477 * tst-oncex3.c: New file.
2478 * tst-oncex4.c: New file.
2479 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
2481 2003-06-29 Ulrich Drepper <drepper@redhat.com>
2483 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
2485 2003-06-27 Ulrich Drepper <drepper@redhat.com>
2487 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
2488 (tf_msgsnd): Likewise.
2490 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
2491 premature returns a bit more.
2493 2003-06-26 Ulrich Drepper <drepper@redhat.com>
2495 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
2496 definition to the front.
2498 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
2499 the cleanup functions to make the names unique. Fix dwarf opcode
2501 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
2502 functions to make the names unique. Fix CFA offset for two blocks.
2504 2003-06-25 Ulrich Drepper <drepper@redhat.com>
2506 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
2507 missing closing braces.
2508 Patch by Christophe Saout <christophe@saout.de>.
2510 2003-06-24 Roland McGrath <roland@redhat.com>
2512 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
2514 2003-06-24 Ulrich Drepper <drepper@redhat.com>
2516 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
2517 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
2519 * pthreadP.h: Declare __find_thread_by_id.
2520 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
2521 * pthread_clock_gettime.c: Allow using other thread's clock.
2522 * pthread_clock_settime.c: Likewise.
2523 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
2524 * Makefile: Add rules to build and run tst-clock2.
2525 * tst-clock2.c: New file.
2527 2003-06-23 Ulrich Drepper <drepper@redhat.com>
2529 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
2530 to use exception-based cleanup handler.
2531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2533 * tst-cond8.c (ch): Announce that we are done.
2535 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
2537 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
2538 Also test aio_suspend with timeout value.
2540 2003-06-22 Ulrich Drepper <drepper@redhat.com>
2542 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
2543 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
2546 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
2547 (__pthread_mutex_lock_internal): Likewise.
2548 (__pthread_mutex_unlock_internal): Likewise.
2549 (__pthread_mutex_unlock_usercnt): Declare.
2550 * pthread_mutex_destroy.c: Always fail if used in any way.
2551 * pthread_mutex_init.c: Update comment.
2552 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
2553 * pthread_mutex_timedlock.c: Adjust __nusers.
2554 * pthread_mutex_trylock.c: Adjust __nusers.
2555 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
2556 and public interfaces are wrapper with pass additional parameter.
2557 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
2559 * tst-mutex8.c: New file.
2560 * Makefile (tests): Add tst-mutex8.
2561 * sysdeps/pthread/pthread_cond_timedwait.c: Call
2562 __pthread_mutex_unlock_usercnt.
2563 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2564 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2565 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2566 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2567 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2568 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
2569 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2571 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2572 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2573 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2574 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2575 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2577 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
2578 * pthread_mutex_timedlock.c: Likewise.
2579 * pthread_mutex_trylock.c: Adjust __nusers.
2580 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
2581 * tst-mutex9.c: New file.
2582 * Makefile (tests): Add tst-mutex9.
2583 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
2584 * sysdeps/ia64/tls.h: Likewise.
2585 * sysdeps/powerpc/tls.h: Likewise.
2586 * sysdeps/s390/tls.h: Likewise.
2587 * sysdeps/sh/tls.h: Likewise.
2588 * sysdeps/x86_64/tls.h: Likewise.
2589 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2590 Change type of __owner.
2591 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2592 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2593 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2594 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2595 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2597 2003-06-19 Jakub Jelinek <jakub@redhat.com>
2599 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
2600 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
2602 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
2603 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
2604 instead of nr to lll_futex_wake. Only set errno and return -1
2607 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
2608 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
2609 return actual return value from the syscall, not 0.
2611 2003-06-18 Ulrich Drepper <drepper@redhat.com>
2613 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
2614 find a random value.
2615 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
2618 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
2619 compat_timer_settime.
2620 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
2621 compat_timer_gettime.
2622 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
2623 compat_timer_getoverrun.
2624 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
2625 compat_timer_delete.
2627 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
2628 error-checking mutex detect busy mutexes.
2630 2003-06-17 Ulrich Drepper <drepper@redhat.com>
2632 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
2633 Add ax to clobber list.
2634 (lll_mutex_cond_lock): Likewise.
2635 (lll_mutex_unlock): Likewise.
2636 (lll_lock): Likewise.
2637 (lll_unlock): Likewise.
2639 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
2640 * tst-cancel18.c: New file.
2641 * tst-cancelx18.c: New file.
2643 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
2646 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
2647 * tst-cancel17.c: New file.
2648 * tst-cancelx17.c: New file.
2650 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
2651 * sysdeps/unix/sysv/linux/sigwait.c: New file.
2652 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
2654 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
2656 2003-06-16 Jakub Jelinek <jakub@redhat.com>
2658 * sysdeps/pthread/createthread.c (create_thread): Set
2659 header.multiple_threads unconditionally.
2660 * allocatestack.c (allocate_stack): Likewise.
2661 * descr.h (struct pthread): Add header.multiple_threads
2663 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
2664 Define for librt. #error if neither libpthread, libc nor librt.
2665 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
2667 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
2668 CDISABLE): Likewise.
2669 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
2670 CDISABLE): Likewise.
2671 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
2672 CDISABLE): Likewise.
2673 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
2674 CDISABLE): Likewise. Access header.multiple_threads outside of
2675 libc and libpthread.
2676 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
2678 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
2679 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
2681 2003-06-17 Ulrich Drepper <drepper@redhat.com>
2683 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
2684 Also test early cancellation before the thread reaches the cancellation
2687 * Makefile: Compile forward.c with exceptions.
2689 * sysdeps/unix/sysv/linux/sleep.c: New file.
2691 2003-06-16 Ulrich Drepper <drepper@redhat.com>
2693 * Makefile: Add CFLAGS definition to compile function wrappers
2694 duplicated from libc with exceptions.
2695 * tst-cancel4.c: Also check cancellation handlers.
2697 * Makefile: Add rules to build and run tst-cancel16 and
2698 tst-cancelx16. Add missing CFLAGS definitions.
2699 * tst-cancel16.c: New file.
2700 * tst-cancelx16.c: New file.
2702 2003-06-15 Ulrich Drepper <drepper@redhat.com>
2704 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2705 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
2706 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
2707 (DL_SYSINFO_IMPLEMENTATION): Likewise.
2709 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
2710 (LIBC_CANCEL_RESET): Likewise.
2711 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
2712 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
2714 (CFLAGS-libcrt-cancellation.c): Define.
2715 * sysdeps/pthread/librt-cancellation.c: New file.
2716 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
2717 macros also when compiling librt.
2718 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2719 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2720 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2721 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2722 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2723 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2724 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2726 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
2727 compat_timer_create.
2729 2003-06-14 Ulrich Drepper <drepper@redhat.com>
2731 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
2733 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
2735 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2736 Add libc_hidden_def.
2738 2003-06-13 Roland McGrath <roland@redhat.com>
2740 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
2741 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
2743 2003-06-11 Ulrich Drepper <drepper@redhat.com>
2745 * allocatestack.c (queue_stack): Always inline.
2746 * ptreadhP.h (__do_cancel): Likewise.
2748 2003-06-10 Jakub Jelinek <jakub@redhat.com>
2750 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
2753 2003-06-10 Ulrich Drepper <drepper@redhat.com>
2755 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2756 (__pthread_cond_signal): Remove incorrect second addition for
2759 2003-06-09 Ulrich Drepper <drepper@redhat.com>
2761 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2762 (__pthread_cond_signal): Use correct futex pointer in
2763 __lll_mutex_lock_wait call.
2765 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2766 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
2768 2003-06-08 Ulrich Drepper <drepper@redhat.com>
2770 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
2772 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
2775 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
2776 hand-written CFI generation code. Since ENTRY/END also initiated
2777 CFI frames this caused two CFI sets to be generated.
2779 2003-06-07 Ulrich Drepper <drepper@redhat.com>
2781 * cleanup_routine.c: New file.
2782 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
2783 * sysdeps/pthread/pthread.h: Add support for fully exception-based
2785 * Makefile (libpthread-routines): Add cleanup_routine.
2786 Add more CFLAGS variables to compile with exceptions. Add comments
2787 why which file needs unwind tables.
2788 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
2790 * tst-cancelx1.c: New file.
2791 * tst-cancelx2.c: New file.
2792 * tst-cancelx3.c: New file.
2793 * tst-cancelx4.c: New file.
2794 * tst-cancelx5.c: New file.
2795 * tst-cancelx6.c: New file.
2796 * tst-cancelx7.c: New file.
2797 * tst-cancelx8.c: New file.
2798 * tst-cancelx9.c: New file.
2799 * tst-cancelx10.c: New file.
2800 * tst-cancelx11.c: New file.
2801 * tst-cancelx12.c: New file.
2802 * tst-cancelx13.c: New file.
2803 * tst-cancelx14.c: New file.
2804 * tst-cancelx15.c: New file.
2805 * tst-cleanupx0.c: New file.
2806 * tst-cleanupx0.expect: New file.
2807 * tst-cleanupx1.c: New file.
2808 * tst-cleanupx2.c: New file.
2809 * tst-cleanupx3.c: New file.
2811 * tst-cleanup0.c: Make standard compliant.
2812 * tst-cleanup1.c: Likewise.
2814 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
2815 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2816 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2817 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2818 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2819 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2820 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
2822 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2823 * tst-cancel12.c: New file.
2824 * tst-cancel13.c: New file.
2825 * tst-cancel14.c: New file.
2826 * tst-cancel15.c: New file.
2827 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
2830 * tst-cancel1.c: Add some comments.
2832 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
2835 2003-06-06 Ulrich Drepper <drepper@redhat.com>
2837 * Makefile (CFLAGS-pthread_cancel.c): Define.
2839 2003-06-05 Ulrich Drepper <drepper@redhat.com>
2841 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
2842 Change type of __writer element to int.
2843 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2844 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2845 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2846 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2847 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2848 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
2849 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2850 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
2851 Compare with TID to determine deadlocks.
2852 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
2853 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2854 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
2855 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
2856 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2857 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2859 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2861 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2862 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2863 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2865 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2867 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2868 * Makefile (tests): Add tst-rwlock12.
2869 * tst-rwlock12.c: New file.
2871 2003-06-05 Jakub Jelinek <jakub@redhat.com>
2873 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
2874 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
2875 Remove bogus hidden_proto.
2876 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
2878 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
2879 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
2880 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
2881 ___lll_mutex_timedlock): Likewise.
2883 2003-06-04 Ulrich Drepper <drepper@redhat.com>
2885 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2886 (__pthread_cond_signal): Add some code to eventually handle
2889 2003-06-01 Ulrich Drepper <drepper@redhat.com>
2891 * Makefile (tests): Add tst-exec4.
2892 (tst-exec4-ARGS): Define.
2893 * tst-exec4.c: New file.
2895 2003-05-31 Ulrich Drepper <drepper@redhat.com>
2897 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2898 Also fail if tv_nsec < 0.
2899 (__lll_timedwait_tid): Likewise.
2900 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2901 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
2903 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
2905 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
2907 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
2909 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
2911 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
2914 * Makefile (tests): Add tst-sem8 and tst-sem9.
2915 * tst-sem8.c: New file.
2916 * tst-sem9.c: New file.
2917 * sem_open.c: Fix creation of in_use record if the file exists but
2920 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
2923 * sysdeps/pthread/timer_create.c (timer_create): In case
2924 evp==NULL, assign timer ID to sival_ptr.
2926 * descr.h (struct pthread_unwind_buf): Change type of prev element to
2927 struct pthread_unwind_buf *.
2928 (struct pthread): Likewise for cleanup_jmp_buf element.
2930 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
2931 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
2932 * unwind.c (__pthread_unwind_next): Likewise.
2934 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2936 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2937 (lll_futex_timed_wait): Use int for futex value parameter.
2938 (lll_futex_wake): Likewise.
2939 (lll_futex_requeue): Likewise.
2941 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
2942 Replace one memory operation with one register operation.
2944 * tst-join4.c (do_test): Fix error message.
2946 * tst-rwlock6.c (do_test): Use correct format specifier.
2948 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2949 (__lll_mutex_lock_wait): Replace one memory operation with one
2951 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
2952 (__lll_mutex_lock_wait): Likewise.
2954 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2955 (__lll_mutex_cond_lock): Add one to value parameter of
2956 __lll_lock_wait to reflect reality in the futex syscall.
2957 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2958 (lll_mutex_cond_lock): Likewise.
2960 2003-05-30 Jakub Jelinek <jakub@redhat.com>
2962 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
2964 (lll_mutex_cond_lock): Define.
2966 2003-05-29 Ulrich Drepper <drepper@redhat.com>
2968 * Makefile (tests): Add tst-signal6.
2969 * tst-signal6.c: New file.
2971 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
2972 (__lll_mutex_unlock_force): New function
2973 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2975 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2976 (__lll_mutex_unlock_force): New function.
2977 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2979 * tst-rwlock7.c (do_test): Use correct format specifier.
2981 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
2982 Find break parameter in correct asm argument.
2984 2003-05-27 Jakub Jelinek <jakub@redhat.com>
2986 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
2988 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
2990 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2992 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
2993 lll_futex_requeue, lll_mutex_unlock_force): Define.
2995 2003-05-30 Jakub Jelinek <jakub@redhat.com>
2997 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2998 (pthread_cond_t): Add __mutex.
2999 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
3000 lll_futex_requeue, lll_mutex_unlock_force): Define.
3002 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3004 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
3005 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3007 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
3009 (lll_futex_wait, lll_futex_wake): Define.
3010 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
3011 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
3012 FUTEX_REQUEUE instead of FUTEX_WAIT.
3013 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3014 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
3015 mutex which was used in condvar structure. Call
3016 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
3017 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3019 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
3020 include tcb-offsets.h. Read wakeup value in locked region.
3021 Use the value of gbr register as THREAD_ID.
3022 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3023 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3024 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3026 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
3029 2003-05-28 Ulrich Drepper <drepper@redhat.com>
3031 * sysdeps/pthread/pthread_cond_broadcast.c
3032 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
3034 2003-05-26 Ulrich Drepper <drepper@redhat.com>
3036 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
3037 typo in register name.
3038 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
3039 correctly. Actually use requeue. Little optimization.
3040 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
3041 mutex address early. Handle cancellation state as 32-bit value.
3042 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3043 Remove unnecessary label.
3045 2003-05-25 Ulrich Drepper <drepper@redhat.com>
3047 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
3048 instead of FUTEX_WAIT.
3049 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
3050 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3051 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3052 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3053 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3054 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
3055 used in condvar structure. Call __pthread_mutex_cond_lock instead
3056 of __pthread_mutex_lock_internal.
3057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3058 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3059 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3060 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
3061 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3062 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3063 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
3064 Add pthread_mutex_cond_lock.
3065 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
3066 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
3067 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
3068 lll_mutex_cond_lock.
3069 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3070 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3071 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3073 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3074 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3076 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
3077 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3079 * pthreadP.h: Declare __pthread_mutex_cond_lock.
3080 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
3081 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
3082 macro don't define aliases.
3084 * cancellation.c: Remove __pthread_enable_asynccancel_2.
3085 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
3086 * sysdeps/pthread/pthread_cond_timedwait.c: Use
3087 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
3088 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3090 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
3091 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3092 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3094 2003-05-17 Ulrich Drepper <drepper@redhat.com>
3096 * sem_open.c: Fix one endless loop. Implement correct semantics
3097 wrt opening the same semaphore more then once.
3098 * sem_close.c: Adjust for sem_open change.
3099 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
3100 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
3101 * Makefile (tests): Add tst-sem7.
3102 * tst-sem7.c: New file.
3104 2003-05-16 Roland McGrath <roland@redhat.com>
3106 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
3107 uninitialized variable braino.
3109 2003-05-16 Ulrich Drepper <drepper@redhat.com>
3111 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
3112 test for syscall availability.
3114 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
3115 __no_posix_timers to -1 if the syscalls don't exist.
3117 * pthread_join.c (pthread_join): Set tid field of the joined
3118 thread to -1. This isn't necessary but helps to recognize some
3119 error conditions with almost no cost.
3121 * allocatestack.c (FREE_P): Also negative values indicate an
3124 * unwind.c: Include <unistd.h>.
3126 2003-05-14 Ulrich Drepper <drepper@redhat.com>
3128 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
3130 2003-05-14 Jakub Jelinek <jakub@redhat.com>
3132 * Makefile (crti-objs, crtn-objs): New variables.
3133 (omit-deps, extra-objs): Add crtn.
3134 ($(objpfx)libpthread.so): Depend on both crti and crtn
3135 and links to them in multidir.
3136 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
3138 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
3140 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3141 (lll_mutex_unlock): Use atomic_exchange_rel.
3143 2003-05-11 Ulrich Drepper <drepper@redhat.com>
3145 * cond-perf.c (cons): Add missing locking around setting of alldone.
3147 2003-05-10 Ulrich Drepper <drepper@redhat.com>
3149 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
3151 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3153 2003-05-09 Ulrich Drepper <drepper@redhat.com>
3155 * tst-sem6.c: New file.
3156 * Makefile (tests): Add tst-sem6.
3158 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
3159 Use atomic_exchange_rel instead of atomic_exchange.
3160 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
3163 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
3164 code for lll_futex_wait and lll_futex_wake in static apps. Use
3165 vsyscall is possible.
3167 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
3168 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
3169 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
3170 pthread_setaffinity_np.
3171 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
3172 and pthread_setaffinity_np.
3173 * Makefile (libpthread-routines): Add pthread_getaffinity and
3174 pthread_setaffinity.
3176 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
3177 use it in case mmap to allocate the stack fails.
3178 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
3179 ARCH_MAP_FLAGS here.
3180 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
3183 2003-05-08 Ulrich Drepper <drepper@redhat.com>
3185 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
3186 handler implementation. It is now lockless in fork().
3187 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3188 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3189 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
3190 declare the __fork_*_lists.
3191 (struct fork_handler): Include pointers to all three functions.
3192 Add next, refcntr and need_signal elements.
3193 (__fork_handlers): New declaration.
3194 (__register_atfork_malloc): Remove declaration.
3195 (HAVE_register_atfork_malloc): Remove definition.
3196 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
3197 __pthread_child_handler variable.
3198 (__libc_pthread_init): Use __register_atfork instead of explicitly
3200 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
3202 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3204 * unwind.c (unwind_cleanup): Print error message and then abort. This
3205 function must never be reached.
3207 * cond-perf.c: New file.
3209 2003-05-05 Ulrich Drepper <drepper@redhat.com>
3211 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
3213 2003-05-04 Roland McGrath <roland@redhat.com>
3215 * Makefile ($(objpfx)../libc.so): New target.
3217 2003-05-02 Ulrich Drepper <drepper@redhat.com>
3219 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3220 (pthread_condattr_t): Size is only an int, don't use long for
3222 (pthread_mutexattr_t): Likewise.
3223 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3224 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3225 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3227 2003-05-01 Ulrich Drepper <drepper@redhat.com>
3229 * sysdeps/i386/tls.h: Define THREAD_ID.
3230 * sysdeps/ia64/tls.h: Likewise.
3231 * sysdeps/powerpc/tls.h: Likewise.
3232 * sysdeps/s390/tls.h: Likewise.
3233 * sysdeps/sh/tls.h: Likewise.
3234 * sysdeps/x86_64/tls.h: Likewise.
3235 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
3237 * pthread_mutex_timedlock.c: Likewise.
3238 * pthread_mutex_trylock.c: Likewise.
3239 * pthread_mutex_unlock.c: Likewise.
3240 * pthread_rwlock_trywrlock.c: Likewise.
3241 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
3242 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
3243 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3244 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3246 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
3249 2003-04-29 Jakub Jelinek <jakub@redhat.com>
3251 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3252 (__SIZEOF_PTHREAD_COND_T): Define to 48.
3253 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
3254 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3255 Make __align long long instead of long.
3256 (pthread_rwlock_t): Formatting.
3257 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3258 (pthread_rwlock_t): Formatting.
3259 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3260 (pthread_cond_t): Make __align long long instead of long.
3261 (pthread_rwlock_t): Move __flags field to the same position as in
3264 2003-04-30 Ulrich Drepper <drepper@redhat.com>
3266 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
3267 * tst-rwlock7.c (do_test): Likewise.
3269 2003-04-26 Roland McGrath <roland@redhat.com>
3271 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
3273 2003-04-22 Jakub Jelinek <jakub@redhat.com>
3275 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
3276 sizeof (struct pthread).
3277 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
3279 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
3281 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
3283 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
3285 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
3287 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
3289 (NO_TLS_OFFSET): Define.
3290 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
3291 add TLS_TCB_SIZE unnecessarily.
3293 2003-04-22 Roland McGrath <roland@redhat.com>
3295 * Makeconfig (shared-thread-library): Reverse link order to work
3298 2003-04-22 Ulrich Drepper <drepper@redhat.com>
3300 * semaphore.h: Fix typo in comment.
3302 2003-04-21 Ulrich Drepper <drepper@redhat.com>
3304 * sysdeps/pthread/sigfillset.c: New file.
3306 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
3307 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
3308 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
3309 * sysdeps/pthread/sigaction.c: Likewise.
3310 * sysdeps/pthread/sigprocmask.c: New file.
3311 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
3313 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3314 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
3317 2003-04-19 Ulrich Drepper <drepper@redhat.com>
3319 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3320 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
3322 * sysdeps/unix/sysv/linux/unregister-atfork.c
3323 (__unregister_atfork): Don't free memory not allocated dynamically.
3325 * semaphore.h: Remove __THROW marker from cancellation points.
3326 * nptl/sysdeps/pthread/pthread.h: Likewise.
3328 2003-04-18 Ulrich Drepper <drepper@redhat.com>
3330 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
3331 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
3334 2003-04-16 Jakub Jelinek <jakub@redhat.com>
3336 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
3338 2003-04-15 Roland McGrath <roland@redhat.com>
3340 * forward.c (__pthread_unwind): Tweak to avoid warning.
3342 2003-04-15 Ulrich Drepper <drepper@redhat.com>
3344 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
3346 2003-04-14 Ulrich Drepper <drepper@redhat.com>
3348 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
3349 overflow CFA advance instructions.
3350 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3352 2003-04-14 Jakub Jelinek <jakub@redhat.com>
3354 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
3355 * sysdeps/i386/pthread_spin_lock.c: Likewise.
3356 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
3359 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
3360 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
3361 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
3362 DW_CFA_advance_loc for .Laddl-.Lsubl.
3364 2003-04-13 Ulrich Drepper <drepper@redhat.com>
3366 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
3367 position-independent unwind data for static libraries.
3368 Add missing unwind info. Add comments.
3370 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
3371 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3372 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3373 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3375 2003-04-12 Ulrich Drepper <drepper@redhat.com>
3377 * Makefile: Make sure all cancellation points are compiled with
3378 exception and asynchronous unwind tables.
3380 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
3381 which mishandles loading of global object addresses in PIC.
3382 (THREAD_SETMEM_NC): Likewise.
3384 2003-04-11 Ulrich Drepper <drepper@redhat.com>
3386 * pthread.h: Define new data structure for cleanup buffer. Declare
3387 new cleanup handler interfaces.
3388 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
3389 (struct pthread): Add cleanup_jmp_buf pointer. Define
3390 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
3391 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
3392 it. Declare old cleanup handler installation functions.
3393 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
3395 * cleanup_defer.c: Likewise.
3396 * cleanup_compat.c: New file. Old cleanup code.
3397 * cleanup_def_compat.c: New file. Old cleanup code.
3398 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
3399 if own thread descriptor.
3400 * unwind.c: New file.
3401 * forward.c: Add __pthread_unwind.
3402 * init.c (pthread_functions): Add __pthread_unwind.
3403 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
3404 Add ptr___pthread_unwind.
3405 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
3406 and unwind function.
3407 * Makefile (libpthread-routines): Add cleanup_compat,
3408 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
3409 table generation if necessary.
3410 * version.c: Record whether unwind support is compiled in.
3411 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
3412 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
3414 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
3415 complication to generate unwind information for syscall wrappers.
3416 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3417 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3418 __cleanup_fct_attribute.
3420 * Makefile: Add rules to build and run tst-cleanup0.
3421 * tst-cleanup0.c: New file.
3422 * tst-cleanup0.expect: New file.
3424 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
3425 caller. Optimize to avoid often unecessary local variable.
3427 2003-04-11 Roland McGrath <roland@redhat.com>
3429 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
3430 sets variable `multidir'; include that.
3431 (generated): Add it.
3432 ($(objpfx)$(multidir)/crti.o): New target.
3433 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
3435 2003-04-11 Ulrich Drepper <drepper@redhat.com>
3437 * tst-attr2.c (do_test): Add cast to avoid warning.
3438 * tst-mutex4.c (do_test): Likewise.
3440 2003-04-10 Ulrich Drepper <drepper@redhat.com>
3442 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
3445 2003-04-09 Ulrich Drepper <drepper@redhat.com>
3447 * Makefile (tests): Add tst-detach1.
3448 * tst-detach1.c: New file.
3450 2003-04-08 Ulrich Drepper <drepper@redhat.com>
3452 * sysdeps/pthread/pthread.h: Remove duplicate
3453 pthread_cleanup_{push,pop} definitions.
3455 * tst-barrier2.c: Eliminate warnings.
3456 * tst-cancel4.c: Likewise.
3457 * tst-cond4.c: Likewise.
3458 * tst-cond6.c: Likewise.
3459 * tst-detach1.c: Likewise.
3460 * tst-rwlock4.c: Likewise.
3461 * tst-rwlock6.c: Likewise.
3462 * tst-rwlock7.c: Likewise.
3463 * tst-sem3.c: Likewise.
3464 * tst-spin2.c: Likewise.
3465 * tst-umask1.c: Likewise.
3467 2003-04-07 Ulrich Drepper <drepper@redhat.com>
3469 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
3471 2003-04-06 Ulrich Drepper <drepper@redhat.com>
3473 * descr.h (struct pthread): Move cancelhandling member to the front.
3475 2003-04-05 Ulrich Drepper <drepper@redhat.com>
3477 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
3478 malloc_parent, and malloc_child statically.
3479 (__register_atfork_malloc): New function.
3480 (free_mem): Don't free any of the malloc_* variables on the list.
3481 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
3482 Define HAVE_register_atfork_malloc.
3484 2003-04-04 Ulrich Drepper <drepper@redhat.com>
3486 * sysdeps/pthread/createthread.c (create_thread): Add some more
3487 comments explaining when to set multiple_threads and when not.
3489 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3490 THREAD_ATOMIC_BIT_SET if not already defined.
3491 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3492 THREAD_ATOMIC_BIT_SET:
3493 * sysdeps/x86_64/tls.h: Likewise.
3494 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
3495 THREAD_ATOMIC_CMPXCHG_VAL.
3496 (_pthread_cleanup_pop_restore): Likewise.
3497 * cancellation.c (__pthread_enable_asynccancel): Likewise.
3498 (__pthread_enable_asynccancel_2): Likewise.
3499 (__pthread_disable_asynccancel): Likewise.
3500 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3501 (__libc_disable_asynccancel): Likewise.
3502 * init.c (sigcancel_handler): Likewise.
3503 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
3504 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
3506 2003-04-03 Ulrich Drepper <drepper@redhat.com>
3508 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
3509 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3510 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
3511 * Makefile (tests): Add tst-cancel11.
3512 * tst-cancel11.c: New file.
3514 2003-04-01 Ulrich Drepper <drepper@redhat.com>
3516 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
3517 round, not the first. Use specific_used flag instead of local
3518 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
3519 (__free_tcb): Don't call deallocate_tsd here.
3520 (start_thread): Call deallocate_tsd here.
3521 * pthread_setspecific.c: Set specific_used flag really only when
3523 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
3524 * tst-tsd3.c: New file.
3525 * tst-tsd4.c: New file.
3527 2003-03-31 Ulrich Drepper <drepper@redhat.com>
3529 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
3530 Use atomic_exchange_and_add instead of __lll_add.
3531 (__lll_mutex_timedlock): Likewise.
3532 Patch by Ian Wienand.
3534 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
3536 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3537 (SINGLE_THREAD_P): Fix typo.
3538 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
3540 2003-03-31 Ulrich Drepper <drepper@redhat.com>
3542 * Makefile (tests): Add tst-align.
3543 * tst-align.c: New file.
3544 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
3546 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
3549 * tst-tsd2.c: Add casts to avoid warnings.
3551 2003-03-30 Ulrich Drepper <drepper@redhat.com>
3553 * descr.h (struct pthread): Move most often used elements to the front.
3555 2003-03-29 Ulrich Drepper <drepper@redhat.com>
3557 * Makefile (libpthread-routines): Add pthread_atfork.
3558 (libpthread-static-only-routines): Add pthread_atfork.
3560 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3562 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
3564 (INSTALL_DTV): Add parens.
3565 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
3566 Use passed descr instead of THREAD_SELF.
3567 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
3568 (__lll_mutex_timedlock_wait): Correct expected value after
3570 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
3571 Release lock before waking up the waiters.
3572 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
3573 criteria. Reorderstruct passed to cleanup handler. Fix
3574 handling of cancellation and failung pthread_mutex_unlock call.
3575 Use __pthread_enable_asynccancel_2 instead of
3576 __pthread_enable_asynccancel.
3577 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3578 Return result of lock re-get if it fails.
3579 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
3580 for __pthread_cleanup_push.
3581 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
3582 completely broken rwlock implementation.
3583 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3584 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3585 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3586 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3587 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3588 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
3589 versioned_symbol macro.
3590 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
3591 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
3593 2003-03-27 Ulrich Drepper <drepper@redhat.com>
3595 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
3596 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
3598 (struct timer): Remove th and bar field.
3599 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
3600 debugging code. Create only one helper thread.
3601 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
3603 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3604 Renamed. Define statically. Use thread info from siginfo.
3605 (__helper_once): New variable.
3606 (__helper_tid): New variable.
3607 (__reset_helper_control): New function.
3608 (__start_helper_thread): New function.
3610 * pthread_create.c (start_thread): Don't use setjmp inside
3611 __builtin_expect to work around gcc bug.
3613 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
3614 timer_delete syscall fails, but not with ENOSYS, set
3617 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
3618 (timer_settime): Fix typo.
3619 * sysdeps/unix/sysv/linux/timer_getoverr.c
3620 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
3622 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3624 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
3625 offset of cleanupbuf.__prev.
3627 2003-03-26 Jakub Jelinek <jakub@redhat.com>
3629 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
3632 2003-03-26 Ulrich Drepper <drepper@redhat.com>
3634 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
3635 NULL provide default definition to syscall.
3637 2003-03-25 Roland McGrath <roland@redhat.com>
3639 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
3640 (timer_id2ptr): Fix typo.
3642 2003-03-25 Ulrich Drepper <drepper@redhat.com>
3644 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
3645 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
3646 * sysdeps/ia64/pthreaddef.h: Likewise.
3647 * sysdeps/powerpc/pthreaddef.h: Likewise.
3648 * sysdeps/s390/pthreaddef.h: Likewise.
3649 * sysdeps/sh/pthreaddef.h: Likewise.
3650 * sysdeps/x86_64/pthreaddef.h: Likewise.
3651 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
3652 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
3654 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3655 SIGTIMER is not unblocked.
3656 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
3658 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
3660 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
3661 pass pointer through as ID.
3662 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
3663 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
3664 * sysdeps/unix/sysv/linux/timer_create.c: New file.
3665 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
3666 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
3667 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
3668 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
3669 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
3670 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
3671 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
3672 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
3673 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
3674 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
3675 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
3676 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
3677 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
3678 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
3679 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
3680 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
3681 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
3682 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
3683 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
3684 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
3685 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
3686 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
3687 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
3688 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
3689 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
3690 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
3691 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
3692 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
3693 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
3694 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
3696 * pthreadP.h: Remove FRAME_LEFT definition.
3697 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
3698 already left frame. Programs which have this problem are not POSIX
3700 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
3702 2003-03-24 Ulrich Drepper <drepper@redhat.com>
3704 * sysdeps/pthread/tst-timer.c: Check return values of the
3707 2003-03-23 Roland McGrath <roland@redhat.com>
3709 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
3710 * tst-tls3mod.c: Likewise.
3711 * tst-tls1.c: Likewise.
3712 * tst-tls2.c: Likewise.
3714 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
3717 * tst-join5.c (tf1, tf2): Add a cast.
3719 * Makeconfig (includes): Append -I$(..)nptl to this variable.
3721 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
3722 Don't test anything.
3723 * tst-cond4.c: Likewise.
3724 * tst-cond6.c: Likewise.
3725 * tst-flock2.c: Likewise.
3726 * tst-mutex4.c: Likewise.
3727 * tst-rwlock4.c: Likewise.
3728 * tst-signal1.c: Likewise.
3729 * tst-spin2.c: Likewise.
3730 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
3732 * tst-mutex4.c: Use test-skeleton.c.
3733 * tst-spin2.c: Likewise.
3734 * tst-sysconf.c: Likewise.
3735 * tst-barrier2.c: Likewise.
3736 * tst-cond4.c: Likewise.
3737 * tst-cond6.c: Likewise.
3738 * tst-rwlock4.c: Likewise.
3739 * tst-unload.c: Likewise.
3740 * tst-flock2.c (do_test): Use return instead of exit.
3742 2003-03-22 Jakub Jelinek <jakub@redhat.com>
3744 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
3746 2003-03-21 Ulrich Drepper <drepper@redhat.com>
3748 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3749 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
3750 instead of __lll_compare_and_swap.
3751 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3753 Removed definition if __lll_compare_and_swap.
3755 * cancellation.c: Adjust for new form of compare&exchange macros.
3756 * cleanup_defer.c: Likewise.
3758 * libc-cancellation.c: Likewise.
3759 * old_pthread_cond_broadcast.c: Likewise.
3760 * old_pthread_cond_signal.c: Likewise.
3761 * old_pthread_cond_timedwait.c: Likewise.
3762 * old_pthread_cond_wait.c: Likewise.
3763 * pthread_cancel.c: Likewise.
3764 * pthread_create.c: Likewise.
3765 * pthread_detach.c: Likewise.
3766 * pthread_join.c: Likewise.
3767 * pthread_key_delete.c: Likewise.
3768 * pthread_setcancelstate.c: Likewise.
3769 * pthread_setcanceltype.c: Likewise.
3770 * pthread_timedjoin.c: Likewise.
3771 * pthread_tryjoin.c: Likewise.
3772 * sysdeps/pthread/createthread.c: Likewise.
3774 2003-03-20 Ulrich Drepper <drepper@redhat.com>
3776 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
3777 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
3778 definitions. Replace uses with calls to atomic_* functions.
3779 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3780 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
3781 __lll_test_and_set calls with atomic_exchange_and_add and
3782 atomic_exchange calls respectively.
3783 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3784 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3785 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
3786 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3787 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
3788 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
3789 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
3791 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
3792 returns the old value.
3794 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
3796 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
3797 int for variable OLDVAL and correct inline assembler contraint.
3798 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
3799 type int for variable OLD.
3801 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
3803 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3804 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
3805 instead of multiple_threads field in the TCB.
3807 2003-03-19 Ulrich Drepper <drepper@redhat.com>
3809 * sysdeps/i386/i686/bits/atomic.h: Removed.
3810 * sysdeps/i386/i586/bits/atomic.h: Removed.
3811 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
3812 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
3813 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
3814 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
3815 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
3816 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
3817 * atomic.h: Removed. Moved to glibc.
3819 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
3820 support for clock selection.
3822 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
3825 2003-03-18 Roland McGrath <roland@redhat.com>
3827 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3828 Add __lll_rel_instr first. Add memory clobber.
3829 (lll_mutex_unlock): Use __lll_test_and_set.
3830 From Paul Mackerras <paulus@samba.org>.
3832 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
3834 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3835 (SINGLE_THREAD_P): Add `header.' prefix.
3836 From Paul Mackerras <paulus@samba.org>.
3838 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
3839 pthread_timedjoin_np to ...
3840 (libpthread: GLIBC_2.3.3): ... here.
3841 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
3843 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3844 Avoid shadowing VAL variable.
3846 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3849 2003-03-18 Ulrich Drepper <drepper@redhat.com>
3851 * Makefile (tests): Add tst-cond11.
3852 * tst-cond11.c: New file.
3854 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
3855 struct passed to cleanup handler to eliminate one more
3857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3859 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3860 (pthrad_cond_t): Replace __unused field with __clock.
3862 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
3863 waken all waiters in cleanup handler.
3864 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3865 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3867 * pthread_condattr_getclock.c: New file.
3868 * pthread_condattr_setclock.c: New file.
3869 * sysdeps/pthread/pthread.h: Declare these new functions.
3870 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
3871 * Makefile (libpthread-routines): Add the new functions.
3872 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
3873 Renamed field to value. Document use of the bits.
3874 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
3876 * pthread_condattr_setpshared.c: Likewise.
3877 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
3878 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
3879 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3881 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3882 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3883 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3884 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3885 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3886 Implement clock selection.
3887 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3888 * pthread-errnos.sym: Add ENOSYS.
3889 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3890 _POSIX_CLOCK_SELECTION.
3891 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3893 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
3894 invalid .size directive.
3896 2003-03-17 Roland McGrath <roland@redhat.com>
3898 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
3901 2003-03-17 Ulrich Drepper <drepper@redhat.com>
3903 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
3904 Use __lll_add instead of spelling it out. Use protected symbol names.
3905 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
3907 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
3908 Renamed from lll_compare_and_swap. Use new name where necessary.
3909 (__lll_add): Defined.
3910 (__lll_dec_if_positive): Defined.
3911 (__lll_test_and_set): Defined.
3912 * sysdeps/ia64/pthread_spin_init.c: Removed.
3913 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
3914 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
3915 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
3916 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
3917 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
3918 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
3919 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
3920 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
3921 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3922 __sync_lock_release_si.
3923 Patch by Jakub Jelinek.
3925 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
3926 Fix timeout handling.
3927 (__lll_timedwait_tid): Likewise.
3928 (lll_unlock_wake_cb): Wake up other waiters if necessary.
3929 Patch by Jakub Jelinek.
3931 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
3933 2003-03-17 Roland McGrath <roland@redhat.com>
3935 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
3936 * sysdeps/pthread/pthread_spin_init.c: New file.
3937 * sysdeps/pthread/pthread_spin_unlock.c: New file.
3938 * sysdeps/powerpc/Makefile: New file.
3939 * sysdeps/powerpc/pthread_spin_lock.c: New file.
3940 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
3941 * sysdeps/powerpc/pthreaddef.h: New file.
3942 * sysdeps/powerpc/tcb-offsets.sym: New file.
3943 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
3944 * sysdeps/powerpc/tls.h: New file.
3945 * sysdeps/powerpc/bits/atomic.h: New file.
3946 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
3947 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
3948 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
3950 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
3951 * sysdeps/unix/sysv/linux/sem_post.c: New file.
3952 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
3953 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
3954 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
3955 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
3956 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
3957 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
3958 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
3959 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
3960 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
3961 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
3962 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
3963 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
3964 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
3966 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
3968 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
3969 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
3970 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
3971 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
3972 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
3974 2003-03-17 Ulrich Drepper <drepper@redhat.com>
3976 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
3977 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3979 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3980 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
3982 2003-03-16 Roland McGrath <roland@redhat.com>
3984 * tst-fork4.c: Include <string.h>.
3985 * tst-signal2.c: Likewise.
3986 * tst-mutex5.c (do_test): exit -> return.
3987 * tst-mutex2.c: Include <stdlib.h>.
3989 2003-03-16 Ulrich Drepper <drepper@redhat.com>
3991 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3992 (__lll_mutex_timedlock_wait): Correct expected value after
3993 spurious wakeup. Otherwise we would never wait again.
3995 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
3996 zone versus inline asm stupidity. Use correct instructions.
3998 * tst-rwlock6.c: Add some more status output.
4000 2003-03-15 Roland McGrath <roland@redhat.com>
4002 * sysdeps/pthread/configure.in: New file.
4003 * sysdeps/pthread/configure: New file (generated).
4005 2003-03-15 Ulrich Drepper <drepper@redhat.com>
4007 * allocatestack.c (allocate_stack): Store the exact stack size of
4008 user allocated stacks.
4010 2003-03-15 Jakub Jelinek <jakub@redhat.com>
4012 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4013 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
4014 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
4015 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
4016 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4017 Use `header.' prefix.
4018 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
4020 2003-03-15 Ulrich Drepper <drepper@redhat.com>
4022 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
4023 __builtin_frame_address, use stack pointer.
4025 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
4026 instead of __builtin_frame_pointer.
4028 2003-03-14 Ulrich Drepper <drepper@redhat.com>
4030 * tst-basic1.c (do_test): Add cast to avoid warning.
4031 * tst-basic2.c (do_test): Likewise.
4033 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
4034 amount of stack correction.
4036 * tst-fork4.c: Use test-skeleton.c.
4038 2003-03-14 Roland McGrath <roland@redhat.com>
4040 * init.c: Fix typo "#eli" for "#else".
4042 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
4044 * allocatestack.c (__stack_user): Use hidden_data_def.
4045 * pthread_create.c (__pthread_keys): Likewise.
4047 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
4049 2003-03-14 Roland McGrath <roland@redhat.com>
4051 * tst-fork4.c: New file.
4052 * Makefile (tests): Add it.
4054 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
4055 we always define the padding space.
4056 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
4057 stopped supporting its own extensions fully.
4058 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
4059 struct also called `header', so `header.multiple_threads' is the field
4060 name to use on all machines.
4061 * allocatestack.c (allocate_stack): Use `header.' prefix.
4062 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4063 * pthread_create.c (__pthread_create_2_1): Likewise.
4064 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
4065 (THREAD_SELF): Likewise.
4066 * sysdeps/x86_64/tls.h: Likewise.
4067 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
4068 (SINGLE_THREAD_P): Likewise.
4069 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
4070 (SINGLE_THREAD_P): Likewise.
4071 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4072 (SINGLE_THREAD_P): Likewise.
4074 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
4077 2003-03-14 Ulrich Drepper <drepper@redhat.com>
4079 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
4080 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
4082 * pthread_create.c (start_thread): setjmp is expected to return 0.
4084 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
4085 (THREAD_GETMEM_NC): Likewise.
4087 2003-03-13 Ulrich Drepper <drepper@redhat.com>
4089 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
4090 and the size of the stack which must be allocated is a multiple,
4091 allocate one more page.
4092 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
4093 MULTI_PAGE_ALIASING.
4095 2003-03-13 Roland McGrath <roland@redhat.com>
4097 * pthread_create.c (start_thread): Set EXITING_BIT after the
4098 event-reporting (and destructors), not before.
4100 2003-03-13 Jakub Jelinek <jakub@redhat.com>
4102 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
4103 lll_futex_wake): Declare register variables as long int instead of
4104 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
4105 Make syscall arguments clobbered by the syscall.
4106 (lll_futex_wait): Define using lll_futex_timed_wait.
4108 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
4111 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
4114 * allocatestack.c (nptl_ncreated): Only declare if
4115 COLORING_INCREMENT != 0.
4117 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
4118 (__libc_enable_asynccancel_2): Remove prototype.
4120 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
4121 ctid to match kernel.
4123 2003-03-12 Ulrich Drepper <drepper@redhat.com>
4125 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
4126 libc_multiple_threads.
4127 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
4128 __libc_multiple_threads to...
4129 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
4131 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
4133 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4134 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4136 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
4137 (__pthread_once_internal): Define.
4139 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
4140 macros instead of .symver directly.
4141 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4142 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4144 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
4145 * sysdeps/x86_64/tcb-offsets.sym: New file.
4146 * sysdeps/x86_64/Makefile: New file.
4148 * sysdeps/i386/tcb-offsets.sym: Add SELF.
4149 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
4150 to access own pthread_t in TCB.
4151 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4153 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4155 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4157 2003-03-12 Roland McGrath <roland@redhat.com>
4159 * pthread-errnos.sym: New file.
4160 * Makefile (gen-as-const-headers): New variable, list that file.
4161 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
4162 header <pthread-errnos.h> instead of defining errno values here.
4163 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4164 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4165 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4166 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4167 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4169 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4171 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4172 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4173 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
4174 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4175 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4176 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4177 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4178 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4179 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4180 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
4181 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4182 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
4183 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
4184 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
4185 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
4186 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4187 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4188 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4189 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4190 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
4191 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4192 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
4193 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
4194 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
4195 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
4196 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4197 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4199 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
4200 CLONE_CHILD_SETTID worked.
4202 2003-03-12 Ulrich Drepper <drepper@redhat.com>
4204 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
4206 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
4209 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4210 (pthread_cond_t): Add padding.
4212 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
4213 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
4214 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
4216 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
4217 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
4218 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
4219 (__pthread_rwlock_timedrdlock): Likewise.
4220 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
4221 (__pthread_rwlock_wrlock): Likewise.
4222 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
4223 (__pthread_rwlock_rdlock): Likewise.
4225 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
4227 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
4228 result of lock re-get if it fails.
4230 2003-03-11 Ulrich Drepper <drepper@redhat.com>
4232 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
4233 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4234 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
4235 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4236 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4237 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4238 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4239 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4240 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
4241 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4243 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
4244 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
4246 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
4247 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
4248 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
4249 (create_thread): Likewise.
4250 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
4251 * init.c (__pthread_initialize_minimal_internal): Initialize
4252 __libc_multiple_threads_ptr if necessary.
4253 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
4254 __pthread_multiple_threads and __libc_multiple_threads_ptr.
4255 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
4256 __libc_multiple_threads.
4257 (__libc_pthread_init): Return pointer to __libc_pthread_init if
4260 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
4261 (THREAD_SETMEM_NC): Likewise.
4263 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
4264 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
4265 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
4266 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
4268 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
4269 Eliminate one entire instruction.
4271 * cancellation.c (__pthread_enable_asynccancel_2): New function.
4272 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
4273 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4274 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
4275 instead of __pthread_enable_asynccancel.
4276 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4277 (__pthread_cond_wait): Likewise.
4278 * sysdeps/pthread/pthread_cond_timedwait.c
4279 (__pthread_cond_timedwait): Likewise.
4280 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4283 (__condvar_cleanup): Wake up all waiters in case we got signaled
4284 after being woken up but before disabling asynchronous
4286 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
4287 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4288 (__condvar_cleanup): Likewise.
4290 * init.c (__NR_set_tid_address): If already defined, don't redefine.
4291 Make it an error if architecture has no #if case. Add x86-64.
4293 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
4294 pt-initfini.s generation.
4296 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
4297 (TLS_INIT_TP): Fix typo.
4299 2003-03-11 Jakub Jelinek <jakub@redhat.com>
4301 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
4302 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
4304 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
4305 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
4306 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
4307 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
4308 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
4309 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4310 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
4311 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
4313 2003-03-11 Ulrich Drepper <drepper@redhat.com>
4315 * sysdeps/pthread/pthread_cond_timedwait.c
4316 (__pthread_cond_timedwait): Return the result of the final
4317 locking. If it succeeds, the regular function return value.
4319 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
4320 Return result of the final locking.
4321 * version.c (__nptl_main): Work around problems with the strange
4322 INTERNAL_SYSCALL macro on ppc32.
4323 * init.c (__pthread_initialize_minimal_internal): Unblock
4324 SIGCANCEL in case the parent blocked it.
4325 Reported by Paul Mackerras <paulus@samba.org>.
4327 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
4328 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
4329 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
4331 2003-03-11 Jakub Jelinek <jakub@redhat.com>
4333 * sysdeps/pthread/pthread_cond_timedwait.c
4334 (__pthread_cond_timedwait): Unlock and fail if
4335 __pthread_mutex_unlock_internal failed.
4337 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
4338 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
4340 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
4341 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
4342 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
4343 ALLOCATE_STACK): New macros.
4344 (TLS_TPADJ): New macro.
4345 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
4346 (allocate_stack): Handle TLS_DTV_AT_TP and
4347 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
4348 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
4350 * init.c [__ia64__] (__NR_set_tid_address): Define.
4352 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
4353 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
4354 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
4355 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
4356 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
4357 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
4358 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
4359 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
4360 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
4361 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
4362 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
4363 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
4364 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
4365 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
4366 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
4367 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
4368 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
4369 * sysdeps/ia64/bits/atomic.h: New file.
4370 * sysdeps/ia64/Makefile: New file.
4371 * sysdeps/ia64/pthread_spin_init.c: New file.
4372 * sysdeps/ia64/pthread_spin_lock.c: New file.
4373 * sysdeps/ia64/pthread_spin_trylock.c: New file.
4374 * sysdeps/ia64/pthread_spin_unlock.c: New file.
4375 * sysdeps/ia64/pthreaddef.h: New file.
4376 * sysdeps/ia64/tcb-offsets.sym: New file.
4377 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
4378 * sysdeps/ia64/tls.h: New file.
4380 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
4381 to syscall instead of no arguments.
4383 2003-03-10 Ulrich Drepper <drepper@redhat.com>
4385 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
4386 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
4387 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
4388 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
4390 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
4393 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
4395 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4396 lowlevelbarrier.sym.
4397 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
4398 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
4399 Include lowlevelbarrier.h and don't define offsets locally.
4400 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
4402 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4403 (__lll_mutex_lock_wait): Reverse order of first two parameters.
4404 (__lll_mutex_timedlock_wait): Likewise.
4405 (lll_mutex_lock): Adjust asm for that.
4406 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
4407 (lll_lock): Adjust asm for operand order change.
4408 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
4409 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
4411 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
4412 Reverse order of parameters.
4413 (__lll_timedwait_tid): Remove regparms attribute.
4414 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
4415 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
4417 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4418 (__lll_timedwait_tid): Remove one unnecessary instruction.
4420 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
4421 __lll_mutex_timedlock_wait only for NOT_IN_libc.
4422 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
4425 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
4426 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
4428 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
4431 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
4432 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
4434 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
4435 define LOCK here (if UP is not defined). The actual code is in
4438 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
4439 LOCK is already defined. Don't define lll_unlock_wake_cb and
4440 __lll_timedwait_tid for libc.so.
4441 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
4442 define LOCK here (if UP is not defined). The actual code is in
4445 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
4446 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
4447 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
4448 instead of lowlevelsem.h.
4449 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4450 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
4451 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
4453 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4455 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
4456 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
4457 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
4459 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
4461 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
4464 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
4466 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
4467 of __libc_locking_needed.
4468 (lll_trylock): Initialize %eax to zero.
4470 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
4471 pthread_cond_t definition.
4473 2003-03-10 Roland McGrath <roland@redhat.com>
4475 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
4476 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
4477 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
4478 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
4479 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
4481 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
4482 Instead of setting PD->multiple_threads, set globals
4483 __pthread_multiple_threads and __libc_multiple_threads.
4484 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4485 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
4486 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
4488 * descr.h (struct pthread): Conditionalize first member on
4489 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
4490 containing an anonymous tcbhead_t. Move `list' member out.
4491 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
4492 * allocatestack.c: Remove use of `header.data.' prefix.
4493 * pthread_create.c: Likewise.
4494 * init.c (__pthread_initialize_minimal_internal): Likewise.
4495 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4496 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
4497 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
4498 * sysdeps/x86_64/tls.h: Likewise.
4499 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
4500 (SINGLE_THREAD_P): Likewise.
4501 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
4502 (SINGLE_THREAD_P): Likewise.
4503 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
4504 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
4506 2003-03-09 Ulrich Drepper <drepper@redhat.com>
4508 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
4510 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
4511 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
4513 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
4514 leftovers from the ia32 code.
4516 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
4518 (clear_once_control): Don't load %esi.
4520 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
4523 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
4525 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
4526 * sysdeps/unix/sysv/linux/createthread.c: ...here.
4528 * Makefile (tests): Add tst-cond10.
4529 * tst-cond10.c: New file.
4531 2003-03-08 Ulrich Drepper <drepper@redhat.com>
4533 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
4534 * tst-signal3.c (do_test): Likewise.
4535 * tst-sem5.c (do_test): Likewise.
4536 * tst-kill6.c (do_test): Likewise.
4537 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
4539 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
4541 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
4542 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
4543 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4544 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4545 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4546 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4547 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4549 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4551 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4552 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4553 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4554 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4555 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4556 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4557 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
4558 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4560 * allocatestack.c (allocate_stack): If mprotect() fails free the
4563 2003-03-07 Ulrich Drepper <drepper@redhat.com>
4565 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
4567 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
4568 lll_wake_tid. This was used only to work around kernel limits in
4570 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4571 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
4572 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4573 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4575 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
4576 (__pthread_initialize_minimal_internal): Change initialization of
4577 __static_tls_align_m1 appropriately.
4578 * pthreadP.h (__static_tls_align_m1): Renamed from
4580 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
4581 instead of __static_tls_align-1.
4583 2003-03-04 Ulrich Drepper <drepper@redhat.com>
4585 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
4587 * pthread_create.c: Define __pthread_keys using nocommon
4588 attribute, not by placing it explicitly in bss.
4589 Remove DEFINE_DEALLOC definition. Not needed anymore.
4591 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
4592 Use it in mmap call to allocate stacks.
4594 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
4596 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
4597 result of the thread function.
4599 2003-03-03 Ulrich Drepper <drepper@redhat.com>
4601 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
4602 version is just fine.
4604 * sysdeps/unix/sysv/linux/libc_pthread_init.c
4605 (__pthread_child_handler): Renamed from pthread_child_handler,
4606 exported, and marked hidden. Change all users.
4607 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
4608 free __pthread_child_handler from child list.
4610 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
4612 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
4614 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4615 Fix handling of cancellation and failing pthread_mutex_unlock call.
4616 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
4617 (__pthread_cond_wait): Likewise.
4619 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4620 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
4621 lll_futex_timed_wait call.
4622 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4623 (pthread_rwlock_timedwrlock): Likewise.
4625 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4626 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
4627 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
4629 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
4630 check of lll_futex_wake return value.
4632 2003-03-03 Roland McGrath <roland@redhat.com>
4634 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
4636 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4637 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
4638 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4640 2003-03-02 Ulrich Drepper <drepper@redhat.com>
4642 * sysdeps/pthread/timer_create.c (timer_create): Return correct
4643 error for CPU clocks.
4645 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4646 _POSIX_MONOTONIC_CLOCK.
4647 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4649 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
4652 2003-03-01 Ulrich Drepper <drepper@redhat.com>
4654 * descr.h (struct pthread): Move cleanup field to the front.
4656 2003-03-01 Roland McGrath <roland@redhat.com>
4658 * sem_open.c (sem_open): Braino fix.
4660 2003-03-01 Ulrich Drepper <drepper@redhat.com>
4662 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
4663 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
4664 __pthread_cleanup_pop functionality.
4665 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4667 * descr.h (struct pthread): Move tid field to the front now that
4670 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
4671 (__lll_mutex_timedlock_wait): Remove.
4672 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
4673 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4674 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
4675 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4676 (lll_unlock_wake_cb): Don't save and restore %esi.
4677 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
4679 (__lll_timedwait_tid): Add alignment.
4680 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
4681 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
4683 (__lll_timedwait_tid): Removed.
4684 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
4685 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
4686 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4687 (pthread_barrier_wait): Don't save, load, and restore %esi for
4689 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4690 (__pthread_cond_signal): Don't save, load, and restore %esi.
4691 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
4692 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
4693 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4694 Don't save, load, and restore %esi.
4696 2003-02-27 Ulrich Drepper <drepper@redhat.com>
4698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
4699 Release lock before waking up the waiters.
4701 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
4703 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
4704 (reader_thread): Likewise.
4706 * sysdeps/pthread/pthread_rwlock_unlock.c
4707 (__pthread_rwlock_unlock): Release internal lock early. Don't try
4708 to wake up readers if there are none.
4710 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
4711 Release internal lock before wake threads.
4713 2003-02-26 Ulrich Drepper <drepper@redhat.com>
4715 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
4716 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
4718 * tst-rwlock9.c: Likewise.
4719 * tst-rwlock10.c: New file.
4720 * tst-rwlock11.c: New file.
4722 * Makefile (tests): Add tst-dlsym1.
4723 * tst-dlsym1.c: New file.
4725 * init.c (__pthread_initialize_minimal_internal): Set
4726 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
4727 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
4729 2003-02-24 Ulrich Drepper <drepper@redhat.com>
4731 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
4733 * tst-cond2.c: Fix sychronization with child.
4735 * tst-rwlock8.c (reader_thread): Remove unused variable.
4737 * Makefile: Add rules to build and run tst-tls3.
4738 * tst-tls3.c: New file.
4739 * tst-tls3mod.c: New file.
4741 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
4742 * tst-rwlock8.c: New file.
4743 * tst-rwlock9.c: New file.
4744 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
4745 complete broken rwlock implementation.
4746 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4748 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4750 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4751 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4752 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4753 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4754 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4755 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
4756 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4758 2003-02-23 Roland McGrath <roland@redhat.com>
4760 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
4762 2003-02-23 Ulrich Drepper <drepper@redhat.com>
4764 * Makefile (tests): Add tst-context1.
4765 * tst-context1.c: New file.
4767 * Makefile (tests): Add tst-tls1 and tst-tls2.
4768 * tst-tls1.c: New file.
4769 * tst-tls2.c: New file.
4771 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
4774 * pthread_create.c (start_thread): Set EXITING_BIT early.
4776 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
4777 (THREAD_GETMEM_NC): Likewise.
4779 2003-02-22 Ulrich Drepper <drepper@redhat.com>
4781 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
4782 off 3 more bytes by using offset-less instructions when possible.
4784 * Makefile: Add dependency for $(objpfx)version.d.
4786 * eintr.c (eintr_source): Add unnecessary return but the compiler
4789 * tst-kill3.c: Include <unistd.h>.
4791 2003-02-21 Roland McGrath <roland@redhat.com>
4793 * pthread_create.c (start_thread): Call __libc_thread_freeres.
4795 2003-02-21 Ulrich Drepper <drepper@redhat.com>
4797 * Makefile (tests): Add tst-eintr1.
4798 (distribute): Add eintr.c.
4799 * tst-eintr1.c: New file.
4800 * eintr.c: New file.
4802 * pthread_cancel.c (pthread_cancel): Use tkill directly.
4804 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
4805 Disallow sending SIGCANCEL.
4807 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
4808 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
4809 * tst-kill1.c: New file.
4810 * tst-kill2.c: New file.
4811 * tst-kill3.c: New file.
4812 * tst-kill5.c: New file.
4813 * tst-kill6.c: New file.
4814 * tst-basic7.c: Renamed to...
4815 * tst-kill4.c: ...this.
4817 2003-02-21 Roland McGrath <roland@redhat.com>
4819 * Makefile (install-lib-ldscripts): New variable.
4821 2003-02-21 Ulrich Drepper <drepper@redhat.com>
4823 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
4824 * pthread_cancel.c: Use INVALID_TD_P.
4825 * pthread_detach.c: Likewise.
4826 * pthread_getschedparam.c: Likewise.
4827 * pthread_setschedparam.c: Likewise.
4828 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4829 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4830 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
4831 * pthread_timedjoin.c: Likewise.
4833 * tst-basic7.c: Include <signal.h>.
4835 * pthread_join.c (pthread_join): Limited checking for invalid
4837 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
4839 2003-02-20 Ulrich Drepper <drepper@redhat.com>
4841 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
4842 beginning of the loop. Clear the entire first block of TSD.
4843 * Makefile (tests): Add tst-key4.
4844 * tst-key4.c: New file.
4846 2003-02-18 Ulrich Drepper <drepper@redhat.com>
4848 * Makefile (tests): Add tst-basic7.
4849 * tst-basic7.c: New file.
4851 * pthread_create.c (deallocate_tsd): Mark as internal_function.
4852 Add some more __builtin_expect.
4854 * pthreadP.h: Define dummy version of DEBUGGING_P.
4856 2003-02-17 Ulrich Drepper <drepper@redhat.com>
4858 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
4859 _POSIX_THREAD_PRIORITY_SCHEDULING.
4860 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
4861 _XOPEN_REALTIME_THREADS.
4862 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4864 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
4865 kernel returns EINVAL for PID <= 0, work around it.
4867 * Makefile (tests): Add tst-signal5.
4868 * tst-signal5.c: New file.
4870 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
4873 * tst-cancel1.c (tf): Block all signals.
4875 * Makefile (tests): Add tst-basic6.
4876 * tst-basic6.c: New file.
4878 * tst-basic1.c: Add test for process ID.
4880 * Makefile (tests): Add tst-cancel10.
4881 * tst-cancel10.c: New file.
4883 * Makefile (tests): Add tst-signal4.
4884 * tst-signal4.c: New file.
4886 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
4887 __sigismember instead of sigismember. Add __builtin_expect.
4889 2003-02-16 Ulrich Drepper <drepper@redhat.com>
4891 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
4892 pthread_setcancelstate, and pthread_rwlock_setpshared.
4894 * tst-cancel7.c (do_test): Make sure the pid file exists before
4895 canceling the thread.
4897 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
4898 pthread_rwlock_timedrdlock tests.
4899 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
4900 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4901 Check for invalid tv_nsec field.
4902 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4905 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
4906 recursive mutex of overflow.
4908 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
4910 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
4911 going into an endless loop.
4912 * Makefile (tests): Add tst-cancel9.
4913 * tst-cancel9.c: New file.
4915 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
4917 2003-02-15 Ulrich Drepper <drepper@redhat.com>
4919 * tst-mutex5.c (do_test): Add more timedlock tests.
4921 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
4922 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
4924 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4925 use INLINE_SYSCALL. Error number is returned, not -1.
4927 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
4928 and __deallocate_stack with internal_function.
4929 * pthread_create.c: Adjust definitions appropriately.
4930 * allocatestack.c: Likewise.
4932 * pthread_join.c: Add one more __builtin_expect.
4933 * pthread_timedjoin.c: Likewise.
4935 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
4936 not data of sequence number does not match.
4937 Add one __builtin_expect.
4939 * Makefile (tests): Add tst-clock1.
4940 * tst-clock1.c: New file.
4942 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
4944 * Makefile (tests): Add tst-basic5.
4945 * tst-basic5.c: New file.
4947 2003-02-14 Ulrich Drepper <drepper@redhat.com>
4949 * Makefile (tests): Add tst-basic4.
4950 * tst-basic4.c: New file.
4952 * pthreadP.h: Add declaraction for __nptl_nthreads.
4953 * pthread_create.c: Define __nptl_nthreads
4954 (start_thread): Increment __nptl_nthreads at beginning. Decrement
4955 after thread is done. If then zero, call exit(0).
4956 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4957 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
4958 * init.c (pthread_functions): Initialize ptr_nthreads.
4959 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
4960 (__reclaim_stacks): Decrement __nptl_nthreads.
4961 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
4963 * Makefile (tests): Add tst-basic3.
4964 * tst-basic3.c: New file.
4966 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
4967 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
4968 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
4969 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
4970 if asynchronous canceling is enabled.
4971 * pthread_join.c (pthread_join): When recognizing circular joins,
4972 take into account the other thread might be already canceled.
4973 * Makefile (tests): Add tst-join5.
4974 * tst-join5.c: New file.
4976 * Makefile (tests): Add tst-join4.
4977 * tst-join4.c: New file.
4979 2003-02-13 Ulrich Drepper <drepper@redhat.com>
4981 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
4983 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
4985 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
4986 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
4987 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
4989 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
4991 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
4992 error if lll_futex_wake failed.
4994 2003-02-13 Ulrich Drepper <drepper@redhat.com>
4996 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
4997 handling of cancellation and failung pthread_mutex_unlock call.
4998 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4999 * Makefile (tests): Add tst-cond8 and tst-cond9.
5000 * tst-cond8.c: New file.
5001 * tst-cond9.c: New file.
5003 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
5005 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
5006 non-standard initializers with __USE_GNU.
5008 * Makefile (tests): Add tst-cleanup3.
5009 * tst-cleanup3.c: New file.
5011 2003-02-12 Ulrich Drepper <drepper@redhat.com>
5013 * Makefile (tests): Add tst-attr1 and tst-attr2.
5014 * tst-attr1.c: New file.
5015 * tst-attr2.c: New file.
5017 * Makefile: Add rules to build and run tst-atfork2 test.
5018 * tst-atfork2.c: New file.
5019 * tst-atfork2mod.c: New file.
5021 * sysdeps/unix/sysv/linux/unregister-atfork.c
5022 (__unregister_atfork): Free the memory allocated for the handlers
5023 after removing them from the lists.
5025 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
5028 * tst-atfork1.c (do_test): Wait for the child we forked.
5029 Report error in child.
5031 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
5033 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
5035 2003-02-10 Ulrich Drepper <drepper@redhat.com>
5037 * Makefile (tests): Add tst-cancel8.
5038 * tst-cancel8.c: New file.
5040 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
5041 clearing of control variable.
5042 * Makefile (tests): Add tst-once3 and tst-once4.
5043 * tst-once3.c: New file.
5044 * tst-once4.c: New file.
5046 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
5048 * sysdeps/sh/Makefile: New file.
5049 * sysdeps/sh/bits/atomic.h: New file.
5050 * sysdeps/sh/pthread_spin_init.c: New file.
5051 * sysdeps/sh/pthread_spin_lock.c: New file.
5052 * sysdeps/sh/pthread_spin_trylock.S: New file.
5053 * sysdeps/sh/pthread_spin_unlock.S: New file.
5054 * sysdeps/sh/pthreaddef.h: New file.
5055 * sysdeps/sh/tcb-offsets.sym: New file.
5056 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
5057 * sysdeps/sh/tls.h: New file.
5058 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
5059 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
5060 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
5061 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
5062 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
5063 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
5064 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
5065 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
5066 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
5067 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
5068 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
5069 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
5070 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
5071 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
5072 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
5073 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
5074 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
5075 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
5076 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
5077 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
5078 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
5079 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
5080 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
5081 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
5082 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
5083 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
5084 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
5085 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
5086 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
5087 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
5089 2003-02-08 Ulrich Drepper <drepper@redhat.com>
5091 * tst-cond2.c: Rearrange code to not rely on behavior undefined
5094 * tst-basic2.c (do_test): Lock mutex before creating the thread.
5096 2003-02-07 Ulrich Drepper <drepper@redhat.com>
5098 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
5099 (TLS_GET_FS): New #define.
5100 (TLS_SET_FS): New #define.
5101 Correct value of __NR_set_thread_area.
5103 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
5105 2003-02-06 Ulrich Drepper <drepper@redhat.com>
5107 * Makefile (tests): Add tst-popen1.
5108 * tst-popen1.c: New file.
5110 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
5111 but inactive generalization.
5112 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5113 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5114 Minor optimization, remove one instruction.
5115 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5117 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
5119 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
5121 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
5123 * init.c (__NR_set_tid_address): Add #ifdef for s390.
5124 * sysdeps/pthread/pthread_barrier_wait.c: New file.
5125 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
5126 * sysdeps/pthread/pthread_cond_signal.c: New file.
5127 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
5128 * sysdeps/pthread/pthread_cond_wait.c: New file.
5129 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
5130 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
5131 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
5132 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
5133 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
5134 * sysdeps/s390/Makefile: New file.
5135 * sysdeps/s390/bits/atomic.h: New file.
5136 * sysdeps/s390/pthread_spin_init.c: New file.
5137 * sysdeps/s390/pthread_spin_lock.c: New file.
5138 * sysdeps/s390/pthread_spin_trylock.c: New file.
5139 * sysdeps/s390/pthread_spin_unlock.c: New file.
5140 * sysdeps/s390/pthreaddef.h: New file.
5141 * sysdeps/s390/tcb-offsets.sym: New file.
5142 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
5143 * sysdeps/s390/tls.h: New file.
5144 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
5145 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
5146 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
5147 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
5148 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
5149 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
5150 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
5151 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
5152 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
5153 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
5154 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
5155 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
5156 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
5157 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
5158 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
5159 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
5160 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
5161 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
5162 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
5163 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
5164 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
5165 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
5166 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
5168 2003-02-04 Ulrich Drepper <drepper@redhat.com>
5170 * atomic.h: Add a couple more default implementations.
5171 (atomic_compare_and_exchange_acq): Use
5172 __arch_compare_and_exchange_32_acq in return value definition. It
5174 (atomic_bit_set): Renamed from atomic_set_bit.
5175 Add missing atomic_ prefixes.
5177 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
5178 thread library is available, use correct value to mark initialized
5181 2003-02-03 Ulrich Drepper <drepper@redhat.com>
5183 * allocatestack.c (allocate_stack): Use __getpagesize instead of
5184 __sysconf to determine pagesize.
5186 * pthread_create.c: Include <atomic.h>.
5187 * allocatestack.c (allocate_stack): Implement coloring of the
5188 allocated stack memory. Rename pagesize to pagesize_m1. It's the
5189 size minus one. Adjust users.
5190 * sysdeps/i386/i686/Makefile: New file.
5192 2003-02-02 Ulrich Drepper <drepper@redhat.com>
5194 * allocatestack.c: Improve comment throughout the file.
5196 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5197 (__lll_lock_wait): Add branch prediction.
5198 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
5199 (__lll_lock_wait): Likewise.
5200 (lll_unlock_wake_cb): Removed.
5202 2003-01-31 Ulrich Drepper <drepper@redhat.com>
5204 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
5205 _POSIX_THREAD_PRIORITY_SCHEDULING.
5207 2003-01-30 Jakub Jelinek <jakub@redhat.com>
5209 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5210 Fix return type of ptr___pthread_getspecific.
5212 2003-01-29 Ulrich Drepper <drepper@redhat.com>
5214 * Makefile (tests): Add tst-umask1.
5215 (tst-umask1-ARGS): Define.
5216 * tst-umask1.c: New file.
5218 2003-01-28 Ulrich Drepper <drepper@redhat.com>
5220 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
5221 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
5222 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
5223 pthread_rwlock_unlock.
5224 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
5225 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
5226 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
5227 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
5228 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5230 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
5231 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5233 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
5234 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
5235 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
5237 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
5238 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
5240 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
5241 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
5242 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
5244 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
5245 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
5247 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
5249 * Makefile (libpthread-routines): Remove lowlevelcond and
5250 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
5251 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
5252 and pthread_cond_broadcast.
5253 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
5254 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
5255 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
5256 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
5257 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
5258 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
5259 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
5260 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
5261 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
5262 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
5263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
5264 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
5265 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
5266 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
5267 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
5268 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
5269 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
5270 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
5271 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
5272 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
5273 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
5274 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
5275 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
5276 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
5277 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
5278 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
5279 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
5280 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
5281 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
5282 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
5283 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
5285 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
5286 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
5287 of the code is moved to ...
5288 * sysdeps/pthread/createthread.c: ...here. New file.
5290 2003-01-27 Ulrich Drepper <drepper@redhat.com>
5292 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
5293 (__new_sem_post): Clear %eax before returning.
5294 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
5296 * Makefile (tests): Add tst-cleanup2.
5297 * tst-cleanup2.c: New file.
5299 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
5300 Interpret first parameter correctly.
5302 2003-01-17 Ulrich Drepper <drepper@redhat.com>
5304 * Makefile (headers): Add bits/semaphore.h.
5306 2003-01-16 Jakub Jelinek <jakub@redhat.com>
5308 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
5311 2003-01-14 Ulrich Drepper <drepper@redhat.com>
5313 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
5314 must be used and mapping failed.
5315 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
5317 * Makefile (CFLAGS-pthread_self.os): Define this, not
5318 CFLAGS-pthread_self.c.
5320 2003-01-13 Ulrich Drepper <drepper@redhat.com>
5322 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
5325 * Makefile (libpthread-routines): Add version. Add rules to build
5326 version.os and banner.h.
5327 * version.c: New file.
5329 2003-01-13 Jakub Jelinek <jakub@redhat.com>
5331 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
5332 the alias unconditional.
5333 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
5335 2003-01-13 Ulrich Drepper <drepper@redhat.com>
5337 * Makefile (CFLAGS-pthread_self.c): New definition.
5339 2003-01-06 Jakub Jelinek <jakub@redhat.com>
5341 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
5342 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
5343 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
5344 * init.c (__pthread_initialize_minimal_internal): Likewise.
5346 2003-01-07 Jakub Jelinek <jakub@redhat.com>
5348 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
5350 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5351 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
5352 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
5353 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
5354 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
5355 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
5357 2003-01-06 Jakub Jelinek <jakub@redhat.com>
5359 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
5360 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
5361 * tst-cancel-wrappers.sh: Remove all exceptions.
5363 2003-01-05 Ulrich Drepper <drepper@redhat.com>
5365 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
5366 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
5368 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
5369 Use __libc_pthread_functions array if SHARED.
5371 * pthreadP.h: Move pthread_cond_2_0_t definition to...
5372 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
5374 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
5375 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
5376 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
5377 __libc_ptf_call instead of __libc_maybe_call.
5379 (__libc_cleanup_region_start): Wrap function name with PTF call.
5380 (__libc_cleanup_region_end): Likewise.
5381 (__libc_cleanup_end): Likewise.
5383 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
5384 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
5385 * pthread_key_create.c: Add __pthread_key_create_internal alias.
5386 * pthreadP.h: Add prototypes.
5388 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
5389 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
5390 __pthread_rwlock_unlock aliases.
5391 * pthreadP.h: Add prototypes for new aliases.
5393 * pthreadP.h (struct pthead_functions): Moved to...
5394 * sysdeps/pthread/pthread-functions.h: ...here. New file.
5395 * init.c (pthread_functions): Add initializers for new elements.
5397 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
5398 __pthread_cleanup_pop_restore aliases.
5399 * pthreadP.h: Add prototypes.
5401 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
5402 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
5403 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
5404 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
5405 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5406 * pthreadP.h: Adjust prototypes and callers.
5408 2003-01-04 Ulrich Drepper <drepper@redhat.com>
5410 * Makefile (tests): Add tst-cancel7.
5411 (tst-cancel7-ARGS): New variable.
5412 * tst-cancel7.c: New file.
5414 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
5415 around gcc defficiencies.
5416 * old_pthread_cond_signal.c: Likewise.
5417 * old_pthread_cond_timedwait.c: Likewise.
5418 * old_pthread_cond_wait.c: Likewise.
5420 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
5422 2003-01-03 Ulrich Drepper <drepper@redhat.com>
5424 * Makefile (tests): Add tst-cond7.
5425 * tst-cond7.c: New file.
5427 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
5428 (condvar_cleanup): Get condvar address from the right place.
5430 * atomic.h: Correct definitions of atomic_full_barrier,
5431 atomic_read_barrier, atomic_write_barrier.
5433 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
5435 * old_pthread_cond_signal.c: Likewise.
5436 * old_pthread_cond_timedwait.c: Likewise.
5437 * old_pthread_cond_wait.c: Likewise.
5439 2003-01-03 Jakub Jelinek <jakub@redhat.com>
5441 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
5443 2003-01-03 Ulrich Drepper <drepper@redhat.com>
5445 * pthreadP.h (pthread_cond_2_0_t): New type.
5446 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
5447 Use new type for the 2.0 condvar function prototypes.
5448 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
5449 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
5451 * old_pthread_cond_destroy.c: Likewise.
5452 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
5453 * old_pthread_cond_signal.c: Likewise.
5454 * old_pthread_cond_timedwait.c: Likewise.
5455 * old_pthread_cond_wait.c: Likewise.
5457 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
5458 (__pthread_cond_wait): Don't save cancellation mode and seq value
5461 * herrno.c (__h_errno_location): Don't define as weak.
5463 2003-01-02 Jakub Jelinek <jakub@redhat.com>
5465 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
5466 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
5467 and pthread_cond_wait.
5468 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
5470 (__pthread_cond_broadcast_2_0): ... this.
5471 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
5473 (__pthread_cond_destroy_2_0): ... this.
5474 * old_pthread_cond_init.c (__old_pthread_cond_init):
5476 (__pthread_cond_init_2_0): ... this.
5477 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
5479 (__pthread_cond_signal_2_0): ... this.
5480 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
5482 (__pthread_cond_wait_2_0): ... this.
5483 * pthread_cond_destroy.c: Include shlib-compat.h.
5484 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
5485 * pthread_cond_init.c: Include shlib-compat.h.
5486 (pthread_cond_init): Change strong_alias into versioned_symbol.
5487 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
5488 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
5490 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
5491 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
5492 __pthread_cond_wait_2_0): New prototypes.
5493 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
5494 __old_pthread_cond_init, __old_pthread_cond_signal,
5495 __old_pthread_cond_wait): Removed.
5496 * init.c: Include shlib-compat.h.
5497 (pthread_functions): Guard ptr___pthread_attr_init_2_0
5498 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
5499 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
5500 ptr___pthread_cond_*_2_0 fields.
5501 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
5502 pthread_cond_*@GLIBC_2.0 compatibility symbols.
5504 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
5505 LIBC_SIGACTION was not yet defined.
5506 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
5507 [!defined LIBC_SIGACTION] (__sigaction): New function and
5509 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
5510 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
5512 2003-01-02 Jakub Jelinek <jakub@redhat.com>
5514 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
5516 2003-01-02 Ulrich Drepper <drepper@redhat.com>
5518 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5519 New, larger type definition.
5520 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
5522 * Versions [libpthread]: Add definitions for new pthread_cond_*
5523 interfaces for version GLIBC_2.3.2.
5524 * pthread_cond_init.c: Update initialization for new type definition.
5525 * Makefile (libpthread-routines): Remove pthread_cond_wait,
5526 pthread_cond_timedwait, pthread_cond_signal, and
5527 pthread_cond_broadcast. Add old_pthread_cond_init,
5528 old_pthread_cond_destroy, old_pthread_cond_wait,
5529 old_pthread_cond_timedwait, old_pthread_cond_signal, and
5530 old_pthread_cond_broadcast.
5531 * old_pthread_cond_broadcast.c: New file.
5532 * old_pthread_cond_destroy.c: New file.
5533 * old_pthread_cond_init.c: New file.
5534 * old_pthread_cond_signal.c: New file.
5535 * old_pthread_cond_timedwait.c: New file.
5536 * old_pthread_cond_wait.c: New file.
5537 * pthreadP.h: Add prototypes for the compatibility interfaces.
5539 * pthread_cond_destroy.c: Don't include <errno.h>.
5541 2003-01-01 Ulrich Drepper <drepper@redhat.com>
5543 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
5544 unnecessary zero offset when addressing MUTEX.
5546 2002-12-31 Ulrich Drepper <drepper@redhat.com>
5548 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
5550 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
5551 for __register_atfork.
5553 2002-12-31 Jakub Jelinek <jakub@redhat.com>
5555 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
5556 instead of ASSEMBLER test macro.
5558 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
5559 __libc_current_sigrtmax): Add libc_hidden_def.
5561 * sysdeps/pthread/list.h: Remove assert.h include.
5563 2002-12-31 Ulrich Drepper <drepper@redhat.com>
5565 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
5566 __pthread_initialize_minimal_internal not
5567 __pthread_initialize_minimal.
5569 2002-12-30 Ulrich Drepper <drepper@redhat.com>
5571 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
5572 __pthread_initialize_minimal as hidden.
5574 * init.c (__pthread_initialize_minimal_internal): Don't mark as
5577 2002-12-31 Jakub Jelinek <jakub@redhat.com>
5579 * Makefile ($(inst_libdir)/libpthread.so): Depend on
5580 $(common-objpfx)format.lds, include that into the output script.
5582 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
5584 2002-12-28 Andreas Jaeger <aj@suse.de>
5586 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
5587 nsec resolution changes.
5588 (xstat64_conv): Likewise.
5589 (xstat32_conv): Likewise.
5590 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
5592 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
5593 structs stat and stat64.
5594 * time/time.h (__timespec_defined): Define for __USE_MISC.
5595 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
5597 2002-12-30 Jakub Jelinek <jakub@redhat.com>
5599 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
5601 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
5602 (pthread_exit): Use strong_alias to avoid warnings.
5603 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
5604 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
5605 ptr___pthread_attr_init_2_*.
5606 * init.c (pthread_functions): Adjust.
5608 2002-12-29 Ulrich Drepper <drepper@redhat.com>
5610 * forward.c: Make all functions available by default again. It
5611 caused too much trouble.
5613 * pt-siglongjmp.c: Removed.
5615 2002-12-28 Jakub Jelinek <jakub@redhat.com>
5617 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
5618 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
5619 * sysdeps/i386/Makefile: New file.
5620 * sysdeps/i386/tcb-offsets.sym: New file.
5621 * sysdeps/pthread/tcb-offsets.h: New file.
5622 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
5623 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
5625 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
5626 __register_atfork...
5627 (GLIBC_2.3.2): ...here.
5629 2002-12-28 Ulrich Drepper <drepper@redhat.com>
5631 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
5632 pthread_attr_setstackaddr with __attribute_deprecated__.
5634 2002-12-27 Jakub Jelinek <jakub@redhat.com>
5636 * pt-system.c (system): Remove cancellation handling.
5637 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
5638 cancellation routines.
5640 2002-12-28 Ulrich Drepper <drepper@redhat.com>
5642 * descr.h: Include <dl-sysdep.h>.
5643 (struct pthread): Move header.data.list to the back of the struct.
5644 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
5645 (MULTIPLE_THREADS_OFFSET): Adjust offset.
5646 (SYSINFO_OFFSEET): Likewise.
5648 2002-12-27 Jakub Jelinek <jakub@redhat.com>
5650 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
5652 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
5653 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
5654 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
5655 (USE_DL_SYSINFO): Undef.
5657 2002-12-22 Jakub Jelinek <jakub@redhat.com>
5659 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
5660 $(common-objpfx)libc.so.
5661 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
5662 it is bigger than pipe buffer size even on arches with bigger
5664 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
5666 2002-12-25 Ulrich Drepper <drepper@redhat.com>
5668 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
5669 correct errno access for case that USE___THREAD is not defined.
5671 2002-12-24 Ulrich Drepper <drepper@redhat.com>
5673 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
5674 Patch by Marijn Ros <marijn@mad.scientist.com>.
5676 2002-12-22 Roland McGrath <roland@redhat.com>
5678 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
5680 2002-12-20 Ulrich Drepper <drepper@redhat.com>
5682 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
5684 2002-12-19 Ulrich Drepper <drepper@redhat.com>
5686 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
5687 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
5688 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
5690 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
5692 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5693 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
5694 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
5695 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5696 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5697 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
5698 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
5699 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5701 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
5703 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
5705 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
5707 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
5709 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
5710 that sysinfo is properly initialized.
5711 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
5712 to 1 only for ld.so.
5714 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
5715 RTLD_CORRECT_DYNAMIC_WEAK.
5717 2002-12-19 Jakub Jelinek <jakub@redhat.com>
5719 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
5720 Use return 0 as 6th argument to FORWARD4.
5721 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
5723 2002-12-18 Ulrich Drepper <drepper@redhat.com>
5725 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
5726 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
5727 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
5728 (INIT_SYSINFO): New #define.
5729 (TLS_TP_INIT): Use INIT_SYSINFO.
5730 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
5731 At test to make sure SYSINFO_OFFSET value is correct.
5732 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
5734 2002-12-18 Jakub Jelinek <jakub@redhat.com>
5736 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
5737 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
5738 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
5739 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
5740 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
5741 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
5742 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
5744 2002-12-18 Ulrich Drepper <drepper@redhat.com>
5746 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
5747 macro instead of using int $0x80 directly.
5749 * sysdeps/pthread/bits/stdio-lock.h: New file.
5750 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
5751 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
5752 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
5753 * Makefile (routines): Add libc-lowlevelmutex.
5755 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
5756 __i686.get_pc_thunk.dx.
5758 2002-12-17 Jakub Jelinek <jakub@redhat.com>
5760 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
5761 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
5762 ($(objpfx)tst-cancel-wrappers.out): New rule.
5763 * tst-cancel-wrappers.sh: New test.
5764 * tst-locale1.c: Include signal.h.
5765 (uselocale): Test static linking of __libc_current_sigrt*.
5767 2002-12-17 Ulrich Drepper <drepper@redhat.com>
5769 * Makefile (tests): Add tst-cancel6.
5770 * tst-cancel6.c: New file
5772 2002-12-17 Jakub Jelinek <jakub@redhat.com>
5774 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
5775 Define meaningfully for assembler as well.
5776 * pthreadP.h (struct pthread_functions): Remove
5777 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
5778 and ptr_pthread_attr_init_2_1 fields.
5779 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
5780 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
5781 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
5782 (FORWARD3): Define using FORWARD4.
5783 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
5785 * pt-system.c: Remove duplicate stdlib.h include.
5787 2002-12-16 Ulrich Drepper <drepper@redhat.com>
5789 * sem_init.c: Define sem_init@GLIBC_2.0.
5790 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
5791 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
5793 * flockfile.c: Moved to...
5794 * sysdeps/pthread/flockfile.c: ...here. New file.
5795 * funlockfile.c: Moved to...
5796 * sysdeps/pthread/funlockfile.c: ...here. New file.
5797 * ftrylockfile.c: Moved to...
5798 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
5800 2002-12-16 Jakub Jelinek <jakub@redhat.com>
5802 * libc-cancellation.c: Guard both function with
5803 #if !defined NOT_IN_libc.
5804 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
5805 automatically provided pthread wrappers.
5806 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
5807 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
5809 * pt-open.c: Removed.
5810 * pt-fcntl.c: Removed.
5811 * pt-fsync.c: Removed.
5812 * pt-lseek.c: Removed.
5813 * pt-msgrcv.c: Removed.
5814 * pt-msgsnd.c: Removed.
5815 * pt-msync.c: Removed.
5816 * pt-nanosleep.c: Removed.
5817 * pt-open64.c: Removed.
5818 * pt-pause.c: Removed.
5819 * pt-pread.c: Removed.
5820 * pt-pread64.c: Removed.
5821 * pt-pwrite.c: Removed.
5822 * pt-pwrite64.c: Removed.
5823 * pt-read.c: Removed.
5824 * pt-recv.c: Removed.
5825 * pt-recvfrom.c: Removed.
5826 * pt-recvmsg.c: Removed.
5827 * pt-send.c: Removed.
5828 * pt-sendto.c: Removed.
5829 * pt-sigtimedwait.c: Removed.
5830 * pt-sigwait.c: Removed.
5831 * pt-wait.c: Removed.
5832 * pt-waitpid.c: Removed.
5833 * pt-write.c: Removed.
5834 * pt-accept.c: Removed.
5835 * pt-close.c: Removed.
5836 * pt-connect.c: Removed.
5837 * pt-lseek64.c: Removed.
5838 * pt-sendmsg.c: Removed.
5839 * pt-tcdrain.c: Removed.
5841 2002-12-15 Ulrich Drepper <drepper@redhat.com>
5843 * init.c (__pthread_initialize_minimal_internal): Renamed from
5844 __pthread_initialize_minimal. Make old name an alias. This
5845 converts a normal relocation into a relative relocation.
5847 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
5849 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
5850 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
5851 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
5852 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
5853 pt-sigwaitinfo, pt-waitid, and pt-writev.
5854 * pt-creat.c: Removed.
5855 * pt-poll.c: Removed.
5856 * pt-pselect.c: Removed.
5857 * pt-readv.c: Removed.
5858 * pt-select.c: Removed.
5859 * pt-sigpause.c: Removed.
5860 * pt-sigsuspend.c: Removed.
5861 * pt-sigwaitinfo.c: Removed.
5862 * pt-waitid.c: Removed.
5863 * pt-writev.c: Removed.
5865 * init.c (pthread_functions): New variable.
5866 (__pthread_initialize_minimal): Pass pointer to pthread_functions
5867 (or NULL) to __libc_pthread_init.
5868 * forward.c: Rewrite to use __libc:pthread_functions array to get
5870 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
5872 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
5873 Take new parameter. Copy content of variable pointed to by it
5874 to __libc_pthread_init.
5876 * pthreadP.h (struct pthread_functions): New type.
5877 (__libc_pthread_init): Declare.
5879 * pthread_attr_destroy.c: Add namespace protected alias.
5880 * pthread_attr_getdetachstate.c: Likewise.
5881 * pthread_attr_getinheritsched.c: Likewise.
5882 * pthread_attr_getschedparam.c: Likewise.
5883 * pthread_attr_getschedpolicy.c: Likewise.
5884 * pthread_attr_getscope.c: Likewise.
5885 * pthread_attr_setdetachstate.c: Likewise.
5886 * pthread_attr_setinheritsched.c: Likewise.
5887 * pthread_attr_setschedparam.c: Likewise.
5888 * pthread_attr_setschedpolicy.c: Likewise.
5889 * pthread_attr_setscope.c: Likewise.
5890 * pthread_cond_broadcast.c: Likewise.
5891 * pthread_cond_destroy.c: Likewise.
5892 * pthread_cond_init.c: Likewise.
5893 * pthread_cond_signal.c: Likewise.
5894 * pthread_cond_wait.c: Likewise.
5895 * pthread_condattr_destroy.c: Likewise.
5896 * pthread_condattr_init.c: Likewise.
5897 * pthread_equal.c: Likewise.
5898 * pthread_exit.c: Likewise.
5899 * pthread_getschedparam.c: Likewise.
5900 * pthread_self.c: Likewise.
5901 * pthread_setcancelstate.c: Likewise.
5902 * pthread_setschedparam.c: Likewise.
5903 * pthread_mutex_destroy.c: Likewise.
5904 * pthread_mutex_init.c: Likewise.
5905 * pthreadP.h: Add prototypes for the aliases.
5907 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
5908 multiple_threads member in correct TCB to 1.
5910 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
5911 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
5912 member of thread decriptor, otherwise return unconditionally 1.
5914 2002-12-14 Ulrich Drepper <drepper@redhat.com>
5916 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
5917 regular Linux version. Remove file.
5918 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
5919 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
5920 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
5921 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
5922 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
5923 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
5924 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
5925 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
5926 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
5927 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
5928 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
5929 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
5930 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
5931 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
5932 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
5933 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
5934 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
5935 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
5936 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
5937 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
5938 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
5939 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
5940 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
5941 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
5942 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
5943 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
5944 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
5945 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
5946 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
5947 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
5949 2002-12-14 Jakub Jelinek <jakub@redhat.com>
5951 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
5952 * sysdeps/unix/sysv/linux/open.c: Removed.
5953 * sysdeps/unix/sysv/linux/fsync.c: Removed.
5954 * sysdeps/unix/sysv/linux/lseek.c: Removed.
5955 * sysdeps/unix/sysv/linux/msync.c: Removed.
5956 * sysdeps/unix/sysv/linux/read.c: Removed.
5957 * sysdeps/unix/sysv/linux/close.c: Removed.
5958 * sysdeps/unix/sysv/linux/creat.c: Removed.
5959 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
5960 * sysdeps/unix/sysv/linux/pause.c: Removed.
5961 * sysdeps/unix/sysv/linux/select.c: Removed.
5962 * sysdeps/unix/sysv/linux/write.c: Removed.
5964 2002-12-14 Ulrich Drepper <drepper@redhat.com>
5966 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
5967 element in TCB to see whether locking is needed.
5969 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
5970 MULTIPLE_THREADS_OFFSET value is correct.
5972 * sysdeps/unix/sysv/linux/close.c: New file.
5973 * sysdeps/unix/sysv/linux/connect.S: New file.
5974 * sysdeps/unix/sysv/linux/creat.c: New file.
5975 * sysdeps/unix/sysv/linux/fsync.c: New file.
5976 * sysdeps/unix/sysv/linux/llseek.c: New file.
5977 * sysdeps/unix/sysv/linux/lseek.c: New file.
5978 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
5979 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
5980 * sysdeps/unix/sysv/linux/msync.c: New file.
5981 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
5982 * sysdeps/unix/sysv/linux/open.c: New file.
5983 * sysdeps/unix/sysv/linux/open64.c: New file.
5984 * sysdeps/unix/sysv/linux/pause.c: New file.
5985 * sysdeps/unix/sysv/linux/poll.c: New file.
5986 * sysdeps/unix/sysv/linux/pread.c: New file.
5987 * sysdeps/unix/sysv/linux/pread64.c: New file.
5988 * sysdeps/unix/sysv/linux/pselect.c: New file.
5989 * sysdeps/unix/sysv/linux/pwrite.c: New file.
5990 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
5991 * sysdeps/unix/sysv/linux/readv.c: New file.
5992 * sysdeps/unix/sysv/linux/recv.S: New file.
5993 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
5994 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
5995 * sysdeps/unix/sysv/linux/select.c: New file.
5996 * sysdeps/unix/sysv/linux/send.S: New file.
5997 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
5998 * sysdeps/unix/sysv/linux/sendto.S: New file.
5999 * sysdeps/unix/sysv/linux/sigpause.c: New file.
6000 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
6001 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6002 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6003 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6004 * sysdeps/unix/sysv/linux/system.c: New file.
6005 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
6006 * sysdeps/unix/sysv/linux/wait.c: New file.
6007 * sysdeps/unix/sysv/linux/waitid.c: New file.
6008 * sysdeps/unix/sysv/linux/waitpid.c: New file.
6009 * sysdeps/unix/sysv/linux/writev.c: New file.
6010 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
6012 * pt-readv.c: Fix comment.
6014 2002-12-14 Jakub Jelinek <jakub@redhat.com>
6016 * tst-cleanup1.c: Include stdlib.h.
6018 * tst-cancel5.c: New test.
6019 * Makefile (tests): Add tst-cancel5.
6020 (tst-cancel5): Link against libc.so libpthread.so in that order.
6022 2002-12-13 Ulrich Drepper <drepper@redhat.com>
6024 * forward.c (test_loaded): Prevent recursive calls.
6026 * Makefile (routines): Add libc-cancellation.
6027 * libc-cancellation.c: New file.
6028 * descr.h (struct pthread): Add multiple_threads field.
6029 * allocatestack.c (allocate_stack): Initialize multiple_header field of
6030 new thread descriptor to 1.
6031 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
6032 Initialize multiple_thread field after successful thread creation.
6033 * cancellation.c (__do_cancel): Move to pthreadP.h.
6034 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
6035 (__pthread_disable_asynccancel): Add internal_function attribute.
6036 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
6037 * pthread_setcancelstate.c: Likewise.
6038 * pthread_setcanceltype.c: Likewise.
6039 * pthread_exit.c: Likewise.
6040 * pthreadP.h (CANCELLATION_P): Likewise.
6041 (__do_cancel): Define as static inline.
6042 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
6043 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
6045 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
6046 fields. Define MULTIPLE_THREADS_OFFSET.
6047 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
6049 * sysdeps/unix/sysv/linux/accept.S: New file.
6050 * sysdeps/unix/sysv/linux/read.c: New file.
6051 * sysdeps/unix/sysv/linux/write.c: New file.
6052 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
6053 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
6054 initialization of __libc_locking_needed.
6055 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
6056 __libc_locking_needed, use multiple_threads field in TCB.
6057 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6059 2002-12-12 Ulrich Drepper <drepper@redhat.com>
6061 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
6063 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
6065 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
6066 access to __libc_locking_needed for PIC.
6068 2002-12-12 Jakub Jelinek <jakub@redhat.com>
6070 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
6071 declare for libc.so.
6072 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
6074 (__libc_lock_lock): Put into statement expression.
6075 (__libc_lock_unlock): Remove trailing semicolon.
6076 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
6078 2002-12-12 Roland McGrath <roland@redhat.com>
6080 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
6081 "m" constraint to refer to __libc_locking_needed. Declare it here.
6083 2002-12-12 Ulrich Drepper <drepper@redhat.com>
6085 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
6086 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
6087 Initialize __libc_locking_needed.
6088 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
6089 instead of __register_pthread_fork_handler.
6090 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
6091 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
6092 fork-gen with libc_pthread_init.
6093 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
6094 of __register_pthread_fork_handler.
6095 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
6096 of __register_pthread_fork_handler.
6097 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
6098 __libc_locking_needed to determine whether lock prefix can be avoided.
6099 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
6101 2002-12-11 Ulrich Drepper <drepper@redhat.com>
6103 * Makefile (tests): Add tst-cleanup1.
6104 * tst-cleanup1.c: New file.
6105 * cancellation.c (__cleanup_thread): Removed.
6106 (__do_cancel): Remove call to __cleanup_thread.
6107 * pthreadP.h: Remove __cleanup_thread prorotype.
6109 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
6110 Remember function and argument even if cancellation handler
6111 function is not available.
6112 (__libc_cleanup_region_end): Execute registered function directly if
6113 pthread functions are not available.
6114 (__libc_cleanup_end): Likewise.
6116 * init.c (__pthread_initialize_minimal): Fix initialization in
6117 static lib by preventing gcc from being too clever.
6119 2002-12-10 Ulrich Drepper <drepper@redhat.com>
6121 * init.c (__pthread_initialize_minimal): Remove unneccesary
6124 * Makefile (tests): We can run tst-locale2 now.
6126 2002-12-09 Ulrich Drepper <drepper@redhat.com>
6128 * Versions: Remove duplicated sigwait entry.
6130 2002-12-08 Ulrich Drepper <drepper@redhat.com>
6132 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
6135 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
6137 * pthreadP.h: Declare __pthread_enable_asynccancel and
6138 __pthread_disable_asynccancel.
6139 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
6140 (CANCEL_RESET): Use __pthread_disable_asynccancel.
6141 * cancellation.c (__pthread_enable_asynccancel): New function.
6142 (__pthread_disable_asynccancel): New function.
6143 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
6144 * pt-close.c: Likewise.
6145 * pt-connect.c: Likewise.
6146 * pt-creat.c: Likewise.
6147 * pt-fcntl.c: Likewise.
6148 * pt-fsync.c: Likewise.
6149 * pt-lseek.c: Likewise.
6150 * pt-lseek64.c: Likewise.
6151 * pt-msgrcv.c: Likewise.
6152 * pt-msgsnd.c: Likewise.
6153 * pt-msync.c: Likewise.
6154 * pt-nanosleep.c: Likewise.
6155 * pt-open.c: Likewise.
6156 * pt-open64.c: Likewise.
6157 * pt-pause.c: Likewise.
6158 * pt-poll.c: Likewise.
6159 * pt-pread.c: Likewise.
6160 * pt-pread64.c: Likewise.
6161 * pt-pselect.c: Likewise.
6162 * pt-pwrite.c: Likewise.
6163 * pt-pwrite64.c: Likewise.
6164 * pt-read.c: Likewise.
6165 * pt-readv.c: Likewise.
6166 * pt-recv.c: Likewise.
6167 * pt-recvfrom.c: Likewise.
6168 * pt-recvmsg.c: Likewise.
6169 * pt-select.c: Likewise.
6170 * pt-send.c: Likewise.
6171 * pt-sendmsg.c: Likewise.
6172 * pt-sendto.c: Likewise.
6173 * pt-sigpause.c: Likewise.
6174 * pt-sigsuspend.c: Likewise.
6175 * pt-sigtimedwait.c: Likewise.
6176 * pt-sigwait.c: Likewise.
6177 * pt-sigwaitinfo.c: Likewise.
6178 * pt-system.c: Likewise.
6179 * pt-tcdrain.c: Likewise.
6180 * pt-wait.c: Likewise.
6181 * pt-waitid.c: Likewise.
6182 * pt-waitpid.c: Likewise.
6183 * pt-write.c: Likewise.
6184 * pt-writev.c: Likewise.
6185 * pthread_join.c: Likewise.
6186 * pthread_timedjoin.c: Likewise.
6188 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
6189 (__xpg_sigpause): New function.
6190 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
6192 2002-12-07 Ulrich Drepper <drepper@redhat.com>
6194 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
6196 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
6197 _GI_pthread_cleanup_pop to pthreadP.h.
6199 * ftrylockfile.c: Use _IO_lock_trylock instead of
6200 pthread_mutex_trylock.
6202 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
6203 (CANCEL_RESET): Likewise.
6204 (__pthread_setcanceltype_): Declare.
6205 (__pthread_mutex_lock_internal): Declare.
6206 (__pthread_mutex_unlock_internal): Declare.
6207 (__pthread_once_internal): Declare.
6208 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
6209 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
6211 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
6212 and pthread_mutex_unlock.
6213 * pthread_cond_wait.c: Likewise.
6214 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
6215 * pthread_mutex_unlock.c: Likewise.
6217 * pthread_setcanceltype.c: Add additional alias
6218 __pthread_setcanceltype.
6220 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
6221 * sem_open.c (sem_open): Likewise.
6222 Use __libc_open, __libc_write, and __libc_close instead of
6223 open, write, and close respectively.
6225 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
6226 Rewrite as statement expression since it must return a value.
6228 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
6229 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
6232 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
6233 alias __pthread_once_internal.
6235 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
6237 2002-12-06 Ulrich Drepper <drepper@redhat.com>
6239 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
6240 * tst-stdio1.c: New file.
6241 * tst-stdio2.c: New file.
6243 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
6245 * Makefile (tests): Comment out tst-locale2 for now.
6246 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
6248 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
6250 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
6251 Use _IO_lock_init instead of explicit assignment.
6253 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
6254 Define __libc_lock_* and __libc_lock_recursive macros with
6255 lowlevellock macros, not pthread mutexes.
6257 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
6258 of pthread_mutex_lock.
6259 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
6260 instead of pthread_mutex_unlock.
6262 2002-12-06 Roland McGrath <roland@redhat.com>
6264 * allocatestack.c (__stack_user): Use uninitialized defn.
6265 * init.c (__pthread_initialize_minimal): Initialize it here.
6267 2002-12-05 Roland McGrath <roland@redhat.com>
6269 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
6271 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
6273 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
6276 2002-12-05 Ulrich Drepper <drepper@redhat.com>
6278 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
6280 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
6281 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
6282 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
6283 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
6284 for __libc_lock_* macros.
6285 * Makefile (routines): Add libc-lowlevellock.
6287 2002-10-09 Roland McGrath <roland@redhat.com>
6289 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
6290 Under [__PIC__], call the function via the pointer fetched for
6291 comparison rather than a call by name that uses the PLT.
6292 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
6293 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
6294 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
6295 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
6296 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
6298 2002-12-04 Roland McGrath <roland@redhat.com>
6300 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
6302 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
6303 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
6305 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
6307 2002-12-04 Ulrich Drepper <drepper@redhat.com>
6309 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
6310 a completely opaque, non-integer type.
6311 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6313 2002-12-05 Jakub Jelinek <jakub@redhat.com>
6315 * sysdeps/i386/tls.h: Include stdlib.h.
6316 * sysdeps/x86_64/tls.h: Likewise.
6318 2002-12-04 Ulrich Drepper <drepper@redhat.com>
6320 * Makefile (tests): Add tst-locale2.
6321 (tests-static): Likewise.
6322 * tst-locale2.c: New file.
6324 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
6325 volatile and add memory clobbers to lock operations.
6327 2002-12-03 Ulrich Drepper <drepper@redhat.com>
6329 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
6330 * sysdeps/i386/i486/bits/atomic.h: New file.
6331 * sysdeps/i386/i586/bits/atomic.h: New file.
6332 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
6333 include i486 version.
6334 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
6335 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
6336 Patch by Marijn Ros <marijn@mad.scientist.com>.
6338 * allocatestack.c (get_cached_stack): Don't crash if we first
6339 found a stack with a larger size then needed.
6340 Reported by Hui Huang <hui.huang@sun.com>.
6342 * Makefile (tests): Add tst-sysconf.
6343 * tst-sysconf.c: New file.
6345 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
6346 PTHREAD_THREADS_MAX.
6348 2002-12-02 Roland McGrath <roland@redhat.com>
6350 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
6351 Declare using hidden_proto instead of attribute_hidden, so there are
6352 non-.hidden static symbols for gdb to find.
6353 (__pthread_keys): Likewise.
6354 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
6355 * allocatestack.c (__stack_user): Likewise.
6356 * pthread_create.c (__pthread_keys): Likewise.
6357 (__nptl_threads_events, __nptl_last_event): Make these static instead
6359 * pthread_key_create.c (__pthread_pthread_keys_max,
6360 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
6362 2002-12-02 Ulrich Drepper <drepper@redhat.com>
6364 * Makefile (tests): Add tst-locale1. If buid-static is yes link
6366 * tst-locale1.c: New file.
6368 * pthread_cond_timedwait.c: Include <stdlib.h>.
6370 * Makefile (tests): Add tst-fork2 and tst-fork3.
6371 * tst-fork2.c: New file.
6372 * tst-fork3.c: New file.
6374 2002-11-28 Ulrich Drepper <drepper@redhat.com>
6376 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
6378 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
6379 require it to 200112L.
6381 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
6382 instruction only if HAVE_CMOV is defined.
6383 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
6385 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
6387 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
6389 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
6391 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
6393 2002-11-27 Ulrich Drepper <drepper@redhat.com>
6395 * sysdeps/x86_64/bits/atomic.h: New file.
6397 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
6400 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
6401 possible since gettid cannot fail.
6403 * sysdeps/x86_64/pthreaddef.h: New file.
6405 * sysdeps/i386/pthreaddef.h (gettid): Removed.
6407 * sysdeps/x86_64/pthread_spin_init.c: New file.
6408 * sysdeps/x86_64/pthread_spin_lock.c: New file.
6409 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
6410 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
6412 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
6413 Add missing lock prefix. Minute optimization.
6415 * tst-spin2.c (main): Also check successful trylock call.
6417 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
6418 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
6420 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
6421 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
6423 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
6424 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
6425 value in case of an error. Add support for INTERNAL_SYSCALL.
6427 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
6428 value in case of an error.
6430 * sysdeps/x86_64/tls.h: New file.
6432 2002-11-26 Ulrich Drepper <drepper@redhat.com>
6434 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
6435 takes the array member name and the index as parameters.
6436 (THREAD_SETMEM_NC): Likewise.
6437 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
6438 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
6441 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
6442 to decide which code to use.
6443 (THREAD_SETMEM_NC): Likewise.
6445 * allocatestack.c (queue_stack): Don't remove stack from list here.
6446 Do it in the caller. Correct condition to prematurely terminate
6447 loop to free stacks.
6448 (__deallocate_stack): Remove stack from list here.
6450 2002-11-26 Ulrich Drepper <drepper@redhat.com>
6452 * Makefile (tests): Add tst-stack1.
6453 * tst-stack1.c: New file.
6455 * allocatestack.c (allocate_stack): Initialize the TCB on a user
6458 * pthread_attr_getstack.c: Return bottom of the thread area.
6460 2002-11-25 Ulrich Drepper <drepper@redhat.com>
6462 * Makefile (libpthread-routines): Add pt-allocrtsig and
6463 pthread_kill_other_threads.
6464 * pt-allocrtsig.c: New file.
6465 * pthread_kill_other_threads.c: New file.
6466 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
6467 all three functions.
6468 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
6470 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
6471 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
6472 and __libc_allocate_rtsig_private.
6473 * Versions (libpthread): Export pthread_kill_other_threads_np,
6474 __libc_current_sigrtmin, and __libc_current_sigrtmax.
6476 2002-11-24 Ulrich Drepper <drepper@redhat.com>
6478 * allocatestack.c (allocate_stack): stackaddr in attribute points to
6479 the end of the stack. Adjust computations.
6480 When mprotect call fails dequeue stack and free it.
6481 * pthread_attr_setstack.c: Store top of the stack in stackaddr
6483 * pthread_getattr_np.c: Likewise.
6485 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
6488 2002-11-23 Ulrich Drepper <drepper@redhat.com>
6490 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
6491 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
6493 2002-11-22 Ulrich Drepper <drepper@redhat.com>
6495 * pthread_getspecific.c: Optimize access to first 2nd-level array.
6496 * pthread_setspecific.c: Likewise.
6498 2002-11-21 Ulrich Drepper <drepper@redhat.com>
6500 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
6501 definitions. Get them from the official place.
6502 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
6504 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
6505 Use new CLONE_ flags in clone() calls.
6507 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
6508 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
6510 * Versions: Add pthread_* functions for libc.
6511 * forward.c: New file.
6513 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
6515 * herrno.c: New file.
6518 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
6519 sem_trywait, and sem_timedwait. Add herrno and res.
6520 * sem_init.c: Don't initialize lock and waiters members.
6521 * sem_open.c: Likewise.
6522 * sem_post.c: Removed.
6523 * sem_wait.c: Removed.
6524 * sem_trywait.c: Removed.
6525 * sem_timedwait.c: Removed.
6526 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
6527 Includes full implementations of sem_post, sem_wait, sem_trywait,
6529 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
6530 for new implementation.
6531 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
6534 * tst-sem3.c: Improve error message.
6535 * tst-signal3.c: Likewise.
6537 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
6538 to tell the kernel about the termination futex and to initialize tid
6539 member. Don't initialize main_thread.
6540 * descr.h (struct pthread): Remove main_thread member.
6541 * cancelllation.c (__do_cancel): Remove code handling main thread.
6542 The main thread is not special anymore.
6544 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
6545 size of the stacks to stack_cache_actsize.
6547 * pt-readv.c: Add missing "defined".
6548 * pt-sigwait.c: Likewise.
6549 * pt-writev.c: Likewise.
6551 2002-11-09 Ulrich Drepper <drepper@redhat.com>
6553 * Versions: Export __connect from libpthread.
6554 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6556 * Makefile (libpthread-routines): Add pt-raise.
6557 * sysdeps/unix/sysv/linux/raise.c: New file.
6558 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
6559 * sysdeps/generic/pt-raise.c: New file.
6561 * pthread_cond_init.c: Initialize all data elements of the condvar
6562 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
6564 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
6565 * pthread_create.c: Likewise.
6567 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
6568 * tst-key1.c: New file.
6569 * tst-key2.c: New file.
6570 * tst-key3.c: New file.
6572 * Versions: Export pthread_detach for version GLIBC_2.0.
6573 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
6575 2002-11-08 Ulrich Drepper <drepper@redhat.com>
6577 * pthread_key_create.c: Terminate search after an unused key was found.
6578 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6580 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
6581 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6583 2002-10-10 Ulrich Drepper <drepper@redhat.com>
6585 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
6586 dynamic lookup for errno in PIC.
6588 * allocatestack.c (get_cached_stack): Rearrange code slightly to
6589 release the stack lock as soon as possible.
6590 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
6591 the static TLS block.
6592 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
6594 * cancellation.c: Renamed from cancelation.c.
6595 * Makefile: Adjust accordingly.
6596 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
6597 * cleanup_defer.c: Use CANCELLATION_P.
6598 * pthread_testcancel.c: Likewise.
6599 * descr.h: Fix spelling in comments.
6601 * pthread_getattr_np.c: Likewise.
6602 * pthread_getschedparam.c: Likewise.
6603 * pthread_setschedparam.c: Likewise.
6604 * Versions: Likewise.
6606 * pt-pselect.c: New file.
6607 * Makefile (libpthread-routines): Add pt-pselect.
6608 * Versions: Add pselect.
6610 * tst-cancel4.c: New file.
6611 * Makefile (tests): Add tst-cancel4.
6613 2002-10-09 Ulrich Drepper <drepper@redhat.com>
6615 * pthread_mutex_lock.c: Always record lock ownership.
6616 * pthread_mutex_timedlock.c: Likewise.
6617 * pthread_mutex_trylock.c: Likewise.
6619 * pt-readv.c: New file.
6620 * pt-writev.c: New file.
6621 * pt-creat.c: New file.
6622 * pt-msgrcv.c: New file.
6623 * pt-msgsnd.c: New file.
6624 * pt-poll.c: New file.
6625 * pt-select.c: New file.
6626 * pt-sigpause.c: New file.
6627 * pt-sigsuspend.c: New file.
6628 * pt-sigwait.c: New file.
6629 * pt-sigwaitinfo.c: New file.
6630 * pt-waitid.c: New file.
6631 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
6632 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
6633 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
6634 * Versions: Add all the new functions.
6636 * tst-exit1.c: New file.
6637 * Makefile (tests): Add tst-exit1.
6639 * sem_timedwait.c: Minor optimization for more optimal fastpath.
6641 2002-10-08 Ulrich Drepper <drepper@redhat.com>
6643 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
6645 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
6646 call. pthread_join is an official cancellation point.
6647 * pthread_timedjoin.c: Likewise.
6649 * pthread_cond_wait.c: Revert order in which internal lock are dropped
6650 and the condvar's mutex are retrieved.
6651 * pthread_cond_timedwait.c: Likewise.
6652 Reported by dice@saros.East.Sun.COM.
6654 2002-10-07 Ulrich Drepper <drepper@redhat.com>
6656 * pthreadP.h: Cut out all type definitions and move them...
6657 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
6658 * pthreadP.h: Include <internaltypes.h>.
6660 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
6663 * sem_trywait.c: Shuffle #includes around to get right order.
6664 * sem_timedwait.c: Likewise.
6665 * sem_post.c: Likewise.
6666 * sem_wait.c: Likewise.
6668 * nptl 0.3 released.
6670 * Makefile (tests): Add tst-signal3.
6671 * tst-signal3.c: New file.
6673 2002-10-05 Ulrich Drepper <drepper@redhat.com>
6675 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
6676 the asms modify the sem object.
6677 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
6679 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
6681 * pthreadP.h (struct sem): New type. Actual semaphore type.
6682 * semaphoreP.h: Include pthreadP.h.
6683 * sem_getvalue.c: Adjust to sem_t change.
6684 * sem_init.c: Likewise.
6685 * sem_open.c: Likewise.
6686 * sem_post.c: Likewise.
6687 * sem_timedwait.c: Likewise.
6688 * sem_trywait.c: Likewise.
6689 * sem_wait.c: Likewise.
6691 2002-10-04 Ulrich Drepper <drepper@redhat.com>
6693 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
6694 * tst-basic2.c: New file.
6695 * tst-exec1.c: New file.
6696 * tst-exec2.c: New file.
6697 * tst-exec3.c: New file.
6699 * tst-fork1.c: Remove extra */.
6701 * nptl 0.2 released. The API for IA-32 is complete.