1 2003-01-16 Jakub Jelinek <jakub@redhat.com>
3 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
6 2003-01-15 Jakub Jelinek <jakub@redhat.com>
8 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
9 __libc_lock_init_recursive): Initialize fields directly.
11 2003-01-15 Jakub Jelinek <jakub@redhat.com>
13 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
14 __fork to be far away from __vfork ifndef SHARED.
15 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
17 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
18 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
19 Add a missing instruction.
20 * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
21 branch to __fork even if __NR_vfork is not defined.
23 2003-01-14 Ulrich Drepper <drepper@redhat.com>
25 * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
28 2003-01-14 Steven Munroe <sjmunroe@us.ibm.com>
30 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
32 2003-01-14 Jakub Jelinek <jakub@redhat.com>
34 * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
36 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
38 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
39 unterminated string literals.
40 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
42 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
44 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
45 (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from
48 (SINGLE_THREAD_P): Save an instruction.
49 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
50 parameter to SINGLE_THREAD_P call.
51 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
54 2003-01-10 Andreas Schwab <schwab@suse.de>
56 * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
58 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
60 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
61 backchain in pseudo_cancel. Minor code improvements.
62 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
65 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
67 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
68 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
70 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
72 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
74 2002-01-09 Richard Henderson <rth@redhat.com>
76 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
77 ret follows pseudo, and thus avoid branch-to-branch in cancel
78 case. Use SYSCALL_ERROR_LABEL.
80 2003-01-11 Philip Blundell <philb@gnu.org>
82 * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
83 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
85 (UNDOARGS_5): Fix ordering of pushes and pops.
86 (SINGLE_THREAD_P_PIC): New.
87 (SINGLE_THREAD_P_INT): New.
88 (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it
90 (PSEUDO): Use SINGLE_THREAD_P_INT.
92 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
94 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
96 2003-01-11 Jakub Jelinek <jakub@redhat.com>
98 * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
99 [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
100 TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
101 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
102 INIT_THREAD_SELF): Define.
103 [HAVE_TLS_SUPPORT]: Include descr.h.
104 (NONTLS_INIT_TP): Point __thread_self at the end of dummy
105 struct _pthread_descr_struct.
106 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
107 THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
109 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
111 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
113 (__pthread_initialize_manager): Rename tcb to mgr.
114 Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
115 _pthread_descr) below tcbp, otherwise to tcbp.
116 * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
117 new_thread to be below _dl_allocate_tls (). Adjust new_thread back
118 before freeing. Fix clone arguments if report_events and USE_TLS.
119 (pthread_free): Adjust th back before freeing.
121 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
123 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
124 * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
125 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
127 2003-01-09 Jakub Jelinek <jakub@redhat.com>
129 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
130 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
131 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
132 [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
133 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
134 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
135 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
136 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
137 * tst-popen.c: New test.
138 * Makefile (tests): Add tst-popen.
140 2003-01-06 Jakub Jelinek <jakub@redhat.com>
142 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
143 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
145 2003-01-06 Jakub Jelinek <jakub@redhat.com>
147 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
148 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
150 2003-01-06 Philip Blundell <philb@gnu.org>
152 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
154 2003-01-06 Jakub Jelinek <jakub@redhat.com>
156 * internals.h (LIBC_CANCEL_HANDLED): Define.
157 * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
158 * signals.c (LIBC_CANCEL_HANDLED): Add.
159 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
160 * tst-cancel-wrappers.sh: Remove all exceptions.
162 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
164 2003-01-05 Andreas Schwab <schwab@suse.de>
166 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
169 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
172 (CDISABLE): Likewise.
174 2003-01-05 Ulrich Drepper <drepper@redhat.com>
176 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
177 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
179 * Makefile (libc.so-no-z-defs): Define to yes.
181 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
183 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
184 (tcbhead_t): Add multiple_threads member.
185 (TLS_INIT_TP_EXPENSIVE): Define.
186 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
187 strings. Remove unused code.
188 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
190 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
192 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
193 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
195 2003-01-04 Jakub Jelinek <jakub@redhat.com>
197 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
198 even if NOT_IN_libc is defined.
200 2003-01-05 Jakub Jelinek <jakub@redhat.com>
202 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
203 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
204 * sysdeps/s390/Makefile: New file.
205 * sysdeps/s390/tcb-offsets.sym: New file.
206 * sysdeps/s390/tls.h: New file.
208 2003-01-03 Richard Henderson <rth@redhat.com>
210 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
212 2003-01-03 Andreas Jaeger <aj@suse.de>
214 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
216 2003-01-03 Jakub Jelinek <jakub@redhat.com>
218 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
220 2003-01-02 Ulrich Drepper <drepper@redhat.com>
222 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
225 2003-01-02 Jakub Jelinek <jakub@redhat.com>
227 * internals.h (struct pthread_functions): Rename
228 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
229 * pthread.c (pthread_functions): Adjust.
230 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
231 pthread_cond_*@GLIBC_2.0 compatibility symbols.
232 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
233 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
234 and pthread_cond_wait.
236 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
238 (pthread_cond_t): Add __align member, shorten __padding.
239 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
240 __padding and __align too.
242 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
244 * sysdeps/pthread/sigaction.c: New file.
245 * sysdeps/unix/sysv/linux/raise.c: New file.
246 * sysdeps/unix/sysv/linux/sigwait.c: New file.
247 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
248 weak_extern with #ifndef SHARED.
249 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
251 * signals.c (__sigaction): Renamed to...
252 (__pthread_sigaction): ... this.
253 (__sigaction): New strong alias, #ifdef SHARED only.
254 (sigaction): Protect with #ifdef SHARED.
255 (sigwait): Renamed to...
256 (__pthread_sigwait): ... this.
257 (sigwait): New strong alias, #ifdef SHARED only.
258 (raise): Renamed to...
259 (__pthread_raise): ... this.
260 (raise): New strong alias, #ifdef SHARED only.
261 * internals.h (__pthread_sigaction, __pthread_sigwait,
262 __pthread_raise): New prototypes.
263 (struct pthread_functions): Add ptr_pthread_sigaction,
264 ptr_pthread_sigwait, ptr_pthread_raise.
265 * pthread.c (pthread_functions): Renamed to...
266 (__pthread_functions): ... this. No longer static, no longer
267 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
268 and ptr_pthread_raise.
269 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
270 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
271 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
272 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
274 * Makefile (tests, tests-static): Add tst-cancel-static.
275 * tst-cancel-static.c: New test.
277 2003-01-02 Jakub Jelinek <jakub@redhat.com>
279 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
281 2003-01-02 Ulrich Drepper <drepper@redhat.com>
283 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
284 * condvar.c: Add symbol versioning. The compatibility versions
285 are the same as the change in the interface does not effect this
287 * Versions [libpthread]: Add definitions for new pthread_cond_*
288 interfaces for version GLIBC_2.3.2.
290 2002-12-31 Ulrich Drepper <drepper@redhat.com>
292 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
294 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
295 for __register_atfork.
297 2002-12-31 Jakub Jelinek <jakub@redhat.com>
299 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
300 ASSEMBLER test macro.
301 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
302 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
303 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
304 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
305 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
306 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
308 * sysdeps/pthread/errno-loc.c (__errno_location): Add
310 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
311 * sysdeps/pthread/res-state.c (__res_state): Likewise.
312 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
313 __libc_current_sigrtmax): Likewise.
314 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
315 __libc_internal_tsd_set, __libc_internal_tsd_address,
316 __libc_alloca_cutoff.
317 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
318 __libc_internal_tsd_set, __libc_internal_tsd_address.
320 * sysdeps/pthread/list.h: Remove assert.h include.
321 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
323 * sysdeps/pthread/list.h: New file.
324 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
325 * sysdeps/unix/sysv/linux/fork.c: New file.
326 * sysdeps/unix/sysv/linux/fork.h: New file.
327 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
328 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
329 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
330 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
331 * sysdeps/unix/sysv/linux/Makefile: New file.
332 * sysdeps/unix/sysv/linux/Versions: New file.
333 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
334 (__pthread_cleanup_upto): ...this. Add targetframe argument,
335 use it instead of currentframe. No longer static.
336 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
337 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
338 (struct pthread_functions): Add ptr_pthread_fork,
339 ptr_pthread_cleanup_upto.
340 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
341 ptr_pthread_cleanup_upto.
342 * ptfork.c: Include fork.h.
343 (struct handler_list, struct handler_list_block): Remove.
344 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
345 pthread_atfork_child): Remove.
346 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
347 (__pthread_fork): New function.
348 (__fork, __vfork): Call __libc_fork.
349 * Makefile (libpthread-routines): Add old_pthread_atfork.
350 (libpthread-nonshared): Add pthread_atfork.
351 (others): Depend on $(objpfx)libpthread_nonshared.a.
352 ($(objpfx)libpthread_nonshared.a): New rule.
353 (install): Depend on $(inst_libdir)/libpthread.so.
354 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
356 (tests): Depend on libpthread_nonshared.a too.
357 * old_pthread_atfork.c: New file.
358 * pthread_atfork.c: New file.
359 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
362 2002-12-30 Jakub Jelinek <jakub@redhat.com>
364 * forward.c: Make all functions available by default again. It
365 caused too much trouble.
366 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
367 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
368 ptr___pthread_attr_init_2_*.
369 * pthread.c (pthread_functions): Adjust.
371 2002-12-28 Jakub Jelinek <jakub@redhat.com>
373 * libc_pthread_init.c (__libc_pthread_init): Remove
374 MULTIPLE_THREADS_OFFSET check.
375 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
376 (SYSINFO_OFFSET): Remove.
377 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
379 * sysdeps/i386/tcb-offsets.sym: New file.
380 * sysdeps/pthread/tcb-offsets.h: New file.
381 * sysdeps/sparc/sparc32/tls.h: Removed.
382 * sysdeps/sparc/sparc64/tls.h: Move...
383 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
384 * sysdeps/sparc/Makefile: New file.
385 * sysdeps/sparc/tcb-offsets.sym: New file.
386 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
387 * sysdeps/ia64/Makefile: New file.
388 * sysdeps/ia64/tcb-offsets.sym: New file.
389 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
390 (MULTIPLE_THREADS_OFFSET): Remove.
391 Replace defined MULTIPLE_THREADS_OFFSET
392 with defined FLOATING_STACKS && USE___THREAD.
393 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
394 (MULTIPLE_THREADS_OFFSET): Remove.
395 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
396 (MULTIPLE_THREADS_OFFSET): Remove.
397 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
398 (MULTIPLE_THREADS_OFFSET): Remove.
399 * pthread.c (__pthread_initialize_manager): Remove
400 MULTIPLE_THREADS_OFFSET cbeck.
402 * tst-cancel-wrappers.sh: Add line continuations.
404 2002-12-27 Jakub Jelinek <jakub@redhat.com>
406 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
407 and bits/libc-lock.h.
408 (__libc_internal_tsd_get, __libc_internal_tsd_set,
409 __libc_internal_tsd_address): Remove.
410 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
411 __pthread_internal_tsd_set): New weak_externs.
412 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
413 using __libc_maybe_call2.
414 (__libc_tsd_key_t): Move to ...
415 * descr.h (__libc_tsd_key_t): ...here.
416 Remove bits/libc-tsd.h include.
417 * sysdeps/pthread/errno-loc.c: New file.
418 * sysdeps/pthread/herrno-loc.c: New file.
419 * sysdeps/pthread/res-state.c: New file.
420 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
421 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
422 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
424 * specific.c (libc_internal_tsd_set): Renamed to...
425 __pthread_internal_tsd_set. Remove static.
426 (libc_internal_tsd_get): Renamed to...
427 __pthread_internal_tsd_get. Remove static.
428 (libc_internal_tsd_address): Renamed to...
429 __pthread_internal_tsd_address. Remove static.
430 (__libc_internal_tsd_set, __libc_internal_tsd_get,
431 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
432 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
434 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
435 __pthread_internal_tsd_address): New prototypes.
436 (struct pthread_functions): Add
437 ptr_pthread_internal_tsd_([sg]et|address) fields.
438 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
439 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
440 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
441 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
442 * alloca_cutoff.c: New file.
444 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
445 * pt-system.c (system): Remove cancellation handling.
446 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
447 cancellation routines.
449 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
450 (tcbhead_t): Add sysinfo field.
451 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
452 (TLS_INIT_TP): Use INIT_SYSINFO.
453 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
454 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
455 (MULTIPLE_THREADS_OFFSET): Adjust.
456 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
457 (MULTIPLE_THREADS_OFFSET): Likewise.
458 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
459 (MULTIPLE_THREADS_OFFSET): Likewise.
460 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
461 (MULTIPLE_THREADS_OFFSET): Likewise.
462 * descr.h: Include stdint.h.
463 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
465 2002-12-22 Jakub Jelinek <jakub@redhat.com>
467 * libc_pthread_init.c: Include stdlib.h.
468 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
469 (TLS_INIT_TP_EXPENSIVE): Define.
470 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
471 __libc_maybe_call2): In _LIBC check SHARED define.
472 * sysdeps/ia64/tls.h: New file.
473 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
474 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
475 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
476 * sysdeps/sparc/sparc32/tls.h: New file.
477 * sysdeps/sparc/sparc64/tls.h: New file.
478 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
479 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
480 * Makefile (tests): Add tst-cancel[1-6].
481 (tests-reverse): Add tst-cancel5.
482 Link libc.so before libpthread.so for tests-reverse.
483 * tst-cancel1.c: New file.
484 * tst-cancel2.c: New file.
485 * tst-cancel3.c: New file.
486 * tst-cancel4.c: New file.
487 * tst-cancel5.c: New file.
488 * tst-cancel6.c: New file.
490 2002-12-27 Andreas Schwab <schwab@suse.de>
492 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
494 2002-12-22 Roland McGrath <roland@redhat.com>
496 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
498 2002-12-21 Ulrich Drepper <drepper@redhat.com>
500 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
501 Reported by Art Hass <ahaas@airmail.net>.
503 2002-12-19 Jakub Jelinek <jakub@redhat.com>
505 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
506 Use return 0 as 6th argument to FORWARD4.
508 2002-12-18 Jakub Jelinek <jakub@redhat.com>
510 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
511 define if __ASSUME_LDT_WORKS > 0.
512 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
513 struct member access if !FLOATING_STACKS.
514 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
516 2002-12-18 Jakub Jelinek <jakub@redhat.com>
518 * internals.h (__pthread_thread_self): New prototype.
519 (struct pthread_functions): Add ptr_pthread_thread_self field.
520 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
521 (__pthread_thread_self): New function.
522 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
523 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
524 use thread_self() directly if not FLOATING_STACKS.
526 2002-12-18 Jakub Jelinek <jakub@redhat.com>
528 * sysdeps/x86_64/pt-machine.h: Guard most of the header
529 with #ifndef __ASSEMBLER__.
530 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
531 pthread_attr_init_2_0 use.
533 2002-12-17 Jakub Jelinek <jakub@redhat.com>
535 * wrapsyscall.c: Removed.
537 * Makefile (distribute): Add tst-cancel-wrappers.sh.
538 (routines): Remove weaks. Add forward,
539 libc_pthread_init, libc-cancellation.
540 (shared-only-routines): Remove weaks. Add forward.
541 (libpthread-routines): Remove wrapsyscall.
542 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
543 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
544 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
545 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
546 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
547 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
548 (libpthread-shared-only-routines): Add pt-allocrtsig.
549 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
550 ($(objpfx)tst-cancel-wrappers.out): New rule.
551 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
553 (__libc_maybe_call): In libpthread.* don't check for existance
555 (__libc_maybe_call2): Define.
556 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
557 __libc_lock_trylock, __libc_lock_unlock): Use it.
558 * sysdeps/pthread/flockfile.c: New file.
559 * sysdeps/pthread/ftrylockfile.c: New file.
560 * sysdeps/pthread/funlockfile.c: New file.
561 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
562 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
563 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
564 * libc-cancellation.c: New file.
565 * forward.c: New file.
566 * libc_pthread_init.c: New file.
567 * pt-system.c: New file.
568 * pthread.c: Remove locale.h.
569 (__pthread_manager_thread): Initialize multiple_threads.
570 (__pthread_multiple_threads): Declare.
571 (pthread_functions): New variable.
572 (__pthread_initialize_minimal): Remove __uselocale call.
573 Call __libc_pthread_init.
574 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
575 initial thread's multiple_threads and __libc_multiple_threads.
576 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
578 (pthread_setschedparam, pthread_getschedparam): Rename to __
579 prefixed variants. Add strong_alias.
580 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
581 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
582 (init_rtsigs): Use __libc_current_sigrtmin_private.
583 (pthread_initialize): Only call init_rtsigs if
584 !__ASSUME_REALTIME_SIGNALS.
585 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
586 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
587 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
588 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
589 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
590 __pthread_attr_getinheritsched, __pthread_attr_setscope,
591 __pthread_attr_getscope, __pthread_cond_init,
592 __pthread_cond_destroy, __pthread_cond_wait,
593 __pthread_cond_signal, __pthread_cond_broadcast,
594 __pthread_condattr_init, __pthread_condattr_destroy,
595 __pthread_equal, __pthread_getschedparam,
596 __pthread_setschedparam, __pthread_setcancelstate,
597 __pthread_setcanceltype, __pthread_enable_asynccancel,
598 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
599 (__pthread_mutex_init, __pthread_mutex_destroy,
600 __pthread_mutex_lock, __pthread_mutex_unlock,
601 __pthread_mutex_trylock): Likewise.
603 (struct pthread_functions): New type.
604 (__libc_pthread_functions): New variable.
605 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
606 * descr.h (struct _pthread_descr_struct): Add
607 p_header.data.multiple_threads field.
608 * manager.c (pthread_handle_create): Initialize multiple_threads.
609 * cancel.c (__pthread_enable_asynccancel,
610 __pthread_disable_asynccancel): New functions.
611 (__pthread_provide_wrappers): Remove.
612 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
613 prefixed variants. Add strong_alias.
614 * condvar.c (pthread_cond_init, pthread_cond_destroy,
615 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
616 pthread_condattr_init, pthread_condattr_destroy): Likewise.
617 * join.c (pthread_exit): Likewise.
618 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
619 pthread_attr_getdetachstate, pthread_attr_setschedparam,
620 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
621 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
622 pthread_attr_getinheritsched, pthread_attr_setscope,
623 pthread_attr_getscope): Likewise.
624 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
625 __pthread_mutex_lock, __pthread_mutex_unlock,
626 __pthread_mutex_trylock): Add hidden_def.
627 * Versions (libc): Add __libc_pthread_init,
628 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
629 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
630 * lockfile.c: Remove some USE_IN_LIBIO guards.
631 (__pthread_provide_lockfile): Remove.
632 * pt-allocrtsig.c: New file.
633 * tst-cancel-wrappers.sh: New test.
635 2002-12-15 Ulrich Drepper <drepper@redhat.com>
637 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
638 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
639 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
640 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
642 2002-12-10 Ulrich Drepper <drepper@redhat.com>
644 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
645 weak. There is no reason for that.
646 (CANCELABLE_SYSCALL_VA): Likewise.
648 2002-12-09 Ulrich Drepper <drepper@redhat.com>
650 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
651 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
652 * Versions: Export creat, poll, pselect, readv, select, sigpause,
653 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
654 libpthread in version GLIBC_2.3.2.
656 2002-12-06 Ulrich Drepper <drepper@redhat.com>
658 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
660 2002-12-05 Roland McGrath <roland@redhat.com>
662 * pthread.c (__pthread_initialize_minimal)
663 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
664 TCB if the dynamic linker didn't do it at startup.
666 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
668 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
670 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
671 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
673 2002-12-03 Roland McGrath <roland@redhat.com>
675 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
676 from dynamic linker internal cell to new libc cell.
678 2002-11-28 Roland McGrath <roland@redhat.com>
680 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
681 before other headers, so FLOATING_STACKS is not defined wrongly.
683 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
684 even if [! FLOATING_STACKS].
685 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
686 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
687 dl_osversion >= 2.3.99 and fatal if not.
688 (TLS_DO_MODIFY_LDT): Use it.
690 2002-11-28 Ulrich Drepper <drepper@redhat.com>
692 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
693 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
694 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
696 2002-11-19 Ulrich Drepper <drepper@redhat.com>
698 * Versions (libc: GLIBC_2.0): Remove names of functions which are
700 * Makefile (shared-only-routines): Add weaks.
701 * weaks.c: Remove functions which are not exported from libc.so.
703 2002-11-14 Roland McGrath <roland@redhat.com>
705 * libc-tsd.c: New file.
706 * Makefile (distribute): Add it.
707 (libc-link.so): New variable.
708 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
709 (libc-ok-for-link): New variable.
710 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
711 libc-ok-for-link to $(use-thread).
712 [$(libc-ok-for-link) = no]
713 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
714 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
716 (generated): Append them.
717 (extra-objs): Append libc-tsd.os.
719 * libc-tls-loc.c: New file.
720 * Makefile (libpthread-routines): Add it.
722 2002-11-14 Andreas Schwab <schwab@suse.de>
724 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
727 2002-11-13 Roland McGrath <roland@redhat.com>
729 * Examples/ex6.c (main): Improve error reporting.
731 2002-11-04 Ulrich Drepper <drepper@redhat.com>
733 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
734 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
736 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
738 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
740 2002-10-22 Jakub Jelinek <jakub@redhat.com>
742 * manager.c (pthread_start_thread): Call __uselocale even
743 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
745 2002-10-17 Roland McGrath <roland@redhat.com>
747 * Makefile (unload): Don't link in libpthread.so.
748 ($(objpfx)unload.out): Do depend on it.
749 * unload.c (main): Improve error reporting.
751 2002-10-09 Roland McGrath <roland@redhat.com>
753 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
754 Under [__PIC__], call the function via the pointer fetched for
755 comparison rather than a call by name that uses the PLT.
756 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
757 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
758 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
759 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
760 (__libc_key_create, __libc_getspecific, __libc_setspecific)
761 (__libc_atfork): Use it.
763 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
764 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
765 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
766 (ld: GLIBC_PRIVATE): Set removed.
768 2002-10-11 Ulrich Drepper <drepper@redhat.com>
770 * sysdeps/unix/sysv/linux/execve.c: New file.
772 2002-10-09 Jakub Jelinek <jakub@redhat.com>
774 * no-tsd.c: Include stdlib.h.
776 2002-10-07 Jakub Jelinek <jakub@redhat.com>
778 * sysdeps/unix/sysv/linux/allocalim.h: New file.
779 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
781 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
782 Pass stack size to caller.
783 (pthread_handle_create): Set p_alloca_cutoff.
784 * pthread.c (__pthread_initial_thread): Use C99 designated
785 initializers. Set p_alloca_cutoff.
786 (__pthread_manager_thread): Likewise.
787 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
789 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
791 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
793 * specific.c (__libc_alloca_cutoff): New function.
794 * no-tsd.c (__libc_alloca_cutoff): New function.
795 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
798 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
800 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
801 * sysdeps/sh/tls.h: Likewise.
802 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
804 2002-09-29 Jakub Jelinek <jakub@redhat.com>
806 * sysdeps/pthread/tst-timer.c (main): Clear
807 SIGEV2.sigev_notify_attributes.
809 2002-09-29 Ulrich Drepper <drepper@redhat.com>
811 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
812 INLINE_SYSCALL for set_thread_area syscall.
814 2002-09-28 Roland McGrath <roland@redhat.com>
816 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
817 Don't call setrlimit, since we did no prior bogon we need to undo.
819 2002-09-27 Roland McGrath <roland@redhat.com>
821 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
823 2002-09-24 Roland McGrath <roland@redhat.com>
825 * sysdeps/x86_64/tls.h: New file.
827 2002-09-23 Roland McGrath <roland@redhat.com>
829 * Examples/ex13.c (dump_mut): int -> size_t for counter.
831 2002-09-18 Bruno Haible <bruno@clisp.org>
833 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
834 an unexpected error code.
836 * internals.h (__pthread_message): Add const to first parameter type.
837 * pthread.c (__pthread_message): Likewise.
839 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
841 2002-09-17 Roland McGrath <roland@redhat.com>
843 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
844 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
845 offset (positive or negative) relative to the thread struct.
846 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
848 2002-09-12 Jakub Jelinek <jakub@redhat.com>
850 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
851 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
852 Replace /usr/lib/crt[in].o with crt[in].o too.
854 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
856 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
858 2002-09-04 Bruno Haible <bruno@clisp.org>
860 * pthread.c: Include <sys/time.h>.
861 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
862 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
863 * Makefile (distribute): Add smp.h to the list.
865 2002-09-04 Bruno Haible <bruno@clisp.org>
867 * sysdeps/alpha/pt-machine.h: Choose different include file location
868 on non-Linux platforms.
870 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
871 (open, open64): Change va_arg argument type to the integral type to
872 which mode_t promotes.
874 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
875 the structure of 'struct sigevent'.
877 * errno.c (__errno_location, __h_errno_location, __res_state):
878 Use prototype function definitions.
880 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
882 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
883 * sysdeps/powerpc/pt-machine.h: moved to...
884 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
885 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
887 2002-09-02 Roland McGrath <roland@redhat.com>
889 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
891 2002-09-01 Roland McGrath <roland@redhat.com>
893 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
894 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
896 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
897 (__libc_internal_tsd_address): Declare it.
898 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
899 __libc_internal_tsd_address.
900 * specific.c (libc_internal_tsd_address): New function.
901 (__libc_internal_tsd_address): New variable.
902 * no-tsd.c (__libc_internal_tsd_address): New variable.
904 2002-08-31 Ulrich Drepper <drepper@redhat.com>
906 * Makefile: Don't use rule for crt%.o, spell it out as rules for
909 2002-08-30 Roland McGrath <roland@redhat.com>
911 * Makefile (extra-objs, omit-deps): Add crtn.
912 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
913 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
914 ($(objpfx)crtn.S): New target.
915 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
916 (generated): Add crtn.S.
918 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
921 2002-08-30 Jakub Jelinek <jakub@redhat.com>
923 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
926 2002-08-30 Roland McGrath <roland@redhat.com>
928 * tst-static-locale.c: New file.
929 * Makefile (tests, tests-static): Add it.
931 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
933 * spinlock.c (__pthread_lock): Fix spurious wakeup
934 handling. Don't clear lowest bit of list pointer as sign the thread
935 is still on the wait list. Don't restart after spurious wakeup
936 with spinning to get the lock.
937 (__pthread_unlock): Take set lowest bit into account when handling
938 pointer to list elements.
939 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
941 2002-08-28 Roland McGrath <roland@redhat.com>
943 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
945 2002-08-28 Jakub Jelinek <jakub@redhat.com>
947 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
948 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
949 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
951 2002-08-28 Ulrich Drepper <drepper@redhat.com>
953 * sysdeps/pthread/timer_routines.c (thread_func): Change return
954 type to void and add casts in use to avoid warnings with all gcc
957 2002-08-08 Jakub Jelinek <jakub@redhat.com>
959 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
961 * manager.c (__pthread_handles): Remove.
962 * pthandles.c: New file.
963 * pthread.c (__pthread_initialize_minimal): Initialize
964 __pthread_handles[0] and __pthread_handles[1].
965 * Makefile (libpthread-routines): Add pthandles (must be last).
967 2002-08-26 Brian Youmans <3diff@gnu.org>
969 * Examples/ex10.c: Corrected version number in Lesser GPL copying
970 permission notice from 2 to 2.1.
971 * Examples/ex11.c: Likewise.
972 * Examples/ex13.c: Likewise.
973 * Examples/ex8.c: Likewise.
974 * Examples/ex9.c: Likewise.
975 * barrier.c: Likewise.
976 * events.c: Likewise.
977 * lockfile.c: Likewise.
978 * no-tsd.c: Likewise.
979 * pt-machine.c: Likewise.
980 * ptclock_gettime.c: Likewise.
981 * ptclock_settime.c: Likewise.
982 * rwlock.c: Likewise.
983 * sysdeps/alpha/pspinlock.c: Likewise.
984 * sysdeps/alpha/pt-machine.h: Likewise.
985 * sysdeps/arm/pspinlock.c: Likewise.
986 * sysdeps/arm/pt-machine.h: Likewise.
987 * sysdeps/cris/pspinlock.c: Likewise.
988 * sysdeps/cris/pt-machine.h: Likewise.
989 * sysdeps/hppa/pspinlock.c: Likewise.
990 * sysdeps/hppa/pt-machine.h: Likewise.
991 * sysdeps/i386/i686/pt-machine.h: Likewise.
992 * sysdeps/i386/pspinlock.c: Likewise.
993 * sysdeps/i386/pt-machine.h: Likewise.
994 * sysdeps/i386/useldt.h: Likewise.
995 * sysdeps/ia64/pspinlock.c: Likewise.
996 * sysdeps/ia64/pt-machine.h: Likewise.
997 * sysdeps/m68k/pspinlock.c: Likewise.
998 * sysdeps/m68k/pt-machine.h: Likewise.
999 * sysdeps/mips/pspinlock.c: Likewise.
1000 * sysdeps/mips/pt-machine.h: Likewise.
1001 * sysdeps/powerpc/pspinlock.c: Likewise.
1002 * sysdeps/powerpc/pt-machine.h: Likewise.
1003 * sysdeps/pthread/bits/initspin.h: Likewise.
1004 * sysdeps/pthread/bits/libc-lock.h: Likewise.
1005 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1006 * sysdeps/pthread/getcpuclockid.c: Likewise.
1007 * sysdeps/pthread/posix-timer.h: Likewise.
1008 * sysdeps/pthread/timer_create.c: Likewise.
1009 * sysdeps/pthread/timer_delete.c: Likewise.
1010 * sysdeps/pthread/timer_getoverr.c: Likewise.
1011 * sysdeps/pthread/timer_gettime.c: Likewise.
1012 * sysdeps/pthread/timer_routines.c: Likewise.
1013 * sysdeps/pthread/timer_settime.c: Likewise.
1014 * sysdeps/pthread/tst-timer.c: Likewise.
1015 * sysdeps/s390/pspinlock.c: Likewise.
1016 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1017 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1018 * sysdeps/sh/pspinlock.c: Likewise.
1019 * sysdeps/sh/pt-machine.h: Likewise.
1020 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
1021 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1022 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
1023 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
1024 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1025 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1026 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1027 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1028 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
1029 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1030 * tststack.c: Likewise.
1031 * unload.c: Likewise.
1032 * weaks.c: Likewise.
1033 * wrapsyscall.c: Likewise.
1035 * sysdeps/pthread/pt-initfini.c: Changed copying
1036 permission notice to Lesser GPL from Library GPL, including the
1037 references in the special exception.
1038 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
1039 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
1040 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
1042 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
1044 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
1046 2002-08-26 Ulrich Drepper <drepper@redhat.com>
1048 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
1049 overflow [PR libc/4244].
1051 2002-08-25 Ulrich Drepper <drepper@redhat.com>
1053 * sysdeps/pthread/timer_routines.c (thread_func): Make the
1054 compiler happy by adding a return statement which will never be
1057 * tst-context.c (main): Cast to long before casting to pointer.
1059 * Examples/ex17.c (main): Use correct format string.
1061 * Examples/ex9.c (thread): Remove incorrect return statement.
1063 2002-08-23 Ulrich Drepper <drepper@redhat.com>
1065 * pthread.c (__linuxthreads_version): New global constant.
1067 2002-08-23 Andreas Jaeger <aj@suse.de>
1069 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
1070 as thread specific register.
1071 (testandset): Fix inline asm.
1072 (THREAD_GETMEM): Fix inline asm.
1074 2002-08-22 Roland McGrath <roland@redhat.com>
1076 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
1078 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
1079 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
1080 macro. That chooses whether to reuse %gs value or let kernel set it.
1081 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
1082 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
1085 2002-08-21 Ulrich Drepper <drepper@redhat.com>
1087 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
1088 also to the third definition of this macro.
1090 2002-06-17 Andreas Jaeger <aj@suse.de>
1092 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1095 2002-08-20 Ulrich Drepper <drepper@redhat.com>
1097 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
1098 loading/reading segment registers. Some old hardware doesn't
1099 handle the 32-bit instructions as expected.
1100 * sysdeps/i386/tls.h: Likewise.
1102 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
1103 renamed to secondcall and use is negated.
1104 (TLS_SETUP_GS_SEGMENT): Likewise.
1105 (TLS_INIT_TP): Likewise.
1106 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
1109 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
1110 registers. No need to mask upper 16 bits in this case.
1111 * sysdeps/i386/useldt.h: Likewise.
1112 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
1113 is the same since the GDT content changed.
1115 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
1116 to TLS_SETUP_GS_SEGMENT.
1117 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
1118 TLS_DO_SET_THREAD_AREA.
1119 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
1120 entry number from %gs value.
1121 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
1124 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
1125 Pass true to _dl_deallocate_tls.
1126 (pthread_free): Likewise.
1127 * pthread.c (__pthread_initialize_manager): Likewise.
1129 2002-08-19 Ulrich Drepper <drepper@redhat.com>
1131 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
1132 computing index from %gs value.
1134 2002-08-16 Roland McGrath <roland@redhat.com>
1136 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
1137 register value from entry number properly.
1139 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
1140 optimally conditional on [__PIC__].
1141 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
1142 without touching errno, and use latest modify_ldt-like interface.
1143 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
1144 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
1145 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
1146 existing %gs value as the segment to set.
1147 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
1148 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
1149 by the first thread's early TLS setup.
1151 2002-08-15 Roland McGrath <roland@redhat.com>
1153 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
1154 return a value as callers now expect.
1156 2002-08-11 Roland McGrath <roland@redhat.com>
1158 * pthread.c (__pthread_initialize_manager): Initialize
1159 p_header.data.tcb field of manager thread's descriptor.
1160 (__pthread_initialize_minimal): Don't initialize p_header.data.self
1161 field, already done by TLS_INIT_TP.
1163 * manager.c (pthread_handle_create): Move p_header field initializers
1166 2002-08-08 Ulrich Drepper <drepper@redhat.com>
1168 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
1170 2002-08-07 Ulrich Drepper <drepper@redhat.com>
1172 * pthread.c (__linuxthreads_initial_report_events): New variable.
1173 (__pthread_initialize_manager): Use it to initialize p_report_events
1175 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
1177 2002-08-07 Roland McGrath <roland@redhat.com>
1179 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
1180 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
1182 2002-08-02 Roland McGrath <roland@redhat.com>
1184 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
1185 Add _LIBC_TSD_KEY_LOCALE.
1186 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
1187 Call __uselocale to initialize our per-thread locale pointer to
1189 * pthread.c (__pthread_initialize_minimal): Likewise.
1191 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
1193 2002-08-02 Ulrich Drepper <drepper@redhat.com>
1195 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
1198 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
1199 Don't use p_libc_specific element in thread descriptor.
1201 2002-07-30 Roland McGrath <roland@redhat.com>
1203 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
1204 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
1205 which does the right thing when __thread support is available.
1206 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
1207 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
1208 `p_h_errno', `p_resp', and `p_res' members.
1209 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
1210 Don't initialize `p_errnop' and `p_h_errnop' members.
1211 (__pthread_reset_main_thread): Likewise.
1212 (__pthread_initialize_manager): Likewise.
1213 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
1214 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
1215 Don't initialize `p_resp' member.
1216 (__pthread_reset_main_thread): Likewise.
1217 * manager.c (pthread_handle_create): Likewise.
1218 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
1219 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
1220 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
1221 * errno.c [USE_TLS && HAVE___THREAD]
1222 (__h_errno_location, __res_state): Don't define these at all.
1224 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
1225 (INSTALL_NEW_DTV, GET_DTV): Likewise.
1226 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
1228 * weaks.c: Don't include <errno.h> here.
1230 2002-08-01 Roland McGrath <roland@redhat.com>
1232 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
1234 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
1235 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
1236 (TLS_INIT_TP): Use that.
1238 2002-08-02 Jakub Jelinek <jakub@redhat.com>
1240 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
1241 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
1242 (FREE_THREAD): Avoid modify_ldt if using GDT.
1243 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
1245 2002-07-25 Jakub Jelinek <jakub@redhat.com>
1247 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
1248 * sysdeps/i386/pt-machine.h: Likewise.
1249 * sysdeps/i386/useldt.h: Likewise.
1251 2002-07-22 Ulrich Drepper <drepper@redhat.com>
1253 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
1254 call __libc_setup_tls first.
1255 * Makefile: Actually create tst-signal.out file when running the test.
1256 (tests): Add tststatic.
1257 * Examples/tststatic.c: New file.
1259 2002-07-19 Ulrich Drepper <drepper@redhat.com>
1261 * errno.c (__errno_location): Don't define unless !USE_TLS
1263 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
1264 * sysdeps/i386/tls.h: Likewise.
1265 * sysdeps/i386/useldt.h: Likewise.
1266 * sysdeps/i386/i686/pt-machine.h: Likewise.
1268 2002-07-02 H.J. Lu <hjl@gnu.org>
1270 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
1272 * sysdeps/mips/pt-machine.h: Likewise.
1274 2002-07-14 Ulrich Drepper <drepper@redhat.com>
1276 * manager.c (pthread_handle_create): Initialize self-reference in
1279 2002-07-01 Jakub Jelinek <jakub@redhat.com>
1281 * Examples/ex9.c (main): Remove unused th variable.
1283 2002-07-10 Ulrich Drepper <drepper@redhat.com>
1285 * wrapsyscall.c: Add __nanosleep alias.
1286 * Versions (GLIBC_2.2.6): Add __nanosleep.
1287 * bug-sleep.c: New file.
1288 * Makefile (tests): Add bug-sleep.
1290 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
1292 * Examples/ex9.c (main): Use list of children and join them.
1293 (thread): Do not call exit.
1295 2002-06-20 Ulrich Drepper <drepper@redhat.com>
1297 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
1298 Unconditionally use the code using spinlock. Use __pthread_release
1300 (wait_node_free): Likewise.
1301 (__pthread_acquire, __pthread_release): Unconditionally define.
1303 2002-06-07 Jakub Jelinek <jakub@redhat.com>
1305 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
1307 2002-05-24 Ulrich Drepper <drepper@redhat.com>
1309 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
1311 2002-05-21 Ulrich Drepper <drepper@redhat.com>
1313 * sysdeps/pthread/pthread.h (pthread_create): Rename first
1315 (pthread_cancel): Likewise.
1316 * internals.h (__pthread_create_2_1): Likewise.
1317 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
1319 2002-05-20 Ulrich Drepper <drepper@redhat.com>
1321 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
1322 Patch by Glen Nakamura <gen@flex.com>.
1324 2002-05-03 Ulrich Drepper <drepper@redhat.com>
1326 * signals.c: Move sighandler functions to...
1327 * sighandler.c: ...here. New file.
1328 * signals.c: Move signal handler related type definitions to...
1329 * internals.h: ...here. Add prototypes for signal handlers.
1330 * Makefile (libpthread-routines): Add sighandler.
1331 (CFLAGS-sighandler.c): Add $(exceptions).
1333 2002-04-30 Jakub Jelinek <jakub@redhat.com>
1335 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
1337 2002-04-08 Ulrich Drepper <drepper@redhat.com>
1339 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
1340 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
1341 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
1342 based on previous one and not on current time. Count overruns.
1343 Patch by Eric F. Sorton <eric@cctcorp.com>.
1345 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
1347 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
1349 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
1350 if it isn't defined yet.
1351 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
1352 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1354 * sysdeps/sh/tls.h: New file.
1356 2002-04-08 Jakub Jelinek <jakub@redhat.com>
1358 * manager.c (__pthread_manager_event): Use self instead of arg
1359 for INIT_THREAD_SELF.
1360 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
1361 _pthread_descr_struct) instead of sizeof (*descr).
1363 2002-04-05 Ulrich Drepper <drepper@redhat.com>
1365 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
1366 * sysdeps/alpha/pt-machine.h: Likewise.
1367 * sysdeps/arm/pt-machine.h: Likewise.
1368 * sysdeps/cris/pt-machine.h: Likewise.
1369 * sysdeps/hppa/pt-machine.h: Likewise.
1370 * sysdeps/m68k/pt-machine.h: Likewise.
1371 * sysdeps/mips/pt-machine.h: Likewise.
1372 * sysdeps/powerpc/pt-machine.h: Likewise.
1373 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1374 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1375 * sysdeps/sh/pt-machine.h: Likewise.
1376 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1377 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1378 * sysdeps/x86_64/pt-machine.h: Likewise.
1380 2002-04-05 Jakub Jelinek <jakub@redhat.com>
1382 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
1383 instead of pthread_mutexattr_setkind_np.
1384 (pthread_mutexattr_gettype): Similarly.
1385 * man/pthread_mutexattr_setkind_np.man: New.
1386 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
1388 2002-04-02 Ulrich Drepper <drepper@redhat.com>
1390 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
1392 2002-03-22 Jakub Jelinek <jakub@redhat.com>
1394 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
1396 2002-03-22 Ulrich Drepper <drepper@redhat.com>
1398 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
1400 2002-03-17 Andreas Jaeger <aj@suse.de>
1402 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
1404 * sysdeps/alpha/pt-machine.h: Likewise.
1405 * sysdeps/arm/pt-machine.h: Likewise.
1406 * sysdeps/cris/pt-machine.h: Likewise.
1407 * sysdeps/hppa/pt-machine.h: Likewise.
1408 * sysdeps/i386/i686/pt-machine.h: Likewise.
1409 * sysdeps/ia64/pt-machine.h: Likewise.
1410 * sysdeps/m68k/pt-machine.h: Likewise.
1411 * sysdeps/mips/pt-machine.h: Likewise.
1412 * sysdeps/powerpc/pt-machine.h: Likewise.
1413 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1414 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1415 * sysdeps/sh/pt-machine.h: Likewise.
1416 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1417 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1418 * sysdeps/x86_64/pt-machine.h: Likewise.
1420 * internals.h: Move testandset and __compare_and_swap prototypes
1423 2002-03-03 Andreas Jaeger <aj@suse.de>
1425 * errno.c: Include resolv.h to avoid warning.
1427 2002-02-27 Ulrich Drepper <drepper@redhat.com>
1429 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
1432 2002-02-23 Ulrich Drepper <drepper@redhat.com>
1434 * attr.c (pthread_getattr_np): Don't take thread descriptor size
1435 into account if USE_TLS.
1436 * manager.c (pthread_handle_create): Free TLS data structures if call
1437 failed. Pass correct stack to clone if USE_TLS.
1438 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
1439 * sysdeps/i386/i686/pt-machine.h: Likewise.
1440 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
1442 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
1443 Add p_stackaddr element #if USE_TLS.
1444 * internals.c: Include <tls.h>.
1445 * manager.c: Integrate creating and handling of thread descriptor
1447 * pthread.c: Likewise.
1448 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
1449 Include <linuxthreads/descr.h> only if TLS is really used.
1450 (GET_DTV): New macro.
1451 (TLS_INIT_TP): Initialize self pointer.
1453 2002-02-17 Andreas Schwab <schwab@suse.de>
1455 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
1458 2002-02-12 Ulrich Drepper <drepper@redhat.com>
1460 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
1461 (INSTALL_DTV): Adjust for being passed pointer to element with length.
1463 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1465 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
1467 2002-02-08 Richard Henderson <rth@redhat.com>
1469 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
1471 2002-02-08 Ulrich Drepper <drepper@redhat.com>
1473 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
1476 2002-02-07 H.J. Lu <hjl@gnu.org>
1478 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
1480 (__pthread_spin_lock): Remove ".set noreorder".
1481 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
1483 2002-02-05 H.J. Lu <hjl@gnu.org>
1485 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
1487 * sysdeps/mips/pt-machine.h (testandset): Likewise.
1488 (__compare_and_swap): Likewise.
1490 2002-02-07 Ulrich Drepper <drepper@redhat.com>
1492 * internals.h: Move declarations/definitions of
1493 __pthread_initial_thread_bos, __pthread_initial_thread,
1494 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
1495 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
1496 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
1498 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
1499 Define THREAD_GETMEM accordingly.
1501 2002-02-06 Ulrich Drepper <drepper@redhat.com>
1503 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
1505 * sysdeps/i386/tls.h: Define THREAD_DTV.
1507 2002-02-04 Ulrich Drepper <drepper@redhat.com>
1509 * internals.h: Move thread descriptor definition...
1510 * descr.h.: ...here. New file.
1511 * sysdeps/i386/tls.h: New file.
1513 2002-02-01 H.J. Lu <hjl@gnu.org>
1515 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
1516 different register in the delayed slot. Use branch likely.
1518 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
1519 (__compare_and_swap): Return 0 only when failed to compare. Use
1522 2002-02-01 Jakub Jelinek <jakub@redhat.com>
1524 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
1525 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
1526 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
1527 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
1528 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
1529 * sysdeps/sparc/sparc64/Versions: New file.
1530 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
1532 2002-01-31 Ulrich Drepper <drepper@redhat.com>
1534 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
1535 in SHARED code, use GL(dl_cpuclock_offset).
1537 2002-01-28 Andreas Jaeger <aj@suse.de>
1539 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
1540 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
1542 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
1544 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
1545 (CURRENT_STACK_FRAME): Remove duplicate definition.
1546 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1548 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
1550 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
1553 2002-01-12 Andreas Schwab <schwab@suse.de>
1555 * Makefile (test-srcs): Add tst-signal.
1556 (tests): Run tst-signal.
1557 (distribute): Add tst-signal.sh.
1558 * tst-signal.c, tst-signal.sh: New files.
1560 2002-01-14 Andreas Jaeger <aj@suse.de>
1562 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
1564 2002-01-11 Andreas Schwab <schwab@suse.de>
1566 * signals.c (sighandler): Initialize all elements to SIG_ERR.
1567 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
1569 2002-01-06 Richard Henderson <rth@redhat.com>
1571 * sysdeps/alpha/elf/pt-initfini.c: New file.
1573 2001-12-29 Andreas Jaeger <aj@suse.de>
1575 * Examples/ex9.c: Add noreturn attribute for thread.
1576 * Examples/ex10.c: Likewise.
1577 * Examples/ex13.c (thread_start): Likewise.
1578 * Examples/ex15.c (worker): Likewise.
1580 * Examples/ex18.c: Include unistd.h for prototype of sleep.
1582 2001-12-14 Ulrich Drepper <drepper@redhat.com>
1584 * man/pthread_atfork.man: Adjust description of mutex handling
1585 after fork for current implementation.
1586 * linuxthreads.texi: Likewise [PR libc/2519].
1588 2001-12-13 Andreas Schwab <schwab@suse.de>
1590 * specific.c (pthread_key_delete): Don't contact the thread
1591 manager if no threads have been created yet.
1593 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
1595 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
1596 qualifier to be safe.
1598 2001-11-30 Andreas Schwab <schwab@suse.de>
1600 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
1601 that self is the manager thread, and initialize the thread
1603 (thread_self_stack) [THREAD_SELF]: New function to find self via
1605 * manager.c (pthread_handle_create): Don't block cancel signal any
1608 2001-11-29 Andreas Jaeger <aj@suse.de>
1610 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
1612 (INIT_THREAD_SELF): New.
1613 (THREAD_GETMEM): New.
1615 (THREAD_SETMEM): New.
1616 (THREAD_SETMEM_NC): New.
1617 (FLOATING_STACKS): Define.
1618 (ARCH_STACK_MAX_SIZE): Define.
1620 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
1622 Bugfix to pthread_key_delete. It was iterating over the thread
1623 manager's linked list of threads, behind the thread manager's
1624 back causing a race. The fix is to have the manager iterate over
1625 the threads instead, using a new request type for doing so.
1626 * internals.h (struct pthread_request): New manager request type
1627 REQ_FOR_EACH_THREAD.
1628 * manager.c (pthread_for_each_thread): New function.
1629 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
1630 * specific.c (struct pthread_key_delete_helper_args): New type.
1631 (pthread_key_delete_helper): New static function.
1632 (pthread_key_delete): Use the new thread manager
1633 REQ_FOR_EACH_THREAD function to iterate over the threads and set
1634 the delete key slot to a null value in each thread.
1635 * Examples/ex18.c: New test.
1636 * Makefile (tests): Add ex18.
1638 2001-11-22 Wolfram Gloger <wg@malloc.de>
1640 * pthread.c (pthread_onexit_process): Don't call free
1641 after threads have been asynchronously terminated.
1643 * manager.c (pthread_handle_exit): Surround cancellation
1644 of threads with __flockfilelist()/__funlockfilelist().
1646 2001-11-26 Andreas Schwab <schwab@suse.de>
1648 * manager.c (pthread_handle_create): Start the child thread with
1649 the cancel signal blocked, so that it does not handle it before
1650 the thread register is set up. Save errno from failed clone call.
1652 2001-11-15 Ulrich Drepper <drepper@redhat.com>
1654 * sysdeps/i386/i686/Implies: Removed.
1655 * sysdeps/i386/i686/Versions: New file.
1657 2001-10-31 Andreas Jaeger <aj@suse.de>
1659 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
1661 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
1663 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
1664 to __linuxthreads_pthread_sizeof_descr to match name used by
1665 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
1666 linuxthreads_db/td_symbol_list.c.
1668 2001-09-22 Andreas Jaeger <aj@suse.de>
1670 * linuxthreads/tst-context.c: Avoid compile warning.
1672 2001-09-20 Andreas Jaeger <aj@suse.de>
1674 * shlib-versions: Add x86-64.
1676 2001-09-19 Andreas Jaeger <aj@suse.de>
1678 * sysdeps/x86_64/Makefile: New file.
1679 * sysdeps/x86_64/pspinlock.c: New file.
1680 * sysdeps/x86_64/pt-machine.h: New file.
1682 2001-09-12 Jakub Jelinek <jakub@redhat.com>
1684 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
1686 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1688 2001-09-11 Ulrich Drepper <drepper@redhat.com>
1689 Wolfram Gloger <wg@malloc.de>
1691 * join.c: Protect all communications from and to manager with
1693 * manager.c: Likewise.
1694 * pthread.c: Likewise.
1695 * smeaphore.c: Likewise.
1697 2001-08-29 Ulrich Drepper <drepper@redhat.com>
1699 * spinlock.c (__pthread_lock): Top max_count value with
1700 MAX_ADAPTIVE_SPIN_COUNT.
1701 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
1703 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
1706 2001-08-27 Jakub Jelinek <jakub@redhat.com>
1708 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
1709 non-opaque type if __USE_UNIX98.
1711 2001-08-26 Jakub Jelinek <jakub@redhat.com>
1713 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
1714 non-opaque lock types also if _IO_MTSAFE_IO is defined.
1716 2001-08-23 Roland McGrath <roland@frob.com>
1718 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
1719 new first argument, skip the cleanup handler if it's zero.
1720 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
1721 (__libc_lock_define_initialized_recursive): Use it.
1722 * sysdeps/pthread/bits/stdio-lock.h: File removed.
1723 The sysdeps/generic file from the main tree now suffices.
1725 2001-08-22 Roland McGrath <roland@frob.com>
1727 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
1728 instead of <pthread.h>.
1729 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
1730 (_IO_lock_initializer): Add braces.
1731 (_IO_lock_lock): Use __libc_lock_lock_recursive.
1732 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
1734 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
1735 (__libc_lock_define_initialized_recursive): Use it.
1736 (__libc_lock_init_recursive): Likewise.
1737 (__libc_lock_fini_recursive): Likewise.
1738 (__libc_lock_lock_recursive): Likewise.
1739 (__libc_lock_trylock_recursive): Likewise.
1740 (__libc_lock_unlock_recursive): Likewise.
1741 (__libc_lock_define_recursive): New macro.
1743 2001-08-14 Jakub Jelinek <jakub@redhat.com>
1745 * lockfile.c (__pthread_provide_lockfile): New variable.
1746 * pthread.c (__pthread_require_lockfile): New variable.
1747 * cancel.c (__pthread_require_lockfile): New variable.
1749 2001-07-31 Ulrich Drepper <drepper@redhat.com>
1751 * tst-context.c (threadfct): Initialize context before calling
1754 * Examples/ex17.c: Make sure test thread is around long enough.
1756 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
1758 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
1760 2001-07-24 Ulrich Drepper <drepper@redhat.com>
1762 * tst-context.c (main): Print explanation before bailing out
1763 because context handling is not supported.
1765 2001-07-23 Ulrich Drepper <drepper@redhat.com>
1767 * Makefile (tests): Add tst-context.
1768 * tst-context.c: New file.
1770 * sysdeps/pthread/bits/stdio-lock.h: Define
1771 _IO_cleanup_region_start_noarg.
1773 2001-07-23 Jakub Jelinek <jakub@redhat.com>
1775 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
1776 (ARCH_STACK_MAX_SIZE): Define.
1777 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1778 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1780 2001-07-19 Jakub Jelinek <jakub@redhat.com>
1782 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
1784 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
1785 (ARCH_STACK_MAX_SIZE): Define.
1786 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
1787 NEED_SEPARATE_REGISTER_STACK.
1789 2001-07-16 Andreas Schwab <schwab@suse.de>
1791 * Makefile (before-compile): Don't add $(objpfx)crti.o.
1792 (omit-deps): Add crti.
1793 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
1794 it is filtered out of the link command.
1796 2001-07-16 Ulrich Drepper <drepper@redhat.com>
1798 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
1799 to find the right value for __pthread_initial_thread_bos, it's not
1800 used. If not FLOATING_STACKS first run
1801 __pthread_init_max_stacksize.
1803 2001-06-16 H.J. Lu <hjl@gnu.org>
1805 * internals.h: Include <stackinfo.h>.
1807 * attr.c: Don't include <stackinfo.h> here.
1808 * cancel.c: Likewise.
1809 * manager.c: Likewise.
1810 * pthread.c: Likewise.
1811 * ptlongjmp.c: Likewise.
1813 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
1815 * attr.c: Make _STACK_GROWS_UP work.
1816 * internals.h: Likewise.
1817 * manager.c: Likewise.
1818 * pthread.c: Likewise.
1820 2001-06-15 H.J. Lu <hjl@gnu.org>
1822 * pthread.c (__pthread_reset_main_thread): Fix a typo.
1824 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
1826 * semaphore.h: Use struct _pthread_fastlock as an element of
1827 sem_t instead of an identical struct.
1828 * rwlock.c: Remove casts.
1829 * semaphore.c: Likewise.
1831 2001-04-30 Alan Modra <amodra@one.net.au>
1833 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1835 2001-05-25 Bruce Mitchener <bruce@cubik.org>
1837 * linuxthreads.texi: Spelling corrections.
1839 2001-05-25 Ulrich Drepper <drepper@redhat.com>
1841 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1842 returning successfully.
1843 Patch by Gene Cooperman <gene@ccs.neu.edu>.
1845 2001-05-24 Ulrich Drepper <drepper@redhat.com>
1847 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1848 serious work try once whether the lock is uncontested.
1849 Remove duplicate reading of __status before loop.
1850 Change suggested by Hans Boehm <hans_boehm@hp.com>.
1852 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1853 (__pthread_alt_trylock): Likewise.
1855 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
1857 Memory barrier overhaul following line by line inspection.
1858 * mutex.c (pthread_once): Missing memory barriers added.
1859 * pthread.c (__pthread_wait_for_restart_signal,
1860 __pthread_timedsuspend_new, __pthread_restart_new): Added
1861 memory barriers ``just in case'' and for documentary value.
1862 * spinlock.c (__pthread_release): New inline function for releasing
1863 spinlock, to complement __pthread_acquire. Includes memory
1864 barrier prior to assignment to spinlock, and __asm __volatile
1865 dance to prevent reordering or optimization of the spinlock access.
1866 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1867 __pthread_alt_timedlock, __pthread_alt_unlock,
1868 __pthread_compare_and_swap): Updated to use new __pthread_release
1869 instead of updating spinlock directly.
1870 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1871 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1872 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1873 Memory barrier overhaul. Lots of missing memory barriers added,
1874 a couple needless ones removed.
1875 * spinlock.c (__pthread_compare_and_swap): testandset optimization
1876 removed, just calls __pthread_acquire, which has the new read
1877 barrier in it before its testandset.
1879 2001-05-20 Roland McGrath <roland@frob.com>
1881 * Makeconfig: New file, variables used to be in main libc Makeconfig.
1883 2001-05-09 Geoff Keating <geoffk@redhat.com>
1885 * sysdeps/powerpc/pt-machine.h
1886 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1887 (__compare_and_swap): Remove memory barriers.
1888 (__compare_and_swap_with_release_semantics): New function.
1890 2001-04-24 Andreas Jaeger <aj@suse.de>
1892 * wrapsyscall.c: send* and recv* return ssize_t.
1894 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1895 mutex instead of double locking it.
1896 Reported by Pierre Artaud <partaud@sodatec.com>.
1898 2001-04-23 Ulrich Drepper <drepper@redhat.com>
1900 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1901 using #ifdef whether the clock is available.
1902 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1904 * sysdeps/ia64/Versions: New file.
1906 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1907 have to call __gmon_start__ in the libpthread DSO.
1908 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1910 * Makefile (libpthread-routines): Add ptclock_gettime and
1912 * internals.h: Don't use cpuclock-init.h definitions, use
1913 hp-timing.h definitions.
1914 * pthread.c: Likewise.
1915 * manager.c: Likewise.
1916 * ptclock_gettime.c: New file.
1917 * ptclock_settime.c: New file.
1918 * internals.h: Fix parameter type for __pthread_clock_gettime and
1919 __pthread_clock_settime.
1921 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1922 * sysdeps/i386/i586/ptclock_settime.c: Removed.
1923 * sysdeps/i386/i586/Makefile: Removed.
1925 2001-04-22 Ulrich Drepper <drepper@redhat.com>
1927 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1928 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1930 2001-04-21 Andreas Jaeger <aj@suse.de>
1932 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1933 attribute, remove statements that will never be executed.
1934 (thread_func): Remove mutex_unlock call since it's never executed.
1935 (thread_func): Fix comment as suggested by Jakub Jelinek.
1937 * manager.c (__pthread_manager): Add noreturn
1939 (pthread_start_thread): Likewise, remove return statement.
1940 (pthread_start_thread_event): Likewise.
1941 Add noreturn attribute for pthread_handle_exit.
1942 * weaks.c: Add noreturn attribute for pthread_exit.
1944 * internals.h: Add __pthread_clock_gettime and
1945 __pthread_clock_settime prototypes.
1947 2001-04-21 Ulrich Drepper <drepper@redhat.com>
1949 * internals.h: Include <cpuclock-init.h>.
1950 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1951 CPUCLOCK_VARDEF is defined.
1952 * pthread.c (__pthread_initialize_minimal): Initialize
1953 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1954 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1955 for new thread to current CPU clock value.
1957 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1959 * sysdeps/i386/i586/Makefile: New file.
1960 * sysdeps/i386/i586/Versions: New file.
1961 * sysdeps/i386/i586/ptclock_gettime.c: New file.
1962 * sysdeps/i386/i586/ptclock_settime.c: New file.
1963 * sysdeps/i386/i686/Implies: New file.
1965 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1967 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1968 $generated, not $postclean-generated.
1970 2001-04-18 Andreas Jaeger <aj@suse.de>
1972 * Makefile (otherlibs): Added.
1974 2001-04-18 Jakub Jelinek <jakub@redhat.com>
1976 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1978 2001-04-16 Ulrich Drepper <drepper@redhat.com>
1980 * signals.c (sigwait): NSIG is no signal number. Block all
1981 signals while in signal handler for signals in SET.
1982 Patch by Manfred Spraul <manfred@colorfullife.com>.
1984 2001-04-12 Ulrich Drepper <drepper@redhat.com>
1986 * tst-cancel.c: Disable most tests. Add new test where all
1987 cleanup handlers must run.
1988 * Makefile (tests): Add tst-cancel again.
1990 * cancel.c (__pthread_perform_cleanup): Correct condition for
1991 leaving cleanup loop early.
1993 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1994 all the files which use CURRENT_STACK_FRAME.
1995 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1996 __builtin_frame_address.
1997 * sysdeps/i386/i686/pt-machine.h: Likewise.
1999 2001-04-11 Ulrich Drepper <drepper@redhat.com>
2001 * Makefile (tests): Comment out tst-cancel for now.
2003 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
2004 temporary file in object directory.
2005 * Makefile: Don't allow inlining when compiling tst-cancel.c.
2006 Pass $(objpfx) to tst-cancel.
2008 2001-04-11 David S. Miller <davem@redhat.com>
2010 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
2011 up closer to user local variables so that new cleanup heuristics work.
2012 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
2014 2001-04-11 Ulrich Drepper <drepper@redhat.com>
2016 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
2018 (_pthread_cleanup_push_defer): Likewise.
2020 * tst-cancel.c (main): Fix loop printing cleanup output.
2022 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
2024 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
2026 (__pthread_spin_trylock): Likewise.
2027 * sysdeps/sh/pt-machine.h (testandset): Likewise.
2029 2001-04-10 Ulrich Drepper <drepper@redhat.com>
2031 * join.c (pthread_exit): Move code to new function __pthread_do_exit
2032 which takes an extra parameter with the current frame pointer.
2033 Call new function with CURRENT_STACK_FRAME.
2034 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
2035 with the new parameter.
2036 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
2037 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
2038 this parameter as the initial value the cleanup handler records are
2039 compared against. No active cleanup handler record must have an
2040 address lower than the previous one and the initial record must be
2041 above (below on PA) the frame address passed in.
2042 (pthread_setcancelstate): Call __pthread_do_exit instead of
2044 (pthread_setcanceltype): Likewise.
2045 (pthread_testcancel): Likewise.
2046 (_pthread_cleanup_pop_restore): Likewise.
2047 * condvar.c (pthread_cond_wait): Likewise.
2048 (pthread_cond_timedwait_relative): Likewise.
2049 * manager.c (pthread_start_thread): Likewise.
2050 * oldsemaphore.c (__old_sem_wait): Likewise.
2051 * pthread.c (pthread_handle_sigcancel): Likewise.
2052 * semaphore.c (__new_sem_wait): Likewise.
2053 (sem_timedwait): Likewise.
2054 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
2055 to limit the cleanup handlers which get run.
2056 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
2057 for __pthread_perform_cleanup.
2059 * Makefile (tests): Add tst-cancel.
2060 * tst-cancel.c: New file.
2062 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
2064 * sysdeps/cris/pt-machine.h: New file.
2065 * sysdeps/cris/pspinlock.c: New file.
2067 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
2069 * shlib-versions: Add case for Linux on CRIS.
2071 2001-03-26 Ulrich Drepper <drepper@redhat.com>
2073 * attr.c (pthread_getattr_np): Correct computation of stack size
2074 for machiens with register stack.
2076 * Examples/ex17.c (main): Correct detection of failed mmap call.
2078 2001-03-21 Jakub Jelinek <jakub@redhat.com>
2080 * pthread.c (__pthread_initialize_manager): Fix a typo.
2082 2001-03-21 Jakub Jelinek <jakub@redhat.com>
2084 * attr.c (__pthread_attr_setstack): Fix alignment check.
2085 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
2086 * Makefile (tests): Add ex17 test.
2087 * Examples/ex17.c: New test.
2089 2001-03-20 Ulrich Drepper <drepper@redhat.com>
2091 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
2092 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
2093 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
2095 2001-03-18 Ulrich Drepper <drepper@redhat.com>
2097 * Makefile: When generating DSO link with libc_nonshared.a.
2099 2001-02-26 Jakub Jelinek <jakub@redhat.com>
2101 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
2103 2001-02-23 Jakub Jelinek <jakub@redhat.com>
2105 * internals.h (__pthread_init_max_stacksize): New prototype.
2106 * attr.c (__pthread_attr_setstacksize): Call
2107 __pthread_init_max_stacksize if not yet initialized.
2108 * pthread.c (__pthread_init_max_stacksize): New function.
2109 (__pthread_initialize_manager): Call it.
2110 Patch by <dtc@cmucl.cons.org>.
2112 2001-03-16 Ulrich Drepper <drepper@redhat.com>
2114 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
2116 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
2118 * shlib-versions: Add rule for Linux on 64 bit S/390.
2119 * sysdeps/s390/s390-64/pt-machine.h: New file.
2120 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
2122 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
2124 * sysdeps/s390/pt-machine.h: Move to...
2125 * sysdeps/s390/s390-32/pt-machine.h: ...here.
2126 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
2128 2001-03-15 Ulrich Drepper <drepper@redhat.com>
2130 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
2131 * attr.c: Implement pthread_getattr_np.
2132 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
2133 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
2134 * manager.c (pthread_handle_create): Initialize p_inheritsched.
2136 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2138 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
2141 2001-02-20 Hans Boehm <hans_boehm@hp.com>
2143 * manager.c (manager_mask): Removed static vesion. Now always local
2144 to __pthread_manager().
2145 (manager_mask_all): Removed completely.
2146 (__pthread_manager): Remove manager_mask_all initialization.
2147 (pthread_handle_create): Remove code to set and reset signal mask
2148 around __clone2() calls.
2150 2001-02-17 Jakub Jelinek <jakub@redhat.com>
2152 * spinlock.c (__pthread_lock): Force lock->__status to be read from
2153 memory on every spin.
2155 2001-02-10 Andreas Jaeger <aj@suse.de>
2157 * Makefile (extra-objs): New.
2159 2001-02-09 Jakub Jelinek <jakub@redhat.com>
2161 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
2162 __pthread_initialize_minimal prototype.
2164 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2166 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2168 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
2170 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
2172 2001-02-06 Ulrich Drepper <drepper@redhat.com>
2174 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
2175 broken code. Patch by Jes Sorensen.
2177 2001-02-06 Andreas Jaeger <aj@suse.de>
2179 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
2181 * internals.h: ...here.
2183 2001-02-05 Jes Sorensen <jes@linuxcare.com>
2185 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2187 2001-02-02 Ulrich Drepper <drepper@redhat.com>
2189 * Versions: Remove __pthread_initialize_minimal.
2191 2001-02-01 Ulrich Drepper <drepper@redhat.com>
2193 * Makefile: Add rules to build crti.o and make it being used in
2194 building libpthread.so.
2195 * sysdeps/i386/Makefile: New file.
2196 * sysdeps/pthread/pt-initfini.c: New file.
2198 * pthread.c: Cleanups.
2200 2001-01-28 Andreas Jaeger <aj@suse.de>
2202 * oldsemaphore.c (__old_sem_init): Adjust for last change.
2203 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2204 * spinlock.c: Likewise.
2206 2001-01-28 Ulrich Drepper <drepper@redhat.com>
2208 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
2209 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2210 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
2211 * pthread.c: Likewise.
2212 * spinlock.h: Likewise.
2213 * sysdeps/pthread/pthread.h: Likewise.
2215 2001-01-26 Ulrich Drepper <drepper@redhat.com>
2217 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
2218 as struct __pthread_attr_s.
2220 * semaphore.h (sem_t): Cleanup namespace, rename status and
2223 2001-01-13 Jakub Jelinek <jakub@redhat.com>
2225 * pthread.c (pthread_onexit_process): Clear
2226 __pthread_manager_thread_bos after freeing it.
2227 * Makefile (tests): Add ex16.
2228 * Examples/ex16.c: New file.
2230 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2232 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
2234 * pthread.c (pthread_exit_process): Rename to...
2235 (pthread_onexit_process): ...this.
2236 (pthread_atexit_process, pthread_atexit_retcode): New.
2237 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
2238 and only if HAVE_Z_NODELETE is not defined.
2239 (__pthread_initialize_manager): Register pthread_atexit_retcode
2242 2001-01-11 Ulrich Drepper <drepper@redhat.com>
2244 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
2246 2001-01-11 Jakub Jelinek <jakub@redhat.com>
2248 * Makefile (tests): Add ex15.
2249 * Examples/ex15.c: New test.
2251 2001-01-08 Ulrich Drepper <drepper@redhat.com>
2253 * pthread.c (pthread_exit_process): Free memory allocated for
2256 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2258 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
2259 (pthread_free): Always unmap the stack. It's safe now that we don't
2260 use MAP_FIXED to allocate stacks.
2262 2000-12-31 Ulrich Drepper <drepper@redhat.com>
2264 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
2266 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
2268 2000-11-15 Wolfram Gloger <wg@malloc.de>
2270 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
2271 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
2273 2000-12-27 Andreas Jaeger <aj@suse.de>
2275 * Examples/ex13.c: Make local functions static.
2276 * ecmutex.c: Likewise.
2277 * joinrace.c: Likewise.
2278 * Examples/ex14.c: Likewise.
2280 * Examples/ex2.c: Make local functions static; reformat.
2281 * Examples/ex1.c: Likewise.
2282 * Examples/ex4.c: Likewise.
2283 * Examples/ex5.c: Likewise.
2284 * Examples/ex7.c: Likewise.
2286 * oldsemaphore.c: Add prototypes to shut up GCC.
2287 * pt-machine.c: Likewise.
2289 * weaks.c: Add prototype for pthread_exit.
2291 * internals.h: Add some prototypes, format prototypes and add
2293 Move __libc_waitpid prototype to include/sys/wait.h.
2295 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
2296 * mutex.c: Likewise.
2297 * specific.c: Likewise.
2298 * ptfork.c: Likewise.
2300 * lockfile.c: Include internals.h to get prototypes.
2301 * events.c: Likewise.
2302 * sysdeps/alpha/pspinlock.c: Likewise.
2303 * sysdeps/arm/pspinlock.c: Likewise.
2304 * sysdeps/hppa/pspinlock.c: Likewise.
2305 * sysdeps/i386/pspinlock.c: Likewise.
2306 * sysdeps/ia64/pspinlock.c: Likewise.
2307 * sysdeps/m68k/pspinlock.c: Likewise.
2308 * sysdeps/mips/pspinlock.c: Likewise.
2309 * sysdeps/powerpc/pspinlock.c: Likewise.
2310 * sysdeps/s390/pspinlock.c: Likewise.
2311 * sysdeps/sh/pspinlock.c: Likewise.
2312 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2313 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2314 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2316 2000-12-27 Ulrich Drepper <drepper@redhat.com>
2318 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
2319 (__pthread_attr_getstack): Return correct address.
2320 Add warnings for using pthread_attr_getstackaddr and
2321 pthread_attr_setstackaddr.
2323 2000-12-26 Ulrich Drepper <drepper@redhat.com>
2325 * Examples/ex6.c (test_thread): Make static.
2326 * Examples/ex12.c (test_thread): Make static and add noreturn
2329 2000-12-18 Jes Sorensen <jes@linuxcare.com>
2331 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
2332 and compare_and_swap_with_release_semantics returns int not long.
2334 2000-12-17 Andreas Jaeger <aj@suse.de>
2336 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
2338 * sysdeps/arm/pt-machine.h (testandset): Likewise.
2339 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
2340 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
2341 * sysdeps/sh/pt-machine.h (testandset): Likewise.
2342 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
2343 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
2345 2000-12-17 Ulrich Drepper <drepper@redhat.com>
2347 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
2348 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
2350 2000-12-17 Andreas Jaeger <aj@suse.de>
2352 * internals.h: Add prototypes for testandset and
2353 __compare_and_swap to shut up gcc warnings.
2355 2000-12-06 Wolfram Gloger <wg@malloc.de>
2357 * join.c (pthread_detach): Allow case where the thread has already
2360 2000-12-05 Andreas Jaeger <aj@suse.de>
2362 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
2363 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2364 (__compare_and_swap): Likewise.
2365 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
2367 2000-11-20 Jakub Jelinek <jakub@redhat.com>
2369 * Examples/ex3.c (main): Cast int to long before casting to void *.
2370 (search): Cast void * to long, not int.
2371 * Examples/ex8.c (main, thread): Similarly.
2372 * Examples/ex11.c (main): Similarly.
2373 * Examples/ex14.c (worker, do_test): Similarly.
2374 * ecmutex.c (worker, do_test): Similarly.
2375 (nlocks): Cast to int.
2377 2000-11-08 Bruce Mitchener <bruce@cubik.org>
2379 * linuxthreads.texi: Add documentation for pthreads attributes
2380 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
2381 patch. Document pthread_[sg]etconcurrency(). Mark
2382 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
2384 2000-11-07 Ulrich Drepper <drepper@redhat.com>
2386 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2388 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2389 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
2391 2000-11-06 Ulrich Drepper <drepper@redhat.com>
2393 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
2394 not doing it right now.
2395 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
2397 2000-10-30 Ulrich Drepper <drepper@redhat.com>
2399 * Examples/ex4.c (main): Don't use exit() to avoid warning with
2402 2000-10-29 Ulrich Drepper <drepper@redhat.com>
2404 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
2405 here. Reported by Bruce Mitchener <bruce@cubik.org>.
2407 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
2408 discussing mutexes. (As per the Unix98 name for the API.)
2409 Changes documentation for pthread_mutexattr_setkind_np() and
2410 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
2411 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
2412 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
2413 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
2414 Begins to introduce discussion of the ``timed'' mutex type. This
2415 discussion is currently incomplete.
2416 Patch by Bruce Mitchener <bruce@cubik.org>.
2418 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
2419 Yutaka Niibe <gniibe@chroot.org>
2421 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
2422 has restrictions, use register.
2424 2000-10-23 Andreas Schwab <schwab@suse.de>
2426 * Examples/ex14.c (TIMEOUT): Override default timeout.
2428 2000-10-16 Ulrich Drepper <drepper@redhat.com>
2430 * specific.c: Protect tsd array modification in thread data
2431 structures by getting the thread lock in pthread_key_delete and
2432 __pthread_destroy_specifics.
2433 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
2435 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2437 * sysdeps/pthread/bits/initspin.h: New file.
2438 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
2439 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
2440 (__pthread_alt_init_lock): Likewise.
2441 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
2443 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2445 * oldsemaphore.c (__old_sem_init): Release lock with
2446 LT_SPINLOCK_INIT, not zero.
2447 * spinlock.c (__pthread_unlock): Likewise.
2448 (__pthread_alt_lock): Likewise.
2449 (__pthread_alt_timedlock): Likewise.
2450 (__pthread_alt_unlock): Likewise.
2451 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
2452 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
2453 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
2454 LT_SPINLOCK_INIT do initialize spinlocks not 0.
2456 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
2458 * shlib-versions: Add version definitions for hppa-linux.
2460 2000-10-12 Alan Modra <alan@linuxcare.com.au>
2462 * sysdeps/hppa/pspinlock.c: New file.
2463 * sysdeps/hppa/pt-machine.h: New file.
2464 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
2466 2000-10-05 Jakub Jelinek <jakub@redhat.com>
2468 * mutex.c (__pthread_mutex_destroy): Correct test of
2469 busy mutex for mutexes using alternate fastlocks.
2470 Patch by dtc@cmucl.cons.org.
2472 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
2474 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
2476 2000-09-28 Ulrich Drepper <drepper@redhat.com>
2478 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
2479 test for owner first.
2480 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2482 * cancel.c (pthread_cancel): Don't do anything if cancelation is
2485 2000-09-26 Ulrich Drepper <drepper@redhat.com>
2487 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
2488 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2490 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2491 _POSIX_MONOTONIC_CLOCK.
2493 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
2496 2000-09-20 Andreas Jaeger <aj@suse.de>
2498 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
2499 "testrtsig.h" conditional.
2501 2000-09-11 Ulrich Drepper <drepper@redhat.com>
2503 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
2504 pthread_attr_setstack.
2505 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
2506 pthread_attr_setstack.
2507 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
2509 2000-09-05 Ulrich Drepper <drepper@redhat.com>
2511 * Examples/ex14.c: New file.
2512 * Makefile (tests): Add ex14.
2514 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
2515 mutex. Patch by dtc@cmucl.cons.org.
2517 * ecmutex.c: New file.
2518 * Makefile (tests): Add ecmutex.
2520 2000-09-04 H.J. Lu <hjl@gnu.org>
2522 * attr.c (__pthread_attr_setguardsize): Use page_roundup
2523 instead of roundup to round up to the page size.
2525 2000-09-03 Mark Kettenis <kettenis@gnu.org>
2527 * manager.c (pthread_exited): Correctly report event as TD_REAP
2528 instead of TD_DEATH. Fix comments.
2530 2000-09-03 Ulrich Drepper <drepper@redhat.com>
2532 * spinlock.h (testandset): Add cast to avoid warning.
2533 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
2535 2000-09-02 Andreas Jaeger <aj@suse.de>
2537 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
2540 2000-09-01 Ulrich Drepper <drepper@redhat.com>
2542 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2543 Fix typo in last patch (_mode -> _flags).
2545 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2546 Provide definition which respects _IO_USER_LOCK flag.
2548 2000-08-30 Ulrich Drepper <drepper@redhat.com>
2550 * manager.c (pthread_allocate_stack): Clear descriptor only if not
2553 2000-08-25 Ulrich Drepper <drepper@redhat.com>
2555 * Makefile: Add rules to build and run unload.
2556 * unload.c: New file.
2558 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
2560 * sysdeps/pthread/pthread.h
2561 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
2562 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
2564 2000-08-24 Andreas Jaeger <aj@suse.de>
2566 * Examples/ex13.c: Include <string.h> for strerror prototype and
2567 <stdlib.h> for abort prototype.
2568 (pthr_cond_signal_mutex): Rewrite to silence GCC.
2569 (thread_start): Remove unused variable err.
2570 (main): Silence GCC warnings.
2572 2000-08-22 Andreas Jaeger <aj@suse.de>
2574 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
2576 * Makefile (tests): Add ex13.
2578 2000-08-20 Ulrich Drepper <drepper@redhat.com>
2580 * semaphore.h: Add restrict where required by AGd4.
2581 * sysdeps/pthread/pthread.h: Likewise.
2582 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
2584 2000-08-15 Ulrich Drepper <drepper@redhat.com>
2586 * Makefile (tests): Add ex12. Add rule to build it.
2587 * Examples/ex12.c: New file.
2589 2000-08-13 Ulrich Drepper <drepper@redhat.com>
2591 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
2592 even though the implementation is not quite complete (but it reports
2593 it). Define _POSIX_MESSAGE_PASSING to -1.
2594 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2596 2000-08-12 Andreas Jaeger <aj@suse.de>
2598 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
2600 (__compare_and_swap): Likewise.
2601 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
2603 2000-08-10 Ulrich Drepper <drepper@redhat.com>
2605 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
2606 p_h_errnop correctly and not to NULL.
2608 2000-08-05 Ulrich Drepper <drepper@redhat.com>
2610 * Banner: Bump version number to 0.9.
2612 2000-08-04 Ulrich Drepper <drepper@redhat.com>
2614 * Makefile (tests): Add tststack. Add rule to build the program.
2615 * tststack.c: New file.
2617 * internals.h: Declare __pthread_max_stacksize.
2618 * pthread.c (__pthread_max_stacksize): New variable.
2619 (__pthread_initialize_manager): Determine __pthread_initialize_manager
2621 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
2622 (pthread_allocate_stack): Allow kernel to choose stack address if
2623 FLOATING_STACKS. This also handles variable-sized stacks.
2624 Always allocate stack and guardpage together. Use mprotect to
2625 change guardpage access.
2626 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
2627 ARCH_STACK_MAX_SIZE.
2629 * attr.c (__pthread_attr_setstacksize): Also test value against
2632 * manager.c (__pthread_nonstandard_stacks): Define only if
2633 THREAD_SELF is not defined.
2634 (pthread_allocate_stack): Always initialize gardaddr to a correct
2636 (pthread_handle_create): Unmap thread with one call.
2637 (pthread_free): Remove test for initial thread before removing stack.
2638 Unmap stack with one call.
2640 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
2641 1 to avoid removing the stack.
2643 2000-07-27 Jes Sorensen <jes@linuxcare.com>
2645 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
2646 load of spin lock to prime the cache before the atomic compare and
2647 exchange operation (cmpxchg4). This avoids the spinning on the
2648 cmpxchg4 instruction and reduces movement of the cache line back
2649 and forth between the processors (explanation by Asis K. Mallick
2650 from Intel). This basically makes the implementation operate the
2651 same as the Linux kernel implementation.
2653 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
2654 * sysdeps/ia64/pspinlock.c: New file.
2656 2000-08-03 Ulrich Drepper <drepper@redhat.com>
2658 * pthread.c: Move definition of __pthread_set_own_extricate_if...
2659 * spinlock.h: ...here. Remove locking.
2660 * internals.h: Remove __pthread_set_own_extricate_if prototype.
2662 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
2663 (rwlock_rd_extricate_func): Don't determine self, let
2664 __pthread_lock do it.
2665 (rwlock_wr_extricate_func): Likewise.
2666 (rwlock_have_already): Optimize *pself handling a bit.
2668 * mutex.c: Use __builtin_expect.
2669 * pthread.c: Likewise.
2671 2000-08-02 Andreas Jaeger <aj@suse.de>
2673 * sysdeps/s390/pspinlock.c: New file.
2674 * sysdeps/s390/pt-machine.h: New file.
2675 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
2677 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2679 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
2681 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2683 2000-07-26 Andreas Jaeger <aj@suse.de>
2685 * pthread.c: Initialize p_sem_avail.
2687 2000-07-25 Ulrich Drepper <drepper@redhat.com>
2689 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
2690 * semaphore.c: Handle spurious wakeups.
2692 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
2693 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
2695 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
2696 (__pthread_wait_for_restart): Likewise.
2698 * condvar.c (pthread_cond_wait): Also check whether thread is
2699 cancelable before aborting loop.
2700 (pthread_cond_timedwait): Likewise.
2702 * signals.c (pthread_sighandler): Remove special code to restrore
2704 (pthread_sighandler_t): Likewise.
2706 2000-07-25 Mark Kettenis <kettenis@gnu.org>
2708 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
2709 * pthread.c: Include <resolv.h>.
2710 (_res): Undefine. Add extern declaration.
2712 2000-07-24 Ulrich Drepper <drepper@redhat.com>
2714 * pthread.c (__pthread_initial_thread): Update initializer.
2715 (__pthread_manager_thread): Likewise.
2716 (pthread_initialize): Move setrlimit call to...
2717 (__pthread_initialize_manager): ...here.
2718 (__pthread_reset_main_thread): Reset also soft limit on stack size.
2720 * condvar.c: Handle spurious wakeups. [PR libc/1749].
2721 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
2723 2000-07-21 Ulrich Drepper <drepper@redhat.com>
2725 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
2726 __compare_and_swap to define testandset.
2727 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
2728 Define IMPLEMENT_TAS_WITH_CAS.
2730 2000-07-20 Ulrich Drepper <drepper@redhat.com>
2732 * Makefile: Pass -z nodelete to linker for libpthread.so
2733 generation if it understand this option.
2735 2000-07-18 Mark Kettenis <kettenis@gnu.org>
2737 * manager.c (pthread_handle_create): Remove initialization of
2738 new_thread->p_res._sock.
2740 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
2742 Bugfixes to the variant of the code for machines with no compare
2745 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
2746 node was not being properly enqueued, due to failing to update
2747 the lock->__status field.
2749 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
2750 being set inappropriately, causing the suspend function to be called
2751 with a null self pointer and crash.
2753 2000-07-18 Ulrich Drepper <drepper@redhat.com>
2755 * spinlock.h (__pthread_alt_trylock): Fix code used if no
2756 compare&swap is available.
2758 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
2761 * pthread.c (pthread_initialize): Don't use sysconf to determine
2762 whether the machine has more than one processor.
2764 * spinlock.c (__pthread_alt_timedlock): Add back one of the
2765 removed thread_self calls.
2767 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2769 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
2770 __compare_and_swap to compare_and_swap in code which assumes
2771 compare swap is available.
2773 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
2775 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
2776 bug whereby thr field of waitnode structure would not be correctly
2777 set unless a null self pointer is passed to the functions.
2778 Eliminated redundant calls to thread_self().
2780 2000-07-18 Jakub Jelinek <jakub@redhat.com>
2782 * pthread.c (__pthread_initialize_manager): Lock
2783 __pthread_manager_thread.p_lock before calling clone.
2785 2000-05-05 H.J. Lu <hjl@gnu.org>
2787 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
2788 have acquire semantics.
2789 (__compare_and_swap_with_release_semantics): New inline
2791 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
2793 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
2795 * manager.c: Fix the problem with signals at startup.
2796 Change the way that thread stacks are allocated on IA64.
2797 Clean up some of the guard page allocation stuff.
2799 1999-12-19 H.J. Lu <hjl@gnu.org>
2801 * internals.h (page_roundup): New.
2802 * attr.c (__pthread_attr_setguardsize); Use page_roundup
2804 * manager.c (pthread_allocate_stack): Make sure guardaddr is
2805 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2808 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
2810 * manager.c (pthread_allocate_stack): Unmap the stack top
2811 if failed to map the stack bottom.
2813 (pthread_free): Fix the guard page.
2815 * pthread.c (pthread_initialize): Set rlimit correctly for
2816 NEED_SEPARATE_REGISTER_STACK.
2818 1999-12-16 H.J. Lu <hjl@gnu.org>
2820 * pthread.c (__pthread_initialize_manager): Pass
2821 __pthread_manager_thread_bos instead of
2822 __pthread_manager_thread_tos to __clone2.
2824 1999-12-16 H.J. Lu <hjl@gnu.org>
2826 * manager.c (pthread_allocate_stack): Correct the calculation
2827 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2830 1999-12-13 H.J. Lu <hjl@gnu.org>
2832 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2833 bit after setting ar.ccv.
2835 1999-12-12 H.J. Lu <hjl@gnu.org>
2837 * manager.c (pthread_allocate_stack): Make the starting
2838 address of the stack bottom page aligned. FIXME: it may
2839 need changes in other places.
2840 (pthread_handle_create): Likewise.
2842 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
2844 * manager.c (pthread_allocate_stack): Handle
2845 NEED_SEPARATE_REGISTER_STACK.
2846 (pthread_handle_create): Likewise.
2847 * pthread.c (__pthread_initialize_manager): Likewise.
2849 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2851 1999-12-02 H.J. Lu <hjl@gnu.org>
2853 * sysdeps/ia64/pt-machine.h: New.
2855 2000-07-13 Ulrich Drepper <drepper@redhat.com>
2857 * wrapsyscall.c: Mark non-__ protected names as weak.
2860 2000-07-12 Bruno Haible <haible@clisp.cons.org>
2862 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2864 2000-07-12 Ulrich Drepper <drepper@redhat.com>
2866 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2867 Add tests also to new alternative spinlock implementation.
2868 * spinlock.h: Likewise.
2869 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2871 2000-07-06 Ulrich Drepper <drepper@redhat.com>
2873 * Version: Export __sigaction.
2874 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
2876 * pthread.c: Use __libc_sigaction instead of __sigaction.
2878 * condvar.c: Implement pthread_condattr_getpshared and
2879 pthread_condattr_setpshared.
2880 * mutex.c: Implement pthread_mutexattr_getpshared and
2881 pthread_mutexattr_setpshared.
2882 * Versions: Export new functions.
2883 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2885 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2886 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2889 2000-07-04 Greg McGary <greg@mcgary.org>
2891 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2892 pragmas. Include bp-sym.h only if _LIBC.
2894 2000-07-04 Ulrich Drepper <drepper@redhat.com>
2896 * spinlock.c (__pthread_unlock): Properly place write barrier.
2897 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2899 2000-07-03 Ulrich Drepper <drepper@redhat.com>
2901 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2902 faster on SMP systems. No more emulation of compare&swap for adaptive
2904 * spinlock.h: Likewise.
2905 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2906 Replace fast with adaptive mutex.
2907 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2908 * condvar.c: Likewise.
2909 * pthread.c: Define and initialize __pthread_smp_kernel variable.
2910 * internals.h: Declare __pthread_smp_kernel.
2911 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2912 _pthread_fastlock structure.
2913 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2915 * pthread.c: Remove initialization to zero from global variables.
2917 2000-06-29 Jakub Jelinek <jakub@redhat.com>
2919 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2921 2000-06-28 Greg McGary <greg@mcgary.org>
2923 * weaks.c: Wrap BP_SYM () around weak extern declarations of
2924 pthread functions that have pointers in their return+arg signatures.
2926 2000-06-27 Greg McGary <greg@mcgary.org>
2928 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2929 extern declarations of pthread functions that have pointers in
2930 their return+arg signatures.
2932 2000-06-26 Ulrich Drepper <drepper@redhat.com>
2934 * Makefile (tests): Add ex11. Add rules to build it.
2935 * Examples/ex11.c: New file.
2936 * rwlock.c: Fix complete braindamaged previous try to implement
2939 * spinlock.c: Pretty print.
2941 2000-06-25 Ulrich Drepper <drepper@redhat.com>
2943 * Makefile (tests): Add ex10. Add rules to build it.
2944 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2945 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2946 * condvar.c (pthread_cond_wait): Allow mutex of kind
2947 PTHREAD_MUTEX_TIMED_NP.
2948 (pthread_cond_timedwait_relative): Likewise.
2949 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2950 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2951 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2952 (__pthread_mutex_lock): Use __pthread_alt_lock for
2953 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2954 (__pthread_mutex_timedlock): New function.
2955 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2956 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
2957 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2958 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2959 * spinlock.c: Implement alternate fastlocks.
2960 * spinlock.h: Add prototypes.
2961 * Examples/ex10.c: New file.
2962 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2963 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2965 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2966 (__pthread_rwlock_timedrdlock): New function.
2967 (__pthread_rwlock_timedwrlock): New function.
2968 Use laternate fastlock function everywhere.
2970 2000-06-21 Andreas Jaeger <aj@suse.de>
2972 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2975 * join.c: Include <stdlib.h> for exit prototype.
2977 2000-06-20 Ulrich Drepper <drepper@redhat.com>
2979 * sysdeps/i386/useldt.h: Include <stdlib.h>.
2981 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2982 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2984 * Makefile (libpthread-routines): Add barrier.
2985 (tests): Add ex9. Add rule to build ex9.
2986 * Versions: Export barrier functions.
2987 * barrier.c: New file.
2988 * Examples/ex9.c: New file.
2989 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2990 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2991 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2993 2000-06-19 H.J. Lu <hjl@gnu.org>
2995 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2996 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2997 (compare_and_swap_with_release_semantics): New. Default to
2998 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
3001 * spinlock.c (__pthread_unlock): Call
3002 compare_and_swap_with_release_semantics () instead of
3003 compare_and_swap ().
3005 2000-06-19 Ulrich Drepper <drepper@redhat.com>
3007 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
3009 * sysdeps/pthread/timer_delete.c: Likewise.
3010 * sysdeps/pthread/timer_getoverr.c: Likewise.
3011 * sysdeps/pthread/timer_gettime.c: Likewise.
3012 * sysdeps/pthread/timer_settime.c: Likewise.
3014 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
3016 Timer nodes are now reference counted, and can be marked
3017 as deleted. This allows for the safe release of the global mutex
3018 in the middle without losing the timer being operated on.
3020 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
3021 member is now an enum with three values, so that an intermediate
3022 state can be represented (deleted but not free for reuse yet).
3023 New refcount member added.
3024 * sysdeps/pthread/timer_routines.c: Likewise.
3026 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
3027 timer_valid): New inline functions added.
3029 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
3030 restructured, recursive deadlock bug fixed.
3032 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
3033 timer_addref to ensure that timer won't be deleted while mutex is not
3034 held. Also uses timer_invalid to perform validation of timer handle.
3035 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3036 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
3038 2000-06-14 Ulrich Drepper <drepper@redhat.com>
3040 * shlib-versions: Add entry for SH.
3041 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
3043 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
3045 A few optimizations. Got rid of unnecessary wakeups of timer threads,
3046 tightened up some critical regions and micro-optimized some list
3049 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3050 Returns int value now to indicate whether timer was queued at head.
3051 * sysdeps/pthread/posix-timer.h: Likewise.
3052 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
3053 new return value from __timer_thread_queue_timer to avoid waking
3054 up timer thread unnecessarily.
3056 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
3057 inuse flag, because this requires mutex to be held. Callers updated
3058 to do the check when they have the mutex.
3059 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
3061 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
3062 regions: avoids making system calls while holding timer mutex, and
3063 a few computations were moved outside of the mutex as well.
3064 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
3066 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
3067 to list_unlink_ip, meaning idempotent. Pointer manipulation
3068 changed to get better better code out of gcc.
3069 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
3070 version of list_unlink added here.
3071 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
3072 function in all places: idempotent one for timers, non-idempotent
3073 one for thread nodes.
3074 * sysdeps/pthread/timer_settime: Likewise.
3075 * sysdeps/pthread/timer_routines.c: Likewise.
3077 2000-06-13 Ulrich Drepper <drepper@redhat.com>
3079 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
3080 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3082 * sysdeps/pthread/Makefile: Remove tests definition.
3084 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3085 Yutaka Niibe <gniibe@chroot.org>
3087 * sysdeps/sh/pspinlock.c: New file.
3088 * sysdeps/sh/pt-machine.h: New file.
3090 2000-06-12 Ulrich Drepper <drepper@redhat.com>
3092 * Makefile (tests): Add joinrace.
3094 * Examples/ex6.c: Test return value of pthread_join.
3096 2000-06-11 Geoff Keating <geoffk@cygnus.com>
3098 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
3099 (__pthread_spin_trylock): Implement.
3100 (__pthread_spin_unlock): Implement.
3101 (__pthread_spin_init): Implement.
3102 (__pthread_spin_destroy): Implement.
3104 2000-06-10 Ulrich Drepper <drepper@redhat.com>
3106 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
3107 really append the entry.
3109 2000-06-10 Andreas Jaeger <aj@suse.de>
3111 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
3113 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
3115 * sysdeps/pthread/timer_create.c: Thread matching now done on
3116 clock type as well as thread attributes.
3117 There are individual global signal-delivering threads for
3118 different clock types.
3119 * sysdeps/pthread/posix-timer.h: Likewise.
3120 * sysdeps/pthread/timer_routines.c: Likewise.
3122 * sysdeps/pthread/timer_routines.c: Thread allocation and
3123 deallocation function now remembers to put thread on active
3124 list and remove from active list.
3125 Thus now the feature of binding multiple timers
3126 to a single thread actually works.
3128 2000-06-10 Ulrich Drepper <drepper@redhat.com>
3130 * pthread.c (__pthread_create_2_1): Optimize a bit.
3132 * internals.h (invalid_handle): Also test for p_terminated != 0.
3133 (nonexisting_handle): New function. Same as old invalid_handle.
3134 * join.c (pthread_join): Use nonexisting_handle instead of
3135 invalid_handle to test for acceptable thread handle.
3136 * manager.c (pthread_handle_free): Likewise.
3137 * joinrace.c: New file.
3138 Reported by Permaine Cheung <pcheung@cygnus.com>.
3140 2000-06-08 Ulrich Drepper <drepper@redhat.com>
3142 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3143 Correct handling of matching variable.
3145 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
3148 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3149 Be prepared for empty timer list.
3151 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
3152 CPUTIME clock ID. Add support for thread clocks.
3154 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
3155 subtraction were switched.
3157 * sysdeps/pthread/timer_routines.c (init_module): Use
3158 THREAD_MAXNODES threads.
3160 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
3161 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
3162 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
3163 with sigqueueinfo is this system call is available.
3165 * sysdeps/pthread/timer_create.c (timer_create): Allow
3166 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
3168 * sysdeps/pthread/Makefile: New file. Add rules to build timer
3170 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
3172 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
3174 * sysdeps/pthread/posix-timer.h: New file.
3175 * sysdeps/pthread/timer_create.c: New file.
3176 * sysdeps/pthread/timer_delete.c: New file.
3177 * sysdeps/pthread/timer_getoverr.c: New file.
3178 * sysdeps/pthread/timer_gettime.c: New file.
3179 * sysdeps/pthread/timer_routines.c: New file.
3180 * sysdeps/pthread/timer_settime.c: New file.
3181 * sysdeps/pthread/tst-timer.c: New file.
3183 2000-06-08 Ulrich Drepper <drepper@redhat.com>
3185 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
3186 LINK_MAX definitions if necessary.
3188 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
3190 Added missing fork time handling of global libio lock.
3192 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
3193 not just the individual stream locks. Rewritten to use new
3194 iterator interface provided by libio rather than accessing
3197 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
3198 which lock and unlock the stream list using the new interface
3200 * internals.h: Likewise.
3202 * ptfork.c (__fork): Now calls __flockfilelist before fork,
3203 and __funlockfilelist in the parent after the fork.
3204 Child still calls __fresetlockfiles as before.
3206 * linuxthreads.texi: Now explains what happens to streams at
3207 fork time. Also whole new section on forking and thread added.
3208 Definition of pthread_atfork moved out of Miscellaneous Functions
3209 to this new section.
3211 2000-06-04 Jakub Jelinek <jakub@redhat.com>
3213 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
3214 Add missing register.
3215 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
3217 2000-06-02 Jakub Jelinek <jakub@redhat.com>
3219 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
3220 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
3221 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
3223 2000-05-31 Andreas Jaeger <aj@suse.de>
3225 * sysdeps/mips/pspinlock.c: Implement spinlocks.
3227 2000-05-28 Ulrich Drepper <drepper@redhat.com>
3229 * spinlock.c (__pthread_lock): Remove ASSERT.
3231 * Makefile (tests): Add ex8.
3232 * Examples/ex8.c: New file.
3234 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
3236 Bugfix: The pthread_atfork mechanism now takes care of its
3237 own internal mutex at fork time.
3239 * ptfork.c (__fork): Revised so that the mutex is held across
3240 the fork operation and while the handlers are called, and so that
3241 the child resets the mutex.
3243 * linuxthreads.texi: Updated pthread_atfork documentation to make
3244 it clear that fork and pthread_atfork can't be reentered from
3245 atfork handlers, that pthread_atfork and fork are mutually atomic,
3246 and that the handlers are inherited by the child process.
3248 2000-05-24 Ulrich Drepper <drepper@redhat.com>
3250 * Makefile (libpthread-routines): Add pspinlock.
3251 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
3252 Use struct _pthread_fastlock instead of pthread_spinlock_t.
3253 * condvar.c: Likewise.
3254 * internals.h: Likewise.
3256 * manager.c: Likewise.
3257 * mutex.c: Likewise.
3258 * pthread.c: Likewise.
3259 * rwlock.c: Likewise.
3260 * semaphore.c: Likewise.
3261 * signals.c: Likewise.
3262 * spinlock.h: Likewise.
3263 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
3264 * sysdeps/alpha/pspinlock.c: New file.
3265 * sysdeps/arm/pspinlock.c: New file.
3266 * sysdeps/i386/pspinlock.c: New file.
3267 * sysdeps/m68k/pspinlock.c: New file.
3268 * sysdeps/mips/pspinlock.c: New file.
3269 * sysdeps/powerpc/pspinlock.c: New file.
3270 * sysdeps/sparc/sparc32/pspinlock.c: New file.
3271 * sysdeps/sparc/sparc64/pspinlock.c: New file.
3272 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
3273 back to _pthread_fastlock. Define new pthread_spinlock_t.
3275 2000-05-24 Andreas Jaeger <aj@suse.de>
3277 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
3279 2000-05-21 Jakub Jelinek <jakub@redhat.com>
3281 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
3283 2000-05-13 Jakub Jelinek <jakub@redhat.com>
3285 * internals.h (__RES_PTHREAD_INTERNAL): Define.
3287 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3289 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
3290 object state is represented with additional bits which distinguish
3291 whether that state was set up in the current process, or
3292 in an ancestor process. If that state was set in an ancestor,
3293 it means that a fork happened while thread was executing the init
3294 function. In that case, the state is reset to NEVER.
3295 * mutex.c (__pthread_once_fork_prepare): New function.
3296 (__pthread_once_fork_child): Likewise
3297 (__pthread_once_fork_parent): Likewise
3298 (__pthread_reset_pthread_once): Removed.
3299 * ptfork.c (__fork): Call new handlers in mutex.c.
3300 * internals.h: Declarations of new mutex.c functions added.
3301 Declaration of removed function deleted.
3302 * linuxthreads.texi: Updated documentation about pthread_once
3303 to clarify what happens under cancellation and forking.
3305 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
3307 * internals.h: New thread manager request type, REQ_KICK.
3308 * join.c (pthread_exit): main thread now calls exit() instead
3309 of _exit() in order to proper process cleanup.
3310 * manager.c (__pthread_manager): Do not terminate manager
3311 after unblocking main thread; wait for main thread's
3312 REQ_PROCESS_EXIT request instead.
3313 Also, added REQ_KICK case to handle new request; this just does
3315 * manager.c (pthread_exited): Do not terminate manager after
3316 unblocking main thread.
3317 * manager.c (__pthread_manager_sighandler): If the main thread
3318 is waiting for all other threads to die, send a REQ_KICK into
3319 the thread manager request pipe to get it to clean out the threads
3320 and unblock the main thread as soon as possible. This fixes
3321 the 2000 millisecond hang on shutdown bug.
3322 * Examples/ex7.c: New file, tests shutdown behavior when all threads
3323 including the main one call pthread_exit(), or implicitly do so.
3324 * Makefile (tests): Add ex7.
3326 2000-05-05 Andreas Jaeger <aj@suse.de>
3328 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3329 (pthread_getcpuclockid): Correct test for ourselves.
3331 2000-05-05 Ulrich Drepper <drepper@redhat.com>
3333 * internals.h (struct _pthread_descr_struct): Reorganization.
3334 Allocate room for 16 pointers at head of the structure for future
3335 thread-local data handling. Move p_self member in this area.
3336 * manager.c (pthread_handle_create): Adjust use of p_self.
3337 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
3338 * pthread.c (__pthread_initial_thread): Adjust initialization.
3339 (__pthread_manager_thread): Likewise.
3341 2000-04-29 Bruno Haible <haible@clisp.cons.org>
3343 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
3344 for eventmask larger than 1 word.
3346 2000-04-27 Ulrich Drepper <drepper@redhat.com>
3348 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
3349 * pthread.c (__pthread_initialize_minimal): New function. Perform
3350 minimal initialization.
3351 (pthread_initialize): Remove this code here.
3352 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
3353 are working around the problem in glibc.
3355 2000-04-25 Ulrich Drepper <drepper@redhat.com>
3357 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
3358 now. First gcc must be fixed (more concrete: libgcc).
3360 2000-04-24 Ulrich Drepper <drepper@redhat.com>
3362 * pthread.c: Remove special treatement for interrupt handlers on x86.
3363 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
3364 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
3366 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
3368 2000-04-24 Mark Kettenis <kettenis@gnu.org>
3370 * join.c (pthread_exit): Set p_terminated after reporting the
3371 termination event instead of before.
3373 2000-04-20 Jakub Jelinek <jakub@redhat.com>
3375 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
3378 2000-04-18 Andreas Jaeger <aj@suse.de>
3380 * Versions: Use ld instead of ld.so.
3382 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3384 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
3385 Remove the typedef keyword.
3387 2000-04-18 Jakub Jelinek <jakub@redhat.com>
3389 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
3391 (READ_MEMORY_BARRIER): Define.
3392 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
3394 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
3397 2000-04-17 Ulrich Drepper <drepper@redhat.com>
3399 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3400 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
3401 use thread_handle().
3403 2000-04-16 Ulrich Drepper <drepper@redhat.com>
3405 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
3406 if fast mutex is used. Don't initialize `already_canceled' twice.
3407 Correctly test for return value of timedsuspend.
3409 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
3410 therefore don't need the _rt versions of the signal handlers.
3412 2000-04-15 Ulrich Drepper <drepper@redhat.com>
3414 * pthread.c (pthread_yield): New function.
3415 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
3416 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
3417 * internals.h: Declare __pthread_yield.
3419 * pthread.c (pthread_initialize): Avoid a bit more code if
3420 realtime signals are known to exist.
3422 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
3423 to dynamically detect RT signals and avoid generating compatibility
3424 functions with old kernel.
3425 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use