1 2004-07-21 Roland McGrath <roland@redhat.com>
3 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5 2004-07-19 Roland McGrath <roland@redhat.com>
7 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
9 2004-07-02 Roland McGrath <roland@redhat.com>
11 * configure: Don't exit.
13 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
15 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
16 (__pthread_cond_timedwait): Check for invalid nanosecond in
19 2004-07-07 Ulrich Drepper <drepper@redhat.com>
21 * Makefile: Add rules to build and run tst-fini1.
22 * tst-fini1.c: New file.
23 * tst-fini1mod.c: New file.
25 2004-07-05 Ulrich Drepper <drepper@redhat.com>
27 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
28 if no cancellation support is needed.
29 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
30 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
31 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
32 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
33 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
34 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
35 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
36 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
37 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
39 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
40 only if not already defined.
42 2004-07-05 Jakub Jelinek <jakub@redhat.com>
44 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
45 constraint "m" instead of "0" for futex.
47 * shlib-versions: Add powerpc64-.*-linux.*.
49 2004-07-04 Jakub Jelinek <jakub@redhat.com>
51 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
52 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
54 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
55 1 billion and 64-bit tv_nsec which is valid when truncated to 32
58 2004-06-29 Roland McGrath <roland@redhat.com>
60 * Banner: NPTL no longer has its own version number.
61 * Makefile (nptl-version): Variable removed.
62 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
63 using $(version), the glibc version number.
65 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
67 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
68 Fix branch offset for a PLT entry.
69 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
71 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
73 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
75 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
78 2004-06-28 Jakub Jelinek <jakub@redhat.com>
80 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
83 2004-06-28 Jakub Jelinek <jakub@redhat.com>
85 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
86 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
88 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
89 (pthread_rwlock_timedrdlock): Likewise.
91 2004-06-22 Jakub Jelinek <jakub@redhat.com>
93 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
94 Set __r7 to val, not mutex.
96 2004-06-27 Ulrich Drepper <drepper@redhat.com>
98 * Makefile: Add rules to build tst-rwlock14.
99 * tst-rwlock14.c: New file.
101 2004-06-24 Boris Hu <boris.hu@intel.com>
103 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
105 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
107 2004-06-19 Andreas Jaeger <aj@suse.de>
109 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
110 assembler in last patch.
112 2004-06-17 Ulrich Drepper <drepper@redhat.com>
114 * sysdeps/pthread/pthread_cond_timedwait.c
115 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
117 (__pthread_cond_timedwait): Check for invalid nanosecond in
119 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
120 * tst-cond19.c: New file.
121 * Makefile: Add rules to build and run tst-cond19.
123 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
125 * tst-context1.c (GUARD_PATTERN): Defined.
126 (tst_context_t): Define struct containing ucontext_t & guard words.
127 (ctx): Declare as an array of tst_context_t.
128 (fct): Verify uc_link & guard words are still valid.
129 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
131 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
133 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
134 Add __data.__futex field, reshuffle __data.__clock.
135 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
136 (__pthread_cond_signal): Increment __futex at the same time as
137 __wakeup_seq or __total_seq. Pass address of __futex instead of
138 address of low 32-bits of __wakeup_seq to futex syscall.
139 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
140 (__pthread_cond_wait): Likewise. Pass __futex value from before
141 releasing internal lock to FUTEX_WAIT.
142 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
143 (__pthread_cond_timedwait): Likewise.
144 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
145 (FUTEX_CMP_REQUEUE): Define.
146 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
147 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
148 Pass __futex value from before the unlock and __futex address instead
149 of address of low 32-bits of __wakeup_seq to futex syscall.
150 Fallback to FUTEX_WAKE all on any errors.
152 2004-06-08 Jakub Jelinek <jakub@redhat.com>
154 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
156 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
157 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
158 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
159 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
160 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
162 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
164 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
165 Add memory clobber to inline assembly.
166 (__lll_mutex_trylock): Likewise.
167 (__lll_mutex_cond_trylock): Likewise.
169 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
171 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
172 Pass val argument as 6th system call argument in %r7.
174 2004-05-21 Jakub Jelinek <jakub@redhat.com>
176 * Makefile (tests): Add tst-cond16.
177 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
178 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
179 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
180 Add __data.__futex field, reshuffle __data.__clock.
181 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
182 (__pthread_cond_signal): Increment __futex at the same time as
183 __wakeup_seq or __total_seq. Pass address of __futex instead of
184 address of low 32-bits of __wakeup_seq to futex syscall.
185 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
186 (__pthread_cond_wait): Likewise. Pass __futex value from before
187 releasing internal lock to FUTEX_WAIT.
188 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
189 (__pthread_cond_timedwait): Likewise.
190 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
191 (FUTEX_CMP_REQUEUE): Define.
192 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
193 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
194 Pass __futex value from before the unlock and __futex address instead
195 of address of low 32-bits of __wakeup_seq to futex syscall.
196 Fallback to FUTEX_WAKE all on any errors.
197 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
199 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
200 internally. Return non-zero if error, zero if success.
201 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
202 Add __data.__futex field, reshuffle __data.__clock.
203 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
205 (lll_futex_requeue): Add val argument, return 1 unconditionally
207 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
208 Add __data.__futex field, reshuffle __data.__clock.
209 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
211 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
212 internally. Return non-zero if error, zero if success.
213 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
214 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
215 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
217 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
218 internally. Return non-zero if error, zero if success.
219 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
220 Add __data.__futex field, reshuffle __data.__clock.
221 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
223 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
224 internally. Return non-zero if error, zero if success.
225 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
226 Add __data.__futex field, reshuffle __data.__clock.
227 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
228 Add __data.__futex field, reshuffle __data.__clock.
229 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
230 Increment __futex at the same time as __wakeup_seq or __total_seq.
231 Pass address of __futex instead of address of low 32-bits of
232 __wakeup_seq to futex syscall.
233 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
234 Pass __futex value from before releasing internal lock
236 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
237 Likewise. Avoid unnecessary shadowing of variables.
238 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
239 Set __futex to 2 * __total_seq. Pass __futex value from before the
240 unlock and __futex address instead of address of low 32-bits of
241 __wakeup_seq to futex_requeue macro, adjust for new return value
243 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
244 (__pthread_cond_signal): Increment __futex at the same time as
245 __wakeup_seq or __total_seq. Pass address of __futex instead of
246 address of low 32-bits of __wakeup_seq to futex syscall.
247 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
248 (__pthread_cond_wait): Likewise. Pass __futex value from before
249 releasing internal lock to FUTEX_WAIT.
250 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
251 (__pthread_cond_timedwait): Likewise.
252 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
253 (FUTEX_CMP_REQUEUE): Define.
254 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
255 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
256 Pass __futex value from before the unlock and __futex address instead
257 of address of low 32-bits of __wakeup_seq to futex syscall.
258 Fallback to FUTEX_WAKE all on any errors.
260 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
262 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
263 Add nop to align the end of critical section.
264 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
266 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
268 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
269 Add __broadcast_seq field.
270 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
271 all waiters as woken with woken_seq and bump broadcast counter.
272 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
273 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
274 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
275 Comment typo fixes. Avoid returning -ETIMEDOUT.
277 2004-06-01 Ulrich Drepper <drepper@redhat.com>
279 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
280 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
281 Reported by Kaz Kojima.
283 2004-05-25 Jakub Jelinek <jakub@redhat.com>
285 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
287 2004-05-21 Jakub Jelinek <jakub@redhat.com>
289 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
290 __broadcast_seq with bc_seq after acquiring internal lock instead of
293 2004-05-18 Jakub Jelinek <jakub@redhat.com>
295 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
297 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
298 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
299 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
300 (pthread_cond_t): Add __data.__broadcast_seq field.
301 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
302 (FRAME_SIZE): Define.
303 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
305 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
307 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
309 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
310 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
313 2004-05-18 Ulrich Drepper <drepper@redhat.com>
315 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
316 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
317 Add __broadcast_seq field.
318 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
319 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
320 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
321 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
322 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
323 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
324 all waiters as woken with woken_seq and bump broadcast counter.
325 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
326 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
327 __broadcast_seq field.
328 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
329 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
330 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
331 * pthread_cond_init.c: Initialize __broadcast_seq field.
332 * Makefile (tests): Add tst-cond17 and tst-cond18.
333 Add .NOTPARALLEL goal.
334 * tst-cond16.c: New file. From Jakub.
335 * tst-cond17.c: New file. From Jakub.
336 * tst-cond18.c: New file. From Jakub.
338 2004-05-16 Ulrich Drepper <drepper@redhat.com>
340 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
344 Parametrize frame size. Correct some unwind info.
345 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
347 2004-05-04 Jakub Jelinek <jakub@redhat.com>
349 * tst-stack3.c: Note testing functionality beyond POSIX.
351 2004-05-04 Jakub Jelinek <jakub@redhat.com>
353 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
354 Change conditional from ifdef to if.
356 2004-04-23 Jakub Jelinek <jakub@redhat.com>
358 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
359 SYSDEP_CANCEL_ERROR): Define.
362 2004-05-01 Jakub Jelinek <jakub@redhat.com>
364 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
366 2004-04-20 Jakub Jelinek <jakub@redhat.com>
368 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
370 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
372 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
373 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
374 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
375 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
377 2004-04-19 Ulrich Drepper <drepper@redhat.com>
379 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
380 thread has all signals blocked.
382 2004-04-18 Andreas Jaeger <aj@suse.de>
384 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
385 (SEM_VALUE_MAX): Add missing brace.
387 2004-04-17 Jakub Jelinek <jakub@redhat.com>
389 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
391 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
392 * sysdeps/pthread/tst-mqueue8x.c: New test.
393 * tst-cancel4.c: Update comment about message queues.
395 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
396 return it_value { 0, 0 }.
397 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
399 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
400 assertion for SIGEV_NONE.
401 (thread_attr_compare): Compare all attributes, not just a partial
404 2004-04-17 Jakub Jelinek <jakub@redhat.com>
406 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
408 2004-04-17 Ulrich Drepper <drepper@redhat.com>
410 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
411 Just use a plain number.
412 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
413 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
414 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
415 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
416 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
417 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
418 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
420 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
422 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
424 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
426 2004-04-15 Jakub Jelinek <jakub@redhat.com>
428 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
429 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
430 of calling sigwaitinfo.
432 2004-04-16 Ulrich Drepper <drepper@redhat.com>
434 * allocatestack.c (allocate_stack): Set reported_guardsize
436 * pthread_getattr_np.c (pthread_getattr_np): Use
437 reported_guardsize instead of guardsize.
438 * descr.h (struct pthread): Add reported_guardsize field.
440 2004-04-13 Jakub Jelinek <jakub@redhat.com>
442 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
444 2004-04-12 Ulrich Drepper <drepper@redhat.com>
446 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
448 2004-04-08 Jakub Jelinek <jakub@redhat.com>
450 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
451 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
452 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
453 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
454 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
456 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
457 (_POSIX_MESSAGE_PASSING): Define.
458 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
459 (_POSIX_MESSAGE_PASSING): Define.
460 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
461 (_POSIX_MESSAGE_PASSING): Define.
463 2004-04-04 Ulrich Drepper <drepper@redhat.com>
465 * tst-context1.c (fct): Check whether correct stack is used.
467 2004-04-03 Ulrich Drepper <drepper@redhat.com>
469 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
470 matching constraints for asm mem parameters.
472 * tst-clock2.c (tf): Don't define unless needed.
474 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
476 * Makefile (link-libc-static): Use $(static-gnulib) instead of
479 2004-03-30 Ulrich Drepper <drepper@redhat.com>
481 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
482 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
483 * pthreadP.h: Declare __nptl_deallocate_tsd.
484 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
487 * Makefile (tests): Add tst-tsd5.
488 * tst-tsd5.c: New file.
490 2004-03-29 Ulrich Drepper <drepper@redhat.com>
492 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
493 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
494 is SHLIB_COMPAT check.
495 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
496 (__pthread_attr_getaffinity_old): Likewise.
497 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
498 (__pthread_getaffinity_old): Likewise.
499 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
500 (__pthread_setaffinity_old): Likewise.
502 2004-03-26 Ulrich Drepper <drepper@redhat.com>
504 * allocatestack.c (_make_stacks_executable): Call
505 _dl_make_stack_executable first.
507 2004-03-24 Roland McGrath <roland@redhat.com>
509 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
510 constraint instead of "0".
512 2004-03-24 Ulrich Drepper <drepper@redhat.com>
514 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
515 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
517 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
518 code to avoid warning.
520 2004-03-24 Andreas Jaeger <aj@suse.de>
522 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
523 (__pthread_attr_setaffinity_old): Remove const.
525 2004-03-23 Ulrich Drepper <drepper@redhat.com>
527 * sysdeps/unix/sysv/linux/smp.h: New file.
528 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
529 * init.c: Define __is_smp.
530 (__pthread_initialize_minimal_internal): Call is_smp_system to
532 * pthreadP.h: Declare __is_smp.
533 Define MAX_ADAPTIVE_COUNT is necessary.
534 * pthread_mutex_init.c: Add comment regarding __spins field.
535 * pthread_mutex_lock.c: Implement adaptive mutex type.
536 * pthread_mutex_timedlock.c: Likewise.
537 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
538 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
540 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
541 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
542 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
543 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
544 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
545 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
546 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
547 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
548 lll_mutex_cond_trylock.
549 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
550 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
551 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
552 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
553 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
554 Define BUSY_WAIT_NOP.
555 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
556 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
558 * tst-mutex5.c: Add support for testing adaptive mutexes.
559 * tst-mutex7.c: Likewise.
560 * tst-mutex5a.c: New file.
561 * tst-mutex7a.c: New file.
562 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
564 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
565 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
566 vgettimeofday call might destroy the content.
568 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
571 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
572 No need to restrict type of ret. Make it int. Add comment.
574 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
575 Remove unnecessary setne instruction.
577 2004-03-22 Jakub Jelinek <jakub@redhat.com>
579 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
580 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
581 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
582 If realloc fails, break out of the loop.
584 2004-03-20 Andreas Jaeger <aj@suse.de>
586 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
587 (__pthread_setaffinity_old): Fix interface.
588 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
589 (__pthread_getaffinity_old): Likewise.
591 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
592 (__pthread_setaffinity_new): Remove duplicate declaration.
594 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
596 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
597 the return value to a safe register.
598 (CDISABLE): Set the function argument correctly.
600 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
602 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
603 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
604 Rewrite so that only one locked memory operation per round is needed.
605 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
606 (pthread_barrier_wait): After wakeup, release lock only when the
607 last thread stopped using the barrier object.
608 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
609 (__pthread_cond_wait): Don't store mutex address if the current
610 value is ~0l. Add correct cleanup support and unwind info.
611 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
612 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
613 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
614 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
615 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
616 Add correct cleanup support and unwind info.
617 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
618 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
619 information for syscall wrappers.
621 2004-03-18 Ulrich Drepper <drepper@redhat.com>
623 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
624 cpusetsize field, remove next.
625 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
626 parameter for size of the CPU set.
627 (pthread_setaffinity_np): Likewise.
628 (pthread_attr_getaffinity_np): Likewise.
629 (pthread_attr_setaffinity_np): Likewise.
630 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
631 interface change, keep compatibility code.
632 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
633 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
634 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
635 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
636 __pthread_getaffinity_np.
637 * Versions: Add version for changed interfaces.
638 * tst-attr3.c: Adjust test for interface change.
639 * pthread_getattr_np.c: Query the kernel about the affinity mask with
640 increasing buffer sizes.
641 * pthread_attr_destroy.c: Remove unused list handling.
642 * pthread_attr_init.c: Likewise.
644 2004-03-17 Roland McGrath <roland@redhat.com>
646 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
647 first argument to clock_getres so we ever enable kernel timers.
649 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
651 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
653 2004-03-12 Richard Henderson <rth@redhat.com>
655 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
656 oldvalue from CENABLE to CDISABLE.
658 2004-03-12 Ulrich Drepper <drepper@redhat.com>
660 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
661 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
662 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
663 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
665 2004-03-11 Richard Henderson <rth@redhat.com>
667 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
668 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
669 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
671 2004-03-11 Jakub Jelinek <jakub@redhat.com>
673 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
674 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
675 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
677 2004-03-11 Jakub Jelinek <jakub@redhat.com>
679 * forward.c (__pthread_cond_broadcast_2_0,
680 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
681 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
682 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
684 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
686 * sysdeps/sh/tcb-offsets.sym: Add PID.
687 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
688 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
690 2004-03-10 Ulrich Drepper <drepper@redhat.com>
692 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
693 include <sysdep-cancel.h>, vfork is no cancellation point.
694 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
695 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
696 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
698 2004-03-10 Jakub Jelinek <jakub@redhat.com>
700 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
702 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
703 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
705 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
707 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
708 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
709 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
710 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
711 of DO_CALL_VIA_BREAK. Work around a gas problem.
713 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
714 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
715 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
716 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
717 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
718 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
720 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
721 a local register for saving old PID. Negate PID in parent upon exit.
723 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
725 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
726 before syscall, set to the old value in the parent afterwards.
727 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
728 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
730 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
731 before syscall, set to the old value in the parent afterwards.
732 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
733 * sysdeps/s390/tcb-offsets.sym: Add PID.
735 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
736 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
737 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
738 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
739 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
740 * sysdeps/sparc/tcb-offsets.sym: Add PID.
742 2004-03-10 Andreas Schwab <schwab@suse.de>
744 * sysdeps/ia64/tcb-offsets.sym: Add PID.
745 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
746 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
748 2004-03-09 Jakub Jelinek <jakub@redhat.com>
750 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
751 * tst-cancel21.c (do_one_test): Likewise.
752 Reported by Gordon Jin <gordon.jin@intel.com>.
754 2004-02-09 Jakub Jelinek <jakub@redhat.com>
756 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
757 if non-zero and set to INT_MIN if zero.
758 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
759 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
760 (SAVE_PID, RESTORE_PID): Define.
762 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
763 Use relative path to avoid including NPTL i386/vfork.S.
764 (SAVE_PID, RESTORE_PID): Define.
765 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
766 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
767 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
769 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
770 * tst-vfork1.c: New test.
771 * tst-vfork2.c: New test.
772 * tst-vfork1x.c: New test.
773 * tst-vfork2x.c: New test.
775 2004-03-08 Ulrich Drepper <drepper@redhat.com>
777 * sysdeps/i386/tcb-offsets.sym: Add PID.
778 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
779 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
780 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
782 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
784 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
786 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
788 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
791 2004-03-07 Ulrich Drepper <drepper@redhat.com>
793 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
796 * tst-once4.c: Remove unnecessary macro definition.
798 * tst-mutex7.c (do_test): Limit thread stack size.
799 * tst-once2.c (do_test): Likewise.
800 * tst-tls3.c (do_test): Likewise.
801 * tst-tls1.c (do_test): Likewise.
802 * tst-signal3.c (do_test): Likewise.
803 * tst-kill6.c (do_test): Likewise.
804 * tst-key4.c (do_test): Likewise.
805 * tst-join4.c (do_test): Likewise.
806 * tst-fork1.c (do_test): Likewise.
807 * tst-context1.c (do_test): Likewise.
808 * tst-cond2.c (do_test): Likewise.
809 * tst-cond10.c (do_test): Likewise.
810 * tst-clock2.c (do_test): Likewise.
811 * tst-cancel10.c (do_test): Likewise.
812 * tst-basic2.c (do_test): Likewise.
813 * tst-barrier4.c (do_test): Likewise.
815 2004-03-05 Ulrich Drepper <drepper@redhat.com>
817 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
819 2004-03-01 Ulrich Drepper <drepper@redhat.com>
821 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
822 (__pthread_cond_timedwait): Optimize wakeup test.
823 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
824 (__pthread_cond_wait): Likewise.
825 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
826 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
829 2004-02-29 Ulrich Drepper <drepper@redhat.com>
831 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
832 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
833 the atomic instruction needed.
834 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
835 (__lll_mutex_lock_wait): Likewise.
837 2004-02-28 Ulrich Drepper <drepper@redhat.com>
839 * Makefile (tests): Add tst-cond14 and tst-cond15.
840 * tst-cond14.c: New file.
841 * tst-cond15.c: New file.
843 2004-02-27 Ulrich Drepper <drepper@redhat.com>
845 * sysdeps/pthread/createthread.c (create_thread): Remove use of
846 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
847 needs to be implemented differently to be useful.
849 2004-02-26 Ulrich Drepper <drepper@redhat.com>
851 * pthread_attr_setschedparam.c: Don't test priority against limits
852 here. Set ATTR_FLAG_SCHED_SET flag.
853 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
854 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
855 from parent thread to child. If attribute is used and scheduling
856 parameters are not inherited, copy parameters from attribute or
857 compute them. Check priority value.
858 * pthread_getschedparam.c: If the parameters aren't known yet get
859 them from the kernel.
860 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
861 ATTR_FLAG_POLICY_SET flag for thread.
862 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
863 and ATTR_FLAG_POLICY_SET.
865 * sysdeps/pthread/createthread.c: Use tgkill if possible.
867 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
868 fail if stack address hasn't been set. Just return 0.
870 2004-02-25 Ulrich Drepper <drepper@redhat.com>
872 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
873 libpthread for the files in this list.
874 (CFLAGS-tst-unload): Removed.
875 * tst-unload.c (do_test): Don't use complete path for
878 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
881 2004-02-22 Ulrich Drepper <drepper@redhat.com>
883 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
884 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
885 operation per round is needed.
886 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
887 (__lll_mutex_lock_wait): Likewise.
889 2004-02-20 Ulrich Drepper <drepper@redhat.com>
891 * tst-cancel9.c (cleanup): Don't print to stderr.
893 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
895 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
897 2004-02-20 Jakub Jelinek <jakub@redhat.com>
899 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
900 (__syscall_error_handler2): Call CDISABLE.
901 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
902 (__syscall_error_handler2): Call CDISABLE.
904 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
905 Release lock before the loop, don't reacquire it.
907 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
909 2004-02-19 Andreas Schwab <schwab@suse.de>
911 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
914 2004-02-18 Ulrich Drepper <drepper@redhat.com>
916 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
917 (pthread_barrier_wait): After wakeup, release lock only when the
918 last thread stopped using the barrier object.
919 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
920 (pthread_barrier_wait): Likewise.
921 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
923 * Makefile (tests): Add tst-barrier4.
924 * tst-barrier4.c: New file.
926 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
927 (__pthread_cond_timedwait): Perform timeout test while holding
928 internal lock to prevent wakeup race.
929 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
930 * sysdeps/pthread/pthread_cond_timedwait.c
931 (__pthread_cond_timedwait): Likewise.
932 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
933 (__pthread_cond_timedwait): Likewise.
935 2004-02-18 Jakub Jelinek <jakub@redhat.com>
937 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
938 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
939 * Makefile (tests): Add tst-rwlock13.
940 * tst-rwlock13.c: New test.
942 2004-02-16 Ulrich Drepper <drepper@redhat.com>
944 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
945 (__condvar_tw_cleanup): Little optimization.
946 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
948 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
950 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
951 libpthread as "lib" parameter to SHLIB_COMPAT.
952 (__novmx_siglongjmp): Fix typo in function name.
953 (__novmx_longjmp): Fix typo in function name.
955 2004-02-13 Ulrich Drepper <drepper@redhat.com>
957 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
960 * sysdeps/generic/pt-longjmp.c: Moved to...
961 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
963 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
965 * Makefile (libpthread-routines): Add pt-cleanup.
966 * pt-longjmp.c: Removed.
967 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
968 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
969 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
970 Version longjmp, siglongjmp for GLIBC_2.3.4.
971 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
973 2004-02-13 Ulrich Drepper <drepper@redhat.com>
975 * sysdeps/pthread/pthread_cond_timedwait.c
976 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
977 Reuse code. Add __builtin_expects.
979 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
980 (__pthread_cond_timedwait): Get internal lock in case timeout has
981 passed before the futex syscall.
982 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
984 2004-01-20 Ulrich Drepper <drepper@redhat.com>
986 * allocatestack.c: Pretty printing.
988 * sysdeps/pthread/createthread.c (create_thread): Don't add
989 CLONE_DETACHED bit if it is not necessary.
991 2004-01-16 Ulrich Drepper <drepper@redhat.com>
993 * pthread_getattr_np.c: Include ldsodefs.h.
995 2004-01-16 Richard Henderson <rth@redhat.com>
997 * allocatestack.c: Don't declare __libc_stack_end.
998 * init.c (__pthread_initialize_minimal_internal): Likewise.
999 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
1001 2004-01-15 Richard Henderson <rth@redhat.com>
1003 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
1004 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
1005 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
1006 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
1007 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
1008 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
1009 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1010 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
1012 2004-01-14 Ulrich Drepper <drepper@redhat.com>
1014 * init.c (pthread_functions): Make array const.
1016 2004-01-13 Ulrich Drepper <drepper@redhat.com>
1018 * allocatestack.c (__make_stacks_executable): Change interface.
1019 Check parameters. Pass parameter on to libc counterpart.
1020 * pthreadP.h: Change declaration.
1022 2004-01-13 Richard Henderson <rth@redhat.com>
1024 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
1026 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
1029 * sysdeps/alpha/Makefile: New file.
1030 * sysdeps/alpha/tcb-offsets.sym: New file.
1031 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1032 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
1034 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
1037 2004-01-08 Jakub Jelinek <jakub@redhat.com>
1039 * Makefile (tests): Add tst-backtrace1.
1040 * tst-backtrace1.c: New test.
1042 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
1044 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
1045 register as second parameter to the REGISTER macro.
1046 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
1047 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
1048 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
1049 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
1050 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
1051 of thread register as second parameter to REGISTER macro in 64 case.
1053 2004-01-03 Ulrich Drepper <drepper@redhat.com>
1055 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
1056 (CFLAGS-getpid.o): Defined.
1057 (CFLAGS-getpid.os): Defined.
1059 2003-12-31 Ulrich Drepper <drepper@redhat.com>
1061 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
1062 returned for main thread does not overlap with any other VMA.
1063 Patch by Jakub Jelinek.
1065 2003-12-29 Jakub Jelinek <jakub@redhat.com>
1067 * tst-raise1.c: Include stdio.h.
1069 2003-12-23 Jakub Jelinek <jakub@redhat.com>
1071 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
1072 setting with __ASSUME_TGKILL || defined __NR_tgkill.
1073 If pid is 0, set it to selftid.
1074 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
1075 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
1076 != 0, return self->tid without doing a syscall.
1077 * descr.h (struct pthread): Move pid field after tid.
1079 * Makefile (tests): Add tst-raise1.
1080 * tst-raise1.c: New file.
1082 2003-12-23 Roland McGrath <roland@redhat.com>
1084 * tst-oddstacklimit.c: New file.
1085 * Makefile (tests): Add it.
1086 (tst-oddstacklimit-ENV): New variable.
1088 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
1089 value up to page size for __default_stacksize.
1091 2003-12-21 Ulrich Drepper <drepper@redhat.com>
1093 * Makefile (tests): Add tst-eintr5.
1094 * tst-eintr5.c: New file.
1096 * eintr.c (eintr_source): Prevent sending signal to self.
1098 * tst-eintr2.c (tf1): Improve error message.
1100 2003-12-20 Ulrich Drepper <drepper@redhat.com>
1102 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
1103 * sysdeps/unix/sysv/linux/getpid.c: New file.
1104 * pthread_cancel.c: Add comment explaining use of PID field.
1105 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1106 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
1107 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
1108 temporarily to signal the field must not be relied on and updated
1110 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
1111 temporarily negative.
1112 * sysdeps/unix/sysv/linux/raise.c: Likewise.
1114 2003-12-19 Ulrich Drepper <drepper@redhat.com>
1116 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
1117 (eintr_source): If ARG != NULL, use pthread_kill.
1118 * tst-eintr1.c: Adjust for this change.
1119 * tst-eintr2.c: Likewise.
1120 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
1121 * tst-eintr3.c: New file.
1122 * tst-eintr4.c: New file.
1124 2003-12-19 Jakub Jelinek <jakub@redhat.com>
1126 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
1127 if CANCELSTATE_BITMASK is set.
1128 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
1131 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
1132 (tests-reverse): Add tst-cancel23.
1133 * tst-cancel22.c: New test.
1134 * tst-cancel23.c: New test.
1136 2003-12-18 Ulrich Drepper <drepper@redhat.com>
1138 * tst-eintr1.c: Better error messages.
1140 * Makefile (tests): Add tst-eintr2.
1141 * tst-eintr2.c: New file.
1143 2003-12-18 Jakub Jelinek <jakub@redhat.com>
1145 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
1146 (CFLAGS-tst-cancelx21.c): Set.
1147 * tst-cancel21.c: New test.
1148 * tst-cancelx21.c: New test.
1150 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
1152 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
1153 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
1154 * pt-longjmp.c: Include jmpbuf-unwind.h.
1155 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
1156 _JMPBUF_UNWINDS. Adjust compared pointers.
1157 * init.c (__pthread_initialize_minimal_internal): Initialize
1158 pd->stackblock_size.
1159 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
1160 * sysdeps/alpha/jmpbuf-unwind.h: New file.
1161 * sysdeps/i386/jmpbuf-unwind.h: New file.
1162 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
1163 * sysdeps/s390/jmpbuf-unwind.h: New file.
1164 * sysdeps/sh/jmpbuf-unwind.h: New file.
1165 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
1166 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
1167 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
1168 (_JMPBUF_CFA_UNWINDS): Remove.
1169 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
1171 2003-12-12 Jakub Jelinek <jakub@redhat.com>
1173 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
1174 (CFLAGS-tst-cancelx20.c): Set.
1175 * tst-cancel20.c: New test.
1176 * tst-cancelx20.c: New test.
1178 2003-12-17 Ulrich Drepper <drepper@redhat.com>
1180 * init.c (__pthread_initialize_minimal_internal): Don't treat
1181 architectures with separate register stack special here when
1182 computing default stack size.
1184 2003-12-17 Roland McGrath <roland@redhat.com>
1186 * Makefile (tst-cancelx7-ARGS): New variable.
1187 Reportd by Greg Schafer <gschafer@zip.com.au>.
1189 2003-12-17 Jakub Jelinek <jakub@redhat.com>
1191 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
1192 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
1193 (tst-stack3-ENV): Set.
1194 ($(objpfx)tst-stack3-mem): New.
1195 * tst-stack3.c: New test.
1197 2003-12-10 David Mosberger <davidm@hpl.hp.com>
1199 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
1200 Add unwind directives. Drop unused .regstk directive.
1201 (_fini_EPILOG_BEGINS): Add unwind directives.
1203 2003-12-11 Ulrich Drepper <drepper@redhat.com>
1205 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
1206 Assume parameter is a pointer.
1207 (lll_futex_wake): Likewise.
1208 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
1210 (lll_futex_wake): Likewise.
1211 Reported by Boris Hu.
1212 * sysdeps/unix/sysv/linux/unregister-atfork.c
1213 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
1215 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
1217 2003-12-10 Ulrich Drepper <drepper@redhat.com>
1219 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
1220 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
1221 __rtld_lock_initialize for ld.so lock.
1222 Patch in part by Adam Li <adam.li@intel.com>.
1224 2003-12-02 David Mosberger <davidm@hpl.hp.com>
1226 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
1227 in $(gnulib). Also, remove stale comment.
1229 2003-11-12 David Mosberger <davidm@hpl.hp.com>
1231 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
1232 advantage of new syscall stub and optimize accordingly.
1234 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
1235 from SYS_futex, to match expectations of
1236 sysdep.h:DO_INLINE_SYSCALL.
1237 (lll_futex_clobbers): Remove.
1238 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
1239 (lll_futex_wake): Likewise.
1240 (lll_futex_requeue): Likewise.
1241 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
1242 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
1244 (__lll_mutex_lock): Likewise.
1245 (__lll_mutex_cond_lock): Likewise.
1246 (__lll_mutex_timed_lock): Likewise.
1247 (__lll_mutex_unlock): Likewise.
1248 (__lll_mutex_unlock_force): Likewise.
1250 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
1251 comes before the include of <sysdep.h>.
1252 (THREAD_SELF_SYSINFO): New macro.
1253 (THREAD_SYSINFO): Likewise.
1254 (INIT_SYSINFO): New macro.
1255 (TLS_INIT_TP): Call INIT_SYSINFO.
1257 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
1259 * sysdeps/pthread/createthread.c (create_thread): Use
1260 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
1261 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
1262 THREAD_SELF_SYSINFO instead of open code.
1263 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
1264 (THREAD_SYSINFO): Likewise.
1266 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
1268 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
1270 2003-12-06 Ulrich Drepper <drepper@redhat.com>
1272 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
1273 instead of .init. Patch by David Mosberger.
1275 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
1277 * sysdeps/pthread/configure.in: Remove broken declaration in C
1278 cleanup handling check.
1280 2003-11-30 Andreas Jaeger <aj@suse.de>
1282 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
1283 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1286 2003-11-27 Jakub Jelinek <jakub@redhat.com>
1288 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
1289 * pthread_attr_destroy.c: Include shlib-compat.h.
1290 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
1291 is set in iattr->flags.
1292 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
1294 2003-11-21 Jakub Jelinek <jakub@redhat.com>
1296 * Makefile (distribute): Add tst-cleanup4aux.c.
1298 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
1301 2003-11-21 Ulrich Drepper <drepper@redhat.com>
1303 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
1304 pthread_cond_signal.
1306 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
1307 store mutex address if the current value is ~0l.
1308 * sysdeps/pthread/pthread_cond_timedwait.c
1309 (__pthread_cond_timedwait): Likewise.
1310 * sysdeps/pthread/pthread_cond_broadcast.c
1311 (__pthread_cond_broadcast): Don't use requeue for pshared
1314 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1315 (__pthread_cond_wait): Don't store mutex address if the current
1317 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1318 (__pthread_cond_timedwait): Likewise.
1319 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1320 (__pthread_cond_broadcast): Don't use requeue for pshared
1323 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
1324 element with ~0l for pshared condvars, with NULL otherwise.
1326 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
1327 (__pthread_cond_wait): Don't store mutex address if the current
1329 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1330 (__pthread_cond_timedwait): Likewise.
1331 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1332 (__pthread_cond_broadcast): Don't use requeue for pshared
1335 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
1336 * tst-cond12.c: New file.
1337 * tst-cond13.c: New file.
1339 2003-11-17 Ulrich Drepper <drepper@redhat.com>
1341 * sysdeps/pthread/configure.in: Make missing forced unwind support
1344 2003-11-11 Ulrich Drepper <drepper@redhat.com>
1346 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
1348 2003-11-06 Ulrich Drepper <drepper@redhat.com>
1350 * Makefile: Add magic to clean up correctly.
1352 2003-11-05 Jakub Jelinek <jakub@redhat.com>
1354 * unwind.c (FRAME_LEFT): Define.
1355 (unwind_stop): Handle old style cleanups here.
1356 (__pthread_unwind): Handle old style cleanups only if
1357 !HAVE_FORCED_UNWIND.
1358 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
1359 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
1360 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
1361 ($(objpfx)tst-cleanupx4): Likewise.
1362 * tst-cleanup4.c: New test.
1363 * tst-cleanup4aux.c: New.
1364 * tst-cleanupx4.c: New test.
1366 2003-11-04 Ulrich Drepper <drepper@redhat.com>
1368 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
1369 lll_mutex_*lock macros to skip atomic operations on some archs.
1371 2003-11-03 Ulrich Drepper <drepper@redhat.com>
1373 * sysdeps/pthread/tst-timer.c (main): Initialize
1374 sigev2.sigev_value as well.
1376 2003-10-15 Roland McGrath <roland@redhat.com>
1378 * sysdeps/pthread/configure.in: Barf if visibility attribute support
1380 * sysdeps/pthread/configure: Regenerated.
1382 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1384 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
1385 locking macros. No distinction between normal and mutex locking
1387 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
1388 Merge bits from lowlevelmutex.S we still need.
1389 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
1390 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
1391 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
1392 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
1393 new mutex implementation.
1394 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
1395 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
1396 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1397 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1398 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1399 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1400 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1401 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1402 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1403 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
1404 symbol for entry point to avoid cancellation.
1406 2003-10-07 Jakub Jelinek <jakub@redhat.com>
1408 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
1410 (SAVE_OLDTYPE_0): Fix a typo.
1412 2003-10-03 Ulrich Drepper <drepper@redhat.com>
1414 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
1415 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
1417 2003-10-02 Ulrich Drepper <drepper@redhat.com>
1419 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
1422 2003-10-02 Jakub Jelinek <jakub@redhat.com>
1424 * Makefile (tests): Add tst-cancel19.
1425 * tst-cancel19.c: New test.
1427 2003-10-02 Ulrich Drepper <drepper@redhat.com>
1429 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
1430 restoring of the old cancellation type.
1432 2003-09-30 Jakub Jelinek <jakub@redhat.com>
1434 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
1436 2003-09-27 Wolfram Gloger <wg@malloc.de>
1438 * sysdeps/pthread/malloc-machine.h: New file
1440 2003-09-24 Roland McGrath <roland@redhat.com>
1442 * allocatestack.c (__make_stacks_executable): Don't ignore return
1443 value from _dl_make_stack_executable.
1445 2003-09-24 Ulrich Drepper <drepper@redhat.com>
1447 * allocatestack.c (__make_stacks_executable): Also change
1448 permission of the currently unused stacks.
1450 * allocatestack.c (change_stack_perm): Split out from
1451 __make_stacks_executable.
1452 (allocate_stack): If the required permission changed between the time
1453 we started preparing the stack and queueing it, change the permission.
1454 (__make_stacks_executable): Call change_stack_perm.
1456 * Makefile: Build tst-execstack-mod locally.
1457 * tst-execstack-mod.c: New file.
1459 2003-09-23 Jakub Jelinek <jakub@redhat.com>
1461 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
1463 2003-09-23 Roland McGrath <roland@redhat.com>
1465 * tst-execstack.c: New file.
1466 * Makefile (tests): Add it.
1467 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
1468 (LDFLAGS-tst-execstack): New variable.
1470 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
1471 whether to use PROT_EXEC for stack mmap.
1472 (__make_stacks_executable): New function.
1473 * pthreadP.h: Declare it.
1474 * init.c (__pthread_initialize_minimal_internal): Set
1475 GL(dl_make_stack_executable_hook) to that.
1477 2003-09-22 Ulrich Drepper <drepper@redhat.com>
1479 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
1480 recommendation from AMD re avoidance of lock prefix.
1482 2003-09-22 Jakub Jelinek <jakub@redhat.com>
1484 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
1485 lll_futex_timed_wait instead of lll_futex_wait.
1486 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
1487 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
1488 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
1489 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
1490 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
1491 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
1492 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
1493 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
1494 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
1495 Completely revamp the locking macros. No distinction between
1496 normal and mutex locking anymore.
1497 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1498 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
1499 __lll_lock_timedwait): Fix prototypes.
1500 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
1501 __lll_lock_timedwait): Likewise.
1502 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
1503 macros, add __builtin_expect.
1504 (lll_mutex_timedlock): Likewise. Fix return value.
1505 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
1506 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
1507 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
1508 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
1509 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
1510 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
1511 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
1512 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
1514 2003-09-22 Ulrich Drepper <drepper@redhat.com>
1516 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1517 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
1518 operation if possible.
1520 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
1521 like jumping over the lock prefix.
1523 2003-09-21 Ulrich Drepper <drepper@redhat.com>
1525 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
1526 locking macros. No distinction between normal and mutex locking
1528 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1529 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1530 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1531 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
1532 locking. Merge bits from lowlevelmutex.S we still need.
1533 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1534 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1535 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
1536 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
1537 * Makefile (routines): Remove libc-lowlevelmutex.
1538 (libpthread-rountines): Remove lowlevelmutex.
1539 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
1540 for new mutex implementation.
1541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1542 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1543 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1544 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1545 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1547 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1549 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1550 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1551 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
1552 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1553 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1554 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1555 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1556 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1558 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1560 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1561 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1562 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1564 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1565 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
1567 2003-09-20 Ulrich Drepper <drepper@redhat.com>
1569 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
1570 in parameters of asm with output parameters.
1572 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
1573 type of DECR parameter to int.
1574 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
1576 2003-09-18 Jakub Jelinek <jakub@redhat.com>
1578 * tst-attr3.c (tf, do_test): Print stack start/end/size and
1579 guardsize for each thread.
1581 2003-09-17 Jakub Jelinek <jakub@redhat.com>
1583 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
1584 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
1585 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
1587 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
1588 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
1590 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
1591 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
1592 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
1593 (pthread_getaffinity_np): Add hidden_def.
1595 * Makefile (tests): Add tst-attr3.
1596 * tst-attr3.c: New test.
1598 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
1600 2003-09-15 Jakub Jelinek <jakub@redhat.com>
1602 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
1603 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
1605 2003-09-17 Jakub Jelinek <jakub@redhat.com>
1607 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
1608 * tst-align.c: Include tst-stack-align.h.
1609 (tf, do_test): Use TEST_STACK_ALIGN macro.
1611 2003-09-17 Ulrich Drepper <drepper@redhat.com>
1613 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
1616 2003-09-16 Ulrich Drepper <drepper@redhat.com>
1618 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
1619 stack-related values for the initial thread.
1621 2003-09-15 Jakub Jelinek <jakub@redhat.com>
1623 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
1625 2003-09-11 Ulrich Drepper <drepper@redhat.com>
1627 * pthread_mutex_lock.c: Minor code rearrangements.
1629 2003-09-05 Roland McGrath <roland@redhat.com>
1631 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
1632 Instead, include ../nptl_db/db_info.c to do its magic.
1633 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
1634 (__pthread_pthread_key_2ndlevel_size): Likewise.
1635 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
1636 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
1637 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
1638 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
1639 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
1640 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
1641 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
1642 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
1643 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
1644 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
1645 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
1646 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
1647 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
1648 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
1649 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
1650 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
1651 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
1653 2003-09-08 Ulrich Drepper <drepper@redhat.com>
1655 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
1656 of pthread_t to be compatible with LT.
1657 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1658 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1659 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1660 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1661 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
1662 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1663 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
1665 2003-09-04 Ulrich Drepper <drepper@redhat.com>
1667 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
1669 2003-09-04 Jakub Jelinek <jakub@redhat.com>
1671 * unwind-forcedunwind.c: Move to...
1672 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
1673 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
1674 * sysdeps/pthread/jmpbuf-unwind.h: New file.
1675 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
1676 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
1677 * unwind.c: Include jmpbuf-unwind.h.
1678 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
1680 2003-09-02 Jakub Jelinek <jakub@redhat.com>
1682 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
1683 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
1684 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
1685 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
1686 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1687 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
1688 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
1689 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
1690 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
1691 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
1692 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
1694 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
1695 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
1696 * Makefile (tests): Add tst-stack2.
1697 * tst-stack2.c: New test.
1698 * tst-stack1.c: Include limits.h and sys/param.h.
1699 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
1701 * pthread_condattr_setpshared.c: Include errno.h.
1702 (pthread_condattr_setpshared): Return EINVAL if pshared
1703 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
1705 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
1706 defined symbol for entry point to avoid cancellation.
1707 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1709 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1711 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
1713 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
1715 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1717 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
1718 __close_nocancel, __read_nocancel, __write_nocancel,
1719 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
1720 libpthread.so or librt.so, define to corresponding function
1721 without _nocancel suffix.
1722 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
1723 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
1724 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
1726 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
1728 2003-09-02 Ulrich Drepper <drepper@redhat.com>
1730 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
1731 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
1733 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
1734 in subsections has a symbol associated with it.
1736 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
1737 defined symbol for entry point to avoid cancellation.
1738 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
1740 2003-09-01 Jakub Jelinek <jakub@redhat.com>
1742 * Makefile (tests): Add tst-tls5.
1743 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
1744 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
1745 ($(objpfx)tst-tls5): New.
1746 ($(objpfx)tst-tls6.out): Likewise.
1747 (tests): Depend on $(objpfx)tst-tls6.out.
1748 * tst-tls3.c: Include stdint.h and pthreaddef.h.
1749 (do_test): Check pthread_self () return value alignment.
1750 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
1751 (tf): Check pthread_self () return value alignment.
1752 * tst-tls5.c: New test.
1754 * tst-tls5mod.c: New.
1755 * tst-tls5moda.c: New.
1756 * tst-tls5modb.c: New.
1757 * tst-tls5modc.c: New.
1758 * tst-tls5modd.c: New.
1759 * tst-tls5mode.c: New.
1760 * tst-tls5modf.c: New.
1761 * tst-tls6.sh: New test.
1763 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
1764 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
1765 * init.c (pthread_functions): Initialize them.
1766 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
1767 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
1768 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
1769 pthread_cond_timedwait@@GLIBC_2.3.2.
1771 2003-09-01 Jakub Jelinek <jakub@redhat.com>
1773 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
1774 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
1775 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
1776 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
1777 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
1778 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
1780 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
1782 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
1783 _POSIX_THREAD_PRIORITY_SCHEDULING.
1784 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
1786 2003-08-31 Ulrich Drepper <drepper@redhat.com>
1788 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
1789 nested function, use static inline function from libio.h.
1790 Code by Richard Henderson.
1792 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
1795 2003-08-30 Jakub Jelinek <jakub@redhat.com>
1797 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
1798 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
1799 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
1800 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
1801 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
1802 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
1803 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1804 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1805 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
1806 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
1807 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
1808 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
1809 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
1810 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
1811 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
1812 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
1813 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
1814 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
1815 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
1816 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
1817 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
1818 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
1819 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
1820 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
1821 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
1822 * sysdeps/sparc/tls.h: New file.
1823 * sysdeps/sparc/tcb-offsets.sym: New file.
1824 * sysdeps/sparc/Makefile: New file.
1825 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
1826 * init.c [__sparc__] (__NR_set_tid_address): Define.
1828 2003-08-29 Jakub Jelinek <jakub@redhat.com>
1830 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
1831 _IO_release_lock): Define.
1833 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
1835 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
1836 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
1838 2003-08-27 Ulrich Drepper <drepper@redhat.com>
1840 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
1841 (__pthread_cleanup_class): Add missing return types of member
1844 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
1846 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1847 (lll_mutex_unlock_force): Add memory barrier between store and futex
1850 2003-08-25 Ulrich Drepper <drepper@redhat.com>
1852 * tst-cancel4.c (do_test): Also unlink tempfname and remove
1853 tempmsg in first loop.
1855 2003-08-18 Ulrich Drepper <drepper@redhat.com>
1857 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1858 _POSIX_THREAD_PRIORITY_SCHEDULING.
1859 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1861 2003-08-07 Jakub Jelinek <jakub@redhat.com>
1863 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
1864 (__rtld_lock_default_lock_recursive,
1865 __rtld_lock_default_unlock_recursive): Define.
1866 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
1867 __rtld_lock_unlock_recursive): Define using
1868 GL(_dl_rtld_*lock_recursive).
1869 * init.c (__pthread_initialize_minimal_internal): Initialize
1870 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
1871 Lock GL(_dl_load_lock) the same number of times as
1872 GL(_dl_load_lock) using non-mt implementation was nested.
1874 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
1875 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
1877 2003-08-06 Jakub Jelinek <jakub@redhat.com>
1879 * tst-cancel17.c (do_test): Make len2 maximum of page size and
1882 2003-08-07 Jakub Jelinek <jakub@redhat.com>
1884 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
1886 2003-08-03 Jakub Jelinek <jakub@redhat.com>
1888 * sysdeps/pthread/createthread.c (do_clone): Move error handling
1889 to first syscall error check. Move syscall error check for tkill
1890 into __ASSUME_CLONE_STOPPED #ifdef.
1892 2003-08-02 Ulrich Drepper <drepper@redhat.com>
1894 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
1895 is not defined, do explicit synchronization.
1896 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
1897 is not defined also unlock pd->lock for non-debugging case in case
1899 * pthread_create.c (start_thread): Always get and release pd->lock
1900 if __ASSUME_CLONE_STOPPED is not defined.
1901 (start_thread_debug): Removed. Adjust users.
1902 * allocatestack.c (allocate_stack): Always initialize lock if
1903 __ASSUME_CLONE_STOPPED is not defined.
1904 * Makefile (tests): Add tst-sched1.
1905 * tst-sched1.c: New file.
1907 * sysdeps/pthread/createthread.c (do_clone): Only use
1908 sched_setschduler and pass correct parameters.
1910 2003-07-31 Jakub Jelinek <jakub@redhat.com>
1912 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
1913 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
1914 PTHREAD_STACK_MIN in comments.
1916 2003-07-31 Jakub Jelinek <jakub@redhat.com>
1918 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
1919 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
1921 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
1922 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
1923 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
1924 (__pthread_cleanup_upto): Fix prototype.
1925 (_longjmp_unwind): Adjust caller.
1926 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
1927 Change second argument to const struct pointer.
1928 * tst-sem8.c (main): Remove unused s2 and s3 variables.
1929 * tst-sem9.c (main): Likewise.
1930 * unwind.c: Include string.h for strlen prototype.
1932 2003-07-31 Ulrich Drepper <drepper@redhat.com>
1934 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1935 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
1936 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
1938 Patch by Nicholas Miell <nmiell@attbi.com>.
1940 2003-07-30 Jakub Jelinek <jakub@redhat.com>
1942 * init.c (__pthread_initialize_minimal_internal): Initialize
1943 GL(dl_init_static_tls).
1944 * pthreadP.h (__pthread_init_static_tls): New prototype.
1945 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
1947 * Makefile (tests): Add tst-tls4.
1948 (modules-names): Add tst-tls4moda and tst-tls4modb.
1949 ($(objpfx)tst-tls4): Link against libdl and libpthread.
1950 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
1952 * tst-tls4.c: New file.
1953 * tst-tls4moda.c: New file.
1954 * tst-tls4modb.c: New file.
1956 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
1958 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
1959 before __timer_dealloc.
1960 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
1961 Don't call list_unlink.
1963 2003-07-29 Roland McGrath <roland@redhat.com>
1965 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
1967 2003-07-25 Jakub Jelinek <jakub@redhat.com>
1969 * tst-cancel17.c (do_test): Check if aio_cancel failed.
1970 Don't reuse struct aiocb A if it failed.
1971 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
1972 not just one byte, as that does not block.
1974 2003-07-22 Jakub Jelinek <jakub@redhat.com>
1976 * sysdeps/pthread/unwind-resume.c: New file.
1977 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
1978 unwind-resume in csu subdir.
1979 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
1981 (librt-sysdep_routines, librt-shared-only-routines): Add
1983 * sysdeps/pthread/rt-unwind-resume.c: New file.
1984 * unwind-forcedunwind.c: New file.
1985 * Makefile (libpthread-routines): Add unwind-forcedunwind.
1986 (libpthread-shared-only-routines): Likewise.
1987 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
1988 * pthreadP.h (pthread_cancel_init): New prototype.
1989 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
1991 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
1992 attr argument const struct pthread_attr *.
1994 * res.c (__res_state): Return __resp.
1995 * descr.h: Include resolv.h.
1996 (struct pthread): Add res field.
1997 * pthread_create.c: Include resolv.h.
1998 (start_thread): Initialize __resp.
1999 * Makefile (tests): Add tst-_res1.
2000 (module-names): Add tst-_res1mod1, tst-_res1mod2.
2001 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
2002 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
2004 * tst-_res1.c: New file.
2005 * tst-_res1mod1.c: New file.
2006 * tst-_res1mod2.c: New file.
2008 2003-07-21 Ulrich Drepper <drepper@redhat.com>
2010 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
2012 * Makefile: Define various *-no-z-defs variables for test DSOs
2013 which has undefined symbols.
2015 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
2017 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2018 Retry if the stwcx fails to store once_control.
2020 2003-07-20 Ulrich Drepper <drepper@redhat.com>
2022 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
2023 pthread_attr_setaffinity.
2024 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
2025 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
2026 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
2027 * pthread_attr_destroy.c: Free cpuset element if allocated.
2028 * pthread_create.c: Pass iattr as additional parameter to
2030 * sysdeps/pthread/createthread.c: If attribute is provided and
2031 a new thread is created with affinity set or scheduling parameters,
2032 start thread with CLONE_STOPPED.
2033 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
2034 pthread_attr_setaffinity.
2035 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
2038 2003-07-15 Ulrich Drepper <drepper@redhat.com>
2040 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
2042 2003-07-14 Ulrich Drepper <drepper@redhat.com>
2044 * sysdeps/pthread/configure.in: Require CFI directives also for
2047 2003-07-15 Jakub Jelinek <jakub@redhat.com>
2049 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
2052 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2054 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
2056 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
2057 registers as variables. Call __pthread_mutex_unlock_usercnt.
2058 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2059 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
2060 not self pointer in __writer. Compare with TID to determine
2062 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2063 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2065 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2067 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
2068 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
2069 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
2070 macros also when compiling librt.
2072 2003-07-11 Jakub Jelinek <jakub@redhat.com>
2074 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
2075 -fasynchronous-unwind-tables.
2076 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2077 (PSEUDO): Add cfi directives.
2078 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
2080 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
2083 2003-07-08 Jakub Jelinek <jakub@redhat.com>
2085 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
2086 __pthread_unregister_cancel): Add prototypes and hidden_proto.
2087 * unwind.c (__pthread_unwind_next): Add hidden_def.
2088 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
2090 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2091 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2092 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2094 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2095 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2097 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
2098 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
2099 __pthread_unregister_cancel and __pthread_unwind_next.
2101 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2103 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
2104 different symbol for the cancellation syscall wrapper and
2105 non-cancellation syscall wrapper.
2106 (PSEUDO_END): Define.
2108 2003-07-05 Richard Henderson <rth@redhat.com>
2110 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
2111 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
2112 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
2113 return actual return value from the syscall, not 0.
2115 2003-07-07 Ulrich Drepper <drepper@redhat.com>
2117 * descr.h (struct pthread): Add pid field.
2118 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
2119 (__reclaim_stacks): Likewise.
2120 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
2121 also check for PID of the signal source.
2122 (__pthread_initialize_minimal_internal): Also initialize pid field
2123 of initial thread's descriptor.
2124 * pthread_cancel.c: Use tgkill instead of tkill if possible.
2125 * sysdeps/unix/sysv/linux/fork.c: Likewise.
2126 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
2127 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
2128 * sysdeps/unix/sysv/linux/raise.c: Likewise.
2130 2003-07-05 Ulrich Drepper <drepper@redhat.com>
2132 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
2133 Fix use of parameter.
2134 (__libc_cleanup_pop): Likewise.
2136 2003-07-04 Ulrich Drepper <drepper@redhat.com>
2138 * init.c (sigcancel_handler): Change parameters to match handler
2139 for SA_SIGACTION. Check signal number and code to recognize
2140 invalid invocations.
2142 2003-07-03 Roland McGrath <roland@redhat.com>
2144 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
2145 Apply sizeof (struct pthread) bias to r13 value.
2147 2003-07-03 Ulrich Drepper <drepper@redhat.com>
2149 * sysdeps/pthread/configure.in: Require CFI directives.
2151 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
2153 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
2154 libpthread compilation.
2155 * unwind.c (__pthread_unwind): Add hidden_def.
2156 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
2158 2003-07-01 Ulrich Drepper <drepper@redhat.com>
2160 * libc-cancellation.c (__libc_cleanup_routine): Define.
2161 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
2162 (__pthread_cleanup_pop): Define.
2164 2003-07-01 Richard Henderson <rth@redhat.com>
2166 * sysdeps/alpha/elf/pt-initfini.c: New file.
2167 * sysdeps/alpha/pthread_spin_lock.S: New file.
2168 * sysdeps/alpha/pthread_spin_trylock.S: New file.
2169 * sysdeps/alpha/pthreaddef.h: New file.
2170 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
2171 * sysdeps/alpha/tls.h: New file.
2172 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
2173 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
2174 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
2175 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
2176 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
2177 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
2178 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
2179 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
2180 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
2181 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
2183 2003-07-01 Ulrich Drepper <drepper@redhat.com>
2185 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
2186 cleanup support and unwind info.
2188 2003-06-30 Ulrich Drepper <drepper@redhat.com>
2190 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
2191 Use correct cleanup handler registration. Add unwind info.
2192 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
2193 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
2194 * tst-once3.c: Add cleanup handler and check it is called.
2195 * tst-once4.c: Likewise.
2196 * tst-oncex3.c: New file.
2197 * tst-oncex4.c: New file.
2198 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
2200 2003-06-29 Ulrich Drepper <drepper@redhat.com>
2202 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
2204 2003-06-27 Ulrich Drepper <drepper@redhat.com>
2206 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
2207 (tf_msgsnd): Likewise.
2209 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
2210 premature returns a bit more.
2212 2003-06-26 Ulrich Drepper <drepper@redhat.com>
2214 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
2215 definition to the front.
2217 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
2218 the cleanup functions to make the names unique. Fix dwarf opcode
2220 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
2221 functions to make the names unique. Fix CFA offset for two blocks.
2223 2003-06-25 Ulrich Drepper <drepper@redhat.com>
2225 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
2226 missing closing braces.
2227 Patch by Christophe Saout <christophe@saout.de>.
2229 2003-06-24 Roland McGrath <roland@redhat.com>
2231 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
2233 2003-06-24 Ulrich Drepper <drepper@redhat.com>
2235 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
2236 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
2238 * pthreadP.h: Declare __find_thread_by_id.
2239 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
2240 * pthread_clock_gettime.c: Allow using other thread's clock.
2241 * pthread_clock_settime.c: Likewise.
2242 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
2243 * Makefile: Add rules to build and run tst-clock2.
2244 * tst-clock2.c: New file.
2246 2003-06-23 Ulrich Drepper <drepper@redhat.com>
2248 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
2249 to use exception-based cleanup handler.
2250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2252 * tst-cond8.c (ch): Announce that we are done.
2254 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
2256 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
2257 Also test aio_suspend with timeout value.
2259 2003-06-22 Ulrich Drepper <drepper@redhat.com>
2261 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
2262 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
2265 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
2266 (__pthread_mutex_lock_internal): Likewise.
2267 (__pthread_mutex_unlock_internal): Likewise.
2268 (__pthread_mutex_unlock_usercnt): Declare.
2269 * pthread_mutex_destroy.c: Always fail if used in any way.
2270 * pthread_mutex_init.c: Update comment.
2271 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
2272 * pthread_mutex_timedlock.c: Adjust __nusers.
2273 * pthread_mutex_trylock.c: Adjust __nusers.
2274 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
2275 and public interfaces are wrapper with pass additional parameter.
2276 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
2278 * tst-mutex8.c: New file.
2279 * Makefile (tests): Add tst-mutex8.
2280 * sysdeps/pthread/pthread_cond_timedwait.c: Call
2281 __pthread_mutex_unlock_usercnt.
2282 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2283 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2284 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2285 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2286 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2287 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
2288 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2290 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2291 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2292 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2293 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2294 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2296 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
2297 * pthread_mutex_timedlock.c: Likewise.
2298 * pthread_mutex_trylock.c: Adjust __nusers.
2299 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
2300 * tst-mutex9.c: New file.
2301 * Makefile (tests): Add tst-mutex9.
2302 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
2303 * sysdeps/ia64/tls.h: Likewise.
2304 * sysdeps/powerpc/tls.h: Likewise.
2305 * sysdeps/s390/tls.h: Likewise.
2306 * sysdeps/sh/tls.h: Likewise.
2307 * sysdeps/x86_64/tls.h: Likewise.
2308 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2309 Change type of __owner.
2310 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2311 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2312 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2313 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2314 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2316 2003-06-19 Jakub Jelinek <jakub@redhat.com>
2318 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
2319 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
2321 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
2322 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
2323 instead of nr to lll_futex_wake. Only set errno and return -1
2326 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
2327 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
2328 return actual return value from the syscall, not 0.
2330 2003-06-18 Ulrich Drepper <drepper@redhat.com>
2332 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
2333 find a random value.
2334 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
2337 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
2338 compat_timer_settime.
2339 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
2340 compat_timer_gettime.
2341 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
2342 compat_timer_getoverrun.
2343 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
2344 compat_timer_delete.
2346 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
2347 error-checking mutex detect busy mutexes.
2349 2003-06-17 Ulrich Drepper <drepper@redhat.com>
2351 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
2352 Add ax to clobber list.
2353 (lll_mutex_cond_lock): Likewise.
2354 (lll_mutex_unlock): Likewise.
2355 (lll_lock): Likewise.
2356 (lll_unlock): Likewise.
2358 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
2359 * tst-cancel18.c: New file.
2360 * tst-cancelx18.c: New file.
2362 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
2365 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
2366 * tst-cancel17.c: New file.
2367 * tst-cancelx17.c: New file.
2369 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
2370 * sysdeps/unix/sysv/linux/sigwait.c: New file.
2371 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
2373 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
2375 2003-06-16 Jakub Jelinek <jakub@redhat.com>
2377 * sysdeps/pthread/createthread.c (create_thread): Set
2378 header.multiple_threads unconditionally.
2379 * allocatestack.c (allocate_stack): Likewise.
2380 * descr.h (struct pthread): Add header.multiple_threads
2382 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
2383 Define for librt. #error if neither libpthread, libc nor librt.
2384 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
2386 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
2387 CDISABLE): Likewise.
2388 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
2389 CDISABLE): Likewise.
2390 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
2391 CDISABLE): Likewise.
2392 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
2393 CDISABLE): Likewise. Access header.multiple_threads outside of
2394 libc and libpthread.
2395 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
2397 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
2398 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
2400 2003-06-17 Ulrich Drepper <drepper@redhat.com>
2402 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
2403 Also test early cancellation before the thread reaches the cancellation
2406 * Makefile: Compile forward.c with exceptions.
2408 * sysdeps/unix/sysv/linux/sleep.c: New file.
2410 2003-06-16 Ulrich Drepper <drepper@redhat.com>
2412 * Makefile: Add CFLAGS definition to compile function wrappers
2413 duplicated from libc with exceptions.
2414 * tst-cancel4.c: Also check cancellation handlers.
2416 * Makefile: Add rules to build and run tst-cancel16 and
2417 tst-cancelx16. Add missing CFLAGS definitions.
2418 * tst-cancel16.c: New file.
2419 * tst-cancelx16.c: New file.
2421 2003-06-15 Ulrich Drepper <drepper@redhat.com>
2423 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2424 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
2425 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
2426 (DL_SYSINFO_IMPLEMENTATION): Likewise.
2428 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
2429 (LIBC_CANCEL_RESET): Likewise.
2430 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
2431 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
2433 (CFLAGS-libcrt-cancellation.c): Define.
2434 * sysdeps/pthread/librt-cancellation.c: New file.
2435 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
2436 macros also when compiling librt.
2437 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2438 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2439 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2440 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2441 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2442 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2443 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2445 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
2446 compat_timer_create.
2448 2003-06-14 Ulrich Drepper <drepper@redhat.com>
2450 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
2452 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
2454 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2455 Add libc_hidden_def.
2457 2003-06-13 Roland McGrath <roland@redhat.com>
2459 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
2460 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
2462 2003-06-11 Ulrich Drepper <drepper@redhat.com>
2464 * allocatestack.c (queue_stack): Always inline.
2465 * ptreadhP.h (__do_cancel): Likewise.
2467 2003-06-10 Jakub Jelinek <jakub@redhat.com>
2469 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
2472 2003-06-10 Ulrich Drepper <drepper@redhat.com>
2474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2475 (__pthread_cond_signal): Remove incorrect second addition for
2478 2003-06-09 Ulrich Drepper <drepper@redhat.com>
2480 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2481 (__pthread_cond_signal): Use correct futex pointer in
2482 __lll_mutex_lock_wait call.
2484 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2485 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
2487 2003-06-08 Ulrich Drepper <drepper@redhat.com>
2489 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
2491 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
2494 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
2495 hand-written CFI generation code. Since ENTRY/END also initiated
2496 CFI frames this caused two CFI sets to be generated.
2498 2003-06-07 Ulrich Drepper <drepper@redhat.com>
2500 * cleanup_routine.c: New file.
2501 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
2502 * sysdeps/pthread/pthread.h: Add support for fully exception-based
2504 * Makefile (libpthread-routines): Add cleanup_routine.
2505 Add more CFLAGS variables to compile with exceptions. Add comments
2506 why which file needs unwind tables.
2507 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
2509 * tst-cancelx1.c: New file.
2510 * tst-cancelx2.c: New file.
2511 * tst-cancelx3.c: New file.
2512 * tst-cancelx4.c: New file.
2513 * tst-cancelx5.c: New file.
2514 * tst-cancelx6.c: New file.
2515 * tst-cancelx7.c: New file.
2516 * tst-cancelx8.c: New file.
2517 * tst-cancelx9.c: New file.
2518 * tst-cancelx10.c: New file.
2519 * tst-cancelx11.c: New file.
2520 * tst-cancelx12.c: New file.
2521 * tst-cancelx13.c: New file.
2522 * tst-cancelx14.c: New file.
2523 * tst-cancelx15.c: New file.
2524 * tst-cleanupx0.c: New file.
2525 * tst-cleanupx0.expect: New file.
2526 * tst-cleanupx1.c: New file.
2527 * tst-cleanupx2.c: New file.
2528 * tst-cleanupx3.c: New file.
2530 * tst-cleanup0.c: Make standard compliant.
2531 * tst-cleanup1.c: Likewise.
2533 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
2534 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2535 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2536 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2537 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2538 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2539 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
2541 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2542 * tst-cancel12.c: New file.
2543 * tst-cancel13.c: New file.
2544 * tst-cancel14.c: New file.
2545 * tst-cancel15.c: New file.
2546 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
2549 * tst-cancel1.c: Add some comments.
2551 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
2554 2003-06-06 Ulrich Drepper <drepper@redhat.com>
2556 * Makefile (CFLAGS-pthread_cancel.c): Define.
2558 2003-06-05 Ulrich Drepper <drepper@redhat.com>
2560 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
2561 Change type of __writer element to int.
2562 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2563 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2564 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2565 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2566 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2567 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
2568 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2569 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
2570 Compare with TID to determine deadlocks.
2571 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
2572 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2573 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
2574 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
2575 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2576 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2578 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2580 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2581 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2582 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2584 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2586 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2587 * Makefile (tests): Add tst-rwlock12.
2588 * tst-rwlock12.c: New file.
2590 2003-06-05 Jakub Jelinek <jakub@redhat.com>
2592 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
2593 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
2594 Remove bogus hidden_proto.
2595 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
2597 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
2598 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
2599 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
2600 ___lll_mutex_timedlock): Likewise.
2602 2003-06-04 Ulrich Drepper <drepper@redhat.com>
2604 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2605 (__pthread_cond_signal): Add some code to eventually handle
2608 2003-06-01 Ulrich Drepper <drepper@redhat.com>
2610 * Makefile (tests): Add tst-exec4.
2611 (tst-exec4-ARGS): Define.
2612 * tst-exec4.c: New file.
2614 2003-05-31 Ulrich Drepper <drepper@redhat.com>
2616 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2617 Also fail if tv_nsec < 0.
2618 (__lll_timedwait_tid): Likewise.
2619 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2620 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
2622 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
2624 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
2626 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
2628 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
2630 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
2633 * Makefile (tests): Add tst-sem8 and tst-sem9.
2634 * tst-sem8.c: New file.
2635 * tst-sem9.c: New file.
2636 * sem_open.c: Fix creation of in_use record if the file exists but
2639 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
2642 * sysdeps/pthread/timer_create.c (timer_create): In case
2643 evp==NULL, assign timer ID to sival_ptr.
2645 * descr.h (struct pthread_unwind_buf): Change type of prev element to
2646 struct pthread_unwind_buf *.
2647 (struct pthread): Likewise for cleanup_jmp_buf element.
2649 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
2650 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
2651 * unwind.c (__pthread_unwind_next): Likewise.
2653 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2655 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2656 (lll_futex_timed_wait): Use int for futex value parameter.
2657 (lll_futex_wake): Likewise.
2658 (lll_futex_requeue): Likewise.
2660 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
2661 Replace one memory operation with one register operation.
2663 * tst-join4.c (do_test): Fix error message.
2665 * tst-rwlock6.c (do_test): Use correct format specifier.
2667 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2668 (__lll_mutex_lock_wait): Replace one memory operation with one
2670 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
2671 (__lll_mutex_lock_wait): Likewise.
2673 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2674 (__lll_mutex_cond_lock): Add one to value parameter of
2675 __lll_lock_wait to reflect reality in the futex syscall.
2676 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2677 (lll_mutex_cond_lock): Likewise.
2679 2003-05-30 Jakub Jelinek <jakub@redhat.com>
2681 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
2683 (lll_mutex_cond_lock): Define.
2685 2003-05-29 Ulrich Drepper <drepper@redhat.com>
2687 * Makefile (tests): Add tst-signal6.
2688 * tst-signal6.c: New file.
2690 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
2691 (__lll_mutex_unlock_force): New function
2692 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2694 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2695 (__lll_mutex_unlock_force): New function.
2696 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
2698 * tst-rwlock7.c (do_test): Use correct format specifier.
2700 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
2701 Find break parameter in correct asm argument.
2703 2003-05-27 Jakub Jelinek <jakub@redhat.com>
2705 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
2707 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
2709 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2711 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
2712 lll_futex_requeue, lll_mutex_unlock_force): Define.
2714 2003-05-30 Jakub Jelinek <jakub@redhat.com>
2716 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2717 (pthread_cond_t): Add __mutex.
2718 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
2719 lll_futex_requeue, lll_mutex_unlock_force): Define.
2721 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2723 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
2724 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2726 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
2728 (lll_futex_wait, lll_futex_wake): Define.
2729 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
2730 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
2731 FUTEX_REQUEUE instead of FUTEX_WAIT.
2732 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
2733 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
2734 mutex which was used in condvar structure. Call
2735 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
2736 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2738 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
2739 include tcb-offsets.h. Read wakeup value in locked region.
2740 Use the value of gbr register as THREAD_ID.
2741 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2742 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2743 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2745 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
2748 2003-05-28 Ulrich Drepper <drepper@redhat.com>
2750 * sysdeps/pthread/pthread_cond_broadcast.c
2751 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
2753 2003-05-26 Ulrich Drepper <drepper@redhat.com>
2755 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
2756 typo in register name.
2757 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
2758 correctly. Actually use requeue. Little optimization.
2759 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
2760 mutex address early. Handle cancellation state as 32-bit value.
2761 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2762 Remove unnecessary label.
2764 2003-05-25 Ulrich Drepper <drepper@redhat.com>
2766 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
2767 instead of FUTEX_WAIT.
2768 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
2769 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2770 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2771 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
2772 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2773 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
2774 used in condvar structure. Call __pthread_mutex_cond_lock instead
2775 of __pthread_mutex_lock_internal.
2776 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2777 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2778 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2779 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
2780 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2781 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2782 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
2783 Add pthread_mutex_cond_lock.
2784 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
2785 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
2786 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
2787 lll_mutex_cond_lock.
2788 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2789 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2790 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2792 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2793 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2795 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
2796 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2798 * pthreadP.h: Declare __pthread_mutex_cond_lock.
2799 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
2800 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
2801 macro don't define aliases.
2803 * cancellation.c: Remove __pthread_enable_asynccancel_2.
2804 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
2805 * sysdeps/pthread/pthread_cond_timedwait.c: Use
2806 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
2807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2808 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2809 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2811 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2813 2003-05-17 Ulrich Drepper <drepper@redhat.com>
2815 * sem_open.c: Fix one endless loop. Implement correct semantics
2816 wrt opening the same semaphore more then once.
2817 * sem_close.c: Adjust for sem_open change.
2818 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
2819 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
2820 * Makefile (tests): Add tst-sem7.
2821 * tst-sem7.c: New file.
2823 2003-05-16 Roland McGrath <roland@redhat.com>
2825 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
2826 uninitialized variable braino.
2828 2003-05-16 Ulrich Drepper <drepper@redhat.com>
2830 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
2831 test for syscall availability.
2833 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
2834 __no_posix_timers to -1 if the syscalls don't exist.
2836 * pthread_join.c (pthread_join): Set tid field of the joined
2837 thread to -1. This isn't necessary but helps to recognize some
2838 error conditions with almost no cost.
2840 * allocatestack.c (FREE_P): Also negative values indicate an
2843 * unwind.c: Include <unistd.h>.
2845 2003-05-14 Ulrich Drepper <drepper@redhat.com>
2847 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
2849 2003-05-14 Jakub Jelinek <jakub@redhat.com>
2851 * Makefile (crti-objs, crtn-objs): New variables.
2852 (omit-deps, extra-objs): Add crtn.
2853 ($(objpfx)libpthread.so): Depend on both crti and crtn
2854 and links to them in multidir.
2855 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
2857 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
2859 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2860 (lll_mutex_unlock): Use atomic_exchange_rel.
2862 2003-05-11 Ulrich Drepper <drepper@redhat.com>
2864 * cond-perf.c (cons): Add missing locking around setting of alldone.
2866 2003-05-10 Ulrich Drepper <drepper@redhat.com>
2868 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
2870 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2872 2003-05-09 Ulrich Drepper <drepper@redhat.com>
2874 * tst-sem6.c: New file.
2875 * Makefile (tests): Add tst-sem6.
2877 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
2878 Use atomic_exchange_rel instead of atomic_exchange.
2879 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
2882 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
2883 code for lll_futex_wait and lll_futex_wake in static apps. Use
2884 vsyscall is possible.
2886 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
2887 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
2888 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
2889 pthread_setaffinity_np.
2890 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
2891 and pthread_setaffinity_np.
2892 * Makefile (libpthread-routines): Add pthread_getaffinity and
2893 pthread_setaffinity.
2895 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
2896 use it in case mmap to allocate the stack fails.
2897 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
2898 ARCH_MAP_FLAGS here.
2899 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
2902 2003-05-08 Ulrich Drepper <drepper@redhat.com>
2904 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
2905 handler implementation. It is now lockless in fork().
2906 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2907 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2908 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
2909 declare the __fork_*_lists.
2910 (struct fork_handler): Include pointers to all three functions.
2911 Add next, refcntr and need_signal elements.
2912 (__fork_handlers): New declaration.
2913 (__register_atfork_malloc): Remove declaration.
2914 (HAVE_register_atfork_malloc): Remove definition.
2915 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
2916 __pthread_child_handler variable.
2917 (__libc_pthread_init): Use __register_atfork instead of explicitly
2919 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
2921 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2923 * unwind.c (unwind_cleanup): Print error message and then abort. This
2924 function must never be reached.
2926 * cond-perf.c: New file.
2928 2003-05-05 Ulrich Drepper <drepper@redhat.com>
2930 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
2932 2003-05-04 Roland McGrath <roland@redhat.com>
2934 * Makefile ($(objpfx)../libc.so): New target.
2936 2003-05-02 Ulrich Drepper <drepper@redhat.com>
2938 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2939 (pthread_condattr_t): Size is only an int, don't use long for
2941 (pthread_mutexattr_t): Likewise.
2942 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2943 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2944 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2946 2003-05-01 Ulrich Drepper <drepper@redhat.com>
2948 * sysdeps/i386/tls.h: Define THREAD_ID.
2949 * sysdeps/ia64/tls.h: Likewise.
2950 * sysdeps/powerpc/tls.h: Likewise.
2951 * sysdeps/s390/tls.h: Likewise.
2952 * sysdeps/sh/tls.h: Likewise.
2953 * sysdeps/x86_64/tls.h: Likewise.
2954 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
2956 * pthread_mutex_timedlock.c: Likewise.
2957 * pthread_mutex_trylock.c: Likewise.
2958 * pthread_mutex_unlock.c: Likewise.
2959 * pthread_rwlock_trywrlock.c: Likewise.
2960 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
2961 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
2962 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2963 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
2965 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
2968 2003-04-29 Jakub Jelinek <jakub@redhat.com>
2970 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2971 (__SIZEOF_PTHREAD_COND_T): Define to 48.
2972 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
2973 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2974 Make __align long long instead of long.
2975 (pthread_rwlock_t): Formatting.
2976 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2977 (pthread_rwlock_t): Formatting.
2978 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2979 (pthread_cond_t): Make __align long long instead of long.
2980 (pthread_rwlock_t): Move __flags field to the same position as in
2983 2003-04-30 Ulrich Drepper <drepper@redhat.com>
2985 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
2986 * tst-rwlock7.c (do_test): Likewise.
2988 2003-04-26 Roland McGrath <roland@redhat.com>
2990 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
2992 2003-04-22 Jakub Jelinek <jakub@redhat.com>
2994 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
2995 sizeof (struct pthread).
2996 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
2998 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
3000 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
3002 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
3004 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
3006 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
3008 (NO_TLS_OFFSET): Define.
3009 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
3010 add TLS_TCB_SIZE unnecessarily.
3012 2003-04-22 Roland McGrath <roland@redhat.com>
3014 * Makeconfig (shared-thread-library): Reverse link order to work
3017 2003-04-22 Ulrich Drepper <drepper@redhat.com>
3019 * semaphore.h: Fix typo in comment.
3021 2003-04-21 Ulrich Drepper <drepper@redhat.com>
3023 * sysdeps/pthread/sigfillset.c: New file.
3025 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
3026 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
3027 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
3028 * sysdeps/pthread/sigaction.c: Likewise.
3029 * sysdeps/pthread/sigprocmask.c: New file.
3030 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
3032 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3033 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
3036 2003-04-19 Ulrich Drepper <drepper@redhat.com>
3038 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
3039 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
3041 * sysdeps/unix/sysv/linux/unregister-atfork.c
3042 (__unregister_atfork): Don't free memory not allocated dynamically.
3044 * semaphore.h: Remove __THROW marker from cancellation points.
3045 * nptl/sysdeps/pthread/pthread.h: Likewise.
3047 2003-04-18 Ulrich Drepper <drepper@redhat.com>
3049 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
3050 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
3053 2003-04-16 Jakub Jelinek <jakub@redhat.com>
3055 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
3057 2003-04-15 Roland McGrath <roland@redhat.com>
3059 * forward.c (__pthread_unwind): Tweak to avoid warning.
3061 2003-04-15 Ulrich Drepper <drepper@redhat.com>
3063 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
3065 2003-04-14 Ulrich Drepper <drepper@redhat.com>
3067 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
3068 overflow CFA advance instructions.
3069 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3071 2003-04-14 Jakub Jelinek <jakub@redhat.com>
3073 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
3074 * sysdeps/i386/pthread_spin_lock.c: Likewise.
3075 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
3078 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
3079 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
3080 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
3081 DW_CFA_advance_loc for .Laddl-.Lsubl.
3083 2003-04-13 Ulrich Drepper <drepper@redhat.com>
3085 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
3086 position-independent unwind data for static libraries.
3087 Add missing unwind info. Add comments.
3089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
3090 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3091 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3092 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3094 2003-04-12 Ulrich Drepper <drepper@redhat.com>
3096 * Makefile: Make sure all cancellation points are compiled with
3097 exception and asynchronous unwind tables.
3099 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
3100 which mishandles loading of global object addresses in PIC.
3101 (THREAD_SETMEM_NC): Likewise.
3103 2003-04-11 Ulrich Drepper <drepper@redhat.com>
3105 * pthread.h: Define new data structure for cleanup buffer. Declare
3106 new cleanup handler interfaces.
3107 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
3108 (struct pthread): Add cleanup_jmp_buf pointer. Define
3109 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
3110 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
3111 it. Declare old cleanup handler installation functions.
3112 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
3114 * cleanup_defer.c: Likewise.
3115 * cleanup_compat.c: New file. Old cleanup code.
3116 * cleanup_def_compat.c: New file. Old cleanup code.
3117 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
3118 if own thread descriptor.
3119 * unwind.c: New file.
3120 * forward.c: Add __pthread_unwind.
3121 * init.c (pthread_functions): Add __pthread_unwind.
3122 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
3123 Add ptr___pthread_unwind.
3124 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
3125 and unwind function.
3126 * Makefile (libpthread-routines): Add cleanup_compat,
3127 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
3128 table generation if necessary.
3129 * version.c: Record whether unwind support is compiled in.
3130 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
3131 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
3133 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
3134 complication to generate unwind information for syscall wrappers.
3135 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3136 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3137 __cleanup_fct_attribute.
3139 * Makefile: Add rules to build and run tst-cleanup0.
3140 * tst-cleanup0.c: New file.
3141 * tst-cleanup0.expect: New file.
3143 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
3144 caller. Optimize to avoid often unecessary local variable.
3146 2003-04-11 Roland McGrath <roland@redhat.com>
3148 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
3149 sets variable `multidir'; include that.
3150 (generated): Add it.
3151 ($(objpfx)$(multidir)/crti.o): New target.
3152 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
3154 2003-04-11 Ulrich Drepper <drepper@redhat.com>
3156 * tst-attr2.c (do_test): Add cast to avoid warning.
3157 * tst-mutex4.c (do_test): Likewise.
3159 2003-04-10 Ulrich Drepper <drepper@redhat.com>
3161 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
3164 2003-04-09 Ulrich Drepper <drepper@redhat.com>
3166 * Makefile (tests): Add tst-detach1.
3167 * tst-detach1.c: New file.
3169 2003-04-08 Ulrich Drepper <drepper@redhat.com>
3171 * sysdeps/pthread/pthread.h: Remove duplicate
3172 pthread_cleanup_{push,pop} definitions.
3174 * tst-barrier2.c: Eliminate warnings.
3175 * tst-cancel4.c: Likewise.
3176 * tst-cond4.c: Likewise.
3177 * tst-cond6.c: Likewise.
3178 * tst-detach1.c: Likewise.
3179 * tst-rwlock4.c: Likewise.
3180 * tst-rwlock6.c: Likewise.
3181 * tst-rwlock7.c: Likewise.
3182 * tst-sem3.c: Likewise.
3183 * tst-spin2.c: Likewise.
3184 * tst-umask1.c: Likewise.
3186 2003-04-07 Ulrich Drepper <drepper@redhat.com>
3188 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
3190 2003-04-06 Ulrich Drepper <drepper@redhat.com>
3192 * descr.h (struct pthread): Move cancelhandling member to the front.
3194 2003-04-05 Ulrich Drepper <drepper@redhat.com>
3196 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
3197 malloc_parent, and malloc_child statically.
3198 (__register_atfork_malloc): New function.
3199 (free_mem): Don't free any of the malloc_* variables on the list.
3200 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
3201 Define HAVE_register_atfork_malloc.
3203 2003-04-04 Ulrich Drepper <drepper@redhat.com>
3205 * sysdeps/pthread/createthread.c (create_thread): Add some more
3206 comments explaining when to set multiple_threads and when not.
3208 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3209 THREAD_ATOMIC_BIT_SET if not already defined.
3210 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
3211 THREAD_ATOMIC_BIT_SET:
3212 * sysdeps/x86_64/tls.h: Likewise.
3213 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
3214 THREAD_ATOMIC_CMPXCHG_VAL.
3215 (_pthread_cleanup_pop_restore): Likewise.
3216 * cancellation.c (__pthread_enable_asynccancel): Likewise.
3217 (__pthread_enable_asynccancel_2): Likewise.
3218 (__pthread_disable_asynccancel): Likewise.
3219 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3220 (__libc_disable_asynccancel): Likewise.
3221 * init.c (sigcancel_handler): Likewise.
3222 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
3223 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
3225 2003-04-03 Ulrich Drepper <drepper@redhat.com>
3227 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
3228 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
3229 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
3230 * Makefile (tests): Add tst-cancel11.
3231 * tst-cancel11.c: New file.
3233 2003-04-01 Ulrich Drepper <drepper@redhat.com>
3235 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
3236 round, not the first. Use specific_used flag instead of local
3237 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
3238 (__free_tcb): Don't call deallocate_tsd here.
3239 (start_thread): Call deallocate_tsd here.
3240 * pthread_setspecific.c: Set specific_used flag really only when
3242 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
3243 * tst-tsd3.c: New file.
3244 * tst-tsd4.c: New file.
3246 2003-03-31 Ulrich Drepper <drepper@redhat.com>
3248 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
3249 Use atomic_exchange_and_add instead of __lll_add.
3250 (__lll_mutex_timedlock): Likewise.
3251 Patch by Ian Wienand.
3253 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
3255 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3256 (SINGLE_THREAD_P): Fix typo.
3257 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
3259 2003-03-31 Ulrich Drepper <drepper@redhat.com>
3261 * Makefile (tests): Add tst-align.
3262 * tst-align.c: New file.
3263 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
3265 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
3268 * tst-tsd2.c: Add casts to avoid warnings.
3270 2003-03-30 Ulrich Drepper <drepper@redhat.com>
3272 * descr.h (struct pthread): Move most often used elements to the front.
3274 2003-03-29 Ulrich Drepper <drepper@redhat.com>
3276 * Makefile (libpthread-routines): Add pthread_atfork.
3277 (libpthread-static-only-routines): Add pthread_atfork.
3279 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3281 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
3283 (INSTALL_DTV): Add parens.
3284 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
3285 Use passed descr instead of THREAD_SELF.
3286 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
3287 (__lll_mutex_timedlock_wait): Correct expected value after
3289 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
3290 Release lock before waking up the waiters.
3291 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
3292 criteria. Reorderstruct passed to cleanup handler. Fix
3293 handling of cancellation and failung pthread_mutex_unlock call.
3294 Use __pthread_enable_asynccancel_2 instead of
3295 __pthread_enable_asynccancel.
3296 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3297 Return result of lock re-get if it fails.
3298 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
3299 for __pthread_cleanup_push.
3300 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
3301 completely broken rwlock implementation.
3302 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3303 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3304 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3305 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3306 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3307 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
3308 versioned_symbol macro.
3309 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
3310 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
3312 2003-03-27 Ulrich Drepper <drepper@redhat.com>
3314 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
3315 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
3317 (struct timer): Remove th and bar field.
3318 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
3319 debugging code. Create only one helper thread.
3320 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
3322 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3323 Renamed. Define statically. Use thread info from siginfo.
3324 (__helper_once): New variable.
3325 (__helper_tid): New variable.
3326 (__reset_helper_control): New function.
3327 (__start_helper_thread): New function.
3329 * pthread_create.c (start_thread): Don't use setjmp inside
3330 __builtin_expect to work around gcc bug.
3332 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
3333 timer_delete syscall fails, but not with ENOSYS, set
3336 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
3337 (timer_settime): Fix typo.
3338 * sysdeps/unix/sysv/linux/timer_getoverr.c
3339 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
3341 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
3344 offset of cleanupbuf.__prev.
3346 2003-03-26 Jakub Jelinek <jakub@redhat.com>
3348 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
3351 2003-03-26 Ulrich Drepper <drepper@redhat.com>
3353 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
3354 NULL provide default definition to syscall.
3356 2003-03-25 Roland McGrath <roland@redhat.com>
3358 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
3359 (timer_id2ptr): Fix typo.
3361 2003-03-25 Ulrich Drepper <drepper@redhat.com>
3363 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
3364 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
3365 * sysdeps/ia64/pthreaddef.h: Likewise.
3366 * sysdeps/powerpc/pthreaddef.h: Likewise.
3367 * sysdeps/s390/pthreaddef.h: Likewise.
3368 * sysdeps/sh/pthreaddef.h: Likewise.
3369 * sysdeps/x86_64/pthreaddef.h: Likewise.
3370 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
3371 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
3373 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3374 SIGTIMER is not unblocked.
3375 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
3377 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
3379 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
3380 pass pointer through as ID.
3381 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
3382 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
3383 * sysdeps/unix/sysv/linux/timer_create.c: New file.
3384 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
3385 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
3386 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
3387 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
3388 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
3389 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
3390 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
3391 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
3392 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
3393 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
3394 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
3395 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
3396 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
3397 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
3398 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
3399 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
3400 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
3401 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
3402 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
3403 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
3404 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
3405 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
3406 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
3407 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
3408 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
3409 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
3410 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
3411 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
3412 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
3413 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
3415 * pthreadP.h: Remove FRAME_LEFT definition.
3416 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
3417 already left frame. Programs which have this problem are not POSIX
3419 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
3421 2003-03-24 Ulrich Drepper <drepper@redhat.com>
3423 * sysdeps/pthread/tst-timer.c: Check return values of the
3426 2003-03-23 Roland McGrath <roland@redhat.com>
3428 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
3429 * tst-tls3mod.c: Likewise.
3430 * tst-tls1.c: Likewise.
3431 * tst-tls2.c: Likewise.
3433 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
3436 * tst-join5.c (tf1, tf2): Add a cast.
3438 * Makeconfig (includes): Append -I$(..)nptl to this variable.
3440 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
3441 Don't test anything.
3442 * tst-cond4.c: Likewise.
3443 * tst-cond6.c: Likewise.
3444 * tst-flock2.c: Likewise.
3445 * tst-mutex4.c: Likewise.
3446 * tst-rwlock4.c: Likewise.
3447 * tst-signal1.c: Likewise.
3448 * tst-spin2.c: Likewise.
3449 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
3451 * tst-mutex4.c: Use test-skeleton.c.
3452 * tst-spin2.c: Likewise.
3453 * tst-sysconf.c: Likewise.
3454 * tst-barrier2.c: Likewise.
3455 * tst-cond4.c: Likewise.
3456 * tst-cond6.c: Likewise.
3457 * tst-rwlock4.c: Likewise.
3458 * tst-unload.c: Likewise.
3459 * tst-flock2.c (do_test): Use return instead of exit.
3461 2003-03-22 Jakub Jelinek <jakub@redhat.com>
3463 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
3465 2003-03-21 Ulrich Drepper <drepper@redhat.com>
3467 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
3468 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
3469 instead of __lll_compare_and_swap.
3470 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3472 Removed definition if __lll_compare_and_swap.
3474 * cancellation.c: Adjust for new form of compare&exchange macros.
3475 * cleanup_defer.c: Likewise.
3477 * libc-cancellation.c: Likewise.
3478 * old_pthread_cond_broadcast.c: Likewise.
3479 * old_pthread_cond_signal.c: Likewise.
3480 * old_pthread_cond_timedwait.c: Likewise.
3481 * old_pthread_cond_wait.c: Likewise.
3482 * pthread_cancel.c: Likewise.
3483 * pthread_create.c: Likewise.
3484 * pthread_detach.c: Likewise.
3485 * pthread_join.c: Likewise.
3486 * pthread_key_delete.c: Likewise.
3487 * pthread_setcancelstate.c: Likewise.
3488 * pthread_setcanceltype.c: Likewise.
3489 * pthread_timedjoin.c: Likewise.
3490 * pthread_tryjoin.c: Likewise.
3491 * sysdeps/pthread/createthread.c: Likewise.
3493 2003-03-20 Ulrich Drepper <drepper@redhat.com>
3495 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
3496 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
3497 definitions. Replace uses with calls to atomic_* functions.
3498 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3499 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
3500 __lll_test_and_set calls with atomic_exchange_and_add and
3501 atomic_exchange calls respectively.
3502 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3503 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3504 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
3505 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3506 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
3507 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
3508 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
3510 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
3511 returns the old value.
3513 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
3515 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
3516 int for variable OLDVAL and correct inline assembler contraint.
3517 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
3518 type int for variable OLD.
3520 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
3522 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3523 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
3524 instead of multiple_threads field in the TCB.
3526 2003-03-19 Ulrich Drepper <drepper@redhat.com>
3528 * sysdeps/i386/i686/bits/atomic.h: Removed.
3529 * sysdeps/i386/i586/bits/atomic.h: Removed.
3530 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
3531 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
3532 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
3533 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
3534 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
3535 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
3536 * atomic.h: Removed. Moved to glibc.
3538 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
3539 support for clock selection.
3541 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
3544 2003-03-18 Roland McGrath <roland@redhat.com>
3546 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3547 Add __lll_rel_instr first. Add memory clobber.
3548 (lll_mutex_unlock): Use __lll_test_and_set.
3549 From Paul Mackerras <paulus@samba.org>.
3551 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
3553 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3554 (SINGLE_THREAD_P): Add `header.' prefix.
3555 From Paul Mackerras <paulus@samba.org>.
3557 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
3558 pthread_timedjoin_np to ...
3559 (libpthread: GLIBC_2.3.3): ... here.
3560 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
3562 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3563 Avoid shadowing VAL variable.
3565 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
3568 2003-03-18 Ulrich Drepper <drepper@redhat.com>
3570 * Makefile (tests): Add tst-cond11.
3571 * tst-cond11.c: New file.
3573 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
3574 struct passed to cleanup handler to eliminate one more
3576 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3578 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3579 (pthrad_cond_t): Replace __unused field with __clock.
3581 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
3582 waken all waiters in cleanup handler.
3583 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3584 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3586 * pthread_condattr_getclock.c: New file.
3587 * pthread_condattr_setclock.c: New file.
3588 * sysdeps/pthread/pthread.h: Declare these new functions.
3589 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
3590 * Makefile (libpthread-routines): Add the new functions.
3591 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
3592 Renamed field to value. Document use of the bits.
3593 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
3595 * pthread_condattr_setpshared.c: Likewise.
3596 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
3597 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
3598 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3600 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3601 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3602 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3603 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3604 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3605 Implement clock selection.
3606 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3607 * pthread-errnos.sym: Add ENOSYS.
3608 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3609 _POSIX_CLOCK_SELECTION.
3610 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3612 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
3613 invalid .size directive.
3615 2003-03-17 Roland McGrath <roland@redhat.com>
3617 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
3620 2003-03-17 Ulrich Drepper <drepper@redhat.com>
3622 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
3623 Use __lll_add instead of spelling it out. Use protected symbol names.
3624 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
3626 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
3627 Renamed from lll_compare_and_swap. Use new name where necessary.
3628 (__lll_add): Defined.
3629 (__lll_dec_if_positive): Defined.
3630 (__lll_test_and_set): Defined.
3631 * sysdeps/ia64/pthread_spin_init.c: Removed.
3632 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
3633 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
3634 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
3635 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
3636 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
3637 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
3638 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
3639 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
3640 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
3641 __sync_lock_release_si.
3642 Patch by Jakub Jelinek.
3644 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
3645 Fix timeout handling.
3646 (__lll_timedwait_tid): Likewise.
3647 (lll_unlock_wake_cb): Wake up other waiters if necessary.
3648 Patch by Jakub Jelinek.
3650 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
3652 2003-03-17 Roland McGrath <roland@redhat.com>
3654 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
3655 * sysdeps/pthread/pthread_spin_init.c: New file.
3656 * sysdeps/pthread/pthread_spin_unlock.c: New file.
3657 * sysdeps/powerpc/Makefile: New file.
3658 * sysdeps/powerpc/pthread_spin_lock.c: New file.
3659 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
3660 * sysdeps/powerpc/pthreaddef.h: New file.
3661 * sysdeps/powerpc/tcb-offsets.sym: New file.
3662 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
3663 * sysdeps/powerpc/tls.h: New file.
3664 * sysdeps/powerpc/bits/atomic.h: New file.
3665 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
3666 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
3667 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
3669 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
3670 * sysdeps/unix/sysv/linux/sem_post.c: New file.
3671 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
3672 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
3673 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
3674 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
3675 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
3676 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
3677 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
3678 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
3679 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
3680 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
3681 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
3682 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
3683 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
3685 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
3687 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
3688 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
3689 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
3690 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
3691 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
3693 2003-03-17 Ulrich Drepper <drepper@redhat.com>
3695 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
3696 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
3697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3699 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
3701 2003-03-16 Roland McGrath <roland@redhat.com>
3703 * tst-fork4.c: Include <string.h>.
3704 * tst-signal2.c: Likewise.
3705 * tst-mutex5.c (do_test): exit -> return.
3706 * tst-mutex2.c: Include <stdlib.h>.
3708 2003-03-16 Ulrich Drepper <drepper@redhat.com>
3710 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3711 (__lll_mutex_timedlock_wait): Correct expected value after
3712 spurious wakeup. Otherwise we would never wait again.
3714 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
3715 zone versus inline asm stupidity. Use correct instructions.
3717 * tst-rwlock6.c: Add some more status output.
3719 2003-03-15 Roland McGrath <roland@redhat.com>
3721 * sysdeps/pthread/configure.in: New file.
3722 * sysdeps/pthread/configure: New file (generated).
3724 2003-03-15 Ulrich Drepper <drepper@redhat.com>
3726 * allocatestack.c (allocate_stack): Store the exact stack size of
3727 user allocated stacks.
3729 2003-03-15 Jakub Jelinek <jakub@redhat.com>
3731 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3732 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
3733 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
3734 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
3735 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3736 Use `header.' prefix.
3737 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
3739 2003-03-15 Ulrich Drepper <drepper@redhat.com>
3741 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
3742 __builtin_frame_address, use stack pointer.
3744 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
3745 instead of __builtin_frame_pointer.
3747 2003-03-14 Ulrich Drepper <drepper@redhat.com>
3749 * tst-basic1.c (do_test): Add cast to avoid warning.
3750 * tst-basic2.c (do_test): Likewise.
3752 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
3753 amount of stack correction.
3755 * tst-fork4.c: Use test-skeleton.c.
3757 2003-03-14 Roland McGrath <roland@redhat.com>
3759 * init.c: Fix typo "#eli" for "#else".
3761 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
3763 * allocatestack.c (__stack_user): Use hidden_data_def.
3764 * pthread_create.c (__pthread_keys): Likewise.
3766 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
3768 2003-03-14 Roland McGrath <roland@redhat.com>
3770 * tst-fork4.c: New file.
3771 * Makefile (tests): Add it.
3773 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
3774 we always define the padding space.
3775 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
3776 stopped supporting its own extensions fully.
3777 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
3778 struct also called `header', so `header.multiple_threads' is the field
3779 name to use on all machines.
3780 * allocatestack.c (allocate_stack): Use `header.' prefix.
3781 * sysdeps/pthread/createthread.c (create_thread): Likewise.
3782 * pthread_create.c (__pthread_create_2_1): Likewise.
3783 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
3784 (THREAD_SELF): Likewise.
3785 * sysdeps/x86_64/tls.h: Likewise.
3786 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
3787 (SINGLE_THREAD_P): Likewise.
3788 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
3789 (SINGLE_THREAD_P): Likewise.
3790 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3791 (SINGLE_THREAD_P): Likewise.
3793 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
3796 2003-03-14 Ulrich Drepper <drepper@redhat.com>
3798 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
3799 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
3801 * pthread_create.c (start_thread): setjmp is expected to return 0.
3803 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
3804 (THREAD_GETMEM_NC): Likewise.
3806 2003-03-13 Ulrich Drepper <drepper@redhat.com>
3808 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
3809 and the size of the stack which must be allocated is a multiple,
3810 allocate one more page.
3811 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
3812 MULTI_PAGE_ALIASING.
3814 2003-03-13 Roland McGrath <roland@redhat.com>
3816 * pthread_create.c (start_thread): Set EXITING_BIT after the
3817 event-reporting (and destructors), not before.
3819 2003-03-13 Jakub Jelinek <jakub@redhat.com>
3821 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
3822 lll_futex_wake): Declare register variables as long int instead of
3823 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
3824 Make syscall arguments clobbered by the syscall.
3825 (lll_futex_wait): Define using lll_futex_timed_wait.
3827 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
3830 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
3833 * allocatestack.c (nptl_ncreated): Only declare if
3834 COLORING_INCREMENT != 0.
3836 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
3837 (__libc_enable_asynccancel_2): Remove prototype.
3839 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
3840 ctid to match kernel.
3842 2003-03-12 Ulrich Drepper <drepper@redhat.com>
3844 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
3845 libc_multiple_threads.
3846 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
3847 __libc_multiple_threads to...
3848 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
3850 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
3852 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3853 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3855 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
3856 (__pthread_once_internal): Define.
3858 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
3859 macros instead of .symver directly.
3860 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3861 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3863 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
3864 * sysdeps/x86_64/tcb-offsets.sym: New file.
3865 * sysdeps/x86_64/Makefile: New file.
3867 * sysdeps/i386/tcb-offsets.sym: Add SELF.
3868 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
3869 to access own pthread_t in TCB.
3870 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3872 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3874 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3876 2003-03-12 Roland McGrath <roland@redhat.com>
3878 * pthread-errnos.sym: New file.
3879 * Makefile (gen-as-const-headers): New variable, list that file.
3880 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
3881 header <pthread-errnos.h> instead of defining errno values here.
3882 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3883 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3884 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3885 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3886 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3888 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3890 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3891 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3892 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
3893 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3894 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3895 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3896 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3897 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3898 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3899 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
3900 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3901 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
3902 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
3903 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
3904 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
3905 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3906 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3907 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3908 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3909 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3910 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3911 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3912 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
3913 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
3914 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
3915 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3916 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3918 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
3919 CLONE_CHILD_SETTID worked.
3921 2003-03-12 Ulrich Drepper <drepper@redhat.com>
3923 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
3925 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
3928 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
3929 (pthread_cond_t): Add padding.
3931 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
3932 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
3933 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
3935 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3936 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
3937 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3938 (__pthread_rwlock_timedrdlock): Likewise.
3939 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
3940 (__pthread_rwlock_wrlock): Likewise.
3941 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
3942 (__pthread_rwlock_rdlock): Likewise.
3944 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
3946 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
3947 result of lock re-get if it fails.
3949 2003-03-11 Ulrich Drepper <drepper@redhat.com>
3951 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
3952 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3953 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
3954 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3955 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3956 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3957 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3958 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3959 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
3960 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3962 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
3963 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
3965 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
3966 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
3967 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
3968 (create_thread): Likewise.
3969 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
3970 * init.c (__pthread_initialize_minimal_internal): Initialize
3971 __libc_multiple_threads_ptr if necessary.
3972 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
3973 __pthread_multiple_threads and __libc_multiple_threads_ptr.
3974 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
3975 __libc_multiple_threads.
3976 (__libc_pthread_init): Return pointer to __libc_pthread_init if
3979 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
3980 (THREAD_SETMEM_NC): Likewise.
3982 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
3983 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
3984 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
3985 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
3987 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
3988 Eliminate one entire instruction.
3990 * cancellation.c (__pthread_enable_asynccancel_2): New function.
3991 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
3992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3993 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
3994 instead of __pthread_enable_asynccancel.
3995 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3996 (__pthread_cond_wait): Likewise.
3997 * sysdeps/pthread/pthread_cond_timedwait.c
3998 (__pthread_cond_timedwait): Likewise.
3999 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4002 (__condvar_cleanup): Wake up all waiters in case we got signaled
4003 after being woken up but before disabling asynchronous
4005 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
4006 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4007 (__condvar_cleanup): Likewise.
4009 * init.c (__NR_set_tid_address): If already defined, don't redefine.
4010 Make it an error if architecture has no #if case. Add x86-64.
4012 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
4013 pt-initfini.s generation.
4015 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
4016 (TLS_INIT_TP): Fix typo.
4018 2003-03-11 Jakub Jelinek <jakub@redhat.com>
4020 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
4021 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
4023 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
4024 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
4025 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
4026 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
4027 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
4028 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4029 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
4030 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
4032 2003-03-11 Ulrich Drepper <drepper@redhat.com>
4034 * sysdeps/pthread/pthread_cond_timedwait.c
4035 (__pthread_cond_timedwait): Return the result of the final
4036 locking. If it succeeds, the regular function return value.
4038 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
4039 Return result of the final locking.
4040 * version.c (__nptl_main): Work around problems with the strange
4041 INTERNAL_SYSCALL macro on ppc32.
4042 * init.c (__pthread_initialize_minimal_internal): Unblock
4043 SIGCANCEL in case the parent blocked it.
4044 Reported by Paul Mackerras <paulus@samba.org>.
4046 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
4047 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
4048 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
4050 2003-03-11 Jakub Jelinek <jakub@redhat.com>
4052 * sysdeps/pthread/pthread_cond_timedwait.c
4053 (__pthread_cond_timedwait): Unlock and fail if
4054 __pthread_mutex_unlock_internal failed.
4056 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
4057 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
4059 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
4060 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
4061 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
4062 ALLOCATE_STACK): New macros.
4063 (TLS_TPADJ): New macro.
4064 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
4065 (allocate_stack): Handle TLS_DTV_AT_TP and
4066 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
4067 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
4069 * init.c [__ia64__] (__NR_set_tid_address): Define.
4071 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
4072 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
4073 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
4074 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
4075 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
4076 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
4077 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
4078 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
4079 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
4080 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
4081 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
4082 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
4083 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
4084 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
4085 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
4086 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
4087 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
4088 * sysdeps/ia64/bits/atomic.h: New file.
4089 * sysdeps/ia64/Makefile: New file.
4090 * sysdeps/ia64/pthread_spin_init.c: New file.
4091 * sysdeps/ia64/pthread_spin_lock.c: New file.
4092 * sysdeps/ia64/pthread_spin_trylock.c: New file.
4093 * sysdeps/ia64/pthread_spin_unlock.c: New file.
4094 * sysdeps/ia64/pthreaddef.h: New file.
4095 * sysdeps/ia64/tcb-offsets.sym: New file.
4096 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
4097 * sysdeps/ia64/tls.h: New file.
4099 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
4100 to syscall instead of no arguments.
4102 2003-03-10 Ulrich Drepper <drepper@redhat.com>
4104 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
4105 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
4106 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
4107 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
4109 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
4112 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
4114 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4115 lowlevelbarrier.sym.
4116 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
4117 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
4118 Include lowlevelbarrier.h and don't define offsets locally.
4119 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
4121 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4122 (__lll_mutex_lock_wait): Reverse order of first two parameters.
4123 (__lll_mutex_timedlock_wait): Likewise.
4124 (lll_mutex_lock): Adjust asm for that.
4125 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
4126 (lll_lock): Adjust asm for operand order change.
4127 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
4128 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
4130 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
4131 Reverse order of parameters.
4132 (__lll_timedwait_tid): Remove regparms attribute.
4133 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
4134 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
4136 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4137 (__lll_timedwait_tid): Remove one unnecessary instruction.
4139 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
4140 __lll_mutex_timedlock_wait only for NOT_IN_libc.
4141 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
4144 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
4145 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
4147 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
4150 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
4151 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
4153 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
4154 define LOCK here (if UP is not defined). The actual code is in
4157 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
4158 LOCK is already defined. Don't define lll_unlock_wake_cb and
4159 __lll_timedwait_tid for libc.so.
4160 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
4161 define LOCK here (if UP is not defined). The actual code is in
4164 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
4165 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
4166 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
4167 instead of lowlevelsem.h.
4168 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
4169 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
4170 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
4172 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4174 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
4175 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
4176 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
4178 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
4180 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
4183 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
4185 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
4186 of __libc_locking_needed.
4187 (lll_trylock): Initialize %eax to zero.
4189 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
4190 pthread_cond_t definition.
4192 2003-03-10 Roland McGrath <roland@redhat.com>
4194 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
4195 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
4196 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
4197 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
4198 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
4200 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
4201 Instead of setting PD->multiple_threads, set globals
4202 __pthread_multiple_threads and __libc_multiple_threads.
4203 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4204 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
4205 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
4207 * descr.h (struct pthread): Conditionalize first member on
4208 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
4209 containing an anonymous tcbhead_t. Move `list' member out.
4210 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
4211 * allocatestack.c: Remove use of `header.data.' prefix.
4212 * pthread_create.c: Likewise.
4213 * init.c (__pthread_initialize_minimal_internal): Likewise.
4214 * sysdeps/pthread/createthread.c (create_thread): Likewise.
4215 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
4216 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
4217 * sysdeps/x86_64/tls.h: Likewise.
4218 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
4219 (SINGLE_THREAD_P): Likewise.
4220 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
4221 (SINGLE_THREAD_P): Likewise.
4222 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
4223 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
4225 2003-03-09 Ulrich Drepper <drepper@redhat.com>
4227 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
4229 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
4230 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
4232 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
4233 leftovers from the ia32 code.
4235 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
4237 (clear_once_control): Don't load %esi.
4239 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
4242 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
4244 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
4245 * sysdeps/unix/sysv/linux/createthread.c: ...here.
4247 * Makefile (tests): Add tst-cond10.
4248 * tst-cond10.c: New file.
4250 2003-03-08 Ulrich Drepper <drepper@redhat.com>
4252 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
4253 * tst-signal3.c (do_test): Likewise.
4254 * tst-sem5.c (do_test): Likewise.
4255 * tst-kill6.c (do_test): Likewise.
4256 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
4258 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
4260 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
4261 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
4262 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4263 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4264 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4265 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4266 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4271 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4273 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4275 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4276 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
4277 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4279 * allocatestack.c (allocate_stack): If mprotect() fails free the
4282 2003-03-07 Ulrich Drepper <drepper@redhat.com>
4284 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
4286 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
4287 lll_wake_tid. This was used only to work around kernel limits in
4289 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4290 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
4291 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4292 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4294 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
4295 (__pthread_initialize_minimal_internal): Change initialization of
4296 __static_tls_align_m1 appropriately.
4297 * pthreadP.h (__static_tls_align_m1): Renamed from
4299 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
4300 instead of __static_tls_align-1.
4302 2003-03-04 Ulrich Drepper <drepper@redhat.com>
4304 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
4306 * pthread_create.c: Define __pthread_keys using nocommon
4307 attribute, not by placing it explicitly in bss.
4308 Remove DEFINE_DEALLOC definition. Not needed anymore.
4310 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
4311 Use it in mmap call to allocate stacks.
4313 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
4315 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
4316 result of the thread function.
4318 2003-03-03 Ulrich Drepper <drepper@redhat.com>
4320 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
4321 version is just fine.
4323 * sysdeps/unix/sysv/linux/libc_pthread_init.c
4324 (__pthread_child_handler): Renamed from pthread_child_handler,
4325 exported, and marked hidden. Change all users.
4326 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
4327 free __pthread_child_handler from child list.
4329 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
4331 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
4333 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4334 Fix handling of cancellation and failing pthread_mutex_unlock call.
4335 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
4336 (__pthread_cond_wait): Likewise.
4338 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4339 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
4340 lll_futex_timed_wait call.
4341 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4342 (pthread_rwlock_timedwrlock): Likewise.
4344 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
4345 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
4346 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
4348 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
4349 check of lll_futex_wake return value.
4351 2003-03-03 Roland McGrath <roland@redhat.com>
4353 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
4355 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4356 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
4357 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4359 2003-03-02 Ulrich Drepper <drepper@redhat.com>
4361 * sysdeps/pthread/timer_create.c (timer_create): Return correct
4362 error for CPU clocks.
4364 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4365 _POSIX_MONOTONIC_CLOCK.
4366 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4368 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
4371 2003-03-01 Ulrich Drepper <drepper@redhat.com>
4373 * descr.h (struct pthread): Move cleanup field to the front.
4375 2003-03-01 Roland McGrath <roland@redhat.com>
4377 * sem_open.c (sem_open): Braino fix.
4379 2003-03-01 Ulrich Drepper <drepper@redhat.com>
4381 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
4382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
4383 __pthread_cleanup_pop functionality.
4384 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4386 * descr.h (struct pthread): Move tid field to the front now that
4389 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
4390 (__lll_mutex_timedlock_wait): Remove.
4391 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
4392 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
4393 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
4394 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4395 (lll_unlock_wake_cb): Don't save and restore %esi.
4396 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
4398 (__lll_timedwait_tid): Add alignment.
4399 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
4400 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
4402 (__lll_timedwait_tid): Removed.
4403 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
4404 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
4405 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4406 (pthread_barrier_wait): Don't save, load, and restore %esi for
4408 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4409 (__pthread_cond_signal): Don't save, load, and restore %esi.
4410 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
4411 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
4412 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4413 Don't save, load, and restore %esi.
4415 2003-02-27 Ulrich Drepper <drepper@redhat.com>
4417 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
4418 Release lock before waking up the waiters.
4420 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
4422 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
4423 (reader_thread): Likewise.
4425 * sysdeps/pthread/pthread_rwlock_unlock.c
4426 (__pthread_rwlock_unlock): Release internal lock early. Don't try
4427 to wake up readers if there are none.
4429 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
4430 Release internal lock before wake threads.
4432 2003-02-26 Ulrich Drepper <drepper@redhat.com>
4434 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
4435 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
4437 * tst-rwlock9.c: Likewise.
4438 * tst-rwlock10.c: New file.
4439 * tst-rwlock11.c: New file.
4441 * Makefile (tests): Add tst-dlsym1.
4442 * tst-dlsym1.c: New file.
4444 * init.c (__pthread_initialize_minimal_internal): Set
4445 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
4446 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
4448 2003-02-24 Ulrich Drepper <drepper@redhat.com>
4450 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
4452 * tst-cond2.c: Fix sychronization with child.
4454 * tst-rwlock8.c (reader_thread): Remove unused variable.
4456 * Makefile: Add rules to build and run tst-tls3.
4457 * tst-tls3.c: New file.
4458 * tst-tls3mod.c: New file.
4460 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
4461 * tst-rwlock8.c: New file.
4462 * tst-rwlock9.c: New file.
4463 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
4464 complete broken rwlock implementation.
4465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4467 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4469 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4471 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
4472 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
4473 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4474 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
4475 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
4477 2003-02-23 Roland McGrath <roland@redhat.com>
4479 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
4481 2003-02-23 Ulrich Drepper <drepper@redhat.com>
4483 * Makefile (tests): Add tst-context1.
4484 * tst-context1.c: New file.
4486 * Makefile (tests): Add tst-tls1 and tst-tls2.
4487 * tst-tls1.c: New file.
4488 * tst-tls2.c: New file.
4490 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
4493 * pthread_create.c (start_thread): Set EXITING_BIT early.
4495 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
4496 (THREAD_GETMEM_NC): Likewise.
4498 2003-02-22 Ulrich Drepper <drepper@redhat.com>
4500 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
4501 off 3 more bytes by using offset-less instructions when possible.
4503 * Makefile: Add dependency for $(objpfx)version.d.
4505 * eintr.c (eintr_source): Add unnecessary return but the compiler
4508 * tst-kill3.c: Include <unistd.h>.
4510 2003-02-21 Roland McGrath <roland@redhat.com>
4512 * pthread_create.c (start_thread): Call __libc_thread_freeres.
4514 2003-02-21 Ulrich Drepper <drepper@redhat.com>
4516 * Makefile (tests): Add tst-eintr1.
4517 (distribute): Add eintr.c.
4518 * tst-eintr1.c: New file.
4519 * eintr.c: New file.
4521 * pthread_cancel.c (pthread_cancel): Use tkill directly.
4523 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
4524 Disallow sending SIGCANCEL.
4526 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
4527 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
4528 * tst-kill1.c: New file.
4529 * tst-kill2.c: New file.
4530 * tst-kill3.c: New file.
4531 * tst-kill5.c: New file.
4532 * tst-kill6.c: New file.
4533 * tst-basic7.c: Renamed to...
4534 * tst-kill4.c: ...this.
4536 2003-02-21 Roland McGrath <roland@redhat.com>
4538 * Makefile (install-lib-ldscripts): New variable.
4540 2003-02-21 Ulrich Drepper <drepper@redhat.com>
4542 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
4543 * pthread_cancel.c: Use INVALID_TD_P.
4544 * pthread_detach.c: Likewise.
4545 * pthread_getschedparam.c: Likewise.
4546 * pthread_setschedparam.c: Likewise.
4547 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
4548 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4549 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
4550 * pthread_timedjoin.c: Likewise.
4552 * tst-basic7.c: Include <signal.h>.
4554 * pthread_join.c (pthread_join): Limited checking for invalid
4556 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
4558 2003-02-20 Ulrich Drepper <drepper@redhat.com>
4560 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
4561 beginning of the loop. Clear the entire first block of TSD.
4562 * Makefile (tests): Add tst-key4.
4563 * tst-key4.c: New file.
4565 2003-02-18 Ulrich Drepper <drepper@redhat.com>
4567 * Makefile (tests): Add tst-basic7.
4568 * tst-basic7.c: New file.
4570 * pthread_create.c (deallocate_tsd): Mark as internal_function.
4571 Add some more __builtin_expect.
4573 * pthreadP.h: Define dummy version of DEBUGGING_P.
4575 2003-02-17 Ulrich Drepper <drepper@redhat.com>
4577 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
4578 _POSIX_THREAD_PRIORITY_SCHEDULING.
4579 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
4580 _XOPEN_REALTIME_THREADS.
4581 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4583 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
4584 kernel returns EINVAL for PID <= 0, work around it.
4586 * Makefile (tests): Add tst-signal5.
4587 * tst-signal5.c: New file.
4589 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
4592 * tst-cancel1.c (tf): Block all signals.
4594 * Makefile (tests): Add tst-basic6.
4595 * tst-basic6.c: New file.
4597 * tst-basic1.c: Add test for process ID.
4599 * Makefile (tests): Add tst-cancel10.
4600 * tst-cancel10.c: New file.
4602 * Makefile (tests): Add tst-signal4.
4603 * tst-signal4.c: New file.
4605 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
4606 __sigismember instead of sigismember. Add __builtin_expect.
4608 2003-02-16 Ulrich Drepper <drepper@redhat.com>
4610 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
4611 pthread_setcancelstate, and pthread_rwlock_setpshared.
4613 * tst-cancel7.c (do_test): Make sure the pid file exists before
4614 canceling the thread.
4616 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
4617 pthread_rwlock_timedrdlock tests.
4618 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
4619 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4620 Check for invalid tv_nsec field.
4621 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4624 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
4625 recursive mutex of overflow.
4627 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
4629 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
4630 going into an endless loop.
4631 * Makefile (tests): Add tst-cancel9.
4632 * tst-cancel9.c: New file.
4634 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
4636 2003-02-15 Ulrich Drepper <drepper@redhat.com>
4638 * tst-mutex5.c (do_test): Add more timedlock tests.
4640 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
4641 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
4643 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4644 use INLINE_SYSCALL. Error number is returned, not -1.
4646 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
4647 and __deallocate_stack with internal_function.
4648 * pthread_create.c: Adjust definitions appropriately.
4649 * allocatestack.c: Likewise.
4651 * pthread_join.c: Add one more __builtin_expect.
4652 * pthread_timedjoin.c: Likewise.
4654 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
4655 not data of sequence number does not match.
4656 Add one __builtin_expect.
4658 * Makefile (tests): Add tst-clock1.
4659 * tst-clock1.c: New file.
4661 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
4663 * Makefile (tests): Add tst-basic5.
4664 * tst-basic5.c: New file.
4666 2003-02-14 Ulrich Drepper <drepper@redhat.com>
4668 * Makefile (tests): Add tst-basic4.
4669 * tst-basic4.c: New file.
4671 * pthreadP.h: Add declaraction for __nptl_nthreads.
4672 * pthread_create.c: Define __nptl_nthreads
4673 (start_thread): Increment __nptl_nthreads at beginning. Decrement
4674 after thread is done. If then zero, call exit(0).
4675 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4676 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
4677 * init.c (pthread_functions): Initialize ptr_nthreads.
4678 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
4679 (__reclaim_stacks): Decrement __nptl_nthreads.
4680 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
4682 * Makefile (tests): Add tst-basic3.
4683 * tst-basic3.c: New file.
4685 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
4686 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
4687 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
4688 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
4689 if asynchronous canceling is enabled.
4690 * pthread_join.c (pthread_join): When recognizing circular joins,
4691 take into account the other thread might be already canceled.
4692 * Makefile (tests): Add tst-join5.
4693 * tst-join5.c: New file.
4695 * Makefile (tests): Add tst-join4.
4696 * tst-join4.c: New file.
4698 2003-02-13 Ulrich Drepper <drepper@redhat.com>
4700 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
4702 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
4704 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
4705 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
4706 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
4708 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
4710 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
4711 error if lll_futex_wake failed.
4713 2003-02-13 Ulrich Drepper <drepper@redhat.com>
4715 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
4716 handling of cancellation and failung pthread_mutex_unlock call.
4717 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4718 * Makefile (tests): Add tst-cond8 and tst-cond9.
4719 * tst-cond8.c: New file.
4720 * tst-cond9.c: New file.
4722 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
4724 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
4725 non-standard initializers with __USE_GNU.
4727 * Makefile (tests): Add tst-cleanup3.
4728 * tst-cleanup3.c: New file.
4730 2003-02-12 Ulrich Drepper <drepper@redhat.com>
4732 * Makefile (tests): Add tst-attr1 and tst-attr2.
4733 * tst-attr1.c: New file.
4734 * tst-attr2.c: New file.
4736 * Makefile: Add rules to build and run tst-atfork2 test.
4737 * tst-atfork2.c: New file.
4738 * tst-atfork2mod.c: New file.
4740 * sysdeps/unix/sysv/linux/unregister-atfork.c
4741 (__unregister_atfork): Free the memory allocated for the handlers
4742 after removing them from the lists.
4744 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
4747 * tst-atfork1.c (do_test): Wait for the child we forked.
4748 Report error in child.
4750 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
4752 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
4754 2003-02-10 Ulrich Drepper <drepper@redhat.com>
4756 * Makefile (tests): Add tst-cancel8.
4757 * tst-cancel8.c: New file.
4759 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
4760 clearing of control variable.
4761 * Makefile (tests): Add tst-once3 and tst-once4.
4762 * tst-once3.c: New file.
4763 * tst-once4.c: New file.
4765 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
4767 * sysdeps/sh/Makefile: New file.
4768 * sysdeps/sh/bits/atomic.h: New file.
4769 * sysdeps/sh/pthread_spin_init.c: New file.
4770 * sysdeps/sh/pthread_spin_lock.c: New file.
4771 * sysdeps/sh/pthread_spin_trylock.S: New file.
4772 * sysdeps/sh/pthread_spin_unlock.S: New file.
4773 * sysdeps/sh/pthreaddef.h: New file.
4774 * sysdeps/sh/tcb-offsets.sym: New file.
4775 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
4776 * sysdeps/sh/tls.h: New file.
4777 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
4778 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
4779 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
4780 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
4781 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
4782 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
4783 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
4784 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
4785 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
4786 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
4787 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
4788 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
4789 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
4790 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
4791 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
4792 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
4793 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
4794 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
4795 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
4796 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
4797 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
4798 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
4799 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
4800 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
4801 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
4802 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
4803 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
4804 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
4805 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
4806 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
4808 2003-02-08 Ulrich Drepper <drepper@redhat.com>
4810 * tst-cond2.c: Rearrange code to not rely on behavior undefined
4813 * tst-basic2.c (do_test): Lock mutex before creating the thread.
4815 2003-02-07 Ulrich Drepper <drepper@redhat.com>
4817 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
4818 (TLS_GET_FS): New #define.
4819 (TLS_SET_FS): New #define.
4820 Correct value of __NR_set_thread_area.
4822 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
4824 2003-02-06 Ulrich Drepper <drepper@redhat.com>
4826 * Makefile (tests): Add tst-popen1.
4827 * tst-popen1.c: New file.
4829 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
4830 but inactive generalization.
4831 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4832 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4833 Minor optimization, remove one instruction.
4834 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4836 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
4838 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
4840 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
4842 * init.c (__NR_set_tid_address): Add #ifdef for s390.
4843 * sysdeps/pthread/pthread_barrier_wait.c: New file.
4844 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
4845 * sysdeps/pthread/pthread_cond_signal.c: New file.
4846 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
4847 * sysdeps/pthread/pthread_cond_wait.c: New file.
4848 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
4849 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
4850 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
4851 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
4852 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
4853 * sysdeps/s390/Makefile: New file.
4854 * sysdeps/s390/bits/atomic.h: New file.
4855 * sysdeps/s390/pthread_spin_init.c: New file.
4856 * sysdeps/s390/pthread_spin_lock.c: New file.
4857 * sysdeps/s390/pthread_spin_trylock.c: New file.
4858 * sysdeps/s390/pthread_spin_unlock.c: New file.
4859 * sysdeps/s390/pthreaddef.h: New file.
4860 * sysdeps/s390/tcb-offsets.sym: New file.
4861 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
4862 * sysdeps/s390/tls.h: New file.
4863 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
4864 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
4865 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
4866 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
4867 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
4868 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
4869 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
4870 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
4871 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
4872 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
4873 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
4874 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
4875 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
4876 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
4877 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
4878 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
4879 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
4880 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
4881 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
4882 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
4883 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
4884 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
4885 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
4887 2003-02-04 Ulrich Drepper <drepper@redhat.com>
4889 * atomic.h: Add a couple more default implementations.
4890 (atomic_compare_and_exchange_acq): Use
4891 __arch_compare_and_exchange_32_acq in return value definition. It
4893 (atomic_bit_set): Renamed from atomic_set_bit.
4894 Add missing atomic_ prefixes.
4896 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
4897 thread library is available, use correct value to mark initialized
4900 2003-02-03 Ulrich Drepper <drepper@redhat.com>
4902 * allocatestack.c (allocate_stack): Use __getpagesize instead of
4903 __sysconf to determine pagesize.
4905 * pthread_create.c: Include <atomic.h>.
4906 * allocatestack.c (allocate_stack): Implement coloring of the
4907 allocated stack memory. Rename pagesize to pagesize_m1. It's the
4908 size minus one. Adjust users.
4909 * sysdeps/i386/i686/Makefile: New file.
4911 2003-02-02 Ulrich Drepper <drepper@redhat.com>
4913 * allocatestack.c: Improve comment throughout the file.
4915 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4916 (__lll_lock_wait): Add branch prediction.
4917 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
4918 (__lll_lock_wait): Likewise.
4919 (lll_unlock_wake_cb): Removed.
4921 2003-01-31 Ulrich Drepper <drepper@redhat.com>
4923 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
4924 _POSIX_THREAD_PRIORITY_SCHEDULING.
4926 2003-01-30 Jakub Jelinek <jakub@redhat.com>
4928 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4929 Fix return type of ptr___pthread_getspecific.
4931 2003-01-29 Ulrich Drepper <drepper@redhat.com>
4933 * Makefile (tests): Add tst-umask1.
4934 (tst-umask1-ARGS): Define.
4935 * tst-umask1.c: New file.
4937 2003-01-28 Ulrich Drepper <drepper@redhat.com>
4939 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
4940 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
4941 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
4942 pthread_rwlock_unlock.
4943 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
4944 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
4945 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
4946 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
4947 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4949 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
4950 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4952 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
4953 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
4954 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
4956 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
4957 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
4959 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
4960 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
4961 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
4963 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
4964 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
4966 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
4968 * Makefile (libpthread-routines): Remove lowlevelcond and
4969 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
4970 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
4971 and pthread_cond_broadcast.
4972 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
4973 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
4974 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
4975 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
4976 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
4977 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
4978 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
4979 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
4980 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
4981 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
4982 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
4983 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
4984 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
4985 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
4986 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
4987 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
4988 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
4989 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
4990 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
4991 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
4992 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
4993 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
4994 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
4995 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
4996 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
4997 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
4998 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
4999 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
5000 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
5001 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
5002 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
5004 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
5005 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
5006 of the code is moved to ...
5007 * sysdeps/pthread/createthread.c: ...here. New file.
5009 2003-01-27 Ulrich Drepper <drepper@redhat.com>
5011 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
5012 (__new_sem_post): Clear %eax before returning.
5013 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
5015 * Makefile (tests): Add tst-cleanup2.
5016 * tst-cleanup2.c: New file.
5018 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
5019 Interpret first parameter correctly.
5021 2003-01-17 Ulrich Drepper <drepper@redhat.com>
5023 * Makefile (headers): Add bits/semaphore.h.
5025 2003-01-16 Jakub Jelinek <jakub@redhat.com>
5027 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
5030 2003-01-14 Ulrich Drepper <drepper@redhat.com>
5032 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
5033 must be used and mapping failed.
5034 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
5036 * Makefile (CFLAGS-pthread_self.os): Define this, not
5037 CFLAGS-pthread_self.c.
5039 2003-01-13 Ulrich Drepper <drepper@redhat.com>
5041 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
5044 * Makefile (libpthread-routines): Add version. Add rules to build
5045 version.os and banner.h.
5046 * version.c: New file.
5048 2003-01-13 Jakub Jelinek <jakub@redhat.com>
5050 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
5051 the alias unconditional.
5052 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
5054 2003-01-13 Ulrich Drepper <drepper@redhat.com>
5056 * Makefile (CFLAGS-pthread_self.c): New definition.
5058 2003-01-06 Jakub Jelinek <jakub@redhat.com>
5060 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
5061 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
5062 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
5063 * init.c (__pthread_initialize_minimal_internal): Likewise.
5065 2003-01-07 Jakub Jelinek <jakub@redhat.com>
5067 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
5069 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
5070 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
5071 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
5072 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
5073 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
5074 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
5076 2003-01-06 Jakub Jelinek <jakub@redhat.com>
5078 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
5079 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
5080 * tst-cancel-wrappers.sh: Remove all exceptions.
5082 2003-01-05 Ulrich Drepper <drepper@redhat.com>
5084 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
5085 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
5087 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
5088 Use __libc_pthread_functions array if SHARED.
5090 * pthreadP.h: Move pthread_cond_2_0_t definition to...
5091 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
5093 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
5094 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
5095 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
5096 __libc_ptf_call instead of __libc_maybe_call.
5098 (__libc_cleanup_region_start): Wrap function name with PTF call.
5099 (__libc_cleanup_region_end): Likewise.
5100 (__libc_cleanup_end): Likewise.
5102 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
5103 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
5104 * pthread_key_create.c: Add __pthread_key_create_internal alias.
5105 * pthreadP.h: Add prototypes.
5107 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
5108 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
5109 __pthread_rwlock_unlock aliases.
5110 * pthreadP.h: Add prototypes for new aliases.
5112 * pthreadP.h (struct pthead_functions): Moved to...
5113 * sysdeps/pthread/pthread-functions.h: ...here. New file.
5114 * init.c (pthread_functions): Add initializers for new elements.
5116 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
5117 __pthread_cleanup_pop_restore aliases.
5118 * pthreadP.h: Add prototypes.
5120 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
5121 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
5122 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
5123 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
5124 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5125 * pthreadP.h: Adjust prototypes and callers.
5127 2003-01-04 Ulrich Drepper <drepper@redhat.com>
5129 * Makefile (tests): Add tst-cancel7.
5130 (tst-cancel7-ARGS): New variable.
5131 * tst-cancel7.c: New file.
5133 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
5134 around gcc defficiencies.
5135 * old_pthread_cond_signal.c: Likewise.
5136 * old_pthread_cond_timedwait.c: Likewise.
5137 * old_pthread_cond_wait.c: Likewise.
5139 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
5141 2003-01-03 Ulrich Drepper <drepper@redhat.com>
5143 * Makefile (tests): Add tst-cond7.
5144 * tst-cond7.c: New file.
5146 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
5147 (condvar_cleanup): Get condvar address from the right place.
5149 * atomic.h: Correct definitions of atomic_full_barrier,
5150 atomic_read_barrier, atomic_write_barrier.
5152 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
5154 * old_pthread_cond_signal.c: Likewise.
5155 * old_pthread_cond_timedwait.c: Likewise.
5156 * old_pthread_cond_wait.c: Likewise.
5158 2003-01-03 Jakub Jelinek <jakub@redhat.com>
5160 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
5162 2003-01-03 Ulrich Drepper <drepper@redhat.com>
5164 * pthreadP.h (pthread_cond_2_0_t): New type.
5165 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
5166 Use new type for the 2.0 condvar function prototypes.
5167 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
5168 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
5170 * old_pthread_cond_destroy.c: Likewise.
5171 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
5172 * old_pthread_cond_signal.c: Likewise.
5173 * old_pthread_cond_timedwait.c: Likewise.
5174 * old_pthread_cond_wait.c: Likewise.
5176 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
5177 (__pthread_cond_wait): Don't save cancellation mode and seq value
5180 * herrno.c (__h_errno_location): Don't define as weak.
5182 2003-01-02 Jakub Jelinek <jakub@redhat.com>
5184 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
5185 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
5186 and pthread_cond_wait.
5187 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
5189 (__pthread_cond_broadcast_2_0): ... this.
5190 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
5192 (__pthread_cond_destroy_2_0): ... this.
5193 * old_pthread_cond_init.c (__old_pthread_cond_init):
5195 (__pthread_cond_init_2_0): ... this.
5196 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
5198 (__pthread_cond_signal_2_0): ... this.
5199 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
5201 (__pthread_cond_wait_2_0): ... this.
5202 * pthread_cond_destroy.c: Include shlib-compat.h.
5203 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
5204 * pthread_cond_init.c: Include shlib-compat.h.
5205 (pthread_cond_init): Change strong_alias into versioned_symbol.
5206 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
5207 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
5209 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
5210 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
5211 __pthread_cond_wait_2_0): New prototypes.
5212 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
5213 __old_pthread_cond_init, __old_pthread_cond_signal,
5214 __old_pthread_cond_wait): Removed.
5215 * init.c: Include shlib-compat.h.
5216 (pthread_functions): Guard ptr___pthread_attr_init_2_0
5217 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
5218 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
5219 ptr___pthread_cond_*_2_0 fields.
5220 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
5221 pthread_cond_*@GLIBC_2.0 compatibility symbols.
5223 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
5224 LIBC_SIGACTION was not yet defined.
5225 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
5226 [!defined LIBC_SIGACTION] (__sigaction): New function and
5228 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
5229 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
5231 2003-01-02 Jakub Jelinek <jakub@redhat.com>
5233 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
5235 2003-01-02 Ulrich Drepper <drepper@redhat.com>
5237 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5238 New, larger type definition.
5239 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
5241 * Versions [libpthread]: Add definitions for new pthread_cond_*
5242 interfaces for version GLIBC_2.3.2.
5243 * pthread_cond_init.c: Update initialization for new type definition.
5244 * Makefile (libpthread-routines): Remove pthread_cond_wait,
5245 pthread_cond_timedwait, pthread_cond_signal, and
5246 pthread_cond_broadcast. Add old_pthread_cond_init,
5247 old_pthread_cond_destroy, old_pthread_cond_wait,
5248 old_pthread_cond_timedwait, old_pthread_cond_signal, and
5249 old_pthread_cond_broadcast.
5250 * old_pthread_cond_broadcast.c: New file.
5251 * old_pthread_cond_destroy.c: New file.
5252 * old_pthread_cond_init.c: New file.
5253 * old_pthread_cond_signal.c: New file.
5254 * old_pthread_cond_timedwait.c: New file.
5255 * old_pthread_cond_wait.c: New file.
5256 * pthreadP.h: Add prototypes for the compatibility interfaces.
5258 * pthread_cond_destroy.c: Don't include <errno.h>.
5260 2003-01-01 Ulrich Drepper <drepper@redhat.com>
5262 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
5263 unnecessary zero offset when addressing MUTEX.
5265 2002-12-31 Ulrich Drepper <drepper@redhat.com>
5267 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
5269 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
5270 for __register_atfork.
5272 2002-12-31 Jakub Jelinek <jakub@redhat.com>
5274 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
5275 instead of ASSEMBLER test macro.
5277 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
5278 __libc_current_sigrtmax): Add libc_hidden_def.
5280 * sysdeps/pthread/list.h: Remove assert.h include.
5282 2002-12-31 Ulrich Drepper <drepper@redhat.com>
5284 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
5285 __pthread_initialize_minimal_internal not
5286 __pthread_initialize_minimal.
5288 2002-12-30 Ulrich Drepper <drepper@redhat.com>
5290 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
5291 __pthread_initialize_minimal as hidden.
5293 * init.c (__pthread_initialize_minimal_internal): Don't mark as
5296 2002-12-31 Jakub Jelinek <jakub@redhat.com>
5298 * Makefile ($(inst_libdir)/libpthread.so): Depend on
5299 $(common-objpfx)format.lds, include that into the output script.
5301 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
5303 2002-12-28 Andreas Jaeger <aj@suse.de>
5305 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
5306 nsec resolution changes.
5307 (xstat64_conv): Likewise.
5308 (xstat32_conv): Likewise.
5309 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
5311 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
5312 structs stat and stat64.
5313 * time/time.h (__timespec_defined): Define for __USE_MISC.
5314 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
5316 2002-12-30 Jakub Jelinek <jakub@redhat.com>
5318 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
5320 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
5321 (pthread_exit): Use strong_alias to avoid warnings.
5322 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
5323 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
5324 ptr___pthread_attr_init_2_*.
5325 * init.c (pthread_functions): Adjust.
5327 2002-12-29 Ulrich Drepper <drepper@redhat.com>
5329 * forward.c: Make all functions available by default again. It
5330 caused too much trouble.
5332 * pt-siglongjmp.c: Removed.
5334 2002-12-28 Jakub Jelinek <jakub@redhat.com>
5336 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
5337 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
5338 * sysdeps/i386/Makefile: New file.
5339 * sysdeps/i386/tcb-offsets.sym: New file.
5340 * sysdeps/pthread/tcb-offsets.h: New file.
5341 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
5342 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
5344 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
5345 __register_atfork...
5346 (GLIBC_2.3.2): ...here.
5348 2002-12-28 Ulrich Drepper <drepper@redhat.com>
5350 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
5351 pthread_attr_setstackaddr with __attribute_deprecated__.
5353 2002-12-27 Jakub Jelinek <jakub@redhat.com>
5355 * pt-system.c (system): Remove cancellation handling.
5356 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
5357 cancellation routines.
5359 2002-12-28 Ulrich Drepper <drepper@redhat.com>
5361 * descr.h: Include <dl-sysdep.h>.
5362 (struct pthread): Move header.data.list to the back of the struct.
5363 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
5364 (MULTIPLE_THREADS_OFFSET): Adjust offset.
5365 (SYSINFO_OFFSEET): Likewise.
5367 2002-12-27 Jakub Jelinek <jakub@redhat.com>
5369 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
5371 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
5372 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
5373 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
5374 (USE_DL_SYSINFO): Undef.
5376 2002-12-22 Jakub Jelinek <jakub@redhat.com>
5378 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
5379 $(common-objpfx)libc.so.
5380 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
5381 it is bigger than pipe buffer size even on arches with bigger
5383 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
5385 2002-12-25 Ulrich Drepper <drepper@redhat.com>
5387 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
5388 correct errno access for case that USE___THREAD is not defined.
5390 2002-12-24 Ulrich Drepper <drepper@redhat.com>
5392 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
5393 Patch by Marijn Ros <marijn@mad.scientist.com>.
5395 2002-12-22 Roland McGrath <roland@redhat.com>
5397 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
5399 2002-12-20 Ulrich Drepper <drepper@redhat.com>
5401 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
5403 2002-12-19 Ulrich Drepper <drepper@redhat.com>
5405 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
5406 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
5407 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
5409 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
5411 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5412 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
5413 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
5414 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5415 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
5416 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
5417 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
5418 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5420 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
5422 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
5424 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
5426 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
5428 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
5429 that sysinfo is properly initialized.
5430 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
5431 to 1 only for ld.so.
5433 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
5434 RTLD_CORRECT_DYNAMIC_WEAK.
5436 2002-12-19 Jakub Jelinek <jakub@redhat.com>
5438 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
5439 Use return 0 as 6th argument to FORWARD4.
5440 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
5442 2002-12-18 Ulrich Drepper <drepper@redhat.com>
5444 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
5445 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
5446 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
5447 (INIT_SYSINFO): New #define.
5448 (TLS_TP_INIT): Use INIT_SYSINFO.
5449 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
5450 At test to make sure SYSINFO_OFFSET value is correct.
5451 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
5453 2002-12-18 Jakub Jelinek <jakub@redhat.com>
5455 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
5456 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
5457 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
5458 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
5459 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
5460 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
5461 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
5463 2002-12-18 Ulrich Drepper <drepper@redhat.com>
5465 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
5466 macro instead of using int $0x80 directly.
5468 * sysdeps/pthread/bits/stdio-lock.h: New file.
5469 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
5470 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
5471 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
5472 * Makefile (routines): Add libc-lowlevelmutex.
5474 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
5475 __i686.get_pc_thunk.dx.
5477 2002-12-17 Jakub Jelinek <jakub@redhat.com>
5479 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
5480 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
5481 ($(objpfx)tst-cancel-wrappers.out): New rule.
5482 * tst-cancel-wrappers.sh: New test.
5483 * tst-locale1.c: Include signal.h.
5484 (uselocale): Test static linking of __libc_current_sigrt*.
5486 2002-12-17 Ulrich Drepper <drepper@redhat.com>
5488 * Makefile (tests): Add tst-cancel6.
5489 * tst-cancel6.c: New file
5491 2002-12-17 Jakub Jelinek <jakub@redhat.com>
5493 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
5494 Define meaningfully for assembler as well.
5495 * pthreadP.h (struct pthread_functions): Remove
5496 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
5497 and ptr_pthread_attr_init_2_1 fields.
5498 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
5499 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
5500 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
5501 (FORWARD3): Define using FORWARD4.
5502 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
5504 * pt-system.c: Remove duplicate stdlib.h include.
5506 2002-12-16 Ulrich Drepper <drepper@redhat.com>
5508 * sem_init.c: Define sem_init@GLIBC_2.0.
5509 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
5510 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
5512 * flockfile.c: Moved to...
5513 * sysdeps/pthread/flockfile.c: ...here. New file.
5514 * funlockfile.c: Moved to...
5515 * sysdeps/pthread/funlockfile.c: ...here. New file.
5516 * ftrylockfile.c: Moved to...
5517 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
5519 2002-12-16 Jakub Jelinek <jakub@redhat.com>
5521 * libc-cancellation.c: Guard both function with
5522 #if !defined NOT_IN_libc.
5523 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
5524 automatically provided pthread wrappers.
5525 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
5526 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
5528 * pt-open.c: Removed.
5529 * pt-fcntl.c: Removed.
5530 * pt-fsync.c: Removed.
5531 * pt-lseek.c: Removed.
5532 * pt-msgrcv.c: Removed.
5533 * pt-msgsnd.c: Removed.
5534 * pt-msync.c: Removed.
5535 * pt-nanosleep.c: Removed.
5536 * pt-open64.c: Removed.
5537 * pt-pause.c: Removed.
5538 * pt-pread.c: Removed.
5539 * pt-pread64.c: Removed.
5540 * pt-pwrite.c: Removed.
5541 * pt-pwrite64.c: Removed.
5542 * pt-read.c: Removed.
5543 * pt-recv.c: Removed.
5544 * pt-recvfrom.c: Removed.
5545 * pt-recvmsg.c: Removed.
5546 * pt-send.c: Removed.
5547 * pt-sendto.c: Removed.
5548 * pt-sigtimedwait.c: Removed.
5549 * pt-sigwait.c: Removed.
5550 * pt-wait.c: Removed.
5551 * pt-waitpid.c: Removed.
5552 * pt-write.c: Removed.
5553 * pt-accept.c: Removed.
5554 * pt-close.c: Removed.
5555 * pt-connect.c: Removed.
5556 * pt-lseek64.c: Removed.
5557 * pt-sendmsg.c: Removed.
5558 * pt-tcdrain.c: Removed.
5560 2002-12-15 Ulrich Drepper <drepper@redhat.com>
5562 * init.c (__pthread_initialize_minimal_internal): Renamed from
5563 __pthread_initialize_minimal. Make old name an alias. This
5564 converts a normal relocation into a relative relocation.
5566 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
5568 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
5569 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
5570 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
5571 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
5572 pt-sigwaitinfo, pt-waitid, and pt-writev.
5573 * pt-creat.c: Removed.
5574 * pt-poll.c: Removed.
5575 * pt-pselect.c: Removed.
5576 * pt-readv.c: Removed.
5577 * pt-select.c: Removed.
5578 * pt-sigpause.c: Removed.
5579 * pt-sigsuspend.c: Removed.
5580 * pt-sigwaitinfo.c: Removed.
5581 * pt-waitid.c: Removed.
5582 * pt-writev.c: Removed.
5584 * init.c (pthread_functions): New variable.
5585 (__pthread_initialize_minimal): Pass pointer to pthread_functions
5586 (or NULL) to __libc_pthread_init.
5587 * forward.c: Rewrite to use __libc:pthread_functions array to get
5589 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
5591 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
5592 Take new parameter. Copy content of variable pointed to by it
5593 to __libc_pthread_init.
5595 * pthreadP.h (struct pthread_functions): New type.
5596 (__libc_pthread_init): Declare.
5598 * pthread_attr_destroy.c: Add namespace protected alias.
5599 * pthread_attr_getdetachstate.c: Likewise.
5600 * pthread_attr_getinheritsched.c: Likewise.
5601 * pthread_attr_getschedparam.c: Likewise.
5602 * pthread_attr_getschedpolicy.c: Likewise.
5603 * pthread_attr_getscope.c: Likewise.
5604 * pthread_attr_setdetachstate.c: Likewise.
5605 * pthread_attr_setinheritsched.c: Likewise.
5606 * pthread_attr_setschedparam.c: Likewise.
5607 * pthread_attr_setschedpolicy.c: Likewise.
5608 * pthread_attr_setscope.c: Likewise.
5609 * pthread_cond_broadcast.c: Likewise.
5610 * pthread_cond_destroy.c: Likewise.
5611 * pthread_cond_init.c: Likewise.
5612 * pthread_cond_signal.c: Likewise.
5613 * pthread_cond_wait.c: Likewise.
5614 * pthread_condattr_destroy.c: Likewise.
5615 * pthread_condattr_init.c: Likewise.
5616 * pthread_equal.c: Likewise.
5617 * pthread_exit.c: Likewise.
5618 * pthread_getschedparam.c: Likewise.
5619 * pthread_self.c: Likewise.
5620 * pthread_setcancelstate.c: Likewise.
5621 * pthread_setschedparam.c: Likewise.
5622 * pthread_mutex_destroy.c: Likewise.
5623 * pthread_mutex_init.c: Likewise.
5624 * pthreadP.h: Add prototypes for the aliases.
5626 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
5627 multiple_threads member in correct TCB to 1.
5629 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
5630 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
5631 member of thread decriptor, otherwise return unconditionally 1.
5633 2002-12-14 Ulrich Drepper <drepper@redhat.com>
5635 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
5636 regular Linux version. Remove file.
5637 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
5638 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
5639 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
5640 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
5641 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
5642 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
5643 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
5644 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
5645 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
5646 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
5647 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
5648 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
5649 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
5650 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
5651 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
5652 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
5653 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
5654 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
5655 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
5656 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
5657 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
5658 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
5659 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
5660 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
5661 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
5662 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
5663 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
5664 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
5665 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
5666 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
5668 2002-12-14 Jakub Jelinek <jakub@redhat.com>
5670 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
5671 * sysdeps/unix/sysv/linux/open.c: Removed.
5672 * sysdeps/unix/sysv/linux/fsync.c: Removed.
5673 * sysdeps/unix/sysv/linux/lseek.c: Removed.
5674 * sysdeps/unix/sysv/linux/msync.c: Removed.
5675 * sysdeps/unix/sysv/linux/read.c: Removed.
5676 * sysdeps/unix/sysv/linux/close.c: Removed.
5677 * sysdeps/unix/sysv/linux/creat.c: Removed.
5678 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
5679 * sysdeps/unix/sysv/linux/pause.c: Removed.
5680 * sysdeps/unix/sysv/linux/select.c: Removed.
5681 * sysdeps/unix/sysv/linux/write.c: Removed.
5683 2002-12-14 Ulrich Drepper <drepper@redhat.com>
5685 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
5686 element in TCB to see whether locking is needed.
5688 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
5689 MULTIPLE_THREADS_OFFSET value is correct.
5691 * sysdeps/unix/sysv/linux/close.c: New file.
5692 * sysdeps/unix/sysv/linux/connect.S: New file.
5693 * sysdeps/unix/sysv/linux/creat.c: New file.
5694 * sysdeps/unix/sysv/linux/fsync.c: New file.
5695 * sysdeps/unix/sysv/linux/llseek.c: New file.
5696 * sysdeps/unix/sysv/linux/lseek.c: New file.
5697 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
5698 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
5699 * sysdeps/unix/sysv/linux/msync.c: New file.
5700 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
5701 * sysdeps/unix/sysv/linux/open.c: New file.
5702 * sysdeps/unix/sysv/linux/open64.c: New file.
5703 * sysdeps/unix/sysv/linux/pause.c: New file.
5704 * sysdeps/unix/sysv/linux/poll.c: New file.
5705 * sysdeps/unix/sysv/linux/pread.c: New file.
5706 * sysdeps/unix/sysv/linux/pread64.c: New file.
5707 * sysdeps/unix/sysv/linux/pselect.c: New file.
5708 * sysdeps/unix/sysv/linux/pwrite.c: New file.
5709 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
5710 * sysdeps/unix/sysv/linux/readv.c: New file.
5711 * sysdeps/unix/sysv/linux/recv.S: New file.
5712 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
5713 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
5714 * sysdeps/unix/sysv/linux/select.c: New file.
5715 * sysdeps/unix/sysv/linux/send.S: New file.
5716 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
5717 * sysdeps/unix/sysv/linux/sendto.S: New file.
5718 * sysdeps/unix/sysv/linux/sigpause.c: New file.
5719 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
5720 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
5721 * sysdeps/unix/sysv/linux/sigwait.c: New file.
5722 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
5723 * sysdeps/unix/sysv/linux/system.c: New file.
5724 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
5725 * sysdeps/unix/sysv/linux/wait.c: New file.
5726 * sysdeps/unix/sysv/linux/waitid.c: New file.
5727 * sysdeps/unix/sysv/linux/waitpid.c: New file.
5728 * sysdeps/unix/sysv/linux/writev.c: New file.
5729 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
5731 * pt-readv.c: Fix comment.
5733 2002-12-14 Jakub Jelinek <jakub@redhat.com>
5735 * tst-cleanup1.c: Include stdlib.h.
5737 * tst-cancel5.c: New test.
5738 * Makefile (tests): Add tst-cancel5.
5739 (tst-cancel5): Link against libc.so libpthread.so in that order.
5741 2002-12-13 Ulrich Drepper <drepper@redhat.com>
5743 * forward.c (test_loaded): Prevent recursive calls.
5745 * Makefile (routines): Add libc-cancellation.
5746 * libc-cancellation.c: New file.
5747 * descr.h (struct pthread): Add multiple_threads field.
5748 * allocatestack.c (allocate_stack): Initialize multiple_header field of
5749 new thread descriptor to 1.
5750 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
5751 Initialize multiple_thread field after successful thread creation.
5752 * cancellation.c (__do_cancel): Move to pthreadP.h.
5753 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
5754 (__pthread_disable_asynccancel): Add internal_function attribute.
5755 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
5756 * pthread_setcancelstate.c: Likewise.
5757 * pthread_setcanceltype.c: Likewise.
5758 * pthread_exit.c: Likewise.
5759 * pthreadP.h (CANCELLATION_P): Likewise.
5760 (__do_cancel): Define as static inline.
5761 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
5762 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
5764 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
5765 fields. Define MULTIPLE_THREADS_OFFSET.
5766 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
5768 * sysdeps/unix/sysv/linux/accept.S: New file.
5769 * sysdeps/unix/sysv/linux/read.c: New file.
5770 * sysdeps/unix/sysv/linux/write.c: New file.
5771 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
5772 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
5773 initialization of __libc_locking_needed.
5774 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
5775 __libc_locking_needed, use multiple_threads field in TCB.
5776 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5778 2002-12-12 Ulrich Drepper <drepper@redhat.com>
5780 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
5782 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
5784 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
5785 access to __libc_locking_needed for PIC.
5787 2002-12-12 Jakub Jelinek <jakub@redhat.com>
5789 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
5790 declare for libc.so.
5791 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
5793 (__libc_lock_lock): Put into statement expression.
5794 (__libc_lock_unlock): Remove trailing semicolon.
5795 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
5797 2002-12-12 Roland McGrath <roland@redhat.com>
5799 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
5800 "m" constraint to refer to __libc_locking_needed. Declare it here.
5802 2002-12-12 Ulrich Drepper <drepper@redhat.com>
5804 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
5805 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
5806 Initialize __libc_locking_needed.
5807 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
5808 instead of __register_pthread_fork_handler.
5809 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
5810 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
5811 fork-gen with libc_pthread_init.
5812 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
5813 of __register_pthread_fork_handler.
5814 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
5815 of __register_pthread_fork_handler.
5816 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
5817 __libc_locking_needed to determine whether lock prefix can be avoided.
5818 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5820 2002-12-11 Ulrich Drepper <drepper@redhat.com>
5822 * Makefile (tests): Add tst-cleanup1.
5823 * tst-cleanup1.c: New file.
5824 * cancellation.c (__cleanup_thread): Removed.
5825 (__do_cancel): Remove call to __cleanup_thread.
5826 * pthreadP.h: Remove __cleanup_thread prorotype.
5828 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
5829 Remember function and argument even if cancellation handler
5830 function is not available.
5831 (__libc_cleanup_region_end): Execute registered function directly if
5832 pthread functions are not available.
5833 (__libc_cleanup_end): Likewise.
5835 * init.c (__pthread_initialize_minimal): Fix initialization in
5836 static lib by preventing gcc from being too clever.
5838 2002-12-10 Ulrich Drepper <drepper@redhat.com>
5840 * init.c (__pthread_initialize_minimal): Remove unneccesary
5843 * Makefile (tests): We can run tst-locale2 now.
5845 2002-12-09 Ulrich Drepper <drepper@redhat.com>
5847 * Versions: Remove duplicated sigwait entry.
5849 2002-12-08 Ulrich Drepper <drepper@redhat.com>
5851 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
5854 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
5856 * pthreadP.h: Declare __pthread_enable_asynccancel and
5857 __pthread_disable_asynccancel.
5858 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
5859 (CANCEL_RESET): Use __pthread_disable_asynccancel.
5860 * cancellation.c (__pthread_enable_asynccancel): New function.
5861 (__pthread_disable_asynccancel): New function.
5862 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
5863 * pt-close.c: Likewise.
5864 * pt-connect.c: Likewise.
5865 * pt-creat.c: Likewise.
5866 * pt-fcntl.c: Likewise.
5867 * pt-fsync.c: Likewise.
5868 * pt-lseek.c: Likewise.
5869 * pt-lseek64.c: Likewise.
5870 * pt-msgrcv.c: Likewise.
5871 * pt-msgsnd.c: Likewise.
5872 * pt-msync.c: Likewise.
5873 * pt-nanosleep.c: Likewise.
5874 * pt-open.c: Likewise.
5875 * pt-open64.c: Likewise.
5876 * pt-pause.c: Likewise.
5877 * pt-poll.c: Likewise.
5878 * pt-pread.c: Likewise.
5879 * pt-pread64.c: Likewise.
5880 * pt-pselect.c: Likewise.
5881 * pt-pwrite.c: Likewise.
5882 * pt-pwrite64.c: Likewise.
5883 * pt-read.c: Likewise.
5884 * pt-readv.c: Likewise.
5885 * pt-recv.c: Likewise.
5886 * pt-recvfrom.c: Likewise.
5887 * pt-recvmsg.c: Likewise.
5888 * pt-select.c: Likewise.
5889 * pt-send.c: Likewise.
5890 * pt-sendmsg.c: Likewise.
5891 * pt-sendto.c: Likewise.
5892 * pt-sigpause.c: Likewise.
5893 * pt-sigsuspend.c: Likewise.
5894 * pt-sigtimedwait.c: Likewise.
5895 * pt-sigwait.c: Likewise.
5896 * pt-sigwaitinfo.c: Likewise.
5897 * pt-system.c: Likewise.
5898 * pt-tcdrain.c: Likewise.
5899 * pt-wait.c: Likewise.
5900 * pt-waitid.c: Likewise.
5901 * pt-waitpid.c: Likewise.
5902 * pt-write.c: Likewise.
5903 * pt-writev.c: Likewise.
5904 * pthread_join.c: Likewise.
5905 * pthread_timedjoin.c: Likewise.
5907 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
5908 (__xpg_sigpause): New function.
5909 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
5911 2002-12-07 Ulrich Drepper <drepper@redhat.com>
5913 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
5915 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
5916 _GI_pthread_cleanup_pop to pthreadP.h.
5918 * ftrylockfile.c: Use _IO_lock_trylock instead of
5919 pthread_mutex_trylock.
5921 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
5922 (CANCEL_RESET): Likewise.
5923 (__pthread_setcanceltype_): Declare.
5924 (__pthread_mutex_lock_internal): Declare.
5925 (__pthread_mutex_unlock_internal): Declare.
5926 (__pthread_once_internal): Declare.
5927 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
5928 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
5930 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
5931 and pthread_mutex_unlock.
5932 * pthread_cond_wait.c: Likewise.
5933 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
5934 * pthread_mutex_unlock.c: Likewise.
5936 * pthread_setcanceltype.c: Add additional alias
5937 __pthread_setcanceltype.
5939 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
5940 * sem_open.c (sem_open): Likewise.
5941 Use __libc_open, __libc_write, and __libc_close instead of
5942 open, write, and close respectively.
5944 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
5945 Rewrite as statement expression since it must return a value.
5947 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
5948 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
5951 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
5952 alias __pthread_once_internal.
5954 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
5956 2002-12-06 Ulrich Drepper <drepper@redhat.com>
5958 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
5959 * tst-stdio1.c: New file.
5960 * tst-stdio2.c: New file.
5962 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
5964 * Makefile (tests): Comment out tst-locale2 for now.
5965 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
5967 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
5969 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
5970 Use _IO_lock_init instead of explicit assignment.
5972 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
5973 Define __libc_lock_* and __libc_lock_recursive macros with
5974 lowlevellock macros, not pthread mutexes.
5976 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
5977 of pthread_mutex_lock.
5978 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
5979 instead of pthread_mutex_unlock.
5981 2002-12-06 Roland McGrath <roland@redhat.com>
5983 * allocatestack.c (__stack_user): Use uninitialized defn.
5984 * init.c (__pthread_initialize_minimal): Initialize it here.
5986 2002-12-05 Roland McGrath <roland@redhat.com>
5988 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
5990 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
5992 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
5995 2002-12-05 Ulrich Drepper <drepper@redhat.com>
5997 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
5999 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
6000 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
6001 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
6002 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
6003 for __libc_lock_* macros.
6004 * Makefile (routines): Add libc-lowlevellock.
6006 2002-10-09 Roland McGrath <roland@redhat.com>
6008 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
6009 Under [__PIC__], call the function via the pointer fetched for
6010 comparison rather than a call by name that uses the PLT.
6011 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
6012 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
6013 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
6014 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
6015 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
6017 2002-12-04 Roland McGrath <roland@redhat.com>
6019 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
6021 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
6022 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
6024 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
6026 2002-12-04 Ulrich Drepper <drepper@redhat.com>
6028 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
6029 a completely opaque, non-integer type.
6030 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6032 2002-12-05 Jakub Jelinek <jakub@redhat.com>
6034 * sysdeps/i386/tls.h: Include stdlib.h.
6035 * sysdeps/x86_64/tls.h: Likewise.
6037 2002-12-04 Ulrich Drepper <drepper@redhat.com>
6039 * Makefile (tests): Add tst-locale2.
6040 (tests-static): Likewise.
6041 * tst-locale2.c: New file.
6043 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
6044 volatile and add memory clobbers to lock operations.
6046 2002-12-03 Ulrich Drepper <drepper@redhat.com>
6048 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
6049 * sysdeps/i386/i486/bits/atomic.h: New file.
6050 * sysdeps/i386/i586/bits/atomic.h: New file.
6051 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
6052 include i486 version.
6053 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
6054 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
6055 Patch by Marijn Ros <marijn@mad.scientist.com>.
6057 * allocatestack.c (get_cached_stack): Don't crash if we first
6058 found a stack with a larger size then needed.
6059 Reported by Hui Huang <hui.huang@sun.com>.
6061 * Makefile (tests): Add tst-sysconf.
6062 * tst-sysconf.c: New file.
6064 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
6065 PTHREAD_THREADS_MAX.
6067 2002-12-02 Roland McGrath <roland@redhat.com>
6069 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
6070 Declare using hidden_proto instead of attribute_hidden, so there are
6071 non-.hidden static symbols for gdb to find.
6072 (__pthread_keys): Likewise.
6073 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
6074 * allocatestack.c (__stack_user): Likewise.
6075 * pthread_create.c (__pthread_keys): Likewise.
6076 (__nptl_threads_events, __nptl_last_event): Make these static instead
6078 * pthread_key_create.c (__pthread_pthread_keys_max,
6079 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
6081 2002-12-02 Ulrich Drepper <drepper@redhat.com>
6083 * Makefile (tests): Add tst-locale1. If buid-static is yes link
6085 * tst-locale1.c: New file.
6087 * pthread_cond_timedwait.c: Include <stdlib.h>.
6089 * Makefile (tests): Add tst-fork2 and tst-fork3.
6090 * tst-fork2.c: New file.
6091 * tst-fork3.c: New file.
6093 2002-11-28 Ulrich Drepper <drepper@redhat.com>
6095 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
6097 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
6098 require it to 200112L.
6100 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
6101 instruction only if HAVE_CMOV is defined.
6102 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
6104 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
6106 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
6108 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
6110 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
6112 2002-11-27 Ulrich Drepper <drepper@redhat.com>
6114 * sysdeps/x86_64/bits/atomic.h: New file.
6116 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
6119 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
6120 possible since gettid cannot fail.
6122 * sysdeps/x86_64/pthreaddef.h: New file.
6124 * sysdeps/i386/pthreaddef.h (gettid): Removed.
6126 * sysdeps/x86_64/pthread_spin_init.c: New file.
6127 * sysdeps/x86_64/pthread_spin_lock.c: New file.
6128 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
6129 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
6131 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
6132 Add missing lock prefix. Minute optimization.
6134 * tst-spin2.c (main): Also check successful trylock call.
6136 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
6137 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
6139 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
6140 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
6142 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
6143 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
6144 value in case of an error. Add support for INTERNAL_SYSCALL.
6146 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
6147 value in case of an error.
6149 * sysdeps/x86_64/tls.h: New file.
6151 2002-11-26 Ulrich Drepper <drepper@redhat.com>
6153 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
6154 takes the array member name and the index as parameters.
6155 (THREAD_SETMEM_NC): Likewise.
6156 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
6157 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
6160 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
6161 to decide which code to use.
6162 (THREAD_SETMEM_NC): Likewise.
6164 * allocatestack.c (queue_stack): Don't remove stack from list here.
6165 Do it in the caller. Correct condition to prematurely terminate
6166 loop to free stacks.
6167 (__deallocate_stack): Remove stack from list here.
6169 2002-11-26 Ulrich Drepper <drepper@redhat.com>
6171 * Makefile (tests): Add tst-stack1.
6172 * tst-stack1.c: New file.
6174 * allocatestack.c (allocate_stack): Initialize the TCB on a user
6177 * pthread_attr_getstack.c: Return bottom of the thread area.
6179 2002-11-25 Ulrich Drepper <drepper@redhat.com>
6181 * Makefile (libpthread-routines): Add pt-allocrtsig and
6182 pthread_kill_other_threads.
6183 * pt-allocrtsig.c: New file.
6184 * pthread_kill_other_threads.c: New file.
6185 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
6186 all three functions.
6187 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
6189 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
6190 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
6191 and __libc_allocate_rtsig_private.
6192 * Versions (libpthread): Export pthread_kill_other_threads_np,
6193 __libc_current_sigrtmin, and __libc_current_sigrtmax.
6195 2002-11-24 Ulrich Drepper <drepper@redhat.com>
6197 * allocatestack.c (allocate_stack): stackaddr in attribute points to
6198 the end of the stack. Adjust computations.
6199 When mprotect call fails dequeue stack and free it.
6200 * pthread_attr_setstack.c: Store top of the stack in stackaddr
6202 * pthread_getattr_np.c: Likewise.
6204 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
6207 2002-11-23 Ulrich Drepper <drepper@redhat.com>
6209 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
6210 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
6212 2002-11-22 Ulrich Drepper <drepper@redhat.com>
6214 * pthread_getspecific.c: Optimize access to first 2nd-level array.
6215 * pthread_setspecific.c: Likewise.
6217 2002-11-21 Ulrich Drepper <drepper@redhat.com>
6219 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
6220 definitions. Get them from the official place.
6221 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
6223 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
6224 Use new CLONE_ flags in clone() calls.
6226 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
6227 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
6229 * Versions: Add pthread_* functions for libc.
6230 * forward.c: New file.
6232 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
6234 * herrno.c: New file.
6237 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
6238 sem_trywait, and sem_timedwait. Add herrno and res.
6239 * sem_init.c: Don't initialize lock and waiters members.
6240 * sem_open.c: Likewise.
6241 * sem_post.c: Removed.
6242 * sem_wait.c: Removed.
6243 * sem_trywait.c: Removed.
6244 * sem_timedwait.c: Removed.
6245 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
6246 Includes full implementations of sem_post, sem_wait, sem_trywait,
6248 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
6249 for new implementation.
6250 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
6253 * tst-sem3.c: Improve error message.
6254 * tst-signal3.c: Likewise.
6256 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
6257 to tell the kernel about the termination futex and to initialize tid
6258 member. Don't initialize main_thread.
6259 * descr.h (struct pthread): Remove main_thread member.
6260 * cancelllation.c (__do_cancel): Remove code handling main thread.
6261 The main thread is not special anymore.
6263 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
6264 size of the stacks to stack_cache_actsize.
6266 * pt-readv.c: Add missing "defined".
6267 * pt-sigwait.c: Likewise.
6268 * pt-writev.c: Likewise.
6270 2002-11-09 Ulrich Drepper <drepper@redhat.com>
6272 * Versions: Export __connect from libpthread.
6273 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6275 * Makefile (libpthread-routines): Add pt-raise.
6276 * sysdeps/unix/sysv/linux/raise.c: New file.
6277 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
6278 * sysdeps/generic/pt-raise.c: New file.
6280 * pthread_cond_init.c: Initialize all data elements of the condvar
6281 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
6283 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
6284 * pthread_create.c: Likewise.
6286 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
6287 * tst-key1.c: New file.
6288 * tst-key2.c: New file.
6289 * tst-key3.c: New file.
6291 * Versions: Export pthread_detach for version GLIBC_2.0.
6292 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
6294 2002-11-08 Ulrich Drepper <drepper@redhat.com>
6296 * pthread_key_create.c: Terminate search after an unused key was found.
6297 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6299 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
6300 Patch by Luca Barbieri <ldb@ldb.ods.org>.
6302 2002-10-10 Ulrich Drepper <drepper@redhat.com>
6304 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
6305 dynamic lookup for errno in PIC.
6307 * allocatestack.c (get_cached_stack): Rearrange code slightly to
6308 release the stack lock as soon as possible.
6309 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
6310 the static TLS block.
6311 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
6313 * cancellation.c: Renamed from cancelation.c.
6314 * Makefile: Adjust accordingly.
6315 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
6316 * cleanup_defer.c: Use CANCELLATION_P.
6317 * pthread_testcancel.c: Likewise.
6318 * descr.h: Fix spelling in comments.
6320 * pthread_getattr_np.c: Likewise.
6321 * pthread_getschedparam.c: Likewise.
6322 * pthread_setschedparam.c: Likewise.
6323 * Versions: Likewise.
6325 * pt-pselect.c: New file.
6326 * Makefile (libpthread-routines): Add pt-pselect.
6327 * Versions: Add pselect.
6329 * tst-cancel4.c: New file.
6330 * Makefile (tests): Add tst-cancel4.
6332 2002-10-09 Ulrich Drepper <drepper@redhat.com>
6334 * pthread_mutex_lock.c: Always record lock ownership.
6335 * pthread_mutex_timedlock.c: Likewise.
6336 * pthread_mutex_trylock.c: Likewise.
6338 * pt-readv.c: New file.
6339 * pt-writev.c: New file.
6340 * pt-creat.c: New file.
6341 * pt-msgrcv.c: New file.
6342 * pt-msgsnd.c: New file.
6343 * pt-poll.c: New file.
6344 * pt-select.c: New file.
6345 * pt-sigpause.c: New file.
6346 * pt-sigsuspend.c: New file.
6347 * pt-sigwait.c: New file.
6348 * pt-sigwaitinfo.c: New file.
6349 * pt-waitid.c: New file.
6350 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
6351 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
6352 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
6353 * Versions: Add all the new functions.
6355 * tst-exit1.c: New file.
6356 * Makefile (tests): Add tst-exit1.
6358 * sem_timedwait.c: Minor optimization for more optimal fastpath.
6360 2002-10-08 Ulrich Drepper <drepper@redhat.com>
6362 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
6364 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
6365 call. pthread_join is an official cancellation point.
6366 * pthread_timedjoin.c: Likewise.
6368 * pthread_cond_wait.c: Revert order in which internal lock are dropped
6369 and the condvar's mutex are retrieved.
6370 * pthread_cond_timedwait.c: Likewise.
6371 Reported by dice@saros.East.Sun.COM.
6373 2002-10-07 Ulrich Drepper <drepper@redhat.com>
6375 * pthreadP.h: Cut out all type definitions and move them...
6376 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
6377 * pthreadP.h: Include <internaltypes.h>.
6379 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
6382 * sem_trywait.c: Shuffle #includes around to get right order.
6383 * sem_timedwait.c: Likewise.
6384 * sem_post.c: Likewise.
6385 * sem_wait.c: Likewise.
6387 * nptl 0.3 released.
6389 * Makefile (tests): Add tst-signal3.
6390 * tst-signal3.c: New file.
6392 2002-10-05 Ulrich Drepper <drepper@redhat.com>
6394 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
6395 the asms modify the sem object.
6396 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
6398 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
6400 * pthreadP.h (struct sem): New type. Actual semaphore type.
6401 * semaphoreP.h: Include pthreadP.h.
6402 * sem_getvalue.c: Adjust to sem_t change.
6403 * sem_init.c: Likewise.
6404 * sem_open.c: Likewise.
6405 * sem_post.c: Likewise.
6406 * sem_timedwait.c: Likewise.
6407 * sem_trywait.c: Likewise.
6408 * sem_wait.c: Likewise.
6410 2002-10-04 Ulrich Drepper <drepper@redhat.com>
6412 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
6413 * tst-basic2.c: New file.
6414 * tst-exec1.c: New file.
6415 * tst-exec2.c: New file.
6416 * tst-exec3.c: New file.
6418 * tst-fork1.c: Remove extra */.
6420 * nptl 0.2 released. The API for IA-32 is complete.