1 2004-01-15 Richard Henderson <rth@redhat.com>
3 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
8 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
9 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
10 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
12 2004-01-14 Ulrich Drepper <drepper@redhat.com>
14 * init.c (pthread_funtions): Make array const.
16 2004-01-13 Ulrich Drepper <drepper@redhat.com>
18 * allocatestack.c (__make_stacks_executable): Change interface.
19 Check parameters. Pass parameter on to libc counterpart.
20 * pthreadP.h: Change declaration.
22 2004-01-13 Richard Henderson <rth@redhat.com>
24 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
26 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
29 * sysdeps/alpha/Makefile: New file.
30 * sysdeps/alpha/tcb-offsets.sym: New file.
31 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
32 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
34 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
37 2004-01-08 Jakub Jelinek <jakub@redhat.com>
39 * Makefile (tests): Add tst-backtrace1.
40 * tst-backtrace1.c: New test.
42 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
44 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
45 register as second parameter to the REGISTER macro.
46 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
47 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
48 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
49 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
50 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
51 of thread register as second parameter to REGISTER macro in 64 case.
53 2004-01-03 Ulrich Drepper <drepper@redhat.com>
55 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
56 (CFLAGS-getpid.o): Defined.
57 (CFLAGS-getpid.os): Defined.
59 2003-12-31 Ulrich Drepper <drepper@redhat.com>
61 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
62 returned for main thread does not overlap with any other VMA.
63 Patch by Jakub Jelinek.
65 2003-12-29 Jakub Jelinek <jakub@redhat.com>
67 * tst-raise1.c: Include stdio.h.
69 2003-12-23 Jakub Jelinek <jakub@redhat.com>
71 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
72 setting with __ASSUME_TGKILL || defined __NR_tgkill.
73 If pid is 0, set it to selftid.
74 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
75 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
76 != 0, return self->tid without doing a syscall.
77 * descr.h (struct pthread): Move pid field after tid.
79 * Makefile (tests): Add tst-raise1.
80 * tst-raise1.c: New file.
82 2003-12-23 Roland McGrath <roland@redhat.com>
84 * tst-oddstacklimit.c: New file.
85 * Makefile (tests): Add it.
86 (tst-oddstacklimit-ENV): New variable.
88 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
89 value up to page size for __default_stacksize.
91 2003-12-21 Ulrich Drepper <drepper@redhat.com>
93 * Makefile (tests): Add tst-eintr5.
94 * tst-eintr5.c: New file.
96 * eintr.c (eintr_source): Prevent sending signal to self.
98 * tst-eintr2.c (tf1): Improve error message.
100 2003-12-20 Ulrich Drepper <drepper@redhat.com>
102 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
103 * sysdeps/unix/sysv/linux/getpid.c: New file.
104 * pthread_cancel.c: Add comment explaining use of PID field.
105 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
106 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
107 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
108 temporarily to signal the field must not be relied on and updated
110 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
111 temporarily negative.
112 * sysdeps/unix/sysv/linux/raise.c: Likewise.
114 2003-12-19 Ulrich Drepper <drepper@redhat.com>
116 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
117 (eintr_source): If ARG != NULL, use pthread_kill.
118 * tst-eintr1.c: Adjust for this change.
119 * tst-eintr2.c: Likewise.
120 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
121 * tst-eintr3.c: New file.
122 * tst-eintr4.c: New file.
124 2003-12-19 Jakub Jelinek <jakub@redhat.com>
126 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
127 if CANCELSTATE_BITMASK is set.
128 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
131 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
132 (tests-reverse): Add tst-cancel23.
133 * tst-cancel22.c: New test.
134 * tst-cancel23.c: New test.
136 2003-12-18 Ulrich Drepper <drepper@redhat.com>
138 * tst-eintr1.c: Better error messages.
140 * Makefile (tests): Add tst-eintr2.
141 * tst-eintr2.c: New file.
143 2003-12-18 Jakub Jelinek <jakub@redhat.com>
145 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
146 (CFLAGS-tst-cancelx21.c): Set.
147 * tst-cancel21.c: New test.
148 * tst-cancelx21.c: New test.
150 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
152 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
153 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
154 * pt-longjmp.c: Include jmpbuf-unwind.h.
155 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
156 _JMPBUF_UNWINDS. Adjust compared pointers.
157 * init.c (__pthread_initialize_minimal_internal): Initialize
159 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
160 * sysdeps/alpha/jmpbuf-unwind.h: New file.
161 * sysdeps/i386/jmpbuf-unwind.h: New file.
162 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
163 * sysdeps/s390/jmpbuf-unwind.h: New file.
164 * sysdeps/sh/jmpbuf-unwind.h: New file.
165 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
166 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
167 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
168 (_JMPBUF_CFA_UNWINDS): Remove.
169 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
171 2003-12-12 Jakub Jelinek <jakub@redhat.com>
173 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
174 (CFLAGS-tst-cancelx20.c): Set.
175 * tst-cancel20.c: New test.
176 * tst-cancelx20.c: New test.
178 2003-12-17 Ulrich Drepper <drepper@redhat.com>
180 * init.c (__pthread_initialize_minimal_internal): Don't treat
181 architectures with separate register stack special here when
182 computing default stack size.
184 2003-12-17 Roland McGrath <roland@redhat.com>
186 * Makefile (tst-cancelx7-ARGS): New variable.
187 Reportd by Greg Schafer <gschafer@zip.com.au>.
189 2003-12-17 Jakub Jelinek <jakub@redhat.com>
191 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
192 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
193 (tst-stack3-ENV): Set.
194 ($(objpfx)tst-stack3-mem): New.
195 * tst-stack3.c: New test.
197 2003-12-10 David Mosberger <davidm@hpl.hp.com>
199 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
200 Add unwind directives. Drop unused .regstk directive.
201 (_fini_EPILOG_BEGINS): Add unwind directives.
203 2003-12-11 Ulrich Drepper <drepper@redhat.com>
205 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
206 Assume parameter is a pointer.
207 (lll_futex_wake): Likewise.
208 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
210 (lll_futex_wake): Likewise.
211 Reported by Boris Hu.
212 * sysdeps/unix/sysv/linux/unregister-atfork.c
213 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
215 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
217 2003-12-10 Ulrich Drepper <drepper@redhat.com>
219 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
220 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
221 __rtld_lock_initialize for ld.so lock.
222 Patch in part by Adam Li <adam.li@intel.com>.
224 2003-12-02 David Mosberger <davidm@hpl.hp.com>
226 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
227 in $(gnulib). Also, remove stale comment.
229 2003-11-12 David Mosberger <davidm@hpl.hp.com>
231 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
232 advantage of new syscall stub and optimize accordingly.
234 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
235 from SYS_futex, to match expectations of
236 sysdep.h:DO_INLINE_SYSCALL.
237 (lll_futex_clobbers): Remove.
238 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
239 (lll_futex_wake): Likewise.
240 (lll_futex_requeue): Likewise.
241 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
242 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
244 (__lll_mutex_lock): Likewise.
245 (__lll_mutex_cond_lock): Likewise.
246 (__lll_mutex_timed_lock): Likewise.
247 (__lll_mutex_unlock): Likewise.
248 (__lll_mutex_unlock_force): Likewise.
250 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
251 comes before the include of <sysdep.h>.
252 (THREAD_SELF_SYSINFO): New macro.
253 (THREAD_SYSINFO): Likewise.
254 (INIT_SYSINFO): New macro.
255 (TLS_INIT_TP): Call INIT_SYSINFO.
257 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
259 * sysdeps/pthread/createthread.c (create_thread): Use
260 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
261 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
262 THREAD_SELF_SYSINFO instead of open code.
263 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
264 (THREAD_SYSINFO): Likewise.
266 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
268 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
270 2003-12-06 Ulrich Drepper <drepper@redhat.com>
272 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
273 instead of .init. Patch by David Mosberger.
275 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
277 * sysdeps/pthread/configure.in: Remove broken declaration in C
278 cleanup handling check.
280 2003-11-30 Andreas Jaeger <aj@suse.de>
282 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
283 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
286 2003-11-27 Jakub Jelinek <jakub@redhat.com>
288 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
289 * pthread_attr_destroy.c: Include shlib-compat.h.
290 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
291 is set in iattr->flags.
292 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
294 2003-11-21 Jakub Jelinek <jakub@redhat.com>
296 * Makefile (distribute): Add tst-cleanup4aux.c.
298 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
301 2003-11-21 Ulrich Drepper <drepper@redhat.com>
303 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
306 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
307 store mutex address if the current value is ~0l.
308 * sysdeps/pthread/pthread_cond_timedwait.c
309 (__pthread_cond_timedwait): Likewise.
310 * sysdeps/pthread/pthread_cond_broadcast.c
311 (__pthread_cond_broadcast): Don't use requeue for pshared
314 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
315 (__pthread_cond_wait): Don't store mutex address if the current
317 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
318 (__pthread_cond_timedwait): Likewise.
319 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
320 (__pthread_cond_broadcast): Don't use requeue for pshared
323 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
324 element with ~0l for pshared condvars, with NULL otherwise.
326 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
327 (__pthread_cond_wait): Don't store mutex address if the current
329 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
330 (__pthread_cond_timedwait): Likewise.
331 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
332 (__pthread_cond_broadcast): Don't use requeue for pshared
335 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
336 * tst-cond12.c: New file.
337 * tst-cond13.c: New file.
339 2003-11-17 Ulrich Drepper <drepper@redhat.com>
341 * sysdeps/pthread/configure.in: Make missing forced unwind support
344 2003-11-11 Ulrich Drepper <drepper@redhat.com>
346 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
348 2003-11-06 Ulrich Drepper <drepper@redhat.com>
350 * Makefile: Add magic to clean up correctly.
352 2003-11-05 Jakub Jelinek <jakub@redhat.com>
354 * unwind.c (FRAME_LEFT): Define.
355 (unwind_stop): Handle old style cleanups here.
356 (__pthread_unwind): Handle old style cleanups only if
358 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
359 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
360 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
361 ($(objpfx)tst-cleanupx4): Likewise.
362 * tst-cleanup4.c: New test.
363 * tst-cleanup4aux.c: New.
364 * tst-cleanupx4.c: New test.
366 2003-11-04 Ulrich Drepper <drepper@redhat.com>
368 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
369 lll_mutex_*lock macros to skip atomic operations on some archs.
371 2003-11-03 Ulrich Drepper <drepper@redhat.com>
373 * sysdeps/pthread/tst-timer.c (main): Initialize
374 sigev2.sigev_value as well.
376 2003-10-15 Roland McGrath <roland@redhat.com>
378 * sysdeps/pthread/configure.in: Barf if visibility attribute support
380 * sysdeps/pthread/configure: Regenerated.
382 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
384 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
385 locking macros. No distinction between normal and mutex locking
387 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
388 Merge bits from lowlevelmutex.S we still need.
389 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
390 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
391 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
392 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
393 new mutex implementation.
394 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
395 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
396 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
397 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
398 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
399 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
400 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
401 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
402 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
403 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
404 symbol for entry point to avoid cancellation.
406 2003-10-07 Jakub Jelinek <jakub@redhat.com>
408 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
410 (SAVE_OLDTYPE_0): Fix a typo.
412 2003-10-03 Ulrich Drepper <drepper@redhat.com>
414 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
415 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
417 2003-10-02 Ulrich Drepper <drepper@redhat.com>
419 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
422 2003-10-02 Jakub Jelinek <jakub@redhat.com>
424 * Makefile (tests): Add tst-cancel19.
425 * tst-cancel19.c: New test.
427 2003-10-02 Ulrich Drepper <drepper@redhat.com>
429 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
430 restoring of the old cancellation type.
432 2003-09-30 Jakub Jelinek <jakub@redhat.com>
434 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
436 2003-09-27 Wolfram Gloger <wg@malloc.de>
438 * sysdeps/pthread/malloc-machine.h: New file
440 2003-09-24 Roland McGrath <roland@redhat.com>
442 * allocatestack.c (__make_stacks_executable): Don't ignore return
443 value from _dl_make_stack_executable.
445 2003-09-24 Ulrich Drepper <drepper@redhat.com>
447 * allocatestack.c (__make_stacks_executable): Also change
448 permission of the currently unused stacks.
450 * allocatestack.c (change_stack_perm): Split out from
451 __make_stacks_executable.
452 (allocate_stack): If the required permission changed between the time
453 we started preparing the stack and queueing it, change the permission.
454 (__make_stacks_executable): Call change_stack_perm.
456 * Makefile: Build tst-execstack-mod locally.
457 * tst-execstack-mod.c: New file.
459 2003-09-23 Jakub Jelinek <jakub@redhat.com>
461 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
463 2003-09-23 Roland McGrath <roland@redhat.com>
465 * tst-execstack.c: New file.
466 * Makefile (tests): Add it.
467 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
468 (LDFLAGS-tst-execstack): New variable.
470 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
471 whether to use PROT_EXEC for stack mmap.
472 (__make_stacks_executable): New function.
473 * pthreadP.h: Declare it.
474 * init.c (__pthread_initialize_minimal_internal): Set
475 GL(dl_make_stack_executable_hook) to that.
477 2003-09-22 Ulrich Drepper <drepper@redhat.com>
479 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
480 recommendation from AMD re avoidance of lock prefix.
482 2003-09-22 Jakub Jelinek <jakub@redhat.com>
484 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
485 lll_futex_timed_wait instead of lll_futex_wait.
486 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
487 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
488 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
489 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
490 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
491 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
492 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
493 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
494 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
495 Completely revamp the locking macros. No distinction between
496 normal and mutex locking anymore.
497 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
498 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
499 __lll_lock_timedwait): Fix prototypes.
500 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
501 __lll_lock_timedwait): Likewise.
502 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
503 macros, add __builtin_expect.
504 (lll_mutex_timedlock): Likewise. Fix return value.
505 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
506 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
507 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
508 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
509 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
510 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
511 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
512 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
514 2003-09-22 Ulrich Drepper <drepper@redhat.com>
516 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
517 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
518 operation if possible.
520 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
521 like jumping over the lock prefix.
523 2003-09-21 Ulrich Drepper <drepper@redhat.com>
525 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
526 locking macros. No distinction between normal and mutex locking
528 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
529 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
530 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
531 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
532 locking. Merge bits from lowlevelmutex.S we still need.
533 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
534 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
535 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
536 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
537 * Makefile (routines): Remove libc-lowlevelmutex.
538 (libpthread-rountines): Remove lowlevelmutex.
539 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
540 for new mutex implementation.
541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
542 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
543 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
544 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
545 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
547 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
549 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
550 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
551 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
552 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
553 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
554 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
555 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
556 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
558 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
560 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
561 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
562 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
564 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
565 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
567 2003-09-20 Ulrich Drepper <drepper@redhat.com>
569 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
570 in parameters of asm with output parameters.
572 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
573 type of DECR parameter to int.
574 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
576 2003-09-18 Jakub Jelinek <jakub@redhat.com>
578 * tst-attr3.c (tf, do_test): Print stack start/end/size and
579 guardsize for each thread.
581 2003-09-17 Jakub Jelinek <jakub@redhat.com>
583 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
584 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
585 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
587 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
588 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
590 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
591 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
592 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
593 (pthread_getaffinity_np): Add hidden_def.
595 * Makefile (tests): Add tst-attr3.
596 * tst-attr3.c: New test.
598 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
600 2003-09-15 Jakub Jelinek <jakub@redhat.com>
602 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
603 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
605 2003-09-17 Jakub Jelinek <jakub@redhat.com>
607 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
608 * tst-align.c: Include tst-stack-align.h.
609 (tf, do_test): Use TEST_STACK_ALIGN macro.
611 2003-09-17 Ulrich Drepper <drepper@redhat.com>
613 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
616 2003-09-16 Ulrich Drepper <drepper@redhat.com>
618 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
619 stack-related values for the initial thread.
621 2003-09-15 Jakub Jelinek <jakub@redhat.com>
623 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
625 2003-09-11 Ulrich Drepper <drepper@redhat.com>
627 * pthread_mutex_lock.c: Minor code rearrangements.
629 2003-09-05 Roland McGrath <roland@redhat.com>
631 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
632 Instead, include ../nptl_db/db_info.c to do its magic.
633 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
634 (__pthread_pthread_key_2ndlevel_size): Likewise.
635 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
636 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
637 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
638 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
639 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
640 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
641 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
642 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
643 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
644 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
645 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
646 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
647 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
648 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
649 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
650 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
651 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
653 2003-09-08 Ulrich Drepper <drepper@redhat.com>
655 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
656 of pthread_t to be compatible with LT.
657 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
658 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
659 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
660 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
661 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
662 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
663 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
665 2003-09-04 Ulrich Drepper <drepper@redhat.com>
667 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
669 2003-09-04 Jakub Jelinek <jakub@redhat.com>
671 * unwind-forcedunwind.c: Move to...
672 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
673 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
674 * sysdeps/pthread/jmpbuf-unwind.h: New file.
675 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
676 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
677 * unwind.c: Include jmpbuf-unwind.h.
678 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
680 2003-09-02 Jakub Jelinek <jakub@redhat.com>
682 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
683 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
684 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
685 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
686 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
687 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
688 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
689 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
690 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
691 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
692 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
694 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
695 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
696 * Makefile (tests): Add tst-stack2.
697 * tst-stack2.c: New test.
698 * tst-stack1.c: Include limits.h and sys/param.h.
699 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
701 * pthread_condattr_setpshared.c: Include errno.h.
702 (pthread_condattr_setpshared): Return EINVAL if pshared
703 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
705 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
706 defined symbol for entry point to avoid cancellation.
707 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
709 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
711 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
713 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
715 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
717 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
718 __close_nocancel, __read_nocancel, __write_nocancel,
719 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
720 libpthread.so or librt.so, define to corresponding function
721 without _nocancel suffix.
722 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
723 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
724 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
726 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
728 2003-09-02 Ulrich Drepper <drepper@redhat.com>
730 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
731 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
733 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
734 in subsections has a symbol associated with it.
736 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
737 defined symbol for entry point to avoid cancellation.
738 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
740 2003-09-01 Jakub Jelinek <jakub@redhat.com>
742 * Makefile (tests): Add tst-tls5.
743 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
744 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
745 ($(objpfx)tst-tls5): New.
746 ($(objpfx)tst-tls6.out): Likewise.
747 (tests): Depend on $(objpfx)tst-tls6.out.
748 * tst-tls3.c: Include stdint.h and pthreaddef.h.
749 (do_test): Check pthread_self () return value alignment.
750 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
751 (tf): Check pthread_self () return value alignment.
752 * tst-tls5.c: New test.
754 * tst-tls5mod.c: New.
755 * tst-tls5moda.c: New.
756 * tst-tls5modb.c: New.
757 * tst-tls5modc.c: New.
758 * tst-tls5modd.c: New.
759 * tst-tls5mode.c: New.
760 * tst-tls5modf.c: New.
761 * tst-tls6.sh: New test.
763 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
764 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
765 * init.c (pthread_functions): Initialize them.
766 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
767 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
768 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
769 pthread_cond_timedwait@@GLIBC_2.3.2.
771 2003-09-01 Jakub Jelinek <jakub@redhat.com>
773 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
774 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
775 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
776 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
777 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
778 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
780 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
782 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
783 _POSIX_THREAD_PRIORITY_SCHEDULING.
784 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
786 2003-08-31 Ulrich Drepper <drepper@redhat.com>
788 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
789 nested function, use static inline function from libio.h.
790 Code by Richard Henderson.
792 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
795 2003-08-30 Jakub Jelinek <jakub@redhat.com>
797 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
798 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
799 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
800 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
801 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
802 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
803 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
804 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
805 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
806 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
807 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
808 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
809 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
810 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
811 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
812 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
813 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
814 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
815 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
816 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
817 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
818 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
819 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
820 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
821 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
822 * sysdeps/sparc/tls.h: New file.
823 * sysdeps/sparc/tcb-offsets.sym: New file.
824 * sysdeps/sparc/Makefile: New file.
825 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
826 * init.c [__sparc__] (__NR_set_tid_address): Define.
828 2003-08-29 Jakub Jelinek <jakub@redhat.com>
830 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
831 _IO_release_lock): Define.
833 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
835 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
836 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
838 2003-08-27 Ulrich Drepper <drepper@redhat.com>
840 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
841 (__pthread_cleanup_class): Add missing return types of member
844 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
846 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
847 (lll_mutex_unlock_force): Add memory barrier between store and futex
850 2003-08-25 Ulrich Drepper <drepper@redhat.com>
852 * tst-cancel4.c (do_test): Also unlink tempfname and remove
853 tempmsg in first loop.
855 2003-08-18 Ulrich Drepper <drepper@redhat.com>
857 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
858 _POSIX_THREAD_PRIORITY_SCHEDULING.
859 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
861 2003-08-07 Jakub Jelinek <jakub@redhat.com>
863 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
864 (__rtld_lock_default_lock_recursive,
865 __rtld_lock_default_unlock_recursive): Define.
866 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
867 __rtld_lock_unlock_recursive): Define using
868 GL(_dl_rtld_*lock_recursive).
869 * init.c (__pthread_initialize_minimal_internal): Initialize
870 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
871 Lock GL(_dl_load_lock) the same number of times as
872 GL(_dl_load_lock) using non-mt implementation was nested.
874 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
875 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
877 2003-08-06 Jakub Jelinek <jakub@redhat.com>
879 * tst-cancel17.c (do_test): Make len2 maximum of page size and
882 2003-08-07 Jakub Jelinek <jakub@redhat.com>
884 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
886 2003-08-03 Jakub Jelinek <jakub@redhat.com>
888 * sysdeps/pthread/createthread.c (do_clone): Move error handling
889 to first syscall error check. Move syscall error check for tkill
890 into __ASSUME_CLONE_STOPPED #ifdef.
892 2003-08-02 Ulrich Drepper <drepper@redhat.com>
894 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
895 is not defined, do explicit synchronization.
896 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
897 is not defined also unlock pd->lock for non-debugging case in case
899 * pthread_create.c (start_thread): Always get and release pd->lock
900 if __ASSUME_CLONE_STOPPED is not defined.
901 (start_thread_debug): Removed. Adjust users.
902 * allocatestack.c (allocate_stack): Always initialize lock if
903 __ASSUME_CLONE_STOPPED is not defined.
904 * Makefile (tests): Add tst-sched1.
905 * tst-sched1.c: New file.
907 * sysdeps/pthread/createthread.c (do_clone): Only use
908 sched_setschduler and pass correct parameters.
910 2003-07-31 Jakub Jelinek <jakub@redhat.com>
912 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
913 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
914 PTHREAD_STACK_MIN in comments.
916 2003-07-31 Jakub Jelinek <jakub@redhat.com>
918 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
919 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
921 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
922 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
923 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
924 (__pthread_cleanup_upto): Fix prototype.
925 (_longjmp_unwind): Adjust caller.
926 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
927 Change second argument to const struct pointer.
928 * tst-sem8.c (main): Remove unused s2 and s3 variables.
929 * tst-sem9.c (main): Likewise.
930 * unwind.c: Include string.h for strlen prototype.
932 2003-07-31 Ulrich Drepper <drepper@redhat.com>
934 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
935 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
936 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
938 Patch by Nicholas Miell <nmiell@attbi.com>.
940 2003-07-30 Jakub Jelinek <jakub@redhat.com>
942 * init.c (__pthread_initialize_minimal_internal): Initialize
943 GL(dl_init_static_tls).
944 * pthreadP.h (__pthread_init_static_tls): New prototype.
945 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
947 * Makefile (tests): Add tst-tls4.
948 (modules-names): Add tst-tls4moda and tst-tls4modb.
949 ($(objpfx)tst-tls4): Link against libdl and libpthread.
950 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
952 * tst-tls4.c: New file.
953 * tst-tls4moda.c: New file.
954 * tst-tls4modb.c: New file.
956 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
958 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
959 before __timer_dealloc.
960 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
961 Don't call list_unlink.
963 2003-07-29 Roland McGrath <roland@redhat.com>
965 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
967 2003-07-25 Jakub Jelinek <jakub@redhat.com>
969 * tst-cancel17.c (do_test): Check if aio_cancel failed.
970 Don't reuse struct aiocb A if it failed.
971 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
972 not just one byte, as that does not block.
974 2003-07-22 Jakub Jelinek <jakub@redhat.com>
976 * sysdeps/pthread/unwind-resume.c: New file.
977 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
978 unwind-resume in csu subdir.
979 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
981 (librt-sysdep_routines, librt-shared-only-routines): Add
983 * sysdeps/pthread/rt-unwind-resume.c: New file.
984 * unwind-forcedunwind.c: New file.
985 * Makefile (libpthread-routines): Add unwind-forcedunwind.
986 (libpthread-shared-only-routines): Likewise.
987 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
988 * pthreadP.h (pthread_cancel_init): New prototype.
989 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
991 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
992 attr argument const struct pthread_attr *.
994 * res.c (__res_state): Return __resp.
995 * descr.h: Include resolv.h.
996 (struct pthread): Add res field.
997 * pthread_create.c: Include resolv.h.
998 (start_thread): Initialize __resp.
999 * Makefile (tests): Add tst-_res1.
1000 (module-names): Add tst-_res1mod1, tst-_res1mod2.
1001 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
1002 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
1004 * tst-_res1.c: New file.
1005 * tst-_res1mod1.c: New file.
1006 * tst-_res1mod2.c: New file.
1008 2003-07-21 Ulrich Drepper <drepper@redhat.com>
1010 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
1012 * Makefile: Define various *-no-z-defs variables for test DSOs
1013 which has undefined symbols.
1015 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
1017 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1018 Retry if the stwcx fails to store once_control.
1020 2003-07-20 Ulrich Drepper <drepper@redhat.com>
1022 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
1023 pthread_attr_setaffinity.
1024 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
1025 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
1026 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
1027 * pthread_attr_destroy.c: Free cpuset element if allocated.
1028 * pthread_create.c: Pass iattr as additional parameter to
1030 * sysdeps/pthread/createthread.c: If attribute is provided and
1031 a new thread is created with affinity set or scheduling parameters,
1032 start thread with CLONE_STOPPED.
1033 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
1034 pthread_attr_setaffinity.
1035 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
1038 2003-07-15 Ulrich Drepper <drepper@redhat.com>
1040 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
1042 2003-07-14 Ulrich Drepper <drepper@redhat.com>
1044 * sysdeps/pthread/configure.in: Require CFI directives also for
1047 2003-07-15 Jakub Jelinek <jakub@redhat.com>
1049 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
1052 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1054 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
1056 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
1057 registers as variables. Call __pthread_mutex_unlock_usercnt.
1058 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1059 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
1060 not self pointer in __writer. Compare with TID to determine
1062 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1063 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1065 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1067 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
1068 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1069 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
1070 macros also when compiling librt.
1072 2003-07-11 Jakub Jelinek <jakub@redhat.com>
1074 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
1075 -fasynchronous-unwind-tables.
1076 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1077 (PSEUDO): Add cfi directives.
1078 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
1080 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1083 2003-07-08 Jakub Jelinek <jakub@redhat.com>
1085 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
1086 __pthread_unregister_cancel): Add prototypes and hidden_proto.
1087 * unwind.c (__pthread_unwind_next): Add hidden_def.
1088 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
1090 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1091 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
1092 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1094 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1095 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1097 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
1098 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
1099 __pthread_unregister_cancel and __pthread_unwind_next.
1101 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1103 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
1104 different symbol for the cancellation syscall wrapper and
1105 non-cancellation syscall wrapper.
1106 (PSEUDO_END): Define.
1108 2003-07-05 Richard Henderson <rth@redhat.com>
1110 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
1111 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
1112 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
1113 return actual return value from the syscall, not 0.
1115 2003-07-07 Ulrich Drepper <drepper@redhat.com>
1117 * descr.h (struct pthread): Add pid field.
1118 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
1119 (__reclaim_stacks): Likewise.
1120 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
1121 also check for PID of the signal source.
1122 (__pthread_initialize_minimal_internal): Also initialize pid field
1123 of initial thread's descriptor.
1124 * pthread_cancel.c: Use tgkill instead of tkill if possible.
1125 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1126 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
1127 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
1128 * sysdeps/unix/sysv/linux/raise.c: Likewise.
1130 2003-07-05 Ulrich Drepper <drepper@redhat.com>
1132 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
1133 Fix use of parameter.
1134 (__libc_cleanup_pop): Likewise.
1136 2003-07-04 Ulrich Drepper <drepper@redhat.com>
1138 * init.c (sigcancel_handler): Change parameters to match handler
1139 for SA_SIGACTION. Check signal number and code to recognize
1140 invalid invocations.
1142 2003-07-03 Roland McGrath <roland@redhat.com>
1144 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
1145 Apply sizeof (struct pthread) bias to r13 value.
1147 2003-07-03 Ulrich Drepper <drepper@redhat.com>
1149 * sysdeps/pthread/configure.in: Require CFI directives.
1151 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
1153 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
1154 libpthread compilation.
1155 * unwind.c (__pthread_unwind): Add hidden_def.
1156 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
1158 2003-07-01 Ulrich Drepper <drepper@redhat.com>
1160 * libc-cancellation.c (__libc_cleanup_routine): Define.
1161 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
1162 (__pthread_cleanup_pop): Define.
1164 2003-07-01 Richard Henderson <rth@redhat.com>
1166 * sysdeps/alpha/elf/pt-initfini.c: New file.
1167 * sysdeps/alpha/pthread_spin_lock.S: New file.
1168 * sysdeps/alpha/pthread_spin_trylock.S: New file.
1169 * sysdeps/alpha/pthreaddef.h: New file.
1170 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
1171 * sysdeps/alpha/tls.h: New file.
1172 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1173 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
1174 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
1175 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
1176 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
1177 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
1178 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
1179 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
1180 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
1181 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1183 2003-07-01 Ulrich Drepper <drepper@redhat.com>
1185 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
1186 cleanup support and unwind info.
1188 2003-06-30 Ulrich Drepper <drepper@redhat.com>
1190 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
1191 Use correct cleanup handler registration. Add unwind info.
1192 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
1193 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
1194 * tst-once3.c: Add cleanup handler and check it is called.
1195 * tst-once4.c: Likewise.
1196 * tst-oncex3.c: New file.
1197 * tst-oncex4.c: New file.
1198 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
1200 2003-06-29 Ulrich Drepper <drepper@redhat.com>
1202 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
1204 2003-06-27 Ulrich Drepper <drepper@redhat.com>
1206 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
1207 (tf_msgsnd): Likewise.
1209 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
1210 premature returns a bit more.
1212 2003-06-26 Ulrich Drepper <drepper@redhat.com>
1214 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
1215 definition to the front.
1217 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
1218 the cleanup functions to make the names unique. Fix dwarf opcode
1220 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
1221 functions to make the names unique. Fix CFA offset for two blocks.
1223 2003-06-25 Ulrich Drepper <drepper@redhat.com>
1225 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
1226 missing closing braces.
1227 Patch by Christophe Saout <christophe@saout.de>.
1229 2003-06-24 Roland McGrath <roland@redhat.com>
1231 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
1233 2003-06-24 Ulrich Drepper <drepper@redhat.com>
1235 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
1236 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
1238 * pthreadP.h: Declare __find_thread_by_id.
1239 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
1240 * pthread_clock_gettime.c: Allow using other thread's clock.
1241 * pthread_clock_settime.c: Likewise.
1242 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
1243 * Makefile: Add rules to build and run tst-clock2.
1244 * tst-clock2.c: New file.
1246 2003-06-23 Ulrich Drepper <drepper@redhat.com>
1248 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
1249 to use exception-based cleanup handler.
1250 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1252 * tst-cond8.c (ch): Announce that we are done.
1254 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
1256 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
1257 Also test aio_suspend with timeout value.
1259 2003-06-22 Ulrich Drepper <drepper@redhat.com>
1261 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
1262 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
1265 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
1266 (__pthread_mutex_lock_internal): Likewise.
1267 (__pthread_mutex_unlock_internal): Likewise.
1268 (__pthread_mutex_unlock_usercnt): Declare.
1269 * pthread_mutex_destroy.c: Always fail if used in any way.
1270 * pthread_mutex_init.c: Update comment.
1271 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
1272 * pthread_mutex_timedlock.c: Adjust __nusers.
1273 * pthread_mutex_trylock.c: Adjust __nusers.
1274 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
1275 and public interfaces are wrapper with pass additional parameter.
1276 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
1278 * tst-mutex8.c: New file.
1279 * Makefile (tests): Add tst-mutex8.
1280 * sysdeps/pthread/pthread_cond_timedwait.c: Call
1281 __pthread_mutex_unlock_usercnt.
1282 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1283 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1284 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1285 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1286 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1287 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
1288 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
1290 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1291 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1292 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1293 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1294 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1296 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
1297 * pthread_mutex_timedlock.c: Likewise.
1298 * pthread_mutex_trylock.c: Adjust __nusers.
1299 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
1300 * tst-mutex9.c: New file.
1301 * Makefile (tests): Add tst-mutex9.
1302 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
1303 * sysdeps/ia64/tls.h: Likewise.
1304 * sysdeps/powerpc/tls.h: Likewise.
1305 * sysdeps/s390/tls.h: Likewise.
1306 * sysdeps/sh/tls.h: Likewise.
1307 * sysdeps/x86_64/tls.h: Likewise.
1308 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
1309 Change type of __owner.
1310 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1311 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1312 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1313 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1314 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1316 2003-06-19 Jakub Jelinek <jakub@redhat.com>
1318 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
1319 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
1321 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
1322 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
1323 instead of nr to lll_futex_wake. Only set errno and return -1
1326 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
1327 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
1328 return actual return value from the syscall, not 0.
1330 2003-06-18 Ulrich Drepper <drepper@redhat.com>
1332 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
1333 find a random value.
1334 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
1337 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
1338 compat_timer_settime.
1339 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
1340 compat_timer_gettime.
1341 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
1342 compat_timer_getoverrun.
1343 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
1344 compat_timer_delete.
1346 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
1347 error-checking mutex detect busy mutexes.
1349 2003-06-17 Ulrich Drepper <drepper@redhat.com>
1351 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
1352 Add ax to clobber list.
1353 (lll_mutex_cond_lock): Likewise.
1354 (lll_mutex_unlock): Likewise.
1355 (lll_lock): Likewise.
1356 (lll_unlock): Likewise.
1358 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
1359 * tst-cancel18.c: New file.
1360 * tst-cancelx18.c: New file.
1362 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
1365 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
1366 * tst-cancel17.c: New file.
1367 * tst-cancelx17.c: New file.
1369 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
1370 * sysdeps/unix/sysv/linux/sigwait.c: New file.
1371 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
1373 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
1375 2003-06-16 Jakub Jelinek <jakub@redhat.com>
1377 * sysdeps/pthread/createthread.c (create_thread): Set
1378 header.multiple_threads unconditionally.
1379 * allocatestack.c (allocate_stack): Likewise.
1380 * descr.h (struct pthread): Add header.multiple_threads
1382 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
1383 Define for librt. #error if neither libpthread, libc nor librt.
1384 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
1386 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
1387 CDISABLE): Likewise.
1388 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
1389 CDISABLE): Likewise.
1390 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
1391 CDISABLE): Likewise.
1392 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
1393 CDISABLE): Likewise. Access header.multiple_threads outside of
1394 libc and libpthread.
1395 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
1397 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
1398 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
1400 2003-06-17 Ulrich Drepper <drepper@redhat.com>
1402 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
1403 Also test early cancellation before the thread reaches the cancellation
1406 * Makefile: Compile forward.c with exceptions.
1408 * sysdeps/unix/sysv/linux/sleep.c: New file.
1410 2003-06-16 Ulrich Drepper <drepper@redhat.com>
1412 * Makefile: Add CFLAGS definition to compile function wrappers
1413 duplicated from libc with exceptions.
1414 * tst-cancel4.c: Also check cancellation handlers.
1416 * Makefile: Add rules to build and run tst-cancel16 and
1417 tst-cancelx16. Add missing CFLAGS definitions.
1418 * tst-cancel16.c: New file.
1419 * tst-cancelx16.c: New file.
1421 2003-06-15 Ulrich Drepper <drepper@redhat.com>
1423 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
1424 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
1425 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1426 (DL_SYSINFO_IMPLEMENTATION): Likewise.
1428 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
1429 (LIBC_CANCEL_RESET): Likewise.
1430 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
1431 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
1433 (CFLAGS-libcrt-cancellation.c): Define.
1434 * sysdeps/pthread/librt-cancellation.c: New file.
1435 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
1436 macros also when compiling librt.
1437 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1438 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1439 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1440 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1441 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1442 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1443 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1445 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
1446 compat_timer_create.
1448 2003-06-14 Ulrich Drepper <drepper@redhat.com>
1450 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
1452 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1454 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1455 Add libc_hidden_def.
1457 2003-06-13 Roland McGrath <roland@redhat.com>
1459 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
1460 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
1462 2003-06-11 Ulrich Drepper <drepper@redhat.com>
1464 * allocatestack.c (queue_stack): Always inline.
1465 * ptreadhP.h (__do_cancel): Likewise.
1467 2003-06-10 Jakub Jelinek <jakub@redhat.com>
1469 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
1472 2003-06-10 Ulrich Drepper <drepper@redhat.com>
1474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1475 (__pthread_cond_signal): Remove incorrect second addition for
1478 2003-06-09 Ulrich Drepper <drepper@redhat.com>
1480 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1481 (__pthread_cond_signal): Use correct futex pointer in
1482 __lll_mutex_lock_wait call.
1484 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1485 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
1487 2003-06-08 Ulrich Drepper <drepper@redhat.com>
1489 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
1491 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
1494 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
1495 hand-written CFI generation code. Since ENTRY/END also initiated
1496 CFI frames this caused two CFI sets to be generated.
1498 2003-06-07 Ulrich Drepper <drepper@redhat.com>
1500 * cleanup_routine.c: New file.
1501 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
1502 * sysdeps/pthread/pthread.h: Add support for fully exception-based
1504 * Makefile (libpthread-routines): Add cleanup_routine.
1505 Add more CFLAGS variables to compile with exceptions. Add comments
1506 why which file needs unwind tables.
1507 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
1509 * tst-cancelx1.c: New file.
1510 * tst-cancelx2.c: New file.
1511 * tst-cancelx3.c: New file.
1512 * tst-cancelx4.c: New file.
1513 * tst-cancelx5.c: New file.
1514 * tst-cancelx6.c: New file.
1515 * tst-cancelx7.c: New file.
1516 * tst-cancelx8.c: New file.
1517 * tst-cancelx9.c: New file.
1518 * tst-cancelx10.c: New file.
1519 * tst-cancelx11.c: New file.
1520 * tst-cancelx12.c: New file.
1521 * tst-cancelx13.c: New file.
1522 * tst-cancelx14.c: New file.
1523 * tst-cancelx15.c: New file.
1524 * tst-cleanupx0.c: New file.
1525 * tst-cleanupx0.expect: New file.
1526 * tst-cleanupx1.c: New file.
1527 * tst-cleanupx2.c: New file.
1528 * tst-cleanupx3.c: New file.
1530 * tst-cleanup0.c: Make standard compliant.
1531 * tst-cleanup1.c: Likewise.
1533 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
1534 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1535 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1536 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1537 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1538 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1539 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
1541 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1542 * tst-cancel12.c: New file.
1543 * tst-cancel13.c: New file.
1544 * tst-cancel14.c: New file.
1545 * tst-cancel15.c: New file.
1546 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
1549 * tst-cancel1.c: Add some comments.
1551 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
1554 2003-06-06 Ulrich Drepper <drepper@redhat.com>
1556 * Makefile (CFLAGS-pthread_cancel.c): Define.
1558 2003-06-05 Ulrich Drepper <drepper@redhat.com>
1560 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
1561 Change type of __writer element to int.
1562 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1563 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1564 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1565 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1566 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1567 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
1568 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1569 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
1570 Compare with TID to determine deadlocks.
1571 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
1572 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1573 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
1574 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1575 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1576 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1578 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1580 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1581 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1582 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1584 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1586 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1587 * Makefile (tests): Add tst-rwlock12.
1588 * tst-rwlock12.c: New file.
1590 2003-06-05 Jakub Jelinek <jakub@redhat.com>
1592 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
1593 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
1594 Remove bogus hidden_proto.
1595 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
1597 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
1598 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
1599 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
1600 ___lll_mutex_timedlock): Likewise.
1602 2003-06-04 Ulrich Drepper <drepper@redhat.com>
1604 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1605 (__pthread_cond_signal): Add some code to eventually handle
1608 2003-06-01 Ulrich Drepper <drepper@redhat.com>
1610 * Makefile (tests): Add tst-exec4.
1611 (tst-exec4-ARGS): Define.
1612 * tst-exec4.c: New file.
1614 2003-05-31 Ulrich Drepper <drepper@redhat.com>
1616 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1617 Also fail if tv_nsec < 0.
1618 (__lll_timedwait_tid): Likewise.
1619 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1620 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
1622 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
1624 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
1626 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
1628 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
1630 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
1633 * Makefile (tests): Add tst-sem8 and tst-sem9.
1634 * tst-sem8.c: New file.
1635 * tst-sem9.c: New file.
1636 * sem_open.c: Fix creation of in_use record if the file exists but
1639 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
1642 * sysdeps/pthread/timer_create.c (timer_create): In case
1643 evp==NULL, assign timer ID to sival_ptr.
1645 * descr.h (struct pthread_unwind_buf): Change type of prev element to
1646 struct pthread_unwind_buf *.
1647 (struct pthread): Likewise for cleanup_jmp_buf element.
1649 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
1650 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
1651 * unwind.c (__pthread_unwind_next): Likewise.
1653 2003-05-30 Ulrich Drepper <drepper@redhat.com>
1655 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1656 (lll_futex_timed_wait): Use int for futex value parameter.
1657 (lll_futex_wake): Likewise.
1658 (lll_futex_requeue): Likewise.
1660 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
1661 Replace one memory operation with one register operation.
1663 * tst-join4.c (do_test): Fix error message.
1665 * tst-rwlock6.c (do_test): Use correct format specifier.
1667 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
1668 (__lll_mutex_lock_wait): Replace one memory operation with one
1670 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
1671 (__lll_mutex_lock_wait): Likewise.
1673 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1674 (__lll_mutex_cond_lock): Add one to value parameter of
1675 __lll_lock_wait to reflect reality in the futex syscall.
1676 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1677 (lll_mutex_cond_lock): Likewise.
1679 2003-05-30 Jakub Jelinek <jakub@redhat.com>
1681 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
1683 (lll_mutex_cond_lock): Define.
1685 2003-05-29 Ulrich Drepper <drepper@redhat.com>
1687 * Makefile (tests): Add tst-signal6.
1688 * tst-signal6.c: New file.
1690 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
1691 (__lll_mutex_unlock_force): New function
1692 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
1694 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
1695 (__lll_mutex_unlock_force): New function.
1696 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
1698 * tst-rwlock7.c (do_test): Use correct format specifier.
1700 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
1701 Find break parameter in correct asm argument.
1703 2003-05-27 Jakub Jelinek <jakub@redhat.com>
1705 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
1707 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
1709 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1711 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
1712 lll_futex_requeue, lll_mutex_unlock_force): Define.
1714 2003-05-30 Jakub Jelinek <jakub@redhat.com>
1716 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1717 (pthread_cond_t): Add __mutex.
1718 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
1719 lll_futex_requeue, lll_mutex_unlock_force): Define.
1721 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1723 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
1724 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
1726 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
1728 (lll_futex_wait, lll_futex_wake): Define.
1729 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
1730 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
1731 FUTEX_REQUEUE instead of FUTEX_WAIT.
1732 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
1733 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
1734 mutex which was used in condvar structure. Call
1735 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
1736 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1738 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
1739 include tcb-offsets.h. Read wakeup value in locked region.
1740 Use the value of gbr register as THREAD_ID.
1741 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1742 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1743 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1745 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
1748 2003-05-28 Ulrich Drepper <drepper@redhat.com>
1750 * sysdeps/pthread/pthread_cond_broadcast.c
1751 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
1753 2003-05-26 Ulrich Drepper <drepper@redhat.com>
1755 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
1756 typo in register name.
1757 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
1758 correctly. Actually use requeue. Little optimization.
1759 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
1760 mutex address early. Handle cancellation state as 32-bit value.
1761 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1762 Remove unnecessary label.
1764 2003-05-25 Ulrich Drepper <drepper@redhat.com>
1766 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
1767 instead of FUTEX_WAIT.
1768 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
1769 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1770 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1771 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1772 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1773 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
1774 used in condvar structure. Call __pthread_mutex_cond_lock instead
1775 of __pthread_mutex_lock_internal.
1776 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1777 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1778 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1779 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
1780 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1781 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1782 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
1783 Add pthread_mutex_cond_lock.
1784 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
1785 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
1786 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
1787 lll_mutex_cond_lock.
1788 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1789 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1790 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
1792 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1793 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1795 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
1796 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1798 * pthreadP.h: Declare __pthread_mutex_cond_lock.
1799 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
1800 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
1801 macro don't define aliases.
1803 * cancellation.c: Remove __pthread_enable_asynccancel_2.
1804 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
1805 * sysdeps/pthread/pthread_cond_timedwait.c: Use
1806 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
1807 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1808 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1809 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
1810 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1811 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1813 2003-05-17 Ulrich Drepper <drepper@redhat.com>
1815 * sem_open.c: Fix one endless loop. Implement correct semantics
1816 wrt opening the same semaphore more then once.
1817 * sem_close.c: Adjust for sem_open change.
1818 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
1819 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
1820 * Makefile (tests): Add tst-sem7.
1821 * tst-sem7.c: New file.
1823 2003-05-16 Roland McGrath <roland@redhat.com>
1825 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
1826 uninitialized variable braino.
1828 2003-05-16 Ulrich Drepper <drepper@redhat.com>
1830 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
1831 test for syscall availability.
1833 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
1834 __no_posix_timers to -1 if the syscalls don't exist.
1836 * pthread_join.c (pthread_join): Set tid field of the joined
1837 thread to -1. This isn't necessary but helps to recognize some
1838 error conditions with almost no cost.
1840 * allocatestack.c (FREE_P): Also negative values indicate an
1843 * unwind.c: Include <unistd.h>.
1845 2003-05-14 Ulrich Drepper <drepper@redhat.com>
1847 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
1849 2003-05-14 Jakub Jelinek <jakub@redhat.com>
1851 * Makefile (crti-objs, crtn-objs): New variables.
1852 (omit-deps, extra-objs): Add crtn.
1853 ($(objpfx)libpthread.so): Depend on both crti and crtn
1854 and links to them in multidir.
1855 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
1857 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
1859 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1860 (lll_mutex_unlock): Use atomic_exchange_rel.
1862 2003-05-11 Ulrich Drepper <drepper@redhat.com>
1864 * cond-perf.c (cons): Add missing locking around setting of alldone.
1866 2003-05-10 Ulrich Drepper <drepper@redhat.com>
1868 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
1870 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1872 2003-05-09 Ulrich Drepper <drepper@redhat.com>
1874 * tst-sem6.c: New file.
1875 * Makefile (tests): Add tst-sem6.
1877 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
1878 Use atomic_exchange_rel instead of atomic_exchange.
1879 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
1882 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
1883 code for lll_futex_wait and lll_futex_wake in static apps. Use
1884 vsyscall is possible.
1886 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
1887 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
1888 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
1889 pthread_setaffinity_np.
1890 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
1891 and pthread_setaffinity_np.
1892 * Makefile (libpthread-routines): Add pthread_getaffinity and
1893 pthread_setaffinity.
1895 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
1896 use it in case mmap to allocate the stack fails.
1897 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
1898 ARCH_MAP_FLAGS here.
1899 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
1902 2003-05-08 Ulrich Drepper <drepper@redhat.com>
1904 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
1905 handler implementation. It is now lockless in fork().
1906 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
1907 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1908 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
1909 declare the __fork_*_lists.
1910 (struct fork_handler): Include pointers to all three functions.
1911 Add next, refcntr and need_signal elements.
1912 (__fork_handlers): New declaration.
1913 (__register_atfork_malloc): Remove declaration.
1914 (HAVE_register_atfork_malloc): Remove definition.
1915 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
1916 __pthread_child_handler variable.
1917 (__libc_pthread_init): Use __register_atfork instead of explicitly
1919 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
1921 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1923 * unwind.c (unwind_cleanup): Print error message and then abort. This
1924 function must never be reached.
1926 * cond-perf.c: New file.
1928 2003-05-05 Ulrich Drepper <drepper@redhat.com>
1930 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
1932 2003-05-04 Roland McGrath <roland@redhat.com>
1934 * Makefile ($(objpfx)../libc.so): New target.
1936 2003-05-02 Ulrich Drepper <drepper@redhat.com>
1938 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1939 (pthread_condattr_t): Size is only an int, don't use long for
1941 (pthread_mutexattr_t): Likewise.
1942 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1943 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1944 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1946 2003-05-01 Ulrich Drepper <drepper@redhat.com>
1948 * sysdeps/i386/tls.h: Define THREAD_ID.
1949 * sysdeps/ia64/tls.h: Likewise.
1950 * sysdeps/powerpc/tls.h: Likewise.
1951 * sysdeps/s390/tls.h: Likewise.
1952 * sysdeps/sh/tls.h: Likewise.
1953 * sysdeps/x86_64/tls.h: Likewise.
1954 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
1956 * pthread_mutex_timedlock.c: Likewise.
1957 * pthread_mutex_trylock.c: Likewise.
1958 * pthread_mutex_unlock.c: Likewise.
1959 * pthread_rwlock_trywrlock.c: Likewise.
1960 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
1961 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
1962 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
1963 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
1965 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
1968 2003-04-29 Jakub Jelinek <jakub@redhat.com>
1970 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1971 (__SIZEOF_PTHREAD_COND_T): Define to 48.
1972 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
1973 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
1974 Make __align long long instead of long.
1975 (pthread_rwlock_t): Formatting.
1976 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
1977 (pthread_rwlock_t): Formatting.
1978 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1979 (pthread_cond_t): Make __align long long instead of long.
1980 (pthread_rwlock_t): Move __flags field to the same position as in
1983 2003-04-30 Ulrich Drepper <drepper@redhat.com>
1985 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
1986 * tst-rwlock7.c (do_test): Likewise.
1988 2003-04-26 Roland McGrath <roland@redhat.com>
1990 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
1992 2003-04-22 Jakub Jelinek <jakub@redhat.com>
1994 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
1995 sizeof (struct pthread).
1996 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
1998 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
2000 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
2002 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
2004 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
2006 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
2008 (NO_TLS_OFFSET): Define.
2009 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
2010 add TLS_TCB_SIZE unnecessarily.
2012 2003-04-22 Roland McGrath <roland@redhat.com>
2014 * Makeconfig (shared-thread-library): Reverse link order to work
2017 2003-04-22 Ulrich Drepper <drepper@redhat.com>
2019 * semaphore.h: Fix typo in comment.
2021 2003-04-21 Ulrich Drepper <drepper@redhat.com>
2023 * sysdeps/pthread/sigfillset.c: New file.
2025 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
2026 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
2027 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
2028 * sysdeps/pthread/sigaction.c: Likewise.
2029 * sysdeps/pthread/sigprocmask.c: New file.
2030 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
2032 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2033 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
2036 2003-04-19 Ulrich Drepper <drepper@redhat.com>
2038 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
2039 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
2041 * sysdeps/unix/sysv/linux/unregister-atfork.c
2042 (__unregister_atfork): Don't free memory not allocated dynamically.
2044 * semaphore.h: Remove __THROW marker from cancellation points.
2045 * nptl/sysdeps/pthread/pthread.h: Likewise.
2047 2003-04-18 Ulrich Drepper <drepper@redhat.com>
2049 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
2050 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
2053 2003-04-16 Jakub Jelinek <jakub@redhat.com>
2055 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
2057 2003-04-15 Roland McGrath <roland@redhat.com>
2059 * forward.c (__pthread_unwind): Tweak to avoid warning.
2061 2003-04-15 Ulrich Drepper <drepper@redhat.com>
2063 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
2065 2003-04-14 Ulrich Drepper <drepper@redhat.com>
2067 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
2068 overflow CFA advance instructions.
2069 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2071 2003-04-14 Jakub Jelinek <jakub@redhat.com>
2073 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
2074 * sysdeps/i386/pthread_spin_lock.c: Likewise.
2075 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
2078 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
2079 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
2080 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
2081 DW_CFA_advance_loc for .Laddl-.Lsubl.
2083 2003-04-13 Ulrich Drepper <drepper@redhat.com>
2085 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
2086 position-independent unwind data for static libraries.
2087 Add missing unwind info. Add comments.
2089 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
2090 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2091 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2092 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2094 2003-04-12 Ulrich Drepper <drepper@redhat.com>
2096 * Makefile: Make sure all cancellation points are compiled with
2097 exception and asynchronous unwind tables.
2099 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
2100 which mishandles loading of global object addresses in PIC.
2101 (THREAD_SETMEM_NC): Likewise.
2103 2003-04-11 Ulrich Drepper <drepper@redhat.com>
2105 * pthread.h: Define new data structure for cleanup buffer. Declare
2106 new cleanup handler interfaces.
2107 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
2108 (struct pthread): Add cleanup_jmp_buf pointer. Define
2109 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
2110 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
2111 it. Declare old cleanup handler installation functions.
2112 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
2114 * cleanup_defer.c: Likewise.
2115 * cleanup_compat.c: New file. Old cleanup code.
2116 * cleanup_def_compat.c: New file. Old cleanup code.
2117 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
2118 if own thread descriptor.
2119 * unwind.c: New file.
2120 * forward.c: Add __pthread_unwind.
2121 * init.c (pthread_functions): Add __pthread_unwind.
2122 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
2123 Add ptr___pthread_unwind.
2124 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
2125 and unwind function.
2126 * Makefile (libpthread-routines): Add cleanup_compat,
2127 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
2128 table generation if necessary.
2129 * version.c: Record whether unwind support is compiled in.
2130 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
2131 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
2133 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
2134 complication to generate unwind information for syscall wrappers.
2135 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2136 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2137 __cleanup_fct_attribute.
2139 * Makefile: Add rules to build and run tst-cleanup0.
2140 * tst-cleanup0.c: New file.
2141 * tst-cleanup0.expect: New file.
2143 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
2144 caller. Optimize to avoid often unecessary local variable.
2146 2003-04-11 Roland McGrath <roland@redhat.com>
2148 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
2149 sets variable `multidir'; include that.
2150 (generated): Add it.
2151 ($(objpfx)$(multidir)/crti.o): New target.
2152 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
2154 2003-04-11 Ulrich Drepper <drepper@redhat.com>
2156 * tst-attr2.c (do_test): Add cast to avoid warning.
2157 * tst-mutex4.c (do_test): Likewise.
2159 2003-04-10 Ulrich Drepper <drepper@redhat.com>
2161 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
2164 2003-04-09 Ulrich Drepper <drepper@redhat.com>
2166 * Makefile (tests): Add tst-detach1.
2167 * tst-detach1.c: New file.
2169 2003-04-08 Ulrich Drepper <drepper@redhat.com>
2171 * sysdeps/pthread/pthread.h: Remove duplicate
2172 pthread_cleanup_{push,pop} definitions.
2174 * tst-barrier2.c: Eliminate warnings.
2175 * tst-cancel4.c: Likewise.
2176 * tst-cond4.c: Likewise.
2177 * tst-cond6.c: Likewise.
2178 * tst-detach1.c: Likewise.
2179 * tst-rwlock4.c: Likewise.
2180 * tst-rwlock6.c: Likewise.
2181 * tst-rwlock7.c: Likewise.
2182 * tst-sem3.c: Likewise.
2183 * tst-spin2.c: Likewise.
2184 * tst-umask1.c: Likewise.
2186 2003-04-07 Ulrich Drepper <drepper@redhat.com>
2188 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
2190 2003-04-06 Ulrich Drepper <drepper@redhat.com>
2192 * descr.h (struct pthread): Move cancelhandling member to the front.
2194 2003-04-05 Ulrich Drepper <drepper@redhat.com>
2196 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
2197 malloc_parent, and malloc_child statically.
2198 (__register_atfork_malloc): New function.
2199 (free_mem): Don't free any of the malloc_* variables on the list.
2200 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
2201 Define HAVE_register_atfork_malloc.
2203 2003-04-04 Ulrich Drepper <drepper@redhat.com>
2205 * sysdeps/pthread/createthread.c (create_thread): Add some more
2206 comments explaining when to set multiple_threads and when not.
2208 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
2209 THREAD_ATOMIC_BIT_SET if not already defined.
2210 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
2211 THREAD_ATOMIC_BIT_SET:
2212 * sysdeps/x86_64/tls.h: Likewise.
2213 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
2214 THREAD_ATOMIC_CMPXCHG_VAL.
2215 (_pthread_cleanup_pop_restore): Likewise.
2216 * cancellation.c (__pthread_enable_asynccancel): Likewise.
2217 (__pthread_enable_asynccancel_2): Likewise.
2218 (__pthread_disable_asynccancel): Likewise.
2219 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
2220 (__libc_disable_asynccancel): Likewise.
2221 * init.c (sigcancel_handler): Likewise.
2222 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
2223 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
2225 2003-04-03 Ulrich Drepper <drepper@redhat.com>
2227 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
2228 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
2229 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
2230 * Makefile (tests): Add tst-cancel11.
2231 * tst-cancel11.c: New file.
2233 2003-04-01 Ulrich Drepper <drepper@redhat.com>
2235 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
2236 round, not the first. Use specific_used flag instead of local
2237 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
2238 (__free_tcb): Don't call deallocate_tsd here.
2239 (start_thread): Call deallocate_tsd here.
2240 * pthread_setspecific.c: Set specific_used flag really only when
2242 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
2243 * tst-tsd3.c: New file.
2244 * tst-tsd4.c: New file.
2246 2003-03-31 Ulrich Drepper <drepper@redhat.com>
2248 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
2249 Use atomic_exchange_and_add instead of __lll_add.
2250 (__lll_mutex_timedlock): Likewise.
2251 Patch by Ian Wienand.
2253 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
2255 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2256 (SINGLE_THREAD_P): Fix typo.
2257 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
2259 2003-03-31 Ulrich Drepper <drepper@redhat.com>
2261 * Makefile (tests): Add tst-align.
2262 * tst-align.c: New file.
2263 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
2265 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
2268 * tst-tsd2.c: Add casts to avoid warnings.
2270 2003-03-30 Ulrich Drepper <drepper@redhat.com>
2272 * descr.h (struct pthread): Move most often used elements to the front.
2274 2003-03-29 Ulrich Drepper <drepper@redhat.com>
2276 * Makefile (libpthread-routines): Add pthread_atfork.
2277 (libpthread-static-only-routines): Add pthread_atfork.
2279 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2281 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
2283 (INSTALL_DTV): Add parens.
2284 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2285 Use passed descr instead of THREAD_SELF.
2286 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
2287 (__lll_mutex_timedlock_wait): Correct expected value after
2289 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
2290 Release lock before waking up the waiters.
2291 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
2292 criteria. Reorderstruct passed to cleanup handler. Fix
2293 handling of cancellation and failung pthread_mutex_unlock call.
2294 Use __pthread_enable_asynccancel_2 instead of
2295 __pthread_enable_asynccancel.
2296 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2297 Return result of lock re-get if it fails.
2298 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
2299 for __pthread_cleanup_push.
2300 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
2301 completely broken rwlock implementation.
2302 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2303 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2304 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2305 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2306 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2307 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
2308 versioned_symbol macro.
2309 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
2310 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
2312 2003-03-27 Ulrich Drepper <drepper@redhat.com>
2314 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
2315 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
2317 (struct timer): Remove th and bar field.
2318 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
2319 debugging code. Create only one helper thread.
2320 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
2322 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2323 Renamed. Define statically. Use thread info from siginfo.
2324 (__helper_once): New variable.
2325 (__helper_tid): New variable.
2326 (__reset_helper_control): New function.
2327 (__start_helper_thread): New function.
2329 * pthread_create.c (start_thread): Don't use setjmp inside
2330 __builtin_expect to work around gcc bug.
2332 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
2333 timer_delete syscall fails, but not with ENOSYS, set
2336 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
2337 (timer_settime): Fix typo.
2338 * sysdeps/unix/sysv/linux/timer_getoverr.c
2339 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
2341 2003-03-27 Jakub Jelinek <jakub@redhat.com>
2343 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
2344 offset of cleanupbuf.__prev.
2346 2003-03-26 Jakub Jelinek <jakub@redhat.com>
2348 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
2351 2003-03-26 Ulrich Drepper <drepper@redhat.com>
2353 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
2354 NULL provide default definition to syscall.
2356 2003-03-25 Roland McGrath <roland@redhat.com>
2358 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
2359 (timer_id2ptr): Fix typo.
2361 2003-03-25 Ulrich Drepper <drepper@redhat.com>
2363 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
2364 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
2365 * sysdeps/ia64/pthreaddef.h: Likewise.
2366 * sysdeps/powerpc/pthreaddef.h: Likewise.
2367 * sysdeps/s390/pthreaddef.h: Likewise.
2368 * sysdeps/sh/pthreaddef.h: Likewise.
2369 * sysdeps/x86_64/pthreaddef.h: Likewise.
2370 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
2371 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
2373 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
2374 SIGTIMER is not unblocked.
2375 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
2377 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
2379 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
2380 pass pointer through as ID.
2381 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
2382 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
2383 * sysdeps/unix/sysv/linux/timer_create.c: New file.
2384 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
2385 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
2386 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
2387 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
2388 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
2389 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
2390 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
2391 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
2392 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
2393 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
2394 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
2395 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
2396 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
2397 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
2398 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
2399 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
2400 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
2401 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
2402 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
2403 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
2404 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
2405 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
2406 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
2407 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
2408 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
2409 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
2410 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
2411 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
2412 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
2413 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
2415 * pthreadP.h: Remove FRAME_LEFT definition.
2416 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
2417 already left frame. Programs which have this problem are not POSIX
2419 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
2421 2003-03-24 Ulrich Drepper <drepper@redhat.com>
2423 * sysdeps/pthread/tst-timer.c: Check return values of the
2426 2003-03-23 Roland McGrath <roland@redhat.com>
2428 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
2429 * tst-tls3mod.c: Likewise.
2430 * tst-tls1.c: Likewise.
2431 * tst-tls2.c: Likewise.
2433 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
2436 * tst-join5.c (tf1, tf2): Add a cast.
2438 * Makeconfig (includes): Append -I$(..)nptl to this variable.
2440 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
2441 Don't test anything.
2442 * tst-cond4.c: Likewise.
2443 * tst-cond6.c: Likewise.
2444 * tst-flock2.c: Likewise.
2445 * tst-mutex4.c: Likewise.
2446 * tst-rwlock4.c: Likewise.
2447 * tst-signal1.c: Likewise.
2448 * tst-spin2.c: Likewise.
2449 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
2451 * tst-mutex4.c: Use test-skeleton.c.
2452 * tst-spin2.c: Likewise.
2453 * tst-sysconf.c: Likewise.
2454 * tst-barrier2.c: Likewise.
2455 * tst-cond4.c: Likewise.
2456 * tst-cond6.c: Likewise.
2457 * tst-rwlock4.c: Likewise.
2458 * tst-unload.c: Likewise.
2459 * tst-flock2.c (do_test): Use return instead of exit.
2461 2003-03-22 Jakub Jelinek <jakub@redhat.com>
2463 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
2465 2003-03-21 Ulrich Drepper <drepper@redhat.com>
2467 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
2468 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
2469 instead of __lll_compare_and_swap.
2470 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
2472 Removed definition if __lll_compare_and_swap.
2474 * cancellation.c: Adjust for new form of compare&exchange macros.
2475 * cleanup_defer.c: Likewise.
2477 * libc-cancellation.c: Likewise.
2478 * old_pthread_cond_broadcast.c: Likewise.
2479 * old_pthread_cond_signal.c: Likewise.
2480 * old_pthread_cond_timedwait.c: Likewise.
2481 * old_pthread_cond_wait.c: Likewise.
2482 * pthread_cancel.c: Likewise.
2483 * pthread_create.c: Likewise.
2484 * pthread_detach.c: Likewise.
2485 * pthread_join.c: Likewise.
2486 * pthread_key_delete.c: Likewise.
2487 * pthread_setcancelstate.c: Likewise.
2488 * pthread_setcanceltype.c: Likewise.
2489 * pthread_timedjoin.c: Likewise.
2490 * pthread_tryjoin.c: Likewise.
2491 * sysdeps/pthread/createthread.c: Likewise.
2493 2003-03-20 Ulrich Drepper <drepper@redhat.com>
2495 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
2496 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
2497 definitions. Replace uses with calls to atomic_* functions.
2498 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2499 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
2500 __lll_test_and_set calls with atomic_exchange_and_add and
2501 atomic_exchange calls respectively.
2502 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2503 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2504 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
2505 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2506 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
2507 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
2508 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
2510 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
2511 returns the old value.
2513 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
2515 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
2516 int for variable OLDVAL and correct inline assembler contraint.
2517 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
2518 type int for variable OLD.
2520 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
2522 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2523 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
2524 instead of multiple_threads field in the TCB.
2526 2003-03-19 Ulrich Drepper <drepper@redhat.com>
2528 * sysdeps/i386/i686/bits/atomic.h: Removed.
2529 * sysdeps/i386/i586/bits/atomic.h: Removed.
2530 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
2531 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
2532 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
2533 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
2534 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
2535 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
2536 * atomic.h: Removed. Moved to glibc.
2538 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
2539 support for clock selection.
2541 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
2544 2003-03-18 Roland McGrath <roland@redhat.com>
2546 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
2547 Add __lll_rel_instr first. Add memory clobber.
2548 (lll_mutex_unlock): Use __lll_test_and_set.
2549 From Paul Mackerras <paulus@samba.org>.
2551 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
2553 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2554 (SINGLE_THREAD_P): Add `header.' prefix.
2555 From Paul Mackerras <paulus@samba.org>.
2557 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
2558 pthread_timedjoin_np to ...
2559 (libpthread: GLIBC_2.3.3): ... here.
2560 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
2562 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2563 Avoid shadowing VAL variable.
2565 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
2568 2003-03-18 Ulrich Drepper <drepper@redhat.com>
2570 * Makefile (tests): Add tst-cond11.
2571 * tst-cond11.c: New file.
2573 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
2574 struct passed to cleanup handler to eliminate one more
2576 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2578 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2579 (pthrad_cond_t): Replace __unused field with __clock.
2581 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
2582 waken all waiters in cleanup handler.
2583 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2584 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2586 * pthread_condattr_getclock.c: New file.
2587 * pthread_condattr_setclock.c: New file.
2588 * sysdeps/pthread/pthread.h: Declare these new functions.
2589 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
2590 * Makefile (libpthread-routines): Add the new functions.
2591 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
2592 Renamed field to value. Document use of the bits.
2593 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
2595 * pthread_condattr_setpshared.c: Likewise.
2596 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
2597 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
2598 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2600 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2601 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2602 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2603 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2604 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2605 Implement clock selection.
2606 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2607 * pthread-errnos.sym: Add ENOSYS.
2608 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2609 _POSIX_CLOCK_SELECTION.
2610 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2612 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
2613 invalid .size directive.
2615 2003-03-17 Roland McGrath <roland@redhat.com>
2617 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
2620 2003-03-17 Ulrich Drepper <drepper@redhat.com>
2622 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
2623 Use __lll_add instead of spelling it out. Use protected symbol names.
2624 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
2626 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
2627 Renamed from lll_compare_and_swap. Use new name where necessary.
2628 (__lll_add): Defined.
2629 (__lll_dec_if_positive): Defined.
2630 (__lll_test_and_set): Defined.
2631 * sysdeps/ia64/pthread_spin_init.c: Removed.
2632 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
2633 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
2634 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
2635 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
2636 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
2637 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
2638 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
2639 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
2640 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2641 __sync_lock_release_si.
2642 Patch by Jakub Jelinek.
2644 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2645 Fix timeout handling.
2646 (__lll_timedwait_tid): Likewise.
2647 (lll_unlock_wake_cb): Wake up other waiters if necessary.
2648 Patch by Jakub Jelinek.
2650 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
2652 2003-03-17 Roland McGrath <roland@redhat.com>
2654 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
2655 * sysdeps/pthread/pthread_spin_init.c: New file.
2656 * sysdeps/pthread/pthread_spin_unlock.c: New file.
2657 * sysdeps/powerpc/Makefile: New file.
2658 * sysdeps/powerpc/pthread_spin_lock.c: New file.
2659 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
2660 * sysdeps/powerpc/pthreaddef.h: New file.
2661 * sysdeps/powerpc/tcb-offsets.sym: New file.
2662 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
2663 * sysdeps/powerpc/tls.h: New file.
2664 * sysdeps/powerpc/bits/atomic.h: New file.
2665 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
2666 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
2667 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
2669 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
2670 * sysdeps/unix/sysv/linux/sem_post.c: New file.
2671 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
2672 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
2673 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
2674 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
2675 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
2676 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
2677 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
2678 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
2679 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
2680 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
2681 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
2682 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
2683 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
2685 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
2687 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
2688 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
2689 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
2690 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
2691 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
2693 2003-03-17 Ulrich Drepper <drepper@redhat.com>
2695 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
2696 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2698 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2699 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
2701 2003-03-16 Roland McGrath <roland@redhat.com>
2703 * tst-fork4.c: Include <string.h>.
2704 * tst-signal2.c: Likewise.
2705 * tst-mutex5.c (do_test): exit -> return.
2706 * tst-mutex2.c: Include <stdlib.h>.
2708 2003-03-16 Ulrich Drepper <drepper@redhat.com>
2710 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
2711 (__lll_mutex_timedlock_wait): Correct expected value after
2712 spurious wakeup. Otherwise we would never wait again.
2714 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
2715 zone versus inline asm stupidity. Use correct instructions.
2717 * tst-rwlock6.c: Add some more status output.
2719 2003-03-15 Roland McGrath <roland@redhat.com>
2721 * sysdeps/pthread/configure.in: New file.
2722 * sysdeps/pthread/configure: New file (generated).
2724 2003-03-15 Ulrich Drepper <drepper@redhat.com>
2726 * allocatestack.c (allocate_stack): Store the exact stack size of
2727 user allocated stacks.
2729 2003-03-15 Jakub Jelinek <jakub@redhat.com>
2731 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2732 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
2733 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
2734 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
2735 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2736 Use `header.' prefix.
2737 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
2739 2003-03-15 Ulrich Drepper <drepper@redhat.com>
2741 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
2742 __builtin_frame_address, use stack pointer.
2744 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
2745 instead of __builtin_frame_pointer.
2747 2003-03-14 Ulrich Drepper <drepper@redhat.com>
2749 * tst-basic1.c (do_test): Add cast to avoid warning.
2750 * tst-basic2.c (do_test): Likewise.
2752 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
2753 amount of stack correction.
2755 * tst-fork4.c: Use test-skeleton.c.
2757 2003-03-14 Roland McGrath <roland@redhat.com>
2759 * init.c: Fix typo "#eli" for "#else".
2761 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
2763 * allocatestack.c (__stack_user): Use hidden_data_def.
2764 * pthread_create.c (__pthread_keys): Likewise.
2766 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
2768 2003-03-14 Roland McGrath <roland@redhat.com>
2770 * tst-fork4.c: New file.
2771 * Makefile (tests): Add it.
2773 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
2774 we always define the padding space.
2775 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
2776 stopped supporting its own extensions fully.
2777 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
2778 struct also called `header', so `header.multiple_threads' is the field
2779 name to use on all machines.
2780 * allocatestack.c (allocate_stack): Use `header.' prefix.
2781 * sysdeps/pthread/createthread.c (create_thread): Likewise.
2782 * pthread_create.c (__pthread_create_2_1): Likewise.
2783 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
2784 (THREAD_SELF): Likewise.
2785 * sysdeps/x86_64/tls.h: Likewise.
2786 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
2787 (SINGLE_THREAD_P): Likewise.
2788 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
2789 (SINGLE_THREAD_P): Likewise.
2790 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2791 (SINGLE_THREAD_P): Likewise.
2793 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
2796 2003-03-14 Ulrich Drepper <drepper@redhat.com>
2798 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
2799 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
2801 * pthread_create.c (start_thread): setjmp is expected to return 0.
2803 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
2804 (THREAD_GETMEM_NC): Likewise.
2806 2003-03-13 Ulrich Drepper <drepper@redhat.com>
2808 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
2809 and the size of the stack which must be allocated is a multiple,
2810 allocate one more page.
2811 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
2812 MULTI_PAGE_ALIASING.
2814 2003-03-13 Roland McGrath <roland@redhat.com>
2816 * pthread_create.c (start_thread): Set EXITING_BIT after the
2817 event-reporting (and destructors), not before.
2819 2003-03-13 Jakub Jelinek <jakub@redhat.com>
2821 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
2822 lll_futex_wake): Declare register variables as long int instead of
2823 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
2824 Make syscall arguments clobbered by the syscall.
2825 (lll_futex_wait): Define using lll_futex_timed_wait.
2827 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
2830 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
2833 * allocatestack.c (nptl_ncreated): Only declare if
2834 COLORING_INCREMENT != 0.
2836 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
2837 (__libc_enable_asynccancel_2): Remove prototype.
2839 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
2840 ctid to match kernel.
2842 2003-03-12 Ulrich Drepper <drepper@redhat.com>
2844 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
2845 libc_multiple_threads.
2846 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
2847 __libc_multiple_threads to...
2848 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
2850 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
2852 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2853 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2855 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
2856 (__pthread_once_internal): Define.
2858 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
2859 macros instead of .symver directly.
2860 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2861 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2863 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
2864 * sysdeps/x86_64/tcb-offsets.sym: New file.
2865 * sysdeps/x86_64/Makefile: New file.
2867 * sysdeps/i386/tcb-offsets.sym: Add SELF.
2868 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
2869 to access own pthread_t in TCB.
2870 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2872 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2874 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2876 2003-03-12 Roland McGrath <roland@redhat.com>
2878 * pthread-errnos.sym: New file.
2879 * Makefile (gen-as-const-headers): New variable, list that file.
2880 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
2881 header <pthread-errnos.h> instead of defining errno values here.
2882 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2883 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2884 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2885 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2886 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2888 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2890 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2891 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2892 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
2893 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2894 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2895 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2896 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2897 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2898 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2899 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
2900 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2901 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
2902 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
2903 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
2904 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
2905 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2906 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2907 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2908 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2909 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2910 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2911 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
2912 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
2913 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
2914 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
2915 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2916 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2918 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
2919 CLONE_CHILD_SETTID worked.
2921 2003-03-12 Ulrich Drepper <drepper@redhat.com>
2923 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
2925 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
2928 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2929 (pthread_cond_t): Add padding.
2931 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
2932 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
2933 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
2935 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2936 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
2937 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2938 (__pthread_rwlock_timedrdlock): Likewise.
2939 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
2940 (__pthread_rwlock_wrlock): Likewise.
2941 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
2942 (__pthread_rwlock_rdlock): Likewise.
2944 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
2946 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
2947 result of lock re-get if it fails.
2949 2003-03-11 Ulrich Drepper <drepper@redhat.com>
2951 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
2952 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2953 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
2954 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2955 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2956 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
2957 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2958 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2959 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
2960 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2962 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
2963 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
2965 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
2966 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
2967 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
2968 (create_thread): Likewise.
2969 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
2970 * init.c (__pthread_initialize_minimal_internal): Initialize
2971 __libc_multiple_threads_ptr if necessary.
2972 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
2973 __pthread_multiple_threads and __libc_multiple_threads_ptr.
2974 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
2975 __libc_multiple_threads.
2976 (__libc_pthread_init): Return pointer to __libc_pthread_init if
2979 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
2980 (THREAD_SETMEM_NC): Likewise.
2982 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
2983 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
2984 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
2985 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
2987 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
2988 Eliminate one entire instruction.
2990 * cancellation.c (__pthread_enable_asynccancel_2): New function.
2991 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
2992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2993 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
2994 instead of __pthread_enable_asynccancel.
2995 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
2996 (__pthread_cond_wait): Likewise.
2997 * sysdeps/pthread/pthread_cond_timedwait.c
2998 (__pthread_cond_timedwait): Likewise.
2999 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3001 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3002 (__condvar_cleanup): Wake up all waiters in case we got signaled
3003 after being woken up but before disabling asynchronous
3005 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
3006 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3007 (__condvar_cleanup): Likewise.
3009 * init.c (__NR_set_tid_address): If already defined, don't redefine.
3010 Make it an error if architecture has no #if case. Add x86-64.
3012 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
3013 pt-initfini.s generation.
3015 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
3016 (TLS_INIT_TP): Fix typo.
3018 2003-03-11 Jakub Jelinek <jakub@redhat.com>
3020 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
3021 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
3023 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
3024 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
3025 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
3026 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
3027 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
3028 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
3029 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
3030 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
3032 2003-03-11 Ulrich Drepper <drepper@redhat.com>
3034 * sysdeps/pthread/pthread_cond_timedwait.c
3035 (__pthread_cond_timedwait): Return the result of the final
3036 locking. If it succeeds, the regular function return value.
3038 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
3039 Return result of the final locking.
3040 * version.c (__nptl_main): Work around problems with the strange
3041 INTERNAL_SYSCALL macro on ppc32.
3042 * init.c (__pthread_initialize_minimal_internal): Unblock
3043 SIGCANCEL in case the parent blocked it.
3044 Reported by Paul Mackerras <paulus@samba.org>.
3046 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
3047 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
3048 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
3050 2003-03-11 Jakub Jelinek <jakub@redhat.com>
3052 * sysdeps/pthread/pthread_cond_timedwait.c
3053 (__pthread_cond_timedwait): Unlock and fail if
3054 __pthread_mutex_unlock_internal failed.
3056 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
3057 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
3059 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
3060 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
3061 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
3062 ALLOCATE_STACK): New macros.
3063 (TLS_TPADJ): New macro.
3064 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
3065 (allocate_stack): Handle TLS_DTV_AT_TP and
3066 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
3067 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
3069 * init.c [__ia64__] (__NR_set_tid_address): Define.
3071 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
3072 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
3073 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
3074 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
3075 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
3076 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
3077 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
3078 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
3079 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
3080 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3081 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
3082 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
3083 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
3084 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
3085 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
3086 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
3087 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
3088 * sysdeps/ia64/bits/atomic.h: New file.
3089 * sysdeps/ia64/Makefile: New file.
3090 * sysdeps/ia64/pthread_spin_init.c: New file.
3091 * sysdeps/ia64/pthread_spin_lock.c: New file.
3092 * sysdeps/ia64/pthread_spin_trylock.c: New file.
3093 * sysdeps/ia64/pthread_spin_unlock.c: New file.
3094 * sysdeps/ia64/pthreaddef.h: New file.
3095 * sysdeps/ia64/tcb-offsets.sym: New file.
3096 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
3097 * sysdeps/ia64/tls.h: New file.
3099 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
3100 to syscall instead of no arguments.
3102 2003-03-10 Ulrich Drepper <drepper@redhat.com>
3104 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
3105 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
3106 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
3107 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
3109 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
3112 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
3114 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3115 lowlevelbarrier.sym.
3116 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
3117 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
3118 Include lowlevelbarrier.h and don't define offsets locally.
3119 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
3121 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3122 (__lll_mutex_lock_wait): Reverse order of first two parameters.
3123 (__lll_mutex_timedlock_wait): Likewise.
3124 (lll_mutex_lock): Adjust asm for that.
3125 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
3126 (lll_lock): Adjust asm for operand order change.
3127 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
3128 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
3130 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
3131 Reverse order of parameters.
3132 (__lll_timedwait_tid): Remove regparms attribute.
3133 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
3134 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
3136 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3137 (__lll_timedwait_tid): Remove one unnecessary instruction.
3139 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
3140 __lll_mutex_timedlock_wait only for NOT_IN_libc.
3141 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
3144 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
3145 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
3147 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
3150 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
3151 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
3153 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
3154 define LOCK here (if UP is not defined). The actual code is in
3157 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
3158 LOCK is already defined. Don't define lll_unlock_wake_cb and
3159 __lll_timedwait_tid for libc.so.
3160 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
3161 define LOCK here (if UP is not defined). The actual code is in
3164 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
3165 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
3166 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
3167 instead of lowlevelsem.h.
3168 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
3169 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
3170 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
3172 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3174 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
3175 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
3176 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
3178 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
3180 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
3183 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
3185 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
3186 of __libc_locking_needed.
3187 (lll_trylock): Initialize %eax to zero.
3189 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
3190 pthread_cond_t definition.
3192 2003-03-10 Roland McGrath <roland@redhat.com>
3194 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
3195 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
3196 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
3197 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
3198 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
3200 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
3201 Instead of setting PD->multiple_threads, set globals
3202 __pthread_multiple_threads and __libc_multiple_threads.
3203 * sysdeps/pthread/createthread.c (create_thread): Likewise.
3204 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
3205 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
3207 * descr.h (struct pthread): Conditionalize first member on
3208 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
3209 containing an anonymous tcbhead_t. Move `list' member out.
3210 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
3211 * allocatestack.c: Remove use of `header.data.' prefix.
3212 * pthread_create.c: Likewise.
3213 * init.c (__pthread_initialize_minimal_internal): Likewise.
3214 * sysdeps/pthread/createthread.c (create_thread): Likewise.
3215 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
3216 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
3217 * sysdeps/x86_64/tls.h: Likewise.
3218 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
3219 (SINGLE_THREAD_P): Likewise.
3220 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
3221 (SINGLE_THREAD_P): Likewise.
3222 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
3223 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
3225 2003-03-09 Ulrich Drepper <drepper@redhat.com>
3227 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
3229 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
3230 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
3232 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
3233 leftovers from the ia32 code.
3235 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
3237 (clear_once_control): Don't load %esi.
3239 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
3242 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
3244 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
3245 * sysdeps/unix/sysv/linux/createthread.c: ...here.
3247 * Makefile (tests): Add tst-cond10.
3248 * tst-cond10.c: New file.
3250 2003-03-08 Ulrich Drepper <drepper@redhat.com>
3252 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
3253 * tst-signal3.c (do_test): Likewise.
3254 * tst-sem5.c (do_test): Likewise.
3255 * tst-kill6.c (do_test): Likewise.
3256 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
3258 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
3260 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
3261 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
3262 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3263 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3264 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3265 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3266 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3268 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3270 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3271 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3273 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3274 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3275 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3276 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
3277 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3279 * allocatestack.c (allocate_stack): If mprotect() fails free the
3282 2003-03-07 Ulrich Drepper <drepper@redhat.com>
3284 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
3286 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
3287 lll_wake_tid. This was used only to work around kernel limits in
3289 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3290 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
3291 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3292 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3294 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
3295 (__pthread_initialize_minimal_internal): Change initialization of
3296 __static_tls_align_m1 appropriately.
3297 * pthreadP.h (__static_tls_align_m1): Renamed from
3299 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
3300 instead of __static_tls_align-1.
3302 2003-03-04 Ulrich Drepper <drepper@redhat.com>
3304 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
3306 * pthread_create.c: Define __pthread_keys using nocommon
3307 attribute, not by placing it explicitly in bss.
3308 Remove DEFINE_DEALLOC definition. Not needed anymore.
3310 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
3311 Use it in mmap call to allocate stacks.
3313 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
3315 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
3316 result of the thread function.
3318 2003-03-03 Ulrich Drepper <drepper@redhat.com>
3320 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
3321 version is just fine.
3323 * sysdeps/unix/sysv/linux/libc_pthread_init.c
3324 (__pthread_child_handler): Renamed from pthread_child_handler,
3325 exported, and marked hidden. Change all users.
3326 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
3327 free __pthread_child_handler from child list.
3329 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
3331 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
3333 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3334 Fix handling of cancellation and failing pthread_mutex_unlock call.
3335 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
3336 (__pthread_cond_wait): Likewise.
3338 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3339 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
3340 lll_futex_timed_wait call.
3341 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3342 (pthread_rwlock_timedwrlock): Likewise.
3344 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
3345 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
3346 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
3348 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
3349 check of lll_futex_wake return value.
3351 2003-03-03 Roland McGrath <roland@redhat.com>
3353 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
3355 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3356 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
3357 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3359 2003-03-02 Ulrich Drepper <drepper@redhat.com>
3361 * sysdeps/pthread/timer_create.c (timer_create): Return correct
3362 error for CPU clocks.
3364 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3365 _POSIX_MONOTONIC_CLOCK.
3366 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3368 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
3371 2003-03-01 Ulrich Drepper <drepper@redhat.com>
3373 * descr.h (struct pthread): Move cleanup field to the front.
3375 2003-03-01 Roland McGrath <roland@redhat.com>
3377 * sem_open.c (sem_open): Braino fix.
3379 2003-03-01 Ulrich Drepper <drepper@redhat.com>
3381 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
3382 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
3383 __pthread_cleanup_pop functionality.
3384 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3386 * descr.h (struct pthread): Move tid field to the front now that
3389 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
3390 (__lll_mutex_timedlock_wait): Remove.
3391 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
3392 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
3393 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
3394 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3395 (lll_unlock_wake_cb): Don't save and restore %esi.
3396 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
3398 (__lll_timedwait_tid): Add alignment.
3399 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
3400 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
3402 (__lll_timedwait_tid): Removed.
3403 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3404 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
3405 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
3406 (pthread_barrier_wait): Don't save, load, and restore %esi for
3408 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3409 (__pthread_cond_signal): Don't save, load, and restore %esi.
3410 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3411 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
3412 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3413 Don't save, load, and restore %esi.
3415 2003-02-27 Ulrich Drepper <drepper@redhat.com>
3417 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3418 Release lock before waking up the waiters.
3420 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
3422 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
3423 (reader_thread): Likewise.
3425 * sysdeps/pthread/pthread_rwlock_unlock.c
3426 (__pthread_rwlock_unlock): Release internal lock early. Don't try
3427 to wake up readers if there are none.
3429 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3430 Release internal lock before wake threads.
3432 2003-02-26 Ulrich Drepper <drepper@redhat.com>
3434 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
3435 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
3437 * tst-rwlock9.c: Likewise.
3438 * tst-rwlock10.c: New file.
3439 * tst-rwlock11.c: New file.
3441 * Makefile (tests): Add tst-dlsym1.
3442 * tst-dlsym1.c: New file.
3444 * init.c (__pthread_initialize_minimal_internal): Set
3445 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
3446 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
3448 2003-02-24 Ulrich Drepper <drepper@redhat.com>
3450 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
3452 * tst-cond2.c: Fix sychronization with child.
3454 * tst-rwlock8.c (reader_thread): Remove unused variable.
3456 * Makefile: Add rules to build and run tst-tls3.
3457 * tst-tls3.c: New file.
3458 * tst-tls3mod.c: New file.
3460 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
3461 * tst-rwlock8.c: New file.
3462 * tst-rwlock9.c: New file.
3463 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
3464 complete broken rwlock implementation.
3465 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3467 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3469 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3471 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
3472 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
3473 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3474 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
3475 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
3477 2003-02-23 Roland McGrath <roland@redhat.com>
3479 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
3481 2003-02-23 Ulrich Drepper <drepper@redhat.com>
3483 * Makefile (tests): Add tst-context1.
3484 * tst-context1.c: New file.
3486 * Makefile (tests): Add tst-tls1 and tst-tls2.
3487 * tst-tls1.c: New file.
3488 * tst-tls2.c: New file.
3490 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
3493 * pthread_create.c (start_thread): Set EXITING_BIT early.
3495 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
3496 (THREAD_GETMEM_NC): Likewise.
3498 2003-02-22 Ulrich Drepper <drepper@redhat.com>
3500 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
3501 off 3 more bytes by using offset-less instructions when possible.
3503 * Makefile: Add dependency for $(objpfx)version.d.
3505 * eintr.c (eintr_source): Add unnecessary return but the compiler
3508 * tst-kill3.c: Include <unistd.h>.
3510 2003-02-21 Roland McGrath <roland@redhat.com>
3512 * pthread_create.c (start_thread): Call __libc_thread_freeres.
3514 2003-02-21 Ulrich Drepper <drepper@redhat.com>
3516 * Makefile (tests): Add tst-eintr1.
3517 (distribute): Add eintr.c.
3518 * tst-eintr1.c: New file.
3519 * eintr.c: New file.
3521 * pthread_cancel.c (pthread_cancel): Use tkill directly.
3523 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
3524 Disallow sending SIGCANCEL.
3526 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
3527 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
3528 * tst-kill1.c: New file.
3529 * tst-kill2.c: New file.
3530 * tst-kill3.c: New file.
3531 * tst-kill5.c: New file.
3532 * tst-kill6.c: New file.
3533 * tst-basic7.c: Renamed to...
3534 * tst-kill4.c: ...this.
3536 2003-02-21 Roland McGrath <roland@redhat.com>
3538 * Makefile (install-lib-ldscripts): New variable.
3540 2003-02-21 Ulrich Drepper <drepper@redhat.com>
3542 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
3543 * pthread_cancel.c: Use INVALID_TD_P.
3544 * pthread_detach.c: Likewise.
3545 * pthread_getschedparam.c: Likewise.
3546 * pthread_setschedparam.c: Likewise.
3547 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
3548 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3549 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
3550 * pthread_timedjoin.c: Likewise.
3552 * tst-basic7.c: Include <signal.h>.
3554 * pthread_join.c (pthread_join): Limited checking for invalid
3556 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
3558 2003-02-20 Ulrich Drepper <drepper@redhat.com>
3560 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
3561 beginning of the loop. Clear the entire first block of TSD.
3562 * Makefile (tests): Add tst-key4.
3563 * tst-key4.c: New file.
3565 2003-02-18 Ulrich Drepper <drepper@redhat.com>
3567 * Makefile (tests): Add tst-basic7.
3568 * tst-basic7.c: New file.
3570 * pthread_create.c (deallocate_tsd): Mark as internal_function.
3571 Add some more __builtin_expect.
3573 * pthreadP.h: Define dummy version of DEBUGGING_P.
3575 2003-02-17 Ulrich Drepper <drepper@redhat.com>
3577 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
3578 _POSIX_THREAD_PRIORITY_SCHEDULING.
3579 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3580 _XOPEN_REALTIME_THREADS.
3581 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3583 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
3584 kernel returns EINVAL for PID <= 0, work around it.
3586 * Makefile (tests): Add tst-signal5.
3587 * tst-signal5.c: New file.
3589 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
3592 * tst-cancel1.c (tf): Block all signals.
3594 * Makefile (tests): Add tst-basic6.
3595 * tst-basic6.c: New file.
3597 * tst-basic1.c: Add test for process ID.
3599 * Makefile (tests): Add tst-cancel10.
3600 * tst-cancel10.c: New file.
3602 * Makefile (tests): Add tst-signal4.
3603 * tst-signal4.c: New file.
3605 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
3606 __sigismember instead of sigismember. Add __builtin_expect.
3608 2003-02-16 Ulrich Drepper <drepper@redhat.com>
3610 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
3611 pthread_setcancelstate, and pthread_rwlock_setpshared.
3613 * tst-cancel7.c (do_test): Make sure the pid file exists before
3614 canceling the thread.
3616 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
3617 pthread_rwlock_timedrdlock tests.
3618 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
3619 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3620 Check for invalid tv_nsec field.
3621 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3624 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
3625 recursive mutex of overflow.
3627 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
3629 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
3630 going into an endless loop.
3631 * Makefile (tests): Add tst-cancel9.
3632 * tst-cancel9.c: New file.
3634 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
3636 2003-02-15 Ulrich Drepper <drepper@redhat.com>
3638 * tst-mutex5.c (do_test): Add more timedlock tests.
3640 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
3641 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
3643 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3644 use INLINE_SYSCALL. Error number is returned, not -1.
3646 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
3647 and __deallocate_stack with internal_function.
3648 * pthread_create.c: Adjust definitions appropriately.
3649 * allocatestack.c: Likewise.
3651 * pthread_join.c: Add one more __builtin_expect.
3652 * pthread_timedjoin.c: Likewise.
3654 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
3655 not data of sequence number does not match.
3656 Add one __builtin_expect.
3658 * Makefile (tests): Add tst-clock1.
3659 * tst-clock1.c: New file.
3661 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
3663 * Makefile (tests): Add tst-basic5.
3664 * tst-basic5.c: New file.
3666 2003-02-14 Ulrich Drepper <drepper@redhat.com>
3668 * Makefile (tests): Add tst-basic4.
3669 * tst-basic4.c: New file.
3671 * pthreadP.h: Add declaraction for __nptl_nthreads.
3672 * pthread_create.c: Define __nptl_nthreads
3673 (start_thread): Increment __nptl_nthreads at beginning. Decrement
3674 after thread is done. If then zero, call exit(0).
3675 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3676 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
3677 * init.c (pthread_functions): Initialize ptr_nthreads.
3678 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
3679 (__reclaim_stacks): Decrement __nptl_nthreads.
3680 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
3682 * Makefile (tests): Add tst-basic3.
3683 * tst-basic3.c: New file.
3685 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
3686 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
3687 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
3688 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
3689 if asynchronous canceling is enabled.
3690 * pthread_join.c (pthread_join): When recognizing circular joins,
3691 take into account the other thread might be already canceled.
3692 * Makefile (tests): Add tst-join5.
3693 * tst-join5.c: New file.
3695 * Makefile (tests): Add tst-join4.
3696 * tst-join4.c: New file.
3698 2003-02-13 Ulrich Drepper <drepper@redhat.com>
3700 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
3702 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3704 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
3705 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
3706 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
3708 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
3710 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
3711 error if lll_futex_wake failed.
3713 2003-02-13 Ulrich Drepper <drepper@redhat.com>
3715 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
3716 handling of cancellation and failung pthread_mutex_unlock call.
3717 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3718 * Makefile (tests): Add tst-cond8 and tst-cond9.
3719 * tst-cond8.c: New file.
3720 * tst-cond9.c: New file.
3722 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
3724 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
3725 non-standard initializers with __USE_GNU.
3727 * Makefile (tests): Add tst-cleanup3.
3728 * tst-cleanup3.c: New file.
3730 2003-02-12 Ulrich Drepper <drepper@redhat.com>
3732 * Makefile (tests): Add tst-attr1 and tst-attr2.
3733 * tst-attr1.c: New file.
3734 * tst-attr2.c: New file.
3736 * Makefile: Add rules to build and run tst-atfork2 test.
3737 * tst-atfork2.c: New file.
3738 * tst-atfork2mod.c: New file.
3740 * sysdeps/unix/sysv/linux/unregister-atfork.c
3741 (__unregister_atfork): Free the memory allocated for the handlers
3742 after removing them from the lists.
3744 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
3747 * tst-atfork1.c (do_test): Wait for the child we forked.
3748 Report error in child.
3750 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
3752 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
3754 2003-02-10 Ulrich Drepper <drepper@redhat.com>
3756 * Makefile (tests): Add tst-cancel8.
3757 * tst-cancel8.c: New file.
3759 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
3760 clearing of control variable.
3761 * Makefile (tests): Add tst-once3 and tst-once4.
3762 * tst-once3.c: New file.
3763 * tst-once4.c: New file.
3765 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
3767 * sysdeps/sh/Makefile: New file.
3768 * sysdeps/sh/bits/atomic.h: New file.
3769 * sysdeps/sh/pthread_spin_init.c: New file.
3770 * sysdeps/sh/pthread_spin_lock.c: New file.
3771 * sysdeps/sh/pthread_spin_trylock.S: New file.
3772 * sysdeps/sh/pthread_spin_unlock.S: New file.
3773 * sysdeps/sh/pthreaddef.h: New file.
3774 * sysdeps/sh/tcb-offsets.sym: New file.
3775 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
3776 * sysdeps/sh/tls.h: New file.
3777 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
3778 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
3779 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
3780 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
3781 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
3782 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
3783 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
3784 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
3785 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
3786 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
3787 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
3788 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
3789 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3790 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
3791 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
3792 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
3793 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
3794 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
3795 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
3796 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
3797 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
3798 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
3799 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
3800 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
3801 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
3802 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
3803 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
3804 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
3805 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
3806 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
3808 2003-02-08 Ulrich Drepper <drepper@redhat.com>
3810 * tst-cond2.c: Rearrange code to not rely on behavior undefined
3813 * tst-basic2.c (do_test): Lock mutex before creating the thread.
3815 2003-02-07 Ulrich Drepper <drepper@redhat.com>
3817 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
3818 (TLS_GET_FS): New #define.
3819 (TLS_SET_FS): New #define.
3820 Correct value of __NR_set_thread_area.
3822 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
3824 2003-02-06 Ulrich Drepper <drepper@redhat.com>
3826 * Makefile (tests): Add tst-popen1.
3827 * tst-popen1.c: New file.
3829 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
3830 but inactive generalization.
3831 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3832 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
3833 Minor optimization, remove one instruction.
3834 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
3836 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
3838 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
3840 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
3842 * init.c (__NR_set_tid_address): Add #ifdef for s390.
3843 * sysdeps/pthread/pthread_barrier_wait.c: New file.
3844 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
3845 * sysdeps/pthread/pthread_cond_signal.c: New file.
3846 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
3847 * sysdeps/pthread/pthread_cond_wait.c: New file.
3848 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
3849 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
3850 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
3851 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
3852 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
3853 * sysdeps/s390/Makefile: New file.
3854 * sysdeps/s390/bits/atomic.h: New file.
3855 * sysdeps/s390/pthread_spin_init.c: New file.
3856 * sysdeps/s390/pthread_spin_lock.c: New file.
3857 * sysdeps/s390/pthread_spin_trylock.c: New file.
3858 * sysdeps/s390/pthread_spin_unlock.c: New file.
3859 * sysdeps/s390/pthreaddef.h: New file.
3860 * sysdeps/s390/tcb-offsets.sym: New file.
3861 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
3862 * sysdeps/s390/tls.h: New file.
3863 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
3864 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
3865 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
3866 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
3867 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
3868 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
3869 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
3870 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
3871 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
3872 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
3873 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
3874 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
3875 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
3876 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
3877 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
3878 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
3879 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3880 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
3881 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
3882 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
3883 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
3884 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
3885 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
3887 2003-02-04 Ulrich Drepper <drepper@redhat.com>
3889 * atomic.h: Add a couple more default implementations.
3890 (atomic_compare_and_exchange_acq): Use
3891 __arch_compare_and_exchange_32_acq in return value definition. It
3893 (atomic_bit_set): Renamed from atomic_set_bit.
3894 Add missing atomic_ prefixes.
3896 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
3897 thread library is available, use correct value to mark initialized
3900 2003-02-03 Ulrich Drepper <drepper@redhat.com>
3902 * allocatestack.c (allocate_stack): Use __getpagesize instead of
3903 __sysconf to determine pagesize.
3905 * pthread_create.c: Include <atomic.h>.
3906 * allocatestack.c (allocate_stack): Implement coloring of the
3907 allocated stack memory. Rename pagesize to pagesize_m1. It's the
3908 size minus one. Adjust users.
3909 * sysdeps/i386/i686/Makefile: New file.
3911 2003-02-02 Ulrich Drepper <drepper@redhat.com>
3913 * allocatestack.c: Improve comment throughout the file.
3915 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3916 (__lll_lock_wait): Add branch prediction.
3917 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
3918 (__lll_lock_wait): Likewise.
3919 (lll_unlock_wake_cb): Removed.
3921 2003-01-31 Ulrich Drepper <drepper@redhat.com>
3923 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
3924 _POSIX_THREAD_PRIORITY_SCHEDULING.
3926 2003-01-30 Jakub Jelinek <jakub@redhat.com>
3928 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3929 Fix return type of ptr___pthread_getspecific.
3931 2003-01-29 Ulrich Drepper <drepper@redhat.com>
3933 * Makefile (tests): Add tst-umask1.
3934 (tst-umask1-ARGS): Define.
3935 * tst-umask1.c: New file.
3937 2003-01-28 Ulrich Drepper <drepper@redhat.com>
3939 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
3940 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
3941 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
3942 pthread_rwlock_unlock.
3943 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
3944 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
3945 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
3946 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
3947 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3949 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
3950 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3952 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
3953 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
3954 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
3956 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
3957 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
3959 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
3960 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
3961 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
3963 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
3964 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
3966 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
3968 * Makefile (libpthread-routines): Remove lowlevelcond and
3969 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
3970 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
3971 and pthread_cond_broadcast.
3972 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
3973 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
3974 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
3975 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
3976 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
3977 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
3978 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
3979 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
3980 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
3981 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
3982 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
3983 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
3984 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
3985 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
3986 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
3987 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
3988 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
3989 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
3990 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
3991 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
3992 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
3993 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
3994 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
3995 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
3996 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
3997 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
3998 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
3999 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
4000 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
4001 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
4002 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
4004 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
4005 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
4006 of the code is moved to ...
4007 * sysdeps/pthread/createthread.c: ...here. New file.
4009 2003-01-27 Ulrich Drepper <drepper@redhat.com>
4011 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
4012 (__new_sem_post): Clear %eax before returning.
4013 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
4015 * Makefile (tests): Add tst-cleanup2.
4016 * tst-cleanup2.c: New file.
4018 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
4019 Interpret first parameter correctly.
4021 2003-01-17 Ulrich Drepper <drepper@redhat.com>
4023 * Makefile (headers): Add bits/semaphore.h.
4025 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4027 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
4030 2003-01-14 Ulrich Drepper <drepper@redhat.com>
4032 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
4033 must be used and mapping failed.
4034 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
4036 * Makefile (CFLAGS-pthread_self.os): Define this, not
4037 CFLAGS-pthread_self.c.
4039 2003-01-13 Ulrich Drepper <drepper@redhat.com>
4041 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
4044 * Makefile (libpthread-routines): Add version. Add rules to build
4045 version.os and banner.h.
4046 * version.c: New file.
4048 2003-01-13 Jakub Jelinek <jakub@redhat.com>
4050 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
4051 the alias unconditional.
4052 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
4054 2003-01-13 Ulrich Drepper <drepper@redhat.com>
4056 * Makefile (CFLAGS-pthread_self.c): New definition.
4058 2003-01-06 Jakub Jelinek <jakub@redhat.com>
4060 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
4061 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
4062 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
4063 * init.c (__pthread_initialize_minimal_internal): Likewise.
4065 2003-01-07 Jakub Jelinek <jakub@redhat.com>
4067 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
4069 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
4070 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
4071 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
4072 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
4073 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
4074 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
4076 2003-01-06 Jakub Jelinek <jakub@redhat.com>
4078 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
4079 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
4080 * tst-cancel-wrappers.sh: Remove all exceptions.
4082 2003-01-05 Ulrich Drepper <drepper@redhat.com>
4084 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
4085 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
4087 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
4088 Use __libc_pthread_functions array if SHARED.
4090 * pthreadP.h: Move pthread_cond_2_0_t definition to...
4091 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
4093 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
4094 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
4095 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
4096 __libc_ptf_call instead of __libc_maybe_call.
4098 (__libc_cleanup_region_start): Wrap function name with PTF call.
4099 (__libc_cleanup_region_end): Likewise.
4100 (__libc_cleanup_end): Likewise.
4102 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
4103 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
4104 * pthread_key_create.c: Add __pthread_key_create_internal alias.
4105 * pthreadP.h: Add prototypes.
4107 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
4108 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
4109 __pthread_rwlock_unlock aliases.
4110 * pthreadP.h: Add prototypes for new aliases.
4112 * pthreadP.h (struct pthead_functions): Moved to...
4113 * sysdeps/pthread/pthread-functions.h: ...here. New file.
4114 * init.c (pthread_functions): Add initializers for new elements.
4116 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
4117 __pthread_cleanup_pop_restore aliases.
4118 * pthreadP.h: Add prototypes.
4120 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
4121 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
4122 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
4123 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4124 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4125 * pthreadP.h: Adjust prototypes and callers.
4127 2003-01-04 Ulrich Drepper <drepper@redhat.com>
4129 * Makefile (tests): Add tst-cancel7.
4130 (tst-cancel7-ARGS): New variable.
4131 * tst-cancel7.c: New file.
4133 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
4134 around gcc defficiencies.
4135 * old_pthread_cond_signal.c: Likewise.
4136 * old_pthread_cond_timedwait.c: Likewise.
4137 * old_pthread_cond_wait.c: Likewise.
4139 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
4141 2003-01-03 Ulrich Drepper <drepper@redhat.com>
4143 * Makefile (tests): Add tst-cond7.
4144 * tst-cond7.c: New file.
4146 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
4147 (condvar_cleanup): Get condvar address from the right place.
4149 * atomic.h: Correct definitions of atomic_full_barrier,
4150 atomic_read_barrier, atomic_write_barrier.
4152 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
4154 * old_pthread_cond_signal.c: Likewise.
4155 * old_pthread_cond_timedwait.c: Likewise.
4156 * old_pthread_cond_wait.c: Likewise.
4158 2003-01-03 Jakub Jelinek <jakub@redhat.com>
4160 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
4162 2003-01-03 Ulrich Drepper <drepper@redhat.com>
4164 * pthreadP.h (pthread_cond_2_0_t): New type.
4165 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
4166 Use new type for the 2.0 condvar function prototypes.
4167 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
4168 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
4170 * old_pthread_cond_destroy.c: Likewise.
4171 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
4172 * old_pthread_cond_signal.c: Likewise.
4173 * old_pthread_cond_timedwait.c: Likewise.
4174 * old_pthread_cond_wait.c: Likewise.
4176 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
4177 (__pthread_cond_wait): Don't save cancellation mode and seq value
4180 * herrno.c (__h_errno_location): Don't define as weak.
4182 2003-01-02 Jakub Jelinek <jakub@redhat.com>
4184 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
4185 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
4186 and pthread_cond_wait.
4187 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
4189 (__pthread_cond_broadcast_2_0): ... this.
4190 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
4192 (__pthread_cond_destroy_2_0): ... this.
4193 * old_pthread_cond_init.c (__old_pthread_cond_init):
4195 (__pthread_cond_init_2_0): ... this.
4196 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
4198 (__pthread_cond_signal_2_0): ... this.
4199 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
4201 (__pthread_cond_wait_2_0): ... this.
4202 * pthread_cond_destroy.c: Include shlib-compat.h.
4203 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
4204 * pthread_cond_init.c: Include shlib-compat.h.
4205 (pthread_cond_init): Change strong_alias into versioned_symbol.
4206 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
4207 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
4209 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
4210 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
4211 __pthread_cond_wait_2_0): New prototypes.
4212 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
4213 __old_pthread_cond_init, __old_pthread_cond_signal,
4214 __old_pthread_cond_wait): Removed.
4215 * init.c: Include shlib-compat.h.
4216 (pthread_functions): Guard ptr___pthread_attr_init_2_0
4217 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
4218 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
4219 ptr___pthread_cond_*_2_0 fields.
4220 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
4221 pthread_cond_*@GLIBC_2.0 compatibility symbols.
4223 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
4224 LIBC_SIGACTION was not yet defined.
4225 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
4226 [!defined LIBC_SIGACTION] (__sigaction): New function and
4228 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
4229 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
4231 2003-01-02 Jakub Jelinek <jakub@redhat.com>
4233 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
4235 2003-01-02 Ulrich Drepper <drepper@redhat.com>
4237 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4238 New, larger type definition.
4239 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
4241 * Versions [libpthread]: Add definitions for new pthread_cond_*
4242 interfaces for version GLIBC_2.3.2.
4243 * pthread_cond_init.c: Update initialization for new type definition.
4244 * Makefile (libpthread-routines): Remove pthread_cond_wait,
4245 pthread_cond_timedwait, pthread_cond_signal, and
4246 pthread_cond_broadcast. Add old_pthread_cond_init,
4247 old_pthread_cond_destroy, old_pthread_cond_wait,
4248 old_pthread_cond_timedwait, old_pthread_cond_signal, and
4249 old_pthread_cond_broadcast.
4250 * old_pthread_cond_broadcast.c: New file.
4251 * old_pthread_cond_destroy.c: New file.
4252 * old_pthread_cond_init.c: New file.
4253 * old_pthread_cond_signal.c: New file.
4254 * old_pthread_cond_timedwait.c: New file.
4255 * old_pthread_cond_wait.c: New file.
4256 * pthreadP.h: Add prototypes for the compatibility interfaces.
4258 * pthread_cond_destroy.c: Don't include <errno.h>.
4260 2003-01-01 Ulrich Drepper <drepper@redhat.com>
4262 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
4263 unnecessary zero offset when addressing MUTEX.
4265 2002-12-31 Ulrich Drepper <drepper@redhat.com>
4267 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
4269 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
4270 for __register_atfork.
4272 2002-12-31 Jakub Jelinek <jakub@redhat.com>
4274 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
4275 instead of ASSEMBLER test macro.
4277 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
4278 __libc_current_sigrtmax): Add libc_hidden_def.
4280 * sysdeps/pthread/list.h: Remove assert.h include.
4282 2002-12-31 Ulrich Drepper <drepper@redhat.com>
4284 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
4285 __pthread_initialize_minimal_internal not
4286 __pthread_initialize_minimal.
4288 2002-12-30 Ulrich Drepper <drepper@redhat.com>
4290 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
4291 __pthread_initialize_minimal as hidden.
4293 * init.c (__pthread_initialize_minimal_internal): Don't mark as
4296 2002-12-31 Jakub Jelinek <jakub@redhat.com>
4298 * Makefile ($(inst_libdir)/libpthread.so): Depend on
4299 $(common-objpfx)format.lds, include that into the output script.
4301 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
4303 2002-12-28 Andreas Jaeger <aj@suse.de>
4305 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
4306 nsec resolution changes.
4307 (xstat64_conv): Likewise.
4308 (xstat32_conv): Likewise.
4309 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
4311 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
4312 structs stat and stat64.
4313 * time/time.h (__timespec_defined): Define for __USE_MISC.
4314 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
4316 2002-12-30 Jakub Jelinek <jakub@redhat.com>
4318 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
4320 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
4321 (pthread_exit): Use strong_alias to avoid warnings.
4322 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
4323 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
4324 ptr___pthread_attr_init_2_*.
4325 * init.c (pthread_functions): Adjust.
4327 2002-12-29 Ulrich Drepper <drepper@redhat.com>
4329 * forward.c: Make all functions available by default again. It
4330 caused too much trouble.
4332 * pt-siglongjmp.c: Removed.
4334 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4336 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
4337 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
4338 * sysdeps/i386/Makefile: New file.
4339 * sysdeps/i386/tcb-offsets.sym: New file.
4340 * sysdeps/pthread/tcb-offsets.h: New file.
4341 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4342 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
4344 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
4345 __register_atfork...
4346 (GLIBC_2.3.2): ...here.
4348 2002-12-28 Ulrich Drepper <drepper@redhat.com>
4350 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
4351 pthread_attr_setstackaddr with __attribute_deprecated__.
4353 2002-12-27 Jakub Jelinek <jakub@redhat.com>
4355 * pt-system.c (system): Remove cancellation handling.
4356 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
4357 cancellation routines.
4359 2002-12-28 Ulrich Drepper <drepper@redhat.com>
4361 * descr.h: Include <dl-sysdep.h>.
4362 (struct pthread): Move header.data.list to the back of the struct.
4363 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
4364 (MULTIPLE_THREADS_OFFSET): Adjust offset.
4365 (SYSINFO_OFFSEET): Likewise.
4367 2002-12-27 Jakub Jelinek <jakub@redhat.com>
4369 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
4371 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
4372 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
4373 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
4374 (USE_DL_SYSINFO): Undef.
4376 2002-12-22 Jakub Jelinek <jakub@redhat.com>
4378 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
4379 $(common-objpfx)libc.so.
4380 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
4381 it is bigger than pipe buffer size even on arches with bigger
4383 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
4385 2002-12-25 Ulrich Drepper <drepper@redhat.com>
4387 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
4388 correct errno access for case that USE___THREAD is not defined.
4390 2002-12-24 Ulrich Drepper <drepper@redhat.com>
4392 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
4393 Patch by Marijn Ros <marijn@mad.scientist.com>.
4395 2002-12-22 Roland McGrath <roland@redhat.com>
4397 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
4399 2002-12-20 Ulrich Drepper <drepper@redhat.com>
4401 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
4403 2002-12-19 Ulrich Drepper <drepper@redhat.com>
4405 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
4406 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
4407 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
4409 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
4411 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4412 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
4413 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
4414 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4415 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
4416 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
4417 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
4418 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4420 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
4422 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
4424 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
4426 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
4428 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
4429 that sysinfo is properly initialized.
4430 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
4431 to 1 only for ld.so.
4433 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
4434 RTLD_CORRECT_DYNAMIC_WEAK.
4436 2002-12-19 Jakub Jelinek <jakub@redhat.com>
4438 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
4439 Use return 0 as 6th argument to FORWARD4.
4440 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
4442 2002-12-18 Ulrich Drepper <drepper@redhat.com>
4444 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
4445 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
4446 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
4447 (INIT_SYSINFO): New #define.
4448 (TLS_TP_INIT): Use INIT_SYSINFO.
4449 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4450 At test to make sure SYSINFO_OFFSET value is correct.
4451 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
4453 2002-12-18 Jakub Jelinek <jakub@redhat.com>
4455 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
4456 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
4457 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
4458 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
4459 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
4460 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
4461 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
4463 2002-12-18 Ulrich Drepper <drepper@redhat.com>
4465 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
4466 macro instead of using int $0x80 directly.
4468 * sysdeps/pthread/bits/stdio-lock.h: New file.
4469 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
4470 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
4471 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
4472 * Makefile (routines): Add libc-lowlevelmutex.
4474 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
4475 __i686.get_pc_thunk.dx.
4477 2002-12-17 Jakub Jelinek <jakub@redhat.com>
4479 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
4480 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
4481 ($(objpfx)tst-cancel-wrappers.out): New rule.
4482 * tst-cancel-wrappers.sh: New test.
4483 * tst-locale1.c: Include signal.h.
4484 (uselocale): Test static linking of __libc_current_sigrt*.
4486 2002-12-17 Ulrich Drepper <drepper@redhat.com>
4488 * Makefile (tests): Add tst-cancel6.
4489 * tst-cancel6.c: New file
4491 2002-12-17 Jakub Jelinek <jakub@redhat.com>
4493 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4494 Define meaningfully for assembler as well.
4495 * pthreadP.h (struct pthread_functions): Remove
4496 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
4497 and ptr_pthread_attr_init_2_1 fields.
4498 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
4499 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
4500 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
4501 (FORWARD3): Define using FORWARD4.
4502 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
4504 * pt-system.c: Remove duplicate stdlib.h include.
4506 2002-12-16 Ulrich Drepper <drepper@redhat.com>
4508 * sem_init.c: Define sem_init@GLIBC_2.0.
4509 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
4510 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
4512 * flockfile.c: Moved to...
4513 * sysdeps/pthread/flockfile.c: ...here. New file.
4514 * funlockfile.c: Moved to...
4515 * sysdeps/pthread/funlockfile.c: ...here. New file.
4516 * ftrylockfile.c: Moved to...
4517 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
4519 2002-12-16 Jakub Jelinek <jakub@redhat.com>
4521 * libc-cancellation.c: Guard both function with
4522 #if !defined NOT_IN_libc.
4523 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
4524 automatically provided pthread wrappers.
4525 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
4526 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
4528 * pt-open.c: Removed.
4529 * pt-fcntl.c: Removed.
4530 * pt-fsync.c: Removed.
4531 * pt-lseek.c: Removed.
4532 * pt-msgrcv.c: Removed.
4533 * pt-msgsnd.c: Removed.
4534 * pt-msync.c: Removed.
4535 * pt-nanosleep.c: Removed.
4536 * pt-open64.c: Removed.
4537 * pt-pause.c: Removed.
4538 * pt-pread.c: Removed.
4539 * pt-pread64.c: Removed.
4540 * pt-pwrite.c: Removed.
4541 * pt-pwrite64.c: Removed.
4542 * pt-read.c: Removed.
4543 * pt-recv.c: Removed.
4544 * pt-recvfrom.c: Removed.
4545 * pt-recvmsg.c: Removed.
4546 * pt-send.c: Removed.
4547 * pt-sendto.c: Removed.
4548 * pt-sigtimedwait.c: Removed.
4549 * pt-sigwait.c: Removed.
4550 * pt-wait.c: Removed.
4551 * pt-waitpid.c: Removed.
4552 * pt-write.c: Removed.
4553 * pt-accept.c: Removed.
4554 * pt-close.c: Removed.
4555 * pt-connect.c: Removed.
4556 * pt-lseek64.c: Removed.
4557 * pt-sendmsg.c: Removed.
4558 * pt-tcdrain.c: Removed.
4560 2002-12-15 Ulrich Drepper <drepper@redhat.com>
4562 * init.c (__pthread_initialize_minimal_internal): Renamed from
4563 __pthread_initialize_minimal. Make old name an alias. This
4564 converts a normal relocation into a relative relocation.
4566 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
4568 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
4569 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
4570 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
4571 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
4572 pt-sigwaitinfo, pt-waitid, and pt-writev.
4573 * pt-creat.c: Removed.
4574 * pt-poll.c: Removed.
4575 * pt-pselect.c: Removed.
4576 * pt-readv.c: Removed.
4577 * pt-select.c: Removed.
4578 * pt-sigpause.c: Removed.
4579 * pt-sigsuspend.c: Removed.
4580 * pt-sigwaitinfo.c: Removed.
4581 * pt-waitid.c: Removed.
4582 * pt-writev.c: Removed.
4584 * init.c (pthread_functions): New variable.
4585 (__pthread_initialize_minimal): Pass pointer to pthread_functions
4586 (or NULL) to __libc_pthread_init.
4587 * forward.c: Rewrite to use __libc:pthread_functions array to get
4589 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
4591 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4592 Take new parameter. Copy content of variable pointed to by it
4593 to __libc_pthread_init.
4595 * pthreadP.h (struct pthread_functions): New type.
4596 (__libc_pthread_init): Declare.
4598 * pthread_attr_destroy.c: Add namespace protected alias.
4599 * pthread_attr_getdetachstate.c: Likewise.
4600 * pthread_attr_getinheritsched.c: Likewise.
4601 * pthread_attr_getschedparam.c: Likewise.
4602 * pthread_attr_getschedpolicy.c: Likewise.
4603 * pthread_attr_getscope.c: Likewise.
4604 * pthread_attr_setdetachstate.c: Likewise.
4605 * pthread_attr_setinheritsched.c: Likewise.
4606 * pthread_attr_setschedparam.c: Likewise.
4607 * pthread_attr_setschedpolicy.c: Likewise.
4608 * pthread_attr_setscope.c: Likewise.
4609 * pthread_cond_broadcast.c: Likewise.
4610 * pthread_cond_destroy.c: Likewise.
4611 * pthread_cond_init.c: Likewise.
4612 * pthread_cond_signal.c: Likewise.
4613 * pthread_cond_wait.c: Likewise.
4614 * pthread_condattr_destroy.c: Likewise.
4615 * pthread_condattr_init.c: Likewise.
4616 * pthread_equal.c: Likewise.
4617 * pthread_exit.c: Likewise.
4618 * pthread_getschedparam.c: Likewise.
4619 * pthread_self.c: Likewise.
4620 * pthread_setcancelstate.c: Likewise.
4621 * pthread_setschedparam.c: Likewise.
4622 * pthread_mutex_destroy.c: Likewise.
4623 * pthread_mutex_init.c: Likewise.
4624 * pthreadP.h: Add prototypes for the aliases.
4626 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
4627 multiple_threads member in correct TCB to 1.
4629 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
4630 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
4631 member of thread decriptor, otherwise return unconditionally 1.
4633 2002-12-14 Ulrich Drepper <drepper@redhat.com>
4635 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
4636 regular Linux version. Remove file.
4637 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
4638 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
4639 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
4640 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
4641 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
4642 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
4643 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
4644 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
4645 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
4646 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
4647 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
4648 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
4649 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
4650 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
4651 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
4652 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
4653 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
4654 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
4655 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
4656 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
4657 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
4658 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
4659 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
4660 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
4661 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
4662 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
4663 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
4664 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
4665 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
4666 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
4668 2002-12-14 Jakub Jelinek <jakub@redhat.com>
4670 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
4671 * sysdeps/unix/sysv/linux/open.c: Removed.
4672 * sysdeps/unix/sysv/linux/fsync.c: Removed.
4673 * sysdeps/unix/sysv/linux/lseek.c: Removed.
4674 * sysdeps/unix/sysv/linux/msync.c: Removed.
4675 * sysdeps/unix/sysv/linux/read.c: Removed.
4676 * sysdeps/unix/sysv/linux/close.c: Removed.
4677 * sysdeps/unix/sysv/linux/creat.c: Removed.
4678 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
4679 * sysdeps/unix/sysv/linux/pause.c: Removed.
4680 * sysdeps/unix/sysv/linux/select.c: Removed.
4681 * sysdeps/unix/sysv/linux/write.c: Removed.
4683 2002-12-14 Ulrich Drepper <drepper@redhat.com>
4685 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
4686 element in TCB to see whether locking is needed.
4688 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
4689 MULTIPLE_THREADS_OFFSET value is correct.
4691 * sysdeps/unix/sysv/linux/close.c: New file.
4692 * sysdeps/unix/sysv/linux/connect.S: New file.
4693 * sysdeps/unix/sysv/linux/creat.c: New file.
4694 * sysdeps/unix/sysv/linux/fsync.c: New file.
4695 * sysdeps/unix/sysv/linux/llseek.c: New file.
4696 * sysdeps/unix/sysv/linux/lseek.c: New file.
4697 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
4698 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
4699 * sysdeps/unix/sysv/linux/msync.c: New file.
4700 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
4701 * sysdeps/unix/sysv/linux/open.c: New file.
4702 * sysdeps/unix/sysv/linux/open64.c: New file.
4703 * sysdeps/unix/sysv/linux/pause.c: New file.
4704 * sysdeps/unix/sysv/linux/poll.c: New file.
4705 * sysdeps/unix/sysv/linux/pread.c: New file.
4706 * sysdeps/unix/sysv/linux/pread64.c: New file.
4707 * sysdeps/unix/sysv/linux/pselect.c: New file.
4708 * sysdeps/unix/sysv/linux/pwrite.c: New file.
4709 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
4710 * sysdeps/unix/sysv/linux/readv.c: New file.
4711 * sysdeps/unix/sysv/linux/recv.S: New file.
4712 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
4713 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
4714 * sysdeps/unix/sysv/linux/select.c: New file.
4715 * sysdeps/unix/sysv/linux/send.S: New file.
4716 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
4717 * sysdeps/unix/sysv/linux/sendto.S: New file.
4718 * sysdeps/unix/sysv/linux/sigpause.c: New file.
4719 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
4720 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
4721 * sysdeps/unix/sysv/linux/sigwait.c: New file.
4722 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
4723 * sysdeps/unix/sysv/linux/system.c: New file.
4724 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
4725 * sysdeps/unix/sysv/linux/wait.c: New file.
4726 * sysdeps/unix/sysv/linux/waitid.c: New file.
4727 * sysdeps/unix/sysv/linux/waitpid.c: New file.
4728 * sysdeps/unix/sysv/linux/writev.c: New file.
4729 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
4731 * pt-readv.c: Fix comment.
4733 2002-12-14 Jakub Jelinek <jakub@redhat.com>
4735 * tst-cleanup1.c: Include stdlib.h.
4737 * tst-cancel5.c: New test.
4738 * Makefile (tests): Add tst-cancel5.
4739 (tst-cancel5): Link against libc.so libpthread.so in that order.
4741 2002-12-13 Ulrich Drepper <drepper@redhat.com>
4743 * forward.c (test_loaded): Prevent recursive calls.
4745 * Makefile (routines): Add libc-cancellation.
4746 * libc-cancellation.c: New file.
4747 * descr.h (struct pthread): Add multiple_threads field.
4748 * allocatestack.c (allocate_stack): Initialize multiple_header field of
4749 new thread descriptor to 1.
4750 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
4751 Initialize multiple_thread field after successful thread creation.
4752 * cancellation.c (__do_cancel): Move to pthreadP.h.
4753 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
4754 (__pthread_disable_asynccancel): Add internal_function attribute.
4755 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
4756 * pthread_setcancelstate.c: Likewise.
4757 * pthread_setcanceltype.c: Likewise.
4758 * pthread_exit.c: Likewise.
4759 * pthreadP.h (CANCELLATION_P): Likewise.
4760 (__do_cancel): Define as static inline.
4761 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
4762 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
4764 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
4765 fields. Define MULTIPLE_THREADS_OFFSET.
4766 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
4768 * sysdeps/unix/sysv/linux/accept.S: New file.
4769 * sysdeps/unix/sysv/linux/read.c: New file.
4770 * sysdeps/unix/sysv/linux/write.c: New file.
4771 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
4772 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
4773 initialization of __libc_locking_needed.
4774 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
4775 __libc_locking_needed, use multiple_threads field in TCB.
4776 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4778 2002-12-12 Ulrich Drepper <drepper@redhat.com>
4780 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
4782 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
4784 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
4785 access to __libc_locking_needed for PIC.
4787 2002-12-12 Jakub Jelinek <jakub@redhat.com>
4789 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
4790 declare for libc.so.
4791 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
4793 (__libc_lock_lock): Put into statement expression.
4794 (__libc_lock_unlock): Remove trailing semicolon.
4795 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
4797 2002-12-12 Roland McGrath <roland@redhat.com>
4799 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
4800 "m" constraint to refer to __libc_locking_needed. Declare it here.
4802 2002-12-12 Ulrich Drepper <drepper@redhat.com>
4804 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
4805 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
4806 Initialize __libc_locking_needed.
4807 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
4808 instead of __register_pthread_fork_handler.
4809 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
4810 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
4811 fork-gen with libc_pthread_init.
4812 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
4813 of __register_pthread_fork_handler.
4814 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
4815 of __register_pthread_fork_handler.
4816 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
4817 __libc_locking_needed to determine whether lock prefix can be avoided.
4818 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4820 2002-12-11 Ulrich Drepper <drepper@redhat.com>
4822 * Makefile (tests): Add tst-cleanup1.
4823 * tst-cleanup1.c: New file.
4824 * cancellation.c (__cleanup_thread): Removed.
4825 (__do_cancel): Remove call to __cleanup_thread.
4826 * pthreadP.h: Remove __cleanup_thread prorotype.
4828 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
4829 Remember function and argument even if cancellation handler
4830 function is not available.
4831 (__libc_cleanup_region_end): Execute registered function directly if
4832 pthread functions are not available.
4833 (__libc_cleanup_end): Likewise.
4835 * init.c (__pthread_initialize_minimal): Fix initialization in
4836 static lib by preventing gcc from being too clever.
4838 2002-12-10 Ulrich Drepper <drepper@redhat.com>
4840 * init.c (__pthread_initialize_minimal): Remove unneccesary
4843 * Makefile (tests): We can run tst-locale2 now.
4845 2002-12-09 Ulrich Drepper <drepper@redhat.com>
4847 * Versions: Remove duplicated sigwait entry.
4849 2002-12-08 Ulrich Drepper <drepper@redhat.com>
4851 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
4854 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
4856 * pthreadP.h: Declare __pthread_enable_asynccancel and
4857 __pthread_disable_asynccancel.
4858 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
4859 (CANCEL_RESET): Use __pthread_disable_asynccancel.
4860 * cancellation.c (__pthread_enable_asynccancel): New function.
4861 (__pthread_disable_asynccancel): New function.
4862 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
4863 * pt-close.c: Likewise.
4864 * pt-connect.c: Likewise.
4865 * pt-creat.c: Likewise.
4866 * pt-fcntl.c: Likewise.
4867 * pt-fsync.c: Likewise.
4868 * pt-lseek.c: Likewise.
4869 * pt-lseek64.c: Likewise.
4870 * pt-msgrcv.c: Likewise.
4871 * pt-msgsnd.c: Likewise.
4872 * pt-msync.c: Likewise.
4873 * pt-nanosleep.c: Likewise.
4874 * pt-open.c: Likewise.
4875 * pt-open64.c: Likewise.
4876 * pt-pause.c: Likewise.
4877 * pt-poll.c: Likewise.
4878 * pt-pread.c: Likewise.
4879 * pt-pread64.c: Likewise.
4880 * pt-pselect.c: Likewise.
4881 * pt-pwrite.c: Likewise.
4882 * pt-pwrite64.c: Likewise.
4883 * pt-read.c: Likewise.
4884 * pt-readv.c: Likewise.
4885 * pt-recv.c: Likewise.
4886 * pt-recvfrom.c: Likewise.
4887 * pt-recvmsg.c: Likewise.
4888 * pt-select.c: Likewise.
4889 * pt-send.c: Likewise.
4890 * pt-sendmsg.c: Likewise.
4891 * pt-sendto.c: Likewise.
4892 * pt-sigpause.c: Likewise.
4893 * pt-sigsuspend.c: Likewise.
4894 * pt-sigtimedwait.c: Likewise.
4895 * pt-sigwait.c: Likewise.
4896 * pt-sigwaitinfo.c: Likewise.
4897 * pt-system.c: Likewise.
4898 * pt-tcdrain.c: Likewise.
4899 * pt-wait.c: Likewise.
4900 * pt-waitid.c: Likewise.
4901 * pt-waitpid.c: Likewise.
4902 * pt-write.c: Likewise.
4903 * pt-writev.c: Likewise.
4904 * pthread_join.c: Likewise.
4905 * pthread_timedjoin.c: Likewise.
4907 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
4908 (__xpg_sigpause): New function.
4909 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
4911 2002-12-07 Ulrich Drepper <drepper@redhat.com>
4913 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
4915 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
4916 _GI_pthread_cleanup_pop to pthreadP.h.
4918 * ftrylockfile.c: Use _IO_lock_trylock instead of
4919 pthread_mutex_trylock.
4921 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
4922 (CANCEL_RESET): Likewise.
4923 (__pthread_setcanceltype_): Declare.
4924 (__pthread_mutex_lock_internal): Declare.
4925 (__pthread_mutex_unlock_internal): Declare.
4926 (__pthread_once_internal): Declare.
4927 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
4928 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
4930 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
4931 and pthread_mutex_unlock.
4932 * pthread_cond_wait.c: Likewise.
4933 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
4934 * pthread_mutex_unlock.c: Likewise.
4936 * pthread_setcanceltype.c: Add additional alias
4937 __pthread_setcanceltype.
4939 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
4940 * sem_open.c (sem_open): Likewise.
4941 Use __libc_open, __libc_write, and __libc_close instead of
4942 open, write, and close respectively.
4944 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
4945 Rewrite as statement expression since it must return a value.
4947 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
4948 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
4951 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
4952 alias __pthread_once_internal.
4954 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
4956 2002-12-06 Ulrich Drepper <drepper@redhat.com>
4958 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
4959 * tst-stdio1.c: New file.
4960 * tst-stdio2.c: New file.
4962 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
4964 * Makefile (tests): Comment out tst-locale2 for now.
4965 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
4967 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
4969 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
4970 Use _IO_lock_init instead of explicit assignment.
4972 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
4973 Define __libc_lock_* and __libc_lock_recursive macros with
4974 lowlevellock macros, not pthread mutexes.
4976 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
4977 of pthread_mutex_lock.
4978 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
4979 instead of pthread_mutex_unlock.
4981 2002-12-06 Roland McGrath <roland@redhat.com>
4983 * allocatestack.c (__stack_user): Use uninitialized defn.
4984 * init.c (__pthread_initialize_minimal): Initialize it here.
4986 2002-12-05 Roland McGrath <roland@redhat.com>
4988 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
4990 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
4992 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
4995 2002-12-05 Ulrich Drepper <drepper@redhat.com>
4997 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
4999 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
5000 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
5001 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
5002 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
5003 for __libc_lock_* macros.
5004 * Makefile (routines): Add libc-lowlevellock.
5006 2002-10-09 Roland McGrath <roland@redhat.com>
5008 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
5009 Under [__PIC__], call the function via the pointer fetched for
5010 comparison rather than a call by name that uses the PLT.
5011 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
5012 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
5013 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
5014 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
5015 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
5017 2002-12-04 Roland McGrath <roland@redhat.com>
5019 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
5021 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
5022 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
5024 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
5026 2002-12-04 Ulrich Drepper <drepper@redhat.com>
5028 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
5029 a completely opaque, non-integer type.
5030 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5032 2002-12-05 Jakub Jelinek <jakub@redhat.com>
5034 * sysdeps/i386/tls.h: Include stdlib.h.
5035 * sysdeps/x86_64/tls.h: Likewise.
5037 2002-12-04 Ulrich Drepper <drepper@redhat.com>
5039 * Makefile (tests): Add tst-locale2.
5040 (tests-static): Likewise.
5041 * tst-locale2.c: New file.
5043 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
5044 volatile and add memory clobbers to lock operations.
5046 2002-12-03 Ulrich Drepper <drepper@redhat.com>
5048 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
5049 * sysdeps/i386/i486/bits/atomic.h: New file.
5050 * sysdeps/i386/i586/bits/atomic.h: New file.
5051 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
5052 include i486 version.
5053 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
5054 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
5055 Patch by Marijn Ros <marijn@mad.scientist.com>.
5057 * allocatestack.c (get_cached_stack): Don't crash if we first
5058 found a stack with a larger size then needed.
5059 Reported by Hui Huang <hui.huang@sun.com>.
5061 * Makefile (tests): Add tst-sysconf.
5062 * tst-sysconf.c: New file.
5064 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
5065 PTHREAD_THREADS_MAX.
5067 2002-12-02 Roland McGrath <roland@redhat.com>
5069 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
5070 Declare using hidden_proto instead of attribute_hidden, so there are
5071 non-.hidden static symbols for gdb to find.
5072 (__pthread_keys): Likewise.
5073 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
5074 * allocatestack.c (__stack_user): Likewise.
5075 * pthread_create.c (__pthread_keys): Likewise.
5076 (__nptl_threads_events, __nptl_last_event): Make these static instead
5078 * pthread_key_create.c (__pthread_pthread_keys_max,
5079 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
5081 2002-12-02 Ulrich Drepper <drepper@redhat.com>
5083 * Makefile (tests): Add tst-locale1. If buid-static is yes link
5085 * tst-locale1.c: New file.
5087 * pthread_cond_timedwait.c: Include <stdlib.h>.
5089 * Makefile (tests): Add tst-fork2 and tst-fork3.
5090 * tst-fork2.c: New file.
5091 * tst-fork3.c: New file.
5093 2002-11-28 Ulrich Drepper <drepper@redhat.com>
5095 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
5097 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
5098 require it to 200112L.
5100 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
5101 instruction only if HAVE_CMOV is defined.
5102 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
5104 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
5106 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
5108 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
5110 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
5112 2002-11-27 Ulrich Drepper <drepper@redhat.com>
5114 * sysdeps/x86_64/bits/atomic.h: New file.
5116 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
5119 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
5120 possible since gettid cannot fail.
5122 * sysdeps/x86_64/pthreaddef.h: New file.
5124 * sysdeps/i386/pthreaddef.h (gettid): Removed.
5126 * sysdeps/x86_64/pthread_spin_init.c: New file.
5127 * sysdeps/x86_64/pthread_spin_lock.c: New file.
5128 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
5129 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
5131 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
5132 Add missing lock prefix. Minute optimization.
5134 * tst-spin2.c (main): Also check successful trylock call.
5136 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
5137 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
5139 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
5140 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
5142 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
5143 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
5144 value in case of an error. Add support for INTERNAL_SYSCALL.
5146 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
5147 value in case of an error.
5149 * sysdeps/x86_64/tls.h: New file.
5151 2002-11-26 Ulrich Drepper <drepper@redhat.com>
5153 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
5154 takes the array member name and the index as parameters.
5155 (THREAD_SETMEM_NC): Likewise.
5156 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
5157 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
5160 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
5161 to decide which code to use.
5162 (THREAD_SETMEM_NC): Likewise.
5164 * allocatestack.c (queue_stack): Don't remove stack from list here.
5165 Do it in the caller. Correct condition to prematurely terminate
5166 loop to free stacks.
5167 (__deallocate_stack): Remove stack from list here.
5169 2002-11-26 Ulrich Drepper <drepper@redhat.com>
5171 * Makefile (tests): Add tst-stack1.
5172 * tst-stack1.c: New file.
5174 * allocatestack.c (allocate_stack): Initialize the TCB on a user
5177 * pthread_attr_getstack.c: Return bottom of the thread area.
5179 2002-11-25 Ulrich Drepper <drepper@redhat.com>
5181 * Makefile (libpthread-routines): Add pt-allocrtsig and
5182 pthread_kill_other_threads.
5183 * pt-allocrtsig.c: New file.
5184 * pthread_kill_other_threads.c: New file.
5185 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
5186 all three functions.
5187 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
5189 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
5190 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
5191 and __libc_allocate_rtsig_private.
5192 * Versions (libpthread): Export pthread_kill_other_threads_np,
5193 __libc_current_sigrtmin, and __libc_current_sigrtmax.
5195 2002-11-24 Ulrich Drepper <drepper@redhat.com>
5197 * allocatestack.c (allocate_stack): stackaddr in attribute points to
5198 the end of the stack. Adjust computations.
5199 When mprotect call fails dequeue stack and free it.
5200 * pthread_attr_setstack.c: Store top of the stack in stackaddr
5202 * pthread_getattr_np.c: Likewise.
5204 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
5207 2002-11-23 Ulrich Drepper <drepper@redhat.com>
5209 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
5210 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
5212 2002-11-22 Ulrich Drepper <drepper@redhat.com>
5214 * pthread_getspecific.c: Optimize access to first 2nd-level array.
5215 * pthread_setspecific.c: Likewise.
5217 2002-11-21 Ulrich Drepper <drepper@redhat.com>
5219 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
5220 definitions. Get them from the official place.
5221 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
5223 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
5224 Use new CLONE_ flags in clone() calls.
5226 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
5227 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
5229 * Versions: Add pthread_* functions for libc.
5230 * forward.c: New file.
5232 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
5234 * herrno.c: New file.
5237 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
5238 sem_trywait, and sem_timedwait. Add herrno and res.
5239 * sem_init.c: Don't initialize lock and waiters members.
5240 * sem_open.c: Likewise.
5241 * sem_post.c: Removed.
5242 * sem_wait.c: Removed.
5243 * sem_trywait.c: Removed.
5244 * sem_timedwait.c: Removed.
5245 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
5246 Includes full implementations of sem_post, sem_wait, sem_trywait,
5248 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
5249 for new implementation.
5250 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
5253 * tst-sem3.c: Improve error message.
5254 * tst-signal3.c: Likewise.
5256 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
5257 to tell the kernel about the termination futex and to initialize tid
5258 member. Don't initialize main_thread.
5259 * descr.h (struct pthread): Remove main_thread member.
5260 * cancelllation.c (__do_cancel): Remove code handling main thread.
5261 The main thread is not special anymore.
5263 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
5264 size of the stacks to stack_cache_actsize.
5266 * pt-readv.c: Add missing "defined".
5267 * pt-sigwait.c: Likewise.
5268 * pt-writev.c: Likewise.
5270 2002-11-09 Ulrich Drepper <drepper@redhat.com>
5272 * Versions: Export __connect from libpthread.
5273 Patch by Luca Barbieri <ldb@ldb.ods.org>.
5275 * Makefile (libpthread-routines): Add pt-raise.
5276 * sysdeps/unix/sysv/linux/raise.c: New file.
5277 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
5278 * sysdeps/generic/pt-raise.c: New file.
5280 * pthread_cond_init.c: Initialize all data elements of the condvar
5281 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
5283 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
5284 * pthread_create.c: Likewise.
5286 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
5287 * tst-key1.c: New file.
5288 * tst-key2.c: New file.
5289 * tst-key3.c: New file.
5291 * Versions: Export pthread_detach for version GLIBC_2.0.
5292 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
5294 2002-11-08 Ulrich Drepper <drepper@redhat.com>
5296 * pthread_key_create.c: Terminate search after an unused key was found.
5297 Patch by Luca Barbieri <ldb@ldb.ods.org>.
5299 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
5300 Patch by Luca Barbieri <ldb@ldb.ods.org>.
5302 2002-10-10 Ulrich Drepper <drepper@redhat.com>
5304 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
5305 dynamic lookup for errno in PIC.
5307 * allocatestack.c (get_cached_stack): Rearrange code slightly to
5308 release the stack lock as soon as possible.
5309 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
5310 the static TLS block.
5311 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
5313 * cancellation.c: Renamed from cancelation.c.
5314 * Makefile: Adjust accordingly.
5315 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
5316 * cleanup_defer.c: Use CANCELLATION_P.
5317 * pthread_testcancel.c: Likewise.
5318 * descr.h: Fix spelling in comments.
5320 * pthread_getattr_np.c: Likewise.
5321 * pthread_getschedparam.c: Likewise.
5322 * pthread_setschedparam.c: Likewise.
5323 * Versions: Likewise.
5325 * pt-pselect.c: New file.
5326 * Makefile (libpthread-routines): Add pt-pselect.
5327 * Versions: Add pselect.
5329 * tst-cancel4.c: New file.
5330 * Makefile (tests): Add tst-cancel4.
5332 2002-10-09 Ulrich Drepper <drepper@redhat.com>
5334 * pthread_mutex_lock.c: Always record lock ownership.
5335 * pthread_mutex_timedlock.c: Likewise.
5336 * pthread_mutex_trylock.c: Likewise.
5338 * pt-readv.c: New file.
5339 * pt-writev.c: New file.
5340 * pt-creat.c: New file.
5341 * pt-msgrcv.c: New file.
5342 * pt-msgsnd.c: New file.
5343 * pt-poll.c: New file.
5344 * pt-select.c: New file.
5345 * pt-sigpause.c: New file.
5346 * pt-sigsuspend.c: New file.
5347 * pt-sigwait.c: New file.
5348 * pt-sigwaitinfo.c: New file.
5349 * pt-waitid.c: New file.
5350 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
5351 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
5352 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
5353 * Versions: Add all the new functions.
5355 * tst-exit1.c: New file.
5356 * Makefile (tests): Add tst-exit1.
5358 * sem_timedwait.c: Minor optimization for more optimal fastpath.
5360 2002-10-08 Ulrich Drepper <drepper@redhat.com>
5362 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
5364 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
5365 call. pthread_join is an official cancellation point.
5366 * pthread_timedjoin.c: Likewise.
5368 * pthread_cond_wait.c: Revert order in which internal lock are dropped
5369 and the condvar's mutex are retrieved.
5370 * pthread_cond_timedwait.c: Likewise.
5371 Reported by dice@saros.East.Sun.COM.
5373 2002-10-07 Ulrich Drepper <drepper@redhat.com>
5375 * pthreadP.h: Cut out all type definitions and move them...
5376 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
5377 * pthreadP.h: Include <internaltypes.h>.
5379 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
5382 * sem_trywait.c: Shuffle #includes around to get right order.
5383 * sem_timedwait.c: Likewise.
5384 * sem_post.c: Likewise.
5385 * sem_wait.c: Likewise.
5387 * nptl 0.3 released.
5389 * Makefile (tests): Add tst-signal3.
5390 * tst-signal3.c: New file.
5392 2002-10-05 Ulrich Drepper <drepper@redhat.com>
5394 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
5395 the asms modify the sem object.
5396 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
5398 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
5400 * pthreadP.h (struct sem): New type. Actual semaphore type.
5401 * semaphoreP.h: Include pthreadP.h.
5402 * sem_getvalue.c: Adjust to sem_t change.
5403 * sem_init.c: Likewise.
5404 * sem_open.c: Likewise.
5405 * sem_post.c: Likewise.
5406 * sem_timedwait.c: Likewise.
5407 * sem_trywait.c: Likewise.
5408 * sem_wait.c: Likewise.
5410 2002-10-04 Ulrich Drepper <drepper@redhat.com>
5412 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
5413 * tst-basic2.c: New file.
5414 * tst-exec1.c: New file.
5415 * tst-exec2.c: New file.
5416 * tst-exec3.c: New file.
5418 * tst-fork1.c: Remove extra */.
5420 * nptl 0.2 released. The API for IA-32 is complete.