1 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5 _POSIX_THREAD_PRIO_PROTECT): Define.
6 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
8 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
10 2004-11-26 Jakub Jelinek <jakub@redhat.com>
12 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
13 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
14 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
15 _POSIX_TYPED_MEMORY_OBJECTS): Define.
16 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
17 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
18 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
20 2004-11-05 Maciej W. Rozycki <macro@mips.com>
22 * sysdeps/mips/pspinlock.c: Include <sgidefs.h>. Use _ABIO32,
23 _ABIN32 and _ABI64 for ABI selection throughout.
24 * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
25 ABI selection throughout.
27 2004-10-18 Roland McGrath <roland@redhat.com>
30 * Makefile (linuxthreads-CPPFLAGS): New variable;
31 adds -DIS_IN_linuxthreads=1.
32 * sysdeps/i386/tls.h: Protect "useldt.h" with
33 [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
34 * sysdeps/i386/i686/pt-machine.h: Revert last change.
36 2004-10-14 Jakub Jelinek <jakub@redhat.com>
38 * sysdeps/pthread/errno-loc.c: Don't undef #errno
39 if RTLD_PRIVATE_ERRNO.
41 2004-10-05 Dwayne Grant McConnell <dgm69@us.ibm.com>
43 * pthread.c: Mask restart signal during cancel signal handler.
45 2004-10-05 Jakub Jelinek <jakub@redhat.com>
47 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
48 _POSIX_THREAD_CPUTIME): Define to 0.
50 2004-10-04 Ulrich Drepper <drepper@redhat.com>
52 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
53 and _POSIX_THREAD_CPUTIME to zero.
54 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
56 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
57 _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
58 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
59 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
60 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
62 2004-09-25 Roland McGrath <roland@redhat.com>
65 * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
66 [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
68 2004-09-24 Roland McGrath <roland@redhat.com>
71 * sysdeps/i386/tls.h: Move #include "useldt.h" outside
72 of [__ASSUME_LDT_WORKS > 0] test.
73 Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
75 2004-09-21 Roland McGrath <roland@redhat.com>
77 * Versions: Add comment about linuxthreads' frozen ABI.
79 2004-09-20 Ulrich Drepper <drepper@redhat.com>
81 * Versions: Remove exports for pthread_set*id_np functions.
82 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
84 * Makefile: Don't build pthread_set*id code for now.
86 2004-09-19 Ulrich Drepper <drepper@redhat.com>
88 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
89 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
90 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
91 and pthread_setresuid_np.
92 * pthread_setgid_np.c: New file.
93 * pthread_setuid_np.c: New file.
94 * pthread_setegid_np.c: New file.
95 * pthread_seteuid_np.c: New file.
96 * pthread_setregid_np.c: New file.
97 * pthread_setreuid_np.c: New file.
98 * pthread_setresgid_np.c: New file.
99 * pthread_setresuid_np.c: New file.
100 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
101 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
102 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
103 and pthread_setresuid_np.
104 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
105 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
106 pthread_setregid, and pthread_setresgid.
108 2004-09-12 Ulrich Drepper <drepper@redhat.com>
110 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
112 * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
113 for __USE_XOPEN2K. [BZ #320]
115 2004-09-04 Jakub Jelinek <jakub@redhat.com>
117 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
119 2004-09-07 Ulrich Drepper <drepper@redhat.com>
121 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
122 the initialization function might throw.
124 2004-08-30 Roland McGrath <roland@frob.com>
126 * Makefile (libpthread-abi-frozen): New variable.
128 2004-08-26 Roland McGrath <roland@redhat.com>
130 * configure.in: New file. If nptl add-on is also selected, barf if
131 explicit and elide ourselves if implicit.
132 * configure: Now generated.
134 2004-08-25 Richard Sandiford <rsandifo@redhat.com>
136 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
137 __local_multiple_threads): Fix definitions for IS_IN_librt.
138 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
140 2004-08-22 Andreas Schwab <schwab@suse.de>
142 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
143 Save gp around CENABLE/CDISABLE calls.
145 2004-08-15 Roland McGrath <roland@frob.com>
147 * pthread_atfork.c: Update copyright terms including special exception
148 for these trivial files, which are statically linked into executables
149 that use dynamic linking for the significant library code.
151 2004-08-09 Jakub Jelinek <jakub@redhat.com>
153 * libc-tsd.c: Move resolv.h include before the #if.
154 (__res_maybe_init): New function. Add libc_hidden_def.
156 2004-08-02 Ulrich Drepper <drepper@redhat.com>
158 * linuxthreads.texi (Cleanup Handlers): Fix typo.
159 Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
161 2004-07-23 Jakub Jelinek <jakub@redhat.com>
164 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
165 instead of clockid_t.
167 2004-07-21 Roland McGrath <roland@redhat.com>
169 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
171 2004-07-02 Roland McGrath <roland@redhat.com>
173 * configure: Don't exit.
175 2004-07-20 Alexandre Oliva <aoliva@redhat.com>
177 * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
179 * sysdeps/mips/atomicity.h: Likewise.
181 2004-07-19 Alexandre Oliva <aoliva@redhat.com>
183 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
184 Remove redundant override that missed -g0.
186 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
188 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
189 (__local_multiple_threads): Define for librt.
190 (SINGLE_THREAD_P): Likewise.
192 2004-07-07 Jakub Jelinek <jakub@redhat.com>
194 * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
195 using other thread's clock.
196 * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
197 * ptclock_settime.c (__pthread_clock_settime): Likewise.
198 * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
200 Reported by Bernd Schmidt <bernds@redhat.com>.
201 * Makefile (librt-tests): Add tst-clock1.
202 * tst-clock1.c: New test.
204 * sysdeps/x86_64/Versions: New file.
205 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
206 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
208 2004-04-16 Andreas Schwab <schwab@suse.de>
210 * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
212 2004-07-05 Jakub Jelinek <jakub@redhat.com>
214 * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
215 __pthread_spin_trylock): Use constraint "m" instead of "0" for
217 * sysdeps/ia64/pt-machine.h (__compare_and_swap,
218 __compare_and_swap_with_release_semantic, testandset): Use
219 constraint "m" instead of "0" for futex.
221 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
223 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
224 branch offset for a PLT entry.
225 (CDISABLE): Likewise.
227 2004-05-31 Andreas Jaeger <aj@suse.de>
229 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
230 Set to -fno-unit-at-a-time.
231 Patch by Dan Kegel <dank@kegel.com>.
233 2004-05-04 Jakub Jelinek <jakub@redhat.com>
235 * tst-stack1.c: Don't include mcheck.h.
236 (do_test): Make sure user defined stacks aren't reused,
237 don't free them at the end. [BZ #110]
239 2004-05-02 Jakub Jelinek <jakub@redhat.com>
241 * manager.c: Include not-cancel.h.
242 (__pthread_manager): Use read_not_cancel instead of __libc_read.
243 (pthread_start_thread, __pthread_manager_sighandler): Use
244 write_not_cancel instead of __libc_write.
245 (pthread_reap_children): Use waitpid_not_cancel instead of
247 * pthread.c: Include not-cancel.h.
248 (__pthread_initialize_minimal, __pthread_create_2_1,
249 pthread_onexit_process, __pthread_message): Use
250 write_not_cancel instead of __libc_write.
251 (__pthread_initialize_manager): Likewise. Use close_not_cancel
252 instead of __libc_close.
253 (__pthread_reset_main_thread): Use close_not_cancel instead of
255 * join.c: Include not-cancel.h.
256 (__pthread_do_exit, pthread_join, pthread_detach): Use
257 write_not_cancel instead of __libc_write.
258 * semaphore.c: Include not-cancel.h.
259 (__new_sem_post): Use write_not_cancel instead of __libc_write.
260 * specific.c: Include not-cancel.h.
261 (pthread_key_delete): Use write_not_cancel instead of __libc_write.
263 2004-05-01 Jakub Jelinek <jakub@redhat.com>
265 * Versions (libc): Add __on_exit and __libc_sigaction.
267 2004-04-28 Jakub Jelinek <jakub@redhat.com>
269 * semaphore.c (sem_timedwait): Return -1 and set errno instead of
270 returning error number [BZ #133]. Patch by <rmhaddad@yahoo.com>.
272 2004-04-22 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
274 * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
275 reference in PIC case.
277 2004-04-20 Jakub Jelinek <jakub@redhat.com>
279 * oldsemaphore.c (SEM_VALUE_MAX): Remove.
281 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
283 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
284 for librt. Save the return value to a safe register.
285 (CDISABLE): Define for librt. Set the function argument correctly.
287 2004-04-18 Jakub Jelinek <jakub@redhat.com>
289 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
290 (PSEUDO_CANCEL): Define.
292 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
293 CDISABLE): For librt, append @PLT.
295 2004-04-17 Jakub Jelinek <jakub@redhat.com>
297 * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
299 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
300 return it_value { 0, 0 }.
301 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
303 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
304 assertion for SIGEV_NONE.
305 (thread_attr_compare): Compare all attributes, not just a partial
308 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
310 2004-04-17 Ulrich Drepper <drepper@redhat.com>
312 * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
314 2004-04-16 Ulrich Drepper <drepper@redhat.com>
316 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
318 2004-04-13 Jakub Jelinek <jakub@redhat.com>
320 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
322 2004-04-12 Ulrich Drepper <drepper@redhat.com>
324 * sysdeps/unix/sysv/linux/mq_notify.c: New file.
326 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
328 (CDISABLE): Likewise.
330 2004-04-08 Jakub Jelinek <jakub@redhat.com>
332 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
333 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
334 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
335 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
336 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
338 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
339 (_POSIX_MESSAGE_PASSING): Define.
341 2004-04-10 Andreas Jaeger <aj@suse.de>
343 * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
344 to avoid warnings with GCC 3.5.
346 2004-04-09 Steven Munroe <sjmunroe@us.ibm.com>
348 * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
349 __thread_self assignment.
350 (THREAD_DTV): Replace __thread_register with __thread_self.
351 (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
354 2004-04-08 Alexandre Oliva <aoliva@redhat.com>
356 * signals.c (pthread_sigmask): Don't ever block or mask
359 2004-03-11 Steven Munroe <sjmunroe@us.ibm.com>
361 * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
363 2004-03-23 Ulrich Drepper <drepper@redhat.com>
365 * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
366 * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
368 2004-03-12 Ulrich Drepper <drepper@redhat.com>
370 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
371 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
372 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
373 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
375 2004-03-08 Andreas Jaeger <aj@suse.de>
377 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
378 dl_osversion is readonly.
380 2004-03-07 Ulrich Drepper <drepper@redhat.com>
382 * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
384 * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
386 2004-02-20 Steven Munroe <sjmunroe@us.ibm.com>
388 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
389 valid for SHARED case. Correct spelling of __vmx_longjmp.
391 * sysdeps/powerpc/pspinlock.c: Move from here.
392 * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
393 * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
394 * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
395 and __compare_and_swap32_with_release_semantics.
397 2004-02-20 Jakub Jelinek <jakub@redhat.com>
399 * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
400 (tests): Remove $(objpfx)tst-stack1-mem.
401 (tst-stack1-ENV): Remove.
402 ($(objpfx)tst-stack1-mem): Remove.
404 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
405 (__syscall_error_handler2): Call CDISABLE.
406 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
407 (__syscall_error_handler2): Call CDISABLE.
409 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
411 2004-02-10 Steven Munroe <sjmunroe@us.ibm.com>
413 * Makefile (libpthread-routines): Add ptcleanup.
414 * ptlongjmp.c: Removed.
415 * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
416 * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
417 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
418 Version longjmp, siglongjmp for GLIBC_2.3.4.
419 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
421 2004-01-22 Andreas Jaeger <aj@suse.de>
423 * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
424 (__pthread_release): Likewise.
426 2004-01-16 Richard Henderson <rth@redhat.com>
428 * attr.c: Include ldsodefs.h.
429 (pthread_getattr_np): Don't declare __libc_stack_end.
431 2004-01-09 Steven Munroe <sjmunroe@us.ibm.com>
433 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
434 [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
435 __lib*_multiple_threads.
436 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
437 [!HAVE_TLS_SUPPORT]: Likewise.
439 2004-01-13 Roland McGrath <roland@redhat.com>
441 * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
444 2004-01-10 Andreas Jaeger <aj@suse.de>
446 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
448 2004-01-01 Andreas Jaeger <aj@suse.de>
450 * Makefile (generated): Add missing files.
452 2003-12-31 Ulrich Drepper <drepper@redhat.com>
454 * attr.c (pthread_getattr_np): Make sure stack info returned for
455 main thread does not overlap with any other VMA.
456 Patch by Jakub Jelinek.
458 2003-12-29 Jakub Jelinek <jakub@redhat.com>
460 * sysdeps/ia64/tls.h: Include dl-sysdep.h.
461 (INIT_SYSINFO): Define.
462 (TLS_INIT_TP): Use it.
464 2003-12-28 Carlos O'Donell <carlos@baldric.uwo.ca>
466 * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
468 2003-12-26 Jakub Jelinek <jakub@redhat.com>
470 * sysdeps/pthread/pthread.h (pthread_setcancelstate,
471 pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
473 * semaphore.h (sem_wait, sem_timedwait): Likewise.
475 2003-12-17 Jakub Jelinek <jakub@redhat.com>
477 * manager.c (pthread_free): Call _dl_deallocate_tls even for
479 * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
481 (pthread_onexit_process): Update comment.
482 * Makefile (tests): Add tst-stack1. Depend on $(objpfx)tst-stack1-mem.
483 (generated): Add tst-stack1.mtrace and tst-stack1-mem.
484 (tst-stack1-ENV): Set.
485 ($(objpfx)tst-stack1-mem): New.
486 * tst-stack1.c: New test.
488 2003-12-16 Steven Munroe <sjmunroe@us.ibm.com>
490 * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
491 conditional so MULTIPLE_THREADS_OFFSET is generated for both.
492 * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
493 so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
494 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
497 2003-12-04 Steven Munroe <sjmunroe@us.ibm.com>
499 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
500 (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
502 2003-12-10 David Mosberger <davidm@hpl.hp.com>
504 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
505 message. Add include of <stddef.h>.
506 (INIT_NEW_WAY): New macro.
507 (INIT_OLD_WAY): Likewise.
508 (_init): Add unwind directives. Invoke
509 __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
511 (_init_EPILOG_BEGINS): Add unwind-directives. Drop unused .regstk
513 (_fini): Add unwind directives. Drop unnecessary .align 16
514 directive (bundles are always 16-byte aligned).
515 (_fini_EPILOG_BEGINS): Add unwind-directives.
517 2003-11-19 David Mosberger <davidm@hpl.hp.com>
519 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
521 2003-12-10 Andreas Jaeger <aj@suse.de>
522 Ruediger Oertel <ro@suse.de>
524 * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
526 2003-11-30 Andreas Jaeger <aj@suse.de>
528 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
529 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
532 2003-11-04 Jakub Jelinek <jakub@redhat.com>
534 * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
535 __libc_sigaction if it has been one of the special values before.
537 2003-10-06 Carlos O'Donell <carlos@baldric.uwo.ca>
539 * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
540 (__pthread_find_self): Likewise.
541 * manager.c (thread_segment): _STACK_GROWS_UP case added.
543 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
545 * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
547 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
549 * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
551 2003-10-07 Jakub Jelinek <jakub@redhat.com>
553 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
555 (SAVE_OLDTYPE_0): Fix a typo.
557 2003-10-02 Ulrich Drepper <drepper@redhat.com>
559 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
562 2003-10-02 Jakub Jelinek <jakub@redhat.com>
564 * Makefile (tests): Add tst-cancel8.
565 * tst-cancel8.c: New test.
567 2003-10-02 Ulrich Drepper <drepper@redhat.com>
569 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
570 restoring of the old cancellation type.
572 2003-09-10 Chris Demetriou <cgd@broadcom.com>
574 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
576 2003-09-30 Jakub Jelinek <jakub@redhat.com>
578 * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
579 mutex_lock, mutex_trylock, mutex_unlock): Remove.
581 2003-09-27 Wolfram Gloger <wg@malloc.de>
583 * sysdeps/pthread/malloc-machine.h: New file.
585 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
587 * attr.c (__pthread_attr_init_2_1): Double __guardsize size
588 if NEED_SEPARATE_REGISTER_STACK is defined.
590 2003-09-22 Philip Blundell <philb@gnu.org>
592 * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
593 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
595 * pthread.c (__pthread_elements): Initialise these new elements.
596 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
598 (__libc_cleanup_pop): Likewise.
600 2003-09-22 Jakub Jelinek <jakub@redhat.com>
602 * attr.c: Include stdlib.h.
604 2003-09-18 Jakub Jelinek <jakub@redhat.com>
606 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
608 * tst-attr1.c: New test.
609 * Makefile (tests): Add tst-attr1.
611 2003-09-17 Philip Blundell <philb@gnu.org>
613 * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
614 libpthread is loaded. Elide backwards compatibility code when not
617 2003-09-17 Jakub Jelinek <jakub@redhat.com>
619 * descr.h (manager_thread): Rename to...
620 (__pthread_manager_threadp): ... this.
621 * pthread.c (manager_thread): Define to __pthread_manager_threadp.
622 (__pthread_manager_threadp): New variable.
623 * internals.h (__manager_thread): Define to
624 __pthread_manager_threadp if USE_TLS.
626 2003-09-15 Jakub Jelinek <jakub@redhat.com>
628 * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
629 CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
630 -mpreferred-stack-boundary=4.
632 2003-09-16 Ulrich Drepper <drepper@redhat.com>
634 * attr.c (pthread_getattr_np): Correctly fill in the stack-related
635 values for the initial thread.
637 2003-09-17 Jakub Jelinek <jakub@redhat.com>
639 * pthread.c (manager_thread): Remove static, add attribute_hidden.
640 (thread_self_stack): Rename to...
641 (__pthread_self_stack): ... this. Remove static.
642 (pthread_handle_sigcancel): Use check_thread_self ().
643 (pthread_handle_sigrestart): Likewise.
644 * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
646 * descr.h (manager_thread): Declare.
647 * internals.h (__pthread_self_stack): New prototype.
648 (__manager_thread): Define.
649 (check_thread_self): New function.
651 2003-09-15 Jakub Jelinek <jakub@redhat.com>
653 * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
654 (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
656 2003-09-12 Jakub Jelinek <jakub@redhat.com>
658 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
659 (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
660 __SLONGWORD_TYPE otherwise.
662 2003-09-11 Steven Munroe <sjmunroe@us.ibm.com>
664 * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
665 [READ_MEMORY_BARRIER]: Define.
666 [WRITE_MEMORY_BARRIER]: Define.
668 2003-09-10 Jakub Jelinek <jakub@redhat.com>
670 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
671 ptr___pthread_cond_timedwait to the end of the structure to avoid
672 breaking Wine unnecessarily.
674 2003-09-08 Jakub Jelinek <jakub@redhat.com>
676 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
678 2003-09-02 Jakub Jelinek <jakub@redhat.com>
680 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
681 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
682 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
683 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
684 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
685 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
686 * attr.c (__old_pthread_attr_setstacksize,
687 __old_pthread_attr_setstack): New functions.
688 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
689 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
690 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
691 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
692 * tststack.c: Include limits.h and sys/param.h.
693 (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
695 * barrier.c (__pthread_barrierattr_getpshared): Always
696 return PTHREAD_PROCESS_PRIVATE.
697 (pthread_barrierattr_setpshared): Return EINVAL if pshared
698 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
700 2003-09-02 Ulrich Drepper <drepper@redhat.com>
702 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
703 (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
706 * barrier.c (pthread_barrierattr_setpshared): We don't handle
707 inter-process barriers.
709 2003-09-01 Jakub Jelinek <jakub@redhat.com>
711 * Makefile (tests): Add tst-tls1.
712 (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
713 ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
714 ($(objpfx)tst-tls1): New.
715 ($(objpfx)tst-tls2.out): Likewise.
716 (tests): Depend on $(objpfx)tst-tls2.out.
717 * tst-tls1.c: New test.
719 * tst-tls1mod.c: New.
720 * tst-tls1moda.c: New.
721 * tst-tls1modb.c: New.
722 * tst-tls1modc.c: New.
723 * tst-tls1modd.c: New.
724 * tst-tls1mode.c: New.
725 * tst-tls1modf.c: New.
726 * tst-tls2.sh: New test.
728 * internals.h (__pthread_cond_timedwait): New prototype.
729 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
730 ptr___pthread_cond_timedwait.
731 * pthread.c (__pthread_functions): Initialize them.
732 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
733 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
734 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
735 pthread_cond_timedwait@@GLIBC_2.3.2.
737 2003-08-27 Ulrich Drepper <drepper@redhat.com>
739 * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
740 pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
741 __THROW to match NPTL.
743 2003-08-13 Ulrich Drepper <drepper@redhat.com>
745 * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
746 -DBROKEN_THREAD_SIGNALS.
748 2003-08-11 Steven Munroe <sjmunroe@us.ibm.com>
750 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
751 Correct spelling of per thread resolver state.
753 2003-08-07 Jakub Jelinek <jakub@redhat.com>
755 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
756 (__rtld_lock_default_lock_recursive,
757 __rtld_lock_default_unlock_recursive): Define.
758 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
759 __rtld_lock_unlock_recursive): Define using
760 GL(_dl_rtld_*lock_recursive).
761 * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
762 and _dl_rtld_unlock_recursive. Lock GL(_dl_load_lock) the same
763 number of times as GL(_dl_load_lock) using non-mt implementation was
766 2003-07-31 Jakub Jelinek <jakub@redhat.com>
768 * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
769 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
771 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
773 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
775 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
776 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
777 PTHREAD_STACK_MIN in comments.
779 * sysdeps/alpha/pt-machine.h (PT_EI): Add
780 __attribute__((always_inline)).
781 * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
782 * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
783 * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
784 * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
785 * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
786 * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
787 * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
788 * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
789 * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
790 * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
791 * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
792 * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
793 * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
794 * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
795 * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
796 * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
797 * spinlock.h (__pthread_set_own_extricate_if): Likewise.
798 * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
800 * Examples/ex13.c (main): Change res type to void * to avoid
802 * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
804 2003-07-30 Jakub Jelinek <jakub@redhat.com>
806 * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
808 (pthread_initialize): Initialize GL(dl_init_static_tls).
810 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
812 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
813 before __timer_dealloc.
814 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
815 Don't call list_unlink.
817 2003-07-29 Roland McGrath <roland@redhat.com>
819 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
821 2003-07-25 Roland McGrath <roland@redhat.com>
823 * manager.c (pthread_start_thread): Fix typo in last change.
825 2003-07-14 Guido Guenther <agx@sigxcpu.org>
827 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
828 use L() for local labels.
830 2003-07-22 Jakub Jelinek <jakub@redhat.com>
832 * descr.h (struct _pthread_descr_struct): Provide p_res member
833 even if USE_TLS && HAVE___THREAD.
834 * sysdeps/pthread/res-state.c (__res_state): Return __resp
836 * manager.c: Include resolv.h.
837 (pthread_start_thread): Initialize __resp.
838 * libc-tls-loc.c (__res_state): Return __resp.
839 * Makefile (tests): Add tst-_res1.
840 (modules-names, extra-objs, test-extras, test-modules): Add support
842 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
843 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
845 * tst-_res1.c: New test.
846 * tst-_res1mod1.c: New test.
847 * tst-_res1mod2.c: New test.
849 2003-07-20 Ulrich Drepper <drepper@redhat.com>
851 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
854 * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
856 2003-07-14 Ulrich Drepper <drepper@redhat.com>
858 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
859 in test for compilation in libc.
861 2003-07-04 Jakub Jelinek <jakub@redhat.com>
863 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
864 different symbol for the cancellation syscall wrapper and
865 non-cancellation syscall wrapper.
866 (PSEUDO_END): Define.
868 2003-07-05 Richard Henderson <rth@redhat.com>
870 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
872 2003-06-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
874 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
877 2003-06-21 Andreas Schwab <schwab@suse.de>
879 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
882 2003-06-20 Richard Henderson <rth@redhat.com>
884 * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
885 Remove ptw-osf_sigprocmask.
887 2003-06-18 Jakub Jelinek <jakub@redhat.com>
889 * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
890 __librt_disable_asynccancel): Declare.
891 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
893 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
895 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
896 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
897 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
898 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
899 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
900 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
901 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
902 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
903 * sysdeps/x86_64/tcb-offsets.sym: New file.
904 * sysdeps/x86_64/Makefile: New file.
905 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
906 * Versions (libc): Export __librt_enable_asynccancel,
907 __librt_disable_asynccancel and __librt_multiple_threads as
909 * libc-cancellation.c (__librt_multiple_threads,
910 __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
912 2003-06-12 Steven Munroe <sjmunroe@us.ibm.com>
914 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
915 (SINGLE_THREAD_P): Replace @ got notation with @toc.
917 2003-06-11 Ulrich Drepper <drepper@redhat.com>
919 * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
920 initializer [PR libc/5052].
922 2003-06-09 Andreas Schwab <schwab@suse.de>
924 * Makefile: Move inclusion of ../Rules down after extra-objs is
927 2003-06-06 Ulrich Drepper <drepper@redhat.com>
929 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
930 5+ arg syscalls only needed for PIC.
931 Patch by Ralph Siemsen <ralphs@netwinder.org>.
933 2003-06-05 Richard Henderson <rth@redhat.com>
935 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
936 and require CFI assembler directives.
937 * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
939 2003-05-30 Andreas Jaeger <aj@suse.de>
941 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
942 (SAVESTK_0): Add CFI directives.
943 (SAVESTK_3): Likewise.
944 (SAVESTK_5): Likewise.
945 (RESTSTK_0): Likewise.
946 (RESTSTK_3): Likewise.
947 (RESTSTK_5): Likewise.
949 2003-05-05 Ulrich Drepper <drepper@redhat.com>
951 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
954 2003-05-04 Roland McGrath <roland@redhat.com>
956 * Makefile ($(objpfx)../libc.so): New target.
958 2003-04-26 Ulrich Drepper <drepper@redhat.com>
960 * pthread.c (__pthread_initialize_manager): Remove one last
961 p_multiple_threads call.
963 2003-04-22 Jakub Jelinek <jakub@redhat.com>
965 * pthread.c (__pthread_initialize_manager): Subtract
966 TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
967 * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
968 instead of sizeof (pthread_descr).
969 (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
970 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
971 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
973 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
975 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
977 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
979 (NO_TLS_OFFSET): Define.
981 2003-04-22 Roland McGrath <roland@redhat.com>
983 * Makeconfig (shared-thread-library): Reverse link order to work
986 2003-04-20 Ulrich Drepper <drepper@redhat.com>
988 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
989 compiler knows we use the ldt_entry variable and that the syscall
992 * internals.h: Split pthread_functions definition into...
993 * sysdeps/pthread/pthread-functions.h: ...new file.
995 * sysdeps/i386/useldt.h: Include <sysdep.h>.
997 2003-04-13 Jakub Jelinek <jakub@redhat.com>
999 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1000 match changes in NPTL sysdep-cancel.h.
1002 2003-04-11 Roland McGrath <roland@redhat.com>
1004 * Makefile (multidir): Don't set the variable here with $(shell ...).
1005 ($(objpfx)multidir.mk): New target, generated makefile; include that.
1006 (generated): Append it.
1008 2003-04-10 Jakub Jelinek <jakub@redhat.com>
1010 * Makefile (multidir, crti-objs, crtn-objs): New variables.
1011 (generated-dirs): Add pathname component of multidir.
1012 (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1013 ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1014 ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1015 $(objpfx)$(multidir)/crtn.o): New.
1016 * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1017 * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1018 before-compile, generated): Don't generate and use specs.
1019 ($(objpfx)specs): Remove.
1021 2003-04-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1023 * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1025 2003-04-03 Ulrich Drepper <drepper@redhat.com>
1027 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1028 missing ; after ENTRY use [PR libc/4997].
1030 2003-04-03 Jakub Jelinek <jakub@redhat.com>
1032 * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1033 in case the parent blocked it.
1035 2003-04-02 Jakub Jelinek <jakub@redhat.com>
1037 * Makefile (libpthread-routines): Add pthread_atfork.
1038 (libpthread-static-only-routines): Add pthread_atfork.
1040 2003-04-01 Jakub Jelinek <jakub@redhat.com>
1042 * pthread.c (__pthread_wait_for_restart_signal): Use
1043 __pthread_sigsuspend instead of sigsuspend.
1044 * internals.h (__pthread_sigsuspend): New prototype.
1045 * Makefile (libpthread-routines): Add pt-sigsuspend.
1046 (tests): Add tst-cancel7.
1047 * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1048 * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1049 * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1050 * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1051 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1052 * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1053 * tst-cancel7.c: New test.
1055 2003-03-31 Alexandre Oliva <aoliva@redhat.com>
1057 * alloca_cutoff.c: Include internals.h.
1058 * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1059 * sysdeps/pthread/herrno-loc.c: Likewise.
1060 * sysdeps/pthread/res-state.c: Likewise.
1062 2003-03-25 Ulrich Drepper <drepper@redhat.com>
1064 * sysdeps/pthread/bits/typesizes.h: New file.
1065 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1066 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1068 2003-03-24 Daniel Jacobowitz <drow@mvista.com>
1070 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1071 (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1073 2003-03-22 Jakub Jelinek <jakub@redhat.com>
1075 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1077 2003-03-21 Daniel Jacobowitz <drow@mvista.com>
1079 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1080 (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1082 2003-03-21 Jakub Jelinek <jakub@redhat.com>
1084 * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1085 (TLS_SETUP_GS_SEGMENT): Fix a typo.
1087 2003-03-19 Ulrich Drepper <drepper@redhat.com>
1089 * sysdeps/pthread/Makefile: Fix cut&paste error.
1091 2003-03-18 Roland McGrath <roland@redhat.com>
1093 * Versions (libpthread: GLIBC_2.2): Remove
1094 pthread_barrierattr_getpshared, never really existed.
1095 (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1096 (libpthread: GLIBC_PRIVATE): ... here.
1098 2003-03-14 Jakub Jelinek <jakub@redhat.com>
1100 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1101 * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1104 2003-03-14 Alexandre Oliva <aoliva@redhat.com>
1106 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1108 * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1109 Handle 64-bit longs on n64.
1111 2003-03-07 Jakub Jelinek <jakub@redhat.com>
1113 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1114 __pthread_spin_trylock): Rewritten.
1116 2003-03-06 Ulrich Drepper <drepper@redhat.com>
1118 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1121 2003-03-02 Ulrich Drepper <drepper@redhat.com>
1123 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1124 error for CPU clocks.
1126 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1127 _POSIX_MONOTONIC_CLOCK.
1128 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1130 2003-03-01 Roland McGrath <roland@redhat.com>
1132 * sysdeps/powerpc/powerpc64/pt-machine.h
1133 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1135 * sysdeps/powerpc/tls.h: Don't define those here.
1137 * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1138 tcbhead_t with multiple_threads member.
1139 [USE_TLS] (tcbhead_t): Define minimal one-word version.
1140 [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1141 * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1142 derive thread register offset of p_multiple_threads member.
1144 * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1145 Conditionalize p_header member on this.
1146 [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1147 * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1148 * sysdeps/sh/tls.h: Likewise.
1149 * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1150 * sysdeps/sh/tcb-offsets.sym: Likewise.
1151 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1152 (SINGLE_THREAD_P): Likewise.
1153 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1154 (SINGLE_THREAD_P): Likewise.
1155 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1156 (SINGLE_THREAD_P): Likewise.
1157 * pthread.c (__pthread_initialize_manager): Likewise.
1158 * manager.c (pthread_handle_create): Likewise.
1160 * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1163 2003-01-31 Steven Munroe <sjmunroe@us.ibm.com>
1165 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1166 Conditionalize .toc section magic on this.
1168 2003-02-21 Roland McGrath <roland@redhat.com>
1170 * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1171 instead of __rpc_thread_destroy.
1173 2003-02-21 Jakub Jelinek <jakub@redhat.com>
1175 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1176 __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1177 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1179 * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1180 to crti.o and crtn.o.
1181 * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1183 2003-02-21 Roland McGrath <roland@redhat.com>
1185 * Makefile (install-lib-ldscripts): New variable.
1187 2003-02-20 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1189 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1190 interprocedure branches.
1192 2003-02-19 Ulrich Drepper <drepper@redhat.com>
1194 * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1195 need the target thread's lock.
1197 2003-02-17 Ulrich Drepper <drepper@redhat.com>
1199 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1202 2003-02-17 Kevin B. Hendricks <kevin.hendricks@sympatico.ca>
1203 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1205 * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1206 * sysdeps/powerpc/tcb-offsets.sym: New file.
1207 * sysdeps/powerpc/tls.h: New file.
1208 * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1209 (ARCH_STACK_MAX_SIZE): Define.
1210 (THREAD_SELF): Define.
1211 (INIT_THREAD_SELF): Define.
1212 (THREAD_GETMEM): Define.
1213 (THREAD_GETMEM_NC): Define.
1214 (THREAD_SETMEM): Define.
1215 (THREAD_SETMEM_NC): Define.
1216 (__thread_self): Declare.
1217 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1218 for thread register.
1220 2003-02-14 Steven Munroe <sjmunroe@us.ibm.com>
1222 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1223 Check pthread_create existance, not __pthread_fork.
1225 2003-02-12 Ulrich Drepper <drepper@redhat.com>
1227 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1229 2003-02-10 Jakub Jelinek <jakub@redhat.com>
1231 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1232 pthread_create existance, not __pthread_fork.
1233 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1234 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1235 * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1236 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1238 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1239 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1240 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1241 Add .weak pthread_create.
1242 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1243 Check pthread_create existance, not __pthread_fork.
1244 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1245 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1246 __fork whenever libpthread.so is loaded.
1248 2003-02-09 Andreas Jaeger <aj@suse.de>
1250 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1251 Rework: %r9 is destroyed by functions so don't use it as
1252 temporary, align stack correctly, fix parameter for CDISABLE.
1254 2003-02-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1256 * sysdeps/sh/Makefile: New file.
1257 * sysdeps/sh/tcb-offsets.sym: Likewise.
1258 * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1259 of linuxthreads/descr.h after the definition of THREAD_SELF.
1260 (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1261 (TLS_TCB_SIZE): Set size of tcbhead_t.
1262 (TLS_PRE_TCB_SIZE): Define.
1263 (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1264 a member of thread structure.
1265 (THREAD_DTV): Likewise.
1266 (TLS_INIT_TP_EXPENSIVE): Remove.
1267 (TLS_INIT_TP): Set gbr register only.
1269 (INIT_THREAD_SELF): Likewise.
1270 (NONTLS_INIT_TP): New.
1271 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1273 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1274 SYSCALL_INST_PAD macro after DO_CALL.
1275 (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1277 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1278 whenever libpthread.so is loaded.
1280 2003-02-08 Andreas Schwab <schwab@suse.de>
1282 * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1283 libpthread.so is loaded.
1285 2003-02-07 Ulrich Drepper <drepper@redhat.com>
1287 * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1288 __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1289 no __NR_vfork definition.
1291 2003-02-07 Jakub Jelinek <jakub@redhat.com>
1293 * tst-popen2.c: New test.
1294 * Makefile (tests): Add tst-popen2.
1295 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1296 whenever libpthread.so is loaded.
1297 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1298 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1299 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1300 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1302 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1303 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1304 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1306 2003-02-05 Ulrich Drepper <drepper@redhat.com>
1308 * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1309 variable for non-libpthread case to the same value the
1310 pthread_once function would use.
1312 2003-02-03 Jakub Jelinek <jakub@redhat.com>
1314 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1315 BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1317 2003-02-04 Andreas Jaeger <aj@suse.de>
1319 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1322 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1324 * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1326 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1328 * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1329 THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1331 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1332 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1333 * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1334 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1335 * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1336 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1337 * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1338 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1339 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1340 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1341 * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1342 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1344 2003-01-27 Martin Schwidefsky <schwidefsky@de.ibm.com>
1346 * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1347 Define TLS versions.
1348 * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1350 * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1351 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1352 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1354 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1355 branch with 32 bit offset.
1356 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1358 2003-01-24 Jakub Jelinek <jakub@redhat.com>
1360 * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1361 as required by TLS ABI.
1362 * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1363 * sysdeps/sparc/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 [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1368 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1369 instead of %g6 for thread pointer.
1370 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1371 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1372 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1374 2003-01-25 Guido Guenther <agx@sigxcpu.org>
1376 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1377 * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1379 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1381 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1382 reference to __fork.
1384 2003-01-17 Richard Henderson <rth@redhat.com>
1386 * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1387 (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1388 (TLS_PRE_TCB_SIZE): New.
1389 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1390 new ia64-style thread pointer layout.
1391 (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1392 (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1393 * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1396 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1398 * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1400 (NONTLS_INIT_TP): Revert last change.
1401 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1402 offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1404 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1406 * pthread.c (_pthread_initialize_minimal): Use
1407 GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1408 been already initialized.
1410 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1412 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1415 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1417 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1418 __libc_lock_init_recursive): Initialize fields directly.
1420 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1422 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1423 __fork to be far away from __vfork ifndef SHARED.
1424 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1426 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1427 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1428 Add a missing instruction.
1429 * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1430 branch to __fork even if __NR_vfork is not defined.
1432 2003-01-14 Ulrich Drepper <drepper@redhat.com>
1434 * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1437 2003-01-14 Steven Munroe <sjmunroe@us.ibm.com>
1439 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1441 2003-01-14 Jakub Jelinek <jakub@redhat.com>
1443 * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1445 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1447 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1448 unterminated string literals.
1449 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1451 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1453 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1454 (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from
1455 PSEUDO_END to PSEUDO.
1456 (PSEUDO_END): Remove.
1457 (SINGLE_THREAD_P): Save an instruction.
1458 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1459 parameter to SINGLE_THREAD_P call.
1460 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1463 2003-01-10 Andreas Schwab <schwab@suse.de>
1465 * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1467 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1469 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1470 backchain in pseudo_cancel. Minor code improvements.
1471 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1474 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1476 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1477 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1479 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1481 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1483 2002-01-09 Richard Henderson <rth@redhat.com>
1485 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1486 ret follows pseudo, and thus avoid branch-to-branch in cancel
1487 case. Use SYSCALL_ERROR_LABEL.
1489 2003-01-11 Philip Blundell <philb@gnu.org>
1491 * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1492 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1493 Correctly unstack lr.
1494 (UNDOARGS_5): Fix ordering of pushes and pops.
1495 (SINGLE_THREAD_P_PIC): New.
1496 (SINGLE_THREAD_P_INT): New.
1497 (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it
1499 (PSEUDO): Use SINGLE_THREAD_P_INT.
1501 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1503 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1505 2003-01-11 Jakub Jelinek <jakub@redhat.com>
1507 * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1508 [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1509 TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1510 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1511 INIT_THREAD_SELF): Define.
1512 [HAVE_TLS_SUPPORT]: Include descr.h.
1513 (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1514 struct _pthread_descr_struct.
1515 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1516 THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1518 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1520 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1522 (__pthread_initialize_manager): Rename tcb to mgr.
1523 Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1524 _pthread_descr) below tcbp, otherwise to tcbp.
1525 * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1526 new_thread to be below _dl_allocate_tls (). Adjust new_thread back
1527 before freeing. Fix clone arguments if report_events and USE_TLS.
1528 (pthread_free): Adjust th back before freeing.
1530 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
1532 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1533 * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1534 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1536 2003-01-09 Jakub Jelinek <jakub@redhat.com>
1538 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1539 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1540 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1541 [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1542 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1543 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1544 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1545 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1546 * tst-popen.c: New test.
1547 * Makefile (tests): Add tst-popen.
1549 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1551 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1552 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1554 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1556 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1557 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
1559 2003-01-06 Philip Blundell <philb@gnu.org>
1561 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1563 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1565 * internals.h (LIBC_CANCEL_HANDLED): Define.
1566 * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1567 * signals.c (LIBC_CANCEL_HANDLED): Add.
1568 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1569 * tst-cancel-wrappers.sh: Remove all exceptions.
1571 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1573 2003-01-05 Andreas Schwab <schwab@suse.de>
1575 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1578 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1580 (CENABLE): Likewise.
1581 (CDISABLE): Likewise.
1583 2003-01-05 Ulrich Drepper <drepper@redhat.com>
1585 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1586 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1588 * Makefile (libc.so-no-z-defs): Define to yes.
1590 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1592 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1593 (tcbhead_t): Add multiple_threads member.
1594 (TLS_INIT_TP_EXPENSIVE): Define.
1595 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1596 strings. Remove unused code.
1597 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1599 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1601 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1602 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1604 2003-01-04 Jakub Jelinek <jakub@redhat.com>
1606 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1607 even if NOT_IN_libc is defined.
1609 2003-01-05 Jakub Jelinek <jakub@redhat.com>
1611 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1612 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1613 * sysdeps/s390/Makefile: New file.
1614 * sysdeps/s390/tcb-offsets.sym: New file.
1615 * sysdeps/s390/tls.h: New file.
1617 2003-01-03 Richard Henderson <rth@redhat.com>
1619 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1621 2003-01-03 Andreas Jaeger <aj@suse.de>
1623 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1625 2003-01-03 Jakub Jelinek <jakub@redhat.com>
1627 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1629 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1631 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1634 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1636 * internals.h (struct pthread_functions): Rename
1637 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1638 * pthread.c (pthread_functions): Adjust.
1639 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1640 pthread_cond_*@GLIBC_2.0 compatibility symbols.
1641 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1642 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1643 and pthread_cond_wait.
1645 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1647 (pthread_cond_t): Add __align member, shorten __padding.
1648 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1649 __padding and __align too.
1651 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1653 * sysdeps/pthread/sigaction.c: New file.
1654 * sysdeps/unix/sysv/linux/raise.c: New file.
1655 * sysdeps/unix/sysv/linux/sigwait.c: New file.
1656 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1657 weak_extern with #ifndef SHARED.
1658 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1660 * signals.c (__sigaction): Renamed to...
1661 (__pthread_sigaction): ... this.
1662 (__sigaction): New strong alias, #ifdef SHARED only.
1663 (sigaction): Protect with #ifdef SHARED.
1664 (sigwait): Renamed to...
1665 (__pthread_sigwait): ... this.
1666 (sigwait): New strong alias, #ifdef SHARED only.
1667 (raise): Renamed to...
1668 (__pthread_raise): ... this.
1669 (raise): New strong alias, #ifdef SHARED only.
1670 * internals.h (__pthread_sigaction, __pthread_sigwait,
1671 __pthread_raise): New prototypes.
1672 (struct pthread_functions): Add ptr_pthread_sigaction,
1673 ptr_pthread_sigwait, ptr_pthread_raise.
1674 * pthread.c (pthread_functions): Renamed to...
1675 (__pthread_functions): ... this. No longer static, no longer
1676 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1677 and ptr_pthread_raise.
1678 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1679 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1680 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1681 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1683 * Makefile (tests, tests-static): Add tst-cancel-static.
1684 * tst-cancel-static.c: New test.
1686 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1688 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1690 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1692 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1693 * condvar.c: Add symbol versioning. The compatibility versions
1694 are the same as the change in the interface does not effect this
1696 * Versions [libpthread]: Add definitions for new pthread_cond_*
1697 interfaces for version GLIBC_2.3.2.
1699 2002-12-31 Ulrich Drepper <drepper@redhat.com>
1701 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1703 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1704 for __register_atfork.
1706 2002-12-31 Jakub Jelinek <jakub@redhat.com>
1708 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1709 ASSEMBLER test macro.
1710 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1711 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1712 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1713 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1714 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1715 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1717 * sysdeps/pthread/errno-loc.c (__errno_location): Add
1719 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1720 * sysdeps/pthread/res-state.c (__res_state): Likewise.
1721 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1722 __libc_current_sigrtmax): Likewise.
1723 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1724 __libc_internal_tsd_set, __libc_internal_tsd_address,
1725 __libc_alloca_cutoff.
1726 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1727 __libc_internal_tsd_set, __libc_internal_tsd_address.
1729 * sysdeps/pthread/list.h: Remove assert.h include.
1730 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1732 * sysdeps/pthread/list.h: New file.
1733 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1734 * sysdeps/unix/sysv/linux/fork.c: New file.
1735 * sysdeps/unix/sysv/linux/fork.h: New file.
1736 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1737 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1738 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1739 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1740 * sysdeps/unix/sysv/linux/Makefile: New file.
1741 * sysdeps/unix/sysv/linux/Versions: New file.
1742 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1743 (__pthread_cleanup_upto): ...this. Add targetframe argument,
1744 use it instead of currentframe. No longer static.
1745 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1746 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1747 (struct pthread_functions): Add ptr_pthread_fork,
1748 ptr_pthread_cleanup_upto.
1749 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1750 ptr_pthread_cleanup_upto.
1751 * ptfork.c: Include fork.h.
1752 (struct handler_list, struct handler_list_block): Remove.
1753 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1754 pthread_atfork_child): Remove.
1755 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1756 (__pthread_fork): New function.
1757 (__fork, __vfork): Call __libc_fork.
1758 * Makefile (libpthread-routines): Add old_pthread_atfork.
1759 (libpthread-nonshared): Add pthread_atfork.
1760 (others): Depend on $(objpfx)libpthread_nonshared.a.
1761 ($(objpfx)libpthread_nonshared.a): New rule.
1762 (install): Depend on $(inst_libdir)/libpthread.so.
1763 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1765 (tests): Depend on libpthread_nonshared.a too.
1766 * old_pthread_atfork.c: New file.
1767 * pthread_atfork.c: New file.
1768 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1771 2002-12-30 Jakub Jelinek <jakub@redhat.com>
1773 * forward.c: Make all functions available by default again. It
1774 caused too much trouble.
1775 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1776 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1777 ptr___pthread_attr_init_2_*.
1778 * pthread.c (pthread_functions): Adjust.
1780 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1782 * libc_pthread_init.c (__libc_pthread_init): Remove
1783 MULTIPLE_THREADS_OFFSET check.
1784 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1785 (SYSINFO_OFFSET): Remove.
1786 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1788 * sysdeps/i386/tcb-offsets.sym: New file.
1789 * sysdeps/pthread/tcb-offsets.h: New file.
1790 * sysdeps/sparc/sparc32/tls.h: Removed.
1791 * sysdeps/sparc/sparc64/tls.h: Move...
1792 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
1793 * sysdeps/sparc/Makefile: New file.
1794 * sysdeps/sparc/tcb-offsets.sym: New file.
1795 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1796 * sysdeps/ia64/Makefile: New file.
1797 * sysdeps/ia64/tcb-offsets.sym: New file.
1798 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1799 (MULTIPLE_THREADS_OFFSET): Remove.
1800 Replace defined MULTIPLE_THREADS_OFFSET
1801 with defined FLOATING_STACKS && USE___THREAD.
1802 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1803 (MULTIPLE_THREADS_OFFSET): Remove.
1804 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1805 (MULTIPLE_THREADS_OFFSET): Remove.
1806 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1807 (MULTIPLE_THREADS_OFFSET): Remove.
1808 * pthread.c (__pthread_initialize_manager): Remove
1809 MULTIPLE_THREADS_OFFSET cbeck.
1811 * tst-cancel-wrappers.sh: Add line continuations.
1813 2002-12-27 Jakub Jelinek <jakub@redhat.com>
1815 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1816 and bits/libc-lock.h.
1817 (__libc_internal_tsd_get, __libc_internal_tsd_set,
1818 __libc_internal_tsd_address): Remove.
1819 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1820 __pthread_internal_tsd_set): New weak_externs.
1821 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1822 using __libc_maybe_call2.
1823 (__libc_tsd_key_t): Move to ...
1824 * descr.h (__libc_tsd_key_t): ...here.
1825 Remove bits/libc-tsd.h include.
1826 * sysdeps/pthread/errno-loc.c: New file.
1827 * sysdeps/pthread/herrno-loc.c: New file.
1828 * sysdeps/pthread/res-state.c: New file.
1829 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1830 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1831 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
1832 of THREAD_[SG]ETMEM.
1833 * specific.c (libc_internal_tsd_set): Renamed to...
1834 __pthread_internal_tsd_set. Remove static.
1835 (libc_internal_tsd_get): Renamed to...
1836 __pthread_internal_tsd_get. Remove static.
1837 (libc_internal_tsd_address): Renamed to...
1838 __pthread_internal_tsd_address. Remove static.
1839 (__libc_internal_tsd_set, __libc_internal_tsd_get,
1840 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1841 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1843 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1844 __pthread_internal_tsd_address): New prototypes.
1845 (struct pthread_functions): Add
1846 ptr_pthread_internal_tsd_([sg]et|address) fields.
1847 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1848 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1849 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1850 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1851 * alloca_cutoff.c: New file.
1852 * no-tsd.c: Removed.
1853 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
1854 * pt-system.c (system): Remove cancellation handling.
1855 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1856 cancellation routines.
1858 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1859 (tcbhead_t): Add sysinfo field.
1860 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1861 (TLS_INIT_TP): Use INIT_SYSINFO.
1862 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1863 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1864 (MULTIPLE_THREADS_OFFSET): Adjust.
1865 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1866 (MULTIPLE_THREADS_OFFSET): Likewise.
1867 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1868 (MULTIPLE_THREADS_OFFSET): Likewise.
1869 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1870 (MULTIPLE_THREADS_OFFSET): Likewise.
1871 * descr.h: Include stdint.h.
1872 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1874 2002-12-22 Jakub Jelinek <jakub@redhat.com>
1876 * libc_pthread_init.c: Include stdlib.h.
1877 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1878 (TLS_INIT_TP_EXPENSIVE): Define.
1879 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1880 __libc_maybe_call2): In _LIBC check SHARED define.
1881 * sysdeps/ia64/tls.h: New file.
1882 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1883 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1884 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1885 * sysdeps/sparc/sparc32/tls.h: New file.
1886 * sysdeps/sparc/sparc64/tls.h: New file.
1887 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1888 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1889 * Makefile (tests): Add tst-cancel[1-6].
1890 (tests-reverse): Add tst-cancel5.
1891 Link libc.so before libpthread.so for tests-reverse.
1892 * tst-cancel1.c: New file.
1893 * tst-cancel2.c: New file.
1894 * tst-cancel3.c: New file.
1895 * tst-cancel4.c: New file.
1896 * tst-cancel5.c: New file.
1897 * tst-cancel6.c: New file.
1899 2002-12-27 Andreas Schwab <schwab@suse.de>
1901 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1903 2002-12-22 Roland McGrath <roland@redhat.com>
1905 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1907 2002-12-21 Ulrich Drepper <drepper@redhat.com>
1909 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
1910 Reported by Art Hass <ahaas@airmail.net>.
1912 2002-12-19 Jakub Jelinek <jakub@redhat.com>
1914 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1915 Use return 0 as 6th argument to FORWARD4.
1917 2002-12-18 Jakub Jelinek <jakub@redhat.com>
1919 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
1920 define if __ASSUME_LDT_WORKS > 0.
1921 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
1922 struct member access if !FLOATING_STACKS.
1923 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1925 2002-12-18 Jakub Jelinek <jakub@redhat.com>
1927 * internals.h (__pthread_thread_self): New prototype.
1928 (struct pthread_functions): Add ptr_pthread_thread_self field.
1929 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
1930 (__pthread_thread_self): New function.
1931 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
1932 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
1933 use thread_self() directly if not FLOATING_STACKS.
1935 2002-12-18 Jakub Jelinek <jakub@redhat.com>
1937 * sysdeps/x86_64/pt-machine.h: Guard most of the header
1938 with #ifndef __ASSEMBLER__.
1939 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
1940 pthread_attr_init_2_0 use.
1942 2002-12-17 Jakub Jelinek <jakub@redhat.com>
1944 * wrapsyscall.c: Removed.
1946 * Makefile (distribute): Add tst-cancel-wrappers.sh.
1947 (routines): Remove weaks. Add forward,
1948 libc_pthread_init, libc-cancellation.
1949 (shared-only-routines): Remove weaks. Add forward.
1950 (libpthread-routines): Remove wrapsyscall.
1951 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
1952 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
1953 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
1954 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
1955 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
1956 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
1957 (libpthread-shared-only-routines): Add pt-allocrtsig.
1958 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1959 ($(objpfx)tst-cancel-wrappers.out): New rule.
1960 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
1962 (__libc_maybe_call): In libpthread.* don't check for existance
1964 (__libc_maybe_call2): Define.
1965 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
1966 __libc_lock_trylock, __libc_lock_unlock): Use it.
1967 * sysdeps/pthread/flockfile.c: New file.
1968 * sysdeps/pthread/ftrylockfile.c: New file.
1969 * sysdeps/pthread/funlockfile.c: New file.
1970 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1971 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
1972 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
1973 * libc-cancellation.c: New file.
1974 * forward.c: New file.
1975 * libc_pthread_init.c: New file.
1976 * pt-system.c: New file.
1977 * pthread.c: Remove locale.h.
1978 (__pthread_manager_thread): Initialize multiple_threads.
1979 (__pthread_multiple_threads): Declare.
1980 (pthread_functions): New variable.
1981 (__pthread_initialize_minimal): Remove __uselocale call.
1982 Call __libc_pthread_init.
1983 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
1984 initial thread's multiple_threads and __libc_multiple_threads.
1985 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
1987 (pthread_setschedparam, pthread_getschedparam): Rename to __
1988 prefixed variants. Add strong_alias.
1989 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
1990 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
1991 (init_rtsigs): Use __libc_current_sigrtmin_private.
1992 (pthread_initialize): Only call init_rtsigs if
1993 !__ASSUME_REALTIME_SIGNALS.
1994 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
1995 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
1996 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
1997 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
1998 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
1999 __pthread_attr_getinheritsched, __pthread_attr_setscope,
2000 __pthread_attr_getscope, __pthread_cond_init,
2001 __pthread_cond_destroy, __pthread_cond_wait,
2002 __pthread_cond_signal, __pthread_cond_broadcast,
2003 __pthread_condattr_init, __pthread_condattr_destroy,
2004 __pthread_equal, __pthread_getschedparam,
2005 __pthread_setschedparam, __pthread_setcancelstate,
2006 __pthread_setcanceltype, __pthread_enable_asynccancel,
2007 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2008 (__pthread_mutex_init, __pthread_mutex_destroy,
2009 __pthread_mutex_lock, __pthread_mutex_unlock,
2010 __pthread_mutex_trylock): Likewise.
2012 (struct pthread_functions): New type.
2013 (__libc_pthread_functions): New variable.
2014 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2015 * descr.h (struct _pthread_descr_struct): Add
2016 p_header.data.multiple_threads field.
2017 * manager.c (pthread_handle_create): Initialize multiple_threads.
2018 * cancel.c (__pthread_enable_asynccancel,
2019 __pthread_disable_asynccancel): New functions.
2020 (__pthread_provide_wrappers): Remove.
2021 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2022 prefixed variants. Add strong_alias.
2023 * condvar.c (pthread_cond_init, pthread_cond_destroy,
2024 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2025 pthread_condattr_init, pthread_condattr_destroy): Likewise.
2026 * join.c (pthread_exit): Likewise.
2027 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2028 pthread_attr_getdetachstate, pthread_attr_setschedparam,
2029 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2030 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2031 pthread_attr_getinheritsched, pthread_attr_setscope,
2032 pthread_attr_getscope): Likewise.
2033 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2034 __pthread_mutex_lock, __pthread_mutex_unlock,
2035 __pthread_mutex_trylock): Add hidden_def.
2036 * Versions (libc): Add __libc_pthread_init,
2037 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2038 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2039 * lockfile.c: Remove some USE_IN_LIBIO guards.
2040 (__pthread_provide_lockfile): Remove.
2041 * pt-allocrtsig.c: New file.
2042 * tst-cancel-wrappers.sh: New test.
2044 2002-12-15 Ulrich Drepper <drepper@redhat.com>
2046 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2047 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2048 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2049 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2051 2002-12-10 Ulrich Drepper <drepper@redhat.com>
2053 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2054 weak. There is no reason for that.
2055 (CANCELABLE_SYSCALL_VA): Likewise.
2057 2002-12-09 Ulrich Drepper <drepper@redhat.com>
2059 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2060 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2061 * Versions: Export creat, poll, pselect, readv, select, sigpause,
2062 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2063 libpthread in version GLIBC_2.3.2.
2065 2002-12-06 Ulrich Drepper <drepper@redhat.com>
2067 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2069 2002-12-05 Roland McGrath <roland@redhat.com>
2071 * pthread.c (__pthread_initialize_minimal)
2072 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2073 TCB if the dynamic linker didn't do it at startup.
2075 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2077 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2079 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2080 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2082 2002-12-03 Roland McGrath <roland@redhat.com>
2084 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2085 from dynamic linker internal cell to new libc cell.
2087 2002-11-28 Roland McGrath <roland@redhat.com>
2089 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2090 before other headers, so FLOATING_STACKS is not defined wrongly.
2092 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2093 even if [! FLOATING_STACKS].
2094 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2095 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2096 dl_osversion >= 2.3.99 and fatal if not.
2097 (TLS_DO_MODIFY_LDT): Use it.
2099 2002-11-28 Ulrich Drepper <drepper@redhat.com>
2101 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2102 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
2103 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2105 2002-11-19 Ulrich Drepper <drepper@redhat.com>
2107 * Versions (libc: GLIBC_2.0): Remove names of functions which are
2108 not defined in libc.
2109 * Makefile (shared-only-routines): Add weaks.
2110 * weaks.c: Remove functions which are not exported from libc.so.
2112 2002-11-14 Roland McGrath <roland@redhat.com>
2114 * libc-tsd.c: New file.
2115 * Makefile (distribute): Add it.
2116 (libc-link.so): New variable.
2117 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2118 (libc-ok-for-link): New variable.
2119 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2120 libc-ok-for-link to $(use-thread).
2121 [$(libc-ok-for-link) = no]
2122 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2123 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2125 (generated): Append them.
2126 (extra-objs): Append libc-tsd.os.
2128 * libc-tls-loc.c: New file.
2129 * Makefile (libpthread-routines): Add it.
2131 2002-11-14 Andreas Schwab <schwab@suse.de>
2133 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2136 2002-11-13 Roland McGrath <roland@redhat.com>
2138 * Examples/ex6.c (main): Improve error reporting.
2140 2002-11-04 Ulrich Drepper <drepper@redhat.com>
2142 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2143 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
2145 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2147 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2149 2002-10-22 Jakub Jelinek <jakub@redhat.com>
2151 * manager.c (pthread_start_thread): Call __uselocale even
2152 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
2154 2002-10-17 Roland McGrath <roland@redhat.com>
2156 * Makefile (unload): Don't link in libpthread.so.
2157 ($(objpfx)unload.out): Do depend on it.
2158 * unload.c (main): Improve error reporting.
2160 2002-10-09 Roland McGrath <roland@redhat.com>
2162 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2163 Under [__PIC__], call the function via the pointer fetched for
2164 comparison rather than a call by name that uses the PLT.
2165 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2166 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2167 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2168 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2169 (__libc_key_create, __libc_getspecific, __libc_setspecific)
2170 (__libc_atfork): Use it.
2172 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2173 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2174 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2175 (ld: GLIBC_PRIVATE): Set removed.
2177 2002-10-11 Ulrich Drepper <drepper@redhat.com>
2179 * sysdeps/unix/sysv/linux/execve.c: New file.
2181 2002-10-09 Jakub Jelinek <jakub@redhat.com>
2183 * no-tsd.c: Include stdlib.h.
2185 2002-10-07 Jakub Jelinek <jakub@redhat.com>
2187 * sysdeps/unix/sysv/linux/allocalim.h: New file.
2188 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2190 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2191 Pass stack size to caller.
2192 (pthread_handle_create): Set p_alloca_cutoff.
2193 * pthread.c (__pthread_initial_thread): Use C99 designated
2194 initializers. Set p_alloca_cutoff.
2195 (__pthread_manager_thread): Likewise.
2196 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2198 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2200 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2202 * specific.c (__libc_alloca_cutoff): New function.
2203 * no-tsd.c (__libc_alloca_cutoff): New function.
2204 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2207 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2209 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2210 * sysdeps/sh/tls.h: Likewise.
2211 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2213 2002-09-29 Jakub Jelinek <jakub@redhat.com>
2215 * sysdeps/pthread/tst-timer.c (main): Clear
2216 SIGEV2.sigev_notify_attributes.
2218 2002-09-29 Ulrich Drepper <drepper@redhat.com>
2220 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2221 INLINE_SYSCALL for set_thread_area syscall.
2223 2002-09-28 Roland McGrath <roland@redhat.com>
2225 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2226 Don't call setrlimit, since we did no prior bogon we need to undo.
2228 2002-09-27 Roland McGrath <roland@redhat.com>
2230 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2232 2002-09-24 Roland McGrath <roland@redhat.com>
2234 * sysdeps/x86_64/tls.h: New file.
2236 2002-09-23 Roland McGrath <roland@redhat.com>
2238 * Examples/ex13.c (dump_mut): int -> size_t for counter.
2240 2002-09-18 Bruno Haible <bruno@clisp.org>
2242 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2243 an unexpected error code.
2245 * internals.h (__pthread_message): Add const to first parameter type.
2246 * pthread.c (__pthread_message): Likewise.
2248 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2250 2002-09-17 Roland McGrath <roland@redhat.com>
2252 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2253 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2254 offset (positive or negative) relative to the thread struct.
2255 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2257 2002-09-12 Jakub Jelinek <jakub@redhat.com>
2259 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2260 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2261 Replace /usr/lib/crt[in].o with crt[in].o too.
2263 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
2265 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2267 2002-09-04 Bruno Haible <bruno@clisp.org>
2269 * pthread.c: Include <sys/time.h>.
2270 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2271 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2272 * Makefile (distribute): Add smp.h to the list.
2274 2002-09-04 Bruno Haible <bruno@clisp.org>
2276 * sysdeps/alpha/pt-machine.h: Choose different include file location
2277 on non-Linux platforms.
2279 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2280 (open, open64): Change va_arg argument type to the integral type to
2281 which mode_t promotes.
2283 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2284 the structure of 'struct sigevent'.
2286 * errno.c (__errno_location, __h_errno_location, __res_state):
2287 Use prototype function definitions.
2289 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
2291 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2292 * sysdeps/powerpc/pt-machine.h: moved to...
2293 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2294 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2296 2002-09-02 Roland McGrath <roland@redhat.com>
2298 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2300 2002-09-01 Roland McGrath <roland@redhat.com>
2302 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2303 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2305 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2306 (__libc_internal_tsd_address): Declare it.
2307 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2308 __libc_internal_tsd_address.
2309 * specific.c (libc_internal_tsd_address): New function.
2310 (__libc_internal_tsd_address): New variable.
2311 * no-tsd.c (__libc_internal_tsd_address): New variable.
2313 2002-08-31 Ulrich Drepper <drepper@redhat.com>
2315 * Makefile: Don't use rule for crt%.o, spell it out as rules for
2318 2002-08-30 Roland McGrath <roland@redhat.com>
2320 * Makefile (extra-objs, omit-deps): Add crtn.
2321 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2322 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2323 ($(objpfx)crtn.S): New target.
2324 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2325 (generated): Add crtn.S.
2327 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2328 crtn.o pathname too.
2330 2002-08-30 Jakub Jelinek <jakub@redhat.com>
2332 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2335 2002-08-30 Roland McGrath <roland@redhat.com>
2337 * tst-static-locale.c: New file.
2338 * Makefile (tests, tests-static): Add it.
2340 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
2342 * spinlock.c (__pthread_lock): Fix spurious wakeup
2343 handling. Don't clear lowest bit of list pointer as sign the thread
2344 is still on the wait list. Don't restart after spurious wakeup
2345 with spinning to get the lock.
2346 (__pthread_unlock): Take set lowest bit into account when handling
2347 pointer to list elements.
2348 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2350 2002-08-28 Roland McGrath <roland@redhat.com>
2352 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2354 2002-08-28 Jakub Jelinek <jakub@redhat.com>
2356 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2357 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2358 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2360 2002-08-28 Ulrich Drepper <drepper@redhat.com>
2362 * sysdeps/pthread/timer_routines.c (thread_func): Change return
2363 type to void and add casts in use to avoid warnings with all gcc
2366 2002-08-08 Jakub Jelinek <jakub@redhat.com>
2368 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2370 * manager.c (__pthread_handles): Remove.
2371 * pthandles.c: New file.
2372 * pthread.c (__pthread_initialize_minimal): Initialize
2373 __pthread_handles[0] and __pthread_handles[1].
2374 * Makefile (libpthread-routines): Add pthandles (must be last).
2376 2002-08-26 Brian Youmans <3diff@gnu.org>
2378 * Examples/ex10.c: Corrected version number in Lesser GPL copying
2379 permission notice from 2 to 2.1.
2380 * Examples/ex11.c: Likewise.
2381 * Examples/ex13.c: Likewise.
2382 * Examples/ex8.c: Likewise.
2383 * Examples/ex9.c: Likewise.
2384 * barrier.c: Likewise.
2385 * events.c: Likewise.
2386 * lockfile.c: Likewise.
2387 * no-tsd.c: Likewise.
2388 * pt-machine.c: Likewise.
2389 * ptclock_gettime.c: Likewise.
2390 * ptclock_settime.c: Likewise.
2391 * rwlock.c: Likewise.
2392 * sysdeps/alpha/pspinlock.c: Likewise.
2393 * sysdeps/alpha/pt-machine.h: Likewise.
2394 * sysdeps/arm/pspinlock.c: Likewise.
2395 * sysdeps/arm/pt-machine.h: Likewise.
2396 * sysdeps/cris/pspinlock.c: Likewise.
2397 * sysdeps/cris/pt-machine.h: Likewise.
2398 * sysdeps/hppa/pspinlock.c: Likewise.
2399 * sysdeps/hppa/pt-machine.h: Likewise.
2400 * sysdeps/i386/i686/pt-machine.h: Likewise.
2401 * sysdeps/i386/pspinlock.c: Likewise.
2402 * sysdeps/i386/pt-machine.h: Likewise.
2403 * sysdeps/i386/useldt.h: Likewise.
2404 * sysdeps/ia64/pspinlock.c: Likewise.
2405 * sysdeps/ia64/pt-machine.h: Likewise.
2406 * sysdeps/m68k/pspinlock.c: Likewise.
2407 * sysdeps/m68k/pt-machine.h: Likewise.
2408 * sysdeps/mips/pspinlock.c: Likewise.
2409 * sysdeps/mips/pt-machine.h: Likewise.
2410 * sysdeps/powerpc/pspinlock.c: Likewise.
2411 * sysdeps/powerpc/pt-machine.h: Likewise.
2412 * sysdeps/pthread/bits/initspin.h: Likewise.
2413 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2414 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2415 * sysdeps/pthread/getcpuclockid.c: Likewise.
2416 * sysdeps/pthread/posix-timer.h: Likewise.
2417 * sysdeps/pthread/timer_create.c: Likewise.
2418 * sysdeps/pthread/timer_delete.c: Likewise.
2419 * sysdeps/pthread/timer_getoverr.c: Likewise.
2420 * sysdeps/pthread/timer_gettime.c: Likewise.
2421 * sysdeps/pthread/timer_routines.c: Likewise.
2422 * sysdeps/pthread/timer_settime.c: Likewise.
2423 * sysdeps/pthread/tst-timer.c: Likewise.
2424 * sysdeps/s390/pspinlock.c: Likewise.
2425 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2426 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2427 * sysdeps/sh/pspinlock.c: Likewise.
2428 * sysdeps/sh/pt-machine.h: Likewise.
2429 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2430 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2431 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2432 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2433 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2434 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2435 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2436 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2437 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2438 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2439 * tststack.c: Likewise.
2440 * unload.c: Likewise.
2441 * weaks.c: Likewise.
2442 * wrapsyscall.c: Likewise.
2444 * sysdeps/pthread/pt-initfini.c: Changed copying
2445 permission notice to Lesser GPL from Library GPL, including the
2446 references in the special exception.
2447 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2448 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2449 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2451 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2453 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2455 2002-08-26 Ulrich Drepper <drepper@redhat.com>
2457 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2458 overflow [PR libc/4244].
2460 2002-08-25 Ulrich Drepper <drepper@redhat.com>
2462 * sysdeps/pthread/timer_routines.c (thread_func): Make the
2463 compiler happy by adding a return statement which will never be
2466 * tst-context.c (main): Cast to long before casting to pointer.
2468 * Examples/ex17.c (main): Use correct format string.
2470 * Examples/ex9.c (thread): Remove incorrect return statement.
2472 2002-08-23 Ulrich Drepper <drepper@redhat.com>
2474 * pthread.c (__linuxthreads_version): New global constant.
2476 2002-08-23 Andreas Jaeger <aj@suse.de>
2478 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2479 as thread specific register.
2480 (testandset): Fix inline asm.
2481 (THREAD_GETMEM): Fix inline asm.
2483 2002-08-22 Roland McGrath <roland@redhat.com>
2485 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2487 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2488 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2489 macro. That chooses whether to reuse %gs value or let kernel set it.
2490 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2491 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2494 2002-08-21 Ulrich Drepper <drepper@redhat.com>
2496 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2497 also to the third definition of this macro.
2499 2002-06-17 Andreas Jaeger <aj@suse.de>
2501 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2504 2002-08-20 Ulrich Drepper <drepper@redhat.com>
2506 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2507 loading/reading segment registers. Some old hardware doesn't
2508 handle the 32-bit instructions as expected.
2509 * sysdeps/i386/tls.h: Likewise.
2511 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2512 renamed to secondcall and use is negated.
2513 (TLS_SETUP_GS_SEGMENT): Likewise.
2514 (TLS_INIT_TP): Likewise.
2515 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2518 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2519 registers. No need to mask upper 16 bits in this case.
2520 * sysdeps/i386/useldt.h: Likewise.
2521 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2522 is the same since the GDT content changed.
2524 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2525 to TLS_SETUP_GS_SEGMENT.
2526 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2527 TLS_DO_SET_THREAD_AREA.
2528 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2529 entry number from %gs value.
2530 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2533 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2534 Pass true to _dl_deallocate_tls.
2535 (pthread_free): Likewise.
2536 * pthread.c (__pthread_initialize_manager): Likewise.
2538 2002-08-19 Ulrich Drepper <drepper@redhat.com>
2540 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2541 computing index from %gs value.
2543 2002-08-16 Roland McGrath <roland@redhat.com>
2545 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2546 register value from entry number properly.
2548 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2549 optimally conditional on [__PIC__].
2550 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2551 without touching errno, and use latest modify_ldt-like interface.
2552 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2553 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2554 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2555 existing %gs value as the segment to set.
2556 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
2557 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2558 by the first thread's early TLS setup.
2560 2002-08-15 Roland McGrath <roland@redhat.com>
2562 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2563 return a value as callers now expect.
2565 2002-08-11 Roland McGrath <roland@redhat.com>
2567 * pthread.c (__pthread_initialize_manager): Initialize
2568 p_header.data.tcb field of manager thread's descriptor.
2569 (__pthread_initialize_minimal): Don't initialize p_header.data.self
2570 field, already done by TLS_INIT_TP.
2572 * manager.c (pthread_handle_create): Move p_header field initializers
2575 2002-08-08 Ulrich Drepper <drepper@redhat.com>
2577 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2579 2002-08-07 Ulrich Drepper <drepper@redhat.com>
2581 * pthread.c (__linuxthreads_initial_report_events): New variable.
2582 (__pthread_initialize_manager): Use it to initialize p_report_events
2584 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2586 2002-08-07 Roland McGrath <roland@redhat.com>
2588 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2589 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2591 2002-08-02 Roland McGrath <roland@redhat.com>
2593 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2594 Add _LIBC_TSD_KEY_LOCALE.
2595 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2596 Call __uselocale to initialize our per-thread locale pointer to
2598 * pthread.c (__pthread_initialize_minimal): Likewise.
2600 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2602 2002-08-02 Ulrich Drepper <drepper@redhat.com>
2604 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2607 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2608 Don't use p_libc_specific element in thread descriptor.
2610 2002-07-30 Roland McGrath <roland@redhat.com>
2612 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2613 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2614 which does the right thing when __thread support is available.
2615 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2616 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2617 `p_h_errno', `p_resp', and `p_res' members.
2618 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2619 Don't initialize `p_errnop' and `p_h_errnop' members.
2620 (__pthread_reset_main_thread): Likewise.
2621 (__pthread_initialize_manager): Likewise.
2622 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2623 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2624 Don't initialize `p_resp' member.
2625 (__pthread_reset_main_thread): Likewise.
2626 * manager.c (pthread_handle_create): Likewise.
2627 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2628 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2629 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2630 * errno.c [USE_TLS && HAVE___THREAD]
2631 (__h_errno_location, __res_state): Don't define these at all.
2633 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2634 (INSTALL_NEW_DTV, GET_DTV): Likewise.
2635 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2637 * weaks.c: Don't include <errno.h> here.
2639 2002-08-01 Roland McGrath <roland@redhat.com>
2641 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2643 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2644 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2645 (TLS_INIT_TP): Use that.
2647 2002-08-02 Jakub Jelinek <jakub@redhat.com>
2649 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2650 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2651 (FREE_THREAD): Avoid modify_ldt if using GDT.
2652 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2654 2002-07-25 Jakub Jelinek <jakub@redhat.com>
2656 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2657 * sysdeps/i386/pt-machine.h: Likewise.
2658 * sysdeps/i386/useldt.h: Likewise.
2660 2002-07-22 Ulrich Drepper <drepper@redhat.com>
2662 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2663 call __libc_setup_tls first.
2664 * Makefile: Actually create tst-signal.out file when running the test.
2665 (tests): Add tststatic.
2666 * Examples/tststatic.c: New file.
2668 2002-07-19 Ulrich Drepper <drepper@redhat.com>
2670 * errno.c (__errno_location): Don't define unless !USE_TLS
2672 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2673 * sysdeps/i386/tls.h: Likewise.
2674 * sysdeps/i386/useldt.h: Likewise.
2675 * sysdeps/i386/i686/pt-machine.h: Likewise.
2677 2002-07-02 H.J. Lu <hjl@gnu.org>
2679 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
2681 * sysdeps/mips/pt-machine.h: Likewise.
2683 2002-07-14 Ulrich Drepper <drepper@redhat.com>
2685 * manager.c (pthread_handle_create): Initialize self-reference in
2688 2002-07-01 Jakub Jelinek <jakub@redhat.com>
2690 * Examples/ex9.c (main): Remove unused th variable.
2692 2002-07-10 Ulrich Drepper <drepper@redhat.com>
2694 * wrapsyscall.c: Add __nanosleep alias.
2695 * Versions (GLIBC_2.2.6): Add __nanosleep.
2696 * bug-sleep.c: New file.
2697 * Makefile (tests): Add bug-sleep.
2699 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
2701 * Examples/ex9.c (main): Use list of children and join them.
2702 (thread): Do not call exit.
2704 2002-06-20 Ulrich Drepper <drepper@redhat.com>
2706 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2707 Unconditionally use the code using spinlock. Use __pthread_release
2709 (wait_node_free): Likewise.
2710 (__pthread_acquire, __pthread_release): Unconditionally define.
2712 2002-06-07 Jakub Jelinek <jakub@redhat.com>
2714 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2716 2002-05-24 Ulrich Drepper <drepper@redhat.com>
2718 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2720 2002-05-21 Ulrich Drepper <drepper@redhat.com>
2722 * sysdeps/pthread/pthread.h (pthread_create): Rename first
2724 (pthread_cancel): Likewise.
2725 * internals.h (__pthread_create_2_1): Likewise.
2726 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2728 2002-05-20 Ulrich Drepper <drepper@redhat.com>
2730 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2731 Patch by Glen Nakamura <gen@flex.com>.
2733 2002-05-03 Ulrich Drepper <drepper@redhat.com>
2735 * signals.c: Move sighandler functions to...
2736 * sighandler.c: ...here. New file.
2737 * signals.c: Move signal handler related type definitions to...
2738 * internals.h: ...here. Add prototypes for signal handlers.
2739 * Makefile (libpthread-routines): Add sighandler.
2740 (CFLAGS-sighandler.c): Add $(exceptions).
2742 2002-04-30 Jakub Jelinek <jakub@redhat.com>
2744 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2746 2002-04-08 Ulrich Drepper <drepper@redhat.com>
2748 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2749 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2750 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2751 based on previous one and not on current time. Count overruns.
2752 Patch by Eric F. Sorton <eric@cctcorp.com>.
2754 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2756 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2758 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2759 if it isn't defined yet.
2760 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2761 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2763 * sysdeps/sh/tls.h: New file.
2765 2002-04-08 Jakub Jelinek <jakub@redhat.com>
2767 * manager.c (__pthread_manager_event): Use self instead of arg
2768 for INIT_THREAD_SELF.
2769 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2770 _pthread_descr_struct) instead of sizeof (*descr).
2772 2002-04-05 Ulrich Drepper <drepper@redhat.com>
2774 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2775 * sysdeps/alpha/pt-machine.h: Likewise.
2776 * sysdeps/arm/pt-machine.h: Likewise.
2777 * sysdeps/cris/pt-machine.h: Likewise.
2778 * sysdeps/hppa/pt-machine.h: Likewise.
2779 * sysdeps/m68k/pt-machine.h: Likewise.
2780 * sysdeps/mips/pt-machine.h: Likewise.
2781 * sysdeps/powerpc/pt-machine.h: Likewise.
2782 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2783 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2784 * sysdeps/sh/pt-machine.h: Likewise.
2785 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2786 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2787 * sysdeps/x86_64/pt-machine.h: Likewise.
2789 2002-04-05 Jakub Jelinek <jakub@redhat.com>
2791 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2792 instead of pthread_mutexattr_setkind_np.
2793 (pthread_mutexattr_gettype): Similarly.
2794 * man/pthread_mutexattr_setkind_np.man: New.
2795 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2797 2002-04-02 Ulrich Drepper <drepper@redhat.com>
2799 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2801 2002-03-22 Jakub Jelinek <jakub@redhat.com>
2803 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2805 2002-03-22 Ulrich Drepper <drepper@redhat.com>
2807 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2809 2002-03-17 Andreas Jaeger <aj@suse.de>
2811 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2813 * sysdeps/alpha/pt-machine.h: Likewise.
2814 * sysdeps/arm/pt-machine.h: Likewise.
2815 * sysdeps/cris/pt-machine.h: Likewise.
2816 * sysdeps/hppa/pt-machine.h: Likewise.
2817 * sysdeps/i386/i686/pt-machine.h: Likewise.
2818 * sysdeps/ia64/pt-machine.h: Likewise.
2819 * sysdeps/m68k/pt-machine.h: Likewise.
2820 * sysdeps/mips/pt-machine.h: Likewise.
2821 * sysdeps/powerpc/pt-machine.h: Likewise.
2822 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2823 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2824 * sysdeps/sh/pt-machine.h: Likewise.
2825 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2826 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2827 * sysdeps/x86_64/pt-machine.h: Likewise.
2829 * internals.h: Move testandset and __compare_and_swap prototypes
2832 2002-03-03 Andreas Jaeger <aj@suse.de>
2834 * errno.c: Include resolv.h to avoid warning.
2836 2002-02-27 Ulrich Drepper <drepper@redhat.com>
2838 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2841 2002-02-23 Ulrich Drepper <drepper@redhat.com>
2843 * attr.c (pthread_getattr_np): Don't take thread descriptor size
2844 into account if USE_TLS.
2845 * manager.c (pthread_handle_create): Free TLS data structures if call
2846 failed. Pass correct stack to clone if USE_TLS.
2847 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2848 * sysdeps/i386/i686/pt-machine.h: Likewise.
2849 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2851 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2852 Add p_stackaddr element #if USE_TLS.
2853 * internals.c: Include <tls.h>.
2854 * manager.c: Integrate creating and handling of thread descriptor
2856 * pthread.c: Likewise.
2857 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2858 Include <linuxthreads/descr.h> only if TLS is really used.
2859 (GET_DTV): New macro.
2860 (TLS_INIT_TP): Initialize self pointer.
2862 2002-02-17 Andreas Schwab <schwab@suse.de>
2864 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2867 2002-02-12 Ulrich Drepper <drepper@redhat.com>
2869 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2870 (INSTALL_DTV): Adjust for being passed pointer to element with length.
2872 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2874 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2876 2002-02-08 Richard Henderson <rth@redhat.com>
2878 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2880 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2882 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2885 2002-02-07 H.J. Lu <hjl@gnu.org>
2887 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2889 (__pthread_spin_lock): Remove ".set noreorder".
2890 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2892 2002-02-05 H.J. Lu <hjl@gnu.org>
2894 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2896 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2897 (__compare_and_swap): Likewise.
2899 2002-02-07 Ulrich Drepper <drepper@redhat.com>
2901 * internals.h: Move declarations/definitions of
2902 __pthread_initial_thread_bos, __pthread_initial_thread,
2903 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2904 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2905 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2907 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2908 Define THREAD_GETMEM accordingly.
2910 2002-02-06 Ulrich Drepper <drepper@redhat.com>
2912 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
2914 * sysdeps/i386/tls.h: Define THREAD_DTV.
2916 2002-02-04 Ulrich Drepper <drepper@redhat.com>
2918 * internals.h: Move thread descriptor definition...
2919 * descr.h.: ...here. New file.
2920 * sysdeps/i386/tls.h: New file.
2922 2002-02-01 H.J. Lu <hjl@gnu.org>
2924 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
2925 different register in the delayed slot. Use branch likely.
2927 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
2928 (__compare_and_swap): Return 0 only when failed to compare. Use
2931 2002-02-01 Jakub Jelinek <jakub@redhat.com>
2933 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
2934 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
2935 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
2936 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
2937 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
2938 * sysdeps/sparc/sparc64/Versions: New file.
2939 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
2941 2002-01-31 Ulrich Drepper <drepper@redhat.com>
2943 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
2944 in SHARED code, use GL(dl_cpuclock_offset).
2946 2002-01-28 Andreas Jaeger <aj@suse.de>
2948 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
2949 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
2951 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
2953 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
2954 (CURRENT_STACK_FRAME): Remove duplicate definition.
2955 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2957 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
2959 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
2962 2002-01-12 Andreas Schwab <schwab@suse.de>
2964 * Makefile (test-srcs): Add tst-signal.
2965 (tests): Run tst-signal.
2966 (distribute): Add tst-signal.sh.
2967 * tst-signal.c, tst-signal.sh: New files.
2969 2002-01-14 Andreas Jaeger <aj@suse.de>
2971 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
2973 2002-01-11 Andreas Schwab <schwab@suse.de>
2975 * signals.c (sighandler): Initialize all elements to SIG_ERR.
2976 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
2978 2002-01-06 Richard Henderson <rth@redhat.com>
2980 * sysdeps/alpha/elf/pt-initfini.c: New file.
2982 2001-12-29 Andreas Jaeger <aj@suse.de>
2984 * Examples/ex9.c: Add noreturn attribute for thread.
2985 * Examples/ex10.c: Likewise.
2986 * Examples/ex13.c (thread_start): Likewise.
2987 * Examples/ex15.c (worker): Likewise.
2989 * Examples/ex18.c: Include unistd.h for prototype of sleep.
2991 2001-12-14 Ulrich Drepper <drepper@redhat.com>
2993 * man/pthread_atfork.man: Adjust description of mutex handling
2994 after fork for current implementation.
2995 * linuxthreads.texi: Likewise [PR libc/2519].
2997 2001-12-13 Andreas Schwab <schwab@suse.de>
2999 * specific.c (pthread_key_delete): Don't contact the thread
3000 manager if no threads have been created yet.
3002 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
3004 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3005 qualifier to be safe.
3007 2001-11-30 Andreas Schwab <schwab@suse.de>
3009 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3010 that self is the manager thread, and initialize the thread
3012 (thread_self_stack) [THREAD_SELF]: New function to find self via
3014 * manager.c (pthread_handle_create): Don't block cancel signal any
3017 2001-11-29 Andreas Jaeger <aj@suse.de>
3019 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3021 (INIT_THREAD_SELF): New.
3022 (THREAD_GETMEM): New.
3024 (THREAD_SETMEM): New.
3025 (THREAD_SETMEM_NC): New.
3026 (FLOATING_STACKS): Define.
3027 (ARCH_STACK_MAX_SIZE): Define.
3029 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
3031 Bugfix to pthread_key_delete. It was iterating over the thread
3032 manager's linked list of threads, behind the thread manager's
3033 back causing a race. The fix is to have the manager iterate over
3034 the threads instead, using a new request type for doing so.
3035 * internals.h (struct pthread_request): New manager request type
3036 REQ_FOR_EACH_THREAD.
3037 * manager.c (pthread_for_each_thread): New function.
3038 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3039 * specific.c (struct pthread_key_delete_helper_args): New type.
3040 (pthread_key_delete_helper): New static function.
3041 (pthread_key_delete): Use the new thread manager
3042 REQ_FOR_EACH_THREAD function to iterate over the threads and set
3043 the delete key slot to a null value in each thread.
3044 * Examples/ex18.c: New test.
3045 * Makefile (tests): Add ex18.
3047 2001-11-22 Wolfram Gloger <wg@malloc.de>
3049 * pthread.c (pthread_onexit_process): Don't call free
3050 after threads have been asynchronously terminated.
3052 * manager.c (pthread_handle_exit): Surround cancellation
3053 of threads with __flockfilelist()/__funlockfilelist().
3055 2001-11-26 Andreas Schwab <schwab@suse.de>
3057 * manager.c (pthread_handle_create): Start the child thread with
3058 the cancel signal blocked, so that it does not handle it before
3059 the thread register is set up. Save errno from failed clone call.
3061 2001-11-15 Ulrich Drepper <drepper@redhat.com>
3063 * sysdeps/i386/i686/Implies: Removed.
3064 * sysdeps/i386/i686/Versions: New file.
3066 2001-10-31 Andreas Jaeger <aj@suse.de>
3068 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3070 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
3072 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3073 to __linuxthreads_pthread_sizeof_descr to match name used by
3074 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3075 linuxthreads_db/td_symbol_list.c.
3077 2001-09-22 Andreas Jaeger <aj@suse.de>
3079 * linuxthreads/tst-context.c: Avoid compile warning.
3081 2001-09-20 Andreas Jaeger <aj@suse.de>
3083 * shlib-versions: Add x86-64.
3085 2001-09-19 Andreas Jaeger <aj@suse.de>
3087 * sysdeps/x86_64/Makefile: New file.
3088 * sysdeps/x86_64/pspinlock.c: New file.
3089 * sysdeps/x86_64/pt-machine.h: New file.
3091 2001-09-12 Jakub Jelinek <jakub@redhat.com>
3093 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3095 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3097 2001-09-11 Ulrich Drepper <drepper@redhat.com>
3098 Wolfram Gloger <wg@malloc.de>
3100 * join.c: Protect all communications from and to manager with
3102 * manager.c: Likewise.
3103 * pthread.c: Likewise.
3104 * smeaphore.c: Likewise.
3106 2001-08-29 Ulrich Drepper <drepper@redhat.com>
3108 * spinlock.c (__pthread_lock): Top max_count value with
3109 MAX_ADAPTIVE_SPIN_COUNT.
3110 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3112 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3115 2001-08-27 Jakub Jelinek <jakub@redhat.com>
3117 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3118 non-opaque type if __USE_UNIX98.
3120 2001-08-26 Jakub Jelinek <jakub@redhat.com>
3122 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3123 non-opaque lock types also if _IO_MTSAFE_IO is defined.
3125 2001-08-23 Roland McGrath <roland@frob.com>
3127 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3128 new first argument, skip the cleanup handler if it's zero.
3129 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3130 (__libc_lock_define_initialized_recursive): Use it.
3131 * sysdeps/pthread/bits/stdio-lock.h: File removed.
3132 The sysdeps/generic file from the main tree now suffices.
3134 2001-08-22 Roland McGrath <roland@frob.com>
3136 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3137 instead of <pthread.h>.
3138 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3139 (_IO_lock_initializer): Add braces.
3140 (_IO_lock_lock): Use __libc_lock_lock_recursive.
3141 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3143 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3144 (__libc_lock_define_initialized_recursive): Use it.
3145 (__libc_lock_init_recursive): Likewise.
3146 (__libc_lock_fini_recursive): Likewise.
3147 (__libc_lock_lock_recursive): Likewise.
3148 (__libc_lock_trylock_recursive): Likewise.
3149 (__libc_lock_unlock_recursive): Likewise.
3150 (__libc_lock_define_recursive): New macro.
3152 2001-08-14 Jakub Jelinek <jakub@redhat.com>
3154 * lockfile.c (__pthread_provide_lockfile): New variable.
3155 * pthread.c (__pthread_require_lockfile): New variable.
3156 * cancel.c (__pthread_require_lockfile): New variable.
3158 2001-07-31 Ulrich Drepper <drepper@redhat.com>
3160 * tst-context.c (threadfct): Initialize context before calling
3163 * Examples/ex17.c: Make sure test thread is around long enough.
3165 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
3167 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3169 2001-07-24 Ulrich Drepper <drepper@redhat.com>
3171 * tst-context.c (main): Print explanation before bailing out
3172 because context handling is not supported.
3174 2001-07-23 Ulrich Drepper <drepper@redhat.com>
3176 * Makefile (tests): Add tst-context.
3177 * tst-context.c: New file.
3179 * sysdeps/pthread/bits/stdio-lock.h: Define
3180 _IO_cleanup_region_start_noarg.
3182 2001-07-23 Jakub Jelinek <jakub@redhat.com>
3184 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3185 (ARCH_STACK_MAX_SIZE): Define.
3186 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3187 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3189 2001-07-19 Jakub Jelinek <jakub@redhat.com>
3191 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3193 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3194 (ARCH_STACK_MAX_SIZE): Define.
3195 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3196 NEED_SEPARATE_REGISTER_STACK.
3198 2001-07-16 Andreas Schwab <schwab@suse.de>
3200 * Makefile (before-compile): Don't add $(objpfx)crti.o.
3201 (omit-deps): Add crti.
3202 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3203 it is filtered out of the link command.
3205 2001-07-16 Ulrich Drepper <drepper@redhat.com>
3207 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3208 to find the right value for __pthread_initial_thread_bos, it's not
3209 used. If not FLOATING_STACKS first run
3210 __pthread_init_max_stacksize.
3212 2001-06-16 H.J. Lu <hjl@gnu.org>
3214 * internals.h: Include <stackinfo.h>.
3216 * attr.c: Don't include <stackinfo.h> here.
3217 * cancel.c: Likewise.
3218 * manager.c: Likewise.
3219 * pthread.c: Likewise.
3220 * ptlongjmp.c: Likewise.
3222 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
3224 * attr.c: Make _STACK_GROWS_UP work.
3225 * internals.h: Likewise.
3226 * manager.c: Likewise.
3227 * pthread.c: Likewise.
3229 2001-06-15 H.J. Lu <hjl@gnu.org>
3231 * pthread.c (__pthread_reset_main_thread): Fix a typo.
3233 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
3235 * semaphore.h: Use struct _pthread_fastlock as an element of
3236 sem_t instead of an identical struct.
3237 * rwlock.c: Remove casts.
3238 * semaphore.c: Likewise.
3240 2001-04-30 Alan Modra <amodra@one.net.au>
3242 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3244 2001-05-25 Bruce Mitchener <bruce@cubik.org>
3246 * linuxthreads.texi: Spelling corrections.
3248 2001-05-25 Ulrich Drepper <drepper@redhat.com>
3250 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3251 returning successfully.
3252 Patch by Gene Cooperman <gene@ccs.neu.edu>.
3254 2001-05-24 Ulrich Drepper <drepper@redhat.com>
3256 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3257 serious work try once whether the lock is uncontested.
3258 Remove duplicate reading of __status before loop.
3259 Change suggested by Hans Boehm <hans_boehm@hp.com>.
3261 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3262 (__pthread_alt_trylock): Likewise.
3264 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
3266 Memory barrier overhaul following line by line inspection.
3267 * mutex.c (pthread_once): Missing memory barriers added.
3268 * pthread.c (__pthread_wait_for_restart_signal,
3269 __pthread_timedsuspend_new, __pthread_restart_new): Added
3270 memory barriers ``just in case'' and for documentary value.
3271 * spinlock.c (__pthread_release): New inline function for releasing
3272 spinlock, to complement __pthread_acquire. Includes memory
3273 barrier prior to assignment to spinlock, and __asm __volatile
3274 dance to prevent reordering or optimization of the spinlock access.
3275 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3276 __pthread_alt_timedlock, __pthread_alt_unlock,
3277 __pthread_compare_and_swap): Updated to use new __pthread_release
3278 instead of updating spinlock directly.
3279 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3280 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3281 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3282 Memory barrier overhaul. Lots of missing memory barriers added,
3283 a couple needless ones removed.
3284 * spinlock.c (__pthread_compare_and_swap): testandset optimization
3285 removed, just calls __pthread_acquire, which has the new read
3286 barrier in it before its testandset.
3288 2001-05-20 Roland McGrath <roland@frob.com>
3290 * Makeconfig: New file, variables used to be in main libc Makeconfig.
3292 2001-05-09 Geoff Keating <geoffk@redhat.com>
3294 * sysdeps/powerpc/pt-machine.h
3295 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3296 (__compare_and_swap): Remove memory barriers.
3297 (__compare_and_swap_with_release_semantics): New function.
3299 2001-04-24 Andreas Jaeger <aj@suse.de>
3301 * wrapsyscall.c: send* and recv* return ssize_t.
3303 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3304 mutex instead of double locking it.
3305 Reported by Pierre Artaud <partaud@sodatec.com>.
3307 2001-04-23 Ulrich Drepper <drepper@redhat.com>
3309 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3310 using #ifdef whether the clock is available.
3311 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3313 * sysdeps/ia64/Versions: New file.
3315 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3316 have to call __gmon_start__ in the libpthread DSO.
3317 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3319 * Makefile (libpthread-routines): Add ptclock_gettime and
3321 * internals.h: Don't use cpuclock-init.h definitions, use
3322 hp-timing.h definitions.
3323 * pthread.c: Likewise.
3324 * manager.c: Likewise.
3325 * ptclock_gettime.c: New file.
3326 * ptclock_settime.c: New file.
3327 * internals.h: Fix parameter type for __pthread_clock_gettime and
3328 __pthread_clock_settime.
3330 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3331 * sysdeps/i386/i586/ptclock_settime.c: Removed.
3332 * sysdeps/i386/i586/Makefile: Removed.
3334 2001-04-22 Ulrich Drepper <drepper@redhat.com>
3336 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3337 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3339 2001-04-21 Andreas Jaeger <aj@suse.de>
3341 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3342 attribute, remove statements that will never be executed.
3343 (thread_func): Remove mutex_unlock call since it's never executed.
3344 (thread_func): Fix comment as suggested by Jakub Jelinek.
3346 * manager.c (__pthread_manager): Add noreturn
3348 (pthread_start_thread): Likewise, remove return statement.
3349 (pthread_start_thread_event): Likewise.
3350 Add noreturn attribute for pthread_handle_exit.
3351 * weaks.c: Add noreturn attribute for pthread_exit.
3353 * internals.h: Add __pthread_clock_gettime and
3354 __pthread_clock_settime prototypes.
3356 2001-04-21 Ulrich Drepper <drepper@redhat.com>
3358 * internals.h: Include <cpuclock-init.h>.
3359 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3360 CPUCLOCK_VARDEF is defined.
3361 * pthread.c (__pthread_initialize_minimal): Initialize
3362 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3363 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3364 for new thread to current CPU clock value.
3366 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3368 * sysdeps/i386/i586/Makefile: New file.
3369 * sysdeps/i386/i586/Versions: New file.
3370 * sysdeps/i386/i586/ptclock_gettime.c: New file.
3371 * sysdeps/i386/i586/ptclock_settime.c: New file.
3372 * sysdeps/i386/i686/Implies: New file.
3374 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3376 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3377 $generated, not $postclean-generated.
3379 2001-04-18 Andreas Jaeger <aj@suse.de>
3381 * Makefile (otherlibs): Added.
3383 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3385 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3387 2001-04-16 Ulrich Drepper <drepper@redhat.com>
3389 * signals.c (sigwait): NSIG is no signal number. Block all
3390 signals while in signal handler for signals in SET.
3391 Patch by Manfred Spraul <manfred@colorfullife.com>.
3393 2001-04-12 Ulrich Drepper <drepper@redhat.com>
3395 * tst-cancel.c: Disable most tests. Add new test where all
3396 cleanup handlers must run.
3397 * Makefile (tests): Add tst-cancel again.
3399 * cancel.c (__pthread_perform_cleanup): Correct condition for
3400 leaving cleanup loop early.
3402 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3403 all the files which use CURRENT_STACK_FRAME.
3404 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3405 __builtin_frame_address.
3406 * sysdeps/i386/i686/pt-machine.h: Likewise.
3408 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3410 * Makefile (tests): Comment out tst-cancel for now.
3412 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
3413 temporary file in object directory.
3414 * Makefile: Don't allow inlining when compiling tst-cancel.c.
3415 Pass $(objpfx) to tst-cancel.
3417 2001-04-11 David S. Miller <davem@redhat.com>
3419 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3420 up closer to user local variables so that new cleanup heuristics work.
3421 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3423 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3425 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3427 (_pthread_cleanup_push_defer): Likewise.
3429 * tst-cancel.c (main): Fix loop printing cleanup output.
3431 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
3433 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3435 (__pthread_spin_trylock): Likewise.
3436 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3438 2001-04-10 Ulrich Drepper <drepper@redhat.com>
3440 * join.c (pthread_exit): Move code to new function __pthread_do_exit
3441 which takes an extra parameter with the current frame pointer.
3442 Call new function with CURRENT_STACK_FRAME.
3443 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
3444 with the new parameter.
3445 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3446 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
3447 this parameter as the initial value the cleanup handler records are
3448 compared against. No active cleanup handler record must have an
3449 address lower than the previous one and the initial record must be
3450 above (below on PA) the frame address passed in.
3451 (pthread_setcancelstate): Call __pthread_do_exit instead of
3453 (pthread_setcanceltype): Likewise.
3454 (pthread_testcancel): Likewise.
3455 (_pthread_cleanup_pop_restore): Likewise.
3456 * condvar.c (pthread_cond_wait): Likewise.
3457 (pthread_cond_timedwait_relative): Likewise.
3458 * manager.c (pthread_start_thread): Likewise.
3459 * oldsemaphore.c (__old_sem_wait): Likewise.
3460 * pthread.c (pthread_handle_sigcancel): Likewise.
3461 * semaphore.c (__new_sem_wait): Likewise.
3462 (sem_timedwait): Likewise.
3463 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3464 to limit the cleanup handlers which get run.
3465 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
3466 for __pthread_perform_cleanup.
3468 * Makefile (tests): Add tst-cancel.
3469 * tst-cancel.c: New file.
3471 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
3473 * sysdeps/cris/pt-machine.h: New file.
3474 * sysdeps/cris/pspinlock.c: New file.
3476 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3478 * shlib-versions: Add case for Linux on CRIS.
3480 2001-03-26 Ulrich Drepper <drepper@redhat.com>
3482 * attr.c (pthread_getattr_np): Correct computation of stack size
3483 for machiens with register stack.
3485 * Examples/ex17.c (main): Correct detection of failed mmap call.
3487 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3489 * pthread.c (__pthread_initialize_manager): Fix a typo.
3491 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3493 * attr.c (__pthread_attr_setstack): Fix alignment check.
3494 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3495 * Makefile (tests): Add ex17 test.
3496 * Examples/ex17.c: New test.
3498 2001-03-20 Ulrich Drepper <drepper@redhat.com>
3500 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3501 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3502 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3504 2001-03-18 Ulrich Drepper <drepper@redhat.com>
3506 * Makefile: When generating DSO link with libc_nonshared.a.
3508 2001-02-26 Jakub Jelinek <jakub@redhat.com>
3510 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3512 2001-02-23 Jakub Jelinek <jakub@redhat.com>
3514 * internals.h (__pthread_init_max_stacksize): New prototype.
3515 * attr.c (__pthread_attr_setstacksize): Call
3516 __pthread_init_max_stacksize if not yet initialized.
3517 * pthread.c (__pthread_init_max_stacksize): New function.
3518 (__pthread_initialize_manager): Call it.
3519 Patch by <dtc@cmucl.cons.org>.
3521 2001-03-16 Ulrich Drepper <drepper@redhat.com>
3523 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3525 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3527 * shlib-versions: Add rule for Linux on 64 bit S/390.
3528 * sysdeps/s390/s390-64/pt-machine.h: New file.
3529 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3531 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3533 * sysdeps/s390/pt-machine.h: Move to...
3534 * sysdeps/s390/s390-32/pt-machine.h: ...here.
3535 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3537 2001-03-15 Ulrich Drepper <drepper@redhat.com>
3539 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3540 * attr.c: Implement pthread_getattr_np.
3541 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3542 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3543 * manager.c (pthread_handle_create): Initialize p_inheritsched.
3545 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3547 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3550 2001-02-20 Hans Boehm <hans_boehm@hp.com>
3552 * manager.c (manager_mask): Removed static vesion. Now always local
3553 to __pthread_manager().
3554 (manager_mask_all): Removed completely.
3555 (__pthread_manager): Remove manager_mask_all initialization.
3556 (pthread_handle_create): Remove code to set and reset signal mask
3557 around __clone2() calls.
3559 2001-02-17 Jakub Jelinek <jakub@redhat.com>
3561 * spinlock.c (__pthread_lock): Force lock->__status to be read from
3562 memory on every spin.
3564 2001-02-10 Andreas Jaeger <aj@suse.de>
3566 * Makefile (extra-objs): New.
3568 2001-02-09 Jakub Jelinek <jakub@redhat.com>
3570 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3571 __pthread_initialize_minimal prototype.
3573 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
3575 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3577 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
3579 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3581 2001-02-06 Ulrich Drepper <drepper@redhat.com>
3583 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3584 broken code. Patch by Jes Sorensen.
3586 2001-02-06 Andreas Jaeger <aj@suse.de>
3588 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3590 * internals.h: ...here.
3592 2001-02-05 Jes Sorensen <jes@linuxcare.com>
3594 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3596 2001-02-02 Ulrich Drepper <drepper@redhat.com>
3598 * Versions: Remove __pthread_initialize_minimal.
3600 2001-02-01 Ulrich Drepper <drepper@redhat.com>
3602 * Makefile: Add rules to build crti.o and make it being used in
3603 building libpthread.so.
3604 * sysdeps/i386/Makefile: New file.
3605 * sysdeps/pthread/pt-initfini.c: New file.
3607 * pthread.c: Cleanups.
3609 2001-01-28 Andreas Jaeger <aj@suse.de>
3611 * oldsemaphore.c (__old_sem_init): Adjust for last change.
3612 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3613 * spinlock.c: Likewise.
3615 2001-01-28 Ulrich Drepper <drepper@redhat.com>
3617 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3618 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3619 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3620 * pthread.c: Likewise.
3621 * spinlock.h: Likewise.
3622 * sysdeps/pthread/pthread.h: Likewise.
3624 2001-01-26 Ulrich Drepper <drepper@redhat.com>
3626 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3627 as struct __pthread_attr_s.
3629 * semaphore.h (sem_t): Cleanup namespace, rename status and
3632 2001-01-13 Jakub Jelinek <jakub@redhat.com>
3634 * pthread.c (pthread_onexit_process): Clear
3635 __pthread_manager_thread_bos after freeing it.
3636 * Makefile (tests): Add ex16.
3637 * Examples/ex16.c: New file.
3639 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3641 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3643 * pthread.c (pthread_exit_process): Rename to...
3644 (pthread_onexit_process): ...this.
3645 (pthread_atexit_process, pthread_atexit_retcode): New.
3646 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3647 and only if HAVE_Z_NODELETE is not defined.
3648 (__pthread_initialize_manager): Register pthread_atexit_retcode
3651 2001-01-11 Ulrich Drepper <drepper@redhat.com>
3653 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3655 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3657 * Makefile (tests): Add ex15.
3658 * Examples/ex15.c: New test.
3660 2001-01-08 Ulrich Drepper <drepper@redhat.com>
3662 * pthread.c (pthread_exit_process): Free memory allocated for
3665 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3667 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3668 (pthread_free): Always unmap the stack. It's safe now that we don't
3669 use MAP_FIXED to allocate stacks.
3671 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3673 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3675 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3677 2000-11-15 Wolfram Gloger <wg@malloc.de>
3679 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3680 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3682 2000-12-27 Andreas Jaeger <aj@suse.de>
3684 * Examples/ex13.c: Make local functions static.
3685 * ecmutex.c: Likewise.
3686 * joinrace.c: Likewise.
3687 * Examples/ex14.c: Likewise.
3689 * Examples/ex2.c: Make local functions static; reformat.
3690 * Examples/ex1.c: Likewise.
3691 * Examples/ex4.c: Likewise.
3692 * Examples/ex5.c: Likewise.
3693 * Examples/ex7.c: Likewise.
3695 * oldsemaphore.c: Add prototypes to shut up GCC.
3696 * pt-machine.c: Likewise.
3698 * weaks.c: Add prototype for pthread_exit.
3700 * internals.h: Add some prototypes, format prototypes and add
3702 Move __libc_waitpid prototype to include/sys/wait.h.
3704 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3705 * mutex.c: Likewise.
3706 * specific.c: Likewise.
3707 * ptfork.c: Likewise.
3709 * lockfile.c: Include internals.h to get prototypes.
3710 * events.c: Likewise.
3711 * sysdeps/alpha/pspinlock.c: Likewise.
3712 * sysdeps/arm/pspinlock.c: Likewise.
3713 * sysdeps/hppa/pspinlock.c: Likewise.
3714 * sysdeps/i386/pspinlock.c: Likewise.
3715 * sysdeps/ia64/pspinlock.c: Likewise.
3716 * sysdeps/m68k/pspinlock.c: Likewise.
3717 * sysdeps/mips/pspinlock.c: Likewise.
3718 * sysdeps/powerpc/pspinlock.c: Likewise.
3719 * sysdeps/s390/pspinlock.c: Likewise.
3720 * sysdeps/sh/pspinlock.c: Likewise.
3721 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3722 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3723 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3725 2000-12-27 Ulrich Drepper <drepper@redhat.com>
3727 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3728 (__pthread_attr_getstack): Return correct address.
3729 Add warnings for using pthread_attr_getstackaddr and
3730 pthread_attr_setstackaddr.
3732 2000-12-26 Ulrich Drepper <drepper@redhat.com>
3734 * Examples/ex6.c (test_thread): Make static.
3735 * Examples/ex12.c (test_thread): Make static and add noreturn
3738 2000-12-18 Jes Sorensen <jes@linuxcare.com>
3740 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3741 and compare_and_swap_with_release_semantics returns int not long.
3743 2000-12-17 Andreas Jaeger <aj@suse.de>
3745 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3747 * sysdeps/arm/pt-machine.h (testandset): Likewise.
3748 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3749 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3750 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3751 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3752 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3754 2000-12-17 Ulrich Drepper <drepper@redhat.com>
3756 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3757 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3759 2000-12-17 Andreas Jaeger <aj@suse.de>
3761 * internals.h: Add prototypes for testandset and
3762 __compare_and_swap to shut up gcc warnings.
3764 2000-12-06 Wolfram Gloger <wg@malloc.de>
3766 * join.c (pthread_detach): Allow case where the thread has already
3769 2000-12-05 Andreas Jaeger <aj@suse.de>
3771 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3772 * sysdeps/mips/pt-machine.h (testandset): Likewise.
3773 (__compare_and_swap): Likewise.
3774 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3776 2000-11-20 Jakub Jelinek <jakub@redhat.com>
3778 * Examples/ex3.c (main): Cast int to long before casting to void *.
3779 (search): Cast void * to long, not int.
3780 * Examples/ex8.c (main, thread): Similarly.
3781 * Examples/ex11.c (main): Similarly.
3782 * Examples/ex14.c (worker, do_test): Similarly.
3783 * ecmutex.c (worker, do_test): Similarly.
3784 (nlocks): Cast to int.
3786 2000-11-08 Bruce Mitchener <bruce@cubik.org>
3788 * linuxthreads.texi: Add documentation for pthreads attributes
3789 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
3790 patch. Document pthread_[sg]etconcurrency(). Mark
3791 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3793 2000-11-07 Ulrich Drepper <drepper@redhat.com>
3795 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3797 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3798 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3800 2000-11-06 Ulrich Drepper <drepper@redhat.com>
3802 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3803 not doing it right now.
3804 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3806 2000-10-30 Ulrich Drepper <drepper@redhat.com>
3808 * Examples/ex4.c (main): Don't use exit() to avoid warning with
3811 2000-10-29 Ulrich Drepper <drepper@redhat.com>
3813 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3814 here. Reported by Bruce Mitchener <bruce@cubik.org>.
3816 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3817 discussing mutexes. (As per the Unix98 name for the API.)
3818 Changes documentation for pthread_mutexattr_setkind_np() and
3819 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3820 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3821 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3822 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3823 Begins to introduce discussion of the ``timed'' mutex type. This
3824 discussion is currently incomplete.
3825 Patch by Bruce Mitchener <bruce@cubik.org>.
3827 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3828 Yutaka Niibe <gniibe@chroot.org>
3830 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3831 has restrictions, use register.
3833 2000-10-23 Andreas Schwab <schwab@suse.de>
3835 * Examples/ex14.c (TIMEOUT): Override default timeout.
3837 2000-10-16 Ulrich Drepper <drepper@redhat.com>
3839 * specific.c: Protect tsd array modification in thread data
3840 structures by getting the thread lock in pthread_key_delete and
3841 __pthread_destroy_specifics.
3842 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3844 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3846 * sysdeps/pthread/bits/initspin.h: New file.
3847 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3848 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3849 (__pthread_alt_init_lock): Likewise.
3850 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3852 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3854 * oldsemaphore.c (__old_sem_init): Release lock with
3855 LT_SPINLOCK_INIT, not zero.
3856 * spinlock.c (__pthread_unlock): Likewise.
3857 (__pthread_alt_lock): Likewise.
3858 (__pthread_alt_timedlock): Likewise.
3859 (__pthread_alt_unlock): Likewise.
3860 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3861 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
3862 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
3863 LT_SPINLOCK_INIT do initialize spinlocks not 0.
3865 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3867 * shlib-versions: Add version definitions for hppa-linux.
3869 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3871 * sysdeps/hppa/pspinlock.c: New file.
3872 * sysdeps/hppa/pt-machine.h: New file.
3873 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3875 2000-10-05 Jakub Jelinek <jakub@redhat.com>
3877 * mutex.c (__pthread_mutex_destroy): Correct test of
3878 busy mutex for mutexes using alternate fastlocks.
3879 Patch by dtc@cmucl.cons.org.
3881 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
3883 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3885 2000-09-28 Ulrich Drepper <drepper@redhat.com>
3887 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3888 test for owner first.
3889 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3891 * cancel.c (pthread_cancel): Don't do anything if cancelation is
3894 2000-09-26 Ulrich Drepper <drepper@redhat.com>
3896 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3897 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3899 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3900 _POSIX_MONOTONIC_CLOCK.
3902 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3905 2000-09-20 Andreas Jaeger <aj@suse.de>
3907 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3908 "testrtsig.h" conditional.
3910 2000-09-11 Ulrich Drepper <drepper@redhat.com>
3912 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
3913 pthread_attr_setstack.
3914 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
3915 pthread_attr_setstack.
3916 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
3918 2000-09-05 Ulrich Drepper <drepper@redhat.com>
3920 * Examples/ex14.c: New file.
3921 * Makefile (tests): Add ex14.
3923 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
3924 mutex. Patch by dtc@cmucl.cons.org.
3926 * ecmutex.c: New file.
3927 * Makefile (tests): Add ecmutex.
3929 2000-09-04 H.J. Lu <hjl@gnu.org>
3931 * attr.c (__pthread_attr_setguardsize): Use page_roundup
3932 instead of roundup to round up to the page size.
3934 2000-09-03 Mark Kettenis <kettenis@gnu.org>
3936 * manager.c (pthread_exited): Correctly report event as TD_REAP
3937 instead of TD_DEATH. Fix comments.
3939 2000-09-03 Ulrich Drepper <drepper@redhat.com>
3941 * spinlock.h (testandset): Add cast to avoid warning.
3942 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
3944 2000-09-02 Andreas Jaeger <aj@suse.de>
3946 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
3949 2000-09-01 Ulrich Drepper <drepper@redhat.com>
3951 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3952 Fix typo in last patch (_mode -> _flags).
3954 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3955 Provide definition which respects _IO_USER_LOCK flag.
3957 2000-08-30 Ulrich Drepper <drepper@redhat.com>
3959 * manager.c (pthread_allocate_stack): Clear descriptor only if not
3962 2000-08-25 Ulrich Drepper <drepper@redhat.com>
3964 * Makefile: Add rules to build and run unload.
3965 * unload.c: New file.
3967 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
3969 * sysdeps/pthread/pthread.h
3970 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
3971 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
3973 2000-08-24 Andreas Jaeger <aj@suse.de>
3975 * Examples/ex13.c: Include <string.h> for strerror prototype and
3976 <stdlib.h> for abort prototype.
3977 (pthr_cond_signal_mutex): Rewrite to silence GCC.
3978 (thread_start): Remove unused variable err.
3979 (main): Silence GCC warnings.
3981 2000-08-22 Andreas Jaeger <aj@suse.de>
3983 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
3985 * Makefile (tests): Add ex13.
3987 2000-08-20 Ulrich Drepper <drepper@redhat.com>
3989 * semaphore.h: Add restrict where required by AGd4.
3990 * sysdeps/pthread/pthread.h: Likewise.
3991 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
3993 2000-08-15 Ulrich Drepper <drepper@redhat.com>
3995 * Makefile (tests): Add ex12. Add rule to build it.
3996 * Examples/ex12.c: New file.
3998 2000-08-13 Ulrich Drepper <drepper@redhat.com>
4000 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4001 even though the implementation is not quite complete (but it reports
4002 it). Define _POSIX_MESSAGE_PASSING to -1.
4003 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4005 2000-08-12 Andreas Jaeger <aj@suse.de>
4007 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4009 (__compare_and_swap): Likewise.
4010 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4012 2000-08-10 Ulrich Drepper <drepper@redhat.com>
4014 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4015 p_h_errnop correctly and not to NULL.
4017 2000-08-05 Ulrich Drepper <drepper@redhat.com>
4019 * Banner: Bump version number to 0.9.
4021 2000-08-04 Ulrich Drepper <drepper@redhat.com>
4023 * Makefile (tests): Add tststack. Add rule to build the program.
4024 * tststack.c: New file.
4026 * internals.h: Declare __pthread_max_stacksize.
4027 * pthread.c (__pthread_max_stacksize): New variable.
4028 (__pthread_initialize_manager): Determine __pthread_initialize_manager
4030 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4031 (pthread_allocate_stack): Allow kernel to choose stack address if
4032 FLOATING_STACKS. This also handles variable-sized stacks.
4033 Always allocate stack and guardpage together. Use mprotect to
4034 change guardpage access.
4035 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4036 ARCH_STACK_MAX_SIZE.
4038 * attr.c (__pthread_attr_setstacksize): Also test value against
4041 * manager.c (__pthread_nonstandard_stacks): Define only if
4042 THREAD_SELF is not defined.
4043 (pthread_allocate_stack): Always initialize gardaddr to a correct
4045 (pthread_handle_create): Unmap thread with one call.
4046 (pthread_free): Remove test for initial thread before removing stack.
4047 Unmap stack with one call.
4049 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4050 1 to avoid removing the stack.
4052 2000-07-27 Jes Sorensen <jes@linuxcare.com>
4054 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4055 load of spin lock to prime the cache before the atomic compare and
4056 exchange operation (cmpxchg4). This avoids the spinning on the
4057 cmpxchg4 instruction and reduces movement of the cache line back
4058 and forth between the processors (explanation by Asis K. Mallick
4059 from Intel). This basically makes the implementation operate the
4060 same as the Linux kernel implementation.
4062 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4063 * sysdeps/ia64/pspinlock.c: New file.
4065 2000-08-03 Ulrich Drepper <drepper@redhat.com>
4067 * pthread.c: Move definition of __pthread_set_own_extricate_if...
4068 * spinlock.h: ...here. Remove locking.
4069 * internals.h: Remove __pthread_set_own_extricate_if prototype.
4071 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4072 (rwlock_rd_extricate_func): Don't determine self, let
4073 __pthread_lock do it.
4074 (rwlock_wr_extricate_func): Likewise.
4075 (rwlock_have_already): Optimize *pself handling a bit.
4077 * mutex.c: Use __builtin_expect.
4078 * pthread.c: Likewise.
4080 2000-08-02 Andreas Jaeger <aj@suse.de>
4082 * sysdeps/s390/pspinlock.c: New file.
4083 * sysdeps/s390/pt-machine.h: New file.
4084 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4086 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4088 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4090 * sysdeps/mips/pt-machine.h (testandset): Likewise.
4092 2000-07-26 Andreas Jaeger <aj@suse.de>
4094 * pthread.c: Initialize p_sem_avail.
4096 2000-07-25 Ulrich Drepper <drepper@redhat.com>
4098 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4099 * semaphore.c: Handle spurious wakeups.
4101 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4102 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4104 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4105 (__pthread_wait_for_restart): Likewise.
4107 * condvar.c (pthread_cond_wait): Also check whether thread is
4108 cancelable before aborting loop.
4109 (pthread_cond_timedwait): Likewise.
4111 * signals.c (pthread_sighandler): Remove special code to restrore
4113 (pthread_sighandler_t): Likewise.
4115 2000-07-25 Mark Kettenis <kettenis@gnu.org>
4117 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4118 * pthread.c: Include <resolv.h>.
4119 (_res): Undefine. Add extern declaration.
4121 2000-07-24 Ulrich Drepper <drepper@redhat.com>
4123 * pthread.c (__pthread_initial_thread): Update initializer.
4124 (__pthread_manager_thread): Likewise.
4125 (pthread_initialize): Move setrlimit call to...
4126 (__pthread_initialize_manager): ...here.
4127 (__pthread_reset_main_thread): Reset also soft limit on stack size.
4129 * condvar.c: Handle spurious wakeups. [PR libc/1749].
4130 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4132 2000-07-21 Ulrich Drepper <drepper@redhat.com>
4134 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4135 __compare_and_swap to define testandset.
4136 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4137 Define IMPLEMENT_TAS_WITH_CAS.
4139 2000-07-20 Ulrich Drepper <drepper@redhat.com>
4141 * Makefile: Pass -z nodelete to linker for libpthread.so
4142 generation if it understand this option.
4144 2000-07-18 Mark Kettenis <kettenis@gnu.org>
4146 * manager.c (pthread_handle_create): Remove initialization of
4147 new_thread->p_res._sock.
4149 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
4151 Bugfixes to the variant of the code for machines with no compare
4154 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4155 node was not being properly enqueued, due to failing to update
4156 the lock->__status field.
4158 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4159 being set inappropriately, causing the suspend function to be called
4160 with a null self pointer and crash.
4162 2000-07-18 Ulrich Drepper <drepper@redhat.com>
4164 * spinlock.h (__pthread_alt_trylock): Fix code used if no
4165 compare&swap is available.
4167 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4170 * pthread.c (pthread_initialize): Don't use sysconf to determine
4171 whether the machine has more than one processor.
4173 * spinlock.c (__pthread_alt_timedlock): Add back one of the
4174 removed thread_self calls.
4176 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4178 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4179 __compare_and_swap to compare_and_swap in code which assumes
4180 compare swap is available.
4182 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4184 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4185 bug whereby thr field of waitnode structure would not be correctly
4186 set unless a null self pointer is passed to the functions.
4187 Eliminated redundant calls to thread_self().
4189 2000-07-18 Jakub Jelinek <jakub@redhat.com>
4191 * pthread.c (__pthread_initialize_manager): Lock
4192 __pthread_manager_thread.p_lock before calling clone.
4194 2000-05-05 H.J. Lu <hjl@gnu.org>
4196 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4197 have acquire semantics.
4198 (__compare_and_swap_with_release_semantics): New inline
4200 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4202 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
4204 * manager.c: Fix the problem with signals at startup.
4205 Change the way that thread stacks are allocated on IA64.
4206 Clean up some of the guard page allocation stuff.
4208 1999-12-19 H.J. Lu <hjl@gnu.org>
4210 * internals.h (page_roundup): New.
4211 * attr.c (__pthread_attr_setguardsize); Use page_roundup
4213 * manager.c (pthread_allocate_stack): Make sure guardaddr is
4214 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4217 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
4219 * manager.c (pthread_allocate_stack): Unmap the stack top
4220 if failed to map the stack bottom.
4222 (pthread_free): Fix the guard page.
4224 * pthread.c (pthread_initialize): Set rlimit correctly for
4225 NEED_SEPARATE_REGISTER_STACK.
4227 1999-12-16 H.J. Lu <hjl@gnu.org>
4229 * pthread.c (__pthread_initialize_manager): Pass
4230 __pthread_manager_thread_bos instead of
4231 __pthread_manager_thread_tos to __clone2.
4233 1999-12-16 H.J. Lu <hjl@gnu.org>
4235 * manager.c (pthread_allocate_stack): Correct the calculation
4236 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4239 1999-12-13 H.J. Lu <hjl@gnu.org>
4241 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4242 bit after setting ar.ccv.
4244 1999-12-12 H.J. Lu <hjl@gnu.org>
4246 * manager.c (pthread_allocate_stack): Make the starting
4247 address of the stack bottom page aligned. FIXME: it may
4248 need changes in other places.
4249 (pthread_handle_create): Likewise.
4251 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
4253 * manager.c (pthread_allocate_stack): Handle
4254 NEED_SEPARATE_REGISTER_STACK.
4255 (pthread_handle_create): Likewise.
4256 * pthread.c (__pthread_initialize_manager): Likewise.
4258 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4260 1999-12-02 H.J. Lu <hjl@gnu.org>
4262 * sysdeps/ia64/pt-machine.h: New.
4264 2000-07-13 Ulrich Drepper <drepper@redhat.com>
4266 * wrapsyscall.c: Mark non-__ protected names as weak.
4269 2000-07-12 Bruno Haible <haible@clisp.cons.org>
4271 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4273 2000-07-12 Ulrich Drepper <drepper@redhat.com>
4275 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4276 Add tests also to new alternative spinlock implementation.
4277 * spinlock.h: Likewise.
4278 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4280 2000-07-06 Ulrich Drepper <drepper@redhat.com>
4282 * Version: Export __sigaction.
4283 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
4285 * pthread.c: Use __libc_sigaction instead of __sigaction.
4287 * condvar.c: Implement pthread_condattr_getpshared and
4288 pthread_condattr_setpshared.
4289 * mutex.c: Implement pthread_mutexattr_getpshared and
4290 pthread_mutexattr_setpshared.
4291 * Versions: Export new functions.
4292 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4294 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4295 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4298 2000-07-04 Greg McGary <greg@mcgary.org>
4300 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4301 pragmas. Include bp-sym.h only if _LIBC.
4303 2000-07-04 Ulrich Drepper <drepper@redhat.com>
4305 * spinlock.c (__pthread_unlock): Properly place write barrier.
4306 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4308 2000-07-03 Ulrich Drepper <drepper@redhat.com>
4310 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4311 faster on SMP systems. No more emulation of compare&swap for adaptive
4313 * spinlock.h: Likewise.
4314 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4315 Replace fast with adaptive mutex.
4316 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4317 * condvar.c: Likewise.
4318 * pthread.c: Define and initialize __pthread_smp_kernel variable.
4319 * internals.h: Declare __pthread_smp_kernel.
4320 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4321 _pthread_fastlock structure.
4322 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4324 * pthread.c: Remove initialization to zero from global variables.
4326 2000-06-29 Jakub Jelinek <jakub@redhat.com>
4328 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4330 2000-06-28 Greg McGary <greg@mcgary.org>
4332 * weaks.c: Wrap BP_SYM () around weak extern declarations of
4333 pthread functions that have pointers in their return+arg signatures.
4335 2000-06-27 Greg McGary <greg@mcgary.org>
4337 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4338 extern declarations of pthread functions that have pointers in
4339 their return+arg signatures.
4341 2000-06-26 Ulrich Drepper <drepper@redhat.com>
4343 * Makefile (tests): Add ex11. Add rules to build it.
4344 * Examples/ex11.c: New file.
4345 * rwlock.c: Fix complete braindamaged previous try to implement
4348 * spinlock.c: Pretty print.
4350 2000-06-25 Ulrich Drepper <drepper@redhat.com>
4352 * Makefile (tests): Add ex10. Add rules to build it.
4353 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4354 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4355 * condvar.c (pthread_cond_wait): Allow mutex of kind
4356 PTHREAD_MUTEX_TIMED_NP.
4357 (pthread_cond_timedwait_relative): Likewise.
4358 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4359 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4360 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4361 (__pthread_mutex_lock): Use __pthread_alt_lock for
4362 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4363 (__pthread_mutex_timedlock): New function.
4364 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4365 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4366 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4367 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4368 * spinlock.c: Implement alternate fastlocks.
4369 * spinlock.h: Add prototypes.
4370 * Examples/ex10.c: New file.
4371 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4372 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4374 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4375 (__pthread_rwlock_timedrdlock): New function.
4376 (__pthread_rwlock_timedwrlock): New function.
4377 Use laternate fastlock function everywhere.
4379 2000-06-21 Andreas Jaeger <aj@suse.de>
4381 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4384 * join.c: Include <stdlib.h> for exit prototype.
4386 2000-06-20 Ulrich Drepper <drepper@redhat.com>
4388 * sysdeps/i386/useldt.h: Include <stdlib.h>.
4390 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4391 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4393 * Makefile (libpthread-routines): Add barrier.
4394 (tests): Add ex9. Add rule to build ex9.
4395 * Versions: Export barrier functions.
4396 * barrier.c: New file.
4397 * Examples/ex9.c: New file.
4398 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4399 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4400 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4402 2000-06-19 H.J. Lu <hjl@gnu.org>
4404 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4405 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4406 (compare_and_swap_with_release_semantics): New. Default to
4407 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4410 * spinlock.c (__pthread_unlock): Call
4411 compare_and_swap_with_release_semantics () instead of
4412 compare_and_swap ().
4414 2000-06-19 Ulrich Drepper <drepper@redhat.com>
4416 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4418 * sysdeps/pthread/timer_delete.c: Likewise.
4419 * sysdeps/pthread/timer_getoverr.c: Likewise.
4420 * sysdeps/pthread/timer_gettime.c: Likewise.
4421 * sysdeps/pthread/timer_settime.c: Likewise.
4423 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4425 Timer nodes are now reference counted, and can be marked
4426 as deleted. This allows for the safe release of the global mutex
4427 in the middle without losing the timer being operated on.
4429 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
4430 member is now an enum with three values, so that an intermediate
4431 state can be represented (deleted but not free for reuse yet).
4432 New refcount member added.
4433 * sysdeps/pthread/timer_routines.c: Likewise.
4435 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4436 timer_valid): New inline functions added.
4438 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4439 restructured, recursive deadlock bug fixed.
4441 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4442 timer_addref to ensure that timer won't be deleted while mutex is not
4443 held. Also uses timer_invalid to perform validation of timer handle.
4444 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4445 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4447 2000-06-14 Ulrich Drepper <drepper@redhat.com>
4449 * shlib-versions: Add entry for SH.
4450 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4452 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4454 A few optimizations. Got rid of unnecessary wakeups of timer threads,
4455 tightened up some critical regions and micro-optimized some list
4458 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4459 Returns int value now to indicate whether timer was queued at head.
4460 * sysdeps/pthread/posix-timer.h: Likewise.
4461 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4462 new return value from __timer_thread_queue_timer to avoid waking
4463 up timer thread unnecessarily.
4465 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4466 inuse flag, because this requires mutex to be held. Callers updated
4467 to do the check when they have the mutex.
4468 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4470 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4471 regions: avoids making system calls while holding timer mutex, and
4472 a few computations were moved outside of the mutex as well.
4473 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4475 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4476 to list_unlink_ip, meaning idempotent. Pointer manipulation
4477 changed to get better better code out of gcc.
4478 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4479 version of list_unlink added here.
4480 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4481 function in all places: idempotent one for timers, non-idempotent
4482 one for thread nodes.
4483 * sysdeps/pthread/timer_settime: Likewise.
4484 * sysdeps/pthread/timer_routines.c: Likewise.
4486 2000-06-13 Ulrich Drepper <drepper@redhat.com>
4488 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4489 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4491 * sysdeps/pthread/Makefile: Remove tests definition.
4493 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
4494 Yutaka Niibe <gniibe@chroot.org>
4496 * sysdeps/sh/pspinlock.c: New file.
4497 * sysdeps/sh/pt-machine.h: New file.
4499 2000-06-12 Ulrich Drepper <drepper@redhat.com>
4501 * Makefile (tests): Add joinrace.
4503 * Examples/ex6.c: Test return value of pthread_join.
4505 2000-06-11 Geoff Keating <geoffk@cygnus.com>
4507 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4508 (__pthread_spin_trylock): Implement.
4509 (__pthread_spin_unlock): Implement.
4510 (__pthread_spin_init): Implement.
4511 (__pthread_spin_destroy): Implement.
4513 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4515 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4516 really append the entry.
4518 2000-06-10 Andreas Jaeger <aj@suse.de>
4520 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4522 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
4524 * sysdeps/pthread/timer_create.c: Thread matching now done on
4525 clock type as well as thread attributes.
4526 There are individual global signal-delivering threads for
4527 different clock types.
4528 * sysdeps/pthread/posix-timer.h: Likewise.
4529 * sysdeps/pthread/timer_routines.c: Likewise.
4531 * sysdeps/pthread/timer_routines.c: Thread allocation and
4532 deallocation function now remembers to put thread on active
4533 list and remove from active list.
4534 Thus now the feature of binding multiple timers
4535 to a single thread actually works.
4537 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4539 * pthread.c (__pthread_create_2_1): Optimize a bit.
4541 * internals.h (invalid_handle): Also test for p_terminated != 0.
4542 (nonexisting_handle): New function. Same as old invalid_handle.
4543 * join.c (pthread_join): Use nonexisting_handle instead of
4544 invalid_handle to test for acceptable thread handle.
4545 * manager.c (pthread_handle_free): Likewise.
4546 * joinrace.c: New file.
4547 Reported by Permaine Cheung <pcheung@cygnus.com>.
4549 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4551 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4552 Correct handling of matching variable.
4554 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4557 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4558 Be prepared for empty timer list.
4560 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4561 CPUTIME clock ID. Add support for thread clocks.
4563 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4564 subtraction were switched.
4566 * sysdeps/pthread/timer_routines.c (init_module): Use
4567 THREAD_MAXNODES threads.
4569 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4570 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4571 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4572 with sigqueueinfo is this system call is available.
4574 * sysdeps/pthread/timer_create.c (timer_create): Allow
4575 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4577 * sysdeps/pthread/Makefile: New file. Add rules to build timer
4579 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4581 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4583 * sysdeps/pthread/posix-timer.h: New file.
4584 * sysdeps/pthread/timer_create.c: New file.
4585 * sysdeps/pthread/timer_delete.c: New file.
4586 * sysdeps/pthread/timer_getoverr.c: New file.
4587 * sysdeps/pthread/timer_gettime.c: New file.
4588 * sysdeps/pthread/timer_routines.c: New file.
4589 * sysdeps/pthread/timer_settime.c: New file.
4590 * sysdeps/pthread/tst-timer.c: New file.
4592 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4594 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4595 LINK_MAX definitions if necessary.
4597 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4599 Added missing fork time handling of global libio lock.
4601 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4602 not just the individual stream locks. Rewritten to use new
4603 iterator interface provided by libio rather than accessing
4606 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4607 which lock and unlock the stream list using the new interface
4609 * internals.h: Likewise.
4611 * ptfork.c (__fork): Now calls __flockfilelist before fork,
4612 and __funlockfilelist in the parent after the fork.
4613 Child still calls __fresetlockfiles as before.
4615 * linuxthreads.texi: Now explains what happens to streams at
4616 fork time. Also whole new section on forking and thread added.
4617 Definition of pthread_atfork moved out of Miscellaneous Functions
4618 to this new section.
4620 2000-06-04 Jakub Jelinek <jakub@redhat.com>
4622 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4623 Add missing register.
4624 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4626 2000-06-02 Jakub Jelinek <jakub@redhat.com>
4628 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4629 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4630 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4632 2000-05-31 Andreas Jaeger <aj@suse.de>
4634 * sysdeps/mips/pspinlock.c: Implement spinlocks.
4636 2000-05-28 Ulrich Drepper <drepper@redhat.com>
4638 * spinlock.c (__pthread_lock): Remove ASSERT.
4640 * Makefile (tests): Add ex8.
4641 * Examples/ex8.c: New file.
4643 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
4645 Bugfix: The pthread_atfork mechanism now takes care of its
4646 own internal mutex at fork time.
4648 * ptfork.c (__fork): Revised so that the mutex is held across
4649 the fork operation and while the handlers are called, and so that
4650 the child resets the mutex.
4652 * linuxthreads.texi: Updated pthread_atfork documentation to make
4653 it clear that fork and pthread_atfork can't be reentered from
4654 atfork handlers, that pthread_atfork and fork are mutually atomic,
4655 and that the handlers are inherited by the child process.
4657 2000-05-24 Ulrich Drepper <drepper@redhat.com>
4659 * Makefile (libpthread-routines): Add pspinlock.
4660 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4661 Use struct _pthread_fastlock instead of pthread_spinlock_t.
4662 * condvar.c: Likewise.
4663 * internals.h: Likewise.
4665 * manager.c: Likewise.
4666 * mutex.c: Likewise.
4667 * pthread.c: Likewise.
4668 * rwlock.c: Likewise.
4669 * semaphore.c: Likewise.
4670 * signals.c: Likewise.
4671 * spinlock.h: Likewise.
4672 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
4673 * sysdeps/alpha/pspinlock.c: New file.
4674 * sysdeps/arm/pspinlock.c: New file.
4675 * sysdeps/i386/pspinlock.c: New file.
4676 * sysdeps/m68k/pspinlock.c: New file.
4677 * sysdeps/mips/pspinlock.c: New file.
4678 * sysdeps/powerpc/pspinlock.c: New file.
4679 * sysdeps/sparc/sparc32/pspinlock.c: New file.
4680 * sysdeps/sparc/sparc64/pspinlock.c: New file.
4681 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4682 back to _pthread_fastlock. Define new pthread_spinlock_t.
4684 2000-05-24 Andreas Jaeger <aj@suse.de>
4686 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4688 2000-05-21 Jakub Jelinek <jakub@redhat.com>
4690 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4692 2000-05-13 Jakub Jelinek <jakub@redhat.com>
4694 * internals.h (__RES_PTHREAD_INTERNAL): Define.
4696 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4698 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4699 object state is represented with additional bits which distinguish
4700 whether that state was set up in the current process, or
4701 in an ancestor process. If that state was set in an ancestor,
4702 it means that a fork happened while thread was executing the init
4703 function. In that case, the state is reset to NEVER.
4704 * mutex.c (__pthread_once_fork_prepare): New function.
4705 (__pthread_once_fork_child): Likewise
4706 (__pthread_once_fork_parent): Likewise
4707 (__pthread_reset_pthread_once): Removed.
4708 * ptfork.c (__fork): Call new handlers in mutex.c.
4709 * internals.h: Declarations of new mutex.c functions added.
4710 Declaration of removed function deleted.
4711 * linuxthreads.texi: Updated documentation about pthread_once
4712 to clarify what happens under cancellation and forking.
4714 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4716 * internals.h: New thread manager request type, REQ_KICK.
4717 * join.c (pthread_exit): main thread now calls exit() instead
4718 of _exit() in order to proper process cleanup.
4719 * manager.c (__pthread_manager): Do not terminate manager
4720 after unblocking main thread; wait for main thread's
4721 REQ_PROCESS_EXIT request instead.
4722 Also, added REQ_KICK case to handle new request; this just does
4724 * manager.c (pthread_exited): Do not terminate manager after
4725 unblocking main thread.
4726 * manager.c (__pthread_manager_sighandler): If the main thread
4727 is waiting for all other threads to die, send a REQ_KICK into
4728 the thread manager request pipe to get it to clean out the threads
4729 and unblock the main thread as soon as possible. This fixes
4730 the 2000 millisecond hang on shutdown bug.
4731 * Examples/ex7.c: New file, tests shutdown behavior when all threads
4732 including the main one call pthread_exit(), or implicitly do so.
4733 * Makefile (tests): Add ex7.
4735 2000-05-05 Andreas Jaeger <aj@suse.de>
4737 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4738 (pthread_getcpuclockid): Correct test for ourselves.
4740 2000-05-05 Ulrich Drepper <drepper@redhat.com>
4742 * internals.h (struct _pthread_descr_struct): Reorganization.
4743 Allocate room for 16 pointers at head of the structure for future
4744 thread-local data handling. Move p_self member in this area.
4745 * manager.c (pthread_handle_create): Adjust use of p_self.
4746 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4747 * pthread.c (__pthread_initial_thread): Adjust initialization.
4748 (__pthread_manager_thread): Likewise.
4750 2000-04-29 Bruno Haible <haible@clisp.cons.org>
4752 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4753 for eventmask larger than 1 word.
4755 2000-04-27 Ulrich Drepper <drepper@redhat.com>
4757 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4758 * pthread.c (__pthread_initialize_minimal): New function. Perform
4759 minimal initialization.
4760 (pthread_initialize): Remove this code here.
4761 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
4762 are working around the problem in glibc.
4764 2000-04-25 Ulrich Drepper <drepper@redhat.com>
4766 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4767 now. First gcc must be fixed (more concrete: libgcc).
4769 2000-04-24 Ulrich Drepper <drepper@redhat.com>
4771 * pthread.c: Remove special treatement for interrupt handlers on x86.
4772 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4773 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4775 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4777 2000-04-24 Mark Kettenis <kettenis@gnu.org>
4779 * join.c (pthread_exit): Set p_terminated after reporting the
4780 termination event instead of before.
4782 2000-04-20 Jakub Jelinek <jakub@redhat.com>
4784 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4787 2000-04-18 Andreas Jaeger <aj@suse.de>
4789 * Versions: Use ld instead of ld.so.
4791 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4793 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4794 Remove the typedef keyword.
4796 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4798 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4800 (READ_MEMORY_BARRIER): Define.
4801 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4803 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4806 2000-04-17 Ulrich Drepper <drepper@redhat.com>
4808 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4809 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4810 use thread_handle().
4812 2000-04-16 Ulrich Drepper <drepper@redhat.com>
4814 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4815 if fast mutex is used. Don't initialize `already_canceled' twice.
4816 Correctly test for return value of timedsuspend.
4818 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
4819 therefore don't need the _rt versions of the signal handlers.
4821 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4823 * pthread.c (pthread_yield): New function.
4824 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4825 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4826 * internals.h: Declare __pthread_yield.
4828 * pthread.c (pthread_initialize): Avoid a bit more code if
4829 realtime signals are known to exist.
4831 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4832 to dynamically detect RT signals and avoid generating compatibility
4833 functions with old kernel.
4834 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4835 __pthread_restart_new directly.
4836 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4837 __pthread_wait_for_restart_signal directly.
4838 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4839 __pthread_timedsuspend_new directly.
4841 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4843 * condvar.c: Remove all the special code to handle cond_timedwait.
4844 Use timedsuspend instead.
4845 * internals.h: Declare __pthread_timedsuspend_old,
4846 __pthread_timedsuspend_new, and __pthread_timedsuspend.
4847 Remove declaration of __pthread_init_condvar.
4848 * pthread.c: Define __pthread_timedsuspend variable.
4849 (__pthread_timedsuspend_old): New function. Timed suspension
4850 implementation for old Linux kernels.
4851 (__pthread_timedsuspend_new): New function. Timed suspension
4852 implementation for new Linux kernels.
4853 * restart.h (timedsuspend): New function. Call appropriate
4854 suspension function through __pthread_timedsuspend.
4855 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4857 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4859 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4861 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4863 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4864 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4866 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4867 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4869 2000-04-14 Andreas Jaeger <aj@suse.de>
4871 * weaks.c: Fix typo.
4873 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4874 2.2 for linuxthreads.
4876 2000-04-13 Ulrich Drepper <drepper@redhat.com>
4878 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4879 (pthread_getcpuclockid): Fix typo.
4881 2000-04-12 Ulrich Drepper <drepper@redhat.com>
4883 * Makefile (libpthread-routines): Add getcpuclockid.
4884 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4885 * sysdeps/pthread/getcpuclockid.c: New file.
4886 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4887 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4889 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4891 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4893 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4894 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4895 and pthread_spin_unlock.
4896 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4897 into pthread_spinlock_t. Change all uses.
4898 * spinlock.c: Implement pthread_spin_lock.
4899 Rename __pthread_unlock to __pthread_spin_unlock and define weak
4900 alias for real name.
4901 Define pthread_spin_trylock, pthread_spin_init, and
4902 pthread_spin_destroy.
4903 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4904 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
4905 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4906 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
4907 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4908 and pthread_spin_unlock.
4909 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
4910 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4911 * condvar.c: Likewise.
4912 * internals.h: Likewise.
4914 * manager.c: Likewise.
4915 * mutex.c: Likewise.
4916 * pthread.c: Likewise.
4917 * rwlock.c: Likewise.
4918 * semaphore.c: Likewise.
4919 * signals.c: Likewise.
4921 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
4923 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4925 2000-04-11 Ulrich Drepper <drepper@redhat.com>
4927 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
4928 _POSIX_SHARED_MEMORY_OBJECTS.
4930 2000-04-11 Andreas Jaeger <aj@suse.de>
4932 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
4933 (__compare_and_swap): Mark as modifying memory.
4935 2000-04-11 Geoff Keating <geoffk@cygnus.com>
4937 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
4939 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
4940 Don't have the 'asm' __volatile__.
4942 2000-04-11 Ulrich Drepper <drepper@redhat.com>
4944 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
4945 * spinlock.c (__pthread_lock): Add memory barriers.
4946 (__pthread_unlock): Likewise.
4947 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
4949 (RELEASE): Not needed anymore.
4950 (__compare_and_swap): Mark asm as modifying memory.
4951 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
4953 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
4954 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
4955 (MEMORY_BARRIER): Define using stbar.
4956 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
4958 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
4959 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
4960 Mike Burrows <m3b@pa.dec.com>.
4962 2000-04-09 Ulrich Drepper <drepper@redhat.com>
4964 * signals.c (sigaction): Fix return value for the case SIG is one
4965 of the signals the implementation uses.
4966 Patch by Xavier.Leroy@inria.fr.
4968 2000-04-01 Andreas Jaeger <aj@suse.de>
4970 * attr.c: Use shlib-compat macros.
4971 * oldsemaphore.c: Likewise.
4972 * pthread.c: Likewise.
4973 * weaks.c: Likewise.
4975 2000-03-26 Ulrich Drepper <drepper@redhat.com>
4977 * semaphore.c (sem_timedwait): New function.
4978 Patch by Carl Mailloux <carlm@oricom.ca>.
4979 * semaphore.h: Declare sem_timedwait.
4980 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
4982 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
4984 * sysdeps/pthread/Makefile: File removed.
4986 2000-03-23 Ulrich Drepper <drepper@redhat.com>
4988 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
4989 * internals.h (__pthread_reset_pthread_once): Add prototype.
4990 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
4992 * manager.c (pthread_handle_create): Store ID of new thread before
4995 2000-03-21 Ulrich Drepper <drepper@redhat.com>
4997 * attr.c: Use new macros from shlib-compat.h to define versions.
4998 * oldsemaphore.c: Likewise.
4999 * semaphore.c: Likewise.
5000 * weaks.c: Likewise.
5002 * pthread.c: Update for new SHLIB_COMPAT definition.
5004 * manager.c (__pthread_manager): Unmask debug signal.
5006 * pthread.c (pthread_initialize): Test for address of __dso_handle
5007 being NULL, not value. Use __on_exit, not on_exit.
5008 Patch by Andreas Jaeger <aj@suse.de>.
5010 * pthread.c: Use new macros from shlib-compat.h to define versions.
5012 2000-03-19 Ulrich Drepper <drepper@redhat.com>
5014 * pthread.c (pthread_initialize): Instead of on_exit use
5015 __cxa_atexit if __dso_label is available to allow unloading the
5016 libpthread shared library.
5018 2000-03-16 Ulrich Drepper <drepper@redhat.com>
5020 * condvar.c: Make tests for ownership of mutex less strict.
5022 2000-03-14 Ulrich Drepper <drepper@redhat.com>
5024 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5025 current thread and return error if not.
5026 (pthread_cond_timedwait_relative_old): Likewise.
5027 (pthread_cond_timedwait_relative_new): Likewise.
5029 * mutex.c (__pthread_once): Handle cancelled init function correctly.
5030 (pthread_once_cancelhandler): New function.
5031 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5033 2000-03-14 Andreas Jaeger <aj@suse.de>
5035 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5037 (pthread_handle_sigrestart_rt): Likewise.
5038 * signals.c (pthread_sighandler_rt): Likewise.
5040 2000-03-02 Andreas Jaeger <aj@suse.de>
5042 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5043 Reported by Sean Chen <sean.chen@turbolinux.com>.
5045 2000-02-28 Andreas Jaeger <aj@suse.de>
5047 * rwlock.c: Fix typo.
5049 2000-02-27 Ulrich Drepper <drepper@redhat.com>
5051 * rwlock.c: Define __* variants of the functions and make old names
5053 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5054 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5056 2000-02-25 Andreas Jaeger <aj@suse.de>
5058 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5059 pwrite64, lseek64, open64, and __open64 with version 2.2.
5061 2000-02-22 Ulrich Drepper <drepper@redhat.com>
5063 * semaphore.h (SEM_FAILED): Use 0 not NULL.
5065 2000-02-14 Ulrich Drepper <drepper@redhat.com>
5067 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5068 nanosleep does not work either. Get absolute time inside the
5070 (pthread_cond_timedwait_relative_new): Likewise.
5071 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5073 2000-02-13 Andreas Jaeger <aj@suse.de>
5075 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5076 (pthread_cond_timedwait_relative_old): Likewise.
5078 2000-02-13 Ulrich Drepper <drepper@redhat.com>
5080 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5081 but keep the code around. A bug in the kernel prevent us from
5083 (pthread_cond_timedwait_relative_new): Likewise.
5084 (PR libc/1597 and libc/1598).
5086 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
5088 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5089 loop around nanosleep calls instead of around most of the function
5090 (pthread_cond_timedwait_relative_new): Likewise.
5091 body. Got rid of backwards goto and one local.
5093 2000-01-31 Ulrich Drepper <drepper@redhat.com>
5095 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5096 before every nanosleep call to account for time spent in the rest
5098 (pthread_cond_timedwait_relative_new): Likewise.
5099 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5101 2000-01-29 Ulrich Drepper <drepper@redhat.com>
5103 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5104 from nanosleep call so that in case we restart we only wait for the
5106 (pthread_cond_timedwait_relative_new): Likewise.
5107 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5109 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
5111 * manager.c (pthread_allocate_stack): Compute guard page address
5112 correctly. Patch by HJ Lu.
5114 * sysdeps/pthread/pthread.h: Define
5115 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5117 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
5119 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5120 preference handling.
5121 (pthread_rwlockattr_setkind_np): Allow
5122 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5123 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5125 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
5127 * internals.h (pthread_readlock_info): New structure.
5128 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5129 p_untracked_readlock_count.
5130 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5131 Add initializers for new fields.
5132 * manager.c (pthread_free): Free read/write lock lists.
5133 * queue.h (queue_is_empty): New function.
5134 * rwlock.c: Implement requirements about when readers should get
5136 * sysdeps/pthread/pthread.h
5137 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5138 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5139 Define this name as well.
5140 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5142 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
5144 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5145 Adjust initializers for struct _pthread_descr_struct change.
5146 * internals.h (struct _pthread_descr_struct): Move new elements to
5149 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
5151 Redesigned how cancellation unblocks a thread from internal
5152 cancellation points (sem_wait, pthread_join,
5153 pthread_cond_{wait,timedwait}).
5154 Cancellation won't eat a signal in any of these functions
5155 (*required* by POSIX and Single Unix Spec!).
5156 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5157 simultaneous condition variable signal (not required by POSIX
5158 or Single Unix Spec, but nice).
5159 * spinlock.c: __pthread_lock queues back any received restarts
5160 that don't belong to it instead of assuming ownership of lock
5161 upon any restart; fastlock can no longer be acquired by two threads
5163 * restart.h: Restarts queue even on kernels that don't have
5164 queued real time signals (2.0, early 2.1), thanks to atomic counter,
5165 avoiding a rare race condition in pthread_cond_timedwait.
5167 1999-12-31 Andreas Jaeger <aj@suse.de>
5169 * internals.h: Remove duplicate prototype declarations.
5171 * weaks.c: Remove __THROW from prototypes since the file is not
5172 compiled by a C++ compiler.
5173 * internals.h: Likewise.
5175 1999-12-30 Andreas Jaeger <aj@suse.de>
5177 * sysdeps/pthread/pthread.h: Move internal functions to...
5178 * sysdeps/pthread/bits/libc-lock.h: ...here.
5180 1999-12-29 Andreas Jaeger <aj@suse.de>
5182 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5184 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
5186 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5189 * manager.c (__pthread_start): Add one more cast to prevent
5190 warning on 64bit machines.
5192 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
5194 * manager.c (pthread_handle_create): Set p_pid of new thread
5195 before calling the callback function to report a new thread.
5197 1999-12-20 Andreas Jaeger <aj@suse.de>
5199 * pthread.c (pthread_initialize): Move getrlimit call after
5202 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
5204 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5205 pwrite64, lseek64, open64, and __open64.
5206 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5207 pwrite64, lseek64, open64, and __open64.
5209 * manager.c (pthread_allocate_stack): Correct computation of
5210 new_thread_bottom. Correct handling of stack size and when the
5211 rlimit method to guard for stack growth is used.
5212 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5213 minus one pagesize (not two).
5215 1999-12-03 Andreas Jaeger <aj@suse.de>
5217 * Versions: Add __res_state with version GLIBC_2.2.
5219 * errno.c (__res_state): New function to return thread specific
5222 * pthread.c (pthread_initialize): Initialize p_resp.
5223 (__pthread_reset_main_thread): Also set p_resp.
5225 * manager.c (pthread_handle_create): Initialize p_resp.
5227 * internals.h: Add thread specific resolver state.
5228 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5230 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
5232 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5234 * sysdeps/i386/i686/pt-machine.h: Likewise.
5235 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5237 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
5239 * manager.c (pthread_start_thread_event): Initialize p_pid already
5242 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
5244 * internals.h: Add prototype for __pthread_manager_event.
5245 * manager.c (__pthread_manager_event): New function.
5246 (pthread_start_thread_event): Correct computation of self.
5247 Use INIT_THREAD_SELF.
5248 * pthread.c (__pthread_manager_thread): Initialize p_lock.
5249 (__pthread_initialize_manager): Respect event flags also for creation
5250 of the manager thread.
5252 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
5254 * pthread.c (__pthread_initialize_manager): Initialize
5255 __pthread_manager_thread.p_tid.
5257 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
5259 * internals.h: Declare __pthread_last_event.
5260 * manager.c: Define __pthread_last_event.
5261 (pthread_handle_create): Set __pthread_last_event.
5262 (pthread_exited): Likewise.
5263 * join.c (pthread_exit): Likewise.
5265 * Makefile (libpthread-routines): Add events.
5266 * events.c: New file.
5267 * internals.h: Protect against multiple inclusion.
5268 Include thread_dbP.h header.
5269 (struct _pthread_descr_struct): Add new fields p_report_events and
5271 Declare event reporting functions.
5272 * join.c (pthread_exit): Signal event if this is wanted.
5273 * manager.c (__pthread_threads_events): New variable.
5274 (pthread_handle_create): Take new parameters with event information.
5275 Signal TD_CREATE event if wanted.
5276 (__pthread_manager): Adjust pthread_handle_create call.
5277 (pthread_start_thread_event): New function. Block until manager is
5278 finished and then call pthread_start_thread.
5279 (pthread_exited): Signal TD_REAP event if wanted.
5281 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
5283 * restart.h (suspend_with_cancellation): Rewrite as a macro.
5285 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5287 1999-10-25 Andreas Jaeger <aj@suse.de>
5289 * internals.h: Remove K&R compatibility.
5290 * no-tsd.c: Likewise.
5291 * semaphore.h: Likewise.
5292 * signals.c: Likewise.
5293 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5294 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5295 * weaks.c: Likewise.
5297 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
5299 * pthread.c: For i386, wrap pthread_handle_sigrestart and
5300 pthread_handle_sigcancel with functions that restore %gs from the
5301 signal context. For each signal handling function, two wrappers
5302 are required, one for a non-RT signal and one for a RT signal.
5303 * signal.c: For i386, add code to restore %gs from the signal
5304 context in pthread_sighandler and pthread_sighandler_rt.
5306 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
5308 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5310 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
5312 * pthread.c (__pthread_initial_thread): Pass argument to
5313 PTHREAD_START_ARGS_INITIALIZER.
5314 (__pthread_manager_thread): Likewise.
5316 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5317 initialize function.
5319 * manager.c (pthread_handle_create): Remove p_startfct initialization.
5321 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5323 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
5325 * internals.h: Correct return types for __libc_read and __libc_write.
5327 1999-10-09 Andreas Jaeger <aj@suse.de>
5329 * internals.h: Add __new_sem_post to get prototype in
5330 manager.c; include semaphore.h for needed types.
5332 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
5334 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5335 directly instead of calling sem_post which should not be necessary
5336 but is faster and might help in some case to work around problems.
5337 Patch by khendricks@ivey.uwo.ca [libc/1382].
5339 1999-10-08 Andreas Schwab <schwab@suse.de>
5341 * sysdeps/pthread/Subdirs: New file.
5344 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
5346 * Implies: New file.
5347 * internals.h (struct _pthread_descr_struct): Add p_startfct.
5348 * manager.c (pthread_handle_create): Initialize p_startfct.
5349 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5351 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
5353 * manager.c (__linuxthreads_pthread_threads_max): New variable.
5354 * specific.c (__linuxthreads_pthread_keys_max): New variable.
5355 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5357 * condvar.c (pthread_cond_timedwait_relative): Never return with
5358 EINTR. Patch by Andreas Schwab.
5360 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
5362 * signals.c (sigaction): Correct last patch. Don't select
5363 pthread_sighandler_rt based on the signal number but instead of
5364 the SA_SIGINFO flag.
5366 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
5368 * specific.c: Move definitions of struct pthread_key_struct and
5369 destr_function to ...
5370 * internals.h: ...here.
5372 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
5374 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
5375 this instead of pthread_handle_sigrestart if the signal is an RT
5378 * signals.c: Handle passing through of sighandler arguments also
5379 for real-time signals.
5381 1999-09-03 Andreas Schwab <schwab@suse.de>
5383 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
5385 (__vfork): New function, alias vfork.
5386 * Versions: Export __fork, vfork, and __vfork in libpthread.
5388 1999-08-23 Andreas Schwab <schwab@suse.de>
5390 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5391 call to signal handler.
5393 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
5395 * pthread.c (__pthread_reset_main_thread): Undo last change.
5396 (__pthread_kill_other_threads_np): Reset signal handlers for the
5397 signals we used in the thread implementation here.
5399 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
5401 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5402 for the signals we used in the thread implementation [PR libc/1234].
5404 * Versions: Export __pthread_kill_other_threads_np from libpthread
5407 * signals.c: Pass sigcontext through wrapper to the user function.
5409 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
5411 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5412 __libc_internal_tsd_set.
5414 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5416 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5419 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5421 * internals.h: Align _pthread_descr_struct to 32 bytes.
5422 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5425 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5427 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5430 1999-07-09 Cristian Gafton <gafton@redhat.com>
5432 * Makefile (libpthread-routines): Add oldsemaphore routine.
5433 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5434 sem_trywait, and sem_wait to GLIBC_2.1.
5435 * oldsemaphore.c: New file.
5436 * semaphore.c: Add default_symbol_versions for the changed functions.
5437 (__new_sem_init): Rename from sem_init.
5438 (__new_sem_post): Rename from sem_post.
5439 (__new_sem_wait): Rename from sem_wait.
5440 (__new_sem_trywait): Rename from sem_trywait.
5441 (__new_sem_getvalue): Rename from sem_getvalue.
5442 (__new_sem_destroy): Rename from sem_destroy.
5444 1999-06-23 Robey Pointer <robey@netscape.com>
5446 * internals.h: Added p_nextlock entry to separate queueing for a
5447 lock from queueing for a CV (sometimes a thread queues on a lock
5448 to serialize removing itself from a CV queue).
5449 * pthread.c: Added p_nextlock to initializers.
5450 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5452 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5454 * manager.c (pthread_handle_create): Free mmap region after stack
5455 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5457 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5459 * man/pthread_cond_init.man: Correct example.
5460 Reported by Tomas Berndtsson <tomas@nocrew.org>.
5462 * linuxthreads.texi (Condition Variables): Likewise.
5464 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
5466 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5467 casx not cas, also successful casx returns the old value in rd
5468 and not the new value.
5470 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
5472 * manager.c: If pthread_create() is given a NULL attribute
5473 and the thread manager runs with a realtime policy, set the
5474 scheduling policy of the newly created thread back to SCHED_OTHER.
5475 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5476 initialize the schedpolicy field of new_thread->p_start_args
5477 to that of the calling thread.
5479 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
5481 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5482 instruction does not allow memory element to use offset.
5484 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
5486 * manager.c (pthread_allocate_stack): Optimize initialization of new
5489 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5490 Don't use initializer since it is all zeroes.
5491 (__libc_once_define): Likewise.
5493 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5495 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5496 doesn't exist anymore.
5497 * sysdeps/i386/Implies: Likewise.
5498 * sysdeps/m68k/Implies: Likewise.
5499 * sysdeps/mips/Implies: Likewise.
5500 * sysdeps/powerpc/Implies: Likewise.
5501 * sysdeps/sparc/sparc32/Implies: Likewise.
5502 * sysdeps/sparc/sparc64/Implies: Likewise.
5504 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
5506 * sysdeps/alpha/bits/semaphore.h: Removed.
5507 * sysdeps/powerpc/bits/semaphore.h: Removed.
5508 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5509 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5510 * Makefile (headers): Remove bits/semaphore.h.
5512 * semaphore.h: Define _pthread_descr if necessary.
5513 Don't include limits.h. Define SEM_VALUE_MAX directly.
5515 (sem_t): Protect element names with leading __.
5516 Add declarations for sem_close, sem_open, and sem_unlink.
5517 * semaphore.c: Adjust all functions for new element names.
5518 Define sem_close, sem_open, and sem_unlink.
5519 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5521 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5524 1999-03-16 H.J. Lu <hjl@gnu.org>
5526 * specific.c (pthread_key_delete): Check th->p_terminated to see
5527 if the thread is running.
5529 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5530 Added to GLIBC_2.0 for libc.so.
5532 1999-02-12 H.J. Lu <hjl@gnu.org>
5534 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5535 __libc_allocate_rtsig): Added to GLIBC_2.1.
5537 * internals.h (DEFAULT_SIG_RESTART): Removed.
5538 (DEFAULT_SIG_CANCEL): Removed.
5540 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5541 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5542 (__pthread_sig_restart, __pthread_sig_cancel,
5543 __pthread_sig_debug): Initialized.
5544 (pthread_initialize): Call init_rtsigs () to initialize
5547 1999-02-03 H.J. Lu <hjl@gnu.org>
5549 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5550 Don't restart the thread which sent REQ_DEBUG.
5551 (pthread_start_thread): Check if __pthread_sig_debug > 0
5554 * pthread.c (__pthread_initialize_manager): Suspend ourself
5555 after sending __pthread_sig_debug to gdb instead of
5556 __pthread_sig_cancel.
5558 1999-01-24 H.J. Lu <hjl@gnu.org>
5560 * manager.c (__pthread_manager): Delete __pthread_sig_debug
5561 from mask if __pthread_sig_debug > 0.
5562 (pthread_handle_create): Increment __pthread_handles_num.
5564 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5565 * pthread.c (__pthread_initialize_manager): Likewise.
5567 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5568 instead of __libc_allocate_rtsig (2).
5569 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5570 instead of __pthread_sig_cancel.
5571 (pthread_handle_sigdebug): Fix comments.
5573 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
5575 * manager.c (pthread_allocate_stack): Set
5576 __pthread_nonstandard_stacks if user-specified stack is used.
5578 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
5580 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5581 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5583 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
5585 * pthread.c: Use a third signal __pthread_sig_debug distinct
5586 from __pthread_sig_cancel to notify gdb when a thread is
5588 * manager.c: Likewise.
5589 * internals.h: Likewise.
5590 * signals.c: The implementation of sigwait(s) assumed that
5591 all signals in s have signal handlers already attached.
5592 This is not required by the standard, so make it work
5593 also if some of the signals have no handlers.
5595 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5597 * linuxthreads.texi: Remove pointers from first @node. Move old
5598 @node spec inside comment.
5600 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
5602 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5605 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
5607 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5608 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5610 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
5612 * manager.c: Threads now send __pthread_sig_cancel on termination.
5613 Change clone call and signal masks.
5614 * thread.c (pthread_handle_sigrestart): Remove special code for
5616 (pthread_handle_sigcancel): In manager thread call
5617 __pthread_manager_sighandler.
5618 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5619 * sysdeps/i386/i686/pt-machine.h: Likewise.
5620 Patches by Xavier Leroy.
5622 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
5624 * spinlock.c (__pthread_unlock): Don't crash if called for an
5625 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5627 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5630 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
5632 * Examples/ex3.c: Wait until all threads are started before
5633 searching for the number to avoid race condition on very fast
5636 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5638 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5639 declaration since it's not needed.
5641 * sysdeps/pthread/pthread.h: Move internal functions to ...
5642 * internals.h: ...here.
5644 1998-12-02 H.J. Lu <hjl@gnu.org>
5646 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5647 SIGRTMIN is defined.
5648 (__pthread_sig_cancel): Likewise.
5650 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5652 * wrapsyscall.c: Include <sys/mman.h> for msync,
5653 <stdlib.h> for system and <termios.h> for tcdrain prototype.
5654 Correct msync declaration.
5656 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
5658 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5659 __libc_tsd_set): New macros for new interface.
5660 * no-tsd.c: New file, provide uninitialized defns of
5661 __libc_internal_tsd_get and __libc_internal_tsd_set.
5662 * Makefile (routines): Add no-tsd.
5664 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
5666 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5667 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5668 __libc_internal_tsd_set): Move decls to ...
5669 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5672 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5673 __libc_internal_tsd_set): Make these pointers to functions, not
5674 functions; remove #pragma weak decls for them.
5675 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5676 Define static functions and initialized pointers to them.
5678 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
5680 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5681 (CFLAGS-specific.c): Likewise.
5682 (CFLAGS-pthread.c): Likewise.
5683 (CFLAGS-ptfork.c): Likewise.
5684 (CFLAGS-cancel.c): Likewise.
5685 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5686 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5688 * mutex.c (pthread_mutex_init): Define as strong symbol.
5689 (pthread_mutex_destroy): Likewise.
5690 (pthread_mutex_trylock): Likewise.
5691 (pthread_mutex_lock): Likewise.
5692 (pthread_mutex_unlock): Likewise.
5693 (pthread_mutexattr_init): Likewise.
5694 (pthread_mutexattr_destroy): Likewise.
5695 (pthread_once): Likewise.
5696 * ptfork.c (pthread_atfork): Likewise.
5697 * specific.c (pthread_key_create): Likewise.
5698 (pthread_setspecific): Likewise.
5699 (pthread_getspecific): Likewise.
5701 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5703 * linuxthreads.texi: Fix punctuation after xref.
5705 1998-11-10 H.J. Lu <hjl@gnu.org>
5707 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5708 if it is defined in <linux/limits.h>.
5710 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
5712 * spinlock.h (__pthread_trylock): Define inline.
5713 (__pthread_lock): Add extra parameter to declaration. Declare
5714 using internal_function.
5715 (__pthread_unlock): Declare using internal_function.
5716 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
5717 of local variable self. Avoid recomputing self. Define using
5719 (__pthread_trylock): Remove.
5720 (__pthread_unlock): Define using internal_function.
5721 * cancel.c: Adjust for __pthread_lock interface change. Use already
5722 computed self value is possible.
5723 * condvar.c: Likewise.
5725 * manager.c: Likewise.
5726 * mutex.c: Likewise.
5727 * pthread.c: Likewise.
5728 * rwlock.c: Likewise.
5729 * semaphore.c: Likewise.
5730 * signals.c: Likewise.
5732 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
5734 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5735 __ to field names of the struct.
5736 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5738 (pthread_attr_t): Likewise.
5739 (pthread_cond_t): Likewise.
5740 (pthread_condattr_t): Likewise.
5741 (pthread_mutex_t): Likewise.
5742 (pthread_mutexattr_t): Likewise.
5743 (pthread_rwlock_t): Likewise.
5744 (pthread_rwlockattr_t): Likewise.
5745 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5746 * cancel.c: Likewise.
5747 * condvar.c: Likewise.
5748 * manager.c: Likewise.
5749 * mutex.c: Likewise.
5750 * pthread.c: Likewise.
5751 * ptlongjmp.c: Likewise.
5752 * rwlock.c: Likewise.
5753 * spinlock.c: Likewise.
5755 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
5757 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5760 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5763 * Makefile (libpthread-routines): Add pt-machine.
5764 * pt-machine.c: New file.
5765 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5766 yet defined. Use PT_EI in extern inline definitions.
5767 * sysdeps/arm/pt-machine.h: Likewise.
5768 * sysdeps/i386/pt-machine.h: Likewise.
5769 * sysdeps/i386/i686/pt-machine.h: Likewise.
5770 * sysdeps/m68k/pt-machine.h: Likewise.
5771 * sysdeps/mips/pt-machine.h: Likewise.
5772 * sysdeps/powerpc/pt-machine.h: Likewise.
5773 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5774 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5776 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5778 * semaphore.h: Include <sys/types.h> so that _pthread_descr
5781 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
5783 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5785 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5787 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5789 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5792 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5794 * signals.c (sigaction): Check that sig is less than NSIG to avoid
5795 array index overflow.
5797 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
5799 * sysdeps/pthread/semaphore.h: New file.
5801 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
5803 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5804 _LIBC_TSD_KEY_DL_ERROR.
5806 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
5808 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5809 * sysdeps/i386/pt-machine.h: Likewise.
5810 Suggested by Roland McGrath.
5812 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
5814 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5815 access thread data with non-constant offsets.
5816 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5819 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
5820 THREAD_SETMEM_NC definitions.
5822 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5824 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5826 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
5828 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5829 not already defined.
5830 (struct _pthread_descr_struct): Add p_self and p_nr field.
5831 * manager.c (__pthread_handles): Define second element to point
5833 (__pthread_handles_num): Initialize to 2.
5834 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5835 (pthread_start_thread): Likewise.
5836 (pthread_handle_create): Start search for free slot at entry 2.
5837 Initialize new fields p_self and p_nr.
5838 Call __clone with CLONE_PTRACE if available.
5839 (pthread_free): Call FREE_THREAD_SELF if available.
5840 * pthread.c (__pthread_initial_thread): Initialize new fields.
5841 (__pthread_manager_thread): Likewise.
5842 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5844 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5845 elements of the thread descriptor.
5846 * condvar.c: Likewise.
5847 * errno.c: Likewise.
5849 * manager.c: Likewise.
5850 * pthread.c: Likewise.
5851 * ptlongjmp.c: Likewise.
5852 * semaphore.c: Likewise.
5853 * signals.c: Likewise.
5854 * specific.c: Likewise.
5855 * spinlock.c: Likewise.
5857 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5859 * sysdeps/i386/useldt.h: New file.
5860 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5862 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5863 THREAD_SETMEM using __thread_self.
5864 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5866 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
5868 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5869 turned out that we didn't need to queue after all.
5871 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
5873 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5874 and wastes space; correct types.
5876 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
5878 * signals.c (sigaction): Handle NULL argument.
5880 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
5882 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5885 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5887 * Makefile (linuxthreads-version): Extract correct number from
5890 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
5892 * Banner: Bump version number to 0.8
5893 * FAQ.html: Many updates, in particular w.r.t. debugging.
5894 * manager.c: Support for non-default stacksize for
5895 LinuxThreads-allocated stacks;
5896 don't use guard pages for stacks with default size, rely on
5897 rlimit(RLIMIT_STACK) instead (it's cheaper).
5899 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5900 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5901 * condvar.c: Likewise.
5902 * internals.h: Likewise.
5903 * restart.h: Likewise.
5904 * signals.c: Likewise.
5905 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
5907 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5909 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
5910 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
5911 * Versions: Put __pthread_mutexattr_settype under version
5912 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
5913 __pthread_mutexattr_gettype.
5915 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5917 * sysdeps/pthread/bits/libc-lock.h: Make
5918 __pthread_mutexattr_settype weak. Don't make
5919 __pthread_mutexattr_setkind_np weak.
5921 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
5923 * manager.c (pthread_handle_create): Check whether sched_setscheduler
5924 call can succeed here.
5926 * mutex.c: Define __pthread_mutexattr_settype and make
5927 __pthread_mutexattr_setkind_np an alias.
5928 Likewise for __pthread_mutexattr_gettype.
5930 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5932 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
5935 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
5937 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
5939 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5941 * Examples/ex6.c: Include <unistd.h> for usleep.
5943 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5945 * Examples/ex4.c (main): Use exit, not pthread_exit.
5947 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
5949 * Versions: Add __pthread_mutexattr_gettype and
5950 __pthread_mutexattr_settype.
5951 * lockfile.c: Use __pthread_mutexattr_settype instead of
5952 __pthread_mutexattr_setkind_np.
5953 * mutex.c: Define __pthread_mutexattr_gettype and
5954 __pthread_mutexattr_settype.
5956 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
5957 __pthread_mutexattr_settype.
5958 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
5959 Use __pthread_mutexattr_settype.
5961 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
5963 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
5964 * mutex.c: Define weak alias pthread_mutexattr_gettype and
5965 pthread_mutexattr_settype.
5966 * sysdeps/pthread/pthread.h: Declare these functions.
5967 Move pthread_sigmask and pthread_kill declaration in separate header.
5968 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
5970 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
5972 * Makefile: Add rules to compile and run tests.
5973 * Examples/ex1.c: Little changes to fix warnings.
5974 * Examples/ex2.c: Likewise.
5975 * Examples/ex3.c: Likewise.
5976 * Examples/ex4.c: Likewise.
5977 * Examples/ex5.c: Likewise.
5978 * Examples/ex6.c: New file.
5980 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
5982 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
5984 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5986 * attr.c: Include <string.h>.
5988 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
5990 * attr.c: Include errno.h. Use memcpy to copy sched_param.
5991 * internals.h: Include limits.h.
5992 * manager.c: Use memcpy to copy sched_param.
5993 * ptfork.c: Include errno.h.
5994 * pthread.c: Likewise.
5995 * semaphore.c: Likewise.
5996 * specific.c: Likewise.
5997 * spinlock.h: Likewise.
5998 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
5999 type definition to ...
6000 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
6002 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
6004 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6006 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6007 as macros as demanded in POSIX.1, Annex C.
6009 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
6011 * internals.h (struct pthread_request): For free use pthread_t
6012 instead of pthread_descr.
6013 * join.c (pthread_join): Pass thread_id, not th to manager.
6014 (pthread_detach): Likewise.
6015 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6016 (pthread_exited): Remove detached queue code.
6017 (pthread_handle_free): Expect thread ID parameter and use it to
6018 validate the thread decsriptor. Don't use detached queue.
6019 Patches by Xavier Leroy.
6021 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6023 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6024 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6025 __pthread_atfork, __pthread_key_create, __pthread_once.
6026 * internals.h: Doc fix.
6027 * pthread.c (__pthread_initialize): Define again.
6029 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
6031 * manager.c (pthread_exited): If thread is not detached put it on
6033 (pthread_handle_free): If thread is not on list with living threads
6034 search on list with detached threads.
6036 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6037 for new definition of pthread_rwlock_t.
6039 * spinlock.c: Correct test whether to compile
6040 __pthread_compare_and_swap or not.
6042 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
6044 * attr.c: Finish user stack support. Change locking code to be safe
6045 in situations with different priorities.
6046 * cancel.c: Likewise.
6047 * condvar.c: Likewise.
6048 * internals.h: Likewise.
6050 * manager.c: Likewise.
6051 * mutex.c: Likewise.
6052 * pthread.c: Likewise.
6053 * ptlongjmp.c: Likewise.
6054 * queue.h: Likewise.
6055 * rwlock.c: Likewise.
6056 * semaphore.c: Likewise.
6057 * semaphore.h: Likewise.
6058 * signals.c: Likewise.
6059 * spinlock.c: Likewise.
6060 * spinlock.h: Likewise.
6061 * sysdeps/pthread/pthread.h: Likewise.
6062 Patches by Xavier Leroy.
6064 * sysdeps/i386/i686/pt-machine.h: New file.
6066 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
6068 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6069 [sg]et_stackaddr prototypes always available.
6071 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6072 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6074 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
6076 * manager.c (pthread_free): Undo patch from 980430.
6077 Reported by David Wragg <dpw@doc.ic.ac.uk>.
6079 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
6081 * manager.c: Define __pthread_manager_adjust_prio and use it to
6082 increase priority when needed.
6083 * internals.h: Add prototype for __pthread_manager_adjust_prio.
6084 * mutex.c: Optimize mutexes to wake up only one thread.
6085 * pthread.c: Move PID of manager for global variable in structure
6087 Patches by Xavier Leroy.
6089 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
6091 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6093 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6095 * attr.c: Correct typo.
6097 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
6099 * manager.c (pthread_free): Unmap guard before the stack.
6100 Patch by Matthias Urlichs.
6102 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
6104 * manager.c (pthread_free): Detect already free child.
6105 Patch by Xavier Leroy, reported by Matthias Urlichs.
6107 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6109 * Makefile (linuxthreads-version): Renamed back from
6112 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
6114 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6117 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
6119 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6120 * internals.h: Add definitions for new spinlock implementation.
6121 * ptlongjmp.c: New file.
6122 * spinlock.c: New file.
6123 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6124 new function __pthread_acquire to prevent deadlocks with thread
6125 with different priorities.
6126 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6128 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6130 * manager.c (__pthread_manager): Reduce first argument to select
6131 to include just the needed file descriptor.
6133 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
6135 * manager.c: Fix last patch which caused core dumps.
6137 * pthread.c: Correctly handle missing SIGRTMIN.
6139 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6141 * libpthread.map: Add __libc_internal_tsd_get and
6142 __libc_internal_tsd_set. Add missing cancelable functions. Export
6143 libc internal versions of the cancelable functions.
6145 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
6147 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6149 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
6151 * attr.c: Implement pthread_attr_[gs]etguardsize,
6152 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6153 Change pthread_attr_init to have two interfaces.
6154 * internals.h (struct _pthread_descr_struct): Add new fields for
6156 * libpthread.map: Add names in GLIBC_2.1 section.
6157 * manager.c (pthread_handle_create): Implement guardsize and
6159 (pthread_free): Likewise.
6160 * pthread.c (pthread_create): Add new interface for changed
6162 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6163 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6166 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
6168 * manager.c: Enable resetting of the thread scheduling policy
6169 to SCHED_OTHER when the parent thread has a different one.
6171 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
6173 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6174 _POSIX_ASYNCHRONOUS_IO.
6176 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6178 * mutex.c: Implement new mutex types.
6180 * internals.h: Include <signal.h>.
6182 * libpthread.map: Add __erno_location and __h_errno_location.
6184 * errno.c: Return pointer to variable actually in use. This might
6185 not be the one in the thread structure.
6186 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6188 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6189 of manager thread structure.
6190 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6192 * pthread.c: Adapt initializer for thread structures.
6193 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6194 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6195 current thread to global variables.
6197 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
6199 * rwlock.c: New file.
6200 * Makefile (libpthread-routines): Add rwlock.
6201 * sysdeps/pthread/pthread.h: Define data structures and declare
6203 * libpthread.map: Add new functions.
6205 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
6207 * sysdeps/arm/pt-machine.h: New file; add ARM support.
6208 * sysdeps/arm/Implies: likewise.
6209 * README: Document it.
6211 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6213 * signals.c: Remove unneeded initializer for sigwaited, saving a
6216 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6218 * semaphore.c (sem_init): Set sem_spinlock only if available.
6220 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
6222 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6223 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6225 * Makefile: Update from LinuxThreads 0.7.
6226 * internals.h. Likewise.
6227 * manager.c: Likewise.
6228 * mutex.c: Likewise.
6229 * pthread.c: Likewise.
6230 * signals.c: Likewise.
6231 * specific.c: Likewise.
6232 * Examples/ex3.c: Likewise.
6234 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
6236 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6239 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
6241 * wrapsyscall.c: Add socket functions which are also cancelation
6244 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
6246 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6247 New functions for fast thread specific data within libc.
6249 * internals.h: Add new array p_libc_specific to struct
6250 _pthread_descr_struct.
6252 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6254 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
6256 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6257 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6259 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
6261 * internals.h (struct _pthread_descr_struct): Add definitions for
6262 two-level specific key handling.
6263 * manager.c (pthread_handle_create): Initialize specific memory array.
6264 * specific.c: Implement two-level key handling.
6265 * weaks.c: Don't provide dummy key handling.
6266 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6267 Add definition of __libc_key_t.
6268 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6270 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6271 PTHREAD_DESTRUCTOR_ITERATIONS.
6273 * manager.c (pthread_handle_create): Compare mmap result with
6276 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6277 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6279 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
6281 sysdeps/sparc -> sysdeps/sparc/sparc32
6282 sysdeps/sparc64 -> sysdeps/sparc/sparc64
6284 * internals.h: Change definition of THREAD_SELF to be an expression,
6285 not a statement that did a return.
6286 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6287 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6288 Follow Solaris and use a "system reserved" register (%g6) to hold
6289 the thread descriptor.
6290 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6292 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
6294 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
6295 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6296 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6298 * semaphore.c: Include spinlock.h only when needed.
6300 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6301 keys for entries not in use.
6303 * weaks.c: Implement key handling functions for real.
6305 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
6307 Initial sparc64-linux support:
6308 * sysdeps/sparc64/Implies: New file.
6309 * sysdeps/sparc64/pt-machine.h: Likewise.
6311 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
6313 * semaphore.c: Include spinlock.h at correct place.
6316 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
6318 The Great Bit File Move:
6319 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6320 * sysdeps/powerpc/semaphorebits.h: Likewise.
6321 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6322 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6323 * sysdeps/pthread/libc-lock.h: -> bits/
6324 * sysdeps/pthread/stdio-lock.h: Likewise.
6325 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6326 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6327 * semaphore.h: Likewise.
6328 * sysdeps/pthread/pthread.h: Likewise.
6330 * lockfile.c: <foo.h> -> <bits/foo.h>.
6331 * semaphore.h: Likewise.
6333 * Makefile: (headers): foo.h -> bits/foo.h.
6334 * sysdeps/pthread/Makefile: Likewise.
6336 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6338 * semaphore.c (sem_init): Set sem_spinlock only if available.
6340 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6343 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
6345 Update from LinuxThreads 0.6.
6347 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6348 and __sched_get_priority_min instead of names without `__'.
6350 * manager.c: Rewrite large parts to implement opaque pthread_t.
6352 * cancel.c: Adapt for opaque pthread_t type.
6353 * condvar.c: Likewise.
6354 * errno.c: Likewise.
6356 * mutex.c: Likewise.
6357 * pthread.c: Likewise.
6358 * signals.c: Likewise.
6359 * specific.c: Likewise.
6360 * restart.h: Likewise.
6361 * queue.h: Likewise.
6362 * Examples/ex3.c: Likewise.
6363 * Examples/ex4.c: Likewise.
6364 * sysdeps/pthread/pthread.h: Likewise.
6366 * pthread.c: Accumulate time for all threads in thread manager.
6368 * semaphore.c: Implement fallback implementation for architectures
6369 sometimes missing compare-exchange operations.
6371 * cancel.c (pthread_cancel): Validate handle argument.
6372 * join.c (pthread_join): Likewise.
6373 (pthread_detach): Likewise.
6374 * signals.c (pthread_kill): Likewise.
6376 * spinlock.h (acquire): Use __sched_yield not sched_yield.
6378 * queue.h (enqueue): Enqueue thread according to priority.
6380 * internals.c (struct pthread_start_args): New struct for passing
6381 args to cloning function.
6382 (struct _pthread): Rename to _pthread_descr_struct and adapt for
6385 * Examples/Makefile (clean): Pass -f option to rm.
6387 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6388 and define TEST_FOR_COMPARE_AND_SWAP.
6389 * sysdeps/i386/i486/pt-machine.h: Removed.
6391 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6394 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
6396 * restart.h (suspend): Clear p_signal before suspending.
6397 (suspend_with_cancellation): Likewise.
6398 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6400 * weaks.c: Make __pthread_key_create return 1.
6401 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6402 __libc_getspecific, __libc_setspecific, and __libc_key_t.
6403 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6406 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
6408 * sysdeps/sparc/pt-machine (RELEASE): Fix.
6410 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
6412 * sysdeps/powerpc/Implies: Added.
6413 * sysdeps/powerpc/pt-machine.h: Added.
6414 * sysdeps/powerpc/semaphorebits.h: Added.
6416 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
6418 * pthread.c (__pthread_initial_thread): Correct
6420 (__pthread_manager_thread): Likewise.
6421 Reported by Andreas Jaeger.
6423 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
6425 Since sigset_t no longer fits in a register, we can't pass in the
6426 thread's initial mask so easily. Take this opportunity to simplify
6427 the clone implementation by only accepting a single void* argument.
6429 * manager.c (__pthread_manager): Put thread vitals in the thread
6430 struct instead of as arguments through clone.
6431 (pthread_start_thread): Look for them there.
6432 * internals.h (struct _pthread): Add p_initial_fn,
6433 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
6434 * pthread.c (pthread_initialize_manager): Revise clone invocation.