1 2003-01-14 Jakub Jelinek <jakub@redhat.com>
3 * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
5 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
7 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
8 unterminated string literals.
9 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
11 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
13 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
14 (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from
17 (SINGLE_THREAD_P): Save an instruction.
18 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
19 parameter to SINGLE_THREAD_P call.
20 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
23 2003-01-10 Andreas Schwab <schwab@suse.de>
25 * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
27 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
29 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
30 backchain in pseudo_cancel. Minor code improvements.
31 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
34 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
36 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
37 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
39 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
41 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
43 2002-01-09 Richard Henderson <rth@redhat.com>
45 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
46 ret follows pseudo, and thus avoid branch-to-branch in cancel
47 case. Use SYSCALL_ERROR_LABEL.
49 2003-01-11 Philip Blundell <philb@gnu.org>
51 * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
52 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
54 (UNDOARGS_5): Fix ordering of pushes and pops.
55 (SINGLE_THREAD_P_PIC): New.
56 (SINGLE_THREAD_P_INT): New.
57 (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it
59 (PSEUDO): Use SINGLE_THREAD_P_INT.
61 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
63 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
65 2003-01-11 Jakub Jelinek <jakub@redhat.com>
67 * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
68 [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
69 TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
70 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
71 INIT_THREAD_SELF): Define.
72 [HAVE_TLS_SUPPORT]: Include descr.h.
73 (NONTLS_INIT_TP): Point __thread_self at the end of dummy
74 struct _pthread_descr_struct.
75 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
76 THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
78 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
80 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
82 (__pthread_initialize_manager): Rename tcb to mgr.
83 Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
84 _pthread_descr) below tcbp, otherwise to tcbp.
85 * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
86 new_thread to be below _dl_allocate_tls (). Adjust new_thread back
87 before freeing. Fix clone arguments if report_events and USE_TLS.
88 (pthread_free): Adjust th back before freeing.
90 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
92 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
93 * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
94 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
96 2003-01-09 Jakub Jelinek <jakub@redhat.com>
98 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
99 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
100 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
101 [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
102 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
103 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
104 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
105 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
106 * tst-popen.c: New test.
107 * Makefile (tests): Add tst-popen.
109 2003-01-06 Jakub Jelinek <jakub@redhat.com>
111 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
112 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
114 2003-01-06 Jakub Jelinek <jakub@redhat.com>
116 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
117 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
119 2003-01-06 Philip Blundell <philb@gnu.org>
121 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
123 2003-01-06 Jakub Jelinek <jakub@redhat.com>
125 * internals.h (LIBC_CANCEL_HANDLED): Define.
126 * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
127 * signals.c (LIBC_CANCEL_HANDLED): Add.
128 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
129 * tst-cancel-wrappers.sh: Remove all exceptions.
131 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
133 2003-01-05 Andreas Schwab <schwab@suse.de>
135 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
138 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
141 (CDISABLE): Likewise.
143 2003-01-05 Ulrich Drepper <drepper@redhat.com>
145 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
146 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
148 * Makefile (libc.so-no-z-defs): Define to yes.
150 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
152 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
153 (tcbhead_t): Add multiple_threads member.
154 (TLS_INIT_TP_EXPENSIVE): Define.
155 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
156 strings. Remove unused code.
157 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
159 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
161 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
162 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
164 2003-01-04 Jakub Jelinek <jakub@redhat.com>
166 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
167 even if NOT_IN_libc is defined.
169 2003-01-05 Jakub Jelinek <jakub@redhat.com>
171 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
172 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
173 * sysdeps/s390/Makefile: New file.
174 * sysdeps/s390/tcb-offsets.sym: New file.
175 * sysdeps/s390/tls.h: New file.
177 2003-01-03 Richard Henderson <rth@redhat.com>
179 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
181 2003-01-03 Andreas Jaeger <aj@suse.de>
183 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
185 2003-01-03 Jakub Jelinek <jakub@redhat.com>
187 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
189 2003-01-02 Ulrich Drepper <drepper@redhat.com>
191 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
194 2003-01-02 Jakub Jelinek <jakub@redhat.com>
196 * internals.h (struct pthread_functions): Rename
197 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
198 * pthread.c (pthread_functions): Adjust.
199 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
200 pthread_cond_*@GLIBC_2.0 compatibility symbols.
201 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
202 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
203 and pthread_cond_wait.
205 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
207 (pthread_cond_t): Add __align member, shorten __padding.
208 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
209 __padding and __align too.
211 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
213 * sysdeps/pthread/sigaction.c: New file.
214 * sysdeps/unix/sysv/linux/raise.c: New file.
215 * sysdeps/unix/sysv/linux/sigwait.c: New file.
216 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
217 weak_extern with #ifndef SHARED.
218 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
220 * signals.c (__sigaction): Renamed to...
221 (__pthread_sigaction): ... this.
222 (__sigaction): New strong alias, #ifdef SHARED only.
223 (sigaction): Protect with #ifdef SHARED.
224 (sigwait): Renamed to...
225 (__pthread_sigwait): ... this.
226 (sigwait): New strong alias, #ifdef SHARED only.
227 (raise): Renamed to...
228 (__pthread_raise): ... this.
229 (raise): New strong alias, #ifdef SHARED only.
230 * internals.h (__pthread_sigaction, __pthread_sigwait,
231 __pthread_raise): New prototypes.
232 (struct pthread_functions): Add ptr_pthread_sigaction,
233 ptr_pthread_sigwait, ptr_pthread_raise.
234 * pthread.c (pthread_functions): Renamed to...
235 (__pthread_functions): ... this. No longer static, no longer
236 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
237 and ptr_pthread_raise.
238 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
239 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
240 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
241 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
243 * Makefile (tests, tests-static): Add tst-cancel-static.
244 * tst-cancel-static.c: New test.
246 2003-01-02 Jakub Jelinek <jakub@redhat.com>
248 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
250 2003-01-02 Ulrich Drepper <drepper@redhat.com>
252 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
253 * condvar.c: Add symbol versioning. The compatibility versions
254 are the same as the change in the interface does not effect this
256 * Versions [libpthread]: Add definitions for new pthread_cond_*
257 interfaces for version GLIBC_2.3.2.
259 2002-12-31 Ulrich Drepper <drepper@redhat.com>
261 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
263 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
264 for __register_atfork.
266 2002-12-31 Jakub Jelinek <jakub@redhat.com>
268 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
269 ASSEMBLER test macro.
270 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
271 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
272 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
273 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
274 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
275 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
277 * sysdeps/pthread/errno-loc.c (__errno_location): Add
279 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
280 * sysdeps/pthread/res-state.c (__res_state): Likewise.
281 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
282 __libc_current_sigrtmax): Likewise.
283 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
284 __libc_internal_tsd_set, __libc_internal_tsd_address,
285 __libc_alloca_cutoff.
286 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
287 __libc_internal_tsd_set, __libc_internal_tsd_address.
289 * sysdeps/pthread/list.h: Remove assert.h include.
290 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
292 * sysdeps/pthread/list.h: New file.
293 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
294 * sysdeps/unix/sysv/linux/fork.c: New file.
295 * sysdeps/unix/sysv/linux/fork.h: New file.
296 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
297 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
298 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
299 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
300 * sysdeps/unix/sysv/linux/Makefile: New file.
301 * sysdeps/unix/sysv/linux/Versions: New file.
302 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
303 (__pthread_cleanup_upto): ...this. Add targetframe argument,
304 use it instead of currentframe. No longer static.
305 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
306 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
307 (struct pthread_functions): Add ptr_pthread_fork,
308 ptr_pthread_cleanup_upto.
309 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
310 ptr_pthread_cleanup_upto.
311 * ptfork.c: Include fork.h.
312 (struct handler_list, struct handler_list_block): Remove.
313 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
314 pthread_atfork_child): Remove.
315 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
316 (__pthread_fork): New function.
317 (__fork, __vfork): Call __libc_fork.
318 * Makefile (libpthread-routines): Add old_pthread_atfork.
319 (libpthread-nonshared): Add pthread_atfork.
320 (others): Depend on $(objpfx)libpthread_nonshared.a.
321 ($(objpfx)libpthread_nonshared.a): New rule.
322 (install): Depend on $(inst_libdir)/libpthread.so.
323 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
325 (tests): Depend on libpthread_nonshared.a too.
326 * old_pthread_atfork.c: New file.
327 * pthread_atfork.c: New file.
328 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
331 2002-12-30 Jakub Jelinek <jakub@redhat.com>
333 * forward.c: Make all functions available by default again. It
334 caused too much trouble.
335 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
336 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
337 ptr___pthread_attr_init_2_*.
338 * pthread.c (pthread_functions): Adjust.
340 2002-12-28 Jakub Jelinek <jakub@redhat.com>
342 * libc_pthread_init.c (__libc_pthread_init): Remove
343 MULTIPLE_THREADS_OFFSET check.
344 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
345 (SYSINFO_OFFSET): Remove.
346 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
348 * sysdeps/i386/tcb-offsets.sym: New file.
349 * sysdeps/pthread/tcb-offsets.h: New file.
350 * sysdeps/sparc/sparc32/tls.h: Removed.
351 * sysdeps/sparc/sparc64/tls.h: Move...
352 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
353 * sysdeps/sparc/Makefile: New file.
354 * sysdeps/sparc/tcb-offsets.sym: New file.
355 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
356 * sysdeps/ia64/Makefile: New file.
357 * sysdeps/ia64/tcb-offsets.sym: New file.
358 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
359 (MULTIPLE_THREADS_OFFSET): Remove.
360 Replace defined MULTIPLE_THREADS_OFFSET
361 with defined FLOATING_STACKS && USE___THREAD.
362 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
363 (MULTIPLE_THREADS_OFFSET): Remove.
364 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
365 (MULTIPLE_THREADS_OFFSET): Remove.
366 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
367 (MULTIPLE_THREADS_OFFSET): Remove.
368 * pthread.c (__pthread_initialize_manager): Remove
369 MULTIPLE_THREADS_OFFSET cbeck.
371 * tst-cancel-wrappers.sh: Add line continuations.
373 2002-12-27 Jakub Jelinek <jakub@redhat.com>
375 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
376 and bits/libc-lock.h.
377 (__libc_internal_tsd_get, __libc_internal_tsd_set,
378 __libc_internal_tsd_address): Remove.
379 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
380 __pthread_internal_tsd_set): New weak_externs.
381 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
382 using __libc_maybe_call2.
383 (__libc_tsd_key_t): Move to ...
384 * descr.h (__libc_tsd_key_t): ...here.
385 Remove bits/libc-tsd.h include.
386 * sysdeps/pthread/errno-loc.c: New file.
387 * sysdeps/pthread/herrno-loc.c: New file.
388 * sysdeps/pthread/res-state.c: New file.
389 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
390 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
391 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
393 * specific.c (libc_internal_tsd_set): Renamed to...
394 __pthread_internal_tsd_set. Remove static.
395 (libc_internal_tsd_get): Renamed to...
396 __pthread_internal_tsd_get. Remove static.
397 (libc_internal_tsd_address): Renamed to...
398 __pthread_internal_tsd_address. Remove static.
399 (__libc_internal_tsd_set, __libc_internal_tsd_get,
400 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
401 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
403 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
404 __pthread_internal_tsd_address): New prototypes.
405 (struct pthread_functions): Add
406 ptr_pthread_internal_tsd_([sg]et|address) fields.
407 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
408 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
409 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
410 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
411 * alloca_cutoff.c: New file.
413 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
414 * pt-system.c (system): Remove cancellation handling.
415 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
416 cancellation routines.
418 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
419 (tcbhead_t): Add sysinfo field.
420 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
421 (TLS_INIT_TP): Use INIT_SYSINFO.
422 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
423 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
424 (MULTIPLE_THREADS_OFFSET): Adjust.
425 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
426 (MULTIPLE_THREADS_OFFSET): Likewise.
427 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
428 (MULTIPLE_THREADS_OFFSET): Likewise.
429 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
430 (MULTIPLE_THREADS_OFFSET): Likewise.
431 * descr.h: Include stdint.h.
432 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
434 2002-12-22 Jakub Jelinek <jakub@redhat.com>
436 * libc_pthread_init.c: Include stdlib.h.
437 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
438 (TLS_INIT_TP_EXPENSIVE): Define.
439 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
440 __libc_maybe_call2): In _LIBC check SHARED define.
441 * sysdeps/ia64/tls.h: New file.
442 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
443 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
444 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
445 * sysdeps/sparc/sparc32/tls.h: New file.
446 * sysdeps/sparc/sparc64/tls.h: New file.
447 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
448 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
449 * Makefile (tests): Add tst-cancel[1-6].
450 (tests-reverse): Add tst-cancel5.
451 Link libc.so before libpthread.so for tests-reverse.
452 * tst-cancel1.c: New file.
453 * tst-cancel2.c: New file.
454 * tst-cancel3.c: New file.
455 * tst-cancel4.c: New file.
456 * tst-cancel5.c: New file.
457 * tst-cancel6.c: New file.
459 2002-12-27 Andreas Schwab <schwab@suse.de>
461 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
463 2002-12-22 Roland McGrath <roland@redhat.com>
465 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
467 2002-12-21 Ulrich Drepper <drepper@redhat.com>
469 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
470 Reported by Art Hass <ahaas@airmail.net>.
472 2002-12-19 Jakub Jelinek <jakub@redhat.com>
474 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
475 Use return 0 as 6th argument to FORWARD4.
477 2002-12-18 Jakub Jelinek <jakub@redhat.com>
479 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
480 define if __ASSUME_LDT_WORKS > 0.
481 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
482 struct member access if !FLOATING_STACKS.
483 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
485 2002-12-18 Jakub Jelinek <jakub@redhat.com>
487 * internals.h (__pthread_thread_self): New prototype.
488 (struct pthread_functions): Add ptr_pthread_thread_self field.
489 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
490 (__pthread_thread_self): New function.
491 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
492 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
493 use thread_self() directly if not FLOATING_STACKS.
495 2002-12-18 Jakub Jelinek <jakub@redhat.com>
497 * sysdeps/x86_64/pt-machine.h: Guard most of the header
498 with #ifndef __ASSEMBLER__.
499 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
500 pthread_attr_init_2_0 use.
502 2002-12-17 Jakub Jelinek <jakub@redhat.com>
504 * wrapsyscall.c: Removed.
506 * Makefile (distribute): Add tst-cancel-wrappers.sh.
507 (routines): Remove weaks. Add forward,
508 libc_pthread_init, libc-cancellation.
509 (shared-only-routines): Remove weaks. Add forward.
510 (libpthread-routines): Remove wrapsyscall.
511 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
512 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
513 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
514 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
515 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
516 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
517 (libpthread-shared-only-routines): Add pt-allocrtsig.
518 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
519 ($(objpfx)tst-cancel-wrappers.out): New rule.
520 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
522 (__libc_maybe_call): In libpthread.* don't check for existance
524 (__libc_maybe_call2): Define.
525 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
526 __libc_lock_trylock, __libc_lock_unlock): Use it.
527 * sysdeps/pthread/flockfile.c: New file.
528 * sysdeps/pthread/ftrylockfile.c: New file.
529 * sysdeps/pthread/funlockfile.c: New file.
530 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
531 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
532 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
533 * libc-cancellation.c: New file.
534 * forward.c: New file.
535 * libc_pthread_init.c: New file.
536 * pt-system.c: New file.
537 * pthread.c: Remove locale.h.
538 (__pthread_manager_thread): Initialize multiple_threads.
539 (__pthread_multiple_threads): Declare.
540 (pthread_functions): New variable.
541 (__pthread_initialize_minimal): Remove __uselocale call.
542 Call __libc_pthread_init.
543 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
544 initial thread's multiple_threads and __libc_multiple_threads.
545 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
547 (pthread_setschedparam, pthread_getschedparam): Rename to __
548 prefixed variants. Add strong_alias.
549 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
550 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
551 (init_rtsigs): Use __libc_current_sigrtmin_private.
552 (pthread_initialize): Only call init_rtsigs if
553 !__ASSUME_REALTIME_SIGNALS.
554 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
555 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
556 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
557 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
558 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
559 __pthread_attr_getinheritsched, __pthread_attr_setscope,
560 __pthread_attr_getscope, __pthread_cond_init,
561 __pthread_cond_destroy, __pthread_cond_wait,
562 __pthread_cond_signal, __pthread_cond_broadcast,
563 __pthread_condattr_init, __pthread_condattr_destroy,
564 __pthread_equal, __pthread_getschedparam,
565 __pthread_setschedparam, __pthread_setcancelstate,
566 __pthread_setcanceltype, __pthread_enable_asynccancel,
567 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
568 (__pthread_mutex_init, __pthread_mutex_destroy,
569 __pthread_mutex_lock, __pthread_mutex_unlock,
570 __pthread_mutex_trylock): Likewise.
572 (struct pthread_functions): New type.
573 (__libc_pthread_functions): New variable.
574 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
575 * descr.h (struct _pthread_descr_struct): Add
576 p_header.data.multiple_threads field.
577 * manager.c (pthread_handle_create): Initialize multiple_threads.
578 * cancel.c (__pthread_enable_asynccancel,
579 __pthread_disable_asynccancel): New functions.
580 (__pthread_provide_wrappers): Remove.
581 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
582 prefixed variants. Add strong_alias.
583 * condvar.c (pthread_cond_init, pthread_cond_destroy,
584 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
585 pthread_condattr_init, pthread_condattr_destroy): Likewise.
586 * join.c (pthread_exit): Likewise.
587 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
588 pthread_attr_getdetachstate, pthread_attr_setschedparam,
589 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
590 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
591 pthread_attr_getinheritsched, pthread_attr_setscope,
592 pthread_attr_getscope): Likewise.
593 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
594 __pthread_mutex_lock, __pthread_mutex_unlock,
595 __pthread_mutex_trylock): Add hidden_def.
596 * Versions (libc): Add __libc_pthread_init,
597 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
598 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
599 * lockfile.c: Remove some USE_IN_LIBIO guards.
600 (__pthread_provide_lockfile): Remove.
601 * pt-allocrtsig.c: New file.
602 * tst-cancel-wrappers.sh: New test.
604 2002-12-15 Ulrich Drepper <drepper@redhat.com>
606 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
607 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
608 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
609 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
611 2002-12-10 Ulrich Drepper <drepper@redhat.com>
613 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
614 weak. There is no reason for that.
615 (CANCELABLE_SYSCALL_VA): Likewise.
617 2002-12-09 Ulrich Drepper <drepper@redhat.com>
619 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
620 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
621 * Versions: Export creat, poll, pselect, readv, select, sigpause,
622 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
623 libpthread in version GLIBC_2.3.2.
625 2002-12-06 Ulrich Drepper <drepper@redhat.com>
627 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
629 2002-12-05 Roland McGrath <roland@redhat.com>
631 * pthread.c (__pthread_initialize_minimal)
632 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
633 TCB if the dynamic linker didn't do it at startup.
635 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
637 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
639 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
640 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
642 2002-12-03 Roland McGrath <roland@redhat.com>
644 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
645 from dynamic linker internal cell to new libc cell.
647 2002-11-28 Roland McGrath <roland@redhat.com>
649 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
650 before other headers, so FLOATING_STACKS is not defined wrongly.
652 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
653 even if [! FLOATING_STACKS].
654 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
655 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
656 dl_osversion >= 2.3.99 and fatal if not.
657 (TLS_DO_MODIFY_LDT): Use it.
659 2002-11-28 Ulrich Drepper <drepper@redhat.com>
661 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
662 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
663 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
665 2002-11-19 Ulrich Drepper <drepper@redhat.com>
667 * Versions (libc: GLIBC_2.0): Remove names of functions which are
669 * Makefile (shared-only-routines): Add weaks.
670 * weaks.c: Remove functions which are not exported from libc.so.
672 2002-11-14 Roland McGrath <roland@redhat.com>
674 * libc-tsd.c: New file.
675 * Makefile (distribute): Add it.
676 (libc-link.so): New variable.
677 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
678 (libc-ok-for-link): New variable.
679 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
680 libc-ok-for-link to $(use-thread).
681 [$(libc-ok-for-link) = no]
682 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
683 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
685 (generated): Append them.
686 (extra-objs): Append libc-tsd.os.
688 * libc-tls-loc.c: New file.
689 * Makefile (libpthread-routines): Add it.
691 2002-11-14 Andreas Schwab <schwab@suse.de>
693 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
696 2002-11-13 Roland McGrath <roland@redhat.com>
698 * Examples/ex6.c (main): Improve error reporting.
700 2002-11-04 Ulrich Drepper <drepper@redhat.com>
702 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
703 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
705 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
707 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
709 2002-10-22 Jakub Jelinek <jakub@redhat.com>
711 * manager.c (pthread_start_thread): Call __uselocale even
712 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
714 2002-10-17 Roland McGrath <roland@redhat.com>
716 * Makefile (unload): Don't link in libpthread.so.
717 ($(objpfx)unload.out): Do depend on it.
718 * unload.c (main): Improve error reporting.
720 2002-10-09 Roland McGrath <roland@redhat.com>
722 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
723 Under [__PIC__], call the function via the pointer fetched for
724 comparison rather than a call by name that uses the PLT.
725 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
726 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
727 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
728 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
729 (__libc_key_create, __libc_getspecific, __libc_setspecific)
730 (__libc_atfork): Use it.
732 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
733 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
734 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
735 (ld: GLIBC_PRIVATE): Set removed.
737 2002-10-11 Ulrich Drepper <drepper@redhat.com>
739 * sysdeps/unix/sysv/linux/execve.c: New file.
741 2002-10-09 Jakub Jelinek <jakub@redhat.com>
743 * no-tsd.c: Include stdlib.h.
745 2002-10-07 Jakub Jelinek <jakub@redhat.com>
747 * sysdeps/unix/sysv/linux/allocalim.h: New file.
748 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
750 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
751 Pass stack size to caller.
752 (pthread_handle_create): Set p_alloca_cutoff.
753 * pthread.c (__pthread_initial_thread): Use C99 designated
754 initializers. Set p_alloca_cutoff.
755 (__pthread_manager_thread): Likewise.
756 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
758 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
760 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
762 * specific.c (__libc_alloca_cutoff): New function.
763 * no-tsd.c (__libc_alloca_cutoff): New function.
764 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
767 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
769 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
770 * sysdeps/sh/tls.h: Likewise.
771 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
773 2002-09-29 Jakub Jelinek <jakub@redhat.com>
775 * sysdeps/pthread/tst-timer.c (main): Clear
776 SIGEV2.sigev_notify_attributes.
778 2002-09-29 Ulrich Drepper <drepper@redhat.com>
780 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
781 INLINE_SYSCALL for set_thread_area syscall.
783 2002-09-28 Roland McGrath <roland@redhat.com>
785 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
786 Don't call setrlimit, since we did no prior bogon we need to undo.
788 2002-09-27 Roland McGrath <roland@redhat.com>
790 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
792 2002-09-24 Roland McGrath <roland@redhat.com>
794 * sysdeps/x86_64/tls.h: New file.
796 2002-09-23 Roland McGrath <roland@redhat.com>
798 * Examples/ex13.c (dump_mut): int -> size_t for counter.
800 2002-09-18 Bruno Haible <bruno@clisp.org>
802 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
803 an unexpected error code.
805 * internals.h (__pthread_message): Add const to first parameter type.
806 * pthread.c (__pthread_message): Likewise.
808 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
810 2002-09-17 Roland McGrath <roland@redhat.com>
812 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
813 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
814 offset (positive or negative) relative to the thread struct.
815 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
817 2002-09-12 Jakub Jelinek <jakub@redhat.com>
819 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
820 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
821 Replace /usr/lib/crt[in].o with crt[in].o too.
823 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
825 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
827 2002-09-04 Bruno Haible <bruno@clisp.org>
829 * pthread.c: Include <sys/time.h>.
830 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
831 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
832 * Makefile (distribute): Add smp.h to the list.
834 2002-09-04 Bruno Haible <bruno@clisp.org>
836 * sysdeps/alpha/pt-machine.h: Choose different include file location
837 on non-Linux platforms.
839 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
840 (open, open64): Change va_arg argument type to the integral type to
841 which mode_t promotes.
843 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
844 the structure of 'struct sigevent'.
846 * errno.c (__errno_location, __h_errno_location, __res_state):
847 Use prototype function definitions.
849 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
851 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
852 * sysdeps/powerpc/pt-machine.h: moved to...
853 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
854 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
856 2002-09-02 Roland McGrath <roland@redhat.com>
858 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
860 2002-09-01 Roland McGrath <roland@redhat.com>
862 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
863 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
865 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
866 (__libc_internal_tsd_address): Declare it.
867 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
868 __libc_internal_tsd_address.
869 * specific.c (libc_internal_tsd_address): New function.
870 (__libc_internal_tsd_address): New variable.
871 * no-tsd.c (__libc_internal_tsd_address): New variable.
873 2002-08-31 Ulrich Drepper <drepper@redhat.com>
875 * Makefile: Don't use rule for crt%.o, spell it out as rules for
878 2002-08-30 Roland McGrath <roland@redhat.com>
880 * Makefile (extra-objs, omit-deps): Add crtn.
881 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
882 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
883 ($(objpfx)crtn.S): New target.
884 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
885 (generated): Add crtn.S.
887 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
890 2002-08-30 Jakub Jelinek <jakub@redhat.com>
892 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
895 2002-08-30 Roland McGrath <roland@redhat.com>
897 * tst-static-locale.c: New file.
898 * Makefile (tests, tests-static): Add it.
900 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
902 * spinlock.c (__pthread_lock): Fix spurious wakeup
903 handling. Don't clear lowest bit of list pointer as sign the thread
904 is still on the wait list. Don't restart after spurious wakeup
905 with spinning to get the lock.
906 (__pthread_unlock): Take set lowest bit into account when handling
907 pointer to list elements.
908 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
910 2002-08-28 Roland McGrath <roland@redhat.com>
912 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
914 2002-08-28 Jakub Jelinek <jakub@redhat.com>
916 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
917 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
918 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
920 2002-08-28 Ulrich Drepper <drepper@redhat.com>
922 * sysdeps/pthread/timer_routines.c (thread_func): Change return
923 type to void and add casts in use to avoid warnings with all gcc
926 2002-08-08 Jakub Jelinek <jakub@redhat.com>
928 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
930 * manager.c (__pthread_handles): Remove.
931 * pthandles.c: New file.
932 * pthread.c (__pthread_initialize_minimal): Initialize
933 __pthread_handles[0] and __pthread_handles[1].
934 * Makefile (libpthread-routines): Add pthandles (must be last).
936 2002-08-26 Brian Youmans <3diff@gnu.org>
938 * Examples/ex10.c: Corrected version number in Lesser GPL copying
939 permission notice from 2 to 2.1.
940 * Examples/ex11.c: Likewise.
941 * Examples/ex13.c: Likewise.
942 * Examples/ex8.c: Likewise.
943 * Examples/ex9.c: Likewise.
944 * barrier.c: Likewise.
945 * events.c: Likewise.
946 * lockfile.c: Likewise.
947 * no-tsd.c: Likewise.
948 * pt-machine.c: Likewise.
949 * ptclock_gettime.c: Likewise.
950 * ptclock_settime.c: Likewise.
951 * rwlock.c: Likewise.
952 * sysdeps/alpha/pspinlock.c: Likewise.
953 * sysdeps/alpha/pt-machine.h: Likewise.
954 * sysdeps/arm/pspinlock.c: Likewise.
955 * sysdeps/arm/pt-machine.h: Likewise.
956 * sysdeps/cris/pspinlock.c: Likewise.
957 * sysdeps/cris/pt-machine.h: Likewise.
958 * sysdeps/hppa/pspinlock.c: Likewise.
959 * sysdeps/hppa/pt-machine.h: Likewise.
960 * sysdeps/i386/i686/pt-machine.h: Likewise.
961 * sysdeps/i386/pspinlock.c: Likewise.
962 * sysdeps/i386/pt-machine.h: Likewise.
963 * sysdeps/i386/useldt.h: Likewise.
964 * sysdeps/ia64/pspinlock.c: Likewise.
965 * sysdeps/ia64/pt-machine.h: Likewise.
966 * sysdeps/m68k/pspinlock.c: Likewise.
967 * sysdeps/m68k/pt-machine.h: Likewise.
968 * sysdeps/mips/pspinlock.c: Likewise.
969 * sysdeps/mips/pt-machine.h: Likewise.
970 * sysdeps/powerpc/pspinlock.c: Likewise.
971 * sysdeps/powerpc/pt-machine.h: Likewise.
972 * sysdeps/pthread/bits/initspin.h: Likewise.
973 * sysdeps/pthread/bits/libc-lock.h: Likewise.
974 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
975 * sysdeps/pthread/getcpuclockid.c: Likewise.
976 * sysdeps/pthread/posix-timer.h: Likewise.
977 * sysdeps/pthread/timer_create.c: Likewise.
978 * sysdeps/pthread/timer_delete.c: Likewise.
979 * sysdeps/pthread/timer_getoverr.c: Likewise.
980 * sysdeps/pthread/timer_gettime.c: Likewise.
981 * sysdeps/pthread/timer_routines.c: Likewise.
982 * sysdeps/pthread/timer_settime.c: Likewise.
983 * sysdeps/pthread/tst-timer.c: Likewise.
984 * sysdeps/s390/pspinlock.c: Likewise.
985 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
986 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
987 * sysdeps/sh/pspinlock.c: Likewise.
988 * sysdeps/sh/pt-machine.h: Likewise.
989 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
990 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
991 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
992 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
993 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
994 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
995 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
996 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
997 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
998 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
999 * tststack.c: Likewise.
1000 * unload.c: Likewise.
1001 * weaks.c: Likewise.
1002 * wrapsyscall.c: Likewise.
1004 * sysdeps/pthread/pt-initfini.c: Changed copying
1005 permission notice to Lesser GPL from Library GPL, including the
1006 references in the special exception.
1007 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
1008 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
1009 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
1011 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
1013 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
1015 2002-08-26 Ulrich Drepper <drepper@redhat.com>
1017 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
1018 overflow [PR libc/4244].
1020 2002-08-25 Ulrich Drepper <drepper@redhat.com>
1022 * sysdeps/pthread/timer_routines.c (thread_func): Make the
1023 compiler happy by adding a return statement which will never be
1026 * tst-context.c (main): Cast to long before casting to pointer.
1028 * Examples/ex17.c (main): Use correct format string.
1030 * Examples/ex9.c (thread): Remove incorrect return statement.
1032 2002-08-23 Ulrich Drepper <drepper@redhat.com>
1034 * pthread.c (__linuxthreads_version): New global constant.
1036 2002-08-23 Andreas Jaeger <aj@suse.de>
1038 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
1039 as thread specific register.
1040 (testandset): Fix inline asm.
1041 (THREAD_GETMEM): Fix inline asm.
1043 2002-08-22 Roland McGrath <roland@redhat.com>
1045 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
1047 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
1048 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
1049 macro. That chooses whether to reuse %gs value or let kernel set it.
1050 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
1051 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
1054 2002-08-21 Ulrich Drepper <drepper@redhat.com>
1056 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
1057 also to the third definition of this macro.
1059 2002-06-17 Andreas Jaeger <aj@suse.de>
1061 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1064 2002-08-20 Ulrich Drepper <drepper@redhat.com>
1066 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
1067 loading/reading segment registers. Some old hardware doesn't
1068 handle the 32-bit instructions as expected.
1069 * sysdeps/i386/tls.h: Likewise.
1071 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
1072 renamed to secondcall and use is negated.
1073 (TLS_SETUP_GS_SEGMENT): Likewise.
1074 (TLS_INIT_TP): Likewise.
1075 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
1078 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
1079 registers. No need to mask upper 16 bits in this case.
1080 * sysdeps/i386/useldt.h: Likewise.
1081 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
1082 is the same since the GDT content changed.
1084 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
1085 to TLS_SETUP_GS_SEGMENT.
1086 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
1087 TLS_DO_SET_THREAD_AREA.
1088 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
1089 entry number from %gs value.
1090 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
1093 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
1094 Pass true to _dl_deallocate_tls.
1095 (pthread_free): Likewise.
1096 * pthread.c (__pthread_initialize_manager): Likewise.
1098 2002-08-19 Ulrich Drepper <drepper@redhat.com>
1100 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
1101 computing index from %gs value.
1103 2002-08-16 Roland McGrath <roland@redhat.com>
1105 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
1106 register value from entry number properly.
1108 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
1109 optimally conditional on [__PIC__].
1110 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
1111 without touching errno, and use latest modify_ldt-like interface.
1112 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
1113 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
1114 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
1115 existing %gs value as the segment to set.
1116 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
1117 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
1118 by the first thread's early TLS setup.
1120 2002-08-15 Roland McGrath <roland@redhat.com>
1122 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
1123 return a value as callers now expect.
1125 2002-08-11 Roland McGrath <roland@redhat.com>
1127 * pthread.c (__pthread_initialize_manager): Initialize
1128 p_header.data.tcb field of manager thread's descriptor.
1129 (__pthread_initialize_minimal): Don't initialize p_header.data.self
1130 field, already done by TLS_INIT_TP.
1132 * manager.c (pthread_handle_create): Move p_header field initializers
1135 2002-08-08 Ulrich Drepper <drepper@redhat.com>
1137 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
1139 2002-08-07 Ulrich Drepper <drepper@redhat.com>
1141 * pthread.c (__linuxthreads_initial_report_events): New variable.
1142 (__pthread_initialize_manager): Use it to initialize p_report_events
1144 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
1146 2002-08-07 Roland McGrath <roland@redhat.com>
1148 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
1149 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
1151 2002-08-02 Roland McGrath <roland@redhat.com>
1153 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
1154 Add _LIBC_TSD_KEY_LOCALE.
1155 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
1156 Call __uselocale to initialize our per-thread locale pointer to
1158 * pthread.c (__pthread_initialize_minimal): Likewise.
1160 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
1162 2002-08-02 Ulrich Drepper <drepper@redhat.com>
1164 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
1167 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
1168 Don't use p_libc_specific element in thread descriptor.
1170 2002-07-30 Roland McGrath <roland@redhat.com>
1172 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
1173 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
1174 which does the right thing when __thread support is available.
1175 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
1176 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
1177 `p_h_errno', `p_resp', and `p_res' members.
1178 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
1179 Don't initialize `p_errnop' and `p_h_errnop' members.
1180 (__pthread_reset_main_thread): Likewise.
1181 (__pthread_initialize_manager): Likewise.
1182 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
1183 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
1184 Don't initialize `p_resp' member.
1185 (__pthread_reset_main_thread): Likewise.
1186 * manager.c (pthread_handle_create): Likewise.
1187 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
1188 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
1189 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
1190 * errno.c [USE_TLS && HAVE___THREAD]
1191 (__h_errno_location, __res_state): Don't define these at all.
1193 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
1194 (INSTALL_NEW_DTV, GET_DTV): Likewise.
1195 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
1197 * weaks.c: Don't include <errno.h> here.
1199 2002-08-01 Roland McGrath <roland@redhat.com>
1201 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
1203 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
1204 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
1205 (TLS_INIT_TP): Use that.
1207 2002-08-02 Jakub Jelinek <jakub@redhat.com>
1209 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
1210 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
1211 (FREE_THREAD): Avoid modify_ldt if using GDT.
1212 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
1214 2002-07-25 Jakub Jelinek <jakub@redhat.com>
1216 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
1217 * sysdeps/i386/pt-machine.h: Likewise.
1218 * sysdeps/i386/useldt.h: Likewise.
1220 2002-07-22 Ulrich Drepper <drepper@redhat.com>
1222 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
1223 call __libc_setup_tls first.
1224 * Makefile: Actually create tst-signal.out file when running the test.
1225 (tests): Add tststatic.
1226 * Examples/tststatic.c: New file.
1228 2002-07-19 Ulrich Drepper <drepper@redhat.com>
1230 * errno.c (__errno_location): Don't define unless !USE_TLS
1232 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
1233 * sysdeps/i386/tls.h: Likewise.
1234 * sysdeps/i386/useldt.h: Likewise.
1235 * sysdeps/i386/i686/pt-machine.h: Likewise.
1237 2002-07-02 H.J. Lu <hjl@gnu.org>
1239 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
1241 * sysdeps/mips/pt-machine.h: Likewise.
1243 2002-07-14 Ulrich Drepper <drepper@redhat.com>
1245 * manager.c (pthread_handle_create): Initialize self-reference in
1248 2002-07-01 Jakub Jelinek <jakub@redhat.com>
1250 * Examples/ex9.c (main): Remove unused th variable.
1252 2002-07-10 Ulrich Drepper <drepper@redhat.com>
1254 * wrapsyscall.c: Add __nanosleep alias.
1255 * Versions (GLIBC_2.2.6): Add __nanosleep.
1256 * bug-sleep.c: New file.
1257 * Makefile (tests): Add bug-sleep.
1259 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
1261 * Examples/ex9.c (main): Use list of children and join them.
1262 (thread): Do not call exit.
1264 2002-06-20 Ulrich Drepper <drepper@redhat.com>
1266 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
1267 Unconditionally use the code using spinlock. Use __pthread_release
1269 (wait_node_free): Likewise.
1270 (__pthread_acquire, __pthread_release): Unconditionally define.
1272 2002-06-07 Jakub Jelinek <jakub@redhat.com>
1274 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
1276 2002-05-24 Ulrich Drepper <drepper@redhat.com>
1278 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
1280 2002-05-21 Ulrich Drepper <drepper@redhat.com>
1282 * sysdeps/pthread/pthread.h (pthread_create): Rename first
1284 (pthread_cancel): Likewise.
1285 * internals.h (__pthread_create_2_1): Likewise.
1286 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
1288 2002-05-20 Ulrich Drepper <drepper@redhat.com>
1290 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
1291 Patch by Glen Nakamura <gen@flex.com>.
1293 2002-05-03 Ulrich Drepper <drepper@redhat.com>
1295 * signals.c: Move sighandler functions to...
1296 * sighandler.c: ...here. New file.
1297 * signals.c: Move signal handler related type definitions to...
1298 * internals.h: ...here. Add prototypes for signal handlers.
1299 * Makefile (libpthread-routines): Add sighandler.
1300 (CFLAGS-sighandler.c): Add $(exceptions).
1302 2002-04-30 Jakub Jelinek <jakub@redhat.com>
1304 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
1306 2002-04-08 Ulrich Drepper <drepper@redhat.com>
1308 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
1309 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
1310 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
1311 based on previous one and not on current time. Count overruns.
1312 Patch by Eric F. Sorton <eric@cctcorp.com>.
1314 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
1316 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1318 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
1319 if it isn't defined yet.
1320 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
1321 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1323 * sysdeps/sh/tls.h: New file.
1325 2002-04-08 Jakub Jelinek <jakub@redhat.com>
1327 * manager.c (__pthread_manager_event): Use self instead of arg
1328 for INIT_THREAD_SELF.
1329 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
1330 _pthread_descr_struct) instead of sizeof (*descr).
1332 2002-04-05 Ulrich Drepper <drepper@redhat.com>
1334 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
1335 * sysdeps/alpha/pt-machine.h: Likewise.
1336 * sysdeps/arm/pt-machine.h: Likewise.
1337 * sysdeps/cris/pt-machine.h: Likewise.
1338 * sysdeps/hppa/pt-machine.h: Likewise.
1339 * sysdeps/m68k/pt-machine.h: Likewise.
1340 * sysdeps/mips/pt-machine.h: Likewise.
1341 * sysdeps/powerpc/pt-machine.h: Likewise.
1342 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1343 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1344 * sysdeps/sh/pt-machine.h: Likewise.
1345 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1346 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1347 * sysdeps/x86_64/pt-machine.h: Likewise.
1349 2002-04-05 Jakub Jelinek <jakub@redhat.com>
1351 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
1352 instead of pthread_mutexattr_setkind_np.
1353 (pthread_mutexattr_gettype): Similarly.
1354 * man/pthread_mutexattr_setkind_np.man: New.
1355 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
1357 2002-04-02 Ulrich Drepper <drepper@redhat.com>
1359 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
1361 2002-03-22 Jakub Jelinek <jakub@redhat.com>
1363 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
1365 2002-03-22 Ulrich Drepper <drepper@redhat.com>
1367 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
1369 2002-03-17 Andreas Jaeger <aj@suse.de>
1371 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
1373 * sysdeps/alpha/pt-machine.h: Likewise.
1374 * sysdeps/arm/pt-machine.h: Likewise.
1375 * sysdeps/cris/pt-machine.h: Likewise.
1376 * sysdeps/hppa/pt-machine.h: Likewise.
1377 * sysdeps/i386/i686/pt-machine.h: Likewise.
1378 * sysdeps/ia64/pt-machine.h: Likewise.
1379 * sysdeps/m68k/pt-machine.h: Likewise.
1380 * sysdeps/mips/pt-machine.h: Likewise.
1381 * sysdeps/powerpc/pt-machine.h: Likewise.
1382 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1383 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1384 * sysdeps/sh/pt-machine.h: Likewise.
1385 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1386 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1387 * sysdeps/x86_64/pt-machine.h: Likewise.
1389 * internals.h: Move testandset and __compare_and_swap prototypes
1392 2002-03-03 Andreas Jaeger <aj@suse.de>
1394 * errno.c: Include resolv.h to avoid warning.
1396 2002-02-27 Ulrich Drepper <drepper@redhat.com>
1398 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
1401 2002-02-23 Ulrich Drepper <drepper@redhat.com>
1403 * attr.c (pthread_getattr_np): Don't take thread descriptor size
1404 into account if USE_TLS.
1405 * manager.c (pthread_handle_create): Free TLS data structures if call
1406 failed. Pass correct stack to clone if USE_TLS.
1407 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
1408 * sysdeps/i386/i686/pt-machine.h: Likewise.
1409 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
1411 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
1412 Add p_stackaddr element #if USE_TLS.
1413 * internals.c: Include <tls.h>.
1414 * manager.c: Integrate creating and handling of thread descriptor
1416 * pthread.c: Likewise.
1417 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
1418 Include <linuxthreads/descr.h> only if TLS is really used.
1419 (GET_DTV): New macro.
1420 (TLS_INIT_TP): Initialize self pointer.
1422 2002-02-17 Andreas Schwab <schwab@suse.de>
1424 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
1427 2002-02-12 Ulrich Drepper <drepper@redhat.com>
1429 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
1430 (INSTALL_DTV): Adjust for being passed pointer to element with length.
1432 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1434 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
1436 2002-02-08 Richard Henderson <rth@redhat.com>
1438 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
1440 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1442 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
1445 2002-02-07 H.J. Lu <hjl@gnu.org>
1447 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
1449 (__pthread_spin_lock): Remove ".set noreorder".
1450 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
1452 2002-02-05 H.J. Lu <hjl@gnu.org>
1454 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
1456 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1457 (__compare_and_swap): Likewise.
1459 2002-02-07 Ulrich Drepper <drepper@redhat.com>
1461 * internals.h: Move declarations/definitions of
1462 __pthread_initial_thread_bos, __pthread_initial_thread,
1463 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
1464 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
1465 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
1467 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
1468 Define THREAD_GETMEM accordingly.
1470 2002-02-06 Ulrich Drepper <drepper@redhat.com>
1472 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
1474 * sysdeps/i386/tls.h: Define THREAD_DTV.
1476 2002-02-04 Ulrich Drepper <drepper@redhat.com>
1478 * internals.h: Move thread descriptor definition...
1479 * descr.h.: ...here. New file.
1480 * sysdeps/i386/tls.h: New file.
1482 2002-02-01 H.J. Lu <hjl@gnu.org>
1484 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
1485 different register in the delayed slot. Use branch likely.
1487 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
1488 (__compare_and_swap): Return 0 only when failed to compare. Use
1491 2002-02-01 Jakub Jelinek <jakub@redhat.com>
1493 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
1494 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
1495 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
1496 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
1497 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
1498 * sysdeps/sparc/sparc64/Versions: New file.
1499 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
1501 2002-01-31 Ulrich Drepper <drepper@redhat.com>
1503 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
1504 in SHARED code, use GL(dl_cpuclock_offset).
1506 2002-01-28 Andreas Jaeger <aj@suse.de>
1508 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
1509 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
1511 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
1513 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
1514 (CURRENT_STACK_FRAME): Remove duplicate definition.
1515 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1517 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
1519 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
1522 2002-01-12 Andreas Schwab <schwab@suse.de>
1524 * Makefile (test-srcs): Add tst-signal.
1525 (tests): Run tst-signal.
1526 (distribute): Add tst-signal.sh.
1527 * tst-signal.c, tst-signal.sh: New files.
1529 2002-01-14 Andreas Jaeger <aj@suse.de>
1531 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
1533 2002-01-11 Andreas Schwab <schwab@suse.de>
1535 * signals.c (sighandler): Initialize all elements to SIG_ERR.
1536 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
1538 2002-01-06 Richard Henderson <rth@redhat.com>
1540 * sysdeps/alpha/elf/pt-initfini.c: New file.
1542 2001-12-29 Andreas Jaeger <aj@suse.de>
1544 * Examples/ex9.c: Add noreturn attribute for thread.
1545 * Examples/ex10.c: Likewise.
1546 * Examples/ex13.c (thread_start): Likewise.
1547 * Examples/ex15.c (worker): Likewise.
1549 * Examples/ex18.c: Include unistd.h for prototype of sleep.
1551 2001-12-14 Ulrich Drepper <drepper@redhat.com>
1553 * man/pthread_atfork.man: Adjust description of mutex handling
1554 after fork for current implementation.
1555 * linuxthreads.texi: Likewise [PR libc/2519].
1557 2001-12-13 Andreas Schwab <schwab@suse.de>
1559 * specific.c (pthread_key_delete): Don't contact the thread
1560 manager if no threads have been created yet.
1562 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
1564 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
1565 qualifier to be safe.
1567 2001-11-30 Andreas Schwab <schwab@suse.de>
1569 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
1570 that self is the manager thread, and initialize the thread
1572 (thread_self_stack) [THREAD_SELF]: New function to find self via
1574 * manager.c (pthread_handle_create): Don't block cancel signal any
1577 2001-11-29 Andreas Jaeger <aj@suse.de>
1579 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
1581 (INIT_THREAD_SELF): New.
1582 (THREAD_GETMEM): New.
1584 (THREAD_SETMEM): New.
1585 (THREAD_SETMEM_NC): New.
1586 (FLOATING_STACKS): Define.
1587 (ARCH_STACK_MAX_SIZE): Define.
1589 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
1591 Bugfix to pthread_key_delete. It was iterating over the thread
1592 manager's linked list of threads, behind the thread manager's
1593 back causing a race. The fix is to have the manager iterate over
1594 the threads instead, using a new request type for doing so.
1595 * internals.h (struct pthread_request): New manager request type
1596 REQ_FOR_EACH_THREAD.
1597 * manager.c (pthread_for_each_thread): New function.
1598 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
1599 * specific.c (struct pthread_key_delete_helper_args): New type.
1600 (pthread_key_delete_helper): New static function.
1601 (pthread_key_delete): Use the new thread manager
1602 REQ_FOR_EACH_THREAD function to iterate over the threads and set
1603 the delete key slot to a null value in each thread.
1604 * Examples/ex18.c: New test.
1605 * Makefile (tests): Add ex18.
1607 2001-11-22 Wolfram Gloger <wg@malloc.de>
1609 * pthread.c (pthread_onexit_process): Don't call free
1610 after threads have been asynchronously terminated.
1612 * manager.c (pthread_handle_exit): Surround cancellation
1613 of threads with __flockfilelist()/__funlockfilelist().
1615 2001-11-26 Andreas Schwab <schwab@suse.de>
1617 * manager.c (pthread_handle_create): Start the child thread with
1618 the cancel signal blocked, so that it does not handle it before
1619 the thread register is set up. Save errno from failed clone call.
1621 2001-11-15 Ulrich Drepper <drepper@redhat.com>
1623 * sysdeps/i386/i686/Implies: Removed.
1624 * sysdeps/i386/i686/Versions: New file.
1626 2001-10-31 Andreas Jaeger <aj@suse.de>
1628 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
1630 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
1632 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
1633 to __linuxthreads_pthread_sizeof_descr to match name used by
1634 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
1635 linuxthreads_db/td_symbol_list.c.
1637 2001-09-22 Andreas Jaeger <aj@suse.de>
1639 * linuxthreads/tst-context.c: Avoid compile warning.
1641 2001-09-20 Andreas Jaeger <aj@suse.de>
1643 * shlib-versions: Add x86-64.
1645 2001-09-19 Andreas Jaeger <aj@suse.de>
1647 * sysdeps/x86_64/Makefile: New file.
1648 * sysdeps/x86_64/pspinlock.c: New file.
1649 * sysdeps/x86_64/pt-machine.h: New file.
1651 2001-09-12 Jakub Jelinek <jakub@redhat.com>
1653 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
1655 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1657 2001-09-11 Ulrich Drepper <drepper@redhat.com>
1658 Wolfram Gloger <wg@malloc.de>
1660 * join.c: Protect all communications from and to manager with
1662 * manager.c: Likewise.
1663 * pthread.c: Likewise.
1664 * smeaphore.c: Likewise.
1666 2001-08-29 Ulrich Drepper <drepper@redhat.com>
1668 * spinlock.c (__pthread_lock): Top max_count value with
1669 MAX_ADAPTIVE_SPIN_COUNT.
1670 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
1672 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
1675 2001-08-27 Jakub Jelinek <jakub@redhat.com>
1677 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
1678 non-opaque type if __USE_UNIX98.
1680 2001-08-26 Jakub Jelinek <jakub@redhat.com>
1682 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
1683 non-opaque lock types also if _IO_MTSAFE_IO is defined.
1685 2001-08-23 Roland McGrath <roland@frob.com>
1687 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
1688 new first argument, skip the cleanup handler if it's zero.
1689 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
1690 (__libc_lock_define_initialized_recursive): Use it.
1691 * sysdeps/pthread/bits/stdio-lock.h: File removed.
1692 The sysdeps/generic file from the main tree now suffices.
1694 2001-08-22 Roland McGrath <roland@frob.com>
1696 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
1697 instead of <pthread.h>.
1698 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
1699 (_IO_lock_initializer): Add braces.
1700 (_IO_lock_lock): Use __libc_lock_lock_recursive.
1701 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
1703 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
1704 (__libc_lock_define_initialized_recursive): Use it.
1705 (__libc_lock_init_recursive): Likewise.
1706 (__libc_lock_fini_recursive): Likewise.
1707 (__libc_lock_lock_recursive): Likewise.
1708 (__libc_lock_trylock_recursive): Likewise.
1709 (__libc_lock_unlock_recursive): Likewise.
1710 (__libc_lock_define_recursive): New macro.
1712 2001-08-14 Jakub Jelinek <jakub@redhat.com>
1714 * lockfile.c (__pthread_provide_lockfile): New variable.
1715 * pthread.c (__pthread_require_lockfile): New variable.
1716 * cancel.c (__pthread_require_lockfile): New variable.
1718 2001-07-31 Ulrich Drepper <drepper@redhat.com>
1720 * tst-context.c (threadfct): Initialize context before calling
1723 * Examples/ex17.c: Make sure test thread is around long enough.
1725 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
1727 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
1729 2001-07-24 Ulrich Drepper <drepper@redhat.com>
1731 * tst-context.c (main): Print explanation before bailing out
1732 because context handling is not supported.
1734 2001-07-23 Ulrich Drepper <drepper@redhat.com>
1736 * Makefile (tests): Add tst-context.
1737 * tst-context.c: New file.
1739 * sysdeps/pthread/bits/stdio-lock.h: Define
1740 _IO_cleanup_region_start_noarg.
1742 2001-07-23 Jakub Jelinek <jakub@redhat.com>
1744 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
1745 (ARCH_STACK_MAX_SIZE): Define.
1746 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1747 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1749 2001-07-19 Jakub Jelinek <jakub@redhat.com>
1751 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
1753 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
1754 (ARCH_STACK_MAX_SIZE): Define.
1755 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
1756 NEED_SEPARATE_REGISTER_STACK.
1758 2001-07-16 Andreas Schwab <schwab@suse.de>
1760 * Makefile (before-compile): Don't add $(objpfx)crti.o.
1761 (omit-deps): Add crti.
1762 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
1763 it is filtered out of the link command.
1765 2001-07-16 Ulrich Drepper <drepper@redhat.com>
1767 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
1768 to find the right value for __pthread_initial_thread_bos, it's not
1769 used. If not FLOATING_STACKS first run
1770 __pthread_init_max_stacksize.
1772 2001-06-16 H.J. Lu <hjl@gnu.org>
1774 * internals.h: Include <stackinfo.h>.
1776 * attr.c: Don't include <stackinfo.h> here.
1777 * cancel.c: Likewise.
1778 * manager.c: Likewise.
1779 * pthread.c: Likewise.
1780 * ptlongjmp.c: Likewise.
1782 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
1784 * attr.c: Make _STACK_GROWS_UP work.
1785 * internals.h: Likewise.
1786 * manager.c: Likewise.
1787 * pthread.c: Likewise.
1789 2001-06-15 H.J. Lu <hjl@gnu.org>
1791 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1793 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1795 * semaphore.h: Use struct _pthread_fastlock as an element of
1796 sem_t instead of an identical struct.
1797 * rwlock.c: Remove casts.
1798 * semaphore.c: Likewise.
1800 2001-04-30 Alan Modra <amodra@one.net.au>
1802 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1804 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1806 * linuxthreads.texi: Spelling corrections.
1808 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1810 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1811 returning successfully.
1812 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1814 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1816 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1817 serious work try once whether the lock is uncontested.
1818 Remove duplicate reading of __status before loop.
1819 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1821 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1822 (__pthread_alt_trylock): Likewise.
1824 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1826 Memory barrier overhaul following line by line inspection.
1827 * mutex.c (pthread_once): Missing memory barriers added.
1828 * pthread.c (__pthread_wait_for_restart_signal,
1829 __pthread_timedsuspend_new, __pthread_restart_new): Added
1830 memory barriers ``just in case'' and for documentary value.
1831 * spinlock.c (__pthread_release): New inline function for releasing
1832 spinlock, to complement __pthread_acquire. Includes memory
1833 barrier prior to assignment to spinlock, and __asm __volatile
1834 dance to prevent reordering or optimization of the spinlock access.
1835 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1836 __pthread_alt_timedlock, __pthread_alt_unlock,
1837 __pthread_compare_and_swap): Updated to use new __pthread_release
1838 instead of updating spinlock directly.
1839 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1840 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1841 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1842 Memory barrier overhaul. Lots of missing memory barriers added,
1843 a couple needless ones removed.
1844 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1845 removed, just calls __pthread_acquire, which has the new read
1846 barrier in it before its testandset.
1848 2001-05-20 Roland McGrath <roland@frob.com>
1850 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1852 2001-05-09 Geoff Keating <geoffk@redhat.com>
1854 * sysdeps/powerpc/pt-machine.h
1855 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1856 (__compare_and_swap): Remove memory barriers.
1857 (__compare_and_swap_with_release_semantics): New function.
1859 2001-04-24 Andreas Jaeger <aj@suse.de>
1861 * wrapsyscall.c: send* and recv* return ssize_t.
1863 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1864 mutex instead of double locking it.
1865 Reported by Pierre Artaud <partaud@sodatec.com>.
1867 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1869 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1870 using #ifdef whether the clock is available.
1871 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1873 * sysdeps/ia64/Versions: New file.
1875 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1876 have to call __gmon_start__ in the libpthread DSO.
1877 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1879 * Makefile (libpthread-routines): Add ptclock_gettime and
1881 * internals.h: Don't use cpuclock-init.h definitions, use
1882 hp-timing.h definitions.
1883 * pthread.c: Likewise.
1884 * manager.c: Likewise.
1885 * ptclock_gettime.c: New file.
1886 * ptclock_settime.c: New file.
1887 * internals.h: Fix parameter type for __pthread_clock_gettime and
1888 __pthread_clock_settime.
1890 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1891 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1892 * sysdeps/i386/i586/Makefile: Removed.
1894 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1896 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1897 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1899 2001-04-21 Andreas Jaeger <aj@suse.de>
1901 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1902 attribute, remove statements that will never be executed.
1903 (thread_func): Remove mutex_unlock call since it's never executed.
1904 (thread_func): Fix comment as suggested by Jakub Jelinek.
1906 * manager.c (__pthread_manager): Add noreturn
1908 (pthread_start_thread): Likewise, remove return statement.
1909 (pthread_start_thread_event): Likewise.
1910 Add noreturn attribute for pthread_handle_exit.
1911 * weaks.c: Add noreturn attribute for pthread_exit.
1913 * internals.h: Add __pthread_clock_gettime and
1914 __pthread_clock_settime prototypes.
1916 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1918 * internals.h: Include <cpuclock-init.h>.
1919 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1920 CPUCLOCK_VARDEF is defined.
1921 * pthread.c (__pthread_initialize_minimal): Initialize
1922 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1923 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1924 for new thread to current CPU clock value.
1926 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1928 * sysdeps/i386/i586/Makefile: New file.
1929 * sysdeps/i386/i586/Versions: New file.
1930 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1931 * sysdeps/i386/i586/ptclock_settime.c: New file.
1932 * sysdeps/i386/i686/Implies: New file.
1934 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1936 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1937 $generated, not $postclean-generated.
1939 2001-04-18 Andreas Jaeger <aj@suse.de>
1941 * Makefile (otherlibs): Added.
1943 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1945 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1947 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1949 * signals.c (sigwait): NSIG is no signal number. Block all
1950 signals while in signal handler for signals in SET.
1951 Patch by Manfred Spraul <manfred@colorfullife.com>.
1953 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1955 * tst-cancel.c: Disable most tests. Add new test where all
1956 cleanup handlers must run.
1957 * Makefile (tests): Add tst-cancel again.
1959 * cancel.c (__pthread_perform_cleanup): Correct condition for
1960 leaving cleanup loop early.
1962 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1963 all the files which use CURRENT_STACK_FRAME.
1964 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1965 __builtin_frame_address.
1966 * sysdeps/i386/i686/pt-machine.h: Likewise.
1968 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1970 * Makefile (tests): Comment out tst-cancel for now.
1972 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1973 temporary file in object directory.
1974 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1975 Pass $(objpfx) to tst-cancel.
1977 2001-04-11 David S. Miller <davem@redhat.com>
1979 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1980 up closer to user local variables so that new cleanup heuristics work.
1981 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1983 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1985 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1987 (_pthread_cleanup_push_defer): Likewise.
1989 * tst-cancel.c (main): Fix loop printing cleanup output.
1991 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1993 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1995 (__pthread_spin_trylock): Likewise.
1996 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1998 2001-04-10 Ulrich Drepper <drepper@redhat.com>
2000 * join.c (pthread_exit): Move code to new function __pthread_do_exit
2001 which takes an extra parameter with the current frame pointer.
2002 Call new function with CURRENT_STACK_FRAME.
2003 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
2004 with the new parameter.
2005 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
2006 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
2007 this parameter as the initial value the cleanup handler records are
2008 compared against. No active cleanup handler record must have an
2009 address lower than the previous one and the initial record must be
2010 above (below on PA) the frame address passed in.
2011 (pthread_setcancelstate): Call __pthread_do_exit instead of
2013 (pthread_setcanceltype): Likewise.
2014 (pthread_testcancel): Likewise.
2015 (_pthread_cleanup_pop_restore): Likewise.
2016 * condvar.c (pthread_cond_wait): Likewise.
2017 (pthread_cond_timedwait_relative): Likewise.
2018 * manager.c (pthread_start_thread): Likewise.
2019 * oldsemaphore.c (__old_sem_wait): Likewise.
2020 * pthread.c (pthread_handle_sigcancel): Likewise.
2021 * semaphore.c (__new_sem_wait): Likewise.
2022 (sem_timedwait): Likewise.
2023 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
2024 to limit the cleanup handlers which get run.
2025 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
2026 for __pthread_perform_cleanup.
2028 * Makefile (tests): Add tst-cancel.
2029 * tst-cancel.c: New file.
2031 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
2033 * sysdeps/cris/pt-machine.h: New file.
2034 * sysdeps/cris/pspinlock.c: New file.
2036 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
2038 * shlib-versions: Add case for Linux on CRIS.
2040 2001-03-26 Ulrich Drepper <drepper@redhat.com>
2042 * attr.c (pthread_getattr_np): Correct computation of stack size
2043 for machiens with register stack.
2045 * Examples/ex17.c (main): Correct detection of failed mmap call.
2047 2001-03-21 Jakub Jelinek <jakub@redhat.com>
2049 * pthread.c (__pthread_initialize_manager): Fix a typo.
2051 2001-03-21 Jakub Jelinek <jakub@redhat.com>
2053 * attr.c (__pthread_attr_setstack): Fix alignment check.
2054 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
2055 * Makefile (tests): Add ex17 test.
2056 * Examples/ex17.c: New test.
2058 2001-03-20 Ulrich Drepper <drepper@redhat.com>
2060 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
2061 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
2062 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
2064 2001-03-18 Ulrich Drepper <drepper@redhat.com>
2066 * Makefile: When generating DSO link with libc_nonshared.a.
2068 2001-02-26 Jakub Jelinek <jakub@redhat.com>
2070 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
2072 2001-02-23 Jakub Jelinek <jakub@redhat.com>
2074 * internals.h (__pthread_init_max_stacksize): New prototype.
2075 * attr.c (__pthread_attr_setstacksize): Call
2076 __pthread_init_max_stacksize if not yet initialized.
2077 * pthread.c (__pthread_init_max_stacksize): New function.
2078 (__pthread_initialize_manager): Call it.
2079 Patch by <dtc@cmucl.cons.org>.
2081 2001-03-16 Ulrich Drepper <drepper@redhat.com>
2083 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
2085 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
2087 * shlib-versions: Add rule for Linux on 64 bit S/390.
2088 * sysdeps/s390/s390-64/pt-machine.h: New file.
2089 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
2091 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
2093 * sysdeps/s390/pt-machine.h: Move to...
2094 * sysdeps/s390/s390-32/pt-machine.h: ...here.
2095 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
2097 2001-03-15 Ulrich Drepper <drepper@redhat.com>
2099 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
2100 * attr.c: Implement pthread_getattr_np.
2101 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
2102 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
2103 * manager.c (pthread_handle_create): Initialize p_inheritsched.
2105 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2107 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
2110 2001-02-20 Hans Boehm <hans_boehm@hp.com>
2112 * manager.c (manager_mask): Removed static vesion. Now always local
2113 to __pthread_manager().
2114 (manager_mask_all): Removed completely.
2115 (__pthread_manager): Remove manager_mask_all initialization.
2116 (pthread_handle_create): Remove code to set and reset signal mask
2117 around __clone2() calls.
2119 2001-02-17 Jakub Jelinek <jakub@redhat.com>
2121 * spinlock.c (__pthread_lock): Force lock->__status to be read from
2122 memory on every spin.
2124 2001-02-10 Andreas Jaeger <aj@suse.de>
2126 * Makefile (extra-objs): New.
2128 2001-02-09 Jakub Jelinek <jakub@redhat.com>
2130 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
2131 __pthread_initialize_minimal prototype.
2133 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2135 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2137 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2139 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
2141 2001-02-06 Ulrich Drepper <drepper@redhat.com>
2143 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
2144 broken code. Patch by Jes Sorensen.
2146 2001-02-06 Andreas Jaeger <aj@suse.de>
2148 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
2150 * internals.h: ...here.
2152 2001-02-05 Jes Sorensen <jes@linuxcare.com>
2154 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2156 2001-02-02 Ulrich Drepper <drepper@redhat.com>
2158 * Versions: Remove __pthread_initialize_minimal.
2160 2001-02-01 Ulrich Drepper <drepper@redhat.com>
2162 * Makefile: Add rules to build crti.o and make it being used in
2163 building libpthread.so.
2164 * sysdeps/i386/Makefile: New file.
2165 * sysdeps/pthread/pt-initfini.c: New file.
2167 * pthread.c: Cleanups.
2169 2001-01-28 Andreas Jaeger <aj@suse.de>
2171 * oldsemaphore.c (__old_sem_init): Adjust for last change.
2172 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2173 * spinlock.c: Likewise.
2175 2001-01-28 Ulrich Drepper <drepper@redhat.com>
2177 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
2178 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2179 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
2180 * pthread.c: Likewise.
2181 * spinlock.h: Likewise.
2182 * sysdeps/pthread/pthread.h: Likewise.
2184 2001-01-26 Ulrich Drepper <drepper@redhat.com>
2186 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
2187 as struct __pthread_attr_s.
2189 * semaphore.h (sem_t): Cleanup namespace, rename status and
2192 2001-01-13 Jakub Jelinek <jakub@redhat.com>
2194 * pthread.c (pthread_onexit_process): Clear
2195 __pthread_manager_thread_bos after freeing it.
2196 * Makefile (tests): Add ex16.
2197 * Examples/ex16.c: New file.
2199 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2201 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
2203 * pthread.c (pthread_exit_process): Rename to...
2204 (pthread_onexit_process): ...this.
2205 (pthread_atexit_process, pthread_atexit_retcode): New.
2206 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
2207 and only if HAVE_Z_NODELETE is not defined.
2208 (__pthread_initialize_manager): Register pthread_atexit_retcode
2211 2001-01-11 Ulrich Drepper <drepper@redhat.com>
2213 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
2215 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2217 * Makefile (tests): Add ex15.
2218 * Examples/ex15.c: New test.
2220 2001-01-08 Ulrich Drepper <drepper@redhat.com>
2222 * pthread.c (pthread_exit_process): Free memory allocated for
2225 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2227 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
2228 (pthread_free): Always unmap the stack. It's safe now that we don't
2229 use MAP_FIXED to allocate stacks.
2231 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2233 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
2235 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
2237 2000-11-15 Wolfram Gloger <wg@malloc.de>
2239 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
2240 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
2242 2000-12-27 Andreas Jaeger <aj@suse.de>
2244 * Examples/ex13.c: Make local functions static.
2245 * ecmutex.c: Likewise.
2246 * joinrace.c: Likewise.
2247 * Examples/ex14.c: Likewise.
2249 * Examples/ex2.c: Make local functions static; reformat.
2250 * Examples/ex1.c: Likewise.
2251 * Examples/ex4.c: Likewise.
2252 * Examples/ex5.c: Likewise.
2253 * Examples/ex7.c: Likewise.
2255 * oldsemaphore.c: Add prototypes to shut up GCC.
2256 * pt-machine.c: Likewise.
2258 * weaks.c: Add prototype for pthread_exit.
2260 * internals.h: Add some prototypes, format prototypes and add
2262 Move __libc_waitpid prototype to include/sys/wait.h.
2264 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
2265 * mutex.c: Likewise.
2266 * specific.c: Likewise.
2267 * ptfork.c: Likewise.
2269 * lockfile.c: Include internals.h to get prototypes.
2270 * events.c: Likewise.
2271 * sysdeps/alpha/pspinlock.c: Likewise.
2272 * sysdeps/arm/pspinlock.c: Likewise.
2273 * sysdeps/hppa/pspinlock.c: Likewise.
2274 * sysdeps/i386/pspinlock.c: Likewise.
2275 * sysdeps/ia64/pspinlock.c: Likewise.
2276 * sysdeps/m68k/pspinlock.c: Likewise.
2277 * sysdeps/mips/pspinlock.c: Likewise.
2278 * sysdeps/powerpc/pspinlock.c: Likewise.
2279 * sysdeps/s390/pspinlock.c: Likewise.
2280 * sysdeps/sh/pspinlock.c: Likewise.
2281 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2282 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2283 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2285 2000-12-27 Ulrich Drepper <drepper@redhat.com>
2287 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
2288 (__pthread_attr_getstack): Return correct address.
2289 Add warnings for using pthread_attr_getstackaddr and
2290 pthread_attr_setstackaddr.
2292 2000-12-26 Ulrich Drepper <drepper@redhat.com>
2294 * Examples/ex6.c (test_thread): Make static.
2295 * Examples/ex12.c (test_thread): Make static and add noreturn
2298 2000-12-18 Jes Sorensen <jes@linuxcare.com>
2300 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
2301 and compare_and_swap_with_release_semantics returns int not long.
2303 2000-12-17 Andreas Jaeger <aj@suse.de>
2305 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
2307 * sysdeps/arm/pt-machine.h (testandset): Likewise.
2308 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
2309 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
2310 * sysdeps/sh/pt-machine.h (testandset): Likewise.
2311 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
2312 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
2314 2000-12-17 Ulrich Drepper <drepper@redhat.com>
2316 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
2317 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
2319 2000-12-17 Andreas Jaeger <aj@suse.de>
2321 * internals.h: Add prototypes for testandset and
2322 __compare_and_swap to shut up gcc warnings.
2324 2000-12-06 Wolfram Gloger <wg@malloc.de>
2326 * join.c (pthread_detach): Allow case where the thread has already
2329 2000-12-05 Andreas Jaeger <aj@suse.de>
2331 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
2332 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2333 (__compare_and_swap): Likewise.
2334 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
2336 2000-11-20 Jakub Jelinek <jakub@redhat.com>
2338 * Examples/ex3.c (main): Cast int to long before casting to void *.
2339 (search): Cast void * to long, not int.
2340 * Examples/ex8.c (main, thread): Similarly.
2341 * Examples/ex11.c (main): Similarly.
2342 * Examples/ex14.c (worker, do_test): Similarly.
2343 * ecmutex.c (worker, do_test): Similarly.
2344 (nlocks): Cast to int.
2346 2000-11-08 Bruce Mitchener <bruce@cubik.org>
2348 * linuxthreads.texi: Add documentation for pthreads attributes
2349 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
2350 patch. Document pthread_[sg]etconcurrency(). Mark
2351 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
2353 2000-11-07 Ulrich Drepper <drepper@redhat.com>
2355 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2357 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2358 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
2360 2000-11-06 Ulrich Drepper <drepper@redhat.com>
2362 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
2363 not doing it right now.
2364 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
2366 2000-10-30 Ulrich Drepper <drepper@redhat.com>
2368 * Examples/ex4.c (main): Don't use exit() to avoid warning with
2371 2000-10-29 Ulrich Drepper <drepper@redhat.com>
2373 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
2374 here. Reported by Bruce Mitchener <bruce@cubik.org>.
2376 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
2377 discussing mutexes. (As per the Unix98 name for the API.)
2378 Changes documentation for pthread_mutexattr_setkind_np() and
2379 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
2380 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
2381 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
2382 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
2383 Begins to introduce discussion of the ``timed'' mutex type. This
2384 discussion is currently incomplete.
2385 Patch by Bruce Mitchener <bruce@cubik.org>.
2387 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2388 Yutaka Niibe <gniibe@chroot.org>
2390 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
2391 has restrictions, use register.
2393 2000-10-23 Andreas Schwab <schwab@suse.de>
2395 * Examples/ex14.c (TIMEOUT): Override default timeout.
2397 2000-10-16 Ulrich Drepper <drepper@redhat.com>
2399 * specific.c: Protect tsd array modification in thread data
2400 structures by getting the thread lock in pthread_key_delete and
2401 __pthread_destroy_specifics.
2402 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
2404 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2406 * sysdeps/pthread/bits/initspin.h: New file.
2407 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
2408 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
2409 (__pthread_alt_init_lock): Likewise.
2410 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
2412 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2414 * oldsemaphore.c (__old_sem_init): Release lock with
2415 LT_SPINLOCK_INIT, not zero.
2416 * spinlock.c (__pthread_unlock): Likewise.
2417 (__pthread_alt_lock): Likewise.
2418 (__pthread_alt_timedlock): Likewise.
2419 (__pthread_alt_unlock): Likewise.
2420 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
2421 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
2422 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
2423 LT_SPINLOCK_INIT do initialize spinlocks not 0.
2425 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2427 * shlib-versions: Add version definitions for hppa-linux.
2429 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2431 * sysdeps/hppa/pspinlock.c: New file.
2432 * sysdeps/hppa/pt-machine.h: New file.
2433 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
2435 2000-10-05 Jakub Jelinek <jakub@redhat.com>
2437 * mutex.c (__pthread_mutex_destroy): Correct test of
2438 busy mutex for mutexes using alternate fastlocks.
2439 Patch by dtc@cmucl.cons.org.
2441 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
2443 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
2445 2000-09-28 Ulrich Drepper <drepper@redhat.com>
2447 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
2448 test for owner first.
2449 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2451 * cancel.c (pthread_cancel): Don't do anything if cancelation is
2454 2000-09-26 Ulrich Drepper <drepper@redhat.com>
2456 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
2457 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2459 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2460 _POSIX_MONOTONIC_CLOCK.
2462 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
2465 2000-09-20 Andreas Jaeger <aj@suse.de>
2467 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
2468 "testrtsig.h" conditional.
2470 2000-09-11 Ulrich Drepper <drepper@redhat.com>
2472 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
2473 pthread_attr_setstack.
2474 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
2475 pthread_attr_setstack.
2476 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
2478 2000-09-05 Ulrich Drepper <drepper@redhat.com>
2480 * Examples/ex14.c: New file.
2481 * Makefile (tests): Add ex14.
2483 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
2484 mutex. Patch by dtc@cmucl.cons.org.
2486 * ecmutex.c: New file.
2487 * Makefile (tests): Add ecmutex.
2489 2000-09-04 H.J. Lu <hjl@gnu.org>
2491 * attr.c (__pthread_attr_setguardsize): Use page_roundup
2492 instead of roundup to round up to the page size.
2494 2000-09-03 Mark Kettenis <kettenis@gnu.org>
2496 * manager.c (pthread_exited): Correctly report event as TD_REAP
2497 instead of TD_DEATH. Fix comments.
2499 2000-09-03 Ulrich Drepper <drepper@redhat.com>
2501 * spinlock.h (testandset): Add cast to avoid warning.
2502 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
2504 2000-09-02 Andreas Jaeger <aj@suse.de>
2506 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
2509 2000-09-01 Ulrich Drepper <drepper@redhat.com>
2511 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2512 Fix typo in last patch (_mode -> _flags).
2514 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2515 Provide definition which respects _IO_USER_LOCK flag.
2517 2000-08-30 Ulrich Drepper <drepper@redhat.com>
2519 * manager.c (pthread_allocate_stack): Clear descriptor only if not
2522 2000-08-25 Ulrich Drepper <drepper@redhat.com>
2524 * Makefile: Add rules to build and run unload.
2525 * unload.c: New file.
2527 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
2529 * sysdeps/pthread/pthread.h
2530 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
2531 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
2533 2000-08-24 Andreas Jaeger <aj@suse.de>
2535 * Examples/ex13.c: Include <string.h> for strerror prototype and
2536 <stdlib.h> for abort prototype.
2537 (pthr_cond_signal_mutex): Rewrite to silence GCC.
2538 (thread_start): Remove unused variable err.
2539 (main): Silence GCC warnings.
2541 2000-08-22 Andreas Jaeger <aj@suse.de>
2543 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
2545 * Makefile (tests): Add ex13.
2547 2000-08-20 Ulrich Drepper <drepper@redhat.com>
2549 * semaphore.h: Add restrict where required by AGd4.
2550 * sysdeps/pthread/pthread.h: Likewise.
2551 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
2553 2000-08-15 Ulrich Drepper <drepper@redhat.com>
2555 * Makefile (tests): Add ex12. Add rule to build it.
2556 * Examples/ex12.c: New file.
2558 2000-08-13 Ulrich Drepper <drepper@redhat.com>
2560 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
2561 even though the implementation is not quite complete (but it reports
2562 it). Define _POSIX_MESSAGE_PASSING to -1.
2563 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2565 2000-08-12 Andreas Jaeger <aj@suse.de>
2567 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
2569 (__compare_and_swap): Likewise.
2570 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
2572 2000-08-10 Ulrich Drepper <drepper@redhat.com>
2574 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
2575 p_h_errnop correctly and not to NULL.
2577 2000-08-05 Ulrich Drepper <drepper@redhat.com>
2579 * Banner: Bump version number to 0.9.
2581 2000-08-04 Ulrich Drepper <drepper@redhat.com>
2583 * Makefile (tests): Add tststack. Add rule to build the program.
2584 * tststack.c: New file.
2586 * internals.h: Declare __pthread_max_stacksize.
2587 * pthread.c (__pthread_max_stacksize): New variable.
2588 (__pthread_initialize_manager): Determine __pthread_initialize_manager
2590 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
2591 (pthread_allocate_stack): Allow kernel to choose stack address if
2592 FLOATING_STACKS. This also handles variable-sized stacks.
2593 Always allocate stack and guardpage together. Use mprotect to
2594 change guardpage access.
2595 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
2596 ARCH_STACK_MAX_SIZE.
2598 * attr.c (__pthread_attr_setstacksize): Also test value against
2601 * manager.c (__pthread_nonstandard_stacks): Define only if
2602 THREAD_SELF is not defined.
2603 (pthread_allocate_stack): Always initialize gardaddr to a correct
2605 (pthread_handle_create): Unmap thread with one call.
2606 (pthread_free): Remove test for initial thread before removing stack.
2607 Unmap stack with one call.
2609 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
2610 1 to avoid removing the stack.
2612 2000-07-27 Jes Sorensen <jes@linuxcare.com>
2614 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
2615 load of spin lock to prime the cache before the atomic compare and
2616 exchange operation (cmpxchg4). This avoids the spinning on the
2617 cmpxchg4 instruction and reduces movement of the cache line back
2618 and forth between the processors (explanation by Asis K. Mallick
2619 from Intel). This basically makes the implementation operate the
2620 same as the Linux kernel implementation.
2622 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
2623 * sysdeps/ia64/pspinlock.c: New file.
2625 2000-08-03 Ulrich Drepper <drepper@redhat.com>
2627 * pthread.c: Move definition of __pthread_set_own_extricate_if...
2628 * spinlock.h: ...here. Remove locking.
2629 * internals.h: Remove __pthread_set_own_extricate_if prototype.
2631 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
2632 (rwlock_rd_extricate_func): Don't determine self, let
2633 __pthread_lock do it.
2634 (rwlock_wr_extricate_func): Likewise.
2635 (rwlock_have_already): Optimize *pself handling a bit.
2637 * mutex.c: Use __builtin_expect.
2638 * pthread.c: Likewise.
2640 2000-08-02 Andreas Jaeger <aj@suse.de>
2642 * sysdeps/s390/pspinlock.c: New file.
2643 * sysdeps/s390/pt-machine.h: New file.
2644 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
2646 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2648 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
2650 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2652 2000-07-26 Andreas Jaeger <aj@suse.de>
2654 * pthread.c: Initialize p_sem_avail.
2656 2000-07-25 Ulrich Drepper <drepper@redhat.com>
2658 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
2659 * semaphore.c: Handle spurious wakeups.
2661 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
2662 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
2664 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
2665 (__pthread_wait_for_restart): Likewise.
2667 * condvar.c (pthread_cond_wait): Also check whether thread is
2668 cancelable before aborting loop.
2669 (pthread_cond_timedwait): Likewise.
2671 * signals.c (pthread_sighandler): Remove special code to restrore
2673 (pthread_sighandler_t): Likewise.
2675 2000-07-25 Mark Kettenis <kettenis@gnu.org>
2677 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
2678 * pthread.c: Include <resolv.h>.
2679 (_res): Undefine. Add extern declaration.
2681 2000-07-24 Ulrich Drepper <drepper@redhat.com>
2683 * pthread.c (__pthread_initial_thread): Update initializer.
2684 (__pthread_manager_thread): Likewise.
2685 (pthread_initialize): Move setrlimit call to...
2686 (__pthread_initialize_manager): ...here.
2687 (__pthread_reset_main_thread): Reset also soft limit on stack size.
2689 * condvar.c: Handle spurious wakeups. [PR libc/1749].
2690 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
2692 2000-07-21 Ulrich Drepper <drepper@redhat.com>
2694 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
2695 __compare_and_swap to define testandset.
2696 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
2697 Define IMPLEMENT_TAS_WITH_CAS.
2699 2000-07-20 Ulrich Drepper <drepper@redhat.com>
2701 * Makefile: Pass -z nodelete to linker for libpthread.so
2702 generation if it understand this option.
2704 2000-07-18 Mark Kettenis <kettenis@gnu.org>
2706 * manager.c (pthread_handle_create): Remove initialization of
2707 new_thread->p_res._sock.
2709 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
2711 Bugfixes to the variant of the code for machines with no compare
2714 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
2715 node was not being properly enqueued, due to failing to update
2716 the lock->__status field.
2718 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
2719 being set inappropriately, causing the suspend function to be called
2720 with a null self pointer and crash.
2722 2000-07-18 Ulrich Drepper <drepper@redhat.com>
2724 * spinlock.h (__pthread_alt_trylock): Fix code used if no
2725 compare&swap is available.
2727 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
2730 * pthread.c (pthread_initialize): Don't use sysconf to determine
2731 whether the machine has more than one processor.
2733 * spinlock.c (__pthread_alt_timedlock): Add back one of the
2734 removed thread_self calls.
2736 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2738 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
2739 __compare_and_swap to compare_and_swap in code which assumes
2740 compare swap is available.
2742 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2744 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
2745 bug whereby thr field of waitnode structure would not be correctly
2746 set unless a null self pointer is passed to the functions.
2747 Eliminated redundant calls to thread_self().
2749 2000-07-18 Jakub Jelinek <jakub@redhat.com>
2751 * pthread.c (__pthread_initialize_manager): Lock
2752 __pthread_manager_thread.p_lock before calling clone.
2754 2000-05-05 H.J. Lu <hjl@gnu.org>
2756 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
2757 have acquire semantics.
2758 (__compare_and_swap_with_release_semantics): New inline
2760 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
2762 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
2764 * manager.c: Fix the problem with signals at startup.
2765 Change the way that thread stacks are allocated on IA64.
2766 Clean up some of the guard page allocation stuff.
2768 1999-12-19 H.J. Lu <hjl@gnu.org>
2770 * internals.h (page_roundup): New.
2771 * attr.c (__pthread_attr_setguardsize); Use page_roundup
2773 * manager.c (pthread_allocate_stack): Make sure guardaddr is
2774 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2777 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
2779 * manager.c (pthread_allocate_stack): Unmap the stack top
2780 if failed to map the stack bottom.
2782 (pthread_free): Fix the guard page.
2784 * pthread.c (pthread_initialize): Set rlimit correctly for
2785 NEED_SEPARATE_REGISTER_STACK.
2787 1999-12-16 H.J. Lu <hjl@gnu.org>
2789 * pthread.c (__pthread_initialize_manager): Pass
2790 __pthread_manager_thread_bos instead of
2791 __pthread_manager_thread_tos to __clone2.
2793 1999-12-16 H.J. Lu <hjl@gnu.org>
2795 * manager.c (pthread_allocate_stack): Correct the calculation
2796 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2799 1999-12-13 H.J. Lu <hjl@gnu.org>
2801 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2802 bit after setting ar.ccv.
2804 1999-12-12 H.J. Lu <hjl@gnu.org>
2806 * manager.c (pthread_allocate_stack): Make the starting
2807 address of the stack bottom page aligned. FIXME: it may
2808 need changes in other places.
2809 (pthread_handle_create): Likewise.
2811 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2813 * manager.c (pthread_allocate_stack): Handle
2814 NEED_SEPARATE_REGISTER_STACK.
2815 (pthread_handle_create): Likewise.
2816 * pthread.c (__pthread_initialize_manager): Likewise.
2818 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2820 1999-12-02 H.J. Lu <hjl@gnu.org>
2822 * sysdeps/ia64/pt-machine.h: New.
2824 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2826 * wrapsyscall.c: Mark non-__ protected names as weak.
2829 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2831 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2833 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2835 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2836 Add tests also to new alternative spinlock implementation.
2837 * spinlock.h: Likewise.
2838 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2840 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2842 * Version: Export __sigaction.
2843 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2845 * pthread.c: Use __libc_sigaction instead of __sigaction.
2847 * condvar.c: Implement pthread_condattr_getpshared and
2848 pthread_condattr_setpshared.
2849 * mutex.c: Implement pthread_mutexattr_getpshared and
2850 pthread_mutexattr_setpshared.
2851 * Versions: Export new functions.
2852 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2854 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2855 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2858 2000-07-04 Greg McGary <greg@mcgary.org>
2860 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2861 pragmas. Include bp-sym.h only if _LIBC.
2863 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2865 * spinlock.c (__pthread_unlock): Properly place write barrier.
2866 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2868 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2870 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2871 faster on SMP systems. No more emulation of compare&swap for adaptive
2873 * spinlock.h: Likewise.
2874 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2875 Replace fast with adaptive mutex.
2876 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2877 * condvar.c: Likewise.
2878 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2879 * internals.h: Declare __pthread_smp_kernel.
2880 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2881 _pthread_fastlock structure.
2882 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2884 * pthread.c: Remove initialization to zero from global variables.
2886 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2888 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2890 2000-06-28 Greg McGary <greg@mcgary.org>
2892 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2893 pthread functions that have pointers in their return+arg signatures.
2895 2000-06-27 Greg McGary <greg@mcgary.org>
2897 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2898 extern declarations of pthread functions that have pointers in
2899 their return+arg signatures.
2901 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2903 * Makefile (tests): Add ex11. Add rules to build it.
2904 * Examples/ex11.c: New file.
2905 * rwlock.c: Fix complete braindamaged previous try to implement
2908 * spinlock.c: Pretty print.
2910 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2912 * Makefile (tests): Add ex10. Add rules to build it.
2913 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2914 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2915 * condvar.c (pthread_cond_wait): Allow mutex of kind
2916 PTHREAD_MUTEX_TIMED_NP.
2917 (pthread_cond_timedwait_relative): Likewise.
2918 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2919 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2920 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2921 (__pthread_mutex_lock): Use __pthread_alt_lock for
2922 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2923 (__pthread_mutex_timedlock): New function.
2924 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2925 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2926 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2927 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2928 * spinlock.c: Implement alternate fastlocks.
2929 * spinlock.h: Add prototypes.
2930 * Examples/ex10.c: New file.
2931 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2932 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2934 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2935 (__pthread_rwlock_timedrdlock): New function.
2936 (__pthread_rwlock_timedwrlock): New function.
2937 Use laternate fastlock function everywhere.
2939 2000-06-21 Andreas Jaeger <aj@suse.de>
2941 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2944 * join.c: Include <stdlib.h> for exit prototype.
2946 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2948 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2950 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2951 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2953 * Makefile (libpthread-routines): Add barrier.
2954 (tests): Add ex9. Add rule to build ex9.
2955 * Versions: Export barrier functions.
2956 * barrier.c: New file.
2957 * Examples/ex9.c: New file.
2958 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2959 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2960 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2962 2000-06-19 H.J. Lu <hjl@gnu.org>
2964 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2965 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2966 (compare_and_swap_with_release_semantics): New. Default to
2967 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2970 * spinlock.c (__pthread_unlock): Call
2971 compare_and_swap_with_release_semantics () instead of
2972 compare_and_swap ().
2974 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2976 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2978 * sysdeps/pthread/timer_delete.c: Likewise.
2979 * sysdeps/pthread/timer_getoverr.c: Likewise.
2980 * sysdeps/pthread/timer_gettime.c: Likewise.
2981 * sysdeps/pthread/timer_settime.c: Likewise.
2983 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2985 Timer nodes are now reference counted, and can be marked
2986 as deleted. This allows for the safe release of the global mutex
2987 in the middle without losing the timer being operated on.
2989 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2990 member is now an enum with three values, so that an intermediate
2991 state can be represented (deleted but not free for reuse yet).
2992 New refcount member added.
2993 * sysdeps/pthread/timer_routines.c: Likewise.
2995 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2996 timer_valid): New inline functions added.
2998 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2999 restructured, recursive deadlock bug fixed.
3001 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
3002 timer_addref to ensure that timer won't be deleted while mutex is not
3003 held. Also uses timer_invalid to perform validation of timer handle.
3004 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3005 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
3007 2000-06-14 Ulrich Drepper <drepper@redhat.com>
3009 * shlib-versions: Add entry for SH.
3010 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
3012 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
3014 A few optimizations. Got rid of unnecessary wakeups of timer threads,
3015 tightened up some critical regions and micro-optimized some list
3018 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3019 Returns int value now to indicate whether timer was queued at head.
3020 * sysdeps/pthread/posix-timer.h: Likewise.
3021 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
3022 new return value from __timer_thread_queue_timer to avoid waking
3023 up timer thread unnecessarily.
3025 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
3026 inuse flag, because this requires mutex to be held. Callers updated
3027 to do the check when they have the mutex.
3028 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
3030 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
3031 regions: avoids making system calls while holding timer mutex, and
3032 a few computations were moved outside of the mutex as well.
3033 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
3035 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
3036 to list_unlink_ip, meaning idempotent. Pointer manipulation
3037 changed to get better better code out of gcc.
3038 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
3039 version of list_unlink added here.
3040 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
3041 function in all places: idempotent one for timers, non-idempotent
3042 one for thread nodes.
3043 * sysdeps/pthread/timer_settime: Likewise.
3044 * sysdeps/pthread/timer_routines.c: Likewise.
3046 2000-06-13 Ulrich Drepper <drepper@redhat.com>
3048 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
3049 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3051 * sysdeps/pthread/Makefile: Remove tests definition.
3053 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3054 Yutaka Niibe <gniibe@chroot.org>
3056 * sysdeps/sh/pspinlock.c: New file.
3057 * sysdeps/sh/pt-machine.h: New file.
3059 2000-06-12 Ulrich Drepper <drepper@redhat.com>
3061 * Makefile (tests): Add joinrace.
3063 * Examples/ex6.c: Test return value of pthread_join.
3065 2000-06-11 Geoff Keating <geoffk@cygnus.com>
3067 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
3068 (__pthread_spin_trylock): Implement.
3069 (__pthread_spin_unlock): Implement.
3070 (__pthread_spin_init): Implement.
3071 (__pthread_spin_destroy): Implement.
3073 2000-06-10 Ulrich Drepper <drepper@redhat.com>
3075 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
3076 really append the entry.
3078 2000-06-10 Andreas Jaeger <aj@suse.de>
3080 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
3082 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
3084 * sysdeps/pthread/timer_create.c: Thread matching now done on
3085 clock type as well as thread attributes.
3086 There are individual global signal-delivering threads for
3087 different clock types.
3088 * sysdeps/pthread/posix-timer.h: Likewise.
3089 * sysdeps/pthread/timer_routines.c: Likewise.
3091 * sysdeps/pthread/timer_routines.c: Thread allocation and
3092 deallocation function now remembers to put thread on active
3093 list and remove from active list.
3094 Thus now the feature of binding multiple timers
3095 to a single thread actually works.
3097 2000-06-10 Ulrich Drepper <drepper@redhat.com>
3099 * pthread.c (__pthread_create_2_1): Optimize a bit.
3101 * internals.h (invalid_handle): Also test for p_terminated != 0.
3102 (nonexisting_handle): New function. Same as old invalid_handle.
3103 * join.c (pthread_join): Use nonexisting_handle instead of
3104 invalid_handle to test for acceptable thread handle.
3105 * manager.c (pthread_handle_free): Likewise.
3106 * joinrace.c: New file.
3107 Reported by Permaine Cheung <pcheung@cygnus.com>.
3109 2000-06-08 Ulrich Drepper <drepper@redhat.com>
3111 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3112 Correct handling of matching variable.
3114 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
3117 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3118 Be prepared for empty timer list.
3120 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
3121 CPUTIME clock ID. Add support for thread clocks.
3123 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
3124 subtraction were switched.
3126 * sysdeps/pthread/timer_routines.c (init_module): Use
3127 THREAD_MAXNODES threads.
3129 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
3130 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
3131 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
3132 with sigqueueinfo is this system call is available.
3134 * sysdeps/pthread/timer_create.c (timer_create): Allow
3135 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
3137 * sysdeps/pthread/Makefile: New file. Add rules to build timer
3139 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
3141 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
3143 * sysdeps/pthread/posix-timer.h: New file.
3144 * sysdeps/pthread/timer_create.c: New file.
3145 * sysdeps/pthread/timer_delete.c: New file.
3146 * sysdeps/pthread/timer_getoverr.c: New file.
3147 * sysdeps/pthread/timer_gettime.c: New file.
3148 * sysdeps/pthread/timer_routines.c: New file.
3149 * sysdeps/pthread/timer_settime.c: New file.
3150 * sysdeps/pthread/tst-timer.c: New file.
3152 2000-06-08 Ulrich Drepper <drepper@redhat.com>
3154 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
3155 LINK_MAX definitions if necessary.
3157 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
3159 Added missing fork time handling of global libio lock.
3161 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
3162 not just the individual stream locks. Rewritten to use new
3163 iterator interface provided by libio rather than accessing
3166 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
3167 which lock and unlock the stream list using the new interface
3169 * internals.h: Likewise.
3171 * ptfork.c (__fork): Now calls __flockfilelist before fork,
3172 and __funlockfilelist in the parent after the fork.
3173 Child still calls __fresetlockfiles as before.
3175 * linuxthreads.texi: Now explains what happens to streams at
3176 fork time. Also whole new section on forking and thread added.
3177 Definition of pthread_atfork moved out of Miscellaneous Functions
3178 to this new section.
3180 2000-06-04 Jakub Jelinek <jakub@redhat.com>
3182 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
3183 Add missing register.
3184 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
3186 2000-06-02 Jakub Jelinek <jakub@redhat.com>
3188 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
3189 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
3190 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
3192 2000-05-31 Andreas Jaeger <aj@suse.de>
3194 * sysdeps/mips/pspinlock.c: Implement spinlocks.
3196 2000-05-28 Ulrich Drepper <drepper@redhat.com>
3198 * spinlock.c (__pthread_lock): Remove ASSERT.
3200 * Makefile (tests): Add ex8.
3201 * Examples/ex8.c: New file.
3203 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
3205 Bugfix: The pthread_atfork mechanism now takes care of its
3206 own internal mutex at fork time.
3208 * ptfork.c (__fork): Revised so that the mutex is held across
3209 the fork operation and while the handlers are called, and so that
3210 the child resets the mutex.
3212 * linuxthreads.texi: Updated pthread_atfork documentation to make
3213 it clear that fork and pthread_atfork can't be reentered from
3214 atfork handlers, that pthread_atfork and fork are mutually atomic,
3215 and that the handlers are inherited by the child process.
3217 2000-05-24 Ulrich Drepper <drepper@redhat.com>
3219 * Makefile (libpthread-routines): Add pspinlock.
3220 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
3221 Use struct _pthread_fastlock instead of pthread_spinlock_t.
3222 * condvar.c: Likewise.
3223 * internals.h: Likewise.
3225 * manager.c: Likewise.
3226 * mutex.c: Likewise.
3227 * pthread.c: Likewise.
3228 * rwlock.c: Likewise.
3229 * semaphore.c: Likewise.
3230 * signals.c: Likewise.
3231 * spinlock.h: Likewise.
3232 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
3233 * sysdeps/alpha/pspinlock.c: New file.
3234 * sysdeps/arm/pspinlock.c: New file.
3235 * sysdeps/i386/pspinlock.c: New file.
3236 * sysdeps/m68k/pspinlock.c: New file.
3237 * sysdeps/mips/pspinlock.c: New file.
3238 * sysdeps/powerpc/pspinlock.c: New file.
3239 * sysdeps/sparc/sparc32/pspinlock.c: New file.
3240 * sysdeps/sparc/sparc64/pspinlock.c: New file.
3241 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
3242 back to _pthread_fastlock. Define new pthread_spinlock_t.
3244 2000-05-24 Andreas Jaeger <aj@suse.de>
3246 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
3248 2000-05-21 Jakub Jelinek <jakub@redhat.com>
3250 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
3252 2000-05-13 Jakub Jelinek <jakub@redhat.com>
3254 * internals.h (__RES_PTHREAD_INTERNAL): Define.
3256 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3258 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
3259 object state is represented with additional bits which distinguish
3260 whether that state was set up in the current process, or
3261 in an ancestor process. If that state was set in an ancestor,
3262 it means that a fork happened while thread was executing the init
3263 function. In that case, the state is reset to NEVER.
3264 * mutex.c (__pthread_once_fork_prepare): New function.
3265 (__pthread_once_fork_child): Likewise
3266 (__pthread_once_fork_parent): Likewise
3267 (__pthread_reset_pthread_once): Removed.
3268 * ptfork.c (__fork): Call new handlers in mutex.c.
3269 * internals.h: Declarations of new mutex.c functions added.
3270 Declaration of removed function deleted.
3271 * linuxthreads.texi: Updated documentation about pthread_once
3272 to clarify what happens under cancellation and forking.
3274 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3276 * internals.h: New thread manager request type, REQ_KICK.
3277 * join.c (pthread_exit): main thread now calls exit() instead
3278 of _exit() in order to proper process cleanup.
3279 * manager.c (__pthread_manager): Do not terminate manager
3280 after unblocking main thread; wait for main thread's
3281 REQ_PROCESS_EXIT request instead.
3282 Also, added REQ_KICK case to handle new request; this just does
3284 * manager.c (pthread_exited): Do not terminate manager after
3285 unblocking main thread.
3286 * manager.c (__pthread_manager_sighandler): If the main thread
3287 is waiting for all other threads to die, send a REQ_KICK into
3288 the thread manager request pipe to get it to clean out the threads
3289 and unblock the main thread as soon as possible. This fixes
3290 the 2000 millisecond hang on shutdown bug.
3291 * Examples/ex7.c: New file, tests shutdown behavior when all threads
3292 including the main one call pthread_exit(), or implicitly do so.
3293 * Makefile (tests): Add ex7.
3295 2000-05-05 Andreas Jaeger <aj@suse.de>
3297 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3298 (pthread_getcpuclockid): Correct test for ourselves.
3300 2000-05-05 Ulrich Drepper <drepper@redhat.com>
3302 * internals.h (struct _pthread_descr_struct): Reorganization.
3303 Allocate room for 16 pointers at head of the structure for future
3304 thread-local data handling. Move p_self member in this area.
3305 * manager.c (pthread_handle_create): Adjust use of p_self.
3306 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
3307 * pthread.c (__pthread_initial_thread): Adjust initialization.
3308 (__pthread_manager_thread): Likewise.
3310 2000-04-29 Bruno Haible <haible@clisp.cons.org>
3312 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
3313 for eventmask larger than 1 word.
3315 2000-04-27 Ulrich Drepper <drepper@redhat.com>
3317 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
3318 * pthread.c (__pthread_initialize_minimal): New function. Perform
3319 minimal initialization.
3320 (pthread_initialize): Remove this code here.
3321 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
3322 are working around the problem in glibc.
3324 2000-04-25 Ulrich Drepper <drepper@redhat.com>
3326 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
3327 now. First gcc must be fixed (more concrete: libgcc).
3329 2000-04-24 Ulrich Drepper <drepper@redhat.com>
3331 * pthread.c: Remove special treatement for interrupt handlers on x86.
3332 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
3333 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
3335 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
3337 2000-04-24 Mark Kettenis <kettenis@gnu.org>
3339 * join.c (pthread_exit): Set p_terminated after reporting the
3340 termination event instead of before.
3342 2000-04-20 Jakub Jelinek <jakub@redhat.com>
3344 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
3347 2000-04-18 Andreas Jaeger <aj@suse.de>
3349 * Versions: Use ld instead of ld.so.
3351 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3353 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
3354 Remove the typedef keyword.
3356 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3358 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
3360 (READ_MEMORY_BARRIER): Define.
3361 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
3363 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
3366 2000-04-17 Ulrich Drepper <drepper@redhat.com>
3368 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3369 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
3370 use thread_handle().
3372 2000-04-16 Ulrich Drepper <drepper@redhat.com>
3374 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
3375 if fast mutex is used. Don't initialize `already_canceled' twice.
3376 Correctly test for return value of timedsuspend.
3378 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
3379 therefore don't need the _rt versions of the signal handlers.
3381 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3383 * pthread.c (pthread_yield): New function.
3384 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
3385 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
3386 * internals.h: Declare __pthread_yield.
3388 * pthread.c (pthread_initialize): Avoid a bit more code if
3389 realtime signals are known to exist.
3391 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
3392 to dynamically detect RT signals and avoid generating compatibility
3393 functions with old kernel.
3394 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
3395 __pthread_restart_new directly.
3396 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
3397 __pthread_wait_for_restart_signal directly.
3398 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
3399 __pthread_timedsuspend_new directly.
3401 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3403 * condvar.c: Remove all the special code to handle cond_timedwait.
3404 Use timedsuspend instead.
3405 * internals.h: Declare __pthread_timedsuspend_old,
3406 __pthread_timedsuspend_new, and __pthread_timedsuspend.
3407 Remove declaration of __pthread_init_condvar.
3408 * pthread.c: Define __pthread_timedsuspend variable.
3409 (__pthread_timedsuspend_old): New function. Timed suspension
3410 implementation for old Linux kernels.
3411 (__pthread_timedsuspend_new): New function. Timed suspension
3412 implementation for new Linux kernels.
3413 * restart.h (timedsuspend): New function. Call appropriate
3414 suspension function through __pthread_timedsuspend.
3415 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
3417 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3419 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
3421 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
3423 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.