1 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
4 unterminated string literals.
5 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
7 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10 (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from
13 (SINGLE_THREAD_P): Save an instruction.
14 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
15 parameter to SINGLE_THREAD_P call.
16 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
19 2003-01-10 Andreas Schwab <schwab@suse.de>
21 * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
23 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
25 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
26 backchain in pseudo_cancel. Minor code improvements.
27 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
30 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
32 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
33 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
35 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
37 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
39 2002-01-09 Richard Henderson <rth@redhat.com>
41 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
42 ret follows pseudo, and thus avoid branch-to-branch in cancel
43 case. Use SYSCALL_ERROR_LABEL.
45 2003-01-11 Philip Blundell <philb@gnu.org>
47 * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
48 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
50 (UNDOARGS_5): Fix ordering of pushes and pops.
51 (SINGLE_THREAD_P_PIC): New.
52 (SINGLE_THREAD_P_INT): New.
53 (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it
55 (PSEUDO): Use SINGLE_THREAD_P_INT.
57 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
59 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
61 2003-01-11 Jakub Jelinek <jakub@redhat.com>
63 * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
64 [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
65 TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
66 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
67 INIT_THREAD_SELF): Define.
68 [HAVE_TLS_SUPPORT]: Include descr.h.
69 (NONTLS_INIT_TP): Point __thread_self at the end of dummy
70 struct _pthread_descr_struct.
71 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
72 THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
74 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
76 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
78 (__pthread_initialize_manager): Rename tcb to mgr.
79 Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
80 _pthread_descr) below tcbp, otherwise to tcbp.
81 * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
82 new_thread to be below _dl_allocate_tls (). Adjust new_thread back
83 before freeing. Fix clone arguments if report_events and USE_TLS.
84 (pthread_free): Adjust th back before freeing.
86 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
88 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
89 * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
90 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
92 2003-01-09 Jakub Jelinek <jakub@redhat.com>
94 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
95 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
96 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
97 [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
98 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
99 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
100 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
101 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
102 * tst-popen.c: New test.
103 * Makefile (tests): Add tst-popen.
105 2003-01-06 Jakub Jelinek <jakub@redhat.com>
107 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
108 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
110 2003-01-06 Jakub Jelinek <jakub@redhat.com>
112 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
113 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
115 2003-01-06 Philip Blundell <philb@gnu.org>
117 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
119 2003-01-06 Jakub Jelinek <jakub@redhat.com>
121 * internals.h (LIBC_CANCEL_HANDLED): Define.
122 * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
123 * signals.c (LIBC_CANCEL_HANDLED): Add.
124 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
125 * tst-cancel-wrappers.sh: Remove all exceptions.
127 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
129 2003-01-05 Andreas Schwab <schwab@suse.de>
131 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
134 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
137 (CDISABLE): Likewise.
139 2003-01-05 Ulrich Drepper <drepper@redhat.com>
141 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
142 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
144 * Makefile (libc.so-no-z-defs): Define to yes.
146 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
148 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
149 (tcbhead_t): Add multiple_threads member.
150 (TLS_INIT_TP_EXPENSIVE): Define.
151 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
152 strings. Remove unused code.
153 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
155 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
157 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
158 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
160 2003-01-04 Jakub Jelinek <jakub@redhat.com>
162 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
163 even if NOT_IN_libc is defined.
165 2003-01-05 Jakub Jelinek <jakub@redhat.com>
167 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
168 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
169 * sysdeps/s390/Makefile: New file.
170 * sysdeps/s390/tcb-offsets.sym: New file.
171 * sysdeps/s390/tls.h: New file.
173 2003-01-03 Richard Henderson <rth@redhat.com>
175 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
177 2003-01-03 Andreas Jaeger <aj@suse.de>
179 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
181 2003-01-03 Jakub Jelinek <jakub@redhat.com>
183 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
185 2003-01-02 Ulrich Drepper <drepper@redhat.com>
187 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
190 2003-01-02 Jakub Jelinek <jakub@redhat.com>
192 * internals.h (struct pthread_functions): Rename
193 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
194 * pthread.c (pthread_functions): Adjust.
195 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
196 pthread_cond_*@GLIBC_2.0 compatibility symbols.
197 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
198 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
199 and pthread_cond_wait.
201 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
203 (pthread_cond_t): Add __align member, shorten __padding.
204 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
205 __padding and __align too.
207 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
209 * sysdeps/pthread/sigaction.c: New file.
210 * sysdeps/unix/sysv/linux/raise.c: New file.
211 * sysdeps/unix/sysv/linux/sigwait.c: New file.
212 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
213 weak_extern with #ifndef SHARED.
214 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
216 * signals.c (__sigaction): Renamed to...
217 (__pthread_sigaction): ... this.
218 (__sigaction): New strong alias, #ifdef SHARED only.
219 (sigaction): Protect with #ifdef SHARED.
220 (sigwait): Renamed to...
221 (__pthread_sigwait): ... this.
222 (sigwait): New strong alias, #ifdef SHARED only.
223 (raise): Renamed to...
224 (__pthread_raise): ... this.
225 (raise): New strong alias, #ifdef SHARED only.
226 * internals.h (__pthread_sigaction, __pthread_sigwait,
227 __pthread_raise): New prototypes.
228 (struct pthread_functions): Add ptr_pthread_sigaction,
229 ptr_pthread_sigwait, ptr_pthread_raise.
230 * pthread.c (pthread_functions): Renamed to...
231 (__pthread_functions): ... this. No longer static, no longer
232 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
233 and ptr_pthread_raise.
234 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
235 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
236 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
237 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
239 * Makefile (tests, tests-static): Add tst-cancel-static.
240 * tst-cancel-static.c: New test.
242 2003-01-02 Jakub Jelinek <jakub@redhat.com>
244 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
246 2003-01-02 Ulrich Drepper <drepper@redhat.com>
248 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
249 * condvar.c: Add symbol versioning. The compatibility versions
250 are the same as the change in the interface does not effect this
252 * Versions [libpthread]: Add definitions for new pthread_cond_*
253 interfaces for version GLIBC_2.3.2.
255 2002-12-31 Ulrich Drepper <drepper@redhat.com>
257 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
259 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
260 for __register_atfork.
262 2002-12-31 Jakub Jelinek <jakub@redhat.com>
264 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
265 ASSEMBLER test macro.
266 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
267 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
268 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
269 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
270 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
271 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
273 * sysdeps/pthread/errno-loc.c (__errno_location): Add
275 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
276 * sysdeps/pthread/res-state.c (__res_state): Likewise.
277 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
278 __libc_current_sigrtmax): Likewise.
279 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
280 __libc_internal_tsd_set, __libc_internal_tsd_address,
281 __libc_alloca_cutoff.
282 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
283 __libc_internal_tsd_set, __libc_internal_tsd_address.
285 * sysdeps/pthread/list.h: Remove assert.h include.
286 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
288 * sysdeps/pthread/list.h: New file.
289 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
290 * sysdeps/unix/sysv/linux/fork.c: New file.
291 * sysdeps/unix/sysv/linux/fork.h: New file.
292 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
293 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
294 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
295 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
296 * sysdeps/unix/sysv/linux/Makefile: New file.
297 * sysdeps/unix/sysv/linux/Versions: New file.
298 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
299 (__pthread_cleanup_upto): ...this. Add targetframe argument,
300 use it instead of currentframe. No longer static.
301 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
302 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
303 (struct pthread_functions): Add ptr_pthread_fork,
304 ptr_pthread_cleanup_upto.
305 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
306 ptr_pthread_cleanup_upto.
307 * ptfork.c: Include fork.h.
308 (struct handler_list, struct handler_list_block): Remove.
309 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
310 pthread_atfork_child): Remove.
311 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
312 (__pthread_fork): New function.
313 (__fork, __vfork): Call __libc_fork.
314 * Makefile (libpthread-routines): Add old_pthread_atfork.
315 (libpthread-nonshared): Add pthread_atfork.
316 (others): Depend on $(objpfx)libpthread_nonshared.a.
317 ($(objpfx)libpthread_nonshared.a): New rule.
318 (install): Depend on $(inst_libdir)/libpthread.so.
319 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
321 (tests): Depend on libpthread_nonshared.a too.
322 * old_pthread_atfork.c: New file.
323 * pthread_atfork.c: New file.
324 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
327 2002-12-30 Jakub Jelinek <jakub@redhat.com>
329 * forward.c: Make all functions available by default again. It
330 caused too much trouble.
331 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
332 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
333 ptr___pthread_attr_init_2_*.
334 * pthread.c (pthread_functions): Adjust.
336 2002-12-28 Jakub Jelinek <jakub@redhat.com>
338 * libc_pthread_init.c (__libc_pthread_init): Remove
339 MULTIPLE_THREADS_OFFSET check.
340 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
341 (SYSINFO_OFFSET): Remove.
342 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
344 * sysdeps/i386/tcb-offsets.sym: New file.
345 * sysdeps/pthread/tcb-offsets.h: New file.
346 * sysdeps/sparc/sparc32/tls.h: Removed.
347 * sysdeps/sparc/sparc64/tls.h: Move...
348 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
349 * sysdeps/sparc/Makefile: New file.
350 * sysdeps/sparc/tcb-offsets.sym: New file.
351 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
352 * sysdeps/ia64/Makefile: New file.
353 * sysdeps/ia64/tcb-offsets.sym: New file.
354 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
355 (MULTIPLE_THREADS_OFFSET): Remove.
356 Replace defined MULTIPLE_THREADS_OFFSET
357 with defined FLOATING_STACKS && USE___THREAD.
358 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
359 (MULTIPLE_THREADS_OFFSET): Remove.
360 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
361 (MULTIPLE_THREADS_OFFSET): Remove.
362 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
363 (MULTIPLE_THREADS_OFFSET): Remove.
364 * pthread.c (__pthread_initialize_manager): Remove
365 MULTIPLE_THREADS_OFFSET cbeck.
367 * tst-cancel-wrappers.sh: Add line continuations.
369 2002-12-27 Jakub Jelinek <jakub@redhat.com>
371 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
372 and bits/libc-lock.h.
373 (__libc_internal_tsd_get, __libc_internal_tsd_set,
374 __libc_internal_tsd_address): Remove.
375 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
376 __pthread_internal_tsd_set): New weak_externs.
377 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
378 using __libc_maybe_call2.
379 (__libc_tsd_key_t): Move to ...
380 * descr.h (__libc_tsd_key_t): ...here.
381 Remove bits/libc-tsd.h include.
382 * sysdeps/pthread/errno-loc.c: New file.
383 * sysdeps/pthread/herrno-loc.c: New file.
384 * sysdeps/pthread/res-state.c: New file.
385 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
386 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
387 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
389 * specific.c (libc_internal_tsd_set): Renamed to...
390 __pthread_internal_tsd_set. Remove static.
391 (libc_internal_tsd_get): Renamed to...
392 __pthread_internal_tsd_get. Remove static.
393 (libc_internal_tsd_address): Renamed to...
394 __pthread_internal_tsd_address. Remove static.
395 (__libc_internal_tsd_set, __libc_internal_tsd_get,
396 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
397 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
399 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
400 __pthread_internal_tsd_address): New prototypes.
401 (struct pthread_functions): Add
402 ptr_pthread_internal_tsd_([sg]et|address) fields.
403 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
404 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
405 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
406 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
407 * alloca_cutoff.c: New file.
409 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
410 * pt-system.c (system): Remove cancellation handling.
411 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
412 cancellation routines.
414 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
415 (tcbhead_t): Add sysinfo field.
416 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
417 (TLS_INIT_TP): Use INIT_SYSINFO.
418 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
419 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
420 (MULTIPLE_THREADS_OFFSET): Adjust.
421 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
422 (MULTIPLE_THREADS_OFFSET): Likewise.
423 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
424 (MULTIPLE_THREADS_OFFSET): Likewise.
425 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
426 (MULTIPLE_THREADS_OFFSET): Likewise.
427 * descr.h: Include stdint.h.
428 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
430 2002-12-22 Jakub Jelinek <jakub@redhat.com>
432 * libc_pthread_init.c: Include stdlib.h.
433 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
434 (TLS_INIT_TP_EXPENSIVE): Define.
435 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
436 __libc_maybe_call2): In _LIBC check SHARED define.
437 * sysdeps/ia64/tls.h: New file.
438 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
439 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
440 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
441 * sysdeps/sparc/sparc32/tls.h: New file.
442 * sysdeps/sparc/sparc64/tls.h: New file.
443 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
444 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
445 * Makefile (tests): Add tst-cancel[1-6].
446 (tests-reverse): Add tst-cancel5.
447 Link libc.so before libpthread.so for tests-reverse.
448 * tst-cancel1.c: New file.
449 * tst-cancel2.c: New file.
450 * tst-cancel3.c: New file.
451 * tst-cancel4.c: New file.
452 * tst-cancel5.c: New file.
453 * tst-cancel6.c: New file.
455 2002-12-27 Andreas Schwab <schwab@suse.de>
457 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
459 2002-12-22 Roland McGrath <roland@redhat.com>
461 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
463 2002-12-21 Ulrich Drepper <drepper@redhat.com>
465 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
466 Reported by Art Hass <ahaas@airmail.net>.
468 2002-12-19 Jakub Jelinek <jakub@redhat.com>
470 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
471 Use return 0 as 6th argument to FORWARD4.
473 2002-12-18 Jakub Jelinek <jakub@redhat.com>
475 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
476 define if __ASSUME_LDT_WORKS > 0.
477 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
478 struct member access if !FLOATING_STACKS.
479 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
481 2002-12-18 Jakub Jelinek <jakub@redhat.com>
483 * internals.h (__pthread_thread_self): New prototype.
484 (struct pthread_functions): Add ptr_pthread_thread_self field.
485 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
486 (__pthread_thread_self): New function.
487 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
488 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
489 use thread_self() directly if not FLOATING_STACKS.
491 2002-12-18 Jakub Jelinek <jakub@redhat.com>
493 * sysdeps/x86_64/pt-machine.h: Guard most of the header
494 with #ifndef __ASSEMBLER__.
495 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
496 pthread_attr_init_2_0 use.
498 2002-12-17 Jakub Jelinek <jakub@redhat.com>
500 * wrapsyscall.c: Removed.
502 * Makefile (distribute): Add tst-cancel-wrappers.sh.
503 (routines): Remove weaks. Add forward,
504 libc_pthread_init, libc-cancellation.
505 (shared-only-routines): Remove weaks. Add forward.
506 (libpthread-routines): Remove wrapsyscall.
507 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
508 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
509 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
510 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
511 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
512 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
513 (libpthread-shared-only-routines): Add pt-allocrtsig.
514 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
515 ($(objpfx)tst-cancel-wrappers.out): New rule.
516 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
518 (__libc_maybe_call): In libpthread.* don't check for existance
520 (__libc_maybe_call2): Define.
521 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
522 __libc_lock_trylock, __libc_lock_unlock): Use it.
523 * sysdeps/pthread/flockfile.c: New file.
524 * sysdeps/pthread/ftrylockfile.c: New file.
525 * sysdeps/pthread/funlockfile.c: New file.
526 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
527 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
528 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
529 * libc-cancellation.c: New file.
530 * forward.c: New file.
531 * libc_pthread_init.c: New file.
532 * pt-system.c: New file.
533 * pthread.c: Remove locale.h.
534 (__pthread_manager_thread): Initialize multiple_threads.
535 (__pthread_multiple_threads): Declare.
536 (pthread_functions): New variable.
537 (__pthread_initialize_minimal): Remove __uselocale call.
538 Call __libc_pthread_init.
539 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
540 initial thread's multiple_threads and __libc_multiple_threads.
541 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
543 (pthread_setschedparam, pthread_getschedparam): Rename to __
544 prefixed variants. Add strong_alias.
545 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
546 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
547 (init_rtsigs): Use __libc_current_sigrtmin_private.
548 (pthread_initialize): Only call init_rtsigs if
549 !__ASSUME_REALTIME_SIGNALS.
550 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
551 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
552 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
553 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
554 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
555 __pthread_attr_getinheritsched, __pthread_attr_setscope,
556 __pthread_attr_getscope, __pthread_cond_init,
557 __pthread_cond_destroy, __pthread_cond_wait,
558 __pthread_cond_signal, __pthread_cond_broadcast,
559 __pthread_condattr_init, __pthread_condattr_destroy,
560 __pthread_equal, __pthread_getschedparam,
561 __pthread_setschedparam, __pthread_setcancelstate,
562 __pthread_setcanceltype, __pthread_enable_asynccancel,
563 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
564 (__pthread_mutex_init, __pthread_mutex_destroy,
565 __pthread_mutex_lock, __pthread_mutex_unlock,
566 __pthread_mutex_trylock): Likewise.
568 (struct pthread_functions): New type.
569 (__libc_pthread_functions): New variable.
570 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
571 * descr.h (struct _pthread_descr_struct): Add
572 p_header.data.multiple_threads field.
573 * manager.c (pthread_handle_create): Initialize multiple_threads.
574 * cancel.c (__pthread_enable_asynccancel,
575 __pthread_disable_asynccancel): New functions.
576 (__pthread_provide_wrappers): Remove.
577 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
578 prefixed variants. Add strong_alias.
579 * condvar.c (pthread_cond_init, pthread_cond_destroy,
580 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
581 pthread_condattr_init, pthread_condattr_destroy): Likewise.
582 * join.c (pthread_exit): Likewise.
583 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
584 pthread_attr_getdetachstate, pthread_attr_setschedparam,
585 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
586 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
587 pthread_attr_getinheritsched, pthread_attr_setscope,
588 pthread_attr_getscope): Likewise.
589 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
590 __pthread_mutex_lock, __pthread_mutex_unlock,
591 __pthread_mutex_trylock): Add hidden_def.
592 * Versions (libc): Add __libc_pthread_init,
593 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
594 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
595 * lockfile.c: Remove some USE_IN_LIBIO guards.
596 (__pthread_provide_lockfile): Remove.
597 * pt-allocrtsig.c: New file.
598 * tst-cancel-wrappers.sh: New test.
600 2002-12-15 Ulrich Drepper <drepper@redhat.com>
602 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
603 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
604 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
605 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
607 2002-12-10 Ulrich Drepper <drepper@redhat.com>
609 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
610 weak. There is no reason for that.
611 (CANCELABLE_SYSCALL_VA): Likewise.
613 2002-12-09 Ulrich Drepper <drepper@redhat.com>
615 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
616 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
617 * Versions: Export creat, poll, pselect, readv, select, sigpause,
618 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
619 libpthread in version GLIBC_2.3.2.
621 2002-12-06 Ulrich Drepper <drepper@redhat.com>
623 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
625 2002-12-05 Roland McGrath <roland@redhat.com>
627 * pthread.c (__pthread_initialize_minimal)
628 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
629 TCB if the dynamic linker didn't do it at startup.
631 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
633 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
635 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
636 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
638 2002-12-03 Roland McGrath <roland@redhat.com>
640 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
641 from dynamic linker internal cell to new libc cell.
643 2002-11-28 Roland McGrath <roland@redhat.com>
645 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
646 before other headers, so FLOATING_STACKS is not defined wrongly.
648 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
649 even if [! FLOATING_STACKS].
650 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
651 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
652 dl_osversion >= 2.3.99 and fatal if not.
653 (TLS_DO_MODIFY_LDT): Use it.
655 2002-11-28 Ulrich Drepper <drepper@redhat.com>
657 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
658 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
659 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
661 2002-11-19 Ulrich Drepper <drepper@redhat.com>
663 * Versions (libc: GLIBC_2.0): Remove names of functions which are
665 * Makefile (shared-only-routines): Add weaks.
666 * weaks.c: Remove functions which are not exported from libc.so.
668 2002-11-14 Roland McGrath <roland@redhat.com>
670 * libc-tsd.c: New file.
671 * Makefile (distribute): Add it.
672 (libc-link.so): New variable.
673 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
674 (libc-ok-for-link): New variable.
675 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
676 libc-ok-for-link to $(use-thread).
677 [$(libc-ok-for-link) = no]
678 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
679 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
681 (generated): Append them.
682 (extra-objs): Append libc-tsd.os.
684 * libc-tls-loc.c: New file.
685 * Makefile (libpthread-routines): Add it.
687 2002-11-14 Andreas Schwab <schwab@suse.de>
689 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
692 2002-11-13 Roland McGrath <roland@redhat.com>
694 * Examples/ex6.c (main): Improve error reporting.
696 2002-11-04 Ulrich Drepper <drepper@redhat.com>
698 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
699 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
701 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
703 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
705 2002-10-22 Jakub Jelinek <jakub@redhat.com>
707 * manager.c (pthread_start_thread): Call __uselocale even
708 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
710 2002-10-17 Roland McGrath <roland@redhat.com>
712 * Makefile (unload): Don't link in libpthread.so.
713 ($(objpfx)unload.out): Do depend on it.
714 * unload.c (main): Improve error reporting.
716 2002-10-09 Roland McGrath <roland@redhat.com>
718 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
719 Under [__PIC__], call the function via the pointer fetched for
720 comparison rather than a call by name that uses the PLT.
721 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
722 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
723 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
724 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
725 (__libc_key_create, __libc_getspecific, __libc_setspecific)
726 (__libc_atfork): Use it.
728 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
729 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
730 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
731 (ld: GLIBC_PRIVATE): Set removed.
733 2002-10-11 Ulrich Drepper <drepper@redhat.com>
735 * sysdeps/unix/sysv/linux/execve.c: New file.
737 2002-10-09 Jakub Jelinek <jakub@redhat.com>
739 * no-tsd.c: Include stdlib.h.
741 2002-10-07 Jakub Jelinek <jakub@redhat.com>
743 * sysdeps/unix/sysv/linux/allocalim.h: New file.
744 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
746 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
747 Pass stack size to caller.
748 (pthread_handle_create): Set p_alloca_cutoff.
749 * pthread.c (__pthread_initial_thread): Use C99 designated
750 initializers. Set p_alloca_cutoff.
751 (__pthread_manager_thread): Likewise.
752 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
754 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
756 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
758 * specific.c (__libc_alloca_cutoff): New function.
759 * no-tsd.c (__libc_alloca_cutoff): New function.
760 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
763 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
765 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
766 * sysdeps/sh/tls.h: Likewise.
767 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
769 2002-09-29 Jakub Jelinek <jakub@redhat.com>
771 * sysdeps/pthread/tst-timer.c (main): Clear
772 SIGEV2.sigev_notify_attributes.
774 2002-09-29 Ulrich Drepper <drepper@redhat.com>
776 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
777 INLINE_SYSCALL for set_thread_area syscall.
779 2002-09-28 Roland McGrath <roland@redhat.com>
781 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
782 Don't call setrlimit, since we did no prior bogon we need to undo.
784 2002-09-27 Roland McGrath <roland@redhat.com>
786 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
788 2002-09-24 Roland McGrath <roland@redhat.com>
790 * sysdeps/x86_64/tls.h: New file.
792 2002-09-23 Roland McGrath <roland@redhat.com>
794 * Examples/ex13.c (dump_mut): int -> size_t for counter.
796 2002-09-18 Bruno Haible <bruno@clisp.org>
798 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
799 an unexpected error code.
801 * internals.h (__pthread_message): Add const to first parameter type.
802 * pthread.c (__pthread_message): Likewise.
804 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
806 2002-09-17 Roland McGrath <roland@redhat.com>
808 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
809 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
810 offset (positive or negative) relative to the thread struct.
811 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
813 2002-09-12 Jakub Jelinek <jakub@redhat.com>
815 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
816 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
817 Replace /usr/lib/crt[in].o with crt[in].o too.
819 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
821 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
823 2002-09-04 Bruno Haible <bruno@clisp.org>
825 * pthread.c: Include <sys/time.h>.
826 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
827 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
828 * Makefile (distribute): Add smp.h to the list.
830 2002-09-04 Bruno Haible <bruno@clisp.org>
832 * sysdeps/alpha/pt-machine.h: Choose different include file location
833 on non-Linux platforms.
835 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
836 (open, open64): Change va_arg argument type to the integral type to
837 which mode_t promotes.
839 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
840 the structure of 'struct sigevent'.
842 * errno.c (__errno_location, __h_errno_location, __res_state):
843 Use prototype function definitions.
845 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
847 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
848 * sysdeps/powerpc/pt-machine.h: moved to...
849 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
850 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
852 2002-09-02 Roland McGrath <roland@redhat.com>
854 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
856 2002-09-01 Roland McGrath <roland@redhat.com>
858 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
859 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
861 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
862 (__libc_internal_tsd_address): Declare it.
863 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
864 __libc_internal_tsd_address.
865 * specific.c (libc_internal_tsd_address): New function.
866 (__libc_internal_tsd_address): New variable.
867 * no-tsd.c (__libc_internal_tsd_address): New variable.
869 2002-08-31 Ulrich Drepper <drepper@redhat.com>
871 * Makefile: Don't use rule for crt%.o, spell it out as rules for
874 2002-08-30 Roland McGrath <roland@redhat.com>
876 * Makefile (extra-objs, omit-deps): Add crtn.
877 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
878 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
879 ($(objpfx)crtn.S): New target.
880 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
881 (generated): Add crtn.S.
883 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
886 2002-08-30 Jakub Jelinek <jakub@redhat.com>
888 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
891 2002-08-30 Roland McGrath <roland@redhat.com>
893 * tst-static-locale.c: New file.
894 * Makefile (tests, tests-static): Add it.
896 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
898 * spinlock.c (__pthread_lock): Fix spurious wakeup
899 handling. Don't clear lowest bit of list pointer as sign the thread
900 is still on the wait list. Don't restart after spurious wakeup
901 with spinning to get the lock.
902 (__pthread_unlock): Take set lowest bit into account when handling
903 pointer to list elements.
904 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
906 2002-08-28 Roland McGrath <roland@redhat.com>
908 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
910 2002-08-28 Jakub Jelinek <jakub@redhat.com>
912 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
913 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
914 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
916 2002-08-28 Ulrich Drepper <drepper@redhat.com>
918 * sysdeps/pthread/timer_routines.c (thread_func): Change return
919 type to void and add casts in use to avoid warnings with all gcc
922 2002-08-08 Jakub Jelinek <jakub@redhat.com>
924 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
926 * manager.c (__pthread_handles): Remove.
927 * pthandles.c: New file.
928 * pthread.c (__pthread_initialize_minimal): Initialize
929 __pthread_handles[0] and __pthread_handles[1].
930 * Makefile (libpthread-routines): Add pthandles (must be last).
932 2002-08-26 Brian Youmans <3diff@gnu.org>
934 * Examples/ex10.c: Corrected version number in Lesser GPL copying
935 permission notice from 2 to 2.1.
936 * Examples/ex11.c: Likewise.
937 * Examples/ex13.c: Likewise.
938 * Examples/ex8.c: Likewise.
939 * Examples/ex9.c: Likewise.
940 * barrier.c: Likewise.
941 * events.c: Likewise.
942 * lockfile.c: Likewise.
943 * no-tsd.c: Likewise.
944 * pt-machine.c: Likewise.
945 * ptclock_gettime.c: Likewise.
946 * ptclock_settime.c: Likewise.
947 * rwlock.c: Likewise.
948 * sysdeps/alpha/pspinlock.c: Likewise.
949 * sysdeps/alpha/pt-machine.h: Likewise.
950 * sysdeps/arm/pspinlock.c: Likewise.
951 * sysdeps/arm/pt-machine.h: Likewise.
952 * sysdeps/cris/pspinlock.c: Likewise.
953 * sysdeps/cris/pt-machine.h: Likewise.
954 * sysdeps/hppa/pspinlock.c: Likewise.
955 * sysdeps/hppa/pt-machine.h: Likewise.
956 * sysdeps/i386/i686/pt-machine.h: Likewise.
957 * sysdeps/i386/pspinlock.c: Likewise.
958 * sysdeps/i386/pt-machine.h: Likewise.
959 * sysdeps/i386/useldt.h: Likewise.
960 * sysdeps/ia64/pspinlock.c: Likewise.
961 * sysdeps/ia64/pt-machine.h: Likewise.
962 * sysdeps/m68k/pspinlock.c: Likewise.
963 * sysdeps/m68k/pt-machine.h: Likewise.
964 * sysdeps/mips/pspinlock.c: Likewise.
965 * sysdeps/mips/pt-machine.h: Likewise.
966 * sysdeps/powerpc/pspinlock.c: Likewise.
967 * sysdeps/powerpc/pt-machine.h: Likewise.
968 * sysdeps/pthread/bits/initspin.h: Likewise.
969 * sysdeps/pthread/bits/libc-lock.h: Likewise.
970 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
971 * sysdeps/pthread/getcpuclockid.c: Likewise.
972 * sysdeps/pthread/posix-timer.h: Likewise.
973 * sysdeps/pthread/timer_create.c: Likewise.
974 * sysdeps/pthread/timer_delete.c: Likewise.
975 * sysdeps/pthread/timer_getoverr.c: Likewise.
976 * sysdeps/pthread/timer_gettime.c: Likewise.
977 * sysdeps/pthread/timer_routines.c: Likewise.
978 * sysdeps/pthread/timer_settime.c: Likewise.
979 * sysdeps/pthread/tst-timer.c: Likewise.
980 * sysdeps/s390/pspinlock.c: Likewise.
981 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
982 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
983 * sysdeps/sh/pspinlock.c: Likewise.
984 * sysdeps/sh/pt-machine.h: Likewise.
985 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
986 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
987 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
988 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
989 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
990 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
991 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
992 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
993 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
994 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
995 * tststack.c: Likewise.
996 * unload.c: Likewise.
998 * wrapsyscall.c: Likewise.
1000 * sysdeps/pthread/pt-initfini.c: Changed copying
1001 permission notice to Lesser GPL from Library GPL, including the
1002 references in the special exception.
1003 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
1004 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
1005 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
1007 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
1009 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
1011 2002-08-26 Ulrich Drepper <drepper@redhat.com>
1013 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
1014 overflow [PR libc/4244].
1016 2002-08-25 Ulrich Drepper <drepper@redhat.com>
1018 * sysdeps/pthread/timer_routines.c (thread_func): Make the
1019 compiler happy by adding a return statement which will never be
1022 * tst-context.c (main): Cast to long before casting to pointer.
1024 * Examples/ex17.c (main): Use correct format string.
1026 * Examples/ex9.c (thread): Remove incorrect return statement.
1028 2002-08-23 Ulrich Drepper <drepper@redhat.com>
1030 * pthread.c (__linuxthreads_version): New global constant.
1032 2002-08-23 Andreas Jaeger <aj@suse.de>
1034 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
1035 as thread specific register.
1036 (testandset): Fix inline asm.
1037 (THREAD_GETMEM): Fix inline asm.
1039 2002-08-22 Roland McGrath <roland@redhat.com>
1041 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
1043 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
1044 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
1045 macro. That chooses whether to reuse %gs value or let kernel set it.
1046 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
1047 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
1050 2002-08-21 Ulrich Drepper <drepper@redhat.com>
1052 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
1053 also to the third definition of this macro.
1055 2002-06-17 Andreas Jaeger <aj@suse.de>
1057 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1060 2002-08-20 Ulrich Drepper <drepper@redhat.com>
1062 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
1063 loading/reading segment registers. Some old hardware doesn't
1064 handle the 32-bit instructions as expected.
1065 * sysdeps/i386/tls.h: Likewise.
1067 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
1068 renamed to secondcall and use is negated.
1069 (TLS_SETUP_GS_SEGMENT): Likewise.
1070 (TLS_INIT_TP): Likewise.
1071 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
1074 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
1075 registers. No need to mask upper 16 bits in this case.
1076 * sysdeps/i386/useldt.h: Likewise.
1077 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
1078 is the same since the GDT content changed.
1080 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
1081 to TLS_SETUP_GS_SEGMENT.
1082 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
1083 TLS_DO_SET_THREAD_AREA.
1084 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
1085 entry number from %gs value.
1086 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
1089 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
1090 Pass true to _dl_deallocate_tls.
1091 (pthread_free): Likewise.
1092 * pthread.c (__pthread_initialize_manager): Likewise.
1094 2002-08-19 Ulrich Drepper <drepper@redhat.com>
1096 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
1097 computing index from %gs value.
1099 2002-08-16 Roland McGrath <roland@redhat.com>
1101 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
1102 register value from entry number properly.
1104 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
1105 optimally conditional on [__PIC__].
1106 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
1107 without touching errno, and use latest modify_ldt-like interface.
1108 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
1109 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
1110 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
1111 existing %gs value as the segment to set.
1112 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
1113 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
1114 by the first thread's early TLS setup.
1116 2002-08-15 Roland McGrath <roland@redhat.com>
1118 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
1119 return a value as callers now expect.
1121 2002-08-11 Roland McGrath <roland@redhat.com>
1123 * pthread.c (__pthread_initialize_manager): Initialize
1124 p_header.data.tcb field of manager thread's descriptor.
1125 (__pthread_initialize_minimal): Don't initialize p_header.data.self
1126 field, already done by TLS_INIT_TP.
1128 * manager.c (pthread_handle_create): Move p_header field initializers
1131 2002-08-08 Ulrich Drepper <drepper@redhat.com>
1133 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
1135 2002-08-07 Ulrich Drepper <drepper@redhat.com>
1137 * pthread.c (__linuxthreads_initial_report_events): New variable.
1138 (__pthread_initialize_manager): Use it to initialize p_report_events
1140 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
1142 2002-08-07 Roland McGrath <roland@redhat.com>
1144 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
1145 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
1147 2002-08-02 Roland McGrath <roland@redhat.com>
1149 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
1150 Add _LIBC_TSD_KEY_LOCALE.
1151 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
1152 Call __uselocale to initialize our per-thread locale pointer to
1154 * pthread.c (__pthread_initialize_minimal): Likewise.
1156 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
1158 2002-08-02 Ulrich Drepper <drepper@redhat.com>
1160 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
1163 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
1164 Don't use p_libc_specific element in thread descriptor.
1166 2002-07-30 Roland McGrath <roland@redhat.com>
1168 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
1169 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
1170 which does the right thing when __thread support is available.
1171 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
1172 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
1173 `p_h_errno', `p_resp', and `p_res' members.
1174 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
1175 Don't initialize `p_errnop' and `p_h_errnop' members.
1176 (__pthread_reset_main_thread): Likewise.
1177 (__pthread_initialize_manager): Likewise.
1178 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
1179 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
1180 Don't initialize `p_resp' member.
1181 (__pthread_reset_main_thread): Likewise.
1182 * manager.c (pthread_handle_create): Likewise.
1183 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
1184 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
1185 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
1186 * errno.c [USE_TLS && HAVE___THREAD]
1187 (__h_errno_location, __res_state): Don't define these at all.
1189 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
1190 (INSTALL_NEW_DTV, GET_DTV): Likewise.
1191 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
1193 * weaks.c: Don't include <errno.h> here.
1195 2002-08-01 Roland McGrath <roland@redhat.com>
1197 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
1199 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
1200 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
1201 (TLS_INIT_TP): Use that.
1203 2002-08-02 Jakub Jelinek <jakub@redhat.com>
1205 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
1206 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
1207 (FREE_THREAD): Avoid modify_ldt if using GDT.
1208 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
1210 2002-07-25 Jakub Jelinek <jakub@redhat.com>
1212 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
1213 * sysdeps/i386/pt-machine.h: Likewise.
1214 * sysdeps/i386/useldt.h: Likewise.
1216 2002-07-22 Ulrich Drepper <drepper@redhat.com>
1218 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
1219 call __libc_setup_tls first.
1220 * Makefile: Actually create tst-signal.out file when running the test.
1221 (tests): Add tststatic.
1222 * Examples/tststatic.c: New file.
1224 2002-07-19 Ulrich Drepper <drepper@redhat.com>
1226 * errno.c (__errno_location): Don't define unless !USE_TLS
1228 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
1229 * sysdeps/i386/tls.h: Likewise.
1230 * sysdeps/i386/useldt.h: Likewise.
1231 * sysdeps/i386/i686/pt-machine.h: Likewise.
1233 2002-07-02 H.J. Lu <hjl@gnu.org>
1235 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
1237 * sysdeps/mips/pt-machine.h: Likewise.
1239 2002-07-14 Ulrich Drepper <drepper@redhat.com>
1241 * manager.c (pthread_handle_create): Initialize self-reference in
1244 2002-07-01 Jakub Jelinek <jakub@redhat.com>
1246 * Examples/ex9.c (main): Remove unused th variable.
1248 2002-07-10 Ulrich Drepper <drepper@redhat.com>
1250 * wrapsyscall.c: Add __nanosleep alias.
1251 * Versions (GLIBC_2.2.6): Add __nanosleep.
1252 * bug-sleep.c: New file.
1253 * Makefile (tests): Add bug-sleep.
1255 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
1257 * Examples/ex9.c (main): Use list of children and join them.
1258 (thread): Do not call exit.
1260 2002-06-20 Ulrich Drepper <drepper@redhat.com>
1262 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
1263 Unconditionally use the code using spinlock. Use __pthread_release
1265 (wait_node_free): Likewise.
1266 (__pthread_acquire, __pthread_release): Unconditionally define.
1268 2002-06-07 Jakub Jelinek <jakub@redhat.com>
1270 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
1272 2002-05-24 Ulrich Drepper <drepper@redhat.com>
1274 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
1276 2002-05-21 Ulrich Drepper <drepper@redhat.com>
1278 * sysdeps/pthread/pthread.h (pthread_create): Rename first
1280 (pthread_cancel): Likewise.
1281 * internals.h (__pthread_create_2_1): Likewise.
1282 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
1284 2002-05-20 Ulrich Drepper <drepper@redhat.com>
1286 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
1287 Patch by Glen Nakamura <gen@flex.com>.
1289 2002-05-03 Ulrich Drepper <drepper@redhat.com>
1291 * signals.c: Move sighandler functions to...
1292 * sighandler.c: ...here. New file.
1293 * signals.c: Move signal handler related type definitions to...
1294 * internals.h: ...here. Add prototypes for signal handlers.
1295 * Makefile (libpthread-routines): Add sighandler.
1296 (CFLAGS-sighandler.c): Add $(exceptions).
1298 2002-04-30 Jakub Jelinek <jakub@redhat.com>
1300 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
1302 2002-04-08 Ulrich Drepper <drepper@redhat.com>
1304 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
1305 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
1306 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
1307 based on previous one and not on current time. Count overruns.
1308 Patch by Eric F. Sorton <eric@cctcorp.com>.
1310 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
1312 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1314 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
1315 if it isn't defined yet.
1316 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
1317 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1319 * sysdeps/sh/tls.h: New file.
1321 2002-04-08 Jakub Jelinek <jakub@redhat.com>
1323 * manager.c (__pthread_manager_event): Use self instead of arg
1324 for INIT_THREAD_SELF.
1325 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
1326 _pthread_descr_struct) instead of sizeof (*descr).
1328 2002-04-05 Ulrich Drepper <drepper@redhat.com>
1330 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
1331 * sysdeps/alpha/pt-machine.h: Likewise.
1332 * sysdeps/arm/pt-machine.h: Likewise.
1333 * sysdeps/cris/pt-machine.h: Likewise.
1334 * sysdeps/hppa/pt-machine.h: Likewise.
1335 * sysdeps/m68k/pt-machine.h: Likewise.
1336 * sysdeps/mips/pt-machine.h: Likewise.
1337 * sysdeps/powerpc/pt-machine.h: Likewise.
1338 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1339 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1340 * sysdeps/sh/pt-machine.h: Likewise.
1341 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1342 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1343 * sysdeps/x86_64/pt-machine.h: Likewise.
1345 2002-04-05 Jakub Jelinek <jakub@redhat.com>
1347 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
1348 instead of pthread_mutexattr_setkind_np.
1349 (pthread_mutexattr_gettype): Similarly.
1350 * man/pthread_mutexattr_setkind_np.man: New.
1351 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
1353 2002-04-02 Ulrich Drepper <drepper@redhat.com>
1355 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
1357 2002-03-22 Jakub Jelinek <jakub@redhat.com>
1359 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
1361 2002-03-22 Ulrich Drepper <drepper@redhat.com>
1363 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
1365 2002-03-17 Andreas Jaeger <aj@suse.de>
1367 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
1369 * sysdeps/alpha/pt-machine.h: Likewise.
1370 * sysdeps/arm/pt-machine.h: Likewise.
1371 * sysdeps/cris/pt-machine.h: Likewise.
1372 * sysdeps/hppa/pt-machine.h: Likewise.
1373 * sysdeps/i386/i686/pt-machine.h: Likewise.
1374 * sysdeps/ia64/pt-machine.h: Likewise.
1375 * sysdeps/m68k/pt-machine.h: Likewise.
1376 * sysdeps/mips/pt-machine.h: Likewise.
1377 * sysdeps/powerpc/pt-machine.h: Likewise.
1378 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1379 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1380 * sysdeps/sh/pt-machine.h: Likewise.
1381 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1382 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1383 * sysdeps/x86_64/pt-machine.h: Likewise.
1385 * internals.h: Move testandset and __compare_and_swap prototypes
1388 2002-03-03 Andreas Jaeger <aj@suse.de>
1390 * errno.c: Include resolv.h to avoid warning.
1392 2002-02-27 Ulrich Drepper <drepper@redhat.com>
1394 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
1397 2002-02-23 Ulrich Drepper <drepper@redhat.com>
1399 * attr.c (pthread_getattr_np): Don't take thread descriptor size
1400 into account if USE_TLS.
1401 * manager.c (pthread_handle_create): Free TLS data structures if call
1402 failed. Pass correct stack to clone if USE_TLS.
1403 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
1404 * sysdeps/i386/i686/pt-machine.h: Likewise.
1405 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
1407 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
1408 Add p_stackaddr element #if USE_TLS.
1409 * internals.c: Include <tls.h>.
1410 * manager.c: Integrate creating and handling of thread descriptor
1412 * pthread.c: Likewise.
1413 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
1414 Include <linuxthreads/descr.h> only if TLS is really used.
1415 (GET_DTV): New macro.
1416 (TLS_INIT_TP): Initialize self pointer.
1418 2002-02-17 Andreas Schwab <schwab@suse.de>
1420 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
1423 2002-02-12 Ulrich Drepper <drepper@redhat.com>
1425 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
1426 (INSTALL_DTV): Adjust for being passed pointer to element with length.
1428 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1430 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
1432 2002-02-08 Richard Henderson <rth@redhat.com>
1434 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
1436 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1438 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
1441 2002-02-07 H.J. Lu <hjl@gnu.org>
1443 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
1445 (__pthread_spin_lock): Remove ".set noreorder".
1446 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
1448 2002-02-05 H.J. Lu <hjl@gnu.org>
1450 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
1452 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1453 (__compare_and_swap): Likewise.
1455 2002-02-07 Ulrich Drepper <drepper@redhat.com>
1457 * internals.h: Move declarations/definitions of
1458 __pthread_initial_thread_bos, __pthread_initial_thread,
1459 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
1460 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
1461 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
1463 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
1464 Define THREAD_GETMEM accordingly.
1466 2002-02-06 Ulrich Drepper <drepper@redhat.com>
1468 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
1470 * sysdeps/i386/tls.h: Define THREAD_DTV.
1472 2002-02-04 Ulrich Drepper <drepper@redhat.com>
1474 * internals.h: Move thread descriptor definition...
1475 * descr.h.: ...here. New file.
1476 * sysdeps/i386/tls.h: New file.
1478 2002-02-01 H.J. Lu <hjl@gnu.org>
1480 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
1481 different register in the delayed slot. Use branch likely.
1483 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
1484 (__compare_and_swap): Return 0 only when failed to compare. Use
1487 2002-02-01 Jakub Jelinek <jakub@redhat.com>
1489 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
1490 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
1491 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
1492 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
1493 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
1494 * sysdeps/sparc/sparc64/Versions: New file.
1495 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
1497 2002-01-31 Ulrich Drepper <drepper@redhat.com>
1499 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
1500 in SHARED code, use GL(dl_cpuclock_offset).
1502 2002-01-28 Andreas Jaeger <aj@suse.de>
1504 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
1505 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
1507 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
1509 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
1510 (CURRENT_STACK_FRAME): Remove duplicate definition.
1511 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1513 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
1515 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
1518 2002-01-12 Andreas Schwab <schwab@suse.de>
1520 * Makefile (test-srcs): Add tst-signal.
1521 (tests): Run tst-signal.
1522 (distribute): Add tst-signal.sh.
1523 * tst-signal.c, tst-signal.sh: New files.
1525 2002-01-14 Andreas Jaeger <aj@suse.de>
1527 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
1529 2002-01-11 Andreas Schwab <schwab@suse.de>
1531 * signals.c (sighandler): Initialize all elements to SIG_ERR.
1532 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
1534 2002-01-06 Richard Henderson <rth@redhat.com>
1536 * sysdeps/alpha/elf/pt-initfini.c: New file.
1538 2001-12-29 Andreas Jaeger <aj@suse.de>
1540 * Examples/ex9.c: Add noreturn attribute for thread.
1541 * Examples/ex10.c: Likewise.
1542 * Examples/ex13.c (thread_start): Likewise.
1543 * Examples/ex15.c (worker): Likewise.
1545 * Examples/ex18.c: Include unistd.h for prototype of sleep.
1547 2001-12-14 Ulrich Drepper <drepper@redhat.com>
1549 * man/pthread_atfork.man: Adjust description of mutex handling
1550 after fork for current implementation.
1551 * linuxthreads.texi: Likewise [PR libc/2519].
1553 2001-12-13 Andreas Schwab <schwab@suse.de>
1555 * specific.c (pthread_key_delete): Don't contact the thread
1556 manager if no threads have been created yet.
1558 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
1560 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
1561 qualifier to be safe.
1563 2001-11-30 Andreas Schwab <schwab@suse.de>
1565 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
1566 that self is the manager thread, and initialize the thread
1568 (thread_self_stack) [THREAD_SELF]: New function to find self via
1570 * manager.c (pthread_handle_create): Don't block cancel signal any
1573 2001-11-29 Andreas Jaeger <aj@suse.de>
1575 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
1577 (INIT_THREAD_SELF): New.
1578 (THREAD_GETMEM): New.
1580 (THREAD_SETMEM): New.
1581 (THREAD_SETMEM_NC): New.
1582 (FLOATING_STACKS): Define.
1583 (ARCH_STACK_MAX_SIZE): Define.
1585 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
1587 Bugfix to pthread_key_delete. It was iterating over the thread
1588 manager's linked list of threads, behind the thread manager's
1589 back causing a race. The fix is to have the manager iterate over
1590 the threads instead, using a new request type for doing so.
1591 * internals.h (struct pthread_request): New manager request type
1592 REQ_FOR_EACH_THREAD.
1593 * manager.c (pthread_for_each_thread): New function.
1594 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
1595 * specific.c (struct pthread_key_delete_helper_args): New type.
1596 (pthread_key_delete_helper): New static function.
1597 (pthread_key_delete): Use the new thread manager
1598 REQ_FOR_EACH_THREAD function to iterate over the threads and set
1599 the delete key slot to a null value in each thread.
1600 * Examples/ex18.c: New test.
1601 * Makefile (tests): Add ex18.
1603 2001-11-22 Wolfram Gloger <wg@malloc.de>
1605 * pthread.c (pthread_onexit_process): Don't call free
1606 after threads have been asynchronously terminated.
1608 * manager.c (pthread_handle_exit): Surround cancellation
1609 of threads with __flockfilelist()/__funlockfilelist().
1611 2001-11-26 Andreas Schwab <schwab@suse.de>
1613 * manager.c (pthread_handle_create): Start the child thread with
1614 the cancel signal blocked, so that it does not handle it before
1615 the thread register is set up. Save errno from failed clone call.
1617 2001-11-15 Ulrich Drepper <drepper@redhat.com>
1619 * sysdeps/i386/i686/Implies: Removed.
1620 * sysdeps/i386/i686/Versions: New file.
1622 2001-10-31 Andreas Jaeger <aj@suse.de>
1624 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
1626 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
1628 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
1629 to __linuxthreads_pthread_sizeof_descr to match name used by
1630 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
1631 linuxthreads_db/td_symbol_list.c.
1633 2001-09-22 Andreas Jaeger <aj@suse.de>
1635 * linuxthreads/tst-context.c: Avoid compile warning.
1637 2001-09-20 Andreas Jaeger <aj@suse.de>
1639 * shlib-versions: Add x86-64.
1641 2001-09-19 Andreas Jaeger <aj@suse.de>
1643 * sysdeps/x86_64/Makefile: New file.
1644 * sysdeps/x86_64/pspinlock.c: New file.
1645 * sysdeps/x86_64/pt-machine.h: New file.
1647 2001-09-12 Jakub Jelinek <jakub@redhat.com>
1649 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
1651 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1653 2001-09-11 Ulrich Drepper <drepper@redhat.com>
1654 Wolfram Gloger <wg@malloc.de>
1656 * join.c: Protect all communications from and to manager with
1658 * manager.c: Likewise.
1659 * pthread.c: Likewise.
1660 * smeaphore.c: Likewise.
1662 2001-08-29 Ulrich Drepper <drepper@redhat.com>
1664 * spinlock.c (__pthread_lock): Top max_count value with
1665 MAX_ADAPTIVE_SPIN_COUNT.
1666 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
1668 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
1671 2001-08-27 Jakub Jelinek <jakub@redhat.com>
1673 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
1674 non-opaque type if __USE_UNIX98.
1676 2001-08-26 Jakub Jelinek <jakub@redhat.com>
1678 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
1679 non-opaque lock types also if _IO_MTSAFE_IO is defined.
1681 2001-08-23 Roland McGrath <roland@frob.com>
1683 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
1684 new first argument, skip the cleanup handler if it's zero.
1685 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
1686 (__libc_lock_define_initialized_recursive): Use it.
1687 * sysdeps/pthread/bits/stdio-lock.h: File removed.
1688 The sysdeps/generic file from the main tree now suffices.
1690 2001-08-22 Roland McGrath <roland@frob.com>
1692 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
1693 instead of <pthread.h>.
1694 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
1695 (_IO_lock_initializer): Add braces.
1696 (_IO_lock_lock): Use __libc_lock_lock_recursive.
1697 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
1699 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
1700 (__libc_lock_define_initialized_recursive): Use it.
1701 (__libc_lock_init_recursive): Likewise.
1702 (__libc_lock_fini_recursive): Likewise.
1703 (__libc_lock_lock_recursive): Likewise.
1704 (__libc_lock_trylock_recursive): Likewise.
1705 (__libc_lock_unlock_recursive): Likewise.
1706 (__libc_lock_define_recursive): New macro.
1708 2001-08-14 Jakub Jelinek <jakub@redhat.com>
1710 * lockfile.c (__pthread_provide_lockfile): New variable.
1711 * pthread.c (__pthread_require_lockfile): New variable.
1712 * cancel.c (__pthread_require_lockfile): New variable.
1714 2001-07-31 Ulrich Drepper <drepper@redhat.com>
1716 * tst-context.c (threadfct): Initialize context before calling
1719 * Examples/ex17.c: Make sure test thread is around long enough.
1721 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
1723 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
1725 2001-07-24 Ulrich Drepper <drepper@redhat.com>
1727 * tst-context.c (main): Print explanation before bailing out
1728 because context handling is not supported.
1730 2001-07-23 Ulrich Drepper <drepper@redhat.com>
1732 * Makefile (tests): Add tst-context.
1733 * tst-context.c: New file.
1735 * sysdeps/pthread/bits/stdio-lock.h: Define
1736 _IO_cleanup_region_start_noarg.
1738 2001-07-23 Jakub Jelinek <jakub@redhat.com>
1740 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
1741 (ARCH_STACK_MAX_SIZE): Define.
1742 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1743 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1745 2001-07-19 Jakub Jelinek <jakub@redhat.com>
1747 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
1749 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
1750 (ARCH_STACK_MAX_SIZE): Define.
1751 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
1752 NEED_SEPARATE_REGISTER_STACK.
1754 2001-07-16 Andreas Schwab <schwab@suse.de>
1756 * Makefile (before-compile): Don't add $(objpfx)crti.o.
1757 (omit-deps): Add crti.
1758 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
1759 it is filtered out of the link command.
1761 2001-07-16 Ulrich Drepper <drepper@redhat.com>
1763 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
1764 to find the right value for __pthread_initial_thread_bos, it's not
1765 used. If not FLOATING_STACKS first run
1766 __pthread_init_max_stacksize.
1768 2001-06-16 H.J. Lu <hjl@gnu.org>
1770 * internals.h: Include <stackinfo.h>.
1772 * attr.c: Don't include <stackinfo.h> here.
1773 * cancel.c: Likewise.
1774 * manager.c: Likewise.
1775 * pthread.c: Likewise.
1776 * ptlongjmp.c: Likewise.
1778 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
1780 * attr.c: Make _STACK_GROWS_UP work.
1781 * internals.h: Likewise.
1782 * manager.c: Likewise.
1783 * pthread.c: Likewise.
1785 2001-06-15 H.J. Lu <hjl@gnu.org>
1787 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1789 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1791 * semaphore.h: Use struct _pthread_fastlock as an element of
1792 sem_t instead of an identical struct.
1793 * rwlock.c: Remove casts.
1794 * semaphore.c: Likewise.
1796 2001-04-30 Alan Modra <amodra@one.net.au>
1798 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1800 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1802 * linuxthreads.texi: Spelling corrections.
1804 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1806 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1807 returning successfully.
1808 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1810 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1812 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1813 serious work try once whether the lock is uncontested.
1814 Remove duplicate reading of __status before loop.
1815 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1817 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1818 (__pthread_alt_trylock): Likewise.
1820 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1822 Memory barrier overhaul following line by line inspection.
1823 * mutex.c (pthread_once): Missing memory barriers added.
1824 * pthread.c (__pthread_wait_for_restart_signal,
1825 __pthread_timedsuspend_new, __pthread_restart_new): Added
1826 memory barriers ``just in case'' and for documentary value.
1827 * spinlock.c (__pthread_release): New inline function for releasing
1828 spinlock, to complement __pthread_acquire. Includes memory
1829 barrier prior to assignment to spinlock, and __asm __volatile
1830 dance to prevent reordering or optimization of the spinlock access.
1831 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1832 __pthread_alt_timedlock, __pthread_alt_unlock,
1833 __pthread_compare_and_swap): Updated to use new __pthread_release
1834 instead of updating spinlock directly.
1835 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1836 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1837 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1838 Memory barrier overhaul. Lots of missing memory barriers added,
1839 a couple needless ones removed.
1840 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1841 removed, just calls __pthread_acquire, which has the new read
1842 barrier in it before its testandset.
1844 2001-05-20 Roland McGrath <roland@frob.com>
1846 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1848 2001-05-09 Geoff Keating <geoffk@redhat.com>
1850 * sysdeps/powerpc/pt-machine.h
1851 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1852 (__compare_and_swap): Remove memory barriers.
1853 (__compare_and_swap_with_release_semantics): New function.
1855 2001-04-24 Andreas Jaeger <aj@suse.de>
1857 * wrapsyscall.c: send* and recv* return ssize_t.
1859 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1860 mutex instead of double locking it.
1861 Reported by Pierre Artaud <partaud@sodatec.com>.
1863 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1865 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1866 using #ifdef whether the clock is available.
1867 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1869 * sysdeps/ia64/Versions: New file.
1871 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1872 have to call __gmon_start__ in the libpthread DSO.
1873 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1875 * Makefile (libpthread-routines): Add ptclock_gettime and
1877 * internals.h: Don't use cpuclock-init.h definitions, use
1878 hp-timing.h definitions.
1879 * pthread.c: Likewise.
1880 * manager.c: Likewise.
1881 * ptclock_gettime.c: New file.
1882 * ptclock_settime.c: New file.
1883 * internals.h: Fix parameter type for __pthread_clock_gettime and
1884 __pthread_clock_settime.
1886 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1887 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1888 * sysdeps/i386/i586/Makefile: Removed.
1890 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1892 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1893 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1895 2001-04-21 Andreas Jaeger <aj@suse.de>
1897 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1898 attribute, remove statements that will never be executed.
1899 (thread_func): Remove mutex_unlock call since it's never executed.
1900 (thread_func): Fix comment as suggested by Jakub Jelinek.
1902 * manager.c (__pthread_manager): Add noreturn
1904 (pthread_start_thread): Likewise, remove return statement.
1905 (pthread_start_thread_event): Likewise.
1906 Add noreturn attribute for pthread_handle_exit.
1907 * weaks.c: Add noreturn attribute for pthread_exit.
1909 * internals.h: Add __pthread_clock_gettime and
1910 __pthread_clock_settime prototypes.
1912 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1914 * internals.h: Include <cpuclock-init.h>.
1915 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1916 CPUCLOCK_VARDEF is defined.
1917 * pthread.c (__pthread_initialize_minimal): Initialize
1918 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1919 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1920 for new thread to current CPU clock value.
1922 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1924 * sysdeps/i386/i586/Makefile: New file.
1925 * sysdeps/i386/i586/Versions: New file.
1926 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1927 * sysdeps/i386/i586/ptclock_settime.c: New file.
1928 * sysdeps/i386/i686/Implies: New file.
1930 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1932 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1933 $generated, not $postclean-generated.
1935 2001-04-18 Andreas Jaeger <aj@suse.de>
1937 * Makefile (otherlibs): Added.
1939 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1941 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1943 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1945 * signals.c (sigwait): NSIG is no signal number. Block all
1946 signals while in signal handler for signals in SET.
1947 Patch by Manfred Spraul <manfred@colorfullife.com>.
1949 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1951 * tst-cancel.c: Disable most tests. Add new test where all
1952 cleanup handlers must run.
1953 * Makefile (tests): Add tst-cancel again.
1955 * cancel.c (__pthread_perform_cleanup): Correct condition for
1956 leaving cleanup loop early.
1958 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1959 all the files which use CURRENT_STACK_FRAME.
1960 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1961 __builtin_frame_address.
1962 * sysdeps/i386/i686/pt-machine.h: Likewise.
1964 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1966 * Makefile (tests): Comment out tst-cancel for now.
1968 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
1969 temporary file in object directory.
1970 * Makefile: Don't allow inlining when compiling tst-cancel.c.
1971 Pass $(objpfx) to tst-cancel.
1973 2001-04-11 David S. Miller <davem@redhat.com>
1975 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1976 up closer to user local variables so that new cleanup heuristics work.
1977 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1979 2001-04-11 Ulrich Drepper <drepper@redhat.com>
1981 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1983 (_pthread_cleanup_push_defer): Likewise.
1985 * tst-cancel.c (main): Fix loop printing cleanup output.
1987 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
1989 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1991 (__pthread_spin_trylock): Likewise.
1992 * sysdeps/sh/pt-machine.h (testandset): Likewise.
1994 2001-04-10 Ulrich Drepper <drepper@redhat.com>
1996 * join.c (pthread_exit): Move code to new function __pthread_do_exit
1997 which takes an extra parameter with the current frame pointer.
1998 Call new function with CURRENT_STACK_FRAME.
1999 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
2000 with the new parameter.
2001 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
2002 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
2003 this parameter as the initial value the cleanup handler records are
2004 compared against. No active cleanup handler record must have an
2005 address lower than the previous one and the initial record must be
2006 above (below on PA) the frame address passed in.
2007 (pthread_setcancelstate): Call __pthread_do_exit instead of
2009 (pthread_setcanceltype): Likewise.
2010 (pthread_testcancel): Likewise.
2011 (_pthread_cleanup_pop_restore): Likewise.
2012 * condvar.c (pthread_cond_wait): Likewise.
2013 (pthread_cond_timedwait_relative): Likewise.
2014 * manager.c (pthread_start_thread): Likewise.
2015 * oldsemaphore.c (__old_sem_wait): Likewise.
2016 * pthread.c (pthread_handle_sigcancel): Likewise.
2017 * semaphore.c (__new_sem_wait): Likewise.
2018 (sem_timedwait): Likewise.
2019 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
2020 to limit the cleanup handlers which get run.
2021 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
2022 for __pthread_perform_cleanup.
2024 * Makefile (tests): Add tst-cancel.
2025 * tst-cancel.c: New file.
2027 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
2029 * sysdeps/cris/pt-machine.h: New file.
2030 * sysdeps/cris/pspinlock.c: New file.
2032 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
2034 * shlib-versions: Add case for Linux on CRIS.
2036 2001-03-26 Ulrich Drepper <drepper@redhat.com>
2038 * attr.c (pthread_getattr_np): Correct computation of stack size
2039 for machiens with register stack.
2041 * Examples/ex17.c (main): Correct detection of failed mmap call.
2043 2001-03-21 Jakub Jelinek <jakub@redhat.com>
2045 * pthread.c (__pthread_initialize_manager): Fix a typo.
2047 2001-03-21 Jakub Jelinek <jakub@redhat.com>
2049 * attr.c (__pthread_attr_setstack): Fix alignment check.
2050 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
2051 * Makefile (tests): Add ex17 test.
2052 * Examples/ex17.c: New test.
2054 2001-03-20 Ulrich Drepper <drepper@redhat.com>
2056 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
2057 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
2058 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
2060 2001-03-18 Ulrich Drepper <drepper@redhat.com>
2062 * Makefile: When generating DSO link with libc_nonshared.a.
2064 2001-02-26 Jakub Jelinek <jakub@redhat.com>
2066 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
2068 2001-02-23 Jakub Jelinek <jakub@redhat.com>
2070 * internals.h (__pthread_init_max_stacksize): New prototype.
2071 * attr.c (__pthread_attr_setstacksize): Call
2072 __pthread_init_max_stacksize if not yet initialized.
2073 * pthread.c (__pthread_init_max_stacksize): New function.
2074 (__pthread_initialize_manager): Call it.
2075 Patch by <dtc@cmucl.cons.org>.
2077 2001-03-16 Ulrich Drepper <drepper@redhat.com>
2079 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
2081 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
2083 * shlib-versions: Add rule for Linux on 64 bit S/390.
2084 * sysdeps/s390/s390-64/pt-machine.h: New file.
2085 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
2087 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
2089 * sysdeps/s390/pt-machine.h: Move to...
2090 * sysdeps/s390/s390-32/pt-machine.h: ...here.
2091 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
2093 2001-03-15 Ulrich Drepper <drepper@redhat.com>
2095 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
2096 * attr.c: Implement pthread_getattr_np.
2097 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
2098 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
2099 * manager.c (pthread_handle_create): Initialize p_inheritsched.
2101 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2103 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
2106 2001-02-20 Hans Boehm <hans_boehm@hp.com>
2108 * manager.c (manager_mask): Removed static vesion. Now always local
2109 to __pthread_manager().
2110 (manager_mask_all): Removed completely.
2111 (__pthread_manager): Remove manager_mask_all initialization.
2112 (pthread_handle_create): Remove code to set and reset signal mask
2113 around __clone2() calls.
2115 2001-02-17 Jakub Jelinek <jakub@redhat.com>
2117 * spinlock.c (__pthread_lock): Force lock->__status to be read from
2118 memory on every spin.
2120 2001-02-10 Andreas Jaeger <aj@suse.de>
2122 * Makefile (extra-objs): New.
2124 2001-02-09 Jakub Jelinek <jakub@redhat.com>
2126 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
2127 __pthread_initialize_minimal prototype.
2129 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2131 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2133 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2135 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
2137 2001-02-06 Ulrich Drepper <drepper@redhat.com>
2139 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
2140 broken code. Patch by Jes Sorensen.
2142 2001-02-06 Andreas Jaeger <aj@suse.de>
2144 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
2146 * internals.h: ...here.
2148 2001-02-05 Jes Sorensen <jes@linuxcare.com>
2150 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2152 2001-02-02 Ulrich Drepper <drepper@redhat.com>
2154 * Versions: Remove __pthread_initialize_minimal.
2156 2001-02-01 Ulrich Drepper <drepper@redhat.com>
2158 * Makefile: Add rules to build crti.o and make it being used in
2159 building libpthread.so.
2160 * sysdeps/i386/Makefile: New file.
2161 * sysdeps/pthread/pt-initfini.c: New file.
2163 * pthread.c: Cleanups.
2165 2001-01-28 Andreas Jaeger <aj@suse.de>
2167 * oldsemaphore.c (__old_sem_init): Adjust for last change.
2168 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2169 * spinlock.c: Likewise.
2171 2001-01-28 Ulrich Drepper <drepper@redhat.com>
2173 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
2174 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2175 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
2176 * pthread.c: Likewise.
2177 * spinlock.h: Likewise.
2178 * sysdeps/pthread/pthread.h: Likewise.
2180 2001-01-26 Ulrich Drepper <drepper@redhat.com>
2182 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
2183 as struct __pthread_attr_s.
2185 * semaphore.h (sem_t): Cleanup namespace, rename status and
2188 2001-01-13 Jakub Jelinek <jakub@redhat.com>
2190 * pthread.c (pthread_onexit_process): Clear
2191 __pthread_manager_thread_bos after freeing it.
2192 * Makefile (tests): Add ex16.
2193 * Examples/ex16.c: New file.
2195 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2197 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
2199 * pthread.c (pthread_exit_process): Rename to...
2200 (pthread_onexit_process): ...this.
2201 (pthread_atexit_process, pthread_atexit_retcode): New.
2202 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
2203 and only if HAVE_Z_NODELETE is not defined.
2204 (__pthread_initialize_manager): Register pthread_atexit_retcode
2207 2001-01-11 Ulrich Drepper <drepper@redhat.com>
2209 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
2211 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2213 * Makefile (tests): Add ex15.
2214 * Examples/ex15.c: New test.
2216 2001-01-08 Ulrich Drepper <drepper@redhat.com>
2218 * pthread.c (pthread_exit_process): Free memory allocated for
2221 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2223 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
2224 (pthread_free): Always unmap the stack. It's safe now that we don't
2225 use MAP_FIXED to allocate stacks.
2227 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2229 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
2231 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
2233 2000-11-15 Wolfram Gloger <wg@malloc.de>
2235 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
2236 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
2238 2000-12-27 Andreas Jaeger <aj@suse.de>
2240 * Examples/ex13.c: Make local functions static.
2241 * ecmutex.c: Likewise.
2242 * joinrace.c: Likewise.
2243 * Examples/ex14.c: Likewise.
2245 * Examples/ex2.c: Make local functions static; reformat.
2246 * Examples/ex1.c: Likewise.
2247 * Examples/ex4.c: Likewise.
2248 * Examples/ex5.c: Likewise.
2249 * Examples/ex7.c: Likewise.
2251 * oldsemaphore.c: Add prototypes to shut up GCC.
2252 * pt-machine.c: Likewise.
2254 * weaks.c: Add prototype for pthread_exit.
2256 * internals.h: Add some prototypes, format prototypes and add
2258 Move __libc_waitpid prototype to include/sys/wait.h.
2260 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
2261 * mutex.c: Likewise.
2262 * specific.c: Likewise.
2263 * ptfork.c: Likewise.
2265 * lockfile.c: Include internals.h to get prototypes.
2266 * events.c: Likewise.
2267 * sysdeps/alpha/pspinlock.c: Likewise.
2268 * sysdeps/arm/pspinlock.c: Likewise.
2269 * sysdeps/hppa/pspinlock.c: Likewise.
2270 * sysdeps/i386/pspinlock.c: Likewise.
2271 * sysdeps/ia64/pspinlock.c: Likewise.
2272 * sysdeps/m68k/pspinlock.c: Likewise.
2273 * sysdeps/mips/pspinlock.c: Likewise.
2274 * sysdeps/powerpc/pspinlock.c: Likewise.
2275 * sysdeps/s390/pspinlock.c: Likewise.
2276 * sysdeps/sh/pspinlock.c: Likewise.
2277 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2278 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2279 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2281 2000-12-27 Ulrich Drepper <drepper@redhat.com>
2283 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
2284 (__pthread_attr_getstack): Return correct address.
2285 Add warnings for using pthread_attr_getstackaddr and
2286 pthread_attr_setstackaddr.
2288 2000-12-26 Ulrich Drepper <drepper@redhat.com>
2290 * Examples/ex6.c (test_thread): Make static.
2291 * Examples/ex12.c (test_thread): Make static and add noreturn
2294 2000-12-18 Jes Sorensen <jes@linuxcare.com>
2296 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
2297 and compare_and_swap_with_release_semantics returns int not long.
2299 2000-12-17 Andreas Jaeger <aj@suse.de>
2301 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
2303 * sysdeps/arm/pt-machine.h (testandset): Likewise.
2304 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
2305 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
2306 * sysdeps/sh/pt-machine.h (testandset): Likewise.
2307 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
2308 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
2310 2000-12-17 Ulrich Drepper <drepper@redhat.com>
2312 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
2313 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
2315 2000-12-17 Andreas Jaeger <aj@suse.de>
2317 * internals.h: Add prototypes for testandset and
2318 __compare_and_swap to shut up gcc warnings.
2320 2000-12-06 Wolfram Gloger <wg@malloc.de>
2322 * join.c (pthread_detach): Allow case where the thread has already
2325 2000-12-05 Andreas Jaeger <aj@suse.de>
2327 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
2328 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2329 (__compare_and_swap): Likewise.
2330 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
2332 2000-11-20 Jakub Jelinek <jakub@redhat.com>
2334 * Examples/ex3.c (main): Cast int to long before casting to void *.
2335 (search): Cast void * to long, not int.
2336 * Examples/ex8.c (main, thread): Similarly.
2337 * Examples/ex11.c (main): Similarly.
2338 * Examples/ex14.c (worker, do_test): Similarly.
2339 * ecmutex.c (worker, do_test): Similarly.
2340 (nlocks): Cast to int.
2342 2000-11-08 Bruce Mitchener <bruce@cubik.org>
2344 * linuxthreads.texi: Add documentation for pthreads attributes
2345 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
2346 patch. Document pthread_[sg]etconcurrency(). Mark
2347 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
2349 2000-11-07 Ulrich Drepper <drepper@redhat.com>
2351 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2353 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2354 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
2356 2000-11-06 Ulrich Drepper <drepper@redhat.com>
2358 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
2359 not doing it right now.
2360 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
2362 2000-10-30 Ulrich Drepper <drepper@redhat.com>
2364 * Examples/ex4.c (main): Don't use exit() to avoid warning with
2367 2000-10-29 Ulrich Drepper <drepper@redhat.com>
2369 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
2370 here. Reported by Bruce Mitchener <bruce@cubik.org>.
2372 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
2373 discussing mutexes. (As per the Unix98 name for the API.)
2374 Changes documentation for pthread_mutexattr_setkind_np() and
2375 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
2376 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
2377 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
2378 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
2379 Begins to introduce discussion of the ``timed'' mutex type. This
2380 discussion is currently incomplete.
2381 Patch by Bruce Mitchener <bruce@cubik.org>.
2383 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2384 Yutaka Niibe <gniibe@chroot.org>
2386 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
2387 has restrictions, use register.
2389 2000-10-23 Andreas Schwab <schwab@suse.de>
2391 * Examples/ex14.c (TIMEOUT): Override default timeout.
2393 2000-10-16 Ulrich Drepper <drepper@redhat.com>
2395 * specific.c: Protect tsd array modification in thread data
2396 structures by getting the thread lock in pthread_key_delete and
2397 __pthread_destroy_specifics.
2398 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
2400 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2402 * sysdeps/pthread/bits/initspin.h: New file.
2403 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
2404 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
2405 (__pthread_alt_init_lock): Likewise.
2406 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
2408 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2410 * oldsemaphore.c (__old_sem_init): Release lock with
2411 LT_SPINLOCK_INIT, not zero.
2412 * spinlock.c (__pthread_unlock): Likewise.
2413 (__pthread_alt_lock): Likewise.
2414 (__pthread_alt_timedlock): Likewise.
2415 (__pthread_alt_unlock): Likewise.
2416 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
2417 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
2418 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
2419 LT_SPINLOCK_INIT do initialize spinlocks not 0.
2421 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2423 * shlib-versions: Add version definitions for hppa-linux.
2425 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2427 * sysdeps/hppa/pspinlock.c: New file.
2428 * sysdeps/hppa/pt-machine.h: New file.
2429 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
2431 2000-10-05 Jakub Jelinek <jakub@redhat.com>
2433 * mutex.c (__pthread_mutex_destroy): Correct test of
2434 busy mutex for mutexes using alternate fastlocks.
2435 Patch by dtc@cmucl.cons.org.
2437 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
2439 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
2441 2000-09-28 Ulrich Drepper <drepper@redhat.com>
2443 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
2444 test for owner first.
2445 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2447 * cancel.c (pthread_cancel): Don't do anything if cancelation is
2450 2000-09-26 Ulrich Drepper <drepper@redhat.com>
2452 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
2453 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2455 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2456 _POSIX_MONOTONIC_CLOCK.
2458 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
2461 2000-09-20 Andreas Jaeger <aj@suse.de>
2463 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
2464 "testrtsig.h" conditional.
2466 2000-09-11 Ulrich Drepper <drepper@redhat.com>
2468 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
2469 pthread_attr_setstack.
2470 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
2471 pthread_attr_setstack.
2472 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
2474 2000-09-05 Ulrich Drepper <drepper@redhat.com>
2476 * Examples/ex14.c: New file.
2477 * Makefile (tests): Add ex14.
2479 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
2480 mutex. Patch by dtc@cmucl.cons.org.
2482 * ecmutex.c: New file.
2483 * Makefile (tests): Add ecmutex.
2485 2000-09-04 H.J. Lu <hjl@gnu.org>
2487 * attr.c (__pthread_attr_setguardsize): Use page_roundup
2488 instead of roundup to round up to the page size.
2490 2000-09-03 Mark Kettenis <kettenis@gnu.org>
2492 * manager.c (pthread_exited): Correctly report event as TD_REAP
2493 instead of TD_DEATH. Fix comments.
2495 2000-09-03 Ulrich Drepper <drepper@redhat.com>
2497 * spinlock.h (testandset): Add cast to avoid warning.
2498 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
2500 2000-09-02 Andreas Jaeger <aj@suse.de>
2502 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
2505 2000-09-01 Ulrich Drepper <drepper@redhat.com>
2507 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2508 Fix typo in last patch (_mode -> _flags).
2510 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2511 Provide definition which respects _IO_USER_LOCK flag.
2513 2000-08-30 Ulrich Drepper <drepper@redhat.com>
2515 * manager.c (pthread_allocate_stack): Clear descriptor only if not
2518 2000-08-25 Ulrich Drepper <drepper@redhat.com>
2520 * Makefile: Add rules to build and run unload.
2521 * unload.c: New file.
2523 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
2525 * sysdeps/pthread/pthread.h
2526 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
2527 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
2529 2000-08-24 Andreas Jaeger <aj@suse.de>
2531 * Examples/ex13.c: Include <string.h> for strerror prototype and
2532 <stdlib.h> for abort prototype.
2533 (pthr_cond_signal_mutex): Rewrite to silence GCC.
2534 (thread_start): Remove unused variable err.
2535 (main): Silence GCC warnings.
2537 2000-08-22 Andreas Jaeger <aj@suse.de>
2539 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
2541 * Makefile (tests): Add ex13.
2543 2000-08-20 Ulrich Drepper <drepper@redhat.com>
2545 * semaphore.h: Add restrict where required by AGd4.
2546 * sysdeps/pthread/pthread.h: Likewise.
2547 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
2549 2000-08-15 Ulrich Drepper <drepper@redhat.com>
2551 * Makefile (tests): Add ex12. Add rule to build it.
2552 * Examples/ex12.c: New file.
2554 2000-08-13 Ulrich Drepper <drepper@redhat.com>
2556 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
2557 even though the implementation is not quite complete (but it reports
2558 it). Define _POSIX_MESSAGE_PASSING to -1.
2559 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2561 2000-08-12 Andreas Jaeger <aj@suse.de>
2563 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
2565 (__compare_and_swap): Likewise.
2566 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
2568 2000-08-10 Ulrich Drepper <drepper@redhat.com>
2570 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
2571 p_h_errnop correctly and not to NULL.
2573 2000-08-05 Ulrich Drepper <drepper@redhat.com>
2575 * Banner: Bump version number to 0.9.
2577 2000-08-04 Ulrich Drepper <drepper@redhat.com>
2579 * Makefile (tests): Add tststack. Add rule to build the program.
2580 * tststack.c: New file.
2582 * internals.h: Declare __pthread_max_stacksize.
2583 * pthread.c (__pthread_max_stacksize): New variable.
2584 (__pthread_initialize_manager): Determine __pthread_initialize_manager
2586 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
2587 (pthread_allocate_stack): Allow kernel to choose stack address if
2588 FLOATING_STACKS. This also handles variable-sized stacks.
2589 Always allocate stack and guardpage together. Use mprotect to
2590 change guardpage access.
2591 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
2592 ARCH_STACK_MAX_SIZE.
2594 * attr.c (__pthread_attr_setstacksize): Also test value against
2597 * manager.c (__pthread_nonstandard_stacks): Define only if
2598 THREAD_SELF is not defined.
2599 (pthread_allocate_stack): Always initialize gardaddr to a correct
2601 (pthread_handle_create): Unmap thread with one call.
2602 (pthread_free): Remove test for initial thread before removing stack.
2603 Unmap stack with one call.
2605 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
2606 1 to avoid removing the stack.
2608 2000-07-27 Jes Sorensen <jes@linuxcare.com>
2610 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
2611 load of spin lock to prime the cache before the atomic compare and
2612 exchange operation (cmpxchg4). This avoids the spinning on the
2613 cmpxchg4 instruction and reduces movement of the cache line back
2614 and forth between the processors (explanation by Asis K. Mallick
2615 from Intel). This basically makes the implementation operate the
2616 same as the Linux kernel implementation.
2618 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
2619 * sysdeps/ia64/pspinlock.c: New file.
2621 2000-08-03 Ulrich Drepper <drepper@redhat.com>
2623 * pthread.c: Move definition of __pthread_set_own_extricate_if...
2624 * spinlock.h: ...here. Remove locking.
2625 * internals.h: Remove __pthread_set_own_extricate_if prototype.
2627 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
2628 (rwlock_rd_extricate_func): Don't determine self, let
2629 __pthread_lock do it.
2630 (rwlock_wr_extricate_func): Likewise.
2631 (rwlock_have_already): Optimize *pself handling a bit.
2633 * mutex.c: Use __builtin_expect.
2634 * pthread.c: Likewise.
2636 2000-08-02 Andreas Jaeger <aj@suse.de>
2638 * sysdeps/s390/pspinlock.c: New file.
2639 * sysdeps/s390/pt-machine.h: New file.
2640 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
2642 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2644 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
2646 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2648 2000-07-26 Andreas Jaeger <aj@suse.de>
2650 * pthread.c: Initialize p_sem_avail.
2652 2000-07-25 Ulrich Drepper <drepper@redhat.com>
2654 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
2655 * semaphore.c: Handle spurious wakeups.
2657 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
2658 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
2660 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
2661 (__pthread_wait_for_restart): Likewise.
2663 * condvar.c (pthread_cond_wait): Also check whether thread is
2664 cancelable before aborting loop.
2665 (pthread_cond_timedwait): Likewise.
2667 * signals.c (pthread_sighandler): Remove special code to restrore
2669 (pthread_sighandler_t): Likewise.
2671 2000-07-25 Mark Kettenis <kettenis@gnu.org>
2673 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
2674 * pthread.c: Include <resolv.h>.
2675 (_res): Undefine. Add extern declaration.
2677 2000-07-24 Ulrich Drepper <drepper@redhat.com>
2679 * pthread.c (__pthread_initial_thread): Update initializer.
2680 (__pthread_manager_thread): Likewise.
2681 (pthread_initialize): Move setrlimit call to...
2682 (__pthread_initialize_manager): ...here.
2683 (__pthread_reset_main_thread): Reset also soft limit on stack size.
2685 * condvar.c: Handle spurious wakeups. [PR libc/1749].
2686 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
2688 2000-07-21 Ulrich Drepper <drepper@redhat.com>
2690 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
2691 __compare_and_swap to define testandset.
2692 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
2693 Define IMPLEMENT_TAS_WITH_CAS.
2695 2000-07-20 Ulrich Drepper <drepper@redhat.com>
2697 * Makefile: Pass -z nodelete to linker for libpthread.so
2698 generation if it understand this option.
2700 2000-07-18 Mark Kettenis <kettenis@gnu.org>
2702 * manager.c (pthread_handle_create): Remove initialization of
2703 new_thread->p_res._sock.
2705 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
2707 Bugfixes to the variant of the code for machines with no compare
2710 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
2711 node was not being properly enqueued, due to failing to update
2712 the lock->__status field.
2714 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
2715 being set inappropriately, causing the suspend function to be called
2716 with a null self pointer and crash.
2718 2000-07-18 Ulrich Drepper <drepper@redhat.com>
2720 * spinlock.h (__pthread_alt_trylock): Fix code used if no
2721 compare&swap is available.
2723 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
2726 * pthread.c (pthread_initialize): Don't use sysconf to determine
2727 whether the machine has more than one processor.
2729 * spinlock.c (__pthread_alt_timedlock): Add back one of the
2730 removed thread_self calls.
2732 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2734 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
2735 __compare_and_swap to compare_and_swap in code which assumes
2736 compare swap is available.
2738 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2740 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
2741 bug whereby thr field of waitnode structure would not be correctly
2742 set unless a null self pointer is passed to the functions.
2743 Eliminated redundant calls to thread_self().
2745 2000-07-18 Jakub Jelinek <jakub@redhat.com>
2747 * pthread.c (__pthread_initialize_manager): Lock
2748 __pthread_manager_thread.p_lock before calling clone.
2750 2000-05-05 H.J. Lu <hjl@gnu.org>
2752 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
2753 have acquire semantics.
2754 (__compare_and_swap_with_release_semantics): New inline
2756 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
2758 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
2760 * manager.c: Fix the problem with signals at startup.
2761 Change the way that thread stacks are allocated on IA64.
2762 Clean up some of the guard page allocation stuff.
2764 1999-12-19 H.J. Lu <hjl@gnu.org>
2766 * internals.h (page_roundup): New.
2767 * attr.c (__pthread_attr_setguardsize); Use page_roundup
2769 * manager.c (pthread_allocate_stack): Make sure guardaddr is
2770 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2773 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
2775 * manager.c (pthread_allocate_stack): Unmap the stack top
2776 if failed to map the stack bottom.
2778 (pthread_free): Fix the guard page.
2780 * pthread.c (pthread_initialize): Set rlimit correctly for
2781 NEED_SEPARATE_REGISTER_STACK.
2783 1999-12-16 H.J. Lu <hjl@gnu.org>
2785 * pthread.c (__pthread_initialize_manager): Pass
2786 __pthread_manager_thread_bos instead of
2787 __pthread_manager_thread_tos to __clone2.
2789 1999-12-16 H.J. Lu <hjl@gnu.org>
2791 * manager.c (pthread_allocate_stack): Correct the calculation
2792 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2795 1999-12-13 H.J. Lu <hjl@gnu.org>
2797 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2798 bit after setting ar.ccv.
2800 1999-12-12 H.J. Lu <hjl@gnu.org>
2802 * manager.c (pthread_allocate_stack): Make the starting
2803 address of the stack bottom page aligned. FIXME: it may
2804 need changes in other places.
2805 (pthread_handle_create): Likewise.
2807 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2809 * manager.c (pthread_allocate_stack): Handle
2810 NEED_SEPARATE_REGISTER_STACK.
2811 (pthread_handle_create): Likewise.
2812 * pthread.c (__pthread_initialize_manager): Likewise.
2814 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2816 1999-12-02 H.J. Lu <hjl@gnu.org>
2818 * sysdeps/ia64/pt-machine.h: New.
2820 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2822 * wrapsyscall.c: Mark non-__ protected names as weak.
2825 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2827 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2829 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2831 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2832 Add tests also to new alternative spinlock implementation.
2833 * spinlock.h: Likewise.
2834 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2836 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2838 * Version: Export __sigaction.
2839 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2841 * pthread.c: Use __libc_sigaction instead of __sigaction.
2843 * condvar.c: Implement pthread_condattr_getpshared and
2844 pthread_condattr_setpshared.
2845 * mutex.c: Implement pthread_mutexattr_getpshared and
2846 pthread_mutexattr_setpshared.
2847 * Versions: Export new functions.
2848 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2850 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2851 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2854 2000-07-04 Greg McGary <greg@mcgary.org>
2856 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2857 pragmas. Include bp-sym.h only if _LIBC.
2859 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2861 * spinlock.c (__pthread_unlock): Properly place write barrier.
2862 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2864 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2866 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2867 faster on SMP systems. No more emulation of compare&swap for adaptive
2869 * spinlock.h: Likewise.
2870 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2871 Replace fast with adaptive mutex.
2872 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2873 * condvar.c: Likewise.
2874 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2875 * internals.h: Declare __pthread_smp_kernel.
2876 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2877 _pthread_fastlock structure.
2878 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2880 * pthread.c: Remove initialization to zero from global variables.
2882 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2884 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2886 2000-06-28 Greg McGary <greg@mcgary.org>
2888 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2889 pthread functions that have pointers in their return+arg signatures.
2891 2000-06-27 Greg McGary <greg@mcgary.org>
2893 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2894 extern declarations of pthread functions that have pointers in
2895 their return+arg signatures.
2897 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2899 * Makefile (tests): Add ex11. Add rules to build it.
2900 * Examples/ex11.c: New file.
2901 * rwlock.c: Fix complete braindamaged previous try to implement
2904 * spinlock.c: Pretty print.
2906 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2908 * Makefile (tests): Add ex10. Add rules to build it.
2909 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2910 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2911 * condvar.c (pthread_cond_wait): Allow mutex of kind
2912 PTHREAD_MUTEX_TIMED_NP.
2913 (pthread_cond_timedwait_relative): Likewise.
2914 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2915 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2916 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2917 (__pthread_mutex_lock): Use __pthread_alt_lock for
2918 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2919 (__pthread_mutex_timedlock): New function.
2920 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2921 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2922 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2923 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2924 * spinlock.c: Implement alternate fastlocks.
2925 * spinlock.h: Add prototypes.
2926 * Examples/ex10.c: New file.
2927 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2928 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2930 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2931 (__pthread_rwlock_timedrdlock): New function.
2932 (__pthread_rwlock_timedwrlock): New function.
2933 Use laternate fastlock function everywhere.
2935 2000-06-21 Andreas Jaeger <aj@suse.de>
2937 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2940 * join.c: Include <stdlib.h> for exit prototype.
2942 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2944 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2946 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2947 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2949 * Makefile (libpthread-routines): Add barrier.
2950 (tests): Add ex9. Add rule to build ex9.
2951 * Versions: Export barrier functions.
2952 * barrier.c: New file.
2953 * Examples/ex9.c: New file.
2954 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2955 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2956 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2958 2000-06-19 H.J. Lu <hjl@gnu.org>
2960 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2961 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2962 (compare_and_swap_with_release_semantics): New. Default to
2963 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2966 * spinlock.c (__pthread_unlock): Call
2967 compare_and_swap_with_release_semantics () instead of
2968 compare_and_swap ().
2970 2000-06-19 Ulrich Drepper <drepper@redhat.com>
2972 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2974 * sysdeps/pthread/timer_delete.c: Likewise.
2975 * sysdeps/pthread/timer_getoverr.c: Likewise.
2976 * sysdeps/pthread/timer_gettime.c: Likewise.
2977 * sysdeps/pthread/timer_settime.c: Likewise.
2979 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
2981 Timer nodes are now reference counted, and can be marked
2982 as deleted. This allows for the safe release of the global mutex
2983 in the middle without losing the timer being operated on.
2985 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
2986 member is now an enum with three values, so that an intermediate
2987 state can be represented (deleted but not free for reuse yet).
2988 New refcount member added.
2989 * sysdeps/pthread/timer_routines.c: Likewise.
2991 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2992 timer_valid): New inline functions added.
2994 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2995 restructured, recursive deadlock bug fixed.
2997 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2998 timer_addref to ensure that timer won't be deleted while mutex is not
2999 held. Also uses timer_invalid to perform validation of timer handle.
3000 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3001 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
3003 2000-06-14 Ulrich Drepper <drepper@redhat.com>
3005 * shlib-versions: Add entry for SH.
3006 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
3008 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
3010 A few optimizations. Got rid of unnecessary wakeups of timer threads,
3011 tightened up some critical regions and micro-optimized some list
3014 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3015 Returns int value now to indicate whether timer was queued at head.
3016 * sysdeps/pthread/posix-timer.h: Likewise.
3017 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
3018 new return value from __timer_thread_queue_timer to avoid waking
3019 up timer thread unnecessarily.
3021 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
3022 inuse flag, because this requires mutex to be held. Callers updated
3023 to do the check when they have the mutex.
3024 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
3026 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
3027 regions: avoids making system calls while holding timer mutex, and
3028 a few computations were moved outside of the mutex as well.
3029 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
3031 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
3032 to list_unlink_ip, meaning idempotent. Pointer manipulation
3033 changed to get better better code out of gcc.
3034 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
3035 version of list_unlink added here.
3036 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
3037 function in all places: idempotent one for timers, non-idempotent
3038 one for thread nodes.
3039 * sysdeps/pthread/timer_settime: Likewise.
3040 * sysdeps/pthread/timer_routines.c: Likewise.
3042 2000-06-13 Ulrich Drepper <drepper@redhat.com>
3044 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
3045 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3047 * sysdeps/pthread/Makefile: Remove tests definition.
3049 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3050 Yutaka Niibe <gniibe@chroot.org>
3052 * sysdeps/sh/pspinlock.c: New file.
3053 * sysdeps/sh/pt-machine.h: New file.
3055 2000-06-12 Ulrich Drepper <drepper@redhat.com>
3057 * Makefile (tests): Add joinrace.
3059 * Examples/ex6.c: Test return value of pthread_join.
3061 2000-06-11 Geoff Keating <geoffk@cygnus.com>
3063 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
3064 (__pthread_spin_trylock): Implement.
3065 (__pthread_spin_unlock): Implement.
3066 (__pthread_spin_init): Implement.
3067 (__pthread_spin_destroy): Implement.
3069 2000-06-10 Ulrich Drepper <drepper@redhat.com>
3071 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
3072 really append the entry.
3074 2000-06-10 Andreas Jaeger <aj@suse.de>
3076 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
3078 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
3080 * sysdeps/pthread/timer_create.c: Thread matching now done on
3081 clock type as well as thread attributes.
3082 There are individual global signal-delivering threads for
3083 different clock types.
3084 * sysdeps/pthread/posix-timer.h: Likewise.
3085 * sysdeps/pthread/timer_routines.c: Likewise.
3087 * sysdeps/pthread/timer_routines.c: Thread allocation and
3088 deallocation function now remembers to put thread on active
3089 list and remove from active list.
3090 Thus now the feature of binding multiple timers
3091 to a single thread actually works.
3093 2000-06-10 Ulrich Drepper <drepper@redhat.com>
3095 * pthread.c (__pthread_create_2_1): Optimize a bit.
3097 * internals.h (invalid_handle): Also test for p_terminated != 0.
3098 (nonexisting_handle): New function. Same as old invalid_handle.
3099 * join.c (pthread_join): Use nonexisting_handle instead of
3100 invalid_handle to test for acceptable thread handle.
3101 * manager.c (pthread_handle_free): Likewise.
3102 * joinrace.c: New file.
3103 Reported by Permaine Cheung <pcheung@cygnus.com>.
3105 2000-06-08 Ulrich Drepper <drepper@redhat.com>
3107 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3108 Correct handling of matching variable.
3110 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
3113 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3114 Be prepared for empty timer list.
3116 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
3117 CPUTIME clock ID. Add support for thread clocks.
3119 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
3120 subtraction were switched.
3122 * sysdeps/pthread/timer_routines.c (init_module): Use
3123 THREAD_MAXNODES threads.
3125 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
3126 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
3127 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
3128 with sigqueueinfo is this system call is available.
3130 * sysdeps/pthread/timer_create.c (timer_create): Allow
3131 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
3133 * sysdeps/pthread/Makefile: New file. Add rules to build timer
3135 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
3137 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
3139 * sysdeps/pthread/posix-timer.h: New file.
3140 * sysdeps/pthread/timer_create.c: New file.
3141 * sysdeps/pthread/timer_delete.c: New file.
3142 * sysdeps/pthread/timer_getoverr.c: New file.
3143 * sysdeps/pthread/timer_gettime.c: New file.
3144 * sysdeps/pthread/timer_routines.c: New file.
3145 * sysdeps/pthread/timer_settime.c: New file.
3146 * sysdeps/pthread/tst-timer.c: New file.
3148 2000-06-08 Ulrich Drepper <drepper@redhat.com>
3150 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
3151 LINK_MAX definitions if necessary.
3153 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
3155 Added missing fork time handling of global libio lock.
3157 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
3158 not just the individual stream locks. Rewritten to use new
3159 iterator interface provided by libio rather than accessing
3162 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
3163 which lock and unlock the stream list using the new interface
3165 * internals.h: Likewise.
3167 * ptfork.c (__fork): Now calls __flockfilelist before fork,
3168 and __funlockfilelist in the parent after the fork.
3169 Child still calls __fresetlockfiles as before.
3171 * linuxthreads.texi: Now explains what happens to streams at
3172 fork time. Also whole new section on forking and thread added.
3173 Definition of pthread_atfork moved out of Miscellaneous Functions
3174 to this new section.
3176 2000-06-04 Jakub Jelinek <jakub@redhat.com>
3178 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
3179 Add missing register.
3180 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
3182 2000-06-02 Jakub Jelinek <jakub@redhat.com>
3184 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
3185 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
3186 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
3188 2000-05-31 Andreas Jaeger <aj@suse.de>
3190 * sysdeps/mips/pspinlock.c: Implement spinlocks.
3192 2000-05-28 Ulrich Drepper <drepper@redhat.com>
3194 * spinlock.c (__pthread_lock): Remove ASSERT.
3196 * Makefile (tests): Add ex8.
3197 * Examples/ex8.c: New file.
3199 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
3201 Bugfix: The pthread_atfork mechanism now takes care of its
3202 own internal mutex at fork time.
3204 * ptfork.c (__fork): Revised so that the mutex is held across
3205 the fork operation and while the handlers are called, and so that
3206 the child resets the mutex.
3208 * linuxthreads.texi: Updated pthread_atfork documentation to make
3209 it clear that fork and pthread_atfork can't be reentered from
3210 atfork handlers, that pthread_atfork and fork are mutually atomic,
3211 and that the handlers are inherited by the child process.
3213 2000-05-24 Ulrich Drepper <drepper@redhat.com>
3215 * Makefile (libpthread-routines): Add pspinlock.
3216 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
3217 Use struct _pthread_fastlock instead of pthread_spinlock_t.
3218 * condvar.c: Likewise.
3219 * internals.h: Likewise.
3221 * manager.c: Likewise.
3222 * mutex.c: Likewise.
3223 * pthread.c: Likewise.
3224 * rwlock.c: Likewise.
3225 * semaphore.c: Likewise.
3226 * signals.c: Likewise.
3227 * spinlock.h: Likewise.
3228 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
3229 * sysdeps/alpha/pspinlock.c: New file.
3230 * sysdeps/arm/pspinlock.c: New file.
3231 * sysdeps/i386/pspinlock.c: New file.
3232 * sysdeps/m68k/pspinlock.c: New file.
3233 * sysdeps/mips/pspinlock.c: New file.
3234 * sysdeps/powerpc/pspinlock.c: New file.
3235 * sysdeps/sparc/sparc32/pspinlock.c: New file.
3236 * sysdeps/sparc/sparc64/pspinlock.c: New file.
3237 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
3238 back to _pthread_fastlock. Define new pthread_spinlock_t.
3240 2000-05-24 Andreas Jaeger <aj@suse.de>
3242 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
3244 2000-05-21 Jakub Jelinek <jakub@redhat.com>
3246 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
3248 2000-05-13 Jakub Jelinek <jakub@redhat.com>
3250 * internals.h (__RES_PTHREAD_INTERNAL): Define.
3252 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3254 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
3255 object state is represented with additional bits which distinguish
3256 whether that state was set up in the current process, or
3257 in an ancestor process. If that state was set in an ancestor,
3258 it means that a fork happened while thread was executing the init
3259 function. In that case, the state is reset to NEVER.
3260 * mutex.c (__pthread_once_fork_prepare): New function.
3261 (__pthread_once_fork_child): Likewise
3262 (__pthread_once_fork_parent): Likewise
3263 (__pthread_reset_pthread_once): Removed.
3264 * ptfork.c (__fork): Call new handlers in mutex.c.
3265 * internals.h: Declarations of new mutex.c functions added.
3266 Declaration of removed function deleted.
3267 * linuxthreads.texi: Updated documentation about pthread_once
3268 to clarify what happens under cancellation and forking.
3270 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3272 * internals.h: New thread manager request type, REQ_KICK.
3273 * join.c (pthread_exit): main thread now calls exit() instead
3274 of _exit() in order to proper process cleanup.
3275 * manager.c (__pthread_manager): Do not terminate manager
3276 after unblocking main thread; wait for main thread's
3277 REQ_PROCESS_EXIT request instead.
3278 Also, added REQ_KICK case to handle new request; this just does
3280 * manager.c (pthread_exited): Do not terminate manager after
3281 unblocking main thread.
3282 * manager.c (__pthread_manager_sighandler): If the main thread
3283 is waiting for all other threads to die, send a REQ_KICK into
3284 the thread manager request pipe to get it to clean out the threads
3285 and unblock the main thread as soon as possible. This fixes
3286 the 2000 millisecond hang on shutdown bug.
3287 * Examples/ex7.c: New file, tests shutdown behavior when all threads
3288 including the main one call pthread_exit(), or implicitly do so.
3289 * Makefile (tests): Add ex7.
3291 2000-05-05 Andreas Jaeger <aj@suse.de>
3293 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3294 (pthread_getcpuclockid): Correct test for ourselves.
3296 2000-05-05 Ulrich Drepper <drepper@redhat.com>
3298 * internals.h (struct _pthread_descr_struct): Reorganization.
3299 Allocate room for 16 pointers at head of the structure for future
3300 thread-local data handling. Move p_self member in this area.
3301 * manager.c (pthread_handle_create): Adjust use of p_self.
3302 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
3303 * pthread.c (__pthread_initial_thread): Adjust initialization.
3304 (__pthread_manager_thread): Likewise.
3306 2000-04-29 Bruno Haible <haible@clisp.cons.org>
3308 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
3309 for eventmask larger than 1 word.
3311 2000-04-27 Ulrich Drepper <drepper@redhat.com>
3313 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
3314 * pthread.c (__pthread_initialize_minimal): New function. Perform
3315 minimal initialization.
3316 (pthread_initialize): Remove this code here.
3317 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
3318 are working around the problem in glibc.
3320 2000-04-25 Ulrich Drepper <drepper@redhat.com>
3322 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
3323 now. First gcc must be fixed (more concrete: libgcc).
3325 2000-04-24 Ulrich Drepper <drepper@redhat.com>
3327 * pthread.c: Remove special treatement for interrupt handlers on x86.
3328 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
3329 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
3331 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
3333 2000-04-24 Mark Kettenis <kettenis@gnu.org>
3335 * join.c (pthread_exit): Set p_terminated after reporting the
3336 termination event instead of before.
3338 2000-04-20 Jakub Jelinek <jakub@redhat.com>
3340 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
3343 2000-04-18 Andreas Jaeger <aj@suse.de>
3345 * Versions: Use ld instead of ld.so.
3347 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3349 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
3350 Remove the typedef keyword.
3352 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3354 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
3356 (READ_MEMORY_BARRIER): Define.
3357 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
3359 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
3362 2000-04-17 Ulrich Drepper <drepper@redhat.com>
3364 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3365 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
3366 use thread_handle().
3368 2000-04-16 Ulrich Drepper <drepper@redhat.com>
3370 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
3371 if fast mutex is used. Don't initialize `already_canceled' twice.
3372 Correctly test for return value of timedsuspend.
3374 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
3375 therefore don't need the _rt versions of the signal handlers.
3377 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3379 * pthread.c (pthread_yield): New function.
3380 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
3381 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
3382 * internals.h: Declare __pthread_yield.
3384 * pthread.c (pthread_initialize): Avoid a bit more code if
3385 realtime signals are known to exist.
3387 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
3388 to dynamically detect RT signals and avoid generating compatibility
3389 functions with old kernel.
3390 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
3391 __pthread_restart_new directly.
3392 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
3393 __pthread_wait_for_restart_signal directly.
3394 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
3395 __pthread_timedsuspend_new directly.
3397 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3399 * condvar.c: Remove all the special code to handle cond_timedwait.
3400 Use timedsuspend instead.
3401 * internals.h: Declare __pthread_timedsuspend_old,
3402 __pthread_timedsuspend_new, and __pthread_timedsuspend.
3403 Remove declaration of __pthread_init_condvar.
3404 * pthread.c: Define __pthread_timedsuspend variable.
3405 (__pthread_timedsuspend_old): New function. Timed suspension
3406 implementation for old Linux kernels.
3407 (__pthread_timedsuspend_new): New function. Timed suspension
3408 implementation for new Linux kernels.
3409 * restart.h (timedsuspend): New function. Call appropriate
3410 suspension function through __pthread_timedsuspend.
3411 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
3413 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3415 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
3417 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
3419 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
3420 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3422 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
3423 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3425 2000-04-14 Andreas Jaeger <aj@suse.de>