1 2004-12-02 Roland McGrath <roland@redhat.com>
3 * Makefile (libpthread-nonshared): Variable removed.
4 ($(objpfx)libpthread_nonshared.a): Target removed.
5 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6 These are now handled by generic magic from
7 libpthread-static-only-routines being set.
9 2004-11-04 Roland McGrath <roland@redhat.com>
11 * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid)
12 [__NR_clock_getres]: Use kernel-supplied CPU clocks if available.
14 2004-11-27 Ulrich Drepper <drepper@redhat.com>
16 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
17 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
18 _POSIX_THREAD_PRIO_PROTECT): Define.
19 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
20 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
21 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
23 2004-11-26 Jakub Jelinek <jakub@redhat.com>
25 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
26 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
27 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
28 _POSIX_TYPED_MEMORY_OBJECTS): Define.
29 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
30 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
31 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
33 2004-11-05 Maciej W. Rozycki <macro@mips.com>
35 * sysdeps/mips/pspinlock.c: Include <sgidefs.h>. Use _ABIO32,
36 _ABIN32 and _ABI64 for ABI selection throughout.
37 * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
38 ABI selection throughout.
40 2004-10-18 Roland McGrath <roland@redhat.com>
43 * Makefile (linuxthreads-CPPFLAGS): New variable;
44 adds -DIS_IN_linuxthreads=1.
45 * sysdeps/i386/tls.h: Protect "useldt.h" with
46 [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
47 * sysdeps/i386/i686/pt-machine.h: Revert last change.
49 2004-10-14 Jakub Jelinek <jakub@redhat.com>
51 * sysdeps/pthread/errno-loc.c: Don't undef #errno
52 if RTLD_PRIVATE_ERRNO.
54 2004-10-05 Dwayne Grant McConnell <dgm69@us.ibm.com>
56 * pthread.c: Mask restart signal during cancel signal handler.
58 2004-10-05 Jakub Jelinek <jakub@redhat.com>
60 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
61 _POSIX_THREAD_CPUTIME): Define to 0.
63 2004-10-04 Ulrich Drepper <drepper@redhat.com>
65 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
66 and _POSIX_THREAD_CPUTIME to zero.
67 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
69 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
70 _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
71 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
72 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
73 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
75 2004-09-25 Roland McGrath <roland@redhat.com>
78 * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
79 [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
81 2004-09-24 Roland McGrath <roland@redhat.com>
84 * sysdeps/i386/tls.h: Move #include "useldt.h" outside
85 of [__ASSUME_LDT_WORKS > 0] test.
86 Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
88 2004-09-21 Roland McGrath <roland@redhat.com>
90 * Versions: Add comment about linuxthreads' frozen ABI.
92 2004-09-20 Ulrich Drepper <drepper@redhat.com>
94 * Versions: Remove exports for pthread_set*id_np functions.
95 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
97 * Makefile: Don't build pthread_set*id code for now.
99 2004-09-19 Ulrich Drepper <drepper@redhat.com>
101 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
102 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
103 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
104 and pthread_setresuid_np.
105 * pthread_setgid_np.c: New file.
106 * pthread_setuid_np.c: New file.
107 * pthread_setegid_np.c: New file.
108 * pthread_seteuid_np.c: New file.
109 * pthread_setregid_np.c: New file.
110 * pthread_setreuid_np.c: New file.
111 * pthread_setresgid_np.c: New file.
112 * pthread_setresuid_np.c: New file.
113 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
114 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
115 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
116 and pthread_setresuid_np.
117 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
118 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
119 pthread_setregid, and pthread_setresgid.
121 2004-09-12 Ulrich Drepper <drepper@redhat.com>
123 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
125 * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
126 for __USE_XOPEN2K. [BZ #320]
128 2004-09-04 Jakub Jelinek <jakub@redhat.com>
130 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
132 2004-09-07 Ulrich Drepper <drepper@redhat.com>
134 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
135 the initialization function might throw.
137 2004-08-30 Roland McGrath <roland@frob.com>
139 * Makefile (libpthread-abi-frozen): New variable.
141 2004-08-26 Roland McGrath <roland@redhat.com>
143 * configure.in: New file. If nptl add-on is also selected, barf if
144 explicit and elide ourselves if implicit.
145 * configure: Now generated.
147 2004-08-25 Richard Sandiford <rsandifo@redhat.com>
149 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
150 __local_multiple_threads): Fix definitions for IS_IN_librt.
151 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
153 2004-08-22 Andreas Schwab <schwab@suse.de>
155 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
156 Save gp around CENABLE/CDISABLE calls.
158 2004-08-15 Roland McGrath <roland@frob.com>
160 * pthread_atfork.c: Update copyright terms including special exception
161 for these trivial files, which are statically linked into executables
162 that use dynamic linking for the significant library code.
164 2004-08-09 Jakub Jelinek <jakub@redhat.com>
166 * libc-tsd.c: Move resolv.h include before the #if.
167 (__res_maybe_init): New function. Add libc_hidden_def.
169 2004-08-02 Ulrich Drepper <drepper@redhat.com>
171 * linuxthreads.texi (Cleanup Handlers): Fix typo.
172 Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
174 2004-07-23 Jakub Jelinek <jakub@redhat.com>
177 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
178 instead of clockid_t.
180 2004-07-21 Roland McGrath <roland@redhat.com>
182 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
184 2004-07-02 Roland McGrath <roland@redhat.com>
186 * configure: Don't exit.
188 2004-07-20 Alexandre Oliva <aoliva@redhat.com>
190 * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
192 * sysdeps/mips/atomicity.h: Likewise.
194 2004-07-19 Alexandre Oliva <aoliva@redhat.com>
196 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
197 Remove redundant override that missed -g0.
199 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
201 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
202 (__local_multiple_threads): Define for librt.
203 (SINGLE_THREAD_P): Likewise.
205 2004-07-07 Jakub Jelinek <jakub@redhat.com>
207 * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
208 using other thread's clock.
209 * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
210 * ptclock_settime.c (__pthread_clock_settime): Likewise.
211 * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
213 Reported by Bernd Schmidt <bernds@redhat.com>.
214 * Makefile (librt-tests): Add tst-clock1.
215 * tst-clock1.c: New test.
217 * sysdeps/x86_64/Versions: New file.
218 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
219 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
221 2004-04-16 Andreas Schwab <schwab@suse.de>
223 * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
225 2004-07-05 Jakub Jelinek <jakub@redhat.com>
227 * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
228 __pthread_spin_trylock): Use constraint "m" instead of "0" for
230 * sysdeps/ia64/pt-machine.h (__compare_and_swap,
231 __compare_and_swap_with_release_semantic, testandset): Use
232 constraint "m" instead of "0" for futex.
234 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
236 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
237 branch offset for a PLT entry.
238 (CDISABLE): Likewise.
240 2004-05-31 Andreas Jaeger <aj@suse.de>
242 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
243 Set to -fno-unit-at-a-time.
244 Patch by Dan Kegel <dank@kegel.com>.
246 2004-05-04 Jakub Jelinek <jakub@redhat.com>
248 * tst-stack1.c: Don't include mcheck.h.
249 (do_test): Make sure user defined stacks aren't reused,
250 don't free them at the end. [BZ #110]
252 2004-05-02 Jakub Jelinek <jakub@redhat.com>
254 * manager.c: Include not-cancel.h.
255 (__pthread_manager): Use read_not_cancel instead of __libc_read.
256 (pthread_start_thread, __pthread_manager_sighandler): Use
257 write_not_cancel instead of __libc_write.
258 (pthread_reap_children): Use waitpid_not_cancel instead of
260 * pthread.c: Include not-cancel.h.
261 (__pthread_initialize_minimal, __pthread_create_2_1,
262 pthread_onexit_process, __pthread_message): Use
263 write_not_cancel instead of __libc_write.
264 (__pthread_initialize_manager): Likewise. Use close_not_cancel
265 instead of __libc_close.
266 (__pthread_reset_main_thread): Use close_not_cancel instead of
268 * join.c: Include not-cancel.h.
269 (__pthread_do_exit, pthread_join, pthread_detach): Use
270 write_not_cancel instead of __libc_write.
271 * semaphore.c: Include not-cancel.h.
272 (__new_sem_post): Use write_not_cancel instead of __libc_write.
273 * specific.c: Include not-cancel.h.
274 (pthread_key_delete): Use write_not_cancel instead of __libc_write.
276 2004-05-01 Jakub Jelinek <jakub@redhat.com>
278 * Versions (libc): Add __on_exit and __libc_sigaction.
280 2004-04-28 Jakub Jelinek <jakub@redhat.com>
282 * semaphore.c (sem_timedwait): Return -1 and set errno instead of
283 returning error number [BZ #133]. Patch by <rmhaddad@yahoo.com>.
285 2004-04-22 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
287 * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
288 reference in PIC case.
290 2004-04-20 Jakub Jelinek <jakub@redhat.com>
292 * oldsemaphore.c (SEM_VALUE_MAX): Remove.
294 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
296 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
297 for librt. Save the return value to a safe register.
298 (CDISABLE): Define for librt. Set the function argument correctly.
300 2004-04-18 Jakub Jelinek <jakub@redhat.com>
302 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
303 (PSEUDO_CANCEL): Define.
305 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
306 CDISABLE): For librt, append @PLT.
308 2004-04-17 Jakub Jelinek <jakub@redhat.com>
310 * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
312 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
313 return it_value { 0, 0 }.
314 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
316 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
317 assertion for SIGEV_NONE.
318 (thread_attr_compare): Compare all attributes, not just a partial
321 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
323 2004-04-17 Ulrich Drepper <drepper@redhat.com>
325 * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
327 2004-04-16 Ulrich Drepper <drepper@redhat.com>
329 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
331 2004-04-13 Jakub Jelinek <jakub@redhat.com>
333 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
335 2004-04-12 Ulrich Drepper <drepper@redhat.com>
337 * sysdeps/unix/sysv/linux/mq_notify.c: New file.
339 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
341 (CDISABLE): Likewise.
343 2004-04-08 Jakub Jelinek <jakub@redhat.com>
345 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
346 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
347 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
348 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
349 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
351 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
352 (_POSIX_MESSAGE_PASSING): Define.
354 2004-04-10 Andreas Jaeger <aj@suse.de>
356 * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
357 to avoid warnings with GCC 3.5.
359 2004-04-09 Steven Munroe <sjmunroe@us.ibm.com>
361 * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
362 __thread_self assignment.
363 (THREAD_DTV): Replace __thread_register with __thread_self.
364 (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
367 2004-04-08 Alexandre Oliva <aoliva@redhat.com>
369 * signals.c (pthread_sigmask): Don't ever block or mask
372 2004-03-11 Steven Munroe <sjmunroe@us.ibm.com>
374 * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
376 2004-03-23 Ulrich Drepper <drepper@redhat.com>
378 * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
379 * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
381 2004-03-12 Ulrich Drepper <drepper@redhat.com>
383 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
384 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
385 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
386 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
388 2004-03-08 Andreas Jaeger <aj@suse.de>
390 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
391 dl_osversion is readonly.
393 2004-03-07 Ulrich Drepper <drepper@redhat.com>
395 * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
397 * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
399 2004-02-20 Steven Munroe <sjmunroe@us.ibm.com>
401 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
402 valid for SHARED case. Correct spelling of __vmx_longjmp.
404 * sysdeps/powerpc/pspinlock.c: Move from here.
405 * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
406 * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
407 * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
408 and __compare_and_swap32_with_release_semantics.
410 2004-02-20 Jakub Jelinek <jakub@redhat.com>
412 * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
413 (tests): Remove $(objpfx)tst-stack1-mem.
414 (tst-stack1-ENV): Remove.
415 ($(objpfx)tst-stack1-mem): Remove.
417 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
418 (__syscall_error_handler2): Call CDISABLE.
419 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
420 (__syscall_error_handler2): Call CDISABLE.
422 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
424 2004-02-10 Steven Munroe <sjmunroe@us.ibm.com>
426 * Makefile (libpthread-routines): Add ptcleanup.
427 * ptlongjmp.c: Removed.
428 * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
429 * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
430 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
431 Version longjmp, siglongjmp for GLIBC_2.3.4.
432 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
434 2004-01-22 Andreas Jaeger <aj@suse.de>
436 * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
437 (__pthread_release): Likewise.
439 2004-01-16 Richard Henderson <rth@redhat.com>
441 * attr.c: Include ldsodefs.h.
442 (pthread_getattr_np): Don't declare __libc_stack_end.
444 2004-01-09 Steven Munroe <sjmunroe@us.ibm.com>
446 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
447 [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
448 __lib*_multiple_threads.
449 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
450 [!HAVE_TLS_SUPPORT]: Likewise.
452 2004-01-13 Roland McGrath <roland@redhat.com>
454 * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
457 2004-01-10 Andreas Jaeger <aj@suse.de>
459 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
461 2004-01-01 Andreas Jaeger <aj@suse.de>
463 * Makefile (generated): Add missing files.
465 2003-12-31 Ulrich Drepper <drepper@redhat.com>
467 * attr.c (pthread_getattr_np): Make sure stack info returned for
468 main thread does not overlap with any other VMA.
469 Patch by Jakub Jelinek.
471 2003-12-29 Jakub Jelinek <jakub@redhat.com>
473 * sysdeps/ia64/tls.h: Include dl-sysdep.h.
474 (INIT_SYSINFO): Define.
475 (TLS_INIT_TP): Use it.
477 2003-12-28 Carlos O'Donell <carlos@baldric.uwo.ca>
479 * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
481 2003-12-26 Jakub Jelinek <jakub@redhat.com>
483 * sysdeps/pthread/pthread.h (pthread_setcancelstate,
484 pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
486 * semaphore.h (sem_wait, sem_timedwait): Likewise.
488 2003-12-17 Jakub Jelinek <jakub@redhat.com>
490 * manager.c (pthread_free): Call _dl_deallocate_tls even for
492 * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
494 (pthread_onexit_process): Update comment.
495 * Makefile (tests): Add tst-stack1. Depend on $(objpfx)tst-stack1-mem.
496 (generated): Add tst-stack1.mtrace and tst-stack1-mem.
497 (tst-stack1-ENV): Set.
498 ($(objpfx)tst-stack1-mem): New.
499 * tst-stack1.c: New test.
501 2003-12-16 Steven Munroe <sjmunroe@us.ibm.com>
503 * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
504 conditional so MULTIPLE_THREADS_OFFSET is generated for both.
505 * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
506 so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
507 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
510 2003-12-04 Steven Munroe <sjmunroe@us.ibm.com>
512 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
513 (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
515 2003-12-10 David Mosberger <davidm@hpl.hp.com>
517 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
518 message. Add include of <stddef.h>.
519 (INIT_NEW_WAY): New macro.
520 (INIT_OLD_WAY): Likewise.
521 (_init): Add unwind directives. Invoke
522 __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
524 (_init_EPILOG_BEGINS): Add unwind-directives. Drop unused .regstk
526 (_fini): Add unwind directives. Drop unnecessary .align 16
527 directive (bundles are always 16-byte aligned).
528 (_fini_EPILOG_BEGINS): Add unwind-directives.
530 2003-11-19 David Mosberger <davidm@hpl.hp.com>
532 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
534 2003-12-10 Andreas Jaeger <aj@suse.de>
535 Ruediger Oertel <ro@suse.de>
537 * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
539 2003-11-30 Andreas Jaeger <aj@suse.de>
541 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
542 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
545 2003-11-04 Jakub Jelinek <jakub@redhat.com>
547 * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
548 __libc_sigaction if it has been one of the special values before.
550 2003-10-06 Carlos O'Donell <carlos@baldric.uwo.ca>
552 * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
553 (__pthread_find_self): Likewise.
554 * manager.c (thread_segment): _STACK_GROWS_UP case added.
556 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
558 * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
560 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
562 * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
564 2003-10-07 Jakub Jelinek <jakub@redhat.com>
566 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
568 (SAVE_OLDTYPE_0): Fix a typo.
570 2003-10-02 Ulrich Drepper <drepper@redhat.com>
572 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
575 2003-10-02 Jakub Jelinek <jakub@redhat.com>
577 * Makefile (tests): Add tst-cancel8.
578 * tst-cancel8.c: New test.
580 2003-10-02 Ulrich Drepper <drepper@redhat.com>
582 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
583 restoring of the old cancellation type.
585 2003-09-10 Chris Demetriou <cgd@broadcom.com>
587 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
589 2003-09-30 Jakub Jelinek <jakub@redhat.com>
591 * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
592 mutex_lock, mutex_trylock, mutex_unlock): Remove.
594 2003-09-27 Wolfram Gloger <wg@malloc.de>
596 * sysdeps/pthread/malloc-machine.h: New file.
598 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
600 * attr.c (__pthread_attr_init_2_1): Double __guardsize size
601 if NEED_SEPARATE_REGISTER_STACK is defined.
603 2003-09-22 Philip Blundell <philb@gnu.org>
605 * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
606 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
608 * pthread.c (__pthread_elements): Initialise these new elements.
609 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
611 (__libc_cleanup_pop): Likewise.
613 2003-09-22 Jakub Jelinek <jakub@redhat.com>
615 * attr.c: Include stdlib.h.
617 2003-09-18 Jakub Jelinek <jakub@redhat.com>
619 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
621 * tst-attr1.c: New test.
622 * Makefile (tests): Add tst-attr1.
624 2003-09-17 Philip Blundell <philb@gnu.org>
626 * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
627 libpthread is loaded. Elide backwards compatibility code when not
630 2003-09-17 Jakub Jelinek <jakub@redhat.com>
632 * descr.h (manager_thread): Rename to...
633 (__pthread_manager_threadp): ... this.
634 * pthread.c (manager_thread): Define to __pthread_manager_threadp.
635 (__pthread_manager_threadp): New variable.
636 * internals.h (__manager_thread): Define to
637 __pthread_manager_threadp if USE_TLS.
639 2003-09-15 Jakub Jelinek <jakub@redhat.com>
641 * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
642 CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
643 -mpreferred-stack-boundary=4.
645 2003-09-16 Ulrich Drepper <drepper@redhat.com>
647 * attr.c (pthread_getattr_np): Correctly fill in the stack-related
648 values for the initial thread.
650 2003-09-17 Jakub Jelinek <jakub@redhat.com>
652 * pthread.c (manager_thread): Remove static, add attribute_hidden.
653 (thread_self_stack): Rename to...
654 (__pthread_self_stack): ... this. Remove static.
655 (pthread_handle_sigcancel): Use check_thread_self ().
656 (pthread_handle_sigrestart): Likewise.
657 * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
659 * descr.h (manager_thread): Declare.
660 * internals.h (__pthread_self_stack): New prototype.
661 (__manager_thread): Define.
662 (check_thread_self): New function.
664 2003-09-15 Jakub Jelinek <jakub@redhat.com>
666 * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
667 (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
669 2003-09-12 Jakub Jelinek <jakub@redhat.com>
671 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
672 (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
673 __SLONGWORD_TYPE otherwise.
675 2003-09-11 Steven Munroe <sjmunroe@us.ibm.com>
677 * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
678 [READ_MEMORY_BARRIER]: Define.
679 [WRITE_MEMORY_BARRIER]: Define.
681 2003-09-10 Jakub Jelinek <jakub@redhat.com>
683 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
684 ptr___pthread_cond_timedwait to the end of the structure to avoid
685 breaking Wine unnecessarily.
687 2003-09-08 Jakub Jelinek <jakub@redhat.com>
689 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
691 2003-09-02 Jakub Jelinek <jakub@redhat.com>
693 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
694 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
695 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
696 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
697 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
698 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
699 * attr.c (__old_pthread_attr_setstacksize,
700 __old_pthread_attr_setstack): New functions.
701 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
702 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
703 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
704 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
705 * tststack.c: Include limits.h and sys/param.h.
706 (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
708 * barrier.c (__pthread_barrierattr_getpshared): Always
709 return PTHREAD_PROCESS_PRIVATE.
710 (pthread_barrierattr_setpshared): Return EINVAL if pshared
711 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
713 2003-09-02 Ulrich Drepper <drepper@redhat.com>
715 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
716 (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
719 * barrier.c (pthread_barrierattr_setpshared): We don't handle
720 inter-process barriers.
722 2003-09-01 Jakub Jelinek <jakub@redhat.com>
724 * Makefile (tests): Add tst-tls1.
725 (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
726 ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
727 ($(objpfx)tst-tls1): New.
728 ($(objpfx)tst-tls2.out): Likewise.
729 (tests): Depend on $(objpfx)tst-tls2.out.
730 * tst-tls1.c: New test.
732 * tst-tls1mod.c: New.
733 * tst-tls1moda.c: New.
734 * tst-tls1modb.c: New.
735 * tst-tls1modc.c: New.
736 * tst-tls1modd.c: New.
737 * tst-tls1mode.c: New.
738 * tst-tls1modf.c: New.
739 * tst-tls2.sh: New test.
741 * internals.h (__pthread_cond_timedwait): New prototype.
742 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
743 ptr___pthread_cond_timedwait.
744 * pthread.c (__pthread_functions): Initialize them.
745 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
746 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
747 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
748 pthread_cond_timedwait@@GLIBC_2.3.2.
750 2003-08-27 Ulrich Drepper <drepper@redhat.com>
752 * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
753 pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
754 __THROW to match NPTL.
756 2003-08-13 Ulrich Drepper <drepper@redhat.com>
758 * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
759 -DBROKEN_THREAD_SIGNALS.
761 2003-08-11 Steven Munroe <sjmunroe@us.ibm.com>
763 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
764 Correct spelling of per thread resolver state.
766 2003-08-07 Jakub Jelinek <jakub@redhat.com>
768 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
769 (__rtld_lock_default_lock_recursive,
770 __rtld_lock_default_unlock_recursive): Define.
771 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
772 __rtld_lock_unlock_recursive): Define using
773 GL(_dl_rtld_*lock_recursive).
774 * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
775 and _dl_rtld_unlock_recursive. Lock GL(_dl_load_lock) the same
776 number of times as GL(_dl_load_lock) using non-mt implementation was
779 2003-07-31 Jakub Jelinek <jakub@redhat.com>
781 * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
782 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
784 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
786 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
788 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
789 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
790 PTHREAD_STACK_MIN in comments.
792 * sysdeps/alpha/pt-machine.h (PT_EI): Add
793 __attribute__((always_inline)).
794 * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
795 * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
796 * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
797 * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
798 * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
799 * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
800 * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
801 * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
802 * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
803 * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
804 * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
805 * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
806 * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
807 * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
808 * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
809 * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
810 * spinlock.h (__pthread_set_own_extricate_if): Likewise.
811 * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
813 * Examples/ex13.c (main): Change res type to void * to avoid
815 * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
817 2003-07-30 Jakub Jelinek <jakub@redhat.com>
819 * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
821 (pthread_initialize): Initialize GL(dl_init_static_tls).
823 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
825 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
826 before __timer_dealloc.
827 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
828 Don't call list_unlink.
830 2003-07-29 Roland McGrath <roland@redhat.com>
832 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
834 2003-07-25 Roland McGrath <roland@redhat.com>
836 * manager.c (pthread_start_thread): Fix typo in last change.
838 2003-07-14 Guido Guenther <agx@sigxcpu.org>
840 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
841 use L() for local labels.
843 2003-07-22 Jakub Jelinek <jakub@redhat.com>
845 * descr.h (struct _pthread_descr_struct): Provide p_res member
846 even if USE_TLS && HAVE___THREAD.
847 * sysdeps/pthread/res-state.c (__res_state): Return __resp
849 * manager.c: Include resolv.h.
850 (pthread_start_thread): Initialize __resp.
851 * libc-tls-loc.c (__res_state): Return __resp.
852 * Makefile (tests): Add tst-_res1.
853 (modules-names, extra-objs, test-extras, test-modules): Add support
855 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
856 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
858 * tst-_res1.c: New test.
859 * tst-_res1mod1.c: New test.
860 * tst-_res1mod2.c: New test.
862 2003-07-20 Ulrich Drepper <drepper@redhat.com>
864 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
867 * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
869 2003-07-14 Ulrich Drepper <drepper@redhat.com>
871 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
872 in test for compilation in libc.
874 2003-07-04 Jakub Jelinek <jakub@redhat.com>
876 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
877 different symbol for the cancellation syscall wrapper and
878 non-cancellation syscall wrapper.
879 (PSEUDO_END): Define.
881 2003-07-05 Richard Henderson <rth@redhat.com>
883 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
885 2003-06-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
887 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
890 2003-06-21 Andreas Schwab <schwab@suse.de>
892 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
895 2003-06-20 Richard Henderson <rth@redhat.com>
897 * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
898 Remove ptw-osf_sigprocmask.
900 2003-06-18 Jakub Jelinek <jakub@redhat.com>
902 * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
903 __librt_disable_asynccancel): Declare.
904 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
906 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
908 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
909 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
910 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
911 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
912 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
913 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
914 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
915 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
916 * sysdeps/x86_64/tcb-offsets.sym: New file.
917 * sysdeps/x86_64/Makefile: New file.
918 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
919 * Versions (libc): Export __librt_enable_asynccancel,
920 __librt_disable_asynccancel and __librt_multiple_threads as
922 * libc-cancellation.c (__librt_multiple_threads,
923 __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
925 2003-06-12 Steven Munroe <sjmunroe@us.ibm.com>
927 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
928 (SINGLE_THREAD_P): Replace @ got notation with @toc.
930 2003-06-11 Ulrich Drepper <drepper@redhat.com>
932 * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
933 initializer [PR libc/5052].
935 2003-06-09 Andreas Schwab <schwab@suse.de>
937 * Makefile: Move inclusion of ../Rules down after extra-objs is
940 2003-06-06 Ulrich Drepper <drepper@redhat.com>
942 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
943 5+ arg syscalls only needed for PIC.
944 Patch by Ralph Siemsen <ralphs@netwinder.org>.
946 2003-06-05 Richard Henderson <rth@redhat.com>
948 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
949 and require CFI assembler directives.
950 * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
952 2003-05-30 Andreas Jaeger <aj@suse.de>
954 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
955 (SAVESTK_0): Add CFI directives.
956 (SAVESTK_3): Likewise.
957 (SAVESTK_5): Likewise.
958 (RESTSTK_0): Likewise.
959 (RESTSTK_3): Likewise.
960 (RESTSTK_5): Likewise.
962 2003-05-05 Ulrich Drepper <drepper@redhat.com>
964 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
967 2003-05-04 Roland McGrath <roland@redhat.com>
969 * Makefile ($(objpfx)../libc.so): New target.
971 2003-04-26 Ulrich Drepper <drepper@redhat.com>
973 * pthread.c (__pthread_initialize_manager): Remove one last
974 p_multiple_threads call.
976 2003-04-22 Jakub Jelinek <jakub@redhat.com>
978 * pthread.c (__pthread_initialize_manager): Subtract
979 TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
980 * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
981 instead of sizeof (pthread_descr).
982 (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
983 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
984 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
986 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
988 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
990 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
992 (NO_TLS_OFFSET): Define.
994 2003-04-22 Roland McGrath <roland@redhat.com>
996 * Makeconfig (shared-thread-library): Reverse link order to work
999 2003-04-20 Ulrich Drepper <drepper@redhat.com>
1001 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
1002 compiler knows we use the ldt_entry variable and that the syscall
1003 modifies the memory.
1005 * internals.h: Split pthread_functions definition into...
1006 * sysdeps/pthread/pthread-functions.h: ...new file.
1008 * sysdeps/i386/useldt.h: Include <sysdep.h>.
1010 2003-04-13 Jakub Jelinek <jakub@redhat.com>
1012 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1013 match changes in NPTL sysdep-cancel.h.
1015 2003-04-11 Roland McGrath <roland@redhat.com>
1017 * Makefile (multidir): Don't set the variable here with $(shell ...).
1018 ($(objpfx)multidir.mk): New target, generated makefile; include that.
1019 (generated): Append it.
1021 2003-04-10 Jakub Jelinek <jakub@redhat.com>
1023 * Makefile (multidir, crti-objs, crtn-objs): New variables.
1024 (generated-dirs): Add pathname component of multidir.
1025 (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1026 ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1027 ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1028 $(objpfx)$(multidir)/crtn.o): New.
1029 * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1030 * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1031 before-compile, generated): Don't generate and use specs.
1032 ($(objpfx)specs): Remove.
1034 2003-04-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1036 * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1038 2003-04-03 Ulrich Drepper <drepper@redhat.com>
1040 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1041 missing ; after ENTRY use [PR libc/4997].
1043 2003-04-03 Jakub Jelinek <jakub@redhat.com>
1045 * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1046 in case the parent blocked it.
1048 2003-04-02 Jakub Jelinek <jakub@redhat.com>
1050 * Makefile (libpthread-routines): Add pthread_atfork.
1051 (libpthread-static-only-routines): Add pthread_atfork.
1053 2003-04-01 Jakub Jelinek <jakub@redhat.com>
1055 * pthread.c (__pthread_wait_for_restart_signal): Use
1056 __pthread_sigsuspend instead of sigsuspend.
1057 * internals.h (__pthread_sigsuspend): New prototype.
1058 * Makefile (libpthread-routines): Add pt-sigsuspend.
1059 (tests): Add tst-cancel7.
1060 * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1061 * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1062 * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1063 * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1064 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1065 * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1066 * tst-cancel7.c: New test.
1068 2003-03-31 Alexandre Oliva <aoliva@redhat.com>
1070 * alloca_cutoff.c: Include internals.h.
1071 * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1072 * sysdeps/pthread/herrno-loc.c: Likewise.
1073 * sysdeps/pthread/res-state.c: Likewise.
1075 2003-03-25 Ulrich Drepper <drepper@redhat.com>
1077 * sysdeps/pthread/bits/typesizes.h: New file.
1078 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1079 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1081 2003-03-24 Daniel Jacobowitz <drow@mvista.com>
1083 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1084 (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1086 2003-03-22 Jakub Jelinek <jakub@redhat.com>
1088 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1090 2003-03-21 Daniel Jacobowitz <drow@mvista.com>
1092 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1093 (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1095 2003-03-21 Jakub Jelinek <jakub@redhat.com>
1097 * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1098 (TLS_SETUP_GS_SEGMENT): Fix a typo.
1100 2003-03-19 Ulrich Drepper <drepper@redhat.com>
1102 * sysdeps/pthread/Makefile: Fix cut&paste error.
1104 2003-03-18 Roland McGrath <roland@redhat.com>
1106 * Versions (libpthread: GLIBC_2.2): Remove
1107 pthread_barrierattr_getpshared, never really existed.
1108 (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1109 (libpthread: GLIBC_PRIVATE): ... here.
1111 2003-03-14 Jakub Jelinek <jakub@redhat.com>
1113 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1114 * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1117 2003-03-14 Alexandre Oliva <aoliva@redhat.com>
1119 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1121 * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1122 Handle 64-bit longs on n64.
1124 2003-03-07 Jakub Jelinek <jakub@redhat.com>
1126 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1127 __pthread_spin_trylock): Rewritten.
1129 2003-03-06 Ulrich Drepper <drepper@redhat.com>
1131 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1134 2003-03-02 Ulrich Drepper <drepper@redhat.com>
1136 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1137 error for CPU clocks.
1139 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1140 _POSIX_MONOTONIC_CLOCK.
1141 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1143 2003-03-01 Roland McGrath <roland@redhat.com>
1145 * sysdeps/powerpc/powerpc64/pt-machine.h
1146 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1148 * sysdeps/powerpc/tls.h: Don't define those here.
1150 * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1151 tcbhead_t with multiple_threads member.
1152 [USE_TLS] (tcbhead_t): Define minimal one-word version.
1153 [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1154 * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1155 derive thread register offset of p_multiple_threads member.
1157 * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1158 Conditionalize p_header member on this.
1159 [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1160 * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1161 * sysdeps/sh/tls.h: Likewise.
1162 * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1163 * sysdeps/sh/tcb-offsets.sym: Likewise.
1164 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1165 (SINGLE_THREAD_P): Likewise.
1166 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1167 (SINGLE_THREAD_P): Likewise.
1168 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1169 (SINGLE_THREAD_P): Likewise.
1170 * pthread.c (__pthread_initialize_manager): Likewise.
1171 * manager.c (pthread_handle_create): Likewise.
1173 * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1176 2003-01-31 Steven Munroe <sjmunroe@us.ibm.com>
1178 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1179 Conditionalize .toc section magic on this.
1181 2003-02-21 Roland McGrath <roland@redhat.com>
1183 * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1184 instead of __rpc_thread_destroy.
1186 2003-02-21 Jakub Jelinek <jakub@redhat.com>
1188 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1189 __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1190 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1192 * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1193 to crti.o and crtn.o.
1194 * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1196 2003-02-21 Roland McGrath <roland@redhat.com>
1198 * Makefile (install-lib-ldscripts): New variable.
1200 2003-02-20 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1202 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1203 interprocedure branches.
1205 2003-02-19 Ulrich Drepper <drepper@redhat.com>
1207 * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1208 need the target thread's lock.
1210 2003-02-17 Ulrich Drepper <drepper@redhat.com>
1212 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1215 2003-02-17 Kevin B. Hendricks <kevin.hendricks@sympatico.ca>
1216 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1218 * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1219 * sysdeps/powerpc/tcb-offsets.sym: New file.
1220 * sysdeps/powerpc/tls.h: New file.
1221 * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1222 (ARCH_STACK_MAX_SIZE): Define.
1223 (THREAD_SELF): Define.
1224 (INIT_THREAD_SELF): Define.
1225 (THREAD_GETMEM): Define.
1226 (THREAD_GETMEM_NC): Define.
1227 (THREAD_SETMEM): Define.
1228 (THREAD_SETMEM_NC): Define.
1229 (__thread_self): Declare.
1230 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1231 for thread register.
1233 2003-02-14 Steven Munroe <sjmunroe@us.ibm.com>
1235 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1236 Check pthread_create existance, not __pthread_fork.
1238 2003-02-12 Ulrich Drepper <drepper@redhat.com>
1240 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1242 2003-02-10 Jakub Jelinek <jakub@redhat.com>
1244 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1245 pthread_create existance, not __pthread_fork.
1246 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1247 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1248 * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1249 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1251 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1252 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1253 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1254 Add .weak pthread_create.
1255 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1256 Check pthread_create existance, not __pthread_fork.
1257 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1258 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1259 __fork whenever libpthread.so is loaded.
1261 2003-02-09 Andreas Jaeger <aj@suse.de>
1263 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1264 Rework: %r9 is destroyed by functions so don't use it as
1265 temporary, align stack correctly, fix parameter for CDISABLE.
1267 2003-02-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1269 * sysdeps/sh/Makefile: New file.
1270 * sysdeps/sh/tcb-offsets.sym: Likewise.
1271 * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1272 of linuxthreads/descr.h after the definition of THREAD_SELF.
1273 (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1274 (TLS_TCB_SIZE): Set size of tcbhead_t.
1275 (TLS_PRE_TCB_SIZE): Define.
1276 (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1277 a member of thread structure.
1278 (THREAD_DTV): Likewise.
1279 (TLS_INIT_TP_EXPENSIVE): Remove.
1280 (TLS_INIT_TP): Set gbr register only.
1282 (INIT_THREAD_SELF): Likewise.
1283 (NONTLS_INIT_TP): New.
1284 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1286 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1287 SYSCALL_INST_PAD macro after DO_CALL.
1288 (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1290 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1291 whenever libpthread.so is loaded.
1293 2003-02-08 Andreas Schwab <schwab@suse.de>
1295 * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1296 libpthread.so is loaded.
1298 2003-02-07 Ulrich Drepper <drepper@redhat.com>
1300 * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1301 __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1302 no __NR_vfork definition.
1304 2003-02-07 Jakub Jelinek <jakub@redhat.com>
1306 * tst-popen2.c: New test.
1307 * Makefile (tests): Add tst-popen2.
1308 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1309 whenever libpthread.so is loaded.
1310 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1311 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1312 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1313 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1315 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1316 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1317 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1319 2003-02-05 Ulrich Drepper <drepper@redhat.com>
1321 * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1322 variable for non-libpthread case to the same value the
1323 pthread_once function would use.
1325 2003-02-03 Jakub Jelinek <jakub@redhat.com>
1327 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1328 BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1330 2003-02-04 Andreas Jaeger <aj@suse.de>
1332 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1335 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1337 * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1339 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1341 * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1342 THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1344 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1345 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1346 * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1347 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1348 * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1349 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1350 * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1351 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1352 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1353 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1354 * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1355 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1357 2003-01-27 Martin Schwidefsky <schwidefsky@de.ibm.com>
1359 * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1360 Define TLS versions.
1361 * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1363 * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1364 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1365 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1367 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1368 branch with 32 bit offset.
1369 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1371 2003-01-24 Jakub Jelinek <jakub@redhat.com>
1373 * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1374 as required by TLS ABI.
1375 * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1376 * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1377 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1378 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1380 [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1381 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1382 instead of %g6 for thread pointer.
1383 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1384 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1385 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1387 2003-01-25 Guido Guenther <agx@sigxcpu.org>
1389 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1390 * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1392 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1394 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1395 reference to __fork.
1397 2003-01-17 Richard Henderson <rth@redhat.com>
1399 * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1400 (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1401 (TLS_PRE_TCB_SIZE): New.
1402 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1403 new ia64-style thread pointer layout.
1404 (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1405 (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1406 * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1409 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1411 * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1413 (NONTLS_INIT_TP): Revert last change.
1414 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1415 offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1417 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1419 * pthread.c (_pthread_initialize_minimal): Use
1420 GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1421 been already initialized.
1423 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1425 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1428 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1430 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1431 __libc_lock_init_recursive): Initialize fields directly.
1433 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1435 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1436 __fork to be far away from __vfork ifndef SHARED.
1437 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1439 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1440 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1441 Add a missing instruction.
1442 * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1443 branch to __fork even if __NR_vfork is not defined.
1445 2003-01-14 Ulrich Drepper <drepper@redhat.com>
1447 * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1450 2003-01-14 Steven Munroe <sjmunroe@us.ibm.com>
1452 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1454 2003-01-14 Jakub Jelinek <jakub@redhat.com>
1456 * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1458 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1460 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1461 unterminated string literals.
1462 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1464 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1466 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1467 (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from
1468 PSEUDO_END to PSEUDO.
1469 (PSEUDO_END): Remove.
1470 (SINGLE_THREAD_P): Save an instruction.
1471 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1472 parameter to SINGLE_THREAD_P call.
1473 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1476 2003-01-10 Andreas Schwab <schwab@suse.de>
1478 * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1480 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1482 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1483 backchain in pseudo_cancel. Minor code improvements.
1484 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1487 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1489 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1490 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1492 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1494 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1496 2002-01-09 Richard Henderson <rth@redhat.com>
1498 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1499 ret follows pseudo, and thus avoid branch-to-branch in cancel
1500 case. Use SYSCALL_ERROR_LABEL.
1502 2003-01-11 Philip Blundell <philb@gnu.org>
1504 * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1505 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1506 Correctly unstack lr.
1507 (UNDOARGS_5): Fix ordering of pushes and pops.
1508 (SINGLE_THREAD_P_PIC): New.
1509 (SINGLE_THREAD_P_INT): New.
1510 (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it
1512 (PSEUDO): Use SINGLE_THREAD_P_INT.
1514 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1516 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1518 2003-01-11 Jakub Jelinek <jakub@redhat.com>
1520 * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1521 [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1522 TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1523 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1524 INIT_THREAD_SELF): Define.
1525 [HAVE_TLS_SUPPORT]: Include descr.h.
1526 (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1527 struct _pthread_descr_struct.
1528 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1529 THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1531 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1533 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1535 (__pthread_initialize_manager): Rename tcb to mgr.
1536 Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1537 _pthread_descr) below tcbp, otherwise to tcbp.
1538 * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1539 new_thread to be below _dl_allocate_tls (). Adjust new_thread back
1540 before freeing. Fix clone arguments if report_events and USE_TLS.
1541 (pthread_free): Adjust th back before freeing.
1543 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
1545 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1546 * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1547 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1549 2003-01-09 Jakub Jelinek <jakub@redhat.com>
1551 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1552 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1553 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1554 [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1555 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1556 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1557 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1558 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1559 * tst-popen.c: New test.
1560 * Makefile (tests): Add tst-popen.
1562 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1564 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1565 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1567 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1569 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1570 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
1572 2003-01-06 Philip Blundell <philb@gnu.org>
1574 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1576 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1578 * internals.h (LIBC_CANCEL_HANDLED): Define.
1579 * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1580 * signals.c (LIBC_CANCEL_HANDLED): Add.
1581 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1582 * tst-cancel-wrappers.sh: Remove all exceptions.
1584 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1586 2003-01-05 Andreas Schwab <schwab@suse.de>
1588 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1591 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1593 (CENABLE): Likewise.
1594 (CDISABLE): Likewise.
1596 2003-01-05 Ulrich Drepper <drepper@redhat.com>
1598 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1599 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1601 * Makefile (libc.so-no-z-defs): Define to yes.
1603 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1605 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1606 (tcbhead_t): Add multiple_threads member.
1607 (TLS_INIT_TP_EXPENSIVE): Define.
1608 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1609 strings. Remove unused code.
1610 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1612 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1614 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1615 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1617 2003-01-04 Jakub Jelinek <jakub@redhat.com>
1619 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1620 even if NOT_IN_libc is defined.
1622 2003-01-05 Jakub Jelinek <jakub@redhat.com>
1624 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1625 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1626 * sysdeps/s390/Makefile: New file.
1627 * sysdeps/s390/tcb-offsets.sym: New file.
1628 * sysdeps/s390/tls.h: New file.
1630 2003-01-03 Richard Henderson <rth@redhat.com>
1632 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1634 2003-01-03 Andreas Jaeger <aj@suse.de>
1636 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1638 2003-01-03 Jakub Jelinek <jakub@redhat.com>
1640 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1642 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1644 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1647 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1649 * internals.h (struct pthread_functions): Rename
1650 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1651 * pthread.c (pthread_functions): Adjust.
1652 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1653 pthread_cond_*@GLIBC_2.0 compatibility symbols.
1654 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1655 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1656 and pthread_cond_wait.
1658 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1660 (pthread_cond_t): Add __align member, shorten __padding.
1661 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1662 __padding and __align too.
1664 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1666 * sysdeps/pthread/sigaction.c: New file.
1667 * sysdeps/unix/sysv/linux/raise.c: New file.
1668 * sysdeps/unix/sysv/linux/sigwait.c: New file.
1669 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1670 weak_extern with #ifndef SHARED.
1671 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1673 * signals.c (__sigaction): Renamed to...
1674 (__pthread_sigaction): ... this.
1675 (__sigaction): New strong alias, #ifdef SHARED only.
1676 (sigaction): Protect with #ifdef SHARED.
1677 (sigwait): Renamed to...
1678 (__pthread_sigwait): ... this.
1679 (sigwait): New strong alias, #ifdef SHARED only.
1680 (raise): Renamed to...
1681 (__pthread_raise): ... this.
1682 (raise): New strong alias, #ifdef SHARED only.
1683 * internals.h (__pthread_sigaction, __pthread_sigwait,
1684 __pthread_raise): New prototypes.
1685 (struct pthread_functions): Add ptr_pthread_sigaction,
1686 ptr_pthread_sigwait, ptr_pthread_raise.
1687 * pthread.c (pthread_functions): Renamed to...
1688 (__pthread_functions): ... this. No longer static, no longer
1689 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1690 and ptr_pthread_raise.
1691 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1692 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1693 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1694 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1696 * Makefile (tests, tests-static): Add tst-cancel-static.
1697 * tst-cancel-static.c: New test.
1699 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1701 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1703 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1705 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1706 * condvar.c: Add symbol versioning. The compatibility versions
1707 are the same as the change in the interface does not effect this
1709 * Versions [libpthread]: Add definitions for new pthread_cond_*
1710 interfaces for version GLIBC_2.3.2.
1712 2002-12-31 Ulrich Drepper <drepper@redhat.com>
1714 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1716 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1717 for __register_atfork.
1719 2002-12-31 Jakub Jelinek <jakub@redhat.com>
1721 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1722 ASSEMBLER test macro.
1723 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1724 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1725 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1726 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1727 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1728 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1730 * sysdeps/pthread/errno-loc.c (__errno_location): Add
1732 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1733 * sysdeps/pthread/res-state.c (__res_state): Likewise.
1734 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1735 __libc_current_sigrtmax): Likewise.
1736 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1737 __libc_internal_tsd_set, __libc_internal_tsd_address,
1738 __libc_alloca_cutoff.
1739 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1740 __libc_internal_tsd_set, __libc_internal_tsd_address.
1742 * sysdeps/pthread/list.h: Remove assert.h include.
1743 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1745 * sysdeps/pthread/list.h: New file.
1746 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1747 * sysdeps/unix/sysv/linux/fork.c: New file.
1748 * sysdeps/unix/sysv/linux/fork.h: New file.
1749 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1750 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1751 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1752 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1753 * sysdeps/unix/sysv/linux/Makefile: New file.
1754 * sysdeps/unix/sysv/linux/Versions: New file.
1755 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1756 (__pthread_cleanup_upto): ...this. Add targetframe argument,
1757 use it instead of currentframe. No longer static.
1758 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1759 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1760 (struct pthread_functions): Add ptr_pthread_fork,
1761 ptr_pthread_cleanup_upto.
1762 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1763 ptr_pthread_cleanup_upto.
1764 * ptfork.c: Include fork.h.
1765 (struct handler_list, struct handler_list_block): Remove.
1766 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1767 pthread_atfork_child): Remove.
1768 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1769 (__pthread_fork): New function.
1770 (__fork, __vfork): Call __libc_fork.
1771 * Makefile (libpthread-routines): Add old_pthread_atfork.
1772 (libpthread-nonshared): Add pthread_atfork.
1773 (others): Depend on $(objpfx)libpthread_nonshared.a.
1774 ($(objpfx)libpthread_nonshared.a): New rule.
1775 (install): Depend on $(inst_libdir)/libpthread.so.
1776 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1778 (tests): Depend on libpthread_nonshared.a too.
1779 * old_pthread_atfork.c: New file.
1780 * pthread_atfork.c: New file.
1781 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1784 2002-12-30 Jakub Jelinek <jakub@redhat.com>
1786 * forward.c: Make all functions available by default again. It
1787 caused too much trouble.
1788 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1789 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1790 ptr___pthread_attr_init_2_*.
1791 * pthread.c (pthread_functions): Adjust.
1793 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1795 * libc_pthread_init.c (__libc_pthread_init): Remove
1796 MULTIPLE_THREADS_OFFSET check.
1797 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1798 (SYSINFO_OFFSET): Remove.
1799 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1801 * sysdeps/i386/tcb-offsets.sym: New file.
1802 * sysdeps/pthread/tcb-offsets.h: New file.
1803 * sysdeps/sparc/sparc32/tls.h: Removed.
1804 * sysdeps/sparc/sparc64/tls.h: Move...
1805 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
1806 * sysdeps/sparc/Makefile: New file.
1807 * sysdeps/sparc/tcb-offsets.sym: New file.
1808 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1809 * sysdeps/ia64/Makefile: New file.
1810 * sysdeps/ia64/tcb-offsets.sym: New file.
1811 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1812 (MULTIPLE_THREADS_OFFSET): Remove.
1813 Replace defined MULTIPLE_THREADS_OFFSET
1814 with defined FLOATING_STACKS && USE___THREAD.
1815 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1816 (MULTIPLE_THREADS_OFFSET): Remove.
1817 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1818 (MULTIPLE_THREADS_OFFSET): Remove.
1819 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1820 (MULTIPLE_THREADS_OFFSET): Remove.
1821 * pthread.c (__pthread_initialize_manager): Remove
1822 MULTIPLE_THREADS_OFFSET cbeck.
1824 * tst-cancel-wrappers.sh: Add line continuations.
1826 2002-12-27 Jakub Jelinek <jakub@redhat.com>
1828 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1829 and bits/libc-lock.h.
1830 (__libc_internal_tsd_get, __libc_internal_tsd_set,
1831 __libc_internal_tsd_address): Remove.
1832 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1833 __pthread_internal_tsd_set): New weak_externs.
1834 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1835 using __libc_maybe_call2.
1836 (__libc_tsd_key_t): Move to ...
1837 * descr.h (__libc_tsd_key_t): ...here.
1838 Remove bits/libc-tsd.h include.
1839 * sysdeps/pthread/errno-loc.c: New file.
1840 * sysdeps/pthread/herrno-loc.c: New file.
1841 * sysdeps/pthread/res-state.c: New file.
1842 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1843 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1844 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
1845 of THREAD_[SG]ETMEM.
1846 * specific.c (libc_internal_tsd_set): Renamed to...
1847 __pthread_internal_tsd_set. Remove static.
1848 (libc_internal_tsd_get): Renamed to...
1849 __pthread_internal_tsd_get. Remove static.
1850 (libc_internal_tsd_address): Renamed to...
1851 __pthread_internal_tsd_address. Remove static.
1852 (__libc_internal_tsd_set, __libc_internal_tsd_get,
1853 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1854 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1856 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1857 __pthread_internal_tsd_address): New prototypes.
1858 (struct pthread_functions): Add
1859 ptr_pthread_internal_tsd_([sg]et|address) fields.
1860 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1861 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1862 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1863 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1864 * alloca_cutoff.c: New file.
1865 * no-tsd.c: Removed.
1866 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
1867 * pt-system.c (system): Remove cancellation handling.
1868 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1869 cancellation routines.
1871 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1872 (tcbhead_t): Add sysinfo field.
1873 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1874 (TLS_INIT_TP): Use INIT_SYSINFO.
1875 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1876 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1877 (MULTIPLE_THREADS_OFFSET): Adjust.
1878 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1879 (MULTIPLE_THREADS_OFFSET): Likewise.
1880 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1881 (MULTIPLE_THREADS_OFFSET): Likewise.
1882 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1883 (MULTIPLE_THREADS_OFFSET): Likewise.
1884 * descr.h: Include stdint.h.
1885 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1887 2002-12-22 Jakub Jelinek <jakub@redhat.com>
1889 * libc_pthread_init.c: Include stdlib.h.
1890 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1891 (TLS_INIT_TP_EXPENSIVE): Define.
1892 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1893 __libc_maybe_call2): In _LIBC check SHARED define.
1894 * sysdeps/ia64/tls.h: New file.
1895 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1896 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1897 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1898 * sysdeps/sparc/sparc32/tls.h: New file.
1899 * sysdeps/sparc/sparc64/tls.h: New file.
1900 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1901 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1902 * Makefile (tests): Add tst-cancel[1-6].
1903 (tests-reverse): Add tst-cancel5.
1904 Link libc.so before libpthread.so for tests-reverse.
1905 * tst-cancel1.c: New file.
1906 * tst-cancel2.c: New file.
1907 * tst-cancel3.c: New file.
1908 * tst-cancel4.c: New file.
1909 * tst-cancel5.c: New file.
1910 * tst-cancel6.c: New file.
1912 2002-12-27 Andreas Schwab <schwab@suse.de>
1914 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1916 2002-12-22 Roland McGrath <roland@redhat.com>
1918 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1920 2002-12-21 Ulrich Drepper <drepper@redhat.com>
1922 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
1923 Reported by Art Hass <ahaas@airmail.net>.
1925 2002-12-19 Jakub Jelinek <jakub@redhat.com>
1927 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1928 Use return 0 as 6th argument to FORWARD4.
1930 2002-12-18 Jakub Jelinek <jakub@redhat.com>
1932 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
1933 define if __ASSUME_LDT_WORKS > 0.
1934 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
1935 struct member access if !FLOATING_STACKS.
1936 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1938 2002-12-18 Jakub Jelinek <jakub@redhat.com>
1940 * internals.h (__pthread_thread_self): New prototype.
1941 (struct pthread_functions): Add ptr_pthread_thread_self field.
1942 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
1943 (__pthread_thread_self): New function.
1944 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
1945 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
1946 use thread_self() directly if not FLOATING_STACKS.
1948 2002-12-18 Jakub Jelinek <jakub@redhat.com>
1950 * sysdeps/x86_64/pt-machine.h: Guard most of the header
1951 with #ifndef __ASSEMBLER__.
1952 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
1953 pthread_attr_init_2_0 use.
1955 2002-12-17 Jakub Jelinek <jakub@redhat.com>
1957 * wrapsyscall.c: Removed.
1959 * Makefile (distribute): Add tst-cancel-wrappers.sh.
1960 (routines): Remove weaks. Add forward,
1961 libc_pthread_init, libc-cancellation.
1962 (shared-only-routines): Remove weaks. Add forward.
1963 (libpthread-routines): Remove wrapsyscall.
1964 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
1965 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
1966 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
1967 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
1968 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
1969 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
1970 (libpthread-shared-only-routines): Add pt-allocrtsig.
1971 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1972 ($(objpfx)tst-cancel-wrappers.out): New rule.
1973 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
1975 (__libc_maybe_call): In libpthread.* don't check for existance
1977 (__libc_maybe_call2): Define.
1978 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
1979 __libc_lock_trylock, __libc_lock_unlock): Use it.
1980 * sysdeps/pthread/flockfile.c: New file.
1981 * sysdeps/pthread/ftrylockfile.c: New file.
1982 * sysdeps/pthread/funlockfile.c: New file.
1983 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1984 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
1985 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
1986 * libc-cancellation.c: New file.
1987 * forward.c: New file.
1988 * libc_pthread_init.c: New file.
1989 * pt-system.c: New file.
1990 * pthread.c: Remove locale.h.
1991 (__pthread_manager_thread): Initialize multiple_threads.
1992 (__pthread_multiple_threads): Declare.
1993 (pthread_functions): New variable.
1994 (__pthread_initialize_minimal): Remove __uselocale call.
1995 Call __libc_pthread_init.
1996 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
1997 initial thread's multiple_threads and __libc_multiple_threads.
1998 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
2000 (pthread_setschedparam, pthread_getschedparam): Rename to __
2001 prefixed variants. Add strong_alias.
2002 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
2003 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
2004 (init_rtsigs): Use __libc_current_sigrtmin_private.
2005 (pthread_initialize): Only call init_rtsigs if
2006 !__ASSUME_REALTIME_SIGNALS.
2007 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2008 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2009 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2010 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2011 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2012 __pthread_attr_getinheritsched, __pthread_attr_setscope,
2013 __pthread_attr_getscope, __pthread_cond_init,
2014 __pthread_cond_destroy, __pthread_cond_wait,
2015 __pthread_cond_signal, __pthread_cond_broadcast,
2016 __pthread_condattr_init, __pthread_condattr_destroy,
2017 __pthread_equal, __pthread_getschedparam,
2018 __pthread_setschedparam, __pthread_setcancelstate,
2019 __pthread_setcanceltype, __pthread_enable_asynccancel,
2020 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2021 (__pthread_mutex_init, __pthread_mutex_destroy,
2022 __pthread_mutex_lock, __pthread_mutex_unlock,
2023 __pthread_mutex_trylock): Likewise.
2025 (struct pthread_functions): New type.
2026 (__libc_pthread_functions): New variable.
2027 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2028 * descr.h (struct _pthread_descr_struct): Add
2029 p_header.data.multiple_threads field.
2030 * manager.c (pthread_handle_create): Initialize multiple_threads.
2031 * cancel.c (__pthread_enable_asynccancel,
2032 __pthread_disable_asynccancel): New functions.
2033 (__pthread_provide_wrappers): Remove.
2034 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2035 prefixed variants. Add strong_alias.
2036 * condvar.c (pthread_cond_init, pthread_cond_destroy,
2037 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2038 pthread_condattr_init, pthread_condattr_destroy): Likewise.
2039 * join.c (pthread_exit): Likewise.
2040 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2041 pthread_attr_getdetachstate, pthread_attr_setschedparam,
2042 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2043 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2044 pthread_attr_getinheritsched, pthread_attr_setscope,
2045 pthread_attr_getscope): Likewise.
2046 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2047 __pthread_mutex_lock, __pthread_mutex_unlock,
2048 __pthread_mutex_trylock): Add hidden_def.
2049 * Versions (libc): Add __libc_pthread_init,
2050 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2051 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2052 * lockfile.c: Remove some USE_IN_LIBIO guards.
2053 (__pthread_provide_lockfile): Remove.
2054 * pt-allocrtsig.c: New file.
2055 * tst-cancel-wrappers.sh: New test.
2057 2002-12-15 Ulrich Drepper <drepper@redhat.com>
2059 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2060 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2061 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2062 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2064 2002-12-10 Ulrich Drepper <drepper@redhat.com>
2066 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2067 weak. There is no reason for that.
2068 (CANCELABLE_SYSCALL_VA): Likewise.
2070 2002-12-09 Ulrich Drepper <drepper@redhat.com>
2072 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2073 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2074 * Versions: Export creat, poll, pselect, readv, select, sigpause,
2075 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2076 libpthread in version GLIBC_2.3.2.
2078 2002-12-06 Ulrich Drepper <drepper@redhat.com>
2080 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2082 2002-12-05 Roland McGrath <roland@redhat.com>
2084 * pthread.c (__pthread_initialize_minimal)
2085 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2086 TCB if the dynamic linker didn't do it at startup.
2088 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2090 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2092 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2093 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2095 2002-12-03 Roland McGrath <roland@redhat.com>
2097 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2098 from dynamic linker internal cell to new libc cell.
2100 2002-11-28 Roland McGrath <roland@redhat.com>
2102 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2103 before other headers, so FLOATING_STACKS is not defined wrongly.
2105 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2106 even if [! FLOATING_STACKS].
2107 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2108 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2109 dl_osversion >= 2.3.99 and fatal if not.
2110 (TLS_DO_MODIFY_LDT): Use it.
2112 2002-11-28 Ulrich Drepper <drepper@redhat.com>
2114 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2115 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
2116 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2118 2002-11-19 Ulrich Drepper <drepper@redhat.com>
2120 * Versions (libc: GLIBC_2.0): Remove names of functions which are
2121 not defined in libc.
2122 * Makefile (shared-only-routines): Add weaks.
2123 * weaks.c: Remove functions which are not exported from libc.so.
2125 2002-11-14 Roland McGrath <roland@redhat.com>
2127 * libc-tsd.c: New file.
2128 * Makefile (distribute): Add it.
2129 (libc-link.so): New variable.
2130 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2131 (libc-ok-for-link): New variable.
2132 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2133 libc-ok-for-link to $(use-thread).
2134 [$(libc-ok-for-link) = no]
2135 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2136 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2138 (generated): Append them.
2139 (extra-objs): Append libc-tsd.os.
2141 * libc-tls-loc.c: New file.
2142 * Makefile (libpthread-routines): Add it.
2144 2002-11-14 Andreas Schwab <schwab@suse.de>
2146 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2149 2002-11-13 Roland McGrath <roland@redhat.com>
2151 * Examples/ex6.c (main): Improve error reporting.
2153 2002-11-04 Ulrich Drepper <drepper@redhat.com>
2155 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2156 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
2158 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2160 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2162 2002-10-22 Jakub Jelinek <jakub@redhat.com>
2164 * manager.c (pthread_start_thread): Call __uselocale even
2165 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
2167 2002-10-17 Roland McGrath <roland@redhat.com>
2169 * Makefile (unload): Don't link in libpthread.so.
2170 ($(objpfx)unload.out): Do depend on it.
2171 * unload.c (main): Improve error reporting.
2173 2002-10-09 Roland McGrath <roland@redhat.com>
2175 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2176 Under [__PIC__], call the function via the pointer fetched for
2177 comparison rather than a call by name that uses the PLT.
2178 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2179 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2180 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2181 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2182 (__libc_key_create, __libc_getspecific, __libc_setspecific)
2183 (__libc_atfork): Use it.
2185 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2186 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2187 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2188 (ld: GLIBC_PRIVATE): Set removed.
2190 2002-10-11 Ulrich Drepper <drepper@redhat.com>
2192 * sysdeps/unix/sysv/linux/execve.c: New file.
2194 2002-10-09 Jakub Jelinek <jakub@redhat.com>
2196 * no-tsd.c: Include stdlib.h.
2198 2002-10-07 Jakub Jelinek <jakub@redhat.com>
2200 * sysdeps/unix/sysv/linux/allocalim.h: New file.
2201 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2203 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2204 Pass stack size to caller.
2205 (pthread_handle_create): Set p_alloca_cutoff.
2206 * pthread.c (__pthread_initial_thread): Use C99 designated
2207 initializers. Set p_alloca_cutoff.
2208 (__pthread_manager_thread): Likewise.
2209 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2211 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2213 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2215 * specific.c (__libc_alloca_cutoff): New function.
2216 * no-tsd.c (__libc_alloca_cutoff): New function.
2217 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2220 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2222 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2223 * sysdeps/sh/tls.h: Likewise.
2224 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2226 2002-09-29 Jakub Jelinek <jakub@redhat.com>
2228 * sysdeps/pthread/tst-timer.c (main): Clear
2229 SIGEV2.sigev_notify_attributes.
2231 2002-09-29 Ulrich Drepper <drepper@redhat.com>
2233 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2234 INLINE_SYSCALL for set_thread_area syscall.
2236 2002-09-28 Roland McGrath <roland@redhat.com>
2238 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2239 Don't call setrlimit, since we did no prior bogon we need to undo.
2241 2002-09-27 Roland McGrath <roland@redhat.com>
2243 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2245 2002-09-24 Roland McGrath <roland@redhat.com>
2247 * sysdeps/x86_64/tls.h: New file.
2249 2002-09-23 Roland McGrath <roland@redhat.com>
2251 * Examples/ex13.c (dump_mut): int -> size_t for counter.
2253 2002-09-18 Bruno Haible <bruno@clisp.org>
2255 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2256 an unexpected error code.
2258 * internals.h (__pthread_message): Add const to first parameter type.
2259 * pthread.c (__pthread_message): Likewise.
2261 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2263 2002-09-17 Roland McGrath <roland@redhat.com>
2265 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2266 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2267 offset (positive or negative) relative to the thread struct.
2268 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2270 2002-09-12 Jakub Jelinek <jakub@redhat.com>
2272 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2273 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2274 Replace /usr/lib/crt[in].o with crt[in].o too.
2276 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
2278 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2280 2002-09-04 Bruno Haible <bruno@clisp.org>
2282 * pthread.c: Include <sys/time.h>.
2283 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2284 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2285 * Makefile (distribute): Add smp.h to the list.
2287 2002-09-04 Bruno Haible <bruno@clisp.org>
2289 * sysdeps/alpha/pt-machine.h: Choose different include file location
2290 on non-Linux platforms.
2292 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2293 (open, open64): Change va_arg argument type to the integral type to
2294 which mode_t promotes.
2296 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2297 the structure of 'struct sigevent'.
2299 * errno.c (__errno_location, __h_errno_location, __res_state):
2300 Use prototype function definitions.
2302 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
2304 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2305 * sysdeps/powerpc/pt-machine.h: moved to...
2306 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2307 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2309 2002-09-02 Roland McGrath <roland@redhat.com>
2311 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2313 2002-09-01 Roland McGrath <roland@redhat.com>
2315 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2316 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2318 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2319 (__libc_internal_tsd_address): Declare it.
2320 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2321 __libc_internal_tsd_address.
2322 * specific.c (libc_internal_tsd_address): New function.
2323 (__libc_internal_tsd_address): New variable.
2324 * no-tsd.c (__libc_internal_tsd_address): New variable.
2326 2002-08-31 Ulrich Drepper <drepper@redhat.com>
2328 * Makefile: Don't use rule for crt%.o, spell it out as rules for
2331 2002-08-30 Roland McGrath <roland@redhat.com>
2333 * Makefile (extra-objs, omit-deps): Add crtn.
2334 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2335 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2336 ($(objpfx)crtn.S): New target.
2337 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2338 (generated): Add crtn.S.
2340 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2341 crtn.o pathname too.
2343 2002-08-30 Jakub Jelinek <jakub@redhat.com>
2345 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2348 2002-08-30 Roland McGrath <roland@redhat.com>
2350 * tst-static-locale.c: New file.
2351 * Makefile (tests, tests-static): Add it.
2353 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
2355 * spinlock.c (__pthread_lock): Fix spurious wakeup
2356 handling. Don't clear lowest bit of list pointer as sign the thread
2357 is still on the wait list. Don't restart after spurious wakeup
2358 with spinning to get the lock.
2359 (__pthread_unlock): Take set lowest bit into account when handling
2360 pointer to list elements.
2361 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2363 2002-08-28 Roland McGrath <roland@redhat.com>
2365 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2367 2002-08-28 Jakub Jelinek <jakub@redhat.com>
2369 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2370 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2371 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2373 2002-08-28 Ulrich Drepper <drepper@redhat.com>
2375 * sysdeps/pthread/timer_routines.c (thread_func): Change return
2376 type to void and add casts in use to avoid warnings with all gcc
2379 2002-08-08 Jakub Jelinek <jakub@redhat.com>
2381 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2383 * manager.c (__pthread_handles): Remove.
2384 * pthandles.c: New file.
2385 * pthread.c (__pthread_initialize_minimal): Initialize
2386 __pthread_handles[0] and __pthread_handles[1].
2387 * Makefile (libpthread-routines): Add pthandles (must be last).
2389 2002-08-26 Brian Youmans <3diff@gnu.org>
2391 * Examples/ex10.c: Corrected version number in Lesser GPL copying
2392 permission notice from 2 to 2.1.
2393 * Examples/ex11.c: Likewise.
2394 * Examples/ex13.c: Likewise.
2395 * Examples/ex8.c: Likewise.
2396 * Examples/ex9.c: Likewise.
2397 * barrier.c: Likewise.
2398 * events.c: Likewise.
2399 * lockfile.c: Likewise.
2400 * no-tsd.c: Likewise.
2401 * pt-machine.c: Likewise.
2402 * ptclock_gettime.c: Likewise.
2403 * ptclock_settime.c: Likewise.
2404 * rwlock.c: Likewise.
2405 * sysdeps/alpha/pspinlock.c: Likewise.
2406 * sysdeps/alpha/pt-machine.h: Likewise.
2407 * sysdeps/arm/pspinlock.c: Likewise.
2408 * sysdeps/arm/pt-machine.h: Likewise.
2409 * sysdeps/cris/pspinlock.c: Likewise.
2410 * sysdeps/cris/pt-machine.h: Likewise.
2411 * sysdeps/hppa/pspinlock.c: Likewise.
2412 * sysdeps/hppa/pt-machine.h: Likewise.
2413 * sysdeps/i386/i686/pt-machine.h: Likewise.
2414 * sysdeps/i386/pspinlock.c: Likewise.
2415 * sysdeps/i386/pt-machine.h: Likewise.
2416 * sysdeps/i386/useldt.h: Likewise.
2417 * sysdeps/ia64/pspinlock.c: Likewise.
2418 * sysdeps/ia64/pt-machine.h: Likewise.
2419 * sysdeps/m68k/pspinlock.c: Likewise.
2420 * sysdeps/m68k/pt-machine.h: Likewise.
2421 * sysdeps/mips/pspinlock.c: Likewise.
2422 * sysdeps/mips/pt-machine.h: Likewise.
2423 * sysdeps/powerpc/pspinlock.c: Likewise.
2424 * sysdeps/powerpc/pt-machine.h: Likewise.
2425 * sysdeps/pthread/bits/initspin.h: Likewise.
2426 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2427 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2428 * sysdeps/pthread/getcpuclockid.c: Likewise.
2429 * sysdeps/pthread/posix-timer.h: Likewise.
2430 * sysdeps/pthread/timer_create.c: Likewise.
2431 * sysdeps/pthread/timer_delete.c: Likewise.
2432 * sysdeps/pthread/timer_getoverr.c: Likewise.
2433 * sysdeps/pthread/timer_gettime.c: Likewise.
2434 * sysdeps/pthread/timer_routines.c: Likewise.
2435 * sysdeps/pthread/timer_settime.c: Likewise.
2436 * sysdeps/pthread/tst-timer.c: Likewise.
2437 * sysdeps/s390/pspinlock.c: Likewise.
2438 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2439 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2440 * sysdeps/sh/pspinlock.c: Likewise.
2441 * sysdeps/sh/pt-machine.h: Likewise.
2442 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2443 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2444 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2445 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2446 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2447 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2448 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2449 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2450 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2451 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2452 * tststack.c: Likewise.
2453 * unload.c: Likewise.
2454 * weaks.c: Likewise.
2455 * wrapsyscall.c: Likewise.
2457 * sysdeps/pthread/pt-initfini.c: Changed copying
2458 permission notice to Lesser GPL from Library GPL, including the
2459 references in the special exception.
2460 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2461 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2462 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2464 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2466 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2468 2002-08-26 Ulrich Drepper <drepper@redhat.com>
2470 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2471 overflow [PR libc/4244].
2473 2002-08-25 Ulrich Drepper <drepper@redhat.com>
2475 * sysdeps/pthread/timer_routines.c (thread_func): Make the
2476 compiler happy by adding a return statement which will never be
2479 * tst-context.c (main): Cast to long before casting to pointer.
2481 * Examples/ex17.c (main): Use correct format string.
2483 * Examples/ex9.c (thread): Remove incorrect return statement.
2485 2002-08-23 Ulrich Drepper <drepper@redhat.com>
2487 * pthread.c (__linuxthreads_version): New global constant.
2489 2002-08-23 Andreas Jaeger <aj@suse.de>
2491 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2492 as thread specific register.
2493 (testandset): Fix inline asm.
2494 (THREAD_GETMEM): Fix inline asm.
2496 2002-08-22 Roland McGrath <roland@redhat.com>
2498 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2500 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2501 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2502 macro. That chooses whether to reuse %gs value or let kernel set it.
2503 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2504 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2507 2002-08-21 Ulrich Drepper <drepper@redhat.com>
2509 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2510 also to the third definition of this macro.
2512 2002-06-17 Andreas Jaeger <aj@suse.de>
2514 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2517 2002-08-20 Ulrich Drepper <drepper@redhat.com>
2519 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2520 loading/reading segment registers. Some old hardware doesn't
2521 handle the 32-bit instructions as expected.
2522 * sysdeps/i386/tls.h: Likewise.
2524 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2525 renamed to secondcall and use is negated.
2526 (TLS_SETUP_GS_SEGMENT): Likewise.
2527 (TLS_INIT_TP): Likewise.
2528 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2531 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2532 registers. No need to mask upper 16 bits in this case.
2533 * sysdeps/i386/useldt.h: Likewise.
2534 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2535 is the same since the GDT content changed.
2537 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2538 to TLS_SETUP_GS_SEGMENT.
2539 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2540 TLS_DO_SET_THREAD_AREA.
2541 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2542 entry number from %gs value.
2543 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2546 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2547 Pass true to _dl_deallocate_tls.
2548 (pthread_free): Likewise.
2549 * pthread.c (__pthread_initialize_manager): Likewise.
2551 2002-08-19 Ulrich Drepper <drepper@redhat.com>
2553 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2554 computing index from %gs value.
2556 2002-08-16 Roland McGrath <roland@redhat.com>
2558 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2559 register value from entry number properly.
2561 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2562 optimally conditional on [__PIC__].
2563 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2564 without touching errno, and use latest modify_ldt-like interface.
2565 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2566 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2567 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2568 existing %gs value as the segment to set.
2569 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
2570 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2571 by the first thread's early TLS setup.
2573 2002-08-15 Roland McGrath <roland@redhat.com>
2575 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2576 return a value as callers now expect.
2578 2002-08-11 Roland McGrath <roland@redhat.com>
2580 * pthread.c (__pthread_initialize_manager): Initialize
2581 p_header.data.tcb field of manager thread's descriptor.
2582 (__pthread_initialize_minimal): Don't initialize p_header.data.self
2583 field, already done by TLS_INIT_TP.
2585 * manager.c (pthread_handle_create): Move p_header field initializers
2588 2002-08-08 Ulrich Drepper <drepper@redhat.com>
2590 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2592 2002-08-07 Ulrich Drepper <drepper@redhat.com>
2594 * pthread.c (__linuxthreads_initial_report_events): New variable.
2595 (__pthread_initialize_manager): Use it to initialize p_report_events
2597 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2599 2002-08-07 Roland McGrath <roland@redhat.com>
2601 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2602 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2604 2002-08-02 Roland McGrath <roland@redhat.com>
2606 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2607 Add _LIBC_TSD_KEY_LOCALE.
2608 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2609 Call __uselocale to initialize our per-thread locale pointer to
2611 * pthread.c (__pthread_initialize_minimal): Likewise.
2613 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2615 2002-08-02 Ulrich Drepper <drepper@redhat.com>
2617 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2620 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2621 Don't use p_libc_specific element in thread descriptor.
2623 2002-07-30 Roland McGrath <roland@redhat.com>
2625 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2626 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2627 which does the right thing when __thread support is available.
2628 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2629 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2630 `p_h_errno', `p_resp', and `p_res' members.
2631 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2632 Don't initialize `p_errnop' and `p_h_errnop' members.
2633 (__pthread_reset_main_thread): Likewise.
2634 (__pthread_initialize_manager): Likewise.
2635 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2636 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2637 Don't initialize `p_resp' member.
2638 (__pthread_reset_main_thread): Likewise.
2639 * manager.c (pthread_handle_create): Likewise.
2640 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2641 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2642 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2643 * errno.c [USE_TLS && HAVE___THREAD]
2644 (__h_errno_location, __res_state): Don't define these at all.
2646 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2647 (INSTALL_NEW_DTV, GET_DTV): Likewise.
2648 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2650 * weaks.c: Don't include <errno.h> here.
2652 2002-08-01 Roland McGrath <roland@redhat.com>
2654 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2656 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2657 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2658 (TLS_INIT_TP): Use that.
2660 2002-08-02 Jakub Jelinek <jakub@redhat.com>
2662 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2663 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2664 (FREE_THREAD): Avoid modify_ldt if using GDT.
2665 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2667 2002-07-25 Jakub Jelinek <jakub@redhat.com>
2669 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2670 * sysdeps/i386/pt-machine.h: Likewise.
2671 * sysdeps/i386/useldt.h: Likewise.
2673 2002-07-22 Ulrich Drepper <drepper@redhat.com>
2675 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2676 call __libc_setup_tls first.
2677 * Makefile: Actually create tst-signal.out file when running the test.
2678 (tests): Add tststatic.
2679 * Examples/tststatic.c: New file.
2681 2002-07-19 Ulrich Drepper <drepper@redhat.com>
2683 * errno.c (__errno_location): Don't define unless !USE_TLS
2685 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2686 * sysdeps/i386/tls.h: Likewise.
2687 * sysdeps/i386/useldt.h: Likewise.
2688 * sysdeps/i386/i686/pt-machine.h: Likewise.
2690 2002-07-02 H.J. Lu <hjl@gnu.org>
2692 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
2694 * sysdeps/mips/pt-machine.h: Likewise.
2696 2002-07-14 Ulrich Drepper <drepper@redhat.com>
2698 * manager.c (pthread_handle_create): Initialize self-reference in
2701 2002-07-01 Jakub Jelinek <jakub@redhat.com>
2703 * Examples/ex9.c (main): Remove unused th variable.
2705 2002-07-10 Ulrich Drepper <drepper@redhat.com>
2707 * wrapsyscall.c: Add __nanosleep alias.
2708 * Versions (GLIBC_2.2.6): Add __nanosleep.
2709 * bug-sleep.c: New file.
2710 * Makefile (tests): Add bug-sleep.
2712 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
2714 * Examples/ex9.c (main): Use list of children and join them.
2715 (thread): Do not call exit.
2717 2002-06-20 Ulrich Drepper <drepper@redhat.com>
2719 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2720 Unconditionally use the code using spinlock. Use __pthread_release
2722 (wait_node_free): Likewise.
2723 (__pthread_acquire, __pthread_release): Unconditionally define.
2725 2002-06-07 Jakub Jelinek <jakub@redhat.com>
2727 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2729 2002-05-24 Ulrich Drepper <drepper@redhat.com>
2731 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2733 2002-05-21 Ulrich Drepper <drepper@redhat.com>
2735 * sysdeps/pthread/pthread.h (pthread_create): Rename first
2737 (pthread_cancel): Likewise.
2738 * internals.h (__pthread_create_2_1): Likewise.
2739 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2741 2002-05-20 Ulrich Drepper <drepper@redhat.com>
2743 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2744 Patch by Glen Nakamura <gen@flex.com>.
2746 2002-05-03 Ulrich Drepper <drepper@redhat.com>
2748 * signals.c: Move sighandler functions to...
2749 * sighandler.c: ...here. New file.
2750 * signals.c: Move signal handler related type definitions to...
2751 * internals.h: ...here. Add prototypes for signal handlers.
2752 * Makefile (libpthread-routines): Add sighandler.
2753 (CFLAGS-sighandler.c): Add $(exceptions).
2755 2002-04-30 Jakub Jelinek <jakub@redhat.com>
2757 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2759 2002-04-08 Ulrich Drepper <drepper@redhat.com>
2761 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2762 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2763 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2764 based on previous one and not on current time. Count overruns.
2765 Patch by Eric F. Sorton <eric@cctcorp.com>.
2767 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2769 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2771 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2772 if it isn't defined yet.
2773 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2774 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2776 * sysdeps/sh/tls.h: New file.
2778 2002-04-08 Jakub Jelinek <jakub@redhat.com>
2780 * manager.c (__pthread_manager_event): Use self instead of arg
2781 for INIT_THREAD_SELF.
2782 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2783 _pthread_descr_struct) instead of sizeof (*descr).
2785 2002-04-05 Ulrich Drepper <drepper@redhat.com>
2787 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2788 * sysdeps/alpha/pt-machine.h: Likewise.
2789 * sysdeps/arm/pt-machine.h: Likewise.
2790 * sysdeps/cris/pt-machine.h: Likewise.
2791 * sysdeps/hppa/pt-machine.h: Likewise.
2792 * sysdeps/m68k/pt-machine.h: Likewise.
2793 * sysdeps/mips/pt-machine.h: Likewise.
2794 * sysdeps/powerpc/pt-machine.h: Likewise.
2795 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2796 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2797 * sysdeps/sh/pt-machine.h: Likewise.
2798 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2799 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2800 * sysdeps/x86_64/pt-machine.h: Likewise.
2802 2002-04-05 Jakub Jelinek <jakub@redhat.com>
2804 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2805 instead of pthread_mutexattr_setkind_np.
2806 (pthread_mutexattr_gettype): Similarly.
2807 * man/pthread_mutexattr_setkind_np.man: New.
2808 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2810 2002-04-02 Ulrich Drepper <drepper@redhat.com>
2812 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2814 2002-03-22 Jakub Jelinek <jakub@redhat.com>
2816 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2818 2002-03-22 Ulrich Drepper <drepper@redhat.com>
2820 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2822 2002-03-17 Andreas Jaeger <aj@suse.de>
2824 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2826 * sysdeps/alpha/pt-machine.h: Likewise.
2827 * sysdeps/arm/pt-machine.h: Likewise.
2828 * sysdeps/cris/pt-machine.h: Likewise.
2829 * sysdeps/hppa/pt-machine.h: Likewise.
2830 * sysdeps/i386/i686/pt-machine.h: Likewise.
2831 * sysdeps/ia64/pt-machine.h: Likewise.
2832 * sysdeps/m68k/pt-machine.h: Likewise.
2833 * sysdeps/mips/pt-machine.h: Likewise.
2834 * sysdeps/powerpc/pt-machine.h: Likewise.
2835 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2836 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2837 * sysdeps/sh/pt-machine.h: Likewise.
2838 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2839 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2840 * sysdeps/x86_64/pt-machine.h: Likewise.
2842 * internals.h: Move testandset and __compare_and_swap prototypes
2845 2002-03-03 Andreas Jaeger <aj@suse.de>
2847 * errno.c: Include resolv.h to avoid warning.
2849 2002-02-27 Ulrich Drepper <drepper@redhat.com>
2851 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2854 2002-02-23 Ulrich Drepper <drepper@redhat.com>
2856 * attr.c (pthread_getattr_np): Don't take thread descriptor size
2857 into account if USE_TLS.
2858 * manager.c (pthread_handle_create): Free TLS data structures if call
2859 failed. Pass correct stack to clone if USE_TLS.
2860 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2861 * sysdeps/i386/i686/pt-machine.h: Likewise.
2862 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2864 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2865 Add p_stackaddr element #if USE_TLS.
2866 * internals.c: Include <tls.h>.
2867 * manager.c: Integrate creating and handling of thread descriptor
2869 * pthread.c: Likewise.
2870 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2871 Include <linuxthreads/descr.h> only if TLS is really used.
2872 (GET_DTV): New macro.
2873 (TLS_INIT_TP): Initialize self pointer.
2875 2002-02-17 Andreas Schwab <schwab@suse.de>
2877 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2880 2002-02-12 Ulrich Drepper <drepper@redhat.com>
2882 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2883 (INSTALL_DTV): Adjust for being passed pointer to element with length.
2885 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2887 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2889 2002-02-08 Richard Henderson <rth@redhat.com>
2891 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2893 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2895 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2898 2002-02-07 H.J. Lu <hjl@gnu.org>
2900 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2902 (__pthread_spin_lock): Remove ".set noreorder".
2903 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2905 2002-02-05 H.J. Lu <hjl@gnu.org>
2907 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2909 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2910 (__compare_and_swap): Likewise.
2912 2002-02-07 Ulrich Drepper <drepper@redhat.com>
2914 * internals.h: Move declarations/definitions of
2915 __pthread_initial_thread_bos, __pthread_initial_thread,
2916 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2917 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2918 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2920 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2921 Define THREAD_GETMEM accordingly.
2923 2002-02-06 Ulrich Drepper <drepper@redhat.com>
2925 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
2927 * sysdeps/i386/tls.h: Define THREAD_DTV.
2929 2002-02-04 Ulrich Drepper <drepper@redhat.com>
2931 * internals.h: Move thread descriptor definition...
2932 * descr.h.: ...here. New file.
2933 * sysdeps/i386/tls.h: New file.
2935 2002-02-01 H.J. Lu <hjl@gnu.org>
2937 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
2938 different register in the delayed slot. Use branch likely.
2940 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
2941 (__compare_and_swap): Return 0 only when failed to compare. Use
2944 2002-02-01 Jakub Jelinek <jakub@redhat.com>
2946 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
2947 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
2948 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
2949 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
2950 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
2951 * sysdeps/sparc/sparc64/Versions: New file.
2952 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
2954 2002-01-31 Ulrich Drepper <drepper@redhat.com>
2956 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
2957 in SHARED code, use GL(dl_cpuclock_offset).
2959 2002-01-28 Andreas Jaeger <aj@suse.de>
2961 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
2962 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
2964 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
2966 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
2967 (CURRENT_STACK_FRAME): Remove duplicate definition.
2968 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2970 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
2972 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
2975 2002-01-12 Andreas Schwab <schwab@suse.de>
2977 * Makefile (test-srcs): Add tst-signal.
2978 (tests): Run tst-signal.
2979 (distribute): Add tst-signal.sh.
2980 * tst-signal.c, tst-signal.sh: New files.
2982 2002-01-14 Andreas Jaeger <aj@suse.de>
2984 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
2986 2002-01-11 Andreas Schwab <schwab@suse.de>
2988 * signals.c (sighandler): Initialize all elements to SIG_ERR.
2989 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
2991 2002-01-06 Richard Henderson <rth@redhat.com>
2993 * sysdeps/alpha/elf/pt-initfini.c: New file.
2995 2001-12-29 Andreas Jaeger <aj@suse.de>
2997 * Examples/ex9.c: Add noreturn attribute for thread.
2998 * Examples/ex10.c: Likewise.
2999 * Examples/ex13.c (thread_start): Likewise.
3000 * Examples/ex15.c (worker): Likewise.
3002 * Examples/ex18.c: Include unistd.h for prototype of sleep.
3004 2001-12-14 Ulrich Drepper <drepper@redhat.com>
3006 * man/pthread_atfork.man: Adjust description of mutex handling
3007 after fork for current implementation.
3008 * linuxthreads.texi: Likewise [PR libc/2519].
3010 2001-12-13 Andreas Schwab <schwab@suse.de>
3012 * specific.c (pthread_key_delete): Don't contact the thread
3013 manager if no threads have been created yet.
3015 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
3017 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3018 qualifier to be safe.
3020 2001-11-30 Andreas Schwab <schwab@suse.de>
3022 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3023 that self is the manager thread, and initialize the thread
3025 (thread_self_stack) [THREAD_SELF]: New function to find self via
3027 * manager.c (pthread_handle_create): Don't block cancel signal any
3030 2001-11-29 Andreas Jaeger <aj@suse.de>
3032 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3034 (INIT_THREAD_SELF): New.
3035 (THREAD_GETMEM): New.
3037 (THREAD_SETMEM): New.
3038 (THREAD_SETMEM_NC): New.
3039 (FLOATING_STACKS): Define.
3040 (ARCH_STACK_MAX_SIZE): Define.
3042 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
3044 Bugfix to pthread_key_delete. It was iterating over the thread
3045 manager's linked list of threads, behind the thread manager's
3046 back causing a race. The fix is to have the manager iterate over
3047 the threads instead, using a new request type for doing so.
3048 * internals.h (struct pthread_request): New manager request type
3049 REQ_FOR_EACH_THREAD.
3050 * manager.c (pthread_for_each_thread): New function.
3051 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3052 * specific.c (struct pthread_key_delete_helper_args): New type.
3053 (pthread_key_delete_helper): New static function.
3054 (pthread_key_delete): Use the new thread manager
3055 REQ_FOR_EACH_THREAD function to iterate over the threads and set
3056 the delete key slot to a null value in each thread.
3057 * Examples/ex18.c: New test.
3058 * Makefile (tests): Add ex18.
3060 2001-11-22 Wolfram Gloger <wg@malloc.de>
3062 * pthread.c (pthread_onexit_process): Don't call free
3063 after threads have been asynchronously terminated.
3065 * manager.c (pthread_handle_exit): Surround cancellation
3066 of threads with __flockfilelist()/__funlockfilelist().
3068 2001-11-26 Andreas Schwab <schwab@suse.de>
3070 * manager.c (pthread_handle_create): Start the child thread with
3071 the cancel signal blocked, so that it does not handle it before
3072 the thread register is set up. Save errno from failed clone call.
3074 2001-11-15 Ulrich Drepper <drepper@redhat.com>
3076 * sysdeps/i386/i686/Implies: Removed.
3077 * sysdeps/i386/i686/Versions: New file.
3079 2001-10-31 Andreas Jaeger <aj@suse.de>
3081 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3083 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
3085 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3086 to __linuxthreads_pthread_sizeof_descr to match name used by
3087 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3088 linuxthreads_db/td_symbol_list.c.
3090 2001-09-22 Andreas Jaeger <aj@suse.de>
3092 * linuxthreads/tst-context.c: Avoid compile warning.
3094 2001-09-20 Andreas Jaeger <aj@suse.de>
3096 * shlib-versions: Add x86-64.
3098 2001-09-19 Andreas Jaeger <aj@suse.de>
3100 * sysdeps/x86_64/Makefile: New file.
3101 * sysdeps/x86_64/pspinlock.c: New file.
3102 * sysdeps/x86_64/pt-machine.h: New file.
3104 2001-09-12 Jakub Jelinek <jakub@redhat.com>
3106 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3108 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3110 2001-09-11 Ulrich Drepper <drepper@redhat.com>
3111 Wolfram Gloger <wg@malloc.de>
3113 * join.c: Protect all communications from and to manager with
3115 * manager.c: Likewise.
3116 * pthread.c: Likewise.
3117 * smeaphore.c: Likewise.
3119 2001-08-29 Ulrich Drepper <drepper@redhat.com>
3121 * spinlock.c (__pthread_lock): Top max_count value with
3122 MAX_ADAPTIVE_SPIN_COUNT.
3123 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3125 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3128 2001-08-27 Jakub Jelinek <jakub@redhat.com>
3130 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3131 non-opaque type if __USE_UNIX98.
3133 2001-08-26 Jakub Jelinek <jakub@redhat.com>
3135 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3136 non-opaque lock types also if _IO_MTSAFE_IO is defined.
3138 2001-08-23 Roland McGrath <roland@frob.com>
3140 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3141 new first argument, skip the cleanup handler if it's zero.
3142 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3143 (__libc_lock_define_initialized_recursive): Use it.
3144 * sysdeps/pthread/bits/stdio-lock.h: File removed.
3145 The sysdeps/generic file from the main tree now suffices.
3147 2001-08-22 Roland McGrath <roland@frob.com>
3149 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3150 instead of <pthread.h>.
3151 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3152 (_IO_lock_initializer): Add braces.
3153 (_IO_lock_lock): Use __libc_lock_lock_recursive.
3154 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3156 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3157 (__libc_lock_define_initialized_recursive): Use it.
3158 (__libc_lock_init_recursive): Likewise.
3159 (__libc_lock_fini_recursive): Likewise.
3160 (__libc_lock_lock_recursive): Likewise.
3161 (__libc_lock_trylock_recursive): Likewise.
3162 (__libc_lock_unlock_recursive): Likewise.
3163 (__libc_lock_define_recursive): New macro.
3165 2001-08-14 Jakub Jelinek <jakub@redhat.com>
3167 * lockfile.c (__pthread_provide_lockfile): New variable.
3168 * pthread.c (__pthread_require_lockfile): New variable.
3169 * cancel.c (__pthread_require_lockfile): New variable.
3171 2001-07-31 Ulrich Drepper <drepper@redhat.com>
3173 * tst-context.c (threadfct): Initialize context before calling
3176 * Examples/ex17.c: Make sure test thread is around long enough.
3178 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
3180 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3182 2001-07-24 Ulrich Drepper <drepper@redhat.com>
3184 * tst-context.c (main): Print explanation before bailing out
3185 because context handling is not supported.
3187 2001-07-23 Ulrich Drepper <drepper@redhat.com>
3189 * Makefile (tests): Add tst-context.
3190 * tst-context.c: New file.
3192 * sysdeps/pthread/bits/stdio-lock.h: Define
3193 _IO_cleanup_region_start_noarg.
3195 2001-07-23 Jakub Jelinek <jakub@redhat.com>
3197 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3198 (ARCH_STACK_MAX_SIZE): Define.
3199 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3200 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3202 2001-07-19 Jakub Jelinek <jakub@redhat.com>
3204 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3206 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3207 (ARCH_STACK_MAX_SIZE): Define.
3208 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3209 NEED_SEPARATE_REGISTER_STACK.
3211 2001-07-16 Andreas Schwab <schwab@suse.de>
3213 * Makefile (before-compile): Don't add $(objpfx)crti.o.
3214 (omit-deps): Add crti.
3215 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3216 it is filtered out of the link command.
3218 2001-07-16 Ulrich Drepper <drepper@redhat.com>
3220 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3221 to find the right value for __pthread_initial_thread_bos, it's not
3222 used. If not FLOATING_STACKS first run
3223 __pthread_init_max_stacksize.
3225 2001-06-16 H.J. Lu <hjl@gnu.org>
3227 * internals.h: Include <stackinfo.h>.
3229 * attr.c: Don't include <stackinfo.h> here.
3230 * cancel.c: Likewise.
3231 * manager.c: Likewise.
3232 * pthread.c: Likewise.
3233 * ptlongjmp.c: Likewise.
3235 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
3237 * attr.c: Make _STACK_GROWS_UP work.
3238 * internals.h: Likewise.
3239 * manager.c: Likewise.
3240 * pthread.c: Likewise.
3242 2001-06-15 H.J. Lu <hjl@gnu.org>
3244 * pthread.c (__pthread_reset_main_thread): Fix a typo.
3246 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
3248 * semaphore.h: Use struct _pthread_fastlock as an element of
3249 sem_t instead of an identical struct.
3250 * rwlock.c: Remove casts.
3251 * semaphore.c: Likewise.
3253 2001-04-30 Alan Modra <amodra@one.net.au>
3255 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3257 2001-05-25 Bruce Mitchener <bruce@cubik.org>
3259 * linuxthreads.texi: Spelling corrections.
3261 2001-05-25 Ulrich Drepper <drepper@redhat.com>
3263 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3264 returning successfully.
3265 Patch by Gene Cooperman <gene@ccs.neu.edu>.
3267 2001-05-24 Ulrich Drepper <drepper@redhat.com>
3269 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3270 serious work try once whether the lock is uncontested.
3271 Remove duplicate reading of __status before loop.
3272 Change suggested by Hans Boehm <hans_boehm@hp.com>.
3274 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3275 (__pthread_alt_trylock): Likewise.
3277 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
3279 Memory barrier overhaul following line by line inspection.
3280 * mutex.c (pthread_once): Missing memory barriers added.
3281 * pthread.c (__pthread_wait_for_restart_signal,
3282 __pthread_timedsuspend_new, __pthread_restart_new): Added
3283 memory barriers ``just in case'' and for documentary value.
3284 * spinlock.c (__pthread_release): New inline function for releasing
3285 spinlock, to complement __pthread_acquire. Includes memory
3286 barrier prior to assignment to spinlock, and __asm __volatile
3287 dance to prevent reordering or optimization of the spinlock access.
3288 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3289 __pthread_alt_timedlock, __pthread_alt_unlock,
3290 __pthread_compare_and_swap): Updated to use new __pthread_release
3291 instead of updating spinlock directly.
3292 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3293 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3294 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3295 Memory barrier overhaul. Lots of missing memory barriers added,
3296 a couple needless ones removed.
3297 * spinlock.c (__pthread_compare_and_swap): testandset optimization
3298 removed, just calls __pthread_acquire, which has the new read
3299 barrier in it before its testandset.
3301 2001-05-20 Roland McGrath <roland@frob.com>
3303 * Makeconfig: New file, variables used to be in main libc Makeconfig.
3305 2001-05-09 Geoff Keating <geoffk@redhat.com>
3307 * sysdeps/powerpc/pt-machine.h
3308 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3309 (__compare_and_swap): Remove memory barriers.
3310 (__compare_and_swap_with_release_semantics): New function.
3312 2001-04-24 Andreas Jaeger <aj@suse.de>
3314 * wrapsyscall.c: send* and recv* return ssize_t.
3316 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3317 mutex instead of double locking it.
3318 Reported by Pierre Artaud <partaud@sodatec.com>.
3320 2001-04-23 Ulrich Drepper <drepper@redhat.com>
3322 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3323 using #ifdef whether the clock is available.
3324 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3326 * sysdeps/ia64/Versions: New file.
3328 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3329 have to call __gmon_start__ in the libpthread DSO.
3330 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3332 * Makefile (libpthread-routines): Add ptclock_gettime and
3334 * internals.h: Don't use cpuclock-init.h definitions, use
3335 hp-timing.h definitions.
3336 * pthread.c: Likewise.
3337 * manager.c: Likewise.
3338 * ptclock_gettime.c: New file.
3339 * ptclock_settime.c: New file.
3340 * internals.h: Fix parameter type for __pthread_clock_gettime and
3341 __pthread_clock_settime.
3343 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3344 * sysdeps/i386/i586/ptclock_settime.c: Removed.
3345 * sysdeps/i386/i586/Makefile: Removed.
3347 2001-04-22 Ulrich Drepper <drepper@redhat.com>
3349 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3350 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3352 2001-04-21 Andreas Jaeger <aj@suse.de>
3354 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3355 attribute, remove statements that will never be executed.
3356 (thread_func): Remove mutex_unlock call since it's never executed.
3357 (thread_func): Fix comment as suggested by Jakub Jelinek.
3359 * manager.c (__pthread_manager): Add noreturn
3361 (pthread_start_thread): Likewise, remove return statement.
3362 (pthread_start_thread_event): Likewise.
3363 Add noreturn attribute for pthread_handle_exit.
3364 * weaks.c: Add noreturn attribute for pthread_exit.
3366 * internals.h: Add __pthread_clock_gettime and
3367 __pthread_clock_settime prototypes.
3369 2001-04-21 Ulrich Drepper <drepper@redhat.com>
3371 * internals.h: Include <cpuclock-init.h>.
3372 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3373 CPUCLOCK_VARDEF is defined.
3374 * pthread.c (__pthread_initialize_minimal): Initialize
3375 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3376 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3377 for new thread to current CPU clock value.
3379 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3381 * sysdeps/i386/i586/Makefile: New file.
3382 * sysdeps/i386/i586/Versions: New file.
3383 * sysdeps/i386/i586/ptclock_gettime.c: New file.
3384 * sysdeps/i386/i586/ptclock_settime.c: New file.
3385 * sysdeps/i386/i686/Implies: New file.
3387 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3389 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3390 $generated, not $postclean-generated.
3392 2001-04-18 Andreas Jaeger <aj@suse.de>
3394 * Makefile (otherlibs): Added.
3396 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3398 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3400 2001-04-16 Ulrich Drepper <drepper@redhat.com>
3402 * signals.c (sigwait): NSIG is no signal number. Block all
3403 signals while in signal handler for signals in SET.
3404 Patch by Manfred Spraul <manfred@colorfullife.com>.
3406 2001-04-12 Ulrich Drepper <drepper@redhat.com>
3408 * tst-cancel.c: Disable most tests. Add new test where all
3409 cleanup handlers must run.
3410 * Makefile (tests): Add tst-cancel again.
3412 * cancel.c (__pthread_perform_cleanup): Correct condition for
3413 leaving cleanup loop early.
3415 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3416 all the files which use CURRENT_STACK_FRAME.
3417 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3418 __builtin_frame_address.
3419 * sysdeps/i386/i686/pt-machine.h: Likewise.
3421 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3423 * Makefile (tests): Comment out tst-cancel for now.
3425 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
3426 temporary file in object directory.
3427 * Makefile: Don't allow inlining when compiling tst-cancel.c.
3428 Pass $(objpfx) to tst-cancel.
3430 2001-04-11 David S. Miller <davem@redhat.com>
3432 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3433 up closer to user local variables so that new cleanup heuristics work.
3434 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3436 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3438 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3440 (_pthread_cleanup_push_defer): Likewise.
3442 * tst-cancel.c (main): Fix loop printing cleanup output.
3444 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
3446 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3448 (__pthread_spin_trylock): Likewise.
3449 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3451 2001-04-10 Ulrich Drepper <drepper@redhat.com>
3453 * join.c (pthread_exit): Move code to new function __pthread_do_exit
3454 which takes an extra parameter with the current frame pointer.
3455 Call new function with CURRENT_STACK_FRAME.
3456 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
3457 with the new parameter.
3458 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3459 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
3460 this parameter as the initial value the cleanup handler records are
3461 compared against. No active cleanup handler record must have an
3462 address lower than the previous one and the initial record must be
3463 above (below on PA) the frame address passed in.
3464 (pthread_setcancelstate): Call __pthread_do_exit instead of
3466 (pthread_setcanceltype): Likewise.
3467 (pthread_testcancel): Likewise.
3468 (_pthread_cleanup_pop_restore): Likewise.
3469 * condvar.c (pthread_cond_wait): Likewise.
3470 (pthread_cond_timedwait_relative): Likewise.
3471 * manager.c (pthread_start_thread): Likewise.
3472 * oldsemaphore.c (__old_sem_wait): Likewise.
3473 * pthread.c (pthread_handle_sigcancel): Likewise.
3474 * semaphore.c (__new_sem_wait): Likewise.
3475 (sem_timedwait): Likewise.
3476 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3477 to limit the cleanup handlers which get run.
3478 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
3479 for __pthread_perform_cleanup.
3481 * Makefile (tests): Add tst-cancel.
3482 * tst-cancel.c: New file.
3484 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
3486 * sysdeps/cris/pt-machine.h: New file.
3487 * sysdeps/cris/pspinlock.c: New file.
3489 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3491 * shlib-versions: Add case for Linux on CRIS.
3493 2001-03-26 Ulrich Drepper <drepper@redhat.com>
3495 * attr.c (pthread_getattr_np): Correct computation of stack size
3496 for machiens with register stack.
3498 * Examples/ex17.c (main): Correct detection of failed mmap call.
3500 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3502 * pthread.c (__pthread_initialize_manager): Fix a typo.
3504 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3506 * attr.c (__pthread_attr_setstack): Fix alignment check.
3507 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3508 * Makefile (tests): Add ex17 test.
3509 * Examples/ex17.c: New test.
3511 2001-03-20 Ulrich Drepper <drepper@redhat.com>
3513 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3514 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3515 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3517 2001-03-18 Ulrich Drepper <drepper@redhat.com>
3519 * Makefile: When generating DSO link with libc_nonshared.a.
3521 2001-02-26 Jakub Jelinek <jakub@redhat.com>
3523 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3525 2001-02-23 Jakub Jelinek <jakub@redhat.com>
3527 * internals.h (__pthread_init_max_stacksize): New prototype.
3528 * attr.c (__pthread_attr_setstacksize): Call
3529 __pthread_init_max_stacksize if not yet initialized.
3530 * pthread.c (__pthread_init_max_stacksize): New function.
3531 (__pthread_initialize_manager): Call it.
3532 Patch by <dtc@cmucl.cons.org>.
3534 2001-03-16 Ulrich Drepper <drepper@redhat.com>
3536 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3538 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3540 * shlib-versions: Add rule for Linux on 64 bit S/390.
3541 * sysdeps/s390/s390-64/pt-machine.h: New file.
3542 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3544 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3546 * sysdeps/s390/pt-machine.h: Move to...
3547 * sysdeps/s390/s390-32/pt-machine.h: ...here.
3548 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3550 2001-03-15 Ulrich Drepper <drepper@redhat.com>
3552 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3553 * attr.c: Implement pthread_getattr_np.
3554 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3555 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3556 * manager.c (pthread_handle_create): Initialize p_inheritsched.
3558 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3560 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3563 2001-02-20 Hans Boehm <hans_boehm@hp.com>
3565 * manager.c (manager_mask): Removed static vesion. Now always local
3566 to __pthread_manager().
3567 (manager_mask_all): Removed completely.
3568 (__pthread_manager): Remove manager_mask_all initialization.
3569 (pthread_handle_create): Remove code to set and reset signal mask
3570 around __clone2() calls.
3572 2001-02-17 Jakub Jelinek <jakub@redhat.com>
3574 * spinlock.c (__pthread_lock): Force lock->__status to be read from
3575 memory on every spin.
3577 2001-02-10 Andreas Jaeger <aj@suse.de>
3579 * Makefile (extra-objs): New.
3581 2001-02-09 Jakub Jelinek <jakub@redhat.com>
3583 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3584 __pthread_initialize_minimal prototype.
3586 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
3588 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3590 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
3592 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3594 2001-02-06 Ulrich Drepper <drepper@redhat.com>
3596 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3597 broken code. Patch by Jes Sorensen.
3599 2001-02-06 Andreas Jaeger <aj@suse.de>
3601 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3603 * internals.h: ...here.
3605 2001-02-05 Jes Sorensen <jes@linuxcare.com>
3607 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3609 2001-02-02 Ulrich Drepper <drepper@redhat.com>
3611 * Versions: Remove __pthread_initialize_minimal.
3613 2001-02-01 Ulrich Drepper <drepper@redhat.com>
3615 * Makefile: Add rules to build crti.o and make it being used in
3616 building libpthread.so.
3617 * sysdeps/i386/Makefile: New file.
3618 * sysdeps/pthread/pt-initfini.c: New file.
3620 * pthread.c: Cleanups.
3622 2001-01-28 Andreas Jaeger <aj@suse.de>
3624 * oldsemaphore.c (__old_sem_init): Adjust for last change.
3625 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3626 * spinlock.c: Likewise.
3628 2001-01-28 Ulrich Drepper <drepper@redhat.com>
3630 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3631 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3632 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3633 * pthread.c: Likewise.
3634 * spinlock.h: Likewise.
3635 * sysdeps/pthread/pthread.h: Likewise.
3637 2001-01-26 Ulrich Drepper <drepper@redhat.com>
3639 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3640 as struct __pthread_attr_s.
3642 * semaphore.h (sem_t): Cleanup namespace, rename status and
3645 2001-01-13 Jakub Jelinek <jakub@redhat.com>
3647 * pthread.c (pthread_onexit_process): Clear
3648 __pthread_manager_thread_bos after freeing it.
3649 * Makefile (tests): Add ex16.
3650 * Examples/ex16.c: New file.
3652 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3654 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3656 * pthread.c (pthread_exit_process): Rename to...
3657 (pthread_onexit_process): ...this.
3658 (pthread_atexit_process, pthread_atexit_retcode): New.
3659 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3660 and only if HAVE_Z_NODELETE is not defined.
3661 (__pthread_initialize_manager): Register pthread_atexit_retcode
3664 2001-01-11 Ulrich Drepper <drepper@redhat.com>
3666 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3668 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3670 * Makefile (tests): Add ex15.
3671 * Examples/ex15.c: New test.
3673 2001-01-08 Ulrich Drepper <drepper@redhat.com>
3675 * pthread.c (pthread_exit_process): Free memory allocated for
3678 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3680 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3681 (pthread_free): Always unmap the stack. It's safe now that we don't
3682 use MAP_FIXED to allocate stacks.
3684 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3686 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3688 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3690 2000-11-15 Wolfram Gloger <wg@malloc.de>
3692 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3693 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3695 2000-12-27 Andreas Jaeger <aj@suse.de>
3697 * Examples/ex13.c: Make local functions static.
3698 * ecmutex.c: Likewise.
3699 * joinrace.c: Likewise.
3700 * Examples/ex14.c: Likewise.
3702 * Examples/ex2.c: Make local functions static; reformat.
3703 * Examples/ex1.c: Likewise.
3704 * Examples/ex4.c: Likewise.
3705 * Examples/ex5.c: Likewise.
3706 * Examples/ex7.c: Likewise.
3708 * oldsemaphore.c: Add prototypes to shut up GCC.
3709 * pt-machine.c: Likewise.
3711 * weaks.c: Add prototype for pthread_exit.
3713 * internals.h: Add some prototypes, format prototypes and add
3715 Move __libc_waitpid prototype to include/sys/wait.h.
3717 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3718 * mutex.c: Likewise.
3719 * specific.c: Likewise.
3720 * ptfork.c: Likewise.
3722 * lockfile.c: Include internals.h to get prototypes.
3723 * events.c: Likewise.
3724 * sysdeps/alpha/pspinlock.c: Likewise.
3725 * sysdeps/arm/pspinlock.c: Likewise.
3726 * sysdeps/hppa/pspinlock.c: Likewise.
3727 * sysdeps/i386/pspinlock.c: Likewise.
3728 * sysdeps/ia64/pspinlock.c: Likewise.
3729 * sysdeps/m68k/pspinlock.c: Likewise.
3730 * sysdeps/mips/pspinlock.c: Likewise.
3731 * sysdeps/powerpc/pspinlock.c: Likewise.
3732 * sysdeps/s390/pspinlock.c: Likewise.
3733 * sysdeps/sh/pspinlock.c: Likewise.
3734 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3735 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3736 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3738 2000-12-27 Ulrich Drepper <drepper@redhat.com>
3740 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3741 (__pthread_attr_getstack): Return correct address.
3742 Add warnings for using pthread_attr_getstackaddr and
3743 pthread_attr_setstackaddr.
3745 2000-12-26 Ulrich Drepper <drepper@redhat.com>
3747 * Examples/ex6.c (test_thread): Make static.
3748 * Examples/ex12.c (test_thread): Make static and add noreturn
3751 2000-12-18 Jes Sorensen <jes@linuxcare.com>
3753 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3754 and compare_and_swap_with_release_semantics returns int not long.
3756 2000-12-17 Andreas Jaeger <aj@suse.de>
3758 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3760 * sysdeps/arm/pt-machine.h (testandset): Likewise.
3761 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3762 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3763 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3764 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3765 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3767 2000-12-17 Ulrich Drepper <drepper@redhat.com>
3769 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3770 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3772 2000-12-17 Andreas Jaeger <aj@suse.de>
3774 * internals.h: Add prototypes for testandset and
3775 __compare_and_swap to shut up gcc warnings.
3777 2000-12-06 Wolfram Gloger <wg@malloc.de>
3779 * join.c (pthread_detach): Allow case where the thread has already
3782 2000-12-05 Andreas Jaeger <aj@suse.de>
3784 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3785 * sysdeps/mips/pt-machine.h (testandset): Likewise.
3786 (__compare_and_swap): Likewise.
3787 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3789 2000-11-20 Jakub Jelinek <jakub@redhat.com>
3791 * Examples/ex3.c (main): Cast int to long before casting to void *.
3792 (search): Cast void * to long, not int.
3793 * Examples/ex8.c (main, thread): Similarly.
3794 * Examples/ex11.c (main): Similarly.
3795 * Examples/ex14.c (worker, do_test): Similarly.
3796 * ecmutex.c (worker, do_test): Similarly.
3797 (nlocks): Cast to int.
3799 2000-11-08 Bruce Mitchener <bruce@cubik.org>
3801 * linuxthreads.texi: Add documentation for pthreads attributes
3802 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
3803 patch. Document pthread_[sg]etconcurrency(). Mark
3804 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3806 2000-11-07 Ulrich Drepper <drepper@redhat.com>
3808 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3810 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3811 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3813 2000-11-06 Ulrich Drepper <drepper@redhat.com>
3815 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3816 not doing it right now.
3817 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3819 2000-10-30 Ulrich Drepper <drepper@redhat.com>
3821 * Examples/ex4.c (main): Don't use exit() to avoid warning with
3824 2000-10-29 Ulrich Drepper <drepper@redhat.com>
3826 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3827 here. Reported by Bruce Mitchener <bruce@cubik.org>.
3829 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3830 discussing mutexes. (As per the Unix98 name for the API.)
3831 Changes documentation for pthread_mutexattr_setkind_np() and
3832 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3833 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3834 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3835 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3836 Begins to introduce discussion of the ``timed'' mutex type. This
3837 discussion is currently incomplete.
3838 Patch by Bruce Mitchener <bruce@cubik.org>.
3840 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3841 Yutaka Niibe <gniibe@chroot.org>
3843 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3844 has restrictions, use register.
3846 2000-10-23 Andreas Schwab <schwab@suse.de>
3848 * Examples/ex14.c (TIMEOUT): Override default timeout.
3850 2000-10-16 Ulrich Drepper <drepper@redhat.com>
3852 * specific.c: Protect tsd array modification in thread data
3853 structures by getting the thread lock in pthread_key_delete and
3854 __pthread_destroy_specifics.
3855 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3857 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3859 * sysdeps/pthread/bits/initspin.h: New file.
3860 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3861 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3862 (__pthread_alt_init_lock): Likewise.
3863 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3865 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3867 * oldsemaphore.c (__old_sem_init): Release lock with
3868 LT_SPINLOCK_INIT, not zero.
3869 * spinlock.c (__pthread_unlock): Likewise.
3870 (__pthread_alt_lock): Likewise.
3871 (__pthread_alt_timedlock): Likewise.
3872 (__pthread_alt_unlock): Likewise.
3873 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3874 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
3875 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
3876 LT_SPINLOCK_INIT do initialize spinlocks not 0.
3878 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3880 * shlib-versions: Add version definitions for hppa-linux.
3882 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3884 * sysdeps/hppa/pspinlock.c: New file.
3885 * sysdeps/hppa/pt-machine.h: New file.
3886 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3888 2000-10-05 Jakub Jelinek <jakub@redhat.com>
3890 * mutex.c (__pthread_mutex_destroy): Correct test of
3891 busy mutex for mutexes using alternate fastlocks.
3892 Patch by dtc@cmucl.cons.org.
3894 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
3896 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3898 2000-09-28 Ulrich Drepper <drepper@redhat.com>
3900 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3901 test for owner first.
3902 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3904 * cancel.c (pthread_cancel): Don't do anything if cancelation is
3907 2000-09-26 Ulrich Drepper <drepper@redhat.com>
3909 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3910 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3912 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3913 _POSIX_MONOTONIC_CLOCK.
3915 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3918 2000-09-20 Andreas Jaeger <aj@suse.de>
3920 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3921 "testrtsig.h" conditional.
3923 2000-09-11 Ulrich Drepper <drepper@redhat.com>
3925 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
3926 pthread_attr_setstack.
3927 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
3928 pthread_attr_setstack.
3929 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
3931 2000-09-05 Ulrich Drepper <drepper@redhat.com>
3933 * Examples/ex14.c: New file.
3934 * Makefile (tests): Add ex14.
3936 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
3937 mutex. Patch by dtc@cmucl.cons.org.
3939 * ecmutex.c: New file.
3940 * Makefile (tests): Add ecmutex.
3942 2000-09-04 H.J. Lu <hjl@gnu.org>
3944 * attr.c (__pthread_attr_setguardsize): Use page_roundup
3945 instead of roundup to round up to the page size.
3947 2000-09-03 Mark Kettenis <kettenis@gnu.org>
3949 * manager.c (pthread_exited): Correctly report event as TD_REAP
3950 instead of TD_DEATH. Fix comments.
3952 2000-09-03 Ulrich Drepper <drepper@redhat.com>
3954 * spinlock.h (testandset): Add cast to avoid warning.
3955 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
3957 2000-09-02 Andreas Jaeger <aj@suse.de>
3959 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
3962 2000-09-01 Ulrich Drepper <drepper@redhat.com>
3964 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3965 Fix typo in last patch (_mode -> _flags).
3967 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3968 Provide definition which respects _IO_USER_LOCK flag.
3970 2000-08-30 Ulrich Drepper <drepper@redhat.com>
3972 * manager.c (pthread_allocate_stack): Clear descriptor only if not
3975 2000-08-25 Ulrich Drepper <drepper@redhat.com>
3977 * Makefile: Add rules to build and run unload.
3978 * unload.c: New file.
3980 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
3982 * sysdeps/pthread/pthread.h
3983 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
3984 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
3986 2000-08-24 Andreas Jaeger <aj@suse.de>
3988 * Examples/ex13.c: Include <string.h> for strerror prototype and
3989 <stdlib.h> for abort prototype.
3990 (pthr_cond_signal_mutex): Rewrite to silence GCC.
3991 (thread_start): Remove unused variable err.
3992 (main): Silence GCC warnings.
3994 2000-08-22 Andreas Jaeger <aj@suse.de>
3996 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
3998 * Makefile (tests): Add ex13.
4000 2000-08-20 Ulrich Drepper <drepper@redhat.com>
4002 * semaphore.h: Add restrict where required by AGd4.
4003 * sysdeps/pthread/pthread.h: Likewise.
4004 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4006 2000-08-15 Ulrich Drepper <drepper@redhat.com>
4008 * Makefile (tests): Add ex12. Add rule to build it.
4009 * Examples/ex12.c: New file.
4011 2000-08-13 Ulrich Drepper <drepper@redhat.com>
4013 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4014 even though the implementation is not quite complete (but it reports
4015 it). Define _POSIX_MESSAGE_PASSING to -1.
4016 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4018 2000-08-12 Andreas Jaeger <aj@suse.de>
4020 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4022 (__compare_and_swap): Likewise.
4023 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4025 2000-08-10 Ulrich Drepper <drepper@redhat.com>
4027 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4028 p_h_errnop correctly and not to NULL.
4030 2000-08-05 Ulrich Drepper <drepper@redhat.com>
4032 * Banner: Bump version number to 0.9.
4034 2000-08-04 Ulrich Drepper <drepper@redhat.com>
4036 * Makefile (tests): Add tststack. Add rule to build the program.
4037 * tststack.c: New file.
4039 * internals.h: Declare __pthread_max_stacksize.
4040 * pthread.c (__pthread_max_stacksize): New variable.
4041 (__pthread_initialize_manager): Determine __pthread_initialize_manager
4043 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4044 (pthread_allocate_stack): Allow kernel to choose stack address if
4045 FLOATING_STACKS. This also handles variable-sized stacks.
4046 Always allocate stack and guardpage together. Use mprotect to
4047 change guardpage access.
4048 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4049 ARCH_STACK_MAX_SIZE.
4051 * attr.c (__pthread_attr_setstacksize): Also test value against
4054 * manager.c (__pthread_nonstandard_stacks): Define only if
4055 THREAD_SELF is not defined.
4056 (pthread_allocate_stack): Always initialize gardaddr to a correct
4058 (pthread_handle_create): Unmap thread with one call.
4059 (pthread_free): Remove test for initial thread before removing stack.
4060 Unmap stack with one call.
4062 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4063 1 to avoid removing the stack.
4065 2000-07-27 Jes Sorensen <jes@linuxcare.com>
4067 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4068 load of spin lock to prime the cache before the atomic compare and
4069 exchange operation (cmpxchg4). This avoids the spinning on the
4070 cmpxchg4 instruction and reduces movement of the cache line back
4071 and forth between the processors (explanation by Asis K. Mallick
4072 from Intel). This basically makes the implementation operate the
4073 same as the Linux kernel implementation.
4075 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4076 * sysdeps/ia64/pspinlock.c: New file.
4078 2000-08-03 Ulrich Drepper <drepper@redhat.com>
4080 * pthread.c: Move definition of __pthread_set_own_extricate_if...
4081 * spinlock.h: ...here. Remove locking.
4082 * internals.h: Remove __pthread_set_own_extricate_if prototype.
4084 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4085 (rwlock_rd_extricate_func): Don't determine self, let
4086 __pthread_lock do it.
4087 (rwlock_wr_extricate_func): Likewise.
4088 (rwlock_have_already): Optimize *pself handling a bit.
4090 * mutex.c: Use __builtin_expect.
4091 * pthread.c: Likewise.
4093 2000-08-02 Andreas Jaeger <aj@suse.de>
4095 * sysdeps/s390/pspinlock.c: New file.
4096 * sysdeps/s390/pt-machine.h: New file.
4097 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4099 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4101 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4103 * sysdeps/mips/pt-machine.h (testandset): Likewise.
4105 2000-07-26 Andreas Jaeger <aj@suse.de>
4107 * pthread.c: Initialize p_sem_avail.
4109 2000-07-25 Ulrich Drepper <drepper@redhat.com>
4111 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4112 * semaphore.c: Handle spurious wakeups.
4114 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4115 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4117 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4118 (__pthread_wait_for_restart): Likewise.
4120 * condvar.c (pthread_cond_wait): Also check whether thread is
4121 cancelable before aborting loop.
4122 (pthread_cond_timedwait): Likewise.
4124 * signals.c (pthread_sighandler): Remove special code to restrore
4126 (pthread_sighandler_t): Likewise.
4128 2000-07-25 Mark Kettenis <kettenis@gnu.org>
4130 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4131 * pthread.c: Include <resolv.h>.
4132 (_res): Undefine. Add extern declaration.
4134 2000-07-24 Ulrich Drepper <drepper@redhat.com>
4136 * pthread.c (__pthread_initial_thread): Update initializer.
4137 (__pthread_manager_thread): Likewise.
4138 (pthread_initialize): Move setrlimit call to...
4139 (__pthread_initialize_manager): ...here.
4140 (__pthread_reset_main_thread): Reset also soft limit on stack size.
4142 * condvar.c: Handle spurious wakeups. [PR libc/1749].
4143 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4145 2000-07-21 Ulrich Drepper <drepper@redhat.com>
4147 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4148 __compare_and_swap to define testandset.
4149 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4150 Define IMPLEMENT_TAS_WITH_CAS.
4152 2000-07-20 Ulrich Drepper <drepper@redhat.com>
4154 * Makefile: Pass -z nodelete to linker for libpthread.so
4155 generation if it understand this option.
4157 2000-07-18 Mark Kettenis <kettenis@gnu.org>
4159 * manager.c (pthread_handle_create): Remove initialization of
4160 new_thread->p_res._sock.
4162 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
4164 Bugfixes to the variant of the code for machines with no compare
4167 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4168 node was not being properly enqueued, due to failing to update
4169 the lock->__status field.
4171 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4172 being set inappropriately, causing the suspend function to be called
4173 with a null self pointer and crash.
4175 2000-07-18 Ulrich Drepper <drepper@redhat.com>
4177 * spinlock.h (__pthread_alt_trylock): Fix code used if no
4178 compare&swap is available.
4180 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4183 * pthread.c (pthread_initialize): Don't use sysconf to determine
4184 whether the machine has more than one processor.
4186 * spinlock.c (__pthread_alt_timedlock): Add back one of the
4187 removed thread_self calls.
4189 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4191 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4192 __compare_and_swap to compare_and_swap in code which assumes
4193 compare swap is available.
4195 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4197 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4198 bug whereby thr field of waitnode structure would not be correctly
4199 set unless a null self pointer is passed to the functions.
4200 Eliminated redundant calls to thread_self().
4202 2000-07-18 Jakub Jelinek <jakub@redhat.com>
4204 * pthread.c (__pthread_initialize_manager): Lock
4205 __pthread_manager_thread.p_lock before calling clone.
4207 2000-05-05 H.J. Lu <hjl@gnu.org>
4209 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4210 have acquire semantics.
4211 (__compare_and_swap_with_release_semantics): New inline
4213 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4215 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
4217 * manager.c: Fix the problem with signals at startup.
4218 Change the way that thread stacks are allocated on IA64.
4219 Clean up some of the guard page allocation stuff.
4221 1999-12-19 H.J. Lu <hjl@gnu.org>
4223 * internals.h (page_roundup): New.
4224 * attr.c (__pthread_attr_setguardsize); Use page_roundup
4226 * manager.c (pthread_allocate_stack): Make sure guardaddr is
4227 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4230 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
4232 * manager.c (pthread_allocate_stack): Unmap the stack top
4233 if failed to map the stack bottom.
4235 (pthread_free): Fix the guard page.
4237 * pthread.c (pthread_initialize): Set rlimit correctly for
4238 NEED_SEPARATE_REGISTER_STACK.
4240 1999-12-16 H.J. Lu <hjl@gnu.org>
4242 * pthread.c (__pthread_initialize_manager): Pass
4243 __pthread_manager_thread_bos instead of
4244 __pthread_manager_thread_tos to __clone2.
4246 1999-12-16 H.J. Lu <hjl@gnu.org>
4248 * manager.c (pthread_allocate_stack): Correct the calculation
4249 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4252 1999-12-13 H.J. Lu <hjl@gnu.org>
4254 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4255 bit after setting ar.ccv.
4257 1999-12-12 H.J. Lu <hjl@gnu.org>
4259 * manager.c (pthread_allocate_stack): Make the starting
4260 address of the stack bottom page aligned. FIXME: it may
4261 need changes in other places.
4262 (pthread_handle_create): Likewise.
4264 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
4266 * manager.c (pthread_allocate_stack): Handle
4267 NEED_SEPARATE_REGISTER_STACK.
4268 (pthread_handle_create): Likewise.
4269 * pthread.c (__pthread_initialize_manager): Likewise.
4271 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4273 1999-12-02 H.J. Lu <hjl@gnu.org>
4275 * sysdeps/ia64/pt-machine.h: New.
4277 2000-07-13 Ulrich Drepper <drepper@redhat.com>
4279 * wrapsyscall.c: Mark non-__ protected names as weak.
4282 2000-07-12 Bruno Haible <haible@clisp.cons.org>
4284 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4286 2000-07-12 Ulrich Drepper <drepper@redhat.com>
4288 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4289 Add tests also to new alternative spinlock implementation.
4290 * spinlock.h: Likewise.
4291 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4293 2000-07-06 Ulrich Drepper <drepper@redhat.com>
4295 * Version: Export __sigaction.
4296 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
4298 * pthread.c: Use __libc_sigaction instead of __sigaction.
4300 * condvar.c: Implement pthread_condattr_getpshared and
4301 pthread_condattr_setpshared.
4302 * mutex.c: Implement pthread_mutexattr_getpshared and
4303 pthread_mutexattr_setpshared.
4304 * Versions: Export new functions.
4305 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4307 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4308 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4311 2000-07-04 Greg McGary <greg@mcgary.org>
4313 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4314 pragmas. Include bp-sym.h only if _LIBC.
4316 2000-07-04 Ulrich Drepper <drepper@redhat.com>
4318 * spinlock.c (__pthread_unlock): Properly place write barrier.
4319 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4321 2000-07-03 Ulrich Drepper <drepper@redhat.com>
4323 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4324 faster on SMP systems. No more emulation of compare&swap for adaptive
4326 * spinlock.h: Likewise.
4327 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4328 Replace fast with adaptive mutex.
4329 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4330 * condvar.c: Likewise.
4331 * pthread.c: Define and initialize __pthread_smp_kernel variable.
4332 * internals.h: Declare __pthread_smp_kernel.
4333 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4334 _pthread_fastlock structure.
4335 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4337 * pthread.c: Remove initialization to zero from global variables.
4339 2000-06-29 Jakub Jelinek <jakub@redhat.com>
4341 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4343 2000-06-28 Greg McGary <greg@mcgary.org>
4345 * weaks.c: Wrap BP_SYM () around weak extern declarations of
4346 pthread functions that have pointers in their return+arg signatures.
4348 2000-06-27 Greg McGary <greg@mcgary.org>
4350 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4351 extern declarations of pthread functions that have pointers in
4352 their return+arg signatures.
4354 2000-06-26 Ulrich Drepper <drepper@redhat.com>
4356 * Makefile (tests): Add ex11. Add rules to build it.
4357 * Examples/ex11.c: New file.
4358 * rwlock.c: Fix complete braindamaged previous try to implement
4361 * spinlock.c: Pretty print.
4363 2000-06-25 Ulrich Drepper <drepper@redhat.com>
4365 * Makefile (tests): Add ex10. Add rules to build it.
4366 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4367 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4368 * condvar.c (pthread_cond_wait): Allow mutex of kind
4369 PTHREAD_MUTEX_TIMED_NP.
4370 (pthread_cond_timedwait_relative): Likewise.
4371 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4372 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4373 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4374 (__pthread_mutex_lock): Use __pthread_alt_lock for
4375 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4376 (__pthread_mutex_timedlock): New function.
4377 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4378 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4379 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4380 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4381 * spinlock.c: Implement alternate fastlocks.
4382 * spinlock.h: Add prototypes.
4383 * Examples/ex10.c: New file.
4384 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4385 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4387 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4388 (__pthread_rwlock_timedrdlock): New function.
4389 (__pthread_rwlock_timedwrlock): New function.
4390 Use laternate fastlock function everywhere.
4392 2000-06-21 Andreas Jaeger <aj@suse.de>
4394 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4397 * join.c: Include <stdlib.h> for exit prototype.
4399 2000-06-20 Ulrich Drepper <drepper@redhat.com>
4401 * sysdeps/i386/useldt.h: Include <stdlib.h>.
4403 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4404 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4406 * Makefile (libpthread-routines): Add barrier.
4407 (tests): Add ex9. Add rule to build ex9.
4408 * Versions: Export barrier functions.
4409 * barrier.c: New file.
4410 * Examples/ex9.c: New file.
4411 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4412 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4413 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4415 2000-06-19 H.J. Lu <hjl@gnu.org>
4417 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4418 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4419 (compare_and_swap_with_release_semantics): New. Default to
4420 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4423 * spinlock.c (__pthread_unlock): Call
4424 compare_and_swap_with_release_semantics () instead of
4425 compare_and_swap ().
4427 2000-06-19 Ulrich Drepper <drepper@redhat.com>
4429 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4431 * sysdeps/pthread/timer_delete.c: Likewise.
4432 * sysdeps/pthread/timer_getoverr.c: Likewise.
4433 * sysdeps/pthread/timer_gettime.c: Likewise.
4434 * sysdeps/pthread/timer_settime.c: Likewise.
4436 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4438 Timer nodes are now reference counted, and can be marked
4439 as deleted. This allows for the safe release of the global mutex
4440 in the middle without losing the timer being operated on.
4442 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
4443 member is now an enum with three values, so that an intermediate
4444 state can be represented (deleted but not free for reuse yet).
4445 New refcount member added.
4446 * sysdeps/pthread/timer_routines.c: Likewise.
4448 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4449 timer_valid): New inline functions added.
4451 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4452 restructured, recursive deadlock bug fixed.
4454 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4455 timer_addref to ensure that timer won't be deleted while mutex is not
4456 held. Also uses timer_invalid to perform validation of timer handle.
4457 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4458 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4460 2000-06-14 Ulrich Drepper <drepper@redhat.com>
4462 * shlib-versions: Add entry for SH.
4463 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4465 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4467 A few optimizations. Got rid of unnecessary wakeups of timer threads,
4468 tightened up some critical regions and micro-optimized some list
4471 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4472 Returns int value now to indicate whether timer was queued at head.
4473 * sysdeps/pthread/posix-timer.h: Likewise.
4474 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4475 new return value from __timer_thread_queue_timer to avoid waking
4476 up timer thread unnecessarily.
4478 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4479 inuse flag, because this requires mutex to be held. Callers updated
4480 to do the check when they have the mutex.
4481 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4483 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4484 regions: avoids making system calls while holding timer mutex, and
4485 a few computations were moved outside of the mutex as well.
4486 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4488 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4489 to list_unlink_ip, meaning idempotent. Pointer manipulation
4490 changed to get better better code out of gcc.
4491 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4492 version of list_unlink added here.
4493 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4494 function in all places: idempotent one for timers, non-idempotent
4495 one for thread nodes.
4496 * sysdeps/pthread/timer_settime: Likewise.
4497 * sysdeps/pthread/timer_routines.c: Likewise.
4499 2000-06-13 Ulrich Drepper <drepper@redhat.com>
4501 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4502 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4504 * sysdeps/pthread/Makefile: Remove tests definition.
4506 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
4507 Yutaka Niibe <gniibe@chroot.org>
4509 * sysdeps/sh/pspinlock.c: New file.
4510 * sysdeps/sh/pt-machine.h: New file.
4512 2000-06-12 Ulrich Drepper <drepper@redhat.com>
4514 * Makefile (tests): Add joinrace.
4516 * Examples/ex6.c: Test return value of pthread_join.
4518 2000-06-11 Geoff Keating <geoffk@cygnus.com>
4520 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4521 (__pthread_spin_trylock): Implement.
4522 (__pthread_spin_unlock): Implement.
4523 (__pthread_spin_init): Implement.
4524 (__pthread_spin_destroy): Implement.
4526 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4528 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4529 really append the entry.
4531 2000-06-10 Andreas Jaeger <aj@suse.de>
4533 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4535 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
4537 * sysdeps/pthread/timer_create.c: Thread matching now done on
4538 clock type as well as thread attributes.
4539 There are individual global signal-delivering threads for
4540 different clock types.
4541 * sysdeps/pthread/posix-timer.h: Likewise.
4542 * sysdeps/pthread/timer_routines.c: Likewise.
4544 * sysdeps/pthread/timer_routines.c: Thread allocation and
4545 deallocation function now remembers to put thread on active
4546 list and remove from active list.
4547 Thus now the feature of binding multiple timers
4548 to a single thread actually works.
4550 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4552 * pthread.c (__pthread_create_2_1): Optimize a bit.
4554 * internals.h (invalid_handle): Also test for p_terminated != 0.
4555 (nonexisting_handle): New function. Same as old invalid_handle.
4556 * join.c (pthread_join): Use nonexisting_handle instead of
4557 invalid_handle to test for acceptable thread handle.
4558 * manager.c (pthread_handle_free): Likewise.
4559 * joinrace.c: New file.
4560 Reported by Permaine Cheung <pcheung@cygnus.com>.
4562 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4564 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4565 Correct handling of matching variable.
4567 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4570 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4571 Be prepared for empty timer list.
4573 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4574 CPUTIME clock ID. Add support for thread clocks.
4576 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4577 subtraction were switched.
4579 * sysdeps/pthread/timer_routines.c (init_module): Use
4580 THREAD_MAXNODES threads.
4582 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4583 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4584 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4585 with sigqueueinfo is this system call is available.
4587 * sysdeps/pthread/timer_create.c (timer_create): Allow
4588 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4590 * sysdeps/pthread/Makefile: New file. Add rules to build timer
4592 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4594 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4596 * sysdeps/pthread/posix-timer.h: New file.
4597 * sysdeps/pthread/timer_create.c: New file.
4598 * sysdeps/pthread/timer_delete.c: New file.
4599 * sysdeps/pthread/timer_getoverr.c: New file.
4600 * sysdeps/pthread/timer_gettime.c: New file.
4601 * sysdeps/pthread/timer_routines.c: New file.
4602 * sysdeps/pthread/timer_settime.c: New file.
4603 * sysdeps/pthread/tst-timer.c: New file.
4605 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4607 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4608 LINK_MAX definitions if necessary.
4610 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4612 Added missing fork time handling of global libio lock.
4614 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4615 not just the individual stream locks. Rewritten to use new
4616 iterator interface provided by libio rather than accessing
4619 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4620 which lock and unlock the stream list using the new interface
4622 * internals.h: Likewise.
4624 * ptfork.c (__fork): Now calls __flockfilelist before fork,
4625 and __funlockfilelist in the parent after the fork.
4626 Child still calls __fresetlockfiles as before.
4628 * linuxthreads.texi: Now explains what happens to streams at
4629 fork time. Also whole new section on forking and thread added.
4630 Definition of pthread_atfork moved out of Miscellaneous Functions
4631 to this new section.
4633 2000-06-04 Jakub Jelinek <jakub@redhat.com>
4635 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4636 Add missing register.
4637 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4639 2000-06-02 Jakub Jelinek <jakub@redhat.com>
4641 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4642 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4643 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4645 2000-05-31 Andreas Jaeger <aj@suse.de>
4647 * sysdeps/mips/pspinlock.c: Implement spinlocks.
4649 2000-05-28 Ulrich Drepper <drepper@redhat.com>
4651 * spinlock.c (__pthread_lock): Remove ASSERT.
4653 * Makefile (tests): Add ex8.
4654 * Examples/ex8.c: New file.
4656 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
4658 Bugfix: The pthread_atfork mechanism now takes care of its
4659 own internal mutex at fork time.
4661 * ptfork.c (__fork): Revised so that the mutex is held across
4662 the fork operation and while the handlers are called, and so that
4663 the child resets the mutex.
4665 * linuxthreads.texi: Updated pthread_atfork documentation to make
4666 it clear that fork and pthread_atfork can't be reentered from
4667 atfork handlers, that pthread_atfork and fork are mutually atomic,
4668 and that the handlers are inherited by the child process.
4670 2000-05-24 Ulrich Drepper <drepper@redhat.com>
4672 * Makefile (libpthread-routines): Add pspinlock.
4673 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4674 Use struct _pthread_fastlock instead of pthread_spinlock_t.
4675 * condvar.c: Likewise.
4676 * internals.h: Likewise.
4678 * manager.c: Likewise.
4679 * mutex.c: Likewise.
4680 * pthread.c: Likewise.
4681 * rwlock.c: Likewise.
4682 * semaphore.c: Likewise.
4683 * signals.c: Likewise.
4684 * spinlock.h: Likewise.
4685 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
4686 * sysdeps/alpha/pspinlock.c: New file.
4687 * sysdeps/arm/pspinlock.c: New file.
4688 * sysdeps/i386/pspinlock.c: New file.
4689 * sysdeps/m68k/pspinlock.c: New file.
4690 * sysdeps/mips/pspinlock.c: New file.
4691 * sysdeps/powerpc/pspinlock.c: New file.
4692 * sysdeps/sparc/sparc32/pspinlock.c: New file.
4693 * sysdeps/sparc/sparc64/pspinlock.c: New file.
4694 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4695 back to _pthread_fastlock. Define new pthread_spinlock_t.
4697 2000-05-24 Andreas Jaeger <aj@suse.de>
4699 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4701 2000-05-21 Jakub Jelinek <jakub@redhat.com>
4703 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4705 2000-05-13 Jakub Jelinek <jakub@redhat.com>
4707 * internals.h (__RES_PTHREAD_INTERNAL): Define.
4709 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4711 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4712 object state is represented with additional bits which distinguish
4713 whether that state was set up in the current process, or
4714 in an ancestor process. If that state was set in an ancestor,
4715 it means that a fork happened while thread was executing the init
4716 function. In that case, the state is reset to NEVER.
4717 * mutex.c (__pthread_once_fork_prepare): New function.
4718 (__pthread_once_fork_child): Likewise
4719 (__pthread_once_fork_parent): Likewise
4720 (__pthread_reset_pthread_once): Removed.
4721 * ptfork.c (__fork): Call new handlers in mutex.c.
4722 * internals.h: Declarations of new mutex.c functions added.
4723 Declaration of removed function deleted.
4724 * linuxthreads.texi: Updated documentation about pthread_once
4725 to clarify what happens under cancellation and forking.
4727 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4729 * internals.h: New thread manager request type, REQ_KICK.
4730 * join.c (pthread_exit): main thread now calls exit() instead
4731 of _exit() in order to proper process cleanup.
4732 * manager.c (__pthread_manager): Do not terminate manager
4733 after unblocking main thread; wait for main thread's
4734 REQ_PROCESS_EXIT request instead.
4735 Also, added REQ_KICK case to handle new request; this just does
4737 * manager.c (pthread_exited): Do not terminate manager after
4738 unblocking main thread.
4739 * manager.c (__pthread_manager_sighandler): If the main thread
4740 is waiting for all other threads to die, send a REQ_KICK into
4741 the thread manager request pipe to get it to clean out the threads
4742 and unblock the main thread as soon as possible. This fixes
4743 the 2000 millisecond hang on shutdown bug.
4744 * Examples/ex7.c: New file, tests shutdown behavior when all threads
4745 including the main one call pthread_exit(), or implicitly do so.
4746 * Makefile (tests): Add ex7.
4748 2000-05-05 Andreas Jaeger <aj@suse.de>
4750 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4751 (pthread_getcpuclockid): Correct test for ourselves.
4753 2000-05-05 Ulrich Drepper <drepper@redhat.com>
4755 * internals.h (struct _pthread_descr_struct): Reorganization.
4756 Allocate room for 16 pointers at head of the structure for future
4757 thread-local data handling. Move p_self member in this area.
4758 * manager.c (pthread_handle_create): Adjust use of p_self.
4759 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4760 * pthread.c (__pthread_initial_thread): Adjust initialization.
4761 (__pthread_manager_thread): Likewise.
4763 2000-04-29 Bruno Haible <haible@clisp.cons.org>
4765 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4766 for eventmask larger than 1 word.
4768 2000-04-27 Ulrich Drepper <drepper@redhat.com>
4770 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4771 * pthread.c (__pthread_initialize_minimal): New function. Perform
4772 minimal initialization.
4773 (pthread_initialize): Remove this code here.
4774 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
4775 are working around the problem in glibc.
4777 2000-04-25 Ulrich Drepper <drepper@redhat.com>
4779 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4780 now. First gcc must be fixed (more concrete: libgcc).
4782 2000-04-24 Ulrich Drepper <drepper@redhat.com>
4784 * pthread.c: Remove special treatement for interrupt handlers on x86.
4785 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4786 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4788 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4790 2000-04-24 Mark Kettenis <kettenis@gnu.org>
4792 * join.c (pthread_exit): Set p_terminated after reporting the
4793 termination event instead of before.
4795 2000-04-20 Jakub Jelinek <jakub@redhat.com>
4797 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4800 2000-04-18 Andreas Jaeger <aj@suse.de>
4802 * Versions: Use ld instead of ld.so.
4804 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4806 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4807 Remove the typedef keyword.
4809 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4811 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4813 (READ_MEMORY_BARRIER): Define.
4814 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4816 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4819 2000-04-17 Ulrich Drepper <drepper@redhat.com>
4821 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4822 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4823 use thread_handle().
4825 2000-04-16 Ulrich Drepper <drepper@redhat.com>
4827 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4828 if fast mutex is used. Don't initialize `already_canceled' twice.
4829 Correctly test for return value of timedsuspend.
4831 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
4832 therefore don't need the _rt versions of the signal handlers.
4834 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4836 * pthread.c (pthread_yield): New function.
4837 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4838 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4839 * internals.h: Declare __pthread_yield.
4841 * pthread.c (pthread_initialize): Avoid a bit more code if
4842 realtime signals are known to exist.
4844 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4845 to dynamically detect RT signals and avoid generating compatibility
4846 functions with old kernel.
4847 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4848 __pthread_restart_new directly.
4849 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4850 __pthread_wait_for_restart_signal directly.
4851 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4852 __pthread_timedsuspend_new directly.
4854 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4856 * condvar.c: Remove all the special code to handle cond_timedwait.
4857 Use timedsuspend instead.
4858 * internals.h: Declare __pthread_timedsuspend_old,
4859 __pthread_timedsuspend_new, and __pthread_timedsuspend.
4860 Remove declaration of __pthread_init_condvar.
4861 * pthread.c: Define __pthread_timedsuspend variable.
4862 (__pthread_timedsuspend_old): New function. Timed suspension
4863 implementation for old Linux kernels.
4864 (__pthread_timedsuspend_new): New function. Timed suspension
4865 implementation for new Linux kernels.
4866 * restart.h (timedsuspend): New function. Call appropriate
4867 suspension function through __pthread_timedsuspend.
4868 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4870 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4872 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4874 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4876 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4877 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4879 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4880 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4882 2000-04-14 Andreas Jaeger <aj@suse.de>
4884 * weaks.c: Fix typo.
4886 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4887 2.2 for linuxthreads.
4889 2000-04-13 Ulrich Drepper <drepper@redhat.com>
4891 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4892 (pthread_getcpuclockid): Fix typo.
4894 2000-04-12 Ulrich Drepper <drepper@redhat.com>
4896 * Makefile (libpthread-routines): Add getcpuclockid.
4897 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4898 * sysdeps/pthread/getcpuclockid.c: New file.
4899 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4900 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4902 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4904 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4906 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4907 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4908 and pthread_spin_unlock.
4909 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4910 into pthread_spinlock_t. Change all uses.
4911 * spinlock.c: Implement pthread_spin_lock.
4912 Rename __pthread_unlock to __pthread_spin_unlock and define weak
4913 alias for real name.
4914 Define pthread_spin_trylock, pthread_spin_init, and
4915 pthread_spin_destroy.
4916 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4917 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
4918 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4919 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
4920 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4921 and pthread_spin_unlock.
4922 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
4923 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4924 * condvar.c: Likewise.
4925 * internals.h: Likewise.
4927 * manager.c: Likewise.
4928 * mutex.c: Likewise.
4929 * pthread.c: Likewise.
4930 * rwlock.c: Likewise.
4931 * semaphore.c: Likewise.
4932 * signals.c: Likewise.
4934 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
4936 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4938 2000-04-11 Ulrich Drepper <drepper@redhat.com>
4940 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
4941 _POSIX_SHARED_MEMORY_OBJECTS.
4943 2000-04-11 Andreas Jaeger <aj@suse.de>
4945 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
4946 (__compare_and_swap): Mark as modifying memory.
4948 2000-04-11 Geoff Keating <geoffk@cygnus.com>
4950 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
4952 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
4953 Don't have the 'asm' __volatile__.
4955 2000-04-11 Ulrich Drepper <drepper@redhat.com>
4957 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
4958 * spinlock.c (__pthread_lock): Add memory barriers.
4959 (__pthread_unlock): Likewise.
4960 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
4962 (RELEASE): Not needed anymore.
4963 (__compare_and_swap): Mark asm as modifying memory.
4964 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
4966 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
4967 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
4968 (MEMORY_BARRIER): Define using stbar.
4969 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
4971 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
4972 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
4973 Mike Burrows <m3b@pa.dec.com>.
4975 2000-04-09 Ulrich Drepper <drepper@redhat.com>
4977 * signals.c (sigaction): Fix return value for the case SIG is one
4978 of the signals the implementation uses.
4979 Patch by Xavier.Leroy@inria.fr.
4981 2000-04-01 Andreas Jaeger <aj@suse.de>
4983 * attr.c: Use shlib-compat macros.
4984 * oldsemaphore.c: Likewise.
4985 * pthread.c: Likewise.
4986 * weaks.c: Likewise.
4988 2000-03-26 Ulrich Drepper <drepper@redhat.com>
4990 * semaphore.c (sem_timedwait): New function.
4991 Patch by Carl Mailloux <carlm@oricom.ca>.
4992 * semaphore.h: Declare sem_timedwait.
4993 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
4995 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
4997 * sysdeps/pthread/Makefile: File removed.
4999 2000-03-23 Ulrich Drepper <drepper@redhat.com>
5001 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
5002 * internals.h (__pthread_reset_pthread_once): Add prototype.
5003 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5005 * manager.c (pthread_handle_create): Store ID of new thread before
5008 2000-03-21 Ulrich Drepper <drepper@redhat.com>
5010 * attr.c: Use new macros from shlib-compat.h to define versions.
5011 * oldsemaphore.c: Likewise.
5012 * semaphore.c: Likewise.
5013 * weaks.c: Likewise.
5015 * pthread.c: Update for new SHLIB_COMPAT definition.
5017 * manager.c (__pthread_manager): Unmask debug signal.
5019 * pthread.c (pthread_initialize): Test for address of __dso_handle
5020 being NULL, not value. Use __on_exit, not on_exit.
5021 Patch by Andreas Jaeger <aj@suse.de>.
5023 * pthread.c: Use new macros from shlib-compat.h to define versions.
5025 2000-03-19 Ulrich Drepper <drepper@redhat.com>
5027 * pthread.c (pthread_initialize): Instead of on_exit use
5028 __cxa_atexit if __dso_label is available to allow unloading the
5029 libpthread shared library.
5031 2000-03-16 Ulrich Drepper <drepper@redhat.com>
5033 * condvar.c: Make tests for ownership of mutex less strict.
5035 2000-03-14 Ulrich Drepper <drepper@redhat.com>
5037 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5038 current thread and return error if not.
5039 (pthread_cond_timedwait_relative_old): Likewise.
5040 (pthread_cond_timedwait_relative_new): Likewise.
5042 * mutex.c (__pthread_once): Handle cancelled init function correctly.
5043 (pthread_once_cancelhandler): New function.
5044 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5046 2000-03-14 Andreas Jaeger <aj@suse.de>
5048 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5050 (pthread_handle_sigrestart_rt): Likewise.
5051 * signals.c (pthread_sighandler_rt): Likewise.
5053 2000-03-02 Andreas Jaeger <aj@suse.de>
5055 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5056 Reported by Sean Chen <sean.chen@turbolinux.com>.
5058 2000-02-28 Andreas Jaeger <aj@suse.de>
5060 * rwlock.c: Fix typo.
5062 2000-02-27 Ulrich Drepper <drepper@redhat.com>
5064 * rwlock.c: Define __* variants of the functions and make old names
5066 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5067 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5069 2000-02-25 Andreas Jaeger <aj@suse.de>
5071 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5072 pwrite64, lseek64, open64, and __open64 with version 2.2.
5074 2000-02-22 Ulrich Drepper <drepper@redhat.com>
5076 * semaphore.h (SEM_FAILED): Use 0 not NULL.
5078 2000-02-14 Ulrich Drepper <drepper@redhat.com>
5080 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5081 nanosleep does not work either. Get absolute time inside the
5083 (pthread_cond_timedwait_relative_new): Likewise.
5084 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5086 2000-02-13 Andreas Jaeger <aj@suse.de>
5088 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5089 (pthread_cond_timedwait_relative_old): Likewise.
5091 2000-02-13 Ulrich Drepper <drepper@redhat.com>
5093 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5094 but keep the code around. A bug in the kernel prevent us from
5096 (pthread_cond_timedwait_relative_new): Likewise.
5097 (PR libc/1597 and libc/1598).
5099 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
5101 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5102 loop around nanosleep calls instead of around most of the function
5103 (pthread_cond_timedwait_relative_new): Likewise.
5104 body. Got rid of backwards goto and one local.
5106 2000-01-31 Ulrich Drepper <drepper@redhat.com>
5108 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5109 before every nanosleep call to account for time spent in the rest
5111 (pthread_cond_timedwait_relative_new): Likewise.
5112 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5114 2000-01-29 Ulrich Drepper <drepper@redhat.com>
5116 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5117 from nanosleep call so that in case we restart we only wait for the
5119 (pthread_cond_timedwait_relative_new): Likewise.
5120 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5122 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
5124 * manager.c (pthread_allocate_stack): Compute guard page address
5125 correctly. Patch by HJ Lu.
5127 * sysdeps/pthread/pthread.h: Define
5128 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5130 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
5132 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5133 preference handling.
5134 (pthread_rwlockattr_setkind_np): Allow
5135 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5136 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5138 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
5140 * internals.h (pthread_readlock_info): New structure.
5141 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5142 p_untracked_readlock_count.
5143 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5144 Add initializers for new fields.
5145 * manager.c (pthread_free): Free read/write lock lists.
5146 * queue.h (queue_is_empty): New function.
5147 * rwlock.c: Implement requirements about when readers should get
5149 * sysdeps/pthread/pthread.h
5150 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5151 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5152 Define this name as well.
5153 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5155 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
5157 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5158 Adjust initializers for struct _pthread_descr_struct change.
5159 * internals.h (struct _pthread_descr_struct): Move new elements to
5162 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
5164 Redesigned how cancellation unblocks a thread from internal
5165 cancellation points (sem_wait, pthread_join,
5166 pthread_cond_{wait,timedwait}).
5167 Cancellation won't eat a signal in any of these functions
5168 (*required* by POSIX and Single Unix Spec!).
5169 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5170 simultaneous condition variable signal (not required by POSIX
5171 or Single Unix Spec, but nice).
5172 * spinlock.c: __pthread_lock queues back any received restarts
5173 that don't belong to it instead of assuming ownership of lock
5174 upon any restart; fastlock can no longer be acquired by two threads
5176 * restart.h: Restarts queue even on kernels that don't have
5177 queued real time signals (2.0, early 2.1), thanks to atomic counter,
5178 avoiding a rare race condition in pthread_cond_timedwait.
5180 1999-12-31 Andreas Jaeger <aj@suse.de>
5182 * internals.h: Remove duplicate prototype declarations.
5184 * weaks.c: Remove __THROW from prototypes since the file is not
5185 compiled by a C++ compiler.
5186 * internals.h: Likewise.
5188 1999-12-30 Andreas Jaeger <aj@suse.de>
5190 * sysdeps/pthread/pthread.h: Move internal functions to...
5191 * sysdeps/pthread/bits/libc-lock.h: ...here.
5193 1999-12-29 Andreas Jaeger <aj@suse.de>
5195 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5197 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
5199 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5202 * manager.c (__pthread_start): Add one more cast to prevent
5203 warning on 64bit machines.
5205 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
5207 * manager.c (pthread_handle_create): Set p_pid of new thread
5208 before calling the callback function to report a new thread.
5210 1999-12-20 Andreas Jaeger <aj@suse.de>
5212 * pthread.c (pthread_initialize): Move getrlimit call after
5215 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
5217 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5218 pwrite64, lseek64, open64, and __open64.
5219 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5220 pwrite64, lseek64, open64, and __open64.
5222 * manager.c (pthread_allocate_stack): Correct computation of
5223 new_thread_bottom. Correct handling of stack size and when the
5224 rlimit method to guard for stack growth is used.
5225 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5226 minus one pagesize (not two).
5228 1999-12-03 Andreas Jaeger <aj@suse.de>
5230 * Versions: Add __res_state with version GLIBC_2.2.
5232 * errno.c (__res_state): New function to return thread specific
5235 * pthread.c (pthread_initialize): Initialize p_resp.
5236 (__pthread_reset_main_thread): Also set p_resp.
5238 * manager.c (pthread_handle_create): Initialize p_resp.
5240 * internals.h: Add thread specific resolver state.
5241 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5243 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
5245 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5247 * sysdeps/i386/i686/pt-machine.h: Likewise.
5248 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5250 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
5252 * manager.c (pthread_start_thread_event): Initialize p_pid already
5255 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
5257 * internals.h: Add prototype for __pthread_manager_event.
5258 * manager.c (__pthread_manager_event): New function.
5259 (pthread_start_thread_event): Correct computation of self.
5260 Use INIT_THREAD_SELF.
5261 * pthread.c (__pthread_manager_thread): Initialize p_lock.
5262 (__pthread_initialize_manager): Respect event flags also for creation
5263 of the manager thread.
5265 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
5267 * pthread.c (__pthread_initialize_manager): Initialize
5268 __pthread_manager_thread.p_tid.
5270 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
5272 * internals.h: Declare __pthread_last_event.
5273 * manager.c: Define __pthread_last_event.
5274 (pthread_handle_create): Set __pthread_last_event.
5275 (pthread_exited): Likewise.
5276 * join.c (pthread_exit): Likewise.
5278 * Makefile (libpthread-routines): Add events.
5279 * events.c: New file.
5280 * internals.h: Protect against multiple inclusion.
5281 Include thread_dbP.h header.
5282 (struct _pthread_descr_struct): Add new fields p_report_events and
5284 Declare event reporting functions.
5285 * join.c (pthread_exit): Signal event if this is wanted.
5286 * manager.c (__pthread_threads_events): New variable.
5287 (pthread_handle_create): Take new parameters with event information.
5288 Signal TD_CREATE event if wanted.
5289 (__pthread_manager): Adjust pthread_handle_create call.
5290 (pthread_start_thread_event): New function. Block until manager is
5291 finished and then call pthread_start_thread.
5292 (pthread_exited): Signal TD_REAP event if wanted.
5294 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
5296 * restart.h (suspend_with_cancellation): Rewrite as a macro.
5298 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5300 1999-10-25 Andreas Jaeger <aj@suse.de>
5302 * internals.h: Remove K&R compatibility.
5303 * no-tsd.c: Likewise.
5304 * semaphore.h: Likewise.
5305 * signals.c: Likewise.
5306 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5307 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5308 * weaks.c: Likewise.
5310 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
5312 * pthread.c: For i386, wrap pthread_handle_sigrestart and
5313 pthread_handle_sigcancel with functions that restore %gs from the
5314 signal context. For each signal handling function, two wrappers
5315 are required, one for a non-RT signal and one for a RT signal.
5316 * signal.c: For i386, add code to restore %gs from the signal
5317 context in pthread_sighandler and pthread_sighandler_rt.
5319 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
5321 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5323 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
5325 * pthread.c (__pthread_initial_thread): Pass argument to
5326 PTHREAD_START_ARGS_INITIALIZER.
5327 (__pthread_manager_thread): Likewise.
5329 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5330 initialize function.
5332 * manager.c (pthread_handle_create): Remove p_startfct initialization.
5334 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5336 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
5338 * internals.h: Correct return types for __libc_read and __libc_write.
5340 1999-10-09 Andreas Jaeger <aj@suse.de>
5342 * internals.h: Add __new_sem_post to get prototype in
5343 manager.c; include semaphore.h for needed types.
5345 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
5347 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5348 directly instead of calling sem_post which should not be necessary
5349 but is faster and might help in some case to work around problems.
5350 Patch by khendricks@ivey.uwo.ca [libc/1382].
5352 1999-10-08 Andreas Schwab <schwab@suse.de>
5354 * sysdeps/pthread/Subdirs: New file.
5357 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
5359 * Implies: New file.
5360 * internals.h (struct _pthread_descr_struct): Add p_startfct.
5361 * manager.c (pthread_handle_create): Initialize p_startfct.
5362 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5364 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
5366 * manager.c (__linuxthreads_pthread_threads_max): New variable.
5367 * specific.c (__linuxthreads_pthread_keys_max): New variable.
5368 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5370 * condvar.c (pthread_cond_timedwait_relative): Never return with
5371 EINTR. Patch by Andreas Schwab.
5373 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
5375 * signals.c (sigaction): Correct last patch. Don't select
5376 pthread_sighandler_rt based on the signal number but instead of
5377 the SA_SIGINFO flag.
5379 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
5381 * specific.c: Move definitions of struct pthread_key_struct and
5382 destr_function to ...
5383 * internals.h: ...here.
5385 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
5387 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
5388 this instead of pthread_handle_sigrestart if the signal is an RT
5391 * signals.c: Handle passing through of sighandler arguments also
5392 for real-time signals.
5394 1999-09-03 Andreas Schwab <schwab@suse.de>
5396 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
5398 (__vfork): New function, alias vfork.
5399 * Versions: Export __fork, vfork, and __vfork in libpthread.
5401 1999-08-23 Andreas Schwab <schwab@suse.de>
5403 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5404 call to signal handler.
5406 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
5408 * pthread.c (__pthread_reset_main_thread): Undo last change.
5409 (__pthread_kill_other_threads_np): Reset signal handlers for the
5410 signals we used in the thread implementation here.
5412 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
5414 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5415 for the signals we used in the thread implementation [PR libc/1234].
5417 * Versions: Export __pthread_kill_other_threads_np from libpthread
5420 * signals.c: Pass sigcontext through wrapper to the user function.
5422 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
5424 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5425 __libc_internal_tsd_set.
5427 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5429 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5432 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5434 * internals.h: Align _pthread_descr_struct to 32 bytes.
5435 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5438 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5440 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5443 1999-07-09 Cristian Gafton <gafton@redhat.com>
5445 * Makefile (libpthread-routines): Add oldsemaphore routine.
5446 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5447 sem_trywait, and sem_wait to GLIBC_2.1.
5448 * oldsemaphore.c: New file.
5449 * semaphore.c: Add default_symbol_versions for the changed functions.
5450 (__new_sem_init): Rename from sem_init.
5451 (__new_sem_post): Rename from sem_post.
5452 (__new_sem_wait): Rename from sem_wait.
5453 (__new_sem_trywait): Rename from sem_trywait.
5454 (__new_sem_getvalue): Rename from sem_getvalue.
5455 (__new_sem_destroy): Rename from sem_destroy.
5457 1999-06-23 Robey Pointer <robey@netscape.com>
5459 * internals.h: Added p_nextlock entry to separate queueing for a
5460 lock from queueing for a CV (sometimes a thread queues on a lock
5461 to serialize removing itself from a CV queue).
5462 * pthread.c: Added p_nextlock to initializers.
5463 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5465 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5467 * manager.c (pthread_handle_create): Free mmap region after stack
5468 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5470 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5472 * man/pthread_cond_init.man: Correct example.
5473 Reported by Tomas Berndtsson <tomas@nocrew.org>.
5475 * linuxthreads.texi (Condition Variables): Likewise.
5477 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
5479 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5480 casx not cas, also successful casx returns the old value in rd
5481 and not the new value.
5483 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
5485 * manager.c: If pthread_create() is given a NULL attribute
5486 and the thread manager runs with a realtime policy, set the
5487 scheduling policy of the newly created thread back to SCHED_OTHER.
5488 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5489 initialize the schedpolicy field of new_thread->p_start_args
5490 to that of the calling thread.
5492 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
5494 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5495 instruction does not allow memory element to use offset.
5497 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
5499 * manager.c (pthread_allocate_stack): Optimize initialization of new
5502 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5503 Don't use initializer since it is all zeroes.
5504 (__libc_once_define): Likewise.
5506 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5508 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5509 doesn't exist anymore.
5510 * sysdeps/i386/Implies: Likewise.
5511 * sysdeps/m68k/Implies: Likewise.
5512 * sysdeps/mips/Implies: Likewise.
5513 * sysdeps/powerpc/Implies: Likewise.
5514 * sysdeps/sparc/sparc32/Implies: Likewise.
5515 * sysdeps/sparc/sparc64/Implies: Likewise.
5517 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
5519 * sysdeps/alpha/bits/semaphore.h: Removed.
5520 * sysdeps/powerpc/bits/semaphore.h: Removed.
5521 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5522 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5523 * Makefile (headers): Remove bits/semaphore.h.
5525 * semaphore.h: Define _pthread_descr if necessary.
5526 Don't include limits.h. Define SEM_VALUE_MAX directly.
5528 (sem_t): Protect element names with leading __.
5529 Add declarations for sem_close, sem_open, and sem_unlink.
5530 * semaphore.c: Adjust all functions for new element names.
5531 Define sem_close, sem_open, and sem_unlink.
5532 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5534 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5537 1999-03-16 H.J. Lu <hjl@gnu.org>
5539 * specific.c (pthread_key_delete): Check th->p_terminated to see
5540 if the thread is running.
5542 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5543 Added to GLIBC_2.0 for libc.so.
5545 1999-02-12 H.J. Lu <hjl@gnu.org>
5547 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5548 __libc_allocate_rtsig): Added to GLIBC_2.1.
5550 * internals.h (DEFAULT_SIG_RESTART): Removed.
5551 (DEFAULT_SIG_CANCEL): Removed.
5553 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5554 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5555 (__pthread_sig_restart, __pthread_sig_cancel,
5556 __pthread_sig_debug): Initialized.
5557 (pthread_initialize): Call init_rtsigs () to initialize
5560 1999-02-03 H.J. Lu <hjl@gnu.org>
5562 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5563 Don't restart the thread which sent REQ_DEBUG.
5564 (pthread_start_thread): Check if __pthread_sig_debug > 0
5567 * pthread.c (__pthread_initialize_manager): Suspend ourself
5568 after sending __pthread_sig_debug to gdb instead of
5569 __pthread_sig_cancel.
5571 1999-01-24 H.J. Lu <hjl@gnu.org>
5573 * manager.c (__pthread_manager): Delete __pthread_sig_debug
5574 from mask if __pthread_sig_debug > 0.
5575 (pthread_handle_create): Increment __pthread_handles_num.
5577 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5578 * pthread.c (__pthread_initialize_manager): Likewise.
5580 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5581 instead of __libc_allocate_rtsig (2).
5582 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5583 instead of __pthread_sig_cancel.
5584 (pthread_handle_sigdebug): Fix comments.
5586 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
5588 * manager.c (pthread_allocate_stack): Set
5589 __pthread_nonstandard_stacks if user-specified stack is used.
5591 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
5593 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5594 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5596 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
5598 * pthread.c: Use a third signal __pthread_sig_debug distinct
5599 from __pthread_sig_cancel to notify gdb when a thread is
5601 * manager.c: Likewise.
5602 * internals.h: Likewise.
5603 * signals.c: The implementation of sigwait(s) assumed that
5604 all signals in s have signal handlers already attached.
5605 This is not required by the standard, so make it work
5606 also if some of the signals have no handlers.
5608 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5610 * linuxthreads.texi: Remove pointers from first @node. Move old
5611 @node spec inside comment.
5613 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
5615 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5618 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
5620 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5621 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5623 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
5625 * manager.c: Threads now send __pthread_sig_cancel on termination.
5626 Change clone call and signal masks.
5627 * thread.c (pthread_handle_sigrestart): Remove special code for
5629 (pthread_handle_sigcancel): In manager thread call
5630 __pthread_manager_sighandler.
5631 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5632 * sysdeps/i386/i686/pt-machine.h: Likewise.
5633 Patches by Xavier Leroy.
5635 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
5637 * spinlock.c (__pthread_unlock): Don't crash if called for an
5638 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5640 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5643 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
5645 * Examples/ex3.c: Wait until all threads are started before
5646 searching for the number to avoid race condition on very fast
5649 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5651 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5652 declaration since it's not needed.
5654 * sysdeps/pthread/pthread.h: Move internal functions to ...
5655 * internals.h: ...here.
5657 1998-12-02 H.J. Lu <hjl@gnu.org>
5659 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5660 SIGRTMIN is defined.
5661 (__pthread_sig_cancel): Likewise.
5663 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5665 * wrapsyscall.c: Include <sys/mman.h> for msync,
5666 <stdlib.h> for system and <termios.h> for tcdrain prototype.
5667 Correct msync declaration.
5669 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
5671 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5672 __libc_tsd_set): New macros for new interface.
5673 * no-tsd.c: New file, provide uninitialized defns of
5674 __libc_internal_tsd_get and __libc_internal_tsd_set.
5675 * Makefile (routines): Add no-tsd.
5677 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
5679 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5680 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5681 __libc_internal_tsd_set): Move decls to ...
5682 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5685 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5686 __libc_internal_tsd_set): Make these pointers to functions, not
5687 functions; remove #pragma weak decls for them.
5688 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5689 Define static functions and initialized pointers to them.
5691 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
5693 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5694 (CFLAGS-specific.c): Likewise.
5695 (CFLAGS-pthread.c): Likewise.
5696 (CFLAGS-ptfork.c): Likewise.
5697 (CFLAGS-cancel.c): Likewise.
5698 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5699 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5701 * mutex.c (pthread_mutex_init): Define as strong symbol.
5702 (pthread_mutex_destroy): Likewise.
5703 (pthread_mutex_trylock): Likewise.
5704 (pthread_mutex_lock): Likewise.
5705 (pthread_mutex_unlock): Likewise.
5706 (pthread_mutexattr_init): Likewise.
5707 (pthread_mutexattr_destroy): Likewise.
5708 (pthread_once): Likewise.
5709 * ptfork.c (pthread_atfork): Likewise.
5710 * specific.c (pthread_key_create): Likewise.
5711 (pthread_setspecific): Likewise.
5712 (pthread_getspecific): Likewise.
5714 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5716 * linuxthreads.texi: Fix punctuation after xref.
5718 1998-11-10 H.J. Lu <hjl@gnu.org>
5720 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5721 if it is defined in <linux/limits.h>.
5723 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
5725 * spinlock.h (__pthread_trylock): Define inline.
5726 (__pthread_lock): Add extra parameter to declaration. Declare
5727 using internal_function.
5728 (__pthread_unlock): Declare using internal_function.
5729 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
5730 of local variable self. Avoid recomputing self. Define using
5732 (__pthread_trylock): Remove.
5733 (__pthread_unlock): Define using internal_function.
5734 * cancel.c: Adjust for __pthread_lock interface change. Use already
5735 computed self value is possible.
5736 * condvar.c: Likewise.
5738 * manager.c: Likewise.
5739 * mutex.c: Likewise.
5740 * pthread.c: Likewise.
5741 * rwlock.c: Likewise.
5742 * semaphore.c: Likewise.
5743 * signals.c: Likewise.
5745 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
5747 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5748 __ to field names of the struct.
5749 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5751 (pthread_attr_t): Likewise.
5752 (pthread_cond_t): Likewise.
5753 (pthread_condattr_t): Likewise.
5754 (pthread_mutex_t): Likewise.
5755 (pthread_mutexattr_t): Likewise.
5756 (pthread_rwlock_t): Likewise.
5757 (pthread_rwlockattr_t): Likewise.
5758 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5759 * cancel.c: Likewise.
5760 * condvar.c: Likewise.
5761 * manager.c: Likewise.
5762 * mutex.c: Likewise.
5763 * pthread.c: Likewise.
5764 * ptlongjmp.c: Likewise.
5765 * rwlock.c: Likewise.
5766 * spinlock.c: Likewise.
5768 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
5770 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5773 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5776 * Makefile (libpthread-routines): Add pt-machine.
5777 * pt-machine.c: New file.
5778 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5779 yet defined. Use PT_EI in extern inline definitions.
5780 * sysdeps/arm/pt-machine.h: Likewise.
5781 * sysdeps/i386/pt-machine.h: Likewise.
5782 * sysdeps/i386/i686/pt-machine.h: Likewise.
5783 * sysdeps/m68k/pt-machine.h: Likewise.
5784 * sysdeps/mips/pt-machine.h: Likewise.
5785 * sysdeps/powerpc/pt-machine.h: Likewise.
5786 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5787 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5789 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5791 * semaphore.h: Include <sys/types.h> so that _pthread_descr
5794 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
5796 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5798 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5800 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5802 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5805 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5807 * signals.c (sigaction): Check that sig is less than NSIG to avoid
5808 array index overflow.
5810 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
5812 * sysdeps/pthread/semaphore.h: New file.
5814 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
5816 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5817 _LIBC_TSD_KEY_DL_ERROR.
5819 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
5821 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5822 * sysdeps/i386/pt-machine.h: Likewise.
5823 Suggested by Roland McGrath.
5825 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
5827 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5828 access thread data with non-constant offsets.
5829 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5832 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
5833 THREAD_SETMEM_NC definitions.
5835 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5837 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5839 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
5841 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5842 not already defined.
5843 (struct _pthread_descr_struct): Add p_self and p_nr field.
5844 * manager.c (__pthread_handles): Define second element to point
5846 (__pthread_handles_num): Initialize to 2.
5847 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5848 (pthread_start_thread): Likewise.
5849 (pthread_handle_create): Start search for free slot at entry 2.
5850 Initialize new fields p_self and p_nr.
5851 Call __clone with CLONE_PTRACE if available.
5852 (pthread_free): Call FREE_THREAD_SELF if available.
5853 * pthread.c (__pthread_initial_thread): Initialize new fields.
5854 (__pthread_manager_thread): Likewise.
5855 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5857 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5858 elements of the thread descriptor.
5859 * condvar.c: Likewise.
5860 * errno.c: Likewise.
5862 * manager.c: Likewise.
5863 * pthread.c: Likewise.
5864 * ptlongjmp.c: Likewise.
5865 * semaphore.c: Likewise.
5866 * signals.c: Likewise.
5867 * specific.c: Likewise.
5868 * spinlock.c: Likewise.
5870 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5872 * sysdeps/i386/useldt.h: New file.
5873 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5875 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5876 THREAD_SETMEM using __thread_self.
5877 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5879 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
5881 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5882 turned out that we didn't need to queue after all.
5884 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
5886 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5887 and wastes space; correct types.
5889 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
5891 * signals.c (sigaction): Handle NULL argument.
5893 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
5895 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5898 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5900 * Makefile (linuxthreads-version): Extract correct number from
5903 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
5905 * Banner: Bump version number to 0.8
5906 * FAQ.html: Many updates, in particular w.r.t. debugging.
5907 * manager.c: Support for non-default stacksize for
5908 LinuxThreads-allocated stacks;
5909 don't use guard pages for stacks with default size, rely on
5910 rlimit(RLIMIT_STACK) instead (it's cheaper).
5912 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5913 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5914 * condvar.c: Likewise.
5915 * internals.h: Likewise.
5916 * restart.h: Likewise.
5917 * signals.c: Likewise.
5918 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
5920 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5922 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
5923 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
5924 * Versions: Put __pthread_mutexattr_settype under version
5925 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
5926 __pthread_mutexattr_gettype.
5928 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5930 * sysdeps/pthread/bits/libc-lock.h: Make
5931 __pthread_mutexattr_settype weak. Don't make
5932 __pthread_mutexattr_setkind_np weak.
5934 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
5936 * manager.c (pthread_handle_create): Check whether sched_setscheduler
5937 call can succeed here.
5939 * mutex.c: Define __pthread_mutexattr_settype and make
5940 __pthread_mutexattr_setkind_np an alias.
5941 Likewise for __pthread_mutexattr_gettype.
5943 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5945 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
5948 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
5950 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
5952 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5954 * Examples/ex6.c: Include <unistd.h> for usleep.
5956 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5958 * Examples/ex4.c (main): Use exit, not pthread_exit.
5960 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
5962 * Versions: Add __pthread_mutexattr_gettype and
5963 __pthread_mutexattr_settype.
5964 * lockfile.c: Use __pthread_mutexattr_settype instead of
5965 __pthread_mutexattr_setkind_np.
5966 * mutex.c: Define __pthread_mutexattr_gettype and
5967 __pthread_mutexattr_settype.
5969 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
5970 __pthread_mutexattr_settype.
5971 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
5972 Use __pthread_mutexattr_settype.
5974 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
5976 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
5977 * mutex.c: Define weak alias pthread_mutexattr_gettype and
5978 pthread_mutexattr_settype.
5979 * sysdeps/pthread/pthread.h: Declare these functions.
5980 Move pthread_sigmask and pthread_kill declaration in separate header.
5981 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
5983 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
5985 * Makefile: Add rules to compile and run tests.
5986 * Examples/ex1.c: Little changes to fix warnings.
5987 * Examples/ex2.c: Likewise.
5988 * Examples/ex3.c: Likewise.
5989 * Examples/ex4.c: Likewise.
5990 * Examples/ex5.c: Likewise.
5991 * Examples/ex6.c: New file.
5993 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
5995 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
5997 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5999 * attr.c: Include <string.h>.
6001 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
6003 * attr.c: Include errno.h. Use memcpy to copy sched_param.
6004 * internals.h: Include limits.h.
6005 * manager.c: Use memcpy to copy sched_param.
6006 * ptfork.c: Include errno.h.
6007 * pthread.c: Likewise.
6008 * semaphore.c: Likewise.
6009 * specific.c: Likewise.
6010 * spinlock.h: Likewise.
6011 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
6012 type definition to ...
6013 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
6015 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
6017 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6019 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6020 as macros as demanded in POSIX.1, Annex C.
6022 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
6024 * internals.h (struct pthread_request): For free use pthread_t
6025 instead of pthread_descr.
6026 * join.c (pthread_join): Pass thread_id, not th to manager.
6027 (pthread_detach): Likewise.
6028 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6029 (pthread_exited): Remove detached queue code.
6030 (pthread_handle_free): Expect thread ID parameter and use it to
6031 validate the thread decsriptor. Don't use detached queue.
6032 Patches by Xavier Leroy.
6034 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6036 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6037 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6038 __pthread_atfork, __pthread_key_create, __pthread_once.
6039 * internals.h: Doc fix.
6040 * pthread.c (__pthread_initialize): Define again.
6042 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
6044 * manager.c (pthread_exited): If thread is not detached put it on
6046 (pthread_handle_free): If thread is not on list with living threads
6047 search on list with detached threads.
6049 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6050 for new definition of pthread_rwlock_t.
6052 * spinlock.c: Correct test whether to compile
6053 __pthread_compare_and_swap or not.
6055 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
6057 * attr.c: Finish user stack support. Change locking code to be safe
6058 in situations with different priorities.
6059 * cancel.c: Likewise.
6060 * condvar.c: Likewise.
6061 * internals.h: Likewise.
6063 * manager.c: Likewise.
6064 * mutex.c: Likewise.
6065 * pthread.c: Likewise.
6066 * ptlongjmp.c: Likewise.
6067 * queue.h: Likewise.
6068 * rwlock.c: Likewise.
6069 * semaphore.c: Likewise.
6070 * semaphore.h: Likewise.
6071 * signals.c: Likewise.
6072 * spinlock.c: Likewise.
6073 * spinlock.h: Likewise.
6074 * sysdeps/pthread/pthread.h: Likewise.
6075 Patches by Xavier Leroy.
6077 * sysdeps/i386/i686/pt-machine.h: New file.
6079 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
6081 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6082 [sg]et_stackaddr prototypes always available.
6084 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6085 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6087 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
6089 * manager.c (pthread_free): Undo patch from 980430.
6090 Reported by David Wragg <dpw@doc.ic.ac.uk>.
6092 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
6094 * manager.c: Define __pthread_manager_adjust_prio and use it to
6095 increase priority when needed.
6096 * internals.h: Add prototype for __pthread_manager_adjust_prio.
6097 * mutex.c: Optimize mutexes to wake up only one thread.
6098 * pthread.c: Move PID of manager for global variable in structure
6100 Patches by Xavier Leroy.
6102 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
6104 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6106 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6108 * attr.c: Correct typo.
6110 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
6112 * manager.c (pthread_free): Unmap guard before the stack.
6113 Patch by Matthias Urlichs.
6115 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
6117 * manager.c (pthread_free): Detect already free child.
6118 Patch by Xavier Leroy, reported by Matthias Urlichs.
6120 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6122 * Makefile (linuxthreads-version): Renamed back from
6125 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
6127 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6130 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
6132 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6133 * internals.h: Add definitions for new spinlock implementation.
6134 * ptlongjmp.c: New file.
6135 * spinlock.c: New file.
6136 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6137 new function __pthread_acquire to prevent deadlocks with thread
6138 with different priorities.
6139 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6141 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6143 * manager.c (__pthread_manager): Reduce first argument to select
6144 to include just the needed file descriptor.
6146 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
6148 * manager.c: Fix last patch which caused core dumps.
6150 * pthread.c: Correctly handle missing SIGRTMIN.
6152 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6154 * libpthread.map: Add __libc_internal_tsd_get and
6155 __libc_internal_tsd_set. Add missing cancelable functions. Export
6156 libc internal versions of the cancelable functions.
6158 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
6160 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6162 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
6164 * attr.c: Implement pthread_attr_[gs]etguardsize,
6165 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6166 Change pthread_attr_init to have two interfaces.
6167 * internals.h (struct _pthread_descr_struct): Add new fields for
6169 * libpthread.map: Add names in GLIBC_2.1 section.
6170 * manager.c (pthread_handle_create): Implement guardsize and
6172 (pthread_free): Likewise.
6173 * pthread.c (pthread_create): Add new interface for changed
6175 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6176 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6179 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
6181 * manager.c: Enable resetting of the thread scheduling policy
6182 to SCHED_OTHER when the parent thread has a different one.
6184 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
6186 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6187 _POSIX_ASYNCHRONOUS_IO.
6189 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6191 * mutex.c: Implement new mutex types.
6193 * internals.h: Include <signal.h>.
6195 * libpthread.map: Add __erno_location and __h_errno_location.
6197 * errno.c: Return pointer to variable actually in use. This might
6198 not be the one in the thread structure.
6199 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6201 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6202 of manager thread structure.
6203 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6205 * pthread.c: Adapt initializer for thread structures.
6206 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6207 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6208 current thread to global variables.
6210 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
6212 * rwlock.c: New file.
6213 * Makefile (libpthread-routines): Add rwlock.
6214 * sysdeps/pthread/pthread.h: Define data structures and declare
6216 * libpthread.map: Add new functions.
6218 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
6220 * sysdeps/arm/pt-machine.h: New file; add ARM support.
6221 * sysdeps/arm/Implies: likewise.
6222 * README: Document it.
6224 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6226 * signals.c: Remove unneeded initializer for sigwaited, saving a
6229 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6231 * semaphore.c (sem_init): Set sem_spinlock only if available.
6233 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
6235 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6236 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6238 * Makefile: Update from LinuxThreads 0.7.
6239 * internals.h. Likewise.
6240 * manager.c: Likewise.
6241 * mutex.c: Likewise.
6242 * pthread.c: Likewise.
6243 * signals.c: Likewise.
6244 * specific.c: Likewise.
6245 * Examples/ex3.c: Likewise.
6247 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
6249 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6252 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
6254 * wrapsyscall.c: Add socket functions which are also cancelation
6257 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
6259 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6260 New functions for fast thread specific data within libc.
6262 * internals.h: Add new array p_libc_specific to struct
6263 _pthread_descr_struct.
6265 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6267 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
6269 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6270 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6272 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
6274 * internals.h (struct _pthread_descr_struct): Add definitions for
6275 two-level specific key handling.
6276 * manager.c (pthread_handle_create): Initialize specific memory array.
6277 * specific.c: Implement two-level key handling.
6278 * weaks.c: Don't provide dummy key handling.
6279 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6280 Add definition of __libc_key_t.
6281 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6283 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6284 PTHREAD_DESTRUCTOR_ITERATIONS.
6286 * manager.c (pthread_handle_create): Compare mmap result with
6289 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6290 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6292 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
6294 sysdeps/sparc -> sysdeps/sparc/sparc32
6295 sysdeps/sparc64 -> sysdeps/sparc/sparc64
6297 * internals.h: Change definition of THREAD_SELF to be an expression,
6298 not a statement that did a return.
6299 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6300 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6301 Follow Solaris and use a "system reserved" register (%g6) to hold
6302 the thread descriptor.
6303 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6305 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
6307 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
6308 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6309 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6311 * semaphore.c: Include spinlock.h only when needed.
6313 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6314 keys for entries not in use.
6316 * weaks.c: Implement key handling functions for real.
6318 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
6320 Initial sparc64-linux support:
6321 * sysdeps/sparc64/Implies: New file.
6322 * sysdeps/sparc64/pt-machine.h: Likewise.
6324 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
6326 * semaphore.c: Include spinlock.h at correct place.
6329 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
6331 The Great Bit File Move:
6332 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6333 * sysdeps/powerpc/semaphorebits.h: Likewise.
6334 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6335 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6336 * sysdeps/pthread/libc-lock.h: -> bits/
6337 * sysdeps/pthread/stdio-lock.h: Likewise.
6338 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6339 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6340 * semaphore.h: Likewise.
6341 * sysdeps/pthread/pthread.h: Likewise.
6343 * lockfile.c: <foo.h> -> <bits/foo.h>.
6344 * semaphore.h: Likewise.
6346 * Makefile: (headers): foo.h -> bits/foo.h.
6347 * sysdeps/pthread/Makefile: Likewise.
6349 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6351 * semaphore.c (sem_init): Set sem_spinlock only if available.
6353 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6356 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
6358 Update from LinuxThreads 0.6.
6360 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6361 and __sched_get_priority_min instead of names without `__'.
6363 * manager.c: Rewrite large parts to implement opaque pthread_t.
6365 * cancel.c: Adapt for opaque pthread_t type.
6366 * condvar.c: Likewise.
6367 * errno.c: Likewise.
6369 * mutex.c: Likewise.
6370 * pthread.c: Likewise.
6371 * signals.c: Likewise.
6372 * specific.c: Likewise.
6373 * restart.h: Likewise.
6374 * queue.h: Likewise.
6375 * Examples/ex3.c: Likewise.
6376 * Examples/ex4.c: Likewise.
6377 * sysdeps/pthread/pthread.h: Likewise.
6379 * pthread.c: Accumulate time for all threads in thread manager.
6381 * semaphore.c: Implement fallback implementation for architectures
6382 sometimes missing compare-exchange operations.
6384 * cancel.c (pthread_cancel): Validate handle argument.
6385 * join.c (pthread_join): Likewise.
6386 (pthread_detach): Likewise.
6387 * signals.c (pthread_kill): Likewise.
6389 * spinlock.h (acquire): Use __sched_yield not sched_yield.
6391 * queue.h (enqueue): Enqueue thread according to priority.
6393 * internals.c (struct pthread_start_args): New struct for passing
6394 args to cloning function.
6395 (struct _pthread): Rename to _pthread_descr_struct and adapt for
6398 * Examples/Makefile (clean): Pass -f option to rm.
6400 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6401 and define TEST_FOR_COMPARE_AND_SWAP.
6402 * sysdeps/i386/i486/pt-machine.h: Removed.
6404 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6407 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
6409 * restart.h (suspend): Clear p_signal before suspending.
6410 (suspend_with_cancellation): Likewise.
6411 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6413 * weaks.c: Make __pthread_key_create return 1.
6414 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6415 __libc_getspecific, __libc_setspecific, and __libc_key_t.
6416 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6419 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
6421 * sysdeps/sparc/pt-machine (RELEASE): Fix.
6423 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
6425 * sysdeps/powerpc/Implies: Added.
6426 * sysdeps/powerpc/pt-machine.h: Added.
6427 * sysdeps/powerpc/semaphorebits.h: Added.
6429 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
6431 * pthread.c (__pthread_initial_thread): Correct
6433 (__pthread_manager_thread): Likewise.
6434 Reported by Andreas Jaeger.
6436 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
6438 Since sigset_t no longer fits in a register, we can't pass in the
6439 thread's initial mask so easily. Take this opportunity to simplify
6440 the clone implementation by only accepting a single void* argument.
6442 * manager.c (__pthread_manager): Put thread vitals in the thread
6443 struct instead of as arguments through clone.
6444 (pthread_start_thread): Look for them there.
6445 * internals.h (struct _pthread): Add p_initial_fn,
6446 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
6447 * pthread.c (pthread_initialize_manager): Revise clone invocation.