1 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
4 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Add local _init
7 2005-02-09 Daniel Jacobowitz <dan@codesourcery.com>
10 * descr.h (__pthread_find_self, thread_self): Mark as pure
13 2005-02-07 Jakub Jelinek <jakub@redhat.com>
16 * specific.c (pthread_key_delete): If pthread_create has not been
17 called yet, clear p_specific for the current thread.
18 * Makefile (tests): Add tst-tsd1.
19 * tst-tsd1.c: New test.
21 2004-12-21 Jakub Jelinek <jakub@redhat.com>
24 * Makefile (tests): Add tst-align.
25 * tst-align.c: New test.
26 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Add
27 -mpreferred-stack-boundary=4.
29 2004-12-12 Ulrich Drepper <drepper@redhat.com>
31 * internals.h: Include <stdbool.h> to match includes used in nptl.
33 2004-12-01 Jakub Jelinek <jakub@redhat.coM.
35 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
36 _POSIX_THREAD_CPUTIME): Define to 0.
37 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
38 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
39 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
40 __timer_signal_thread_tclk): Remove.
41 (init_module): Remove their initialization.
42 (thread_cleanup): Remove their cleanup assertions.
43 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
44 __timer_signal_thread_tclk): Remove.
45 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
46 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
47 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
48 * tst-clock1.c (do_test): Check for availability of CPU clock.
50 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
52 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use.
53 * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
55 2004-12-02 Roland McGrath <roland@redhat.com>
57 * Makefile (libpthread-nonshared): Variable removed.
58 ($(objpfx)libpthread_nonshared.a): Target removed.
59 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
60 These are now handled by generic magic from
61 libpthread-static-only-routines being set.
63 2004-11-27 Ulrich Drepper <drepper@redhat.com>
65 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
66 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
67 _POSIX_THREAD_PRIO_PROTECT): Define.
68 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
69 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
70 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
72 2004-11-26 Jakub Jelinek <jakub@redhat.com>
74 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
75 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
76 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
77 _POSIX_TYPED_MEMORY_OBJECTS): Define.
78 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
79 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
80 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
82 2004-11-05 Maciej W. Rozycki <macro@mips.com>
84 * sysdeps/mips/pspinlock.c: Include <sgidefs.h>. Use _ABIO32,
85 _ABIN32 and _ABI64 for ABI selection throughout.
86 * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
87 ABI selection throughout.
89 2004-10-18 Roland McGrath <roland@redhat.com>
92 * Makefile (linuxthreads-CPPFLAGS): New variable;
93 adds -DIS_IN_linuxthreads=1.
94 * sysdeps/i386/tls.h: Protect "useldt.h" with
95 [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
96 * sysdeps/i386/i686/pt-machine.h: Revert last change.
98 2004-10-14 Jakub Jelinek <jakub@redhat.com>
100 * sysdeps/pthread/errno-loc.c: Don't undef #errno
101 if RTLD_PRIVATE_ERRNO.
103 2004-10-05 Dwayne Grant McConnell <dgm69@us.ibm.com>
105 * pthread.c: Mask restart signal during cancel signal handler.
107 2004-10-05 Jakub Jelinek <jakub@redhat.com>
109 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
110 _POSIX_THREAD_CPUTIME): Define to 0.
112 2004-10-04 Ulrich Drepper <drepper@redhat.com>
114 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
115 and _POSIX_THREAD_CPUTIME to zero.
116 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
118 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
119 _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
120 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
121 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
122 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
124 2004-09-25 Roland McGrath <roland@redhat.com>
127 * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
128 [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
130 2004-09-24 Roland McGrath <roland@redhat.com>
133 * sysdeps/i386/tls.h: Move #include "useldt.h" outside
134 of [__ASSUME_LDT_WORKS > 0] test.
135 Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
137 2004-09-21 Roland McGrath <roland@redhat.com>
139 * Versions: Add comment about linuxthreads' frozen ABI.
141 2004-09-20 Ulrich Drepper <drepper@redhat.com>
143 * Versions: Remove exports for pthread_set*id_np functions.
144 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
146 * Makefile: Don't build pthread_set*id code for now.
148 2004-09-19 Ulrich Drepper <drepper@redhat.com>
150 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
151 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
152 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
153 and pthread_setresuid_np.
154 * pthread_setgid_np.c: New file.
155 * pthread_setuid_np.c: New file.
156 * pthread_setegid_np.c: New file.
157 * pthread_seteuid_np.c: New file.
158 * pthread_setregid_np.c: New file.
159 * pthread_setreuid_np.c: New file.
160 * pthread_setresgid_np.c: New file.
161 * pthread_setresuid_np.c: New file.
162 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
163 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
164 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
165 and pthread_setresuid_np.
166 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
167 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
168 pthread_setregid, and pthread_setresgid.
170 2004-09-12 Ulrich Drepper <drepper@redhat.com>
172 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
174 * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
175 for __USE_XOPEN2K. [BZ #320]
177 2004-09-04 Jakub Jelinek <jakub@redhat.com>
179 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
181 2004-09-07 Ulrich Drepper <drepper@redhat.com>
183 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
184 the initialization function might throw.
186 2004-08-30 Roland McGrath <roland@frob.com>
188 * Makefile (libpthread-abi-frozen): New variable.
190 2004-08-26 Roland McGrath <roland@redhat.com>
192 * configure.in: New file. If nptl add-on is also selected, barf if
193 explicit and elide ourselves if implicit.
194 * configure: Now generated.
196 2004-08-25 Richard Sandiford <rsandifo@redhat.com>
198 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
199 __local_multiple_threads): Fix definitions for IS_IN_librt.
200 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
202 2004-08-22 Andreas Schwab <schwab@suse.de>
204 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
205 Save gp around CENABLE/CDISABLE calls.
207 2004-08-15 Roland McGrath <roland@frob.com>
209 * pthread_atfork.c: Update copyright terms including special exception
210 for these trivial files, which are statically linked into executables
211 that use dynamic linking for the significant library code.
213 2004-08-09 Jakub Jelinek <jakub@redhat.com>
215 * libc-tsd.c: Move resolv.h include before the #if.
216 (__res_maybe_init): New function. Add libc_hidden_def.
218 2004-08-02 Ulrich Drepper <drepper@redhat.com>
220 * linuxthreads.texi (Cleanup Handlers): Fix typo.
221 Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
223 2004-07-23 Jakub Jelinek <jakub@redhat.com>
226 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
227 instead of clockid_t.
229 2004-07-21 Roland McGrath <roland@redhat.com>
231 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
233 2004-07-02 Roland McGrath <roland@redhat.com>
235 * configure: Don't exit.
237 2004-07-20 Alexandre Oliva <aoliva@redhat.com>
239 * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
241 * sysdeps/mips/atomicity.h: Likewise.
243 2004-07-19 Alexandre Oliva <aoliva@redhat.com>
245 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
246 Remove redundant override that missed -g0.
248 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
250 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
251 (__local_multiple_threads): Define for librt.
252 (SINGLE_THREAD_P): Likewise.
254 2004-07-07 Jakub Jelinek <jakub@redhat.com>
256 * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
257 using other thread's clock.
258 * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
259 * ptclock_settime.c (__pthread_clock_settime): Likewise.
260 * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
262 Reported by Bernd Schmidt <bernds@redhat.com>.
263 * Makefile (librt-tests): Add tst-clock1.
264 * tst-clock1.c: New test.
266 * sysdeps/x86_64/Versions: New file.
267 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
268 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
270 2004-04-16 Andreas Schwab <schwab@suse.de>
272 * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
274 2004-07-05 Jakub Jelinek <jakub@redhat.com>
276 * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
277 __pthread_spin_trylock): Use constraint "m" instead of "0" for
279 * sysdeps/ia64/pt-machine.h (__compare_and_swap,
280 __compare_and_swap_with_release_semantic, testandset): Use
281 constraint "m" instead of "0" for futex.
283 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
285 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
286 branch offset for a PLT entry.
287 (CDISABLE): Likewise.
289 2004-05-31 Andreas Jaeger <aj@suse.de>
291 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
292 Set to -fno-unit-at-a-time.
293 Patch by Dan Kegel <dank@kegel.com>.
295 2004-05-04 Jakub Jelinek <jakub@redhat.com>
297 * tst-stack1.c: Don't include mcheck.h.
298 (do_test): Make sure user defined stacks aren't reused,
299 don't free them at the end. [BZ #110]
301 2004-05-02 Jakub Jelinek <jakub@redhat.com>
303 * manager.c: Include not-cancel.h.
304 (__pthread_manager): Use read_not_cancel instead of __libc_read.
305 (pthread_start_thread, __pthread_manager_sighandler): Use
306 write_not_cancel instead of __libc_write.
307 (pthread_reap_children): Use waitpid_not_cancel instead of
309 * pthread.c: Include not-cancel.h.
310 (__pthread_initialize_minimal, __pthread_create_2_1,
311 pthread_onexit_process, __pthread_message): Use
312 write_not_cancel instead of __libc_write.
313 (__pthread_initialize_manager): Likewise. Use close_not_cancel
314 instead of __libc_close.
315 (__pthread_reset_main_thread): Use close_not_cancel instead of
317 * join.c: Include not-cancel.h.
318 (__pthread_do_exit, pthread_join, pthread_detach): Use
319 write_not_cancel instead of __libc_write.
320 * semaphore.c: Include not-cancel.h.
321 (__new_sem_post): Use write_not_cancel instead of __libc_write.
322 * specific.c: Include not-cancel.h.
323 (pthread_key_delete): Use write_not_cancel instead of __libc_write.
325 2004-05-01 Jakub Jelinek <jakub@redhat.com>
327 * Versions (libc): Add __on_exit and __libc_sigaction.
329 2004-04-28 Jakub Jelinek <jakub@redhat.com>
331 * semaphore.c (sem_timedwait): Return -1 and set errno instead of
332 returning error number [BZ #133]. Patch by <rmhaddad@yahoo.com>.
334 2004-04-22 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
336 * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
337 reference in PIC case.
339 2004-04-20 Jakub Jelinek <jakub@redhat.com>
341 * oldsemaphore.c (SEM_VALUE_MAX): Remove.
343 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
345 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
346 for librt. Save the return value to a safe register.
347 (CDISABLE): Define for librt. Set the function argument correctly.
349 2004-04-18 Jakub Jelinek <jakub@redhat.com>
351 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
352 (PSEUDO_CANCEL): Define.
354 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
355 CDISABLE): For librt, append @PLT.
357 2004-04-17 Jakub Jelinek <jakub@redhat.com>
359 * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
361 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
362 return it_value { 0, 0 }.
363 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
365 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
366 assertion for SIGEV_NONE.
367 (thread_attr_compare): Compare all attributes, not just a partial
370 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
372 2004-04-17 Ulrich Drepper <drepper@redhat.com>
374 * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
376 2004-04-16 Ulrich Drepper <drepper@redhat.com>
378 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
380 2004-04-13 Jakub Jelinek <jakub@redhat.com>
382 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
384 2004-04-12 Ulrich Drepper <drepper@redhat.com>
386 * sysdeps/unix/sysv/linux/mq_notify.c: New file.
388 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
390 (CDISABLE): Likewise.
392 2004-04-08 Jakub Jelinek <jakub@redhat.com>
394 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
395 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
396 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
397 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
398 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
400 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
401 (_POSIX_MESSAGE_PASSING): Define.
403 2004-04-10 Andreas Jaeger <aj@suse.de>
405 * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
406 to avoid warnings with GCC 3.5.
408 2004-04-09 Steven Munroe <sjmunroe@us.ibm.com>
410 * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
411 __thread_self assignment.
412 (THREAD_DTV): Replace __thread_register with __thread_self.
413 (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
416 2004-04-08 Alexandre Oliva <aoliva@redhat.com>
418 * signals.c (pthread_sigmask): Don't ever block or mask
421 2004-03-11 Steven Munroe <sjmunroe@us.ibm.com>
423 * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
425 2004-03-23 Ulrich Drepper <drepper@redhat.com>
427 * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
428 * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
430 2004-03-12 Ulrich Drepper <drepper@redhat.com>
432 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
433 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
434 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
435 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
437 2004-03-08 Andreas Jaeger <aj@suse.de>
439 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
440 dl_osversion is readonly.
442 2004-03-07 Ulrich Drepper <drepper@redhat.com>
444 * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
446 * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
448 2004-02-20 Steven Munroe <sjmunroe@us.ibm.com>
450 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
451 valid for SHARED case. Correct spelling of __vmx_longjmp.
453 * sysdeps/powerpc/pspinlock.c: Move from here.
454 * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
455 * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
456 * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
457 and __compare_and_swap32_with_release_semantics.
459 2004-02-20 Jakub Jelinek <jakub@redhat.com>
461 * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
462 (tests): Remove $(objpfx)tst-stack1-mem.
463 (tst-stack1-ENV): Remove.
464 ($(objpfx)tst-stack1-mem): Remove.
466 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
467 (__syscall_error_handler2): Call CDISABLE.
468 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
469 (__syscall_error_handler2): Call CDISABLE.
471 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
473 2004-02-10 Steven Munroe <sjmunroe@us.ibm.com>
475 * Makefile (libpthread-routines): Add ptcleanup.
476 * ptlongjmp.c: Removed.
477 * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
478 * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
479 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
480 Version longjmp, siglongjmp for GLIBC_2.3.4.
481 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
483 2004-01-22 Andreas Jaeger <aj@suse.de>
485 * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
486 (__pthread_release): Likewise.
488 2004-01-16 Richard Henderson <rth@redhat.com>
490 * attr.c: Include ldsodefs.h.
491 (pthread_getattr_np): Don't declare __libc_stack_end.
493 2004-01-09 Steven Munroe <sjmunroe@us.ibm.com>
495 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
496 [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
497 __lib*_multiple_threads.
498 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
499 [!HAVE_TLS_SUPPORT]: Likewise.
501 2004-01-13 Roland McGrath <roland@redhat.com>
503 * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
506 2004-01-10 Andreas Jaeger <aj@suse.de>
508 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
510 2004-01-01 Andreas Jaeger <aj@suse.de>
512 * Makefile (generated): Add missing files.
514 2003-12-31 Ulrich Drepper <drepper@redhat.com>
516 * attr.c (pthread_getattr_np): Make sure stack info returned for
517 main thread does not overlap with any other VMA.
518 Patch by Jakub Jelinek.
520 2003-12-29 Jakub Jelinek <jakub@redhat.com>
522 * sysdeps/ia64/tls.h: Include dl-sysdep.h.
523 (INIT_SYSINFO): Define.
524 (TLS_INIT_TP): Use it.
526 2003-12-28 Carlos O'Donell <carlos@baldric.uwo.ca>
528 * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
530 2003-12-26 Jakub Jelinek <jakub@redhat.com>
532 * sysdeps/pthread/pthread.h (pthread_setcancelstate,
533 pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
535 * semaphore.h (sem_wait, sem_timedwait): Likewise.
537 2003-12-17 Jakub Jelinek <jakub@redhat.com>
539 * manager.c (pthread_free): Call _dl_deallocate_tls even for
541 * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
543 (pthread_onexit_process): Update comment.
544 * Makefile (tests): Add tst-stack1. Depend on $(objpfx)tst-stack1-mem.
545 (generated): Add tst-stack1.mtrace and tst-stack1-mem.
546 (tst-stack1-ENV): Set.
547 ($(objpfx)tst-stack1-mem): New.
548 * tst-stack1.c: New test.
550 2003-12-16 Steven Munroe <sjmunroe@us.ibm.com>
552 * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
553 conditional so MULTIPLE_THREADS_OFFSET is generated for both.
554 * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
555 so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
556 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
559 2003-12-04 Steven Munroe <sjmunroe@us.ibm.com>
561 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
562 (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
564 2003-12-10 David Mosberger <davidm@hpl.hp.com>
566 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
567 message. Add include of <stddef.h>.
568 (INIT_NEW_WAY): New macro.
569 (INIT_OLD_WAY): Likewise.
570 (_init): Add unwind directives. Invoke
571 __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
573 (_init_EPILOG_BEGINS): Add unwind-directives. Drop unused .regstk
575 (_fini): Add unwind directives. Drop unnecessary .align 16
576 directive (bundles are always 16-byte aligned).
577 (_fini_EPILOG_BEGINS): Add unwind-directives.
579 2003-11-19 David Mosberger <davidm@hpl.hp.com>
581 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
583 2003-12-10 Andreas Jaeger <aj@suse.de>
584 Ruediger Oertel <ro@suse.de>
586 * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
588 2003-11-30 Andreas Jaeger <aj@suse.de>
590 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
591 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
594 2003-11-04 Jakub Jelinek <jakub@redhat.com>
596 * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
597 __libc_sigaction if it has been one of the special values before.
599 2003-10-06 Carlos O'Donell <carlos@baldric.uwo.ca>
601 * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
602 (__pthread_find_self): Likewise.
603 * manager.c (thread_segment): _STACK_GROWS_UP case added.
605 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
607 * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
609 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
611 * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
613 2003-10-07 Jakub Jelinek <jakub@redhat.com>
615 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
617 (SAVE_OLDTYPE_0): Fix a typo.
619 2003-10-02 Ulrich Drepper <drepper@redhat.com>
621 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
624 2003-10-02 Jakub Jelinek <jakub@redhat.com>
626 * Makefile (tests): Add tst-cancel8.
627 * tst-cancel8.c: New test.
629 2003-10-02 Ulrich Drepper <drepper@redhat.com>
631 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
632 restoring of the old cancellation type.
634 2003-09-10 Chris Demetriou <cgd@broadcom.com>
636 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
638 2003-09-30 Jakub Jelinek <jakub@redhat.com>
640 * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
641 mutex_lock, mutex_trylock, mutex_unlock): Remove.
643 2003-09-27 Wolfram Gloger <wg@malloc.de>
645 * sysdeps/pthread/malloc-machine.h: New file.
647 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
649 * attr.c (__pthread_attr_init_2_1): Double __guardsize size
650 if NEED_SEPARATE_REGISTER_STACK is defined.
652 2003-09-22 Philip Blundell <philb@gnu.org>
654 * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
655 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
657 * pthread.c (__pthread_elements): Initialise these new elements.
658 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
660 (__libc_cleanup_pop): Likewise.
662 2003-09-22 Jakub Jelinek <jakub@redhat.com>
664 * attr.c: Include stdlib.h.
666 2003-09-18 Jakub Jelinek <jakub@redhat.com>
668 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
670 * tst-attr1.c: New test.
671 * Makefile (tests): Add tst-attr1.
673 2003-09-17 Philip Blundell <philb@gnu.org>
675 * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
676 libpthread is loaded. Elide backwards compatibility code when not
679 2003-09-17 Jakub Jelinek <jakub@redhat.com>
681 * descr.h (manager_thread): Rename to...
682 (__pthread_manager_threadp): ... this.
683 * pthread.c (manager_thread): Define to __pthread_manager_threadp.
684 (__pthread_manager_threadp): New variable.
685 * internals.h (__manager_thread): Define to
686 __pthread_manager_threadp if USE_TLS.
688 2003-09-15 Jakub Jelinek <jakub@redhat.com>
690 * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
691 CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
692 -mpreferred-stack-boundary=4.
694 2003-09-16 Ulrich Drepper <drepper@redhat.com>
696 * attr.c (pthread_getattr_np): Correctly fill in the stack-related
697 values for the initial thread.
699 2003-09-17 Jakub Jelinek <jakub@redhat.com>
701 * pthread.c (manager_thread): Remove static, add attribute_hidden.
702 (thread_self_stack): Rename to...
703 (__pthread_self_stack): ... this. Remove static.
704 (pthread_handle_sigcancel): Use check_thread_self ().
705 (pthread_handle_sigrestart): Likewise.
706 * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
708 * descr.h (manager_thread): Declare.
709 * internals.h (__pthread_self_stack): New prototype.
710 (__manager_thread): Define.
711 (check_thread_self): New function.
713 2003-09-15 Jakub Jelinek <jakub@redhat.com>
715 * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
716 (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
718 2003-09-12 Jakub Jelinek <jakub@redhat.com>
720 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
721 (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
722 __SLONGWORD_TYPE otherwise.
724 2003-09-11 Steven Munroe <sjmunroe@us.ibm.com>
726 * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
727 [READ_MEMORY_BARRIER]: Define.
728 [WRITE_MEMORY_BARRIER]: Define.
730 2003-09-10 Jakub Jelinek <jakub@redhat.com>
732 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
733 ptr___pthread_cond_timedwait to the end of the structure to avoid
734 breaking Wine unnecessarily.
736 2003-09-08 Jakub Jelinek <jakub@redhat.com>
738 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
740 2003-09-02 Jakub Jelinek <jakub@redhat.com>
742 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
743 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
744 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
745 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
746 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
747 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
748 * attr.c (__old_pthread_attr_setstacksize,
749 __old_pthread_attr_setstack): New functions.
750 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
751 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
752 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
753 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
754 * tststack.c: Include limits.h and sys/param.h.
755 (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
757 * barrier.c (__pthread_barrierattr_getpshared): Always
758 return PTHREAD_PROCESS_PRIVATE.
759 (pthread_barrierattr_setpshared): Return EINVAL if pshared
760 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
762 2003-09-02 Jakub Jelinek <jakub@redhat.com>
764 * sysdeps/sparc/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
765 pthread is bigger than struct _pthread_descr_struct, use NPTL struct
768 2003-09-02 Ulrich Drepper <drepper@redhat.com>
770 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
771 (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
774 * barrier.c (pthread_barrierattr_setpshared): We don't handle
775 inter-process barriers.
777 2003-09-01 Jakub Jelinek <jakub@redhat.com>
779 * Makefile (tests): Add tst-tls1.
780 (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
781 ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
782 ($(objpfx)tst-tls1): New.
783 ($(objpfx)tst-tls2.out): Likewise.
784 (tests): Depend on $(objpfx)tst-tls2.out.
785 * tst-tls1.c: New test.
787 * tst-tls1mod.c: New.
788 * tst-tls1moda.c: New.
789 * tst-tls1modb.c: New.
790 * tst-tls1modc.c: New.
791 * tst-tls1modd.c: New.
792 * tst-tls1mode.c: New.
793 * tst-tls1modf.c: New.
794 * tst-tls2.sh: New test.
796 * internals.h (__pthread_cond_timedwait): New prototype.
797 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
798 ptr___pthread_cond_timedwait.
799 * pthread.c (__pthread_functions): Initialize them.
800 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
801 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
802 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
803 pthread_cond_timedwait@@GLIBC_2.3.2.
805 2003-08-27 Ulrich Drepper <drepper@redhat.com>
807 * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
808 pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
809 __THROW to match NPTL.
811 2003-08-13 Ulrich Drepper <drepper@redhat.com>
813 * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
814 -DBROKEN_THREAD_SIGNALS.
816 2003-08-11 Steven Munroe <sjmunroe@us.ibm.com>
818 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
819 Correct spelling of per thread resolver state.
821 2003-08-07 Jakub Jelinek <jakub@redhat.com>
823 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
824 (__rtld_lock_default_lock_recursive,
825 __rtld_lock_default_unlock_recursive): Define.
826 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
827 __rtld_lock_unlock_recursive): Define using
828 GL(_dl_rtld_*lock_recursive).
829 * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
830 and _dl_rtld_unlock_recursive. Lock GL(_dl_load_lock) the same
831 number of times as GL(_dl_load_lock) using non-mt implementation was
834 2003-07-31 Jakub Jelinek <jakub@redhat.com>
836 * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
837 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
839 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
841 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
843 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
844 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
845 PTHREAD_STACK_MIN in comments.
847 * sysdeps/alpha/pt-machine.h (PT_EI): Add
848 __attribute__((always_inline)).
849 * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
850 * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
851 * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
852 * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
853 * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
854 * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
855 * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
856 * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
857 * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
858 * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
859 * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
860 * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
861 * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
862 * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
863 * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
864 * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
865 * spinlock.h (__pthread_set_own_extricate_if): Likewise.
866 * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
868 * Examples/ex13.c (main): Change res type to void * to avoid
870 * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
872 2003-07-30 Jakub Jelinek <jakub@redhat.com>
874 * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
876 (pthread_initialize): Initialize GL(dl_init_static_tls).
878 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
880 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
881 before __timer_dealloc.
882 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
883 Don't call list_unlink.
885 2003-07-29 Roland McGrath <roland@redhat.com>
887 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
889 2003-07-25 Roland McGrath <roland@redhat.com>
891 * manager.c (pthread_start_thread): Fix typo in last change.
893 2003-07-14 Guido Guenther <agx@sigxcpu.org>
895 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
896 use L() for local labels.
898 2003-07-22 Jakub Jelinek <jakub@redhat.com>
900 * sysdeps/alpha/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Change to 0.
901 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Alignment of struct
902 _pthread_descr_struct.
903 (TLS_PRE_TCB_SIZE): Add sizeof (tcbhead_t) and pad to align.
904 If in ld.so and NPTL struct pthread is bigger than struct
905 _pthread_descr_struct, use NPTL struct pthread size.
906 (TLS_TCB_OFFSET): Define.
907 (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV,
908 THREAD_SELF, INIT_THREAD_SELF): Changed to match NPTL tls.h
910 * sysdeps/i386/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
911 pthread is bigger than struct _pthread_descr_struct, use NPTL struct
913 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Likewise.
914 * sysdeps/powerpc/tls.h (TLS_PRE_TCB_SIZE): Likewise.
915 * sysdeps/s390/tls.h (TLS_TCB_SIZE): Likewise.
916 * sysdeps/sh/tls.h (TLS_PRE_TCB_SIZE): Likewise.
917 * sysdeps/x86_64/tls.h (TLS_TCB_SIZE): Likewise.
918 * sysdeps/pthread/Makefile (gen-as-const-headers): Add
919 nptl-struct-pthread.sym if nptl tree is present.
920 (before-compile): Add $(common-objpfx)nptl-struct-pthread.h
921 if nptl tree is not present.
922 (common-generated): Add nptl-struct-pthread.h.
923 ($(common-objpfx)nptl-struct-pthread.h): New rule.
924 * sysdeps/pthread/nptl-struct-pthread.sym: New file.
926 2003-07-22 Jakub Jelinek <jakub@redhat.com>
928 * descr.h (struct _pthread_descr_struct): Provide p_res member
929 even if USE_TLS && HAVE___THREAD.
930 * sysdeps/pthread/res-state.c (__res_state): Return __resp
932 * manager.c: Include resolv.h.
933 (pthread_start_thread): Initialize __resp.
934 * libc-tls-loc.c (__res_state): Return __resp.
935 * Makefile (tests): Add tst-_res1.
936 (modules-names, extra-objs, test-extras, test-modules): Add support
938 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
939 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
941 * tst-_res1.c: New test.
942 * tst-_res1mod1.c: New test.
943 * tst-_res1mod2.c: New test.
945 2003-07-20 Ulrich Drepper <drepper@redhat.com>
947 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
950 * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
952 2003-07-14 Ulrich Drepper <drepper@redhat.com>
954 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
955 in test for compilation in libc.
957 2003-07-04 Jakub Jelinek <jakub@redhat.com>
959 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
960 different symbol for the cancellation syscall wrapper and
961 non-cancellation syscall wrapper.
962 (PSEUDO_END): Define.
964 2003-07-05 Richard Henderson <rth@redhat.com>
966 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
968 2003-06-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
970 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
973 2003-06-21 Andreas Schwab <schwab@suse.de>
975 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
978 2003-06-20 Richard Henderson <rth@redhat.com>
980 * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
981 Remove ptw-osf_sigprocmask.
983 2003-06-18 Jakub Jelinek <jakub@redhat.com>
985 * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
986 __librt_disable_asynccancel): Declare.
987 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
989 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
991 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
992 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
993 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
994 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
995 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
996 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
997 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
998 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
999 * sysdeps/x86_64/tcb-offsets.sym: New file.
1000 * sysdeps/x86_64/Makefile: New file.
1001 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
1002 * Versions (libc): Export __librt_enable_asynccancel,
1003 __librt_disable_asynccancel and __librt_multiple_threads as
1005 * libc-cancellation.c (__librt_multiple_threads,
1006 __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
1008 2003-06-12 Steven Munroe <sjmunroe@us.ibm.com>
1010 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1011 (SINGLE_THREAD_P): Replace @ got notation with @toc.
1013 2003-06-11 Ulrich Drepper <drepper@redhat.com>
1015 * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
1016 initializer [PR libc/5052].
1018 2003-06-09 Andreas Schwab <schwab@suse.de>
1020 * Makefile: Move inclusion of ../Rules down after extra-objs is
1023 2003-06-06 Ulrich Drepper <drepper@redhat.com>
1025 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
1026 5+ arg syscalls only needed for PIC.
1027 Patch by Ralph Siemsen <ralphs@netwinder.org>.
1029 2003-06-05 Richard Henderson <rth@redhat.com>
1031 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1032 and require CFI assembler directives.
1033 * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
1035 2003-05-30 Andreas Jaeger <aj@suse.de>
1037 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
1038 (SAVESTK_0): Add CFI directives.
1039 (SAVESTK_3): Likewise.
1040 (SAVESTK_5): Likewise.
1041 (RESTSTK_0): Likewise.
1042 (RESTSTK_3): Likewise.
1043 (RESTSTK_5): Likewise.
1045 2003-05-05 Ulrich Drepper <drepper@redhat.com>
1047 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
1050 2003-05-04 Roland McGrath <roland@redhat.com>
1052 * Makefile ($(objpfx)../libc.so): New target.
1054 2003-04-26 Ulrich Drepper <drepper@redhat.com>
1056 * pthread.c (__pthread_initialize_manager): Remove one last
1057 p_multiple_threads call.
1059 2003-04-22 Jakub Jelinek <jakub@redhat.com>
1061 * pthread.c (__pthread_initialize_manager): Subtract
1062 TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
1063 * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
1064 instead of sizeof (pthread_descr).
1065 (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
1066 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
1067 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1069 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1071 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1073 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1075 (NO_TLS_OFFSET): Define.
1077 2003-04-22 Roland McGrath <roland@redhat.com>
1079 * Makeconfig (shared-thread-library): Reverse link order to work
1082 2003-04-20 Ulrich Drepper <drepper@redhat.com>
1084 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
1085 compiler knows we use the ldt_entry variable and that the syscall
1086 modifies the memory.
1088 * internals.h: Split pthread_functions definition into...
1089 * sysdeps/pthread/pthread-functions.h: ...new file.
1091 * sysdeps/i386/useldt.h: Include <sysdep.h>.
1093 2003-04-13 Jakub Jelinek <jakub@redhat.com>
1095 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1096 match changes in NPTL sysdep-cancel.h.
1098 2003-04-11 Roland McGrath <roland@redhat.com>
1100 * Makefile (multidir): Don't set the variable here with $(shell ...).
1101 ($(objpfx)multidir.mk): New target, generated makefile; include that.
1102 (generated): Append it.
1104 2003-04-10 Jakub Jelinek <jakub@redhat.com>
1106 * Makefile (multidir, crti-objs, crtn-objs): New variables.
1107 (generated-dirs): Add pathname component of multidir.
1108 (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1109 ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1110 ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1111 $(objpfx)$(multidir)/crtn.o): New.
1112 * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1113 * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1114 before-compile, generated): Don't generate and use specs.
1115 ($(objpfx)specs): Remove.
1117 2003-04-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1119 * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1121 2003-04-03 Ulrich Drepper <drepper@redhat.com>
1123 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1124 missing ; after ENTRY use [PR libc/4997].
1126 2003-04-03 Jakub Jelinek <jakub@redhat.com>
1128 * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1129 in case the parent blocked it.
1131 2003-04-02 Jakub Jelinek <jakub@redhat.com>
1133 * Makefile (libpthread-routines): Add pthread_atfork.
1134 (libpthread-static-only-routines): Add pthread_atfork.
1136 2003-04-01 Jakub Jelinek <jakub@redhat.com>
1138 * pthread.c (__pthread_wait_for_restart_signal): Use
1139 __pthread_sigsuspend instead of sigsuspend.
1140 * internals.h (__pthread_sigsuspend): New prototype.
1141 * Makefile (libpthread-routines): Add pt-sigsuspend.
1142 (tests): Add tst-cancel7.
1143 * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1144 * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1145 * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1146 * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1147 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1148 * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1149 * tst-cancel7.c: New test.
1151 2003-03-31 Alexandre Oliva <aoliva@redhat.com>
1153 * alloca_cutoff.c: Include internals.h.
1154 * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1155 * sysdeps/pthread/herrno-loc.c: Likewise.
1156 * sysdeps/pthread/res-state.c: Likewise.
1158 2003-03-25 Ulrich Drepper <drepper@redhat.com>
1160 * sysdeps/pthread/bits/typesizes.h: New file.
1161 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1162 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1164 2003-03-24 Daniel Jacobowitz <drow@mvista.com>
1166 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1167 (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1169 2003-03-22 Jakub Jelinek <jakub@redhat.com>
1171 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1173 2003-03-21 Daniel Jacobowitz <drow@mvista.com>
1175 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1176 (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1178 2003-03-21 Jakub Jelinek <jakub@redhat.com>
1180 * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1181 (TLS_SETUP_GS_SEGMENT): Fix a typo.
1183 2003-03-19 Ulrich Drepper <drepper@redhat.com>
1185 * sysdeps/pthread/Makefile: Fix cut&paste error.
1187 2003-03-18 Roland McGrath <roland@redhat.com>
1189 * Versions (libpthread: GLIBC_2.2): Remove
1190 pthread_barrierattr_getpshared, never really existed.
1191 (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1192 (libpthread: GLIBC_PRIVATE): ... here.
1194 2003-03-14 Jakub Jelinek <jakub@redhat.com>
1196 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1197 * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1200 2003-03-14 Alexandre Oliva <aoliva@redhat.com>
1202 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1204 * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1205 Handle 64-bit longs on n64.
1207 2003-03-07 Jakub Jelinek <jakub@redhat.com>
1209 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1210 __pthread_spin_trylock): Rewritten.
1212 2003-03-06 Ulrich Drepper <drepper@redhat.com>
1214 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1217 2003-03-02 Ulrich Drepper <drepper@redhat.com>
1219 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1220 error for CPU clocks.
1222 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1223 _POSIX_MONOTONIC_CLOCK.
1224 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1226 2003-03-01 Roland McGrath <roland@redhat.com>
1228 * sysdeps/powerpc/powerpc64/pt-machine.h
1229 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1231 * sysdeps/powerpc/tls.h: Don't define those here.
1233 * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1234 tcbhead_t with multiple_threads member.
1235 [USE_TLS] (tcbhead_t): Define minimal one-word version.
1236 [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1237 * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1238 derive thread register offset of p_multiple_threads member.
1240 * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1241 Conditionalize p_header member on this.
1242 [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1243 * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1244 * sysdeps/sh/tls.h: Likewise.
1245 * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1246 * sysdeps/sh/tcb-offsets.sym: Likewise.
1247 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1248 (SINGLE_THREAD_P): Likewise.
1249 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1250 (SINGLE_THREAD_P): Likewise.
1251 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1252 (SINGLE_THREAD_P): Likewise.
1253 * pthread.c (__pthread_initialize_manager): Likewise.
1254 * manager.c (pthread_handle_create): Likewise.
1256 * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1259 2003-01-31 Steven Munroe <sjmunroe@us.ibm.com>
1261 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1262 Conditionalize .toc section magic on this.
1264 2003-02-21 Roland McGrath <roland@redhat.com>
1266 * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1267 instead of __rpc_thread_destroy.
1269 2003-02-21 Jakub Jelinek <jakub@redhat.com>
1271 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1272 __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1273 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1275 * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1276 to crti.o and crtn.o.
1277 * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1279 2003-02-21 Roland McGrath <roland@redhat.com>
1281 * Makefile (install-lib-ldscripts): New variable.
1283 2003-02-20 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1285 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1286 interprocedure branches.
1288 2003-02-19 Ulrich Drepper <drepper@redhat.com>
1290 * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1291 need the target thread's lock.
1293 2003-02-17 Ulrich Drepper <drepper@redhat.com>
1295 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1298 2003-02-17 Kevin B. Hendricks <kevin.hendricks@sympatico.ca>
1299 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1301 * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1302 * sysdeps/powerpc/tcb-offsets.sym: New file.
1303 * sysdeps/powerpc/tls.h: New file.
1304 * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1305 (ARCH_STACK_MAX_SIZE): Define.
1306 (THREAD_SELF): Define.
1307 (INIT_THREAD_SELF): Define.
1308 (THREAD_GETMEM): Define.
1309 (THREAD_GETMEM_NC): Define.
1310 (THREAD_SETMEM): Define.
1311 (THREAD_SETMEM_NC): Define.
1312 (__thread_self): Declare.
1313 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1314 for thread register.
1316 2003-02-14 Steven Munroe <sjmunroe@us.ibm.com>
1318 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1319 Check pthread_create existance, not __pthread_fork.
1321 2003-02-12 Ulrich Drepper <drepper@redhat.com>
1323 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1325 2003-02-10 Jakub Jelinek <jakub@redhat.com>
1327 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1328 pthread_create existance, not __pthread_fork.
1329 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1330 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1331 * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1332 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1334 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1335 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1336 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1337 Add .weak pthread_create.
1338 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1339 Check pthread_create existance, not __pthread_fork.
1340 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1341 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1342 __fork whenever libpthread.so is loaded.
1344 2003-02-09 Andreas Jaeger <aj@suse.de>
1346 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1347 Rework: %r9 is destroyed by functions so don't use it as
1348 temporary, align stack correctly, fix parameter for CDISABLE.
1350 2003-02-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1352 * sysdeps/sh/Makefile: New file.
1353 * sysdeps/sh/tcb-offsets.sym: Likewise.
1354 * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1355 of linuxthreads/descr.h after the definition of THREAD_SELF.
1356 (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1357 (TLS_TCB_SIZE): Set size of tcbhead_t.
1358 (TLS_PRE_TCB_SIZE): Define.
1359 (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1360 a member of thread structure.
1361 (THREAD_DTV): Likewise.
1362 (TLS_INIT_TP_EXPENSIVE): Remove.
1363 (TLS_INIT_TP): Set gbr register only.
1365 (INIT_THREAD_SELF): Likewise.
1366 (NONTLS_INIT_TP): New.
1367 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1369 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1370 SYSCALL_INST_PAD macro after DO_CALL.
1371 (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1373 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1374 whenever libpthread.so is loaded.
1376 2003-02-08 Andreas Schwab <schwab@suse.de>
1378 * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1379 libpthread.so is loaded.
1381 2003-02-07 Ulrich Drepper <drepper@redhat.com>
1383 * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1384 __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1385 no __NR_vfork definition.
1387 2003-02-07 Jakub Jelinek <jakub@redhat.com>
1389 * tst-popen2.c: New test.
1390 * Makefile (tests): Add tst-popen2.
1391 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1392 whenever libpthread.so is loaded.
1393 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1394 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1395 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1396 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1398 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1399 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1400 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1402 2003-02-05 Ulrich Drepper <drepper@redhat.com>
1404 * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1405 variable for non-libpthread case to the same value the
1406 pthread_once function would use.
1408 2003-02-03 Jakub Jelinek <jakub@redhat.com>
1410 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1411 BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1413 2003-02-04 Andreas Jaeger <aj@suse.de>
1415 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1418 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1420 * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1422 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1424 * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1425 THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1427 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1428 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1429 * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1430 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1431 * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1432 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1433 * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1434 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1435 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1436 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1437 * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1438 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1440 2003-01-27 Martin Schwidefsky <schwidefsky@de.ibm.com>
1442 * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1443 Define TLS versions.
1444 * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1446 * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1447 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1448 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1450 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1451 branch with 32 bit offset.
1452 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1454 2003-01-24 Jakub Jelinek <jakub@redhat.com>
1456 * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1457 as required by TLS ABI.
1458 * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1459 * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1460 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1461 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1463 [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1464 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1465 instead of %g6 for thread pointer.
1466 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1467 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1468 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1470 2003-01-25 Guido Guenther <agx@sigxcpu.org>
1472 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1473 * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1475 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1477 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1478 reference to __fork.
1480 2003-01-17 Richard Henderson <rth@redhat.com>
1482 * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1483 (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1484 (TLS_PRE_TCB_SIZE): New.
1485 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1486 new ia64-style thread pointer layout.
1487 (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1488 (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1489 * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1492 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1494 * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1496 (NONTLS_INIT_TP): Revert last change.
1497 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1498 offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1500 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1502 * pthread.c (_pthread_initialize_minimal): Use
1503 GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1504 been already initialized.
1506 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1508 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1511 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1513 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1514 __libc_lock_init_recursive): Initialize fields directly.
1516 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1518 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1519 __fork to be far away from __vfork ifndef SHARED.
1520 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1522 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1523 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1524 Add a missing instruction.
1525 * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1526 branch to __fork even if __NR_vfork is not defined.
1528 2003-01-14 Ulrich Drepper <drepper@redhat.com>
1530 * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1533 2003-01-14 Steven Munroe <sjmunroe@us.ibm.com>
1535 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1537 2003-01-14 Jakub Jelinek <jakub@redhat.com>
1539 * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1541 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1543 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1544 unterminated string literals.
1545 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1547 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1549 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1550 (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from
1551 PSEUDO_END to PSEUDO.
1552 (PSEUDO_END): Remove.
1553 (SINGLE_THREAD_P): Save an instruction.
1554 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1555 parameter to SINGLE_THREAD_P call.
1556 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1559 2003-01-10 Andreas Schwab <schwab@suse.de>
1561 * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1563 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1565 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1566 backchain in pseudo_cancel. Minor code improvements.
1567 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1570 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1572 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1573 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1575 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1577 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1579 2002-01-09 Richard Henderson <rth@redhat.com>
1581 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1582 ret follows pseudo, and thus avoid branch-to-branch in cancel
1583 case. Use SYSCALL_ERROR_LABEL.
1585 2003-01-11 Philip Blundell <philb@gnu.org>
1587 * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1588 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1589 Correctly unstack lr.
1590 (UNDOARGS_5): Fix ordering of pushes and pops.
1591 (SINGLE_THREAD_P_PIC): New.
1592 (SINGLE_THREAD_P_INT): New.
1593 (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it
1595 (PSEUDO): Use SINGLE_THREAD_P_INT.
1597 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1599 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1601 2003-01-11 Jakub Jelinek <jakub@redhat.com>
1603 * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1604 [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1605 TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1606 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1607 INIT_THREAD_SELF): Define.
1608 [HAVE_TLS_SUPPORT]: Include descr.h.
1609 (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1610 struct _pthread_descr_struct.
1611 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1612 THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1614 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1616 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1618 (__pthread_initialize_manager): Rename tcb to mgr.
1619 Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1620 _pthread_descr) below tcbp, otherwise to tcbp.
1621 * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1622 new_thread to be below _dl_allocate_tls (). Adjust new_thread back
1623 before freeing. Fix clone arguments if report_events and USE_TLS.
1624 (pthread_free): Adjust th back before freeing.
1626 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
1628 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1629 * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1630 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1632 2003-01-09 Jakub Jelinek <jakub@redhat.com>
1634 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1635 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1636 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1637 [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1638 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1639 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1640 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1641 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1642 * tst-popen.c: New test.
1643 * Makefile (tests): Add tst-popen.
1645 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1647 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1648 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1650 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1652 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1653 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
1655 2003-01-06 Philip Blundell <philb@gnu.org>
1657 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1659 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1661 * internals.h (LIBC_CANCEL_HANDLED): Define.
1662 * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1663 * signals.c (LIBC_CANCEL_HANDLED): Add.
1664 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1665 * tst-cancel-wrappers.sh: Remove all exceptions.
1667 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1669 2003-01-05 Andreas Schwab <schwab@suse.de>
1671 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1674 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1676 (CENABLE): Likewise.
1677 (CDISABLE): Likewise.
1679 2003-01-05 Ulrich Drepper <drepper@redhat.com>
1681 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1682 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1684 * Makefile (libc.so-no-z-defs): Define to yes.
1686 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1688 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1689 (tcbhead_t): Add multiple_threads member.
1690 (TLS_INIT_TP_EXPENSIVE): Define.
1691 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1692 strings. Remove unused code.
1693 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1695 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1697 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1698 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1700 2003-01-04 Jakub Jelinek <jakub@redhat.com>
1702 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1703 even if NOT_IN_libc is defined.
1705 2003-01-05 Jakub Jelinek <jakub@redhat.com>
1707 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1708 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1709 * sysdeps/s390/Makefile: New file.
1710 * sysdeps/s390/tcb-offsets.sym: New file.
1711 * sysdeps/s390/tls.h: New file.
1713 2003-01-03 Richard Henderson <rth@redhat.com>
1715 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1717 2003-01-03 Andreas Jaeger <aj@suse.de>
1719 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1721 2003-01-03 Jakub Jelinek <jakub@redhat.com>
1723 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1725 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1727 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1730 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1732 * internals.h (struct pthread_functions): Rename
1733 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1734 * pthread.c (pthread_functions): Adjust.
1735 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1736 pthread_cond_*@GLIBC_2.0 compatibility symbols.
1737 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1738 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1739 and pthread_cond_wait.
1741 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1743 (pthread_cond_t): Add __align member, shorten __padding.
1744 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1745 __padding and __align too.
1747 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1749 * sysdeps/pthread/sigaction.c: New file.
1750 * sysdeps/unix/sysv/linux/raise.c: New file.
1751 * sysdeps/unix/sysv/linux/sigwait.c: New file.
1752 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1753 weak_extern with #ifndef SHARED.
1754 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1756 * signals.c (__sigaction): Renamed to...
1757 (__pthread_sigaction): ... this.
1758 (__sigaction): New strong alias, #ifdef SHARED only.
1759 (sigaction): Protect with #ifdef SHARED.
1760 (sigwait): Renamed to...
1761 (__pthread_sigwait): ... this.
1762 (sigwait): New strong alias, #ifdef SHARED only.
1763 (raise): Renamed to...
1764 (__pthread_raise): ... this.
1765 (raise): New strong alias, #ifdef SHARED only.
1766 * internals.h (__pthread_sigaction, __pthread_sigwait,
1767 __pthread_raise): New prototypes.
1768 (struct pthread_functions): Add ptr_pthread_sigaction,
1769 ptr_pthread_sigwait, ptr_pthread_raise.
1770 * pthread.c (pthread_functions): Renamed to...
1771 (__pthread_functions): ... this. No longer static, no longer
1772 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1773 and ptr_pthread_raise.
1774 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1775 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1776 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1777 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1779 * Makefile (tests, tests-static): Add tst-cancel-static.
1780 * tst-cancel-static.c: New test.
1782 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1784 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1786 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1788 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1789 * condvar.c: Add symbol versioning. The compatibility versions
1790 are the same as the change in the interface does not effect this
1792 * Versions [libpthread]: Add definitions for new pthread_cond_*
1793 interfaces for version GLIBC_2.3.2.
1795 2002-12-31 Ulrich Drepper <drepper@redhat.com>
1797 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1799 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1800 for __register_atfork.
1802 2002-12-31 Jakub Jelinek <jakub@redhat.com>
1804 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1805 ASSEMBLER test macro.
1806 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1807 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1808 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1809 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1810 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1811 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1813 * sysdeps/pthread/errno-loc.c (__errno_location): Add
1815 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1816 * sysdeps/pthread/res-state.c (__res_state): Likewise.
1817 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1818 __libc_current_sigrtmax): Likewise.
1819 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1820 __libc_internal_tsd_set, __libc_internal_tsd_address,
1821 __libc_alloca_cutoff.
1822 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1823 __libc_internal_tsd_set, __libc_internal_tsd_address.
1825 * sysdeps/pthread/list.h: Remove assert.h include.
1826 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1828 * sysdeps/pthread/list.h: New file.
1829 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1830 * sysdeps/unix/sysv/linux/fork.c: New file.
1831 * sysdeps/unix/sysv/linux/fork.h: New file.
1832 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1833 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1834 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1835 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1836 * sysdeps/unix/sysv/linux/Makefile: New file.
1837 * sysdeps/unix/sysv/linux/Versions: New file.
1838 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1839 (__pthread_cleanup_upto): ...this. Add targetframe argument,
1840 use it instead of currentframe. No longer static.
1841 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1842 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1843 (struct pthread_functions): Add ptr_pthread_fork,
1844 ptr_pthread_cleanup_upto.
1845 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1846 ptr_pthread_cleanup_upto.
1847 * ptfork.c: Include fork.h.
1848 (struct handler_list, struct handler_list_block): Remove.
1849 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1850 pthread_atfork_child): Remove.
1851 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1852 (__pthread_fork): New function.
1853 (__fork, __vfork): Call __libc_fork.
1854 * Makefile (libpthread-routines): Add old_pthread_atfork.
1855 (libpthread-nonshared): Add pthread_atfork.
1856 (others): Depend on $(objpfx)libpthread_nonshared.a.
1857 ($(objpfx)libpthread_nonshared.a): New rule.
1858 (install): Depend on $(inst_libdir)/libpthread.so.
1859 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1861 (tests): Depend on libpthread_nonshared.a too.
1862 * old_pthread_atfork.c: New file.
1863 * pthread_atfork.c: New file.
1864 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1867 2002-12-30 Jakub Jelinek <jakub@redhat.com>
1869 * forward.c: Make all functions available by default again. It
1870 caused too much trouble.
1871 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1872 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1873 ptr___pthread_attr_init_2_*.
1874 * pthread.c (pthread_functions): Adjust.
1876 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1878 * libc_pthread_init.c (__libc_pthread_init): Remove
1879 MULTIPLE_THREADS_OFFSET check.
1880 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1881 (SYSINFO_OFFSET): Remove.
1882 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1884 * sysdeps/i386/tcb-offsets.sym: New file.
1885 * sysdeps/pthread/tcb-offsets.h: New file.
1886 * sysdeps/sparc/sparc32/tls.h: Removed.
1887 * sysdeps/sparc/sparc64/tls.h: Move...
1888 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
1889 * sysdeps/sparc/Makefile: New file.
1890 * sysdeps/sparc/tcb-offsets.sym: New file.
1891 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1892 * sysdeps/ia64/Makefile: New file.
1893 * sysdeps/ia64/tcb-offsets.sym: New file.
1894 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1895 (MULTIPLE_THREADS_OFFSET): Remove.
1896 Replace defined MULTIPLE_THREADS_OFFSET
1897 with defined FLOATING_STACKS && USE___THREAD.
1898 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1899 (MULTIPLE_THREADS_OFFSET): Remove.
1900 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1901 (MULTIPLE_THREADS_OFFSET): Remove.
1902 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1903 (MULTIPLE_THREADS_OFFSET): Remove.
1904 * pthread.c (__pthread_initialize_manager): Remove
1905 MULTIPLE_THREADS_OFFSET cbeck.
1907 * tst-cancel-wrappers.sh: Add line continuations.
1909 2002-12-27 Jakub Jelinek <jakub@redhat.com>
1911 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1912 and bits/libc-lock.h.
1913 (__libc_internal_tsd_get, __libc_internal_tsd_set,
1914 __libc_internal_tsd_address): Remove.
1915 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1916 __pthread_internal_tsd_set): New weak_externs.
1917 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1918 using __libc_maybe_call2.
1919 (__libc_tsd_key_t): Move to ...
1920 * descr.h (__libc_tsd_key_t): ...here.
1921 Remove bits/libc-tsd.h include.
1922 * sysdeps/pthread/errno-loc.c: New file.
1923 * sysdeps/pthread/herrno-loc.c: New file.
1924 * sysdeps/pthread/res-state.c: New file.
1925 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1926 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1927 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
1928 of THREAD_[SG]ETMEM.
1929 * specific.c (libc_internal_tsd_set): Renamed to...
1930 __pthread_internal_tsd_set. Remove static.
1931 (libc_internal_tsd_get): Renamed to...
1932 __pthread_internal_tsd_get. Remove static.
1933 (libc_internal_tsd_address): Renamed to...
1934 __pthread_internal_tsd_address. Remove static.
1935 (__libc_internal_tsd_set, __libc_internal_tsd_get,
1936 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1937 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1939 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1940 __pthread_internal_tsd_address): New prototypes.
1941 (struct pthread_functions): Add
1942 ptr_pthread_internal_tsd_([sg]et|address) fields.
1943 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1944 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1945 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1946 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1947 * alloca_cutoff.c: New file.
1948 * no-tsd.c: Removed.
1949 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
1950 * pt-system.c (system): Remove cancellation handling.
1951 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1952 cancellation routines.
1954 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1955 (tcbhead_t): Add sysinfo field.
1956 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1957 (TLS_INIT_TP): Use INIT_SYSINFO.
1958 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1959 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1960 (MULTIPLE_THREADS_OFFSET): Adjust.
1961 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1962 (MULTIPLE_THREADS_OFFSET): Likewise.
1963 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1964 (MULTIPLE_THREADS_OFFSET): Likewise.
1965 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1966 (MULTIPLE_THREADS_OFFSET): Likewise.
1967 * descr.h: Include stdint.h.
1968 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1970 2002-12-22 Jakub Jelinek <jakub@redhat.com>
1972 * libc_pthread_init.c: Include stdlib.h.
1973 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1974 (TLS_INIT_TP_EXPENSIVE): Define.
1975 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1976 __libc_maybe_call2): In _LIBC check SHARED define.
1977 * sysdeps/ia64/tls.h: New file.
1978 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1979 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1980 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1981 * sysdeps/sparc/sparc32/tls.h: New file.
1982 * sysdeps/sparc/sparc64/tls.h: New file.
1983 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1984 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1985 * Makefile (tests): Add tst-cancel[1-6].
1986 (tests-reverse): Add tst-cancel5.
1987 Link libc.so before libpthread.so for tests-reverse.
1988 * tst-cancel1.c: New file.
1989 * tst-cancel2.c: New file.
1990 * tst-cancel3.c: New file.
1991 * tst-cancel4.c: New file.
1992 * tst-cancel5.c: New file.
1993 * tst-cancel6.c: New file.
1995 2002-12-27 Andreas Schwab <schwab@suse.de>
1997 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1999 2002-12-22 Roland McGrath <roland@redhat.com>
2001 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2003 2002-12-21 Ulrich Drepper <drepper@redhat.com>
2005 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
2006 Reported by Art Hass <ahaas@airmail.net>.
2008 2002-12-19 Jakub Jelinek <jakub@redhat.com>
2010 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2011 Use return 0 as 6th argument to FORWARD4.
2013 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2015 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
2016 define if __ASSUME_LDT_WORKS > 0.
2017 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
2018 struct member access if !FLOATING_STACKS.
2019 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2021 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2023 * internals.h (__pthread_thread_self): New prototype.
2024 (struct pthread_functions): Add ptr_pthread_thread_self field.
2025 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
2026 (__pthread_thread_self): New function.
2027 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
2028 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
2029 use thread_self() directly if not FLOATING_STACKS.
2031 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2033 * sysdeps/x86_64/pt-machine.h: Guard most of the header
2034 with #ifndef __ASSEMBLER__.
2035 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
2036 pthread_attr_init_2_0 use.
2038 2002-12-17 Jakub Jelinek <jakub@redhat.com>
2040 * wrapsyscall.c: Removed.
2042 * Makefile (distribute): Add tst-cancel-wrappers.sh.
2043 (routines): Remove weaks. Add forward,
2044 libc_pthread_init, libc-cancellation.
2045 (shared-only-routines): Remove weaks. Add forward.
2046 (libpthread-routines): Remove wrapsyscall.
2047 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
2048 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
2049 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
2050 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
2051 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
2052 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
2053 (libpthread-shared-only-routines): Add pt-allocrtsig.
2054 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2055 ($(objpfx)tst-cancel-wrappers.out): New rule.
2056 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
2058 (__libc_maybe_call): In libpthread.* don't check for existance
2060 (__libc_maybe_call2): Define.
2061 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
2062 __libc_lock_trylock, __libc_lock_unlock): Use it.
2063 * sysdeps/pthread/flockfile.c: New file.
2064 * sysdeps/pthread/ftrylockfile.c: New file.
2065 * sysdeps/pthread/funlockfile.c: New file.
2066 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2067 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2068 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
2069 * libc-cancellation.c: New file.
2070 * forward.c: New file.
2071 * libc_pthread_init.c: New file.
2072 * pt-system.c: New file.
2073 * pthread.c: Remove locale.h.
2074 (__pthread_manager_thread): Initialize multiple_threads.
2075 (__pthread_multiple_threads): Declare.
2076 (pthread_functions): New variable.
2077 (__pthread_initialize_minimal): Remove __uselocale call.
2078 Call __libc_pthread_init.
2079 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
2080 initial thread's multiple_threads and __libc_multiple_threads.
2081 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
2083 (pthread_setschedparam, pthread_getschedparam): Rename to __
2084 prefixed variants. Add strong_alias.
2085 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
2086 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
2087 (init_rtsigs): Use __libc_current_sigrtmin_private.
2088 (pthread_initialize): Only call init_rtsigs if
2089 !__ASSUME_REALTIME_SIGNALS.
2090 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2091 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2092 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2093 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2094 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2095 __pthread_attr_getinheritsched, __pthread_attr_setscope,
2096 __pthread_attr_getscope, __pthread_cond_init,
2097 __pthread_cond_destroy, __pthread_cond_wait,
2098 __pthread_cond_signal, __pthread_cond_broadcast,
2099 __pthread_condattr_init, __pthread_condattr_destroy,
2100 __pthread_equal, __pthread_getschedparam,
2101 __pthread_setschedparam, __pthread_setcancelstate,
2102 __pthread_setcanceltype, __pthread_enable_asynccancel,
2103 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2104 (__pthread_mutex_init, __pthread_mutex_destroy,
2105 __pthread_mutex_lock, __pthread_mutex_unlock,
2106 __pthread_mutex_trylock): Likewise.
2108 (struct pthread_functions): New type.
2109 (__libc_pthread_functions): New variable.
2110 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2111 * descr.h (struct _pthread_descr_struct): Add
2112 p_header.data.multiple_threads field.
2113 * manager.c (pthread_handle_create): Initialize multiple_threads.
2114 * cancel.c (__pthread_enable_asynccancel,
2115 __pthread_disable_asynccancel): New functions.
2116 (__pthread_provide_wrappers): Remove.
2117 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2118 prefixed variants. Add strong_alias.
2119 * condvar.c (pthread_cond_init, pthread_cond_destroy,
2120 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2121 pthread_condattr_init, pthread_condattr_destroy): Likewise.
2122 * join.c (pthread_exit): Likewise.
2123 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2124 pthread_attr_getdetachstate, pthread_attr_setschedparam,
2125 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2126 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2127 pthread_attr_getinheritsched, pthread_attr_setscope,
2128 pthread_attr_getscope): Likewise.
2129 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2130 __pthread_mutex_lock, __pthread_mutex_unlock,
2131 __pthread_mutex_trylock): Add hidden_def.
2132 * Versions (libc): Add __libc_pthread_init,
2133 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2134 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2135 * lockfile.c: Remove some USE_IN_LIBIO guards.
2136 (__pthread_provide_lockfile): Remove.
2137 * pt-allocrtsig.c: New file.
2138 * tst-cancel-wrappers.sh: New test.
2140 2002-12-15 Ulrich Drepper <drepper@redhat.com>
2142 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2143 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2144 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2145 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2147 2002-12-10 Ulrich Drepper <drepper@redhat.com>
2149 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2150 weak. There is no reason for that.
2151 (CANCELABLE_SYSCALL_VA): Likewise.
2153 2002-12-09 Ulrich Drepper <drepper@redhat.com>
2155 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2156 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2157 * Versions: Export creat, poll, pselect, readv, select, sigpause,
2158 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2159 libpthread in version GLIBC_2.3.2.
2161 2002-12-06 Ulrich Drepper <drepper@redhat.com>
2163 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2165 2002-12-05 Roland McGrath <roland@redhat.com>
2167 * pthread.c (__pthread_initialize_minimal)
2168 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2169 TCB if the dynamic linker didn't do it at startup.
2171 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2173 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2175 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2176 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2178 2002-12-03 Roland McGrath <roland@redhat.com>
2180 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2181 from dynamic linker internal cell to new libc cell.
2183 2002-11-28 Roland McGrath <roland@redhat.com>
2185 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2186 before other headers, so FLOATING_STACKS is not defined wrongly.
2188 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2189 even if [! FLOATING_STACKS].
2190 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2191 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2192 dl_osversion >= 2.3.99 and fatal if not.
2193 (TLS_DO_MODIFY_LDT): Use it.
2195 2002-11-28 Ulrich Drepper <drepper@redhat.com>
2197 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2198 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
2199 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2201 2002-11-19 Ulrich Drepper <drepper@redhat.com>
2203 * Versions (libc: GLIBC_2.0): Remove names of functions which are
2204 not defined in libc.
2205 * Makefile (shared-only-routines): Add weaks.
2206 * weaks.c: Remove functions which are not exported from libc.so.
2208 2002-11-14 Roland McGrath <roland@redhat.com>
2210 * libc-tsd.c: New file.
2211 * Makefile (distribute): Add it.
2212 (libc-link.so): New variable.
2213 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2214 (libc-ok-for-link): New variable.
2215 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2216 libc-ok-for-link to $(use-thread).
2217 [$(libc-ok-for-link) = no]
2218 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2219 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2221 (generated): Append them.
2222 (extra-objs): Append libc-tsd.os.
2224 * libc-tls-loc.c: New file.
2225 * Makefile (libpthread-routines): Add it.
2227 2002-11-14 Andreas Schwab <schwab@suse.de>
2229 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2232 2002-11-13 Roland McGrath <roland@redhat.com>
2234 * Examples/ex6.c (main): Improve error reporting.
2236 2002-11-04 Ulrich Drepper <drepper@redhat.com>
2238 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2239 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
2241 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2243 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2245 2002-10-22 Jakub Jelinek <jakub@redhat.com>
2247 * manager.c (pthread_start_thread): Call __uselocale even
2248 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
2250 2002-10-17 Roland McGrath <roland@redhat.com>
2252 * Makefile (unload): Don't link in libpthread.so.
2253 ($(objpfx)unload.out): Do depend on it.
2254 * unload.c (main): Improve error reporting.
2256 2002-10-09 Roland McGrath <roland@redhat.com>
2258 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2259 Under [__PIC__], call the function via the pointer fetched for
2260 comparison rather than a call by name that uses the PLT.
2261 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2262 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2263 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2264 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2265 (__libc_key_create, __libc_getspecific, __libc_setspecific)
2266 (__libc_atfork): Use it.
2268 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2269 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2270 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2271 (ld: GLIBC_PRIVATE): Set removed.
2273 2002-10-11 Ulrich Drepper <drepper@redhat.com>
2275 * sysdeps/unix/sysv/linux/execve.c: New file.
2277 2002-10-09 Jakub Jelinek <jakub@redhat.com>
2279 * no-tsd.c: Include stdlib.h.
2281 2002-10-07 Jakub Jelinek <jakub@redhat.com>
2283 * sysdeps/unix/sysv/linux/allocalim.h: New file.
2284 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2286 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2287 Pass stack size to caller.
2288 (pthread_handle_create): Set p_alloca_cutoff.
2289 * pthread.c (__pthread_initial_thread): Use C99 designated
2290 initializers. Set p_alloca_cutoff.
2291 (__pthread_manager_thread): Likewise.
2292 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2294 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2296 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2298 * specific.c (__libc_alloca_cutoff): New function.
2299 * no-tsd.c (__libc_alloca_cutoff): New function.
2300 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2303 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2305 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2306 * sysdeps/sh/tls.h: Likewise.
2307 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2309 2002-09-29 Jakub Jelinek <jakub@redhat.com>
2311 * sysdeps/pthread/tst-timer.c (main): Clear
2312 SIGEV2.sigev_notify_attributes.
2314 2002-09-29 Ulrich Drepper <drepper@redhat.com>
2316 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2317 INLINE_SYSCALL for set_thread_area syscall.
2319 2002-09-28 Roland McGrath <roland@redhat.com>
2321 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2322 Don't call setrlimit, since we did no prior bogon we need to undo.
2324 2002-09-27 Roland McGrath <roland@redhat.com>
2326 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2328 2002-09-24 Roland McGrath <roland@redhat.com>
2330 * sysdeps/x86_64/tls.h: New file.
2332 2002-09-23 Roland McGrath <roland@redhat.com>
2334 * Examples/ex13.c (dump_mut): int -> size_t for counter.
2336 2002-09-18 Bruno Haible <bruno@clisp.org>
2338 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2339 an unexpected error code.
2341 * internals.h (__pthread_message): Add const to first parameter type.
2342 * pthread.c (__pthread_message): Likewise.
2344 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2346 2002-09-17 Roland McGrath <roland@redhat.com>
2348 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2349 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2350 offset (positive or negative) relative to the thread struct.
2351 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2353 2002-09-12 Jakub Jelinek <jakub@redhat.com>
2355 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2356 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2357 Replace /usr/lib/crt[in].o with crt[in].o too.
2359 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
2361 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2363 2002-09-04 Bruno Haible <bruno@clisp.org>
2365 * pthread.c: Include <sys/time.h>.
2366 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2367 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2368 * Makefile (distribute): Add smp.h to the list.
2370 2002-09-04 Bruno Haible <bruno@clisp.org>
2372 * sysdeps/alpha/pt-machine.h: Choose different include file location
2373 on non-Linux platforms.
2375 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2376 (open, open64): Change va_arg argument type to the integral type to
2377 which mode_t promotes.
2379 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2380 the structure of 'struct sigevent'.
2382 * errno.c (__errno_location, __h_errno_location, __res_state):
2383 Use prototype function definitions.
2385 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
2387 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2388 * sysdeps/powerpc/pt-machine.h: moved to...
2389 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2390 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2392 2002-09-02 Roland McGrath <roland@redhat.com>
2394 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2396 2002-09-01 Roland McGrath <roland@redhat.com>
2398 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2399 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2401 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2402 (__libc_internal_tsd_address): Declare it.
2403 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2404 __libc_internal_tsd_address.
2405 * specific.c (libc_internal_tsd_address): New function.
2406 (__libc_internal_tsd_address): New variable.
2407 * no-tsd.c (__libc_internal_tsd_address): New variable.
2409 2002-08-31 Ulrich Drepper <drepper@redhat.com>
2411 * Makefile: Don't use rule for crt%.o, spell it out as rules for
2414 2002-08-30 Roland McGrath <roland@redhat.com>
2416 * Makefile (extra-objs, omit-deps): Add crtn.
2417 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2418 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2419 ($(objpfx)crtn.S): New target.
2420 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2421 (generated): Add crtn.S.
2423 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2424 crtn.o pathname too.
2426 2002-08-30 Jakub Jelinek <jakub@redhat.com>
2428 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2431 2002-08-30 Roland McGrath <roland@redhat.com>
2433 * tst-static-locale.c: New file.
2434 * Makefile (tests, tests-static): Add it.
2436 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
2438 * spinlock.c (__pthread_lock): Fix spurious wakeup
2439 handling. Don't clear lowest bit of list pointer as sign the thread
2440 is still on the wait list. Don't restart after spurious wakeup
2441 with spinning to get the lock.
2442 (__pthread_unlock): Take set lowest bit into account when handling
2443 pointer to list elements.
2444 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2446 2002-08-28 Roland McGrath <roland@redhat.com>
2448 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2450 2002-08-28 Jakub Jelinek <jakub@redhat.com>
2452 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2453 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2454 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2456 2002-08-28 Ulrich Drepper <drepper@redhat.com>
2458 * sysdeps/pthread/timer_routines.c (thread_func): Change return
2459 type to void and add casts in use to avoid warnings with all gcc
2462 2002-08-08 Jakub Jelinek <jakub@redhat.com>
2464 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2466 * manager.c (__pthread_handles): Remove.
2467 * pthandles.c: New file.
2468 * pthread.c (__pthread_initialize_minimal): Initialize
2469 __pthread_handles[0] and __pthread_handles[1].
2470 * Makefile (libpthread-routines): Add pthandles (must be last).
2472 2002-08-26 Brian Youmans <3diff@gnu.org>
2474 * Examples/ex10.c: Corrected version number in Lesser GPL copying
2475 permission notice from 2 to 2.1.
2476 * Examples/ex11.c: Likewise.
2477 * Examples/ex13.c: Likewise.
2478 * Examples/ex8.c: Likewise.
2479 * Examples/ex9.c: Likewise.
2480 * barrier.c: Likewise.
2481 * events.c: Likewise.
2482 * lockfile.c: Likewise.
2483 * no-tsd.c: Likewise.
2484 * pt-machine.c: Likewise.
2485 * ptclock_gettime.c: Likewise.
2486 * ptclock_settime.c: Likewise.
2487 * rwlock.c: Likewise.
2488 * sysdeps/alpha/pspinlock.c: Likewise.
2489 * sysdeps/alpha/pt-machine.h: Likewise.
2490 * sysdeps/arm/pspinlock.c: Likewise.
2491 * sysdeps/arm/pt-machine.h: Likewise.
2492 * sysdeps/cris/pspinlock.c: Likewise.
2493 * sysdeps/cris/pt-machine.h: Likewise.
2494 * sysdeps/hppa/pspinlock.c: Likewise.
2495 * sysdeps/hppa/pt-machine.h: Likewise.
2496 * sysdeps/i386/i686/pt-machine.h: Likewise.
2497 * sysdeps/i386/pspinlock.c: Likewise.
2498 * sysdeps/i386/pt-machine.h: Likewise.
2499 * sysdeps/i386/useldt.h: Likewise.
2500 * sysdeps/ia64/pspinlock.c: Likewise.
2501 * sysdeps/ia64/pt-machine.h: Likewise.
2502 * sysdeps/m68k/pspinlock.c: Likewise.
2503 * sysdeps/m68k/pt-machine.h: Likewise.
2504 * sysdeps/mips/pspinlock.c: Likewise.
2505 * sysdeps/mips/pt-machine.h: Likewise.
2506 * sysdeps/powerpc/pspinlock.c: Likewise.
2507 * sysdeps/powerpc/pt-machine.h: Likewise.
2508 * sysdeps/pthread/bits/initspin.h: Likewise.
2509 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2510 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2511 * sysdeps/pthread/getcpuclockid.c: Likewise.
2512 * sysdeps/pthread/posix-timer.h: Likewise.
2513 * sysdeps/pthread/timer_create.c: Likewise.
2514 * sysdeps/pthread/timer_delete.c: Likewise.
2515 * sysdeps/pthread/timer_getoverr.c: Likewise.
2516 * sysdeps/pthread/timer_gettime.c: Likewise.
2517 * sysdeps/pthread/timer_routines.c: Likewise.
2518 * sysdeps/pthread/timer_settime.c: Likewise.
2519 * sysdeps/pthread/tst-timer.c: Likewise.
2520 * sysdeps/s390/pspinlock.c: Likewise.
2521 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2522 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2523 * sysdeps/sh/pspinlock.c: Likewise.
2524 * sysdeps/sh/pt-machine.h: Likewise.
2525 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2526 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2527 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2528 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2529 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2530 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2531 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2532 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2533 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2534 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2535 * tststack.c: Likewise.
2536 * unload.c: Likewise.
2537 * weaks.c: Likewise.
2538 * wrapsyscall.c: Likewise.
2540 * sysdeps/pthread/pt-initfini.c: Changed copying
2541 permission notice to Lesser GPL from Library GPL, including the
2542 references in the special exception.
2543 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2544 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2545 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2547 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2549 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2551 2002-08-26 Ulrich Drepper <drepper@redhat.com>
2553 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2554 overflow [PR libc/4244].
2556 2002-08-25 Ulrich Drepper <drepper@redhat.com>
2558 * sysdeps/pthread/timer_routines.c (thread_func): Make the
2559 compiler happy by adding a return statement which will never be
2562 * tst-context.c (main): Cast to long before casting to pointer.
2564 * Examples/ex17.c (main): Use correct format string.
2566 * Examples/ex9.c (thread): Remove incorrect return statement.
2568 2002-08-23 Ulrich Drepper <drepper@redhat.com>
2570 * pthread.c (__linuxthreads_version): New global constant.
2572 2002-08-23 Andreas Jaeger <aj@suse.de>
2574 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2575 as thread specific register.
2576 (testandset): Fix inline asm.
2577 (THREAD_GETMEM): Fix inline asm.
2579 2002-08-22 Roland McGrath <roland@redhat.com>
2581 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2583 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2584 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2585 macro. That chooses whether to reuse %gs value or let kernel set it.
2586 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2587 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2590 2002-08-21 Ulrich Drepper <drepper@redhat.com>
2592 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2593 also to the third definition of this macro.
2595 2002-06-17 Andreas Jaeger <aj@suse.de>
2597 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2600 2002-08-20 Ulrich Drepper <drepper@redhat.com>
2602 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2603 loading/reading segment registers. Some old hardware doesn't
2604 handle the 32-bit instructions as expected.
2605 * sysdeps/i386/tls.h: Likewise.
2607 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2608 renamed to secondcall and use is negated.
2609 (TLS_SETUP_GS_SEGMENT): Likewise.
2610 (TLS_INIT_TP): Likewise.
2611 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2614 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2615 registers. No need to mask upper 16 bits in this case.
2616 * sysdeps/i386/useldt.h: Likewise.
2617 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2618 is the same since the GDT content changed.
2620 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2621 to TLS_SETUP_GS_SEGMENT.
2622 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2623 TLS_DO_SET_THREAD_AREA.
2624 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2625 entry number from %gs value.
2626 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2629 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2630 Pass true to _dl_deallocate_tls.
2631 (pthread_free): Likewise.
2632 * pthread.c (__pthread_initialize_manager): Likewise.
2634 2002-08-19 Ulrich Drepper <drepper@redhat.com>
2636 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2637 computing index from %gs value.
2639 2002-08-16 Roland McGrath <roland@redhat.com>
2641 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2642 register value from entry number properly.
2644 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2645 optimally conditional on [__PIC__].
2646 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2647 without touching errno, and use latest modify_ldt-like interface.
2648 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2649 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2650 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2651 existing %gs value as the segment to set.
2652 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
2653 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2654 by the first thread's early TLS setup.
2656 2002-08-15 Roland McGrath <roland@redhat.com>
2658 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2659 return a value as callers now expect.
2661 2002-08-11 Roland McGrath <roland@redhat.com>
2663 * pthread.c (__pthread_initialize_manager): Initialize
2664 p_header.data.tcb field of manager thread's descriptor.
2665 (__pthread_initialize_minimal): Don't initialize p_header.data.self
2666 field, already done by TLS_INIT_TP.
2668 * manager.c (pthread_handle_create): Move p_header field initializers
2671 2002-08-08 Ulrich Drepper <drepper@redhat.com>
2673 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2675 2002-08-07 Ulrich Drepper <drepper@redhat.com>
2677 * pthread.c (__linuxthreads_initial_report_events): New variable.
2678 (__pthread_initialize_manager): Use it to initialize p_report_events
2680 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2682 2002-08-07 Roland McGrath <roland@redhat.com>
2684 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2685 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2687 2002-08-02 Roland McGrath <roland@redhat.com>
2689 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2690 Add _LIBC_TSD_KEY_LOCALE.
2691 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2692 Call __uselocale to initialize our per-thread locale pointer to
2694 * pthread.c (__pthread_initialize_minimal): Likewise.
2696 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2698 2002-08-02 Ulrich Drepper <drepper@redhat.com>
2700 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2703 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2704 Don't use p_libc_specific element in thread descriptor.
2706 2002-07-30 Roland McGrath <roland@redhat.com>
2708 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2709 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2710 which does the right thing when __thread support is available.
2711 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2712 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2713 `p_h_errno', `p_resp', and `p_res' members.
2714 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2715 Don't initialize `p_errnop' and `p_h_errnop' members.
2716 (__pthread_reset_main_thread): Likewise.
2717 (__pthread_initialize_manager): Likewise.
2718 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2719 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2720 Don't initialize `p_resp' member.
2721 (__pthread_reset_main_thread): Likewise.
2722 * manager.c (pthread_handle_create): Likewise.
2723 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2724 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2725 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2726 * errno.c [USE_TLS && HAVE___THREAD]
2727 (__h_errno_location, __res_state): Don't define these at all.
2729 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2730 (INSTALL_NEW_DTV, GET_DTV): Likewise.
2731 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2733 * weaks.c: Don't include <errno.h> here.
2735 2002-08-01 Roland McGrath <roland@redhat.com>
2737 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2739 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2740 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2741 (TLS_INIT_TP): Use that.
2743 2002-08-02 Jakub Jelinek <jakub@redhat.com>
2745 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2746 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2747 (FREE_THREAD): Avoid modify_ldt if using GDT.
2748 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2750 2002-07-25 Jakub Jelinek <jakub@redhat.com>
2752 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2753 * sysdeps/i386/pt-machine.h: Likewise.
2754 * sysdeps/i386/useldt.h: Likewise.
2756 2002-07-22 Ulrich Drepper <drepper@redhat.com>
2758 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2759 call __libc_setup_tls first.
2760 * Makefile: Actually create tst-signal.out file when running the test.
2761 (tests): Add tststatic.
2762 * Examples/tststatic.c: New file.
2764 2002-07-19 Ulrich Drepper <drepper@redhat.com>
2766 * errno.c (__errno_location): Don't define unless !USE_TLS
2768 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2769 * sysdeps/i386/tls.h: Likewise.
2770 * sysdeps/i386/useldt.h: Likewise.
2771 * sysdeps/i386/i686/pt-machine.h: Likewise.
2773 2002-07-02 H.J. Lu <hjl@gnu.org>
2775 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
2777 * sysdeps/mips/pt-machine.h: Likewise.
2779 2002-07-14 Ulrich Drepper <drepper@redhat.com>
2781 * manager.c (pthread_handle_create): Initialize self-reference in
2784 2002-07-01 Jakub Jelinek <jakub@redhat.com>
2786 * Examples/ex9.c (main): Remove unused th variable.
2788 2002-07-10 Ulrich Drepper <drepper@redhat.com>
2790 * wrapsyscall.c: Add __nanosleep alias.
2791 * Versions (GLIBC_2.2.6): Add __nanosleep.
2792 * bug-sleep.c: New file.
2793 * Makefile (tests): Add bug-sleep.
2795 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
2797 * Examples/ex9.c (main): Use list of children and join them.
2798 (thread): Do not call exit.
2800 2002-06-20 Ulrich Drepper <drepper@redhat.com>
2802 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2803 Unconditionally use the code using spinlock. Use __pthread_release
2805 (wait_node_free): Likewise.
2806 (__pthread_acquire, __pthread_release): Unconditionally define.
2808 2002-06-07 Jakub Jelinek <jakub@redhat.com>
2810 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2812 2002-05-24 Ulrich Drepper <drepper@redhat.com>
2814 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2816 2002-05-21 Ulrich Drepper <drepper@redhat.com>
2818 * sysdeps/pthread/pthread.h (pthread_create): Rename first
2820 (pthread_cancel): Likewise.
2821 * internals.h (__pthread_create_2_1): Likewise.
2822 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2824 2002-05-20 Ulrich Drepper <drepper@redhat.com>
2826 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2827 Patch by Glen Nakamura <gen@flex.com>.
2829 2002-05-03 Ulrich Drepper <drepper@redhat.com>
2831 * signals.c: Move sighandler functions to...
2832 * sighandler.c: ...here. New file.
2833 * signals.c: Move signal handler related type definitions to...
2834 * internals.h: ...here. Add prototypes for signal handlers.
2835 * Makefile (libpthread-routines): Add sighandler.
2836 (CFLAGS-sighandler.c): Add $(exceptions).
2838 2002-04-30 Jakub Jelinek <jakub@redhat.com>
2840 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2842 2002-04-08 Ulrich Drepper <drepper@redhat.com>
2844 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2845 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2846 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2847 based on previous one and not on current time. Count overruns.
2848 Patch by Eric F. Sorton <eric@cctcorp.com>.
2850 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2852 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2854 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2855 if it isn't defined yet.
2856 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2857 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2859 * sysdeps/sh/tls.h: New file.
2861 2002-04-08 Jakub Jelinek <jakub@redhat.com>
2863 * manager.c (__pthread_manager_event): Use self instead of arg
2864 for INIT_THREAD_SELF.
2865 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2866 _pthread_descr_struct) instead of sizeof (*descr).
2868 2002-04-05 Ulrich Drepper <drepper@redhat.com>
2870 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2871 * sysdeps/alpha/pt-machine.h: Likewise.
2872 * sysdeps/arm/pt-machine.h: Likewise.
2873 * sysdeps/cris/pt-machine.h: Likewise.
2874 * sysdeps/hppa/pt-machine.h: Likewise.
2875 * sysdeps/m68k/pt-machine.h: Likewise.
2876 * sysdeps/mips/pt-machine.h: Likewise.
2877 * sysdeps/powerpc/pt-machine.h: Likewise.
2878 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2879 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2880 * sysdeps/sh/pt-machine.h: Likewise.
2881 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2882 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2883 * sysdeps/x86_64/pt-machine.h: Likewise.
2885 2002-04-05 Jakub Jelinek <jakub@redhat.com>
2887 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2888 instead of pthread_mutexattr_setkind_np.
2889 (pthread_mutexattr_gettype): Similarly.
2890 * man/pthread_mutexattr_setkind_np.man: New.
2891 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2893 2002-04-02 Ulrich Drepper <drepper@redhat.com>
2895 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2897 2002-03-22 Jakub Jelinek <jakub@redhat.com>
2899 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2901 2002-03-22 Ulrich Drepper <drepper@redhat.com>
2903 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2905 2002-03-17 Andreas Jaeger <aj@suse.de>
2907 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2909 * sysdeps/alpha/pt-machine.h: Likewise.
2910 * sysdeps/arm/pt-machine.h: Likewise.
2911 * sysdeps/cris/pt-machine.h: Likewise.
2912 * sysdeps/hppa/pt-machine.h: Likewise.
2913 * sysdeps/i386/i686/pt-machine.h: Likewise.
2914 * sysdeps/ia64/pt-machine.h: Likewise.
2915 * sysdeps/m68k/pt-machine.h: Likewise.
2916 * sysdeps/mips/pt-machine.h: Likewise.
2917 * sysdeps/powerpc/pt-machine.h: Likewise.
2918 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2919 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2920 * sysdeps/sh/pt-machine.h: Likewise.
2921 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2922 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2923 * sysdeps/x86_64/pt-machine.h: Likewise.
2925 * internals.h: Move testandset and __compare_and_swap prototypes
2928 2002-03-03 Andreas Jaeger <aj@suse.de>
2930 * errno.c: Include resolv.h to avoid warning.
2932 2002-02-27 Ulrich Drepper <drepper@redhat.com>
2934 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2937 2002-02-23 Ulrich Drepper <drepper@redhat.com>
2939 * attr.c (pthread_getattr_np): Don't take thread descriptor size
2940 into account if USE_TLS.
2941 * manager.c (pthread_handle_create): Free TLS data structures if call
2942 failed. Pass correct stack to clone if USE_TLS.
2943 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2944 * sysdeps/i386/i686/pt-machine.h: Likewise.
2945 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2947 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2948 Add p_stackaddr element #if USE_TLS.
2949 * internals.c: Include <tls.h>.
2950 * manager.c: Integrate creating and handling of thread descriptor
2952 * pthread.c: Likewise.
2953 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2954 Include <linuxthreads/descr.h> only if TLS is really used.
2955 (GET_DTV): New macro.
2956 (TLS_INIT_TP): Initialize self pointer.
2958 2002-02-17 Andreas Schwab <schwab@suse.de>
2960 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2963 2002-02-12 Ulrich Drepper <drepper@redhat.com>
2965 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2966 (INSTALL_DTV): Adjust for being passed pointer to element with length.
2968 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2970 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2972 2002-02-08 Richard Henderson <rth@redhat.com>
2974 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2976 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2978 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2981 2002-02-07 H.J. Lu <hjl@gnu.org>
2983 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2985 (__pthread_spin_lock): Remove ".set noreorder".
2986 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2988 2002-02-05 H.J. Lu <hjl@gnu.org>
2990 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2992 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2993 (__compare_and_swap): Likewise.
2995 2002-02-07 Ulrich Drepper <drepper@redhat.com>
2997 * internals.h: Move declarations/definitions of
2998 __pthread_initial_thread_bos, __pthread_initial_thread,
2999 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
3000 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
3001 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
3003 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
3004 Define THREAD_GETMEM accordingly.
3006 2002-02-06 Ulrich Drepper <drepper@redhat.com>
3008 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
3010 * sysdeps/i386/tls.h: Define THREAD_DTV.
3012 2002-02-04 Ulrich Drepper <drepper@redhat.com>
3014 * internals.h: Move thread descriptor definition...
3015 * descr.h.: ...here. New file.
3016 * sysdeps/i386/tls.h: New file.
3018 2002-02-01 H.J. Lu <hjl@gnu.org>
3020 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
3021 different register in the delayed slot. Use branch likely.
3023 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
3024 (__compare_and_swap): Return 0 only when failed to compare. Use
3027 2002-02-01 Jakub Jelinek <jakub@redhat.com>
3029 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
3030 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
3031 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
3032 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
3033 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
3034 * sysdeps/sparc/sparc64/Versions: New file.
3035 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
3037 2002-01-31 Ulrich Drepper <drepper@redhat.com>
3039 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
3040 in SHARED code, use GL(dl_cpuclock_offset).
3042 2002-01-28 Andreas Jaeger <aj@suse.de>
3044 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
3045 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
3047 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
3049 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
3050 (CURRENT_STACK_FRAME): Remove duplicate definition.
3051 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3053 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
3055 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
3058 2002-01-12 Andreas Schwab <schwab@suse.de>
3060 * Makefile (test-srcs): Add tst-signal.
3061 (tests): Run tst-signal.
3062 (distribute): Add tst-signal.sh.
3063 * tst-signal.c, tst-signal.sh: New files.
3065 2002-01-14 Andreas Jaeger <aj@suse.de>
3067 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
3069 2002-01-11 Andreas Schwab <schwab@suse.de>
3071 * signals.c (sighandler): Initialize all elements to SIG_ERR.
3072 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
3074 2002-01-06 Richard Henderson <rth@redhat.com>
3076 * sysdeps/alpha/elf/pt-initfini.c: New file.
3078 2001-12-29 Andreas Jaeger <aj@suse.de>
3080 * Examples/ex9.c: Add noreturn attribute for thread.
3081 * Examples/ex10.c: Likewise.
3082 * Examples/ex13.c (thread_start): Likewise.
3083 * Examples/ex15.c (worker): Likewise.
3085 * Examples/ex18.c: Include unistd.h for prototype of sleep.
3087 2001-12-14 Ulrich Drepper <drepper@redhat.com>
3089 * man/pthread_atfork.man: Adjust description of mutex handling
3090 after fork for current implementation.
3091 * linuxthreads.texi: Likewise [PR libc/2519].
3093 2001-12-13 Andreas Schwab <schwab@suse.de>
3095 * specific.c (pthread_key_delete): Don't contact the thread
3096 manager if no threads have been created yet.
3098 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
3100 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3101 qualifier to be safe.
3103 2001-11-30 Andreas Schwab <schwab@suse.de>
3105 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3106 that self is the manager thread, and initialize the thread
3108 (thread_self_stack) [THREAD_SELF]: New function to find self via
3110 * manager.c (pthread_handle_create): Don't block cancel signal any
3113 2001-11-29 Andreas Jaeger <aj@suse.de>
3115 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3117 (INIT_THREAD_SELF): New.
3118 (THREAD_GETMEM): New.
3120 (THREAD_SETMEM): New.
3121 (THREAD_SETMEM_NC): New.
3122 (FLOATING_STACKS): Define.
3123 (ARCH_STACK_MAX_SIZE): Define.
3125 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
3127 Bugfix to pthread_key_delete. It was iterating over the thread
3128 manager's linked list of threads, behind the thread manager's
3129 back causing a race. The fix is to have the manager iterate over
3130 the threads instead, using a new request type for doing so.
3131 * internals.h (struct pthread_request): New manager request type
3132 REQ_FOR_EACH_THREAD.
3133 * manager.c (pthread_for_each_thread): New function.
3134 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3135 * specific.c (struct pthread_key_delete_helper_args): New type.
3136 (pthread_key_delete_helper): New static function.
3137 (pthread_key_delete): Use the new thread manager
3138 REQ_FOR_EACH_THREAD function to iterate over the threads and set
3139 the delete key slot to a null value in each thread.
3140 * Examples/ex18.c: New test.
3141 * Makefile (tests): Add ex18.
3143 2001-11-22 Wolfram Gloger <wg@malloc.de>
3145 * pthread.c (pthread_onexit_process): Don't call free
3146 after threads have been asynchronously terminated.
3148 * manager.c (pthread_handle_exit): Surround cancellation
3149 of threads with __flockfilelist()/__funlockfilelist().
3151 2001-11-26 Andreas Schwab <schwab@suse.de>
3153 * manager.c (pthread_handle_create): Start the child thread with
3154 the cancel signal blocked, so that it does not handle it before
3155 the thread register is set up. Save errno from failed clone call.
3157 2001-11-15 Ulrich Drepper <drepper@redhat.com>
3159 * sysdeps/i386/i686/Implies: Removed.
3160 * sysdeps/i386/i686/Versions: New file.
3162 2001-10-31 Andreas Jaeger <aj@suse.de>
3164 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3166 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
3168 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3169 to __linuxthreads_pthread_sizeof_descr to match name used by
3170 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3171 linuxthreads_db/td_symbol_list.c.
3173 2001-09-22 Andreas Jaeger <aj@suse.de>
3175 * linuxthreads/tst-context.c: Avoid compile warning.
3177 2001-09-20 Andreas Jaeger <aj@suse.de>
3179 * shlib-versions: Add x86-64.
3181 2001-09-19 Andreas Jaeger <aj@suse.de>
3183 * sysdeps/x86_64/Makefile: New file.
3184 * sysdeps/x86_64/pspinlock.c: New file.
3185 * sysdeps/x86_64/pt-machine.h: New file.
3187 2001-09-12 Jakub Jelinek <jakub@redhat.com>
3189 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3191 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3193 2001-09-11 Ulrich Drepper <drepper@redhat.com>
3194 Wolfram Gloger <wg@malloc.de>
3196 * join.c: Protect all communications from and to manager with
3198 * manager.c: Likewise.
3199 * pthread.c: Likewise.
3200 * smeaphore.c: Likewise.
3202 2001-08-29 Ulrich Drepper <drepper@redhat.com>
3204 * spinlock.c (__pthread_lock): Top max_count value with
3205 MAX_ADAPTIVE_SPIN_COUNT.
3206 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3208 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3211 2001-08-27 Jakub Jelinek <jakub@redhat.com>
3213 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3214 non-opaque type if __USE_UNIX98.
3216 2001-08-26 Jakub Jelinek <jakub@redhat.com>
3218 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3219 non-opaque lock types also if _IO_MTSAFE_IO is defined.
3221 2001-08-23 Roland McGrath <roland@frob.com>
3223 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3224 new first argument, skip the cleanup handler if it's zero.
3225 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3226 (__libc_lock_define_initialized_recursive): Use it.
3227 * sysdeps/pthread/bits/stdio-lock.h: File removed.
3228 The sysdeps/generic file from the main tree now suffices.
3230 2001-08-22 Roland McGrath <roland@frob.com>
3232 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3233 instead of <pthread.h>.
3234 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3235 (_IO_lock_initializer): Add braces.
3236 (_IO_lock_lock): Use __libc_lock_lock_recursive.
3237 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3239 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3240 (__libc_lock_define_initialized_recursive): Use it.
3241 (__libc_lock_init_recursive): Likewise.
3242 (__libc_lock_fini_recursive): Likewise.
3243 (__libc_lock_lock_recursive): Likewise.
3244 (__libc_lock_trylock_recursive): Likewise.
3245 (__libc_lock_unlock_recursive): Likewise.
3246 (__libc_lock_define_recursive): New macro.
3248 2001-08-14 Jakub Jelinek <jakub@redhat.com>
3250 * lockfile.c (__pthread_provide_lockfile): New variable.
3251 * pthread.c (__pthread_require_lockfile): New variable.
3252 * cancel.c (__pthread_require_lockfile): New variable.
3254 2001-07-31 Ulrich Drepper <drepper@redhat.com>
3256 * tst-context.c (threadfct): Initialize context before calling
3259 * Examples/ex17.c: Make sure test thread is around long enough.
3261 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
3263 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3265 2001-07-24 Ulrich Drepper <drepper@redhat.com>
3267 * tst-context.c (main): Print explanation before bailing out
3268 because context handling is not supported.
3270 2001-07-23 Ulrich Drepper <drepper@redhat.com>
3272 * Makefile (tests): Add tst-context.
3273 * tst-context.c: New file.
3275 * sysdeps/pthread/bits/stdio-lock.h: Define
3276 _IO_cleanup_region_start_noarg.
3278 2001-07-23 Jakub Jelinek <jakub@redhat.com>
3280 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3281 (ARCH_STACK_MAX_SIZE): Define.
3282 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3283 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3285 2001-07-19 Jakub Jelinek <jakub@redhat.com>
3287 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3289 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3290 (ARCH_STACK_MAX_SIZE): Define.
3291 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3292 NEED_SEPARATE_REGISTER_STACK.
3294 2001-07-16 Andreas Schwab <schwab@suse.de>
3296 * Makefile (before-compile): Don't add $(objpfx)crti.o.
3297 (omit-deps): Add crti.
3298 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3299 it is filtered out of the link command.
3301 2001-07-16 Ulrich Drepper <drepper@redhat.com>
3303 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3304 to find the right value for __pthread_initial_thread_bos, it's not
3305 used. If not FLOATING_STACKS first run
3306 __pthread_init_max_stacksize.
3308 2001-06-16 H.J. Lu <hjl@gnu.org>
3310 * internals.h: Include <stackinfo.h>.
3312 * attr.c: Don't include <stackinfo.h> here.
3313 * cancel.c: Likewise.
3314 * manager.c: Likewise.
3315 * pthread.c: Likewise.
3316 * ptlongjmp.c: Likewise.
3318 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
3320 * attr.c: Make _STACK_GROWS_UP work.
3321 * internals.h: Likewise.
3322 * manager.c: Likewise.
3323 * pthread.c: Likewise.
3325 2001-06-15 H.J. Lu <hjl@gnu.org>
3327 * pthread.c (__pthread_reset_main_thread): Fix a typo.
3329 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
3331 * semaphore.h: Use struct _pthread_fastlock as an element of
3332 sem_t instead of an identical struct.
3333 * rwlock.c: Remove casts.
3334 * semaphore.c: Likewise.
3336 2001-04-30 Alan Modra <amodra@one.net.au>
3338 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3340 2001-05-25 Bruce Mitchener <bruce@cubik.org>
3342 * linuxthreads.texi: Spelling corrections.
3344 2001-05-25 Ulrich Drepper <drepper@redhat.com>
3346 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3347 returning successfully.
3348 Patch by Gene Cooperman <gene@ccs.neu.edu>.
3350 2001-05-24 Ulrich Drepper <drepper@redhat.com>
3352 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3353 serious work try once whether the lock is uncontested.
3354 Remove duplicate reading of __status before loop.
3355 Change suggested by Hans Boehm <hans_boehm@hp.com>.
3357 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3358 (__pthread_alt_trylock): Likewise.
3360 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
3362 Memory barrier overhaul following line by line inspection.
3363 * mutex.c (pthread_once): Missing memory barriers added.
3364 * pthread.c (__pthread_wait_for_restart_signal,
3365 __pthread_timedsuspend_new, __pthread_restart_new): Added
3366 memory barriers ``just in case'' and for documentary value.
3367 * spinlock.c (__pthread_release): New inline function for releasing
3368 spinlock, to complement __pthread_acquire. Includes memory
3369 barrier prior to assignment to spinlock, and __asm __volatile
3370 dance to prevent reordering or optimization of the spinlock access.
3371 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3372 __pthread_alt_timedlock, __pthread_alt_unlock,
3373 __pthread_compare_and_swap): Updated to use new __pthread_release
3374 instead of updating spinlock directly.
3375 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3376 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3377 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3378 Memory barrier overhaul. Lots of missing memory barriers added,
3379 a couple needless ones removed.
3380 * spinlock.c (__pthread_compare_and_swap): testandset optimization
3381 removed, just calls __pthread_acquire, which has the new read
3382 barrier in it before its testandset.
3384 2001-05-20 Roland McGrath <roland@frob.com>
3386 * Makeconfig: New file, variables used to be in main libc Makeconfig.
3388 2001-05-09 Geoff Keating <geoffk@redhat.com>
3390 * sysdeps/powerpc/pt-machine.h
3391 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3392 (__compare_and_swap): Remove memory barriers.
3393 (__compare_and_swap_with_release_semantics): New function.
3395 2001-04-24 Andreas Jaeger <aj@suse.de>
3397 * wrapsyscall.c: send* and recv* return ssize_t.
3399 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3400 mutex instead of double locking it.
3401 Reported by Pierre Artaud <partaud@sodatec.com>.
3403 2001-04-23 Ulrich Drepper <drepper@redhat.com>
3405 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3406 using #ifdef whether the clock is available.
3407 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3409 * sysdeps/ia64/Versions: New file.
3411 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3412 have to call __gmon_start__ in the libpthread DSO.
3413 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3415 * Makefile (libpthread-routines): Add ptclock_gettime and
3417 * internals.h: Don't use cpuclock-init.h definitions, use
3418 hp-timing.h definitions.
3419 * pthread.c: Likewise.
3420 * manager.c: Likewise.
3421 * ptclock_gettime.c: New file.
3422 * ptclock_settime.c: New file.
3423 * internals.h: Fix parameter type for __pthread_clock_gettime and
3424 __pthread_clock_settime.
3426 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3427 * sysdeps/i386/i586/ptclock_settime.c: Removed.
3428 * sysdeps/i386/i586/Makefile: Removed.
3430 2001-04-22 Ulrich Drepper <drepper@redhat.com>
3432 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3433 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3435 2001-04-21 Andreas Jaeger <aj@suse.de>
3437 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3438 attribute, remove statements that will never be executed.
3439 (thread_func): Remove mutex_unlock call since it's never executed.
3440 (thread_func): Fix comment as suggested by Jakub Jelinek.
3442 * manager.c (__pthread_manager): Add noreturn
3444 (pthread_start_thread): Likewise, remove return statement.
3445 (pthread_start_thread_event): Likewise.
3446 Add noreturn attribute for pthread_handle_exit.
3447 * weaks.c: Add noreturn attribute for pthread_exit.
3449 * internals.h: Add __pthread_clock_gettime and
3450 __pthread_clock_settime prototypes.
3452 2001-04-21 Ulrich Drepper <drepper@redhat.com>
3454 * internals.h: Include <cpuclock-init.h>.
3455 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3456 CPUCLOCK_VARDEF is defined.
3457 * pthread.c (__pthread_initialize_minimal): Initialize
3458 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3459 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3460 for new thread to current CPU clock value.
3462 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3464 * sysdeps/i386/i586/Makefile: New file.
3465 * sysdeps/i386/i586/Versions: New file.
3466 * sysdeps/i386/i586/ptclock_gettime.c: New file.
3467 * sysdeps/i386/i586/ptclock_settime.c: New file.
3468 * sysdeps/i386/i686/Implies: New file.
3470 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3472 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3473 $generated, not $postclean-generated.
3475 2001-04-18 Andreas Jaeger <aj@suse.de>
3477 * Makefile (otherlibs): Added.
3479 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3481 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3483 2001-04-16 Ulrich Drepper <drepper@redhat.com>
3485 * signals.c (sigwait): NSIG is no signal number. Block all
3486 signals while in signal handler for signals in SET.
3487 Patch by Manfred Spraul <manfred@colorfullife.com>.
3489 2001-04-12 Ulrich Drepper <drepper@redhat.com>
3491 * tst-cancel.c: Disable most tests. Add new test where all
3492 cleanup handlers must run.
3493 * Makefile (tests): Add tst-cancel again.
3495 * cancel.c (__pthread_perform_cleanup): Correct condition for
3496 leaving cleanup loop early.
3498 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3499 all the files which use CURRENT_STACK_FRAME.
3500 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3501 __builtin_frame_address.
3502 * sysdeps/i386/i686/pt-machine.h: Likewise.
3504 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3506 * Makefile (tests): Comment out tst-cancel for now.
3508 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
3509 temporary file in object directory.
3510 * Makefile: Don't allow inlining when compiling tst-cancel.c.
3511 Pass $(objpfx) to tst-cancel.
3513 2001-04-11 David S. Miller <davem@redhat.com>
3515 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3516 up closer to user local variables so that new cleanup heuristics work.
3517 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3519 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3521 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3523 (_pthread_cleanup_push_defer): Likewise.
3525 * tst-cancel.c (main): Fix loop printing cleanup output.
3527 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
3529 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3531 (__pthread_spin_trylock): Likewise.
3532 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3534 2001-04-10 Ulrich Drepper <drepper@redhat.com>
3536 * join.c (pthread_exit): Move code to new function __pthread_do_exit
3537 which takes an extra parameter with the current frame pointer.
3538 Call new function with CURRENT_STACK_FRAME.
3539 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
3540 with the new parameter.
3541 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3542 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
3543 this parameter as the initial value the cleanup handler records are
3544 compared against. No active cleanup handler record must have an
3545 address lower than the previous one and the initial record must be
3546 above (below on PA) the frame address passed in.
3547 (pthread_setcancelstate): Call __pthread_do_exit instead of
3549 (pthread_setcanceltype): Likewise.
3550 (pthread_testcancel): Likewise.
3551 (_pthread_cleanup_pop_restore): Likewise.
3552 * condvar.c (pthread_cond_wait): Likewise.
3553 (pthread_cond_timedwait_relative): Likewise.
3554 * manager.c (pthread_start_thread): Likewise.
3555 * oldsemaphore.c (__old_sem_wait): Likewise.
3556 * pthread.c (pthread_handle_sigcancel): Likewise.
3557 * semaphore.c (__new_sem_wait): Likewise.
3558 (sem_timedwait): Likewise.
3559 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3560 to limit the cleanup handlers which get run.
3561 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
3562 for __pthread_perform_cleanup.
3564 * Makefile (tests): Add tst-cancel.
3565 * tst-cancel.c: New file.
3567 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
3569 * sysdeps/cris/pt-machine.h: New file.
3570 * sysdeps/cris/pspinlock.c: New file.
3572 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3574 * shlib-versions: Add case for Linux on CRIS.
3576 2001-03-26 Ulrich Drepper <drepper@redhat.com>
3578 * attr.c (pthread_getattr_np): Correct computation of stack size
3579 for machiens with register stack.
3581 * Examples/ex17.c (main): Correct detection of failed mmap call.
3583 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3585 * pthread.c (__pthread_initialize_manager): Fix a typo.
3587 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3589 * attr.c (__pthread_attr_setstack): Fix alignment check.
3590 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3591 * Makefile (tests): Add ex17 test.
3592 * Examples/ex17.c: New test.
3594 2001-03-20 Ulrich Drepper <drepper@redhat.com>
3596 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3597 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3598 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3600 2001-03-18 Ulrich Drepper <drepper@redhat.com>
3602 * Makefile: When generating DSO link with libc_nonshared.a.
3604 2001-02-26 Jakub Jelinek <jakub@redhat.com>
3606 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3608 2001-02-23 Jakub Jelinek <jakub@redhat.com>
3610 * internals.h (__pthread_init_max_stacksize): New prototype.
3611 * attr.c (__pthread_attr_setstacksize): Call
3612 __pthread_init_max_stacksize if not yet initialized.
3613 * pthread.c (__pthread_init_max_stacksize): New function.
3614 (__pthread_initialize_manager): Call it.
3615 Patch by <dtc@cmucl.cons.org>.
3617 2001-03-16 Ulrich Drepper <drepper@redhat.com>
3619 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3621 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3623 * shlib-versions: Add rule for Linux on 64 bit S/390.
3624 * sysdeps/s390/s390-64/pt-machine.h: New file.
3625 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3627 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3629 * sysdeps/s390/pt-machine.h: Move to...
3630 * sysdeps/s390/s390-32/pt-machine.h: ...here.
3631 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3633 2001-03-15 Ulrich Drepper <drepper@redhat.com>
3635 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3636 * attr.c: Implement pthread_getattr_np.
3637 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3638 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3639 * manager.c (pthread_handle_create): Initialize p_inheritsched.
3641 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3643 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3646 2001-02-20 Hans Boehm <hans_boehm@hp.com>
3648 * manager.c (manager_mask): Removed static vesion. Now always local
3649 to __pthread_manager().
3650 (manager_mask_all): Removed completely.
3651 (__pthread_manager): Remove manager_mask_all initialization.
3652 (pthread_handle_create): Remove code to set and reset signal mask
3653 around __clone2() calls.
3655 2001-02-17 Jakub Jelinek <jakub@redhat.com>
3657 * spinlock.c (__pthread_lock): Force lock->__status to be read from
3658 memory on every spin.
3660 2001-02-10 Andreas Jaeger <aj@suse.de>
3662 * Makefile (extra-objs): New.
3664 2001-02-09 Jakub Jelinek <jakub@redhat.com>
3666 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3667 __pthread_initialize_minimal prototype.
3669 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
3671 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3673 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
3675 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3677 2001-02-06 Ulrich Drepper <drepper@redhat.com>
3679 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3680 broken code. Patch by Jes Sorensen.
3682 2001-02-06 Andreas Jaeger <aj@suse.de>
3684 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3686 * internals.h: ...here.
3688 2001-02-05 Jes Sorensen <jes@linuxcare.com>
3690 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3692 2001-02-02 Ulrich Drepper <drepper@redhat.com>
3694 * Versions: Remove __pthread_initialize_minimal.
3696 2001-02-01 Ulrich Drepper <drepper@redhat.com>
3698 * Makefile: Add rules to build crti.o and make it being used in
3699 building libpthread.so.
3700 * sysdeps/i386/Makefile: New file.
3701 * sysdeps/pthread/pt-initfini.c: New file.
3703 * pthread.c: Cleanups.
3705 2001-01-28 Andreas Jaeger <aj@suse.de>
3707 * oldsemaphore.c (__old_sem_init): Adjust for last change.
3708 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3709 * spinlock.c: Likewise.
3711 2001-01-28 Ulrich Drepper <drepper@redhat.com>
3713 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3714 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3715 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3716 * pthread.c: Likewise.
3717 * spinlock.h: Likewise.
3718 * sysdeps/pthread/pthread.h: Likewise.
3720 2001-01-26 Ulrich Drepper <drepper@redhat.com>
3722 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3723 as struct __pthread_attr_s.
3725 * semaphore.h (sem_t): Cleanup namespace, rename status and
3728 2001-01-13 Jakub Jelinek <jakub@redhat.com>
3730 * pthread.c (pthread_onexit_process): Clear
3731 __pthread_manager_thread_bos after freeing it.
3732 * Makefile (tests): Add ex16.
3733 * Examples/ex16.c: New file.
3735 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3737 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3739 * pthread.c (pthread_exit_process): Rename to...
3740 (pthread_onexit_process): ...this.
3741 (pthread_atexit_process, pthread_atexit_retcode): New.
3742 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3743 and only if HAVE_Z_NODELETE is not defined.
3744 (__pthread_initialize_manager): Register pthread_atexit_retcode
3747 2001-01-11 Ulrich Drepper <drepper@redhat.com>
3749 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3751 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3753 * Makefile (tests): Add ex15.
3754 * Examples/ex15.c: New test.
3756 2001-01-08 Ulrich Drepper <drepper@redhat.com>
3758 * pthread.c (pthread_exit_process): Free memory allocated for
3761 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3763 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3764 (pthread_free): Always unmap the stack. It's safe now that we don't
3765 use MAP_FIXED to allocate stacks.
3767 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3769 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3771 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3773 2000-11-15 Wolfram Gloger <wg@malloc.de>
3775 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3776 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3778 2000-12-27 Andreas Jaeger <aj@suse.de>
3780 * Examples/ex13.c: Make local functions static.
3781 * ecmutex.c: Likewise.
3782 * joinrace.c: Likewise.
3783 * Examples/ex14.c: Likewise.
3785 * Examples/ex2.c: Make local functions static; reformat.
3786 * Examples/ex1.c: Likewise.
3787 * Examples/ex4.c: Likewise.
3788 * Examples/ex5.c: Likewise.
3789 * Examples/ex7.c: Likewise.
3791 * oldsemaphore.c: Add prototypes to shut up GCC.
3792 * pt-machine.c: Likewise.
3794 * weaks.c: Add prototype for pthread_exit.
3796 * internals.h: Add some prototypes, format prototypes and add
3798 Move __libc_waitpid prototype to include/sys/wait.h.
3800 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3801 * mutex.c: Likewise.
3802 * specific.c: Likewise.
3803 * ptfork.c: Likewise.
3805 * lockfile.c: Include internals.h to get prototypes.
3806 * events.c: Likewise.
3807 * sysdeps/alpha/pspinlock.c: Likewise.
3808 * sysdeps/arm/pspinlock.c: Likewise.
3809 * sysdeps/hppa/pspinlock.c: Likewise.
3810 * sysdeps/i386/pspinlock.c: Likewise.
3811 * sysdeps/ia64/pspinlock.c: Likewise.
3812 * sysdeps/m68k/pspinlock.c: Likewise.
3813 * sysdeps/mips/pspinlock.c: Likewise.
3814 * sysdeps/powerpc/pspinlock.c: Likewise.
3815 * sysdeps/s390/pspinlock.c: Likewise.
3816 * sysdeps/sh/pspinlock.c: Likewise.
3817 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3818 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3819 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3821 2000-12-27 Ulrich Drepper <drepper@redhat.com>
3823 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3824 (__pthread_attr_getstack): Return correct address.
3825 Add warnings for using pthread_attr_getstackaddr and
3826 pthread_attr_setstackaddr.
3828 2000-12-26 Ulrich Drepper <drepper@redhat.com>
3830 * Examples/ex6.c (test_thread): Make static.
3831 * Examples/ex12.c (test_thread): Make static and add noreturn
3834 2000-12-18 Jes Sorensen <jes@linuxcare.com>
3836 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3837 and compare_and_swap_with_release_semantics returns int not long.
3839 2000-12-17 Andreas Jaeger <aj@suse.de>
3841 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3843 * sysdeps/arm/pt-machine.h (testandset): Likewise.
3844 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3845 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3846 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3847 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3848 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3850 2000-12-17 Ulrich Drepper <drepper@redhat.com>
3852 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3853 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3855 2000-12-17 Andreas Jaeger <aj@suse.de>
3857 * internals.h: Add prototypes for testandset and
3858 __compare_and_swap to shut up gcc warnings.
3860 2000-12-06 Wolfram Gloger <wg@malloc.de>
3862 * join.c (pthread_detach): Allow case where the thread has already
3865 2000-12-05 Andreas Jaeger <aj@suse.de>
3867 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3868 * sysdeps/mips/pt-machine.h (testandset): Likewise.
3869 (__compare_and_swap): Likewise.
3870 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3872 2000-11-20 Jakub Jelinek <jakub@redhat.com>
3874 * Examples/ex3.c (main): Cast int to long before casting to void *.
3875 (search): Cast void * to long, not int.
3876 * Examples/ex8.c (main, thread): Similarly.
3877 * Examples/ex11.c (main): Similarly.
3878 * Examples/ex14.c (worker, do_test): Similarly.
3879 * ecmutex.c (worker, do_test): Similarly.
3880 (nlocks): Cast to int.
3882 2000-11-08 Bruce Mitchener <bruce@cubik.org>
3884 * linuxthreads.texi: Add documentation for pthreads attributes
3885 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
3886 patch. Document pthread_[sg]etconcurrency(). Mark
3887 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3889 2000-11-07 Ulrich Drepper <drepper@redhat.com>
3891 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3893 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3894 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3896 2000-11-06 Ulrich Drepper <drepper@redhat.com>
3898 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3899 not doing it right now.
3900 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3902 2000-10-30 Ulrich Drepper <drepper@redhat.com>
3904 * Examples/ex4.c (main): Don't use exit() to avoid warning with
3907 2000-10-29 Ulrich Drepper <drepper@redhat.com>
3909 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3910 here. Reported by Bruce Mitchener <bruce@cubik.org>.
3912 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3913 discussing mutexes. (As per the Unix98 name for the API.)
3914 Changes documentation for pthread_mutexattr_setkind_np() and
3915 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3916 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3917 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3918 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3919 Begins to introduce discussion of the ``timed'' mutex type. This
3920 discussion is currently incomplete.
3921 Patch by Bruce Mitchener <bruce@cubik.org>.
3923 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3924 Yutaka Niibe <gniibe@chroot.org>
3926 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3927 has restrictions, use register.
3929 2000-10-23 Andreas Schwab <schwab@suse.de>
3931 * Examples/ex14.c (TIMEOUT): Override default timeout.
3933 2000-10-16 Ulrich Drepper <drepper@redhat.com>
3935 * specific.c: Protect tsd array modification in thread data
3936 structures by getting the thread lock in pthread_key_delete and
3937 __pthread_destroy_specifics.
3938 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3940 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3942 * sysdeps/pthread/bits/initspin.h: New file.
3943 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3944 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3945 (__pthread_alt_init_lock): Likewise.
3946 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3948 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3950 * oldsemaphore.c (__old_sem_init): Release lock with
3951 LT_SPINLOCK_INIT, not zero.
3952 * spinlock.c (__pthread_unlock): Likewise.
3953 (__pthread_alt_lock): Likewise.
3954 (__pthread_alt_timedlock): Likewise.
3955 (__pthread_alt_unlock): Likewise.
3956 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3957 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
3958 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
3959 LT_SPINLOCK_INIT do initialize spinlocks not 0.
3961 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3963 * shlib-versions: Add version definitions for hppa-linux.
3965 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3967 * sysdeps/hppa/pspinlock.c: New file.
3968 * sysdeps/hppa/pt-machine.h: New file.
3969 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3971 2000-10-05 Jakub Jelinek <jakub@redhat.com>
3973 * mutex.c (__pthread_mutex_destroy): Correct test of
3974 busy mutex for mutexes using alternate fastlocks.
3975 Patch by dtc@cmucl.cons.org.
3977 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
3979 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3981 2000-09-28 Ulrich Drepper <drepper@redhat.com>
3983 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3984 test for owner first.
3985 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3987 * cancel.c (pthread_cancel): Don't do anything if cancelation is
3990 2000-09-26 Ulrich Drepper <drepper@redhat.com>
3992 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3993 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3995 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3996 _POSIX_MONOTONIC_CLOCK.
3998 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
4001 2000-09-20 Andreas Jaeger <aj@suse.de>
4003 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
4004 "testrtsig.h" conditional.
4006 2000-09-11 Ulrich Drepper <drepper@redhat.com>
4008 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
4009 pthread_attr_setstack.
4010 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
4011 pthread_attr_setstack.
4012 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
4014 2000-09-05 Ulrich Drepper <drepper@redhat.com>
4016 * Examples/ex14.c: New file.
4017 * Makefile (tests): Add ex14.
4019 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
4020 mutex. Patch by dtc@cmucl.cons.org.
4022 * ecmutex.c: New file.
4023 * Makefile (tests): Add ecmutex.
4025 2000-09-04 H.J. Lu <hjl@gnu.org>
4027 * attr.c (__pthread_attr_setguardsize): Use page_roundup
4028 instead of roundup to round up to the page size.
4030 2000-09-03 Mark Kettenis <kettenis@gnu.org>
4032 * manager.c (pthread_exited): Correctly report event as TD_REAP
4033 instead of TD_DEATH. Fix comments.
4035 2000-09-03 Ulrich Drepper <drepper@redhat.com>
4037 * spinlock.h (testandset): Add cast to avoid warning.
4038 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
4040 2000-09-02 Andreas Jaeger <aj@suse.de>
4042 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
4045 2000-09-01 Ulrich Drepper <drepper@redhat.com>
4047 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4048 Fix typo in last patch (_mode -> _flags).
4050 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4051 Provide definition which respects _IO_USER_LOCK flag.
4053 2000-08-30 Ulrich Drepper <drepper@redhat.com>
4055 * manager.c (pthread_allocate_stack): Clear descriptor only if not
4058 2000-08-25 Ulrich Drepper <drepper@redhat.com>
4060 * Makefile: Add rules to build and run unload.
4061 * unload.c: New file.
4063 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
4065 * sysdeps/pthread/pthread.h
4066 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
4067 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
4069 2000-08-24 Andreas Jaeger <aj@suse.de>
4071 * Examples/ex13.c: Include <string.h> for strerror prototype and
4072 <stdlib.h> for abort prototype.
4073 (pthr_cond_signal_mutex): Rewrite to silence GCC.
4074 (thread_start): Remove unused variable err.
4075 (main): Silence GCC warnings.
4077 2000-08-22 Andreas Jaeger <aj@suse.de>
4079 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
4081 * Makefile (tests): Add ex13.
4083 2000-08-20 Ulrich Drepper <drepper@redhat.com>
4085 * semaphore.h: Add restrict where required by AGd4.
4086 * sysdeps/pthread/pthread.h: Likewise.
4087 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4089 2000-08-15 Ulrich Drepper <drepper@redhat.com>
4091 * Makefile (tests): Add ex12. Add rule to build it.
4092 * Examples/ex12.c: New file.
4094 2000-08-13 Ulrich Drepper <drepper@redhat.com>
4096 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4097 even though the implementation is not quite complete (but it reports
4098 it). Define _POSIX_MESSAGE_PASSING to -1.
4099 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4101 2000-08-12 Andreas Jaeger <aj@suse.de>
4103 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4105 (__compare_and_swap): Likewise.
4106 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4108 2000-08-10 Ulrich Drepper <drepper@redhat.com>
4110 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4111 p_h_errnop correctly and not to NULL.
4113 2000-08-05 Ulrich Drepper <drepper@redhat.com>
4115 * Banner: Bump version number to 0.9.
4117 2000-08-04 Ulrich Drepper <drepper@redhat.com>
4119 * Makefile (tests): Add tststack. Add rule to build the program.
4120 * tststack.c: New file.
4122 * internals.h: Declare __pthread_max_stacksize.
4123 * pthread.c (__pthread_max_stacksize): New variable.
4124 (__pthread_initialize_manager): Determine __pthread_initialize_manager
4126 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4127 (pthread_allocate_stack): Allow kernel to choose stack address if
4128 FLOATING_STACKS. This also handles variable-sized stacks.
4129 Always allocate stack and guardpage together. Use mprotect to
4130 change guardpage access.
4131 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4132 ARCH_STACK_MAX_SIZE.
4134 * attr.c (__pthread_attr_setstacksize): Also test value against
4137 * manager.c (__pthread_nonstandard_stacks): Define only if
4138 THREAD_SELF is not defined.
4139 (pthread_allocate_stack): Always initialize gardaddr to a correct
4141 (pthread_handle_create): Unmap thread with one call.
4142 (pthread_free): Remove test for initial thread before removing stack.
4143 Unmap stack with one call.
4145 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4146 1 to avoid removing the stack.
4148 2000-07-27 Jes Sorensen <jes@linuxcare.com>
4150 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4151 load of spin lock to prime the cache before the atomic compare and
4152 exchange operation (cmpxchg4). This avoids the spinning on the
4153 cmpxchg4 instruction and reduces movement of the cache line back
4154 and forth between the processors (explanation by Asis K. Mallick
4155 from Intel). This basically makes the implementation operate the
4156 same as the Linux kernel implementation.
4158 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4159 * sysdeps/ia64/pspinlock.c: New file.
4161 2000-08-03 Ulrich Drepper <drepper@redhat.com>
4163 * pthread.c: Move definition of __pthread_set_own_extricate_if...
4164 * spinlock.h: ...here. Remove locking.
4165 * internals.h: Remove __pthread_set_own_extricate_if prototype.
4167 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4168 (rwlock_rd_extricate_func): Don't determine self, let
4169 __pthread_lock do it.
4170 (rwlock_wr_extricate_func): Likewise.
4171 (rwlock_have_already): Optimize *pself handling a bit.
4173 * mutex.c: Use __builtin_expect.
4174 * pthread.c: Likewise.
4176 2000-08-02 Andreas Jaeger <aj@suse.de>
4178 * sysdeps/s390/pspinlock.c: New file.
4179 * sysdeps/s390/pt-machine.h: New file.
4180 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4182 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4184 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4186 * sysdeps/mips/pt-machine.h (testandset): Likewise.
4188 2000-07-26 Andreas Jaeger <aj@suse.de>
4190 * pthread.c: Initialize p_sem_avail.
4192 2000-07-25 Ulrich Drepper <drepper@redhat.com>
4194 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4195 * semaphore.c: Handle spurious wakeups.
4197 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4198 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4200 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4201 (__pthread_wait_for_restart): Likewise.
4203 * condvar.c (pthread_cond_wait): Also check whether thread is
4204 cancelable before aborting loop.
4205 (pthread_cond_timedwait): Likewise.
4207 * signals.c (pthread_sighandler): Remove special code to restrore
4209 (pthread_sighandler_t): Likewise.
4211 2000-07-25 Mark Kettenis <kettenis@gnu.org>
4213 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4214 * pthread.c: Include <resolv.h>.
4215 (_res): Undefine. Add extern declaration.
4217 2000-07-24 Ulrich Drepper <drepper@redhat.com>
4219 * pthread.c (__pthread_initial_thread): Update initializer.
4220 (__pthread_manager_thread): Likewise.
4221 (pthread_initialize): Move setrlimit call to...
4222 (__pthread_initialize_manager): ...here.
4223 (__pthread_reset_main_thread): Reset also soft limit on stack size.
4225 * condvar.c: Handle spurious wakeups. [PR libc/1749].
4226 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4228 2000-07-21 Ulrich Drepper <drepper@redhat.com>
4230 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4231 __compare_and_swap to define testandset.
4232 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4233 Define IMPLEMENT_TAS_WITH_CAS.
4235 2000-07-20 Ulrich Drepper <drepper@redhat.com>
4237 * Makefile: Pass -z nodelete to linker for libpthread.so
4238 generation if it understand this option.
4240 2000-07-18 Mark Kettenis <kettenis@gnu.org>
4242 * manager.c (pthread_handle_create): Remove initialization of
4243 new_thread->p_res._sock.
4245 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
4247 Bugfixes to the variant of the code for machines with no compare
4250 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4251 node was not being properly enqueued, due to failing to update
4252 the lock->__status field.
4254 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4255 being set inappropriately, causing the suspend function to be called
4256 with a null self pointer and crash.
4258 2000-07-18 Ulrich Drepper <drepper@redhat.com>
4260 * spinlock.h (__pthread_alt_trylock): Fix code used if no
4261 compare&swap is available.
4263 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4266 * pthread.c (pthread_initialize): Don't use sysconf to determine
4267 whether the machine has more than one processor.
4269 * spinlock.c (__pthread_alt_timedlock): Add back one of the
4270 removed thread_self calls.
4272 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4274 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4275 __compare_and_swap to compare_and_swap in code which assumes
4276 compare swap is available.
4278 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4280 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4281 bug whereby thr field of waitnode structure would not be correctly
4282 set unless a null self pointer is passed to the functions.
4283 Eliminated redundant calls to thread_self().
4285 2000-07-18 Jakub Jelinek <jakub@redhat.com>
4287 * pthread.c (__pthread_initialize_manager): Lock
4288 __pthread_manager_thread.p_lock before calling clone.
4290 2000-05-05 H.J. Lu <hjl@gnu.org>
4292 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4293 have acquire semantics.
4294 (__compare_and_swap_with_release_semantics): New inline
4296 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4298 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
4300 * manager.c: Fix the problem with signals at startup.
4301 Change the way that thread stacks are allocated on IA64.
4302 Clean up some of the guard page allocation stuff.
4304 1999-12-19 H.J. Lu <hjl@gnu.org>
4306 * internals.h (page_roundup): New.
4307 * attr.c (__pthread_attr_setguardsize); Use page_roundup
4309 * manager.c (pthread_allocate_stack): Make sure guardaddr is
4310 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4313 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
4315 * manager.c (pthread_allocate_stack): Unmap the stack top
4316 if failed to map the stack bottom.
4318 (pthread_free): Fix the guard page.
4320 * pthread.c (pthread_initialize): Set rlimit correctly for
4321 NEED_SEPARATE_REGISTER_STACK.
4323 1999-12-16 H.J. Lu <hjl@gnu.org>
4325 * pthread.c (__pthread_initialize_manager): Pass
4326 __pthread_manager_thread_bos instead of
4327 __pthread_manager_thread_tos to __clone2.
4329 1999-12-16 H.J. Lu <hjl@gnu.org>
4331 * manager.c (pthread_allocate_stack): Correct the calculation
4332 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4335 1999-12-13 H.J. Lu <hjl@gnu.org>
4337 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4338 bit after setting ar.ccv.
4340 1999-12-12 H.J. Lu <hjl@gnu.org>
4342 * manager.c (pthread_allocate_stack): Make the starting
4343 address of the stack bottom page aligned. FIXME: it may
4344 need changes in other places.
4345 (pthread_handle_create): Likewise.
4347 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
4349 * manager.c (pthread_allocate_stack): Handle
4350 NEED_SEPARATE_REGISTER_STACK.
4351 (pthread_handle_create): Likewise.
4352 * pthread.c (__pthread_initialize_manager): Likewise.
4354 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4356 1999-12-02 H.J. Lu <hjl@gnu.org>
4358 * sysdeps/ia64/pt-machine.h: New.
4360 2000-07-13 Ulrich Drepper <drepper@redhat.com>
4362 * wrapsyscall.c: Mark non-__ protected names as weak.
4365 2000-07-12 Bruno Haible <haible@clisp.cons.org>
4367 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4369 2000-07-12 Ulrich Drepper <drepper@redhat.com>
4371 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4372 Add tests also to new alternative spinlock implementation.
4373 * spinlock.h: Likewise.
4374 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4376 2000-07-06 Ulrich Drepper <drepper@redhat.com>
4378 * Version: Export __sigaction.
4379 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
4381 * pthread.c: Use __libc_sigaction instead of __sigaction.
4383 * condvar.c: Implement pthread_condattr_getpshared and
4384 pthread_condattr_setpshared.
4385 * mutex.c: Implement pthread_mutexattr_getpshared and
4386 pthread_mutexattr_setpshared.
4387 * Versions: Export new functions.
4388 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4390 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4391 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4394 2000-07-04 Greg McGary <greg@mcgary.org>
4396 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4397 pragmas. Include bp-sym.h only if _LIBC.
4399 2000-07-04 Ulrich Drepper <drepper@redhat.com>
4401 * spinlock.c (__pthread_unlock): Properly place write barrier.
4402 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4404 2000-07-03 Ulrich Drepper <drepper@redhat.com>
4406 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4407 faster on SMP systems. No more emulation of compare&swap for adaptive
4409 * spinlock.h: Likewise.
4410 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4411 Replace fast with adaptive mutex.
4412 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4413 * condvar.c: Likewise.
4414 * pthread.c: Define and initialize __pthread_smp_kernel variable.
4415 * internals.h: Declare __pthread_smp_kernel.
4416 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4417 _pthread_fastlock structure.
4418 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4420 * pthread.c: Remove initialization to zero from global variables.
4422 2000-06-29 Jakub Jelinek <jakub@redhat.com>
4424 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4426 2000-06-28 Greg McGary <greg@mcgary.org>
4428 * weaks.c: Wrap BP_SYM () around weak extern declarations of
4429 pthread functions that have pointers in their return+arg signatures.
4431 2000-06-27 Greg McGary <greg@mcgary.org>
4433 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4434 extern declarations of pthread functions that have pointers in
4435 their return+arg signatures.
4437 2000-06-26 Ulrich Drepper <drepper@redhat.com>
4439 * Makefile (tests): Add ex11. Add rules to build it.
4440 * Examples/ex11.c: New file.
4441 * rwlock.c: Fix complete braindamaged previous try to implement
4444 * spinlock.c: Pretty print.
4446 2000-06-25 Ulrich Drepper <drepper@redhat.com>
4448 * Makefile (tests): Add ex10. Add rules to build it.
4449 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4450 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4451 * condvar.c (pthread_cond_wait): Allow mutex of kind
4452 PTHREAD_MUTEX_TIMED_NP.
4453 (pthread_cond_timedwait_relative): Likewise.
4454 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4455 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4456 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4457 (__pthread_mutex_lock): Use __pthread_alt_lock for
4458 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4459 (__pthread_mutex_timedlock): New function.
4460 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4461 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4462 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4463 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4464 * spinlock.c: Implement alternate fastlocks.
4465 * spinlock.h: Add prototypes.
4466 * Examples/ex10.c: New file.
4467 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4468 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4470 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4471 (__pthread_rwlock_timedrdlock): New function.
4472 (__pthread_rwlock_timedwrlock): New function.
4473 Use laternate fastlock function everywhere.
4475 2000-06-21 Andreas Jaeger <aj@suse.de>
4477 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4480 * join.c: Include <stdlib.h> for exit prototype.
4482 2000-06-20 Ulrich Drepper <drepper@redhat.com>
4484 * sysdeps/i386/useldt.h: Include <stdlib.h>.
4486 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4487 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4489 * Makefile (libpthread-routines): Add barrier.
4490 (tests): Add ex9. Add rule to build ex9.
4491 * Versions: Export barrier functions.
4492 * barrier.c: New file.
4493 * Examples/ex9.c: New file.
4494 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4495 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4496 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4498 2000-06-19 H.J. Lu <hjl@gnu.org>
4500 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4501 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4502 (compare_and_swap_with_release_semantics): New. Default to
4503 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4506 * spinlock.c (__pthread_unlock): Call
4507 compare_and_swap_with_release_semantics () instead of
4508 compare_and_swap ().
4510 2000-06-19 Ulrich Drepper <drepper@redhat.com>
4512 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4514 * sysdeps/pthread/timer_delete.c: Likewise.
4515 * sysdeps/pthread/timer_getoverr.c: Likewise.
4516 * sysdeps/pthread/timer_gettime.c: Likewise.
4517 * sysdeps/pthread/timer_settime.c: Likewise.
4519 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4521 Timer nodes are now reference counted, and can be marked
4522 as deleted. This allows for the safe release of the global mutex
4523 in the middle without losing the timer being operated on.
4525 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
4526 member is now an enum with three values, so that an intermediate
4527 state can be represented (deleted but not free for reuse yet).
4528 New refcount member added.
4529 * sysdeps/pthread/timer_routines.c: Likewise.
4531 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4532 timer_valid): New inline functions added.
4534 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4535 restructured, recursive deadlock bug fixed.
4537 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4538 timer_addref to ensure that timer won't be deleted while mutex is not
4539 held. Also uses timer_invalid to perform validation of timer handle.
4540 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4541 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4543 2000-06-14 Ulrich Drepper <drepper@redhat.com>
4545 * shlib-versions: Add entry for SH.
4546 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4548 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4550 A few optimizations. Got rid of unnecessary wakeups of timer threads,
4551 tightened up some critical regions and micro-optimized some list
4554 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4555 Returns int value now to indicate whether timer was queued at head.
4556 * sysdeps/pthread/posix-timer.h: Likewise.
4557 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4558 new return value from __timer_thread_queue_timer to avoid waking
4559 up timer thread unnecessarily.
4561 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4562 inuse flag, because this requires mutex to be held. Callers updated
4563 to do the check when they have the mutex.
4564 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4566 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4567 regions: avoids making system calls while holding timer mutex, and
4568 a few computations were moved outside of the mutex as well.
4569 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4571 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4572 to list_unlink_ip, meaning idempotent. Pointer manipulation
4573 changed to get better better code out of gcc.
4574 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4575 version of list_unlink added here.
4576 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4577 function in all places: idempotent one for timers, non-idempotent
4578 one for thread nodes.
4579 * sysdeps/pthread/timer_settime: Likewise.
4580 * sysdeps/pthread/timer_routines.c: Likewise.
4582 2000-06-13 Ulrich Drepper <drepper@redhat.com>
4584 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4585 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4587 * sysdeps/pthread/Makefile: Remove tests definition.
4589 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
4590 Yutaka Niibe <gniibe@chroot.org>
4592 * sysdeps/sh/pspinlock.c: New file.
4593 * sysdeps/sh/pt-machine.h: New file.
4595 2000-06-12 Ulrich Drepper <drepper@redhat.com>
4597 * Makefile (tests): Add joinrace.
4599 * Examples/ex6.c: Test return value of pthread_join.
4601 2000-06-11 Geoff Keating <geoffk@cygnus.com>
4603 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4604 (__pthread_spin_trylock): Implement.
4605 (__pthread_spin_unlock): Implement.
4606 (__pthread_spin_init): Implement.
4607 (__pthread_spin_destroy): Implement.
4609 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4611 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4612 really append the entry.
4614 2000-06-10 Andreas Jaeger <aj@suse.de>
4616 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4618 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
4620 * sysdeps/pthread/timer_create.c: Thread matching now done on
4621 clock type as well as thread attributes.
4622 There are individual global signal-delivering threads for
4623 different clock types.
4624 * sysdeps/pthread/posix-timer.h: Likewise.
4625 * sysdeps/pthread/timer_routines.c: Likewise.
4627 * sysdeps/pthread/timer_routines.c: Thread allocation and
4628 deallocation function now remembers to put thread on active
4629 list and remove from active list.
4630 Thus now the feature of binding multiple timers
4631 to a single thread actually works.
4633 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4635 * pthread.c (__pthread_create_2_1): Optimize a bit.
4637 * internals.h (invalid_handle): Also test for p_terminated != 0.
4638 (nonexisting_handle): New function. Same as old invalid_handle.
4639 * join.c (pthread_join): Use nonexisting_handle instead of
4640 invalid_handle to test for acceptable thread handle.
4641 * manager.c (pthread_handle_free): Likewise.
4642 * joinrace.c: New file.
4643 Reported by Permaine Cheung <pcheung@cygnus.com>.
4645 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4647 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4648 Correct handling of matching variable.
4650 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4653 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4654 Be prepared for empty timer list.
4656 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4657 CPUTIME clock ID. Add support for thread clocks.
4659 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4660 subtraction were switched.
4662 * sysdeps/pthread/timer_routines.c (init_module): Use
4663 THREAD_MAXNODES threads.
4665 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4666 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4667 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4668 with sigqueueinfo is this system call is available.
4670 * sysdeps/pthread/timer_create.c (timer_create): Allow
4671 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4673 * sysdeps/pthread/Makefile: New file. Add rules to build timer
4675 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4677 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4679 * sysdeps/pthread/posix-timer.h: New file.
4680 * sysdeps/pthread/timer_create.c: New file.
4681 * sysdeps/pthread/timer_delete.c: New file.
4682 * sysdeps/pthread/timer_getoverr.c: New file.
4683 * sysdeps/pthread/timer_gettime.c: New file.
4684 * sysdeps/pthread/timer_routines.c: New file.
4685 * sysdeps/pthread/timer_settime.c: New file.
4686 * sysdeps/pthread/tst-timer.c: New file.
4688 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4690 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4691 LINK_MAX definitions if necessary.
4693 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4695 Added missing fork time handling of global libio lock.
4697 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4698 not just the individual stream locks. Rewritten to use new
4699 iterator interface provided by libio rather than accessing
4702 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4703 which lock and unlock the stream list using the new interface
4705 * internals.h: Likewise.
4707 * ptfork.c (__fork): Now calls __flockfilelist before fork,
4708 and __funlockfilelist in the parent after the fork.
4709 Child still calls __fresetlockfiles as before.
4711 * linuxthreads.texi: Now explains what happens to streams at
4712 fork time. Also whole new section on forking and thread added.
4713 Definition of pthread_atfork moved out of Miscellaneous Functions
4714 to this new section.
4716 2000-06-04 Jakub Jelinek <jakub@redhat.com>
4718 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4719 Add missing register.
4720 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4722 2000-06-02 Jakub Jelinek <jakub@redhat.com>
4724 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4725 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4726 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4728 2000-05-31 Andreas Jaeger <aj@suse.de>
4730 * sysdeps/mips/pspinlock.c: Implement spinlocks.
4732 2000-05-28 Ulrich Drepper <drepper@redhat.com>
4734 * spinlock.c (__pthread_lock): Remove ASSERT.
4736 * Makefile (tests): Add ex8.
4737 * Examples/ex8.c: New file.
4739 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
4741 Bugfix: The pthread_atfork mechanism now takes care of its
4742 own internal mutex at fork time.
4744 * ptfork.c (__fork): Revised so that the mutex is held across
4745 the fork operation and while the handlers are called, and so that
4746 the child resets the mutex.
4748 * linuxthreads.texi: Updated pthread_atfork documentation to make
4749 it clear that fork and pthread_atfork can't be reentered from
4750 atfork handlers, that pthread_atfork and fork are mutually atomic,
4751 and that the handlers are inherited by the child process.
4753 2000-05-24 Ulrich Drepper <drepper@redhat.com>
4755 * Makefile (libpthread-routines): Add pspinlock.
4756 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4757 Use struct _pthread_fastlock instead of pthread_spinlock_t.
4758 * condvar.c: Likewise.
4759 * internals.h: Likewise.
4761 * manager.c: Likewise.
4762 * mutex.c: Likewise.
4763 * pthread.c: Likewise.
4764 * rwlock.c: Likewise.
4765 * semaphore.c: Likewise.
4766 * signals.c: Likewise.
4767 * spinlock.h: Likewise.
4768 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
4769 * sysdeps/alpha/pspinlock.c: New file.
4770 * sysdeps/arm/pspinlock.c: New file.
4771 * sysdeps/i386/pspinlock.c: New file.
4772 * sysdeps/m68k/pspinlock.c: New file.
4773 * sysdeps/mips/pspinlock.c: New file.
4774 * sysdeps/powerpc/pspinlock.c: New file.
4775 * sysdeps/sparc/sparc32/pspinlock.c: New file.
4776 * sysdeps/sparc/sparc64/pspinlock.c: New file.
4777 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4778 back to _pthread_fastlock. Define new pthread_spinlock_t.
4780 2000-05-24 Andreas Jaeger <aj@suse.de>
4782 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4784 2000-05-21 Jakub Jelinek <jakub@redhat.com>
4786 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4788 2000-05-13 Jakub Jelinek <jakub@redhat.com>
4790 * internals.h (__RES_PTHREAD_INTERNAL): Define.
4792 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4794 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4795 object state is represented with additional bits which distinguish
4796 whether that state was set up in the current process, or
4797 in an ancestor process. If that state was set in an ancestor,
4798 it means that a fork happened while thread was executing the init
4799 function. In that case, the state is reset to NEVER.
4800 * mutex.c (__pthread_once_fork_prepare): New function.
4801 (__pthread_once_fork_child): Likewise
4802 (__pthread_once_fork_parent): Likewise
4803 (__pthread_reset_pthread_once): Removed.
4804 * ptfork.c (__fork): Call new handlers in mutex.c.
4805 * internals.h: Declarations of new mutex.c functions added.
4806 Declaration of removed function deleted.
4807 * linuxthreads.texi: Updated documentation about pthread_once
4808 to clarify what happens under cancellation and forking.
4810 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4812 * internals.h: New thread manager request type, REQ_KICK.
4813 * join.c (pthread_exit): main thread now calls exit() instead
4814 of _exit() in order to proper process cleanup.
4815 * manager.c (__pthread_manager): Do not terminate manager
4816 after unblocking main thread; wait for main thread's
4817 REQ_PROCESS_EXIT request instead.
4818 Also, added REQ_KICK case to handle new request; this just does
4820 * manager.c (pthread_exited): Do not terminate manager after
4821 unblocking main thread.
4822 * manager.c (__pthread_manager_sighandler): If the main thread
4823 is waiting for all other threads to die, send a REQ_KICK into
4824 the thread manager request pipe to get it to clean out the threads
4825 and unblock the main thread as soon as possible. This fixes
4826 the 2000 millisecond hang on shutdown bug.
4827 * Examples/ex7.c: New file, tests shutdown behavior when all threads
4828 including the main one call pthread_exit(), or implicitly do so.
4829 * Makefile (tests): Add ex7.
4831 2000-05-05 Andreas Jaeger <aj@suse.de>
4833 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4834 (pthread_getcpuclockid): Correct test for ourselves.
4836 2000-05-05 Ulrich Drepper <drepper@redhat.com>
4838 * internals.h (struct _pthread_descr_struct): Reorganization.
4839 Allocate room for 16 pointers at head of the structure for future
4840 thread-local data handling. Move p_self member in this area.
4841 * manager.c (pthread_handle_create): Adjust use of p_self.
4842 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4843 * pthread.c (__pthread_initial_thread): Adjust initialization.
4844 (__pthread_manager_thread): Likewise.
4846 2000-04-29 Bruno Haible <haible@clisp.cons.org>
4848 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4849 for eventmask larger than 1 word.
4851 2000-04-27 Ulrich Drepper <drepper@redhat.com>
4853 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4854 * pthread.c (__pthread_initialize_minimal): New function. Perform
4855 minimal initialization.
4856 (pthread_initialize): Remove this code here.
4857 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
4858 are working around the problem in glibc.
4860 2000-04-25 Ulrich Drepper <drepper@redhat.com>
4862 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4863 now. First gcc must be fixed (more concrete: libgcc).
4865 2000-04-24 Ulrich Drepper <drepper@redhat.com>
4867 * pthread.c: Remove special treatement for interrupt handlers on x86.
4868 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4869 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4871 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4873 2000-04-24 Mark Kettenis <kettenis@gnu.org>
4875 * join.c (pthread_exit): Set p_terminated after reporting the
4876 termination event instead of before.
4878 2000-04-20 Jakub Jelinek <jakub@redhat.com>
4880 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4883 2000-04-18 Andreas Jaeger <aj@suse.de>
4885 * Versions: Use ld instead of ld.so.
4887 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4889 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4890 Remove the typedef keyword.
4892 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4894 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4896 (READ_MEMORY_BARRIER): Define.
4897 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4899 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4902 2000-04-17 Ulrich Drepper <drepper@redhat.com>
4904 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4905 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4906 use thread_handle().
4908 2000-04-16 Ulrich Drepper <drepper@redhat.com>
4910 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4911 if fast mutex is used. Don't initialize `already_canceled' twice.
4912 Correctly test for return value of timedsuspend.
4914 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
4915 therefore don't need the _rt versions of the signal handlers.
4917 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4919 * pthread.c (pthread_yield): New function.
4920 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4921 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4922 * internals.h: Declare __pthread_yield.
4924 * pthread.c (pthread_initialize): Avoid a bit more code if
4925 realtime signals are known to exist.
4927 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4928 to dynamically detect RT signals and avoid generating compatibility
4929 functions with old kernel.
4930 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4931 __pthread_restart_new directly.
4932 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4933 __pthread_wait_for_restart_signal directly.
4934 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4935 __pthread_timedsuspend_new directly.
4937 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4939 * condvar.c: Remove all the special code to handle cond_timedwait.
4940 Use timedsuspend instead.
4941 * internals.h: Declare __pthread_timedsuspend_old,
4942 __pthread_timedsuspend_new, and __pthread_timedsuspend.
4943 Remove declaration of __pthread_init_condvar.
4944 * pthread.c: Define __pthread_timedsuspend variable.
4945 (__pthread_timedsuspend_old): New function. Timed suspension
4946 implementation for old Linux kernels.
4947 (__pthread_timedsuspend_new): New function. Timed suspension
4948 implementation for new Linux kernels.
4949 * restart.h (timedsuspend): New function. Call appropriate
4950 suspension function through __pthread_timedsuspend.
4951 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4953 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4955 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4957 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4959 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4960 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4962 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4963 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4965 2000-04-14 Andreas Jaeger <aj@suse.de>
4967 * weaks.c: Fix typo.
4969 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4970 2.2 for linuxthreads.
4972 2000-04-13 Ulrich Drepper <drepper@redhat.com>
4974 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4975 (pthread_getcpuclockid): Fix typo.
4977 2000-04-12 Ulrich Drepper <drepper@redhat.com>
4979 * Makefile (libpthread-routines): Add getcpuclockid.
4980 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4981 * sysdeps/pthread/getcpuclockid.c: New file.
4982 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4983 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4985 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4987 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4989 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4990 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4991 and pthread_spin_unlock.
4992 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4993 into pthread_spinlock_t. Change all uses.
4994 * spinlock.c: Implement pthread_spin_lock.
4995 Rename __pthread_unlock to __pthread_spin_unlock and define weak
4996 alias for real name.
4997 Define pthread_spin_trylock, pthread_spin_init, and
4998 pthread_spin_destroy.
4999 Change all uses of _pthread_fastlock to pthread_spinlock_t.
5000 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
5001 Change all uses of _pthread_fastlock to pthread_spinlock_t.
5002 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
5003 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5004 and pthread_spin_unlock.
5005 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
5006 Change all uses of _pthread_fastlock to pthread_spinlock_t.
5007 * condvar.c: Likewise.
5008 * internals.h: Likewise.
5010 * manager.c: Likewise.
5011 * mutex.c: Likewise.
5012 * pthread.c: Likewise.
5013 * rwlock.c: Likewise.
5014 * semaphore.c: Likewise.
5015 * signals.c: Likewise.
5017 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
5019 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
5021 2000-04-11 Ulrich Drepper <drepper@redhat.com>
5023 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
5024 _POSIX_SHARED_MEMORY_OBJECTS.
5026 2000-04-11 Andreas Jaeger <aj@suse.de>
5028 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
5029 (__compare_and_swap): Mark as modifying memory.
5031 2000-04-11 Geoff Keating <geoffk@cygnus.com>
5033 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
5035 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
5036 Don't have the 'asm' __volatile__.
5038 2000-04-11 Ulrich Drepper <drepper@redhat.com>
5040 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
5041 * spinlock.c (__pthread_lock): Add memory barriers.
5042 (__pthread_unlock): Likewise.
5043 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
5045 (RELEASE): Not needed anymore.
5046 (__compare_and_swap): Mark asm as modifying memory.
5047 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
5049 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
5050 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
5051 (MEMORY_BARRIER): Define using stbar.
5052 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
5054 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
5055 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
5056 Mike Burrows <m3b@pa.dec.com>.
5058 2000-04-09 Ulrich Drepper <drepper@redhat.com>
5060 * signals.c (sigaction): Fix return value for the case SIG is one
5061 of the signals the implementation uses.
5062 Patch by Xavier.Leroy@inria.fr.
5064 2000-04-01 Andreas Jaeger <aj@suse.de>
5066 * attr.c: Use shlib-compat macros.
5067 * oldsemaphore.c: Likewise.
5068 * pthread.c: Likewise.
5069 * weaks.c: Likewise.
5071 2000-03-26 Ulrich Drepper <drepper@redhat.com>
5073 * semaphore.c (sem_timedwait): New function.
5074 Patch by Carl Mailloux <carlm@oricom.ca>.
5075 * semaphore.h: Declare sem_timedwait.
5076 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
5078 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
5080 * sysdeps/pthread/Makefile: File removed.
5082 2000-03-23 Ulrich Drepper <drepper@redhat.com>
5084 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
5085 * internals.h (__pthread_reset_pthread_once): Add prototype.
5086 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5088 * manager.c (pthread_handle_create): Store ID of new thread before
5091 2000-03-21 Ulrich Drepper <drepper@redhat.com>
5093 * attr.c: Use new macros from shlib-compat.h to define versions.
5094 * oldsemaphore.c: Likewise.
5095 * semaphore.c: Likewise.
5096 * weaks.c: Likewise.
5098 * pthread.c: Update for new SHLIB_COMPAT definition.
5100 * manager.c (__pthread_manager): Unmask debug signal.
5102 * pthread.c (pthread_initialize): Test for address of __dso_handle
5103 being NULL, not value. Use __on_exit, not on_exit.
5104 Patch by Andreas Jaeger <aj@suse.de>.
5106 * pthread.c: Use new macros from shlib-compat.h to define versions.
5108 2000-03-19 Ulrich Drepper <drepper@redhat.com>
5110 * pthread.c (pthread_initialize): Instead of on_exit use
5111 __cxa_atexit if __dso_label is available to allow unloading the
5112 libpthread shared library.
5114 2000-03-16 Ulrich Drepper <drepper@redhat.com>
5116 * condvar.c: Make tests for ownership of mutex less strict.
5118 2000-03-14 Ulrich Drepper <drepper@redhat.com>
5120 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5121 current thread and return error if not.
5122 (pthread_cond_timedwait_relative_old): Likewise.
5123 (pthread_cond_timedwait_relative_new): Likewise.
5125 * mutex.c (__pthread_once): Handle cancelled init function correctly.
5126 (pthread_once_cancelhandler): New function.
5127 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5129 2000-03-14 Andreas Jaeger <aj@suse.de>
5131 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5133 (pthread_handle_sigrestart_rt): Likewise.
5134 * signals.c (pthread_sighandler_rt): Likewise.
5136 2000-03-02 Andreas Jaeger <aj@suse.de>
5138 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5139 Reported by Sean Chen <sean.chen@turbolinux.com>.
5141 2000-02-28 Andreas Jaeger <aj@suse.de>
5143 * rwlock.c: Fix typo.
5145 2000-02-27 Ulrich Drepper <drepper@redhat.com>
5147 * rwlock.c: Define __* variants of the functions and make old names
5149 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5150 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5152 2000-02-25 Andreas Jaeger <aj@suse.de>
5154 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5155 pwrite64, lseek64, open64, and __open64 with version 2.2.
5157 2000-02-22 Ulrich Drepper <drepper@redhat.com>
5159 * semaphore.h (SEM_FAILED): Use 0 not NULL.
5161 2000-02-14 Ulrich Drepper <drepper@redhat.com>
5163 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5164 nanosleep does not work either. Get absolute time inside the
5166 (pthread_cond_timedwait_relative_new): Likewise.
5167 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5169 2000-02-13 Andreas Jaeger <aj@suse.de>
5171 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5172 (pthread_cond_timedwait_relative_old): Likewise.
5174 2000-02-13 Ulrich Drepper <drepper@redhat.com>
5176 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5177 but keep the code around. A bug in the kernel prevent us from
5179 (pthread_cond_timedwait_relative_new): Likewise.
5180 (PR libc/1597 and libc/1598).
5182 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
5184 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5185 loop around nanosleep calls instead of around most of the function
5186 (pthread_cond_timedwait_relative_new): Likewise.
5187 body. Got rid of backwards goto and one local.
5189 2000-01-31 Ulrich Drepper <drepper@redhat.com>
5191 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5192 before every nanosleep call to account for time spent in the rest
5194 (pthread_cond_timedwait_relative_new): Likewise.
5195 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5197 2000-01-29 Ulrich Drepper <drepper@redhat.com>
5199 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5200 from nanosleep call so that in case we restart we only wait for the
5202 (pthread_cond_timedwait_relative_new): Likewise.
5203 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5205 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
5207 * manager.c (pthread_allocate_stack): Compute guard page address
5208 correctly. Patch by HJ Lu.
5210 * sysdeps/pthread/pthread.h: Define
5211 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5213 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
5215 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5216 preference handling.
5217 (pthread_rwlockattr_setkind_np): Allow
5218 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5219 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5221 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
5223 * internals.h (pthread_readlock_info): New structure.
5224 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5225 p_untracked_readlock_count.
5226 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5227 Add initializers for new fields.
5228 * manager.c (pthread_free): Free read/write lock lists.
5229 * queue.h (queue_is_empty): New function.
5230 * rwlock.c: Implement requirements about when readers should get
5232 * sysdeps/pthread/pthread.h
5233 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5234 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5235 Define this name as well.
5236 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5238 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
5240 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5241 Adjust initializers for struct _pthread_descr_struct change.
5242 * internals.h (struct _pthread_descr_struct): Move new elements to
5245 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
5247 Redesigned how cancellation unblocks a thread from internal
5248 cancellation points (sem_wait, pthread_join,
5249 pthread_cond_{wait,timedwait}).
5250 Cancellation won't eat a signal in any of these functions
5251 (*required* by POSIX and Single Unix Spec!).
5252 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5253 simultaneous condition variable signal (not required by POSIX
5254 or Single Unix Spec, but nice).
5255 * spinlock.c: __pthread_lock queues back any received restarts
5256 that don't belong to it instead of assuming ownership of lock
5257 upon any restart; fastlock can no longer be acquired by two threads
5259 * restart.h: Restarts queue even on kernels that don't have
5260 queued real time signals (2.0, early 2.1), thanks to atomic counter,
5261 avoiding a rare race condition in pthread_cond_timedwait.
5263 1999-12-31 Andreas Jaeger <aj@suse.de>
5265 * internals.h: Remove duplicate prototype declarations.
5267 * weaks.c: Remove __THROW from prototypes since the file is not
5268 compiled by a C++ compiler.
5269 * internals.h: Likewise.
5271 1999-12-30 Andreas Jaeger <aj@suse.de>
5273 * sysdeps/pthread/pthread.h: Move internal functions to...
5274 * sysdeps/pthread/bits/libc-lock.h: ...here.
5276 1999-12-29 Andreas Jaeger <aj@suse.de>
5278 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5280 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
5282 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5285 * manager.c (__pthread_start): Add one more cast to prevent
5286 warning on 64bit machines.
5288 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
5290 * manager.c (pthread_handle_create): Set p_pid of new thread
5291 before calling the callback function to report a new thread.
5293 1999-12-20 Andreas Jaeger <aj@suse.de>
5295 * pthread.c (pthread_initialize): Move getrlimit call after
5298 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
5300 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5301 pwrite64, lseek64, open64, and __open64.
5302 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5303 pwrite64, lseek64, open64, and __open64.
5305 * manager.c (pthread_allocate_stack): Correct computation of
5306 new_thread_bottom. Correct handling of stack size and when the
5307 rlimit method to guard for stack growth is used.
5308 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5309 minus one pagesize (not two).
5311 1999-12-03 Andreas Jaeger <aj@suse.de>
5313 * Versions: Add __res_state with version GLIBC_2.2.
5315 * errno.c (__res_state): New function to return thread specific
5318 * pthread.c (pthread_initialize): Initialize p_resp.
5319 (__pthread_reset_main_thread): Also set p_resp.
5321 * manager.c (pthread_handle_create): Initialize p_resp.
5323 * internals.h: Add thread specific resolver state.
5324 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5326 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
5328 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5330 * sysdeps/i386/i686/pt-machine.h: Likewise.
5331 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5333 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
5335 * manager.c (pthread_start_thread_event): Initialize p_pid already
5338 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
5340 * internals.h: Add prototype for __pthread_manager_event.
5341 * manager.c (__pthread_manager_event): New function.
5342 (pthread_start_thread_event): Correct computation of self.
5343 Use INIT_THREAD_SELF.
5344 * pthread.c (__pthread_manager_thread): Initialize p_lock.
5345 (__pthread_initialize_manager): Respect event flags also for creation
5346 of the manager thread.
5348 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
5350 * pthread.c (__pthread_initialize_manager): Initialize
5351 __pthread_manager_thread.p_tid.
5353 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
5355 * internals.h: Declare __pthread_last_event.
5356 * manager.c: Define __pthread_last_event.
5357 (pthread_handle_create): Set __pthread_last_event.
5358 (pthread_exited): Likewise.
5359 * join.c (pthread_exit): Likewise.
5361 * Makefile (libpthread-routines): Add events.
5362 * events.c: New file.
5363 * internals.h: Protect against multiple inclusion.
5364 Include thread_dbP.h header.
5365 (struct _pthread_descr_struct): Add new fields p_report_events and
5367 Declare event reporting functions.
5368 * join.c (pthread_exit): Signal event if this is wanted.
5369 * manager.c (__pthread_threads_events): New variable.
5370 (pthread_handle_create): Take new parameters with event information.
5371 Signal TD_CREATE event if wanted.
5372 (__pthread_manager): Adjust pthread_handle_create call.
5373 (pthread_start_thread_event): New function. Block until manager is
5374 finished and then call pthread_start_thread.
5375 (pthread_exited): Signal TD_REAP event if wanted.
5377 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
5379 * restart.h (suspend_with_cancellation): Rewrite as a macro.
5381 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5383 1999-10-25 Andreas Jaeger <aj@suse.de>
5385 * internals.h: Remove K&R compatibility.
5386 * no-tsd.c: Likewise.
5387 * semaphore.h: Likewise.
5388 * signals.c: Likewise.
5389 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5390 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5391 * weaks.c: Likewise.
5393 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
5395 * pthread.c: For i386, wrap pthread_handle_sigrestart and
5396 pthread_handle_sigcancel with functions that restore %gs from the
5397 signal context. For each signal handling function, two wrappers
5398 are required, one for a non-RT signal and one for a RT signal.
5399 * signal.c: For i386, add code to restore %gs from the signal
5400 context in pthread_sighandler and pthread_sighandler_rt.
5402 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
5404 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5406 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
5408 * pthread.c (__pthread_initial_thread): Pass argument to
5409 PTHREAD_START_ARGS_INITIALIZER.
5410 (__pthread_manager_thread): Likewise.
5412 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5413 initialize function.
5415 * manager.c (pthread_handle_create): Remove p_startfct initialization.
5417 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5419 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
5421 * internals.h: Correct return types for __libc_read and __libc_write.
5423 1999-10-09 Andreas Jaeger <aj@suse.de>
5425 * internals.h: Add __new_sem_post to get prototype in
5426 manager.c; include semaphore.h for needed types.
5428 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
5430 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5431 directly instead of calling sem_post which should not be necessary
5432 but is faster and might help in some case to work around problems.
5433 Patch by khendricks@ivey.uwo.ca [libc/1382].
5435 1999-10-08 Andreas Schwab <schwab@suse.de>
5437 * sysdeps/pthread/Subdirs: New file.
5440 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
5442 * Implies: New file.
5443 * internals.h (struct _pthread_descr_struct): Add p_startfct.
5444 * manager.c (pthread_handle_create): Initialize p_startfct.
5445 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5447 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
5449 * manager.c (__linuxthreads_pthread_threads_max): New variable.
5450 * specific.c (__linuxthreads_pthread_keys_max): New variable.
5451 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5453 * condvar.c (pthread_cond_timedwait_relative): Never return with
5454 EINTR. Patch by Andreas Schwab.
5456 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
5458 * signals.c (sigaction): Correct last patch. Don't select
5459 pthread_sighandler_rt based on the signal number but instead of
5460 the SA_SIGINFO flag.
5462 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
5464 * specific.c: Move definitions of struct pthread_key_struct and
5465 destr_function to ...
5466 * internals.h: ...here.
5468 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
5470 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
5471 this instead of pthread_handle_sigrestart if the signal is an RT
5474 * signals.c: Handle passing through of sighandler arguments also
5475 for real-time signals.
5477 1999-09-03 Andreas Schwab <schwab@suse.de>
5479 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
5481 (__vfork): New function, alias vfork.
5482 * Versions: Export __fork, vfork, and __vfork in libpthread.
5484 1999-08-23 Andreas Schwab <schwab@suse.de>
5486 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5487 call to signal handler.
5489 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
5491 * pthread.c (__pthread_reset_main_thread): Undo last change.
5492 (__pthread_kill_other_threads_np): Reset signal handlers for the
5493 signals we used in the thread implementation here.
5495 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
5497 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5498 for the signals we used in the thread implementation [PR libc/1234].
5500 * Versions: Export __pthread_kill_other_threads_np from libpthread
5503 * signals.c: Pass sigcontext through wrapper to the user function.
5505 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
5507 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5508 __libc_internal_tsd_set.
5510 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5512 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5515 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5517 * internals.h: Align _pthread_descr_struct to 32 bytes.
5518 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5521 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5523 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5526 1999-07-09 Cristian Gafton <gafton@redhat.com>
5528 * Makefile (libpthread-routines): Add oldsemaphore routine.
5529 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5530 sem_trywait, and sem_wait to GLIBC_2.1.
5531 * oldsemaphore.c: New file.
5532 * semaphore.c: Add default_symbol_versions for the changed functions.
5533 (__new_sem_init): Rename from sem_init.
5534 (__new_sem_post): Rename from sem_post.
5535 (__new_sem_wait): Rename from sem_wait.
5536 (__new_sem_trywait): Rename from sem_trywait.
5537 (__new_sem_getvalue): Rename from sem_getvalue.
5538 (__new_sem_destroy): Rename from sem_destroy.
5540 1999-06-23 Robey Pointer <robey@netscape.com>
5542 * internals.h: Added p_nextlock entry to separate queueing for a
5543 lock from queueing for a CV (sometimes a thread queues on a lock
5544 to serialize removing itself from a CV queue).
5545 * pthread.c: Added p_nextlock to initializers.
5546 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5548 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5550 * manager.c (pthread_handle_create): Free mmap region after stack
5551 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5553 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5555 * man/pthread_cond_init.man: Correct example.
5556 Reported by Tomas Berndtsson <tomas@nocrew.org>.
5558 * linuxthreads.texi (Condition Variables): Likewise.
5560 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
5562 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5563 casx not cas, also successful casx returns the old value in rd
5564 and not the new value.
5566 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
5568 * manager.c: If pthread_create() is given a NULL attribute
5569 and the thread manager runs with a realtime policy, set the
5570 scheduling policy of the newly created thread back to SCHED_OTHER.
5571 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5572 initialize the schedpolicy field of new_thread->p_start_args
5573 to that of the calling thread.
5575 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
5577 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5578 instruction does not allow memory element to use offset.
5580 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
5582 * manager.c (pthread_allocate_stack): Optimize initialization of new
5585 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5586 Don't use initializer since it is all zeroes.
5587 (__libc_once_define): Likewise.
5589 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5591 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5592 doesn't exist anymore.
5593 * sysdeps/i386/Implies: Likewise.
5594 * sysdeps/m68k/Implies: Likewise.
5595 * sysdeps/mips/Implies: Likewise.
5596 * sysdeps/powerpc/Implies: Likewise.
5597 * sysdeps/sparc/sparc32/Implies: Likewise.
5598 * sysdeps/sparc/sparc64/Implies: Likewise.
5600 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
5602 * sysdeps/alpha/bits/semaphore.h: Removed.
5603 * sysdeps/powerpc/bits/semaphore.h: Removed.
5604 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5605 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5606 * Makefile (headers): Remove bits/semaphore.h.
5608 * semaphore.h: Define _pthread_descr if necessary.
5609 Don't include limits.h. Define SEM_VALUE_MAX directly.
5611 (sem_t): Protect element names with leading __.
5612 Add declarations for sem_close, sem_open, and sem_unlink.
5613 * semaphore.c: Adjust all functions for new element names.
5614 Define sem_close, sem_open, and sem_unlink.
5615 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5617 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5620 1999-03-16 H.J. Lu <hjl@gnu.org>
5622 * specific.c (pthread_key_delete): Check th->p_terminated to see
5623 if the thread is running.
5625 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5626 Added to GLIBC_2.0 for libc.so.
5628 1999-02-12 H.J. Lu <hjl@gnu.org>
5630 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5631 __libc_allocate_rtsig): Added to GLIBC_2.1.
5633 * internals.h (DEFAULT_SIG_RESTART): Removed.
5634 (DEFAULT_SIG_CANCEL): Removed.
5636 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5637 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5638 (__pthread_sig_restart, __pthread_sig_cancel,
5639 __pthread_sig_debug): Initialized.
5640 (pthread_initialize): Call init_rtsigs () to initialize
5643 1999-02-03 H.J. Lu <hjl@gnu.org>
5645 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5646 Don't restart the thread which sent REQ_DEBUG.
5647 (pthread_start_thread): Check if __pthread_sig_debug > 0
5650 * pthread.c (__pthread_initialize_manager): Suspend ourself
5651 after sending __pthread_sig_debug to gdb instead of
5652 __pthread_sig_cancel.
5654 1999-01-24 H.J. Lu <hjl@gnu.org>
5656 * manager.c (__pthread_manager): Delete __pthread_sig_debug
5657 from mask if __pthread_sig_debug > 0.
5658 (pthread_handle_create): Increment __pthread_handles_num.
5660 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5661 * pthread.c (__pthread_initialize_manager): Likewise.
5663 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5664 instead of __libc_allocate_rtsig (2).
5665 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5666 instead of __pthread_sig_cancel.
5667 (pthread_handle_sigdebug): Fix comments.
5669 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
5671 * manager.c (pthread_allocate_stack): Set
5672 __pthread_nonstandard_stacks if user-specified stack is used.
5674 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
5676 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5677 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5679 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
5681 * pthread.c: Use a third signal __pthread_sig_debug distinct
5682 from __pthread_sig_cancel to notify gdb when a thread is
5684 * manager.c: Likewise.
5685 * internals.h: Likewise.
5686 * signals.c: The implementation of sigwait(s) assumed that
5687 all signals in s have signal handlers already attached.
5688 This is not required by the standard, so make it work
5689 also if some of the signals have no handlers.
5691 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5693 * linuxthreads.texi: Remove pointers from first @node. Move old
5694 @node spec inside comment.
5696 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
5698 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5701 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
5703 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5704 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5706 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
5708 * manager.c: Threads now send __pthread_sig_cancel on termination.
5709 Change clone call and signal masks.
5710 * thread.c (pthread_handle_sigrestart): Remove special code for
5712 (pthread_handle_sigcancel): In manager thread call
5713 __pthread_manager_sighandler.
5714 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5715 * sysdeps/i386/i686/pt-machine.h: Likewise.
5716 Patches by Xavier Leroy.
5718 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
5720 * spinlock.c (__pthread_unlock): Don't crash if called for an
5721 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5723 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5726 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
5728 * Examples/ex3.c: Wait until all threads are started before
5729 searching for the number to avoid race condition on very fast
5732 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5734 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5735 declaration since it's not needed.
5737 * sysdeps/pthread/pthread.h: Move internal functions to ...
5738 * internals.h: ...here.
5740 1998-12-02 H.J. Lu <hjl@gnu.org>
5742 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5743 SIGRTMIN is defined.
5744 (__pthread_sig_cancel): Likewise.
5746 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5748 * wrapsyscall.c: Include <sys/mman.h> for msync,
5749 <stdlib.h> for system and <termios.h> for tcdrain prototype.
5750 Correct msync declaration.
5752 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
5754 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5755 __libc_tsd_set): New macros for new interface.
5756 * no-tsd.c: New file, provide uninitialized defns of
5757 __libc_internal_tsd_get and __libc_internal_tsd_set.
5758 * Makefile (routines): Add no-tsd.
5760 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
5762 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5763 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5764 __libc_internal_tsd_set): Move decls to ...
5765 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5768 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5769 __libc_internal_tsd_set): Make these pointers to functions, not
5770 functions; remove #pragma weak decls for them.
5771 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5772 Define static functions and initialized pointers to them.
5774 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
5776 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5777 (CFLAGS-specific.c): Likewise.
5778 (CFLAGS-pthread.c): Likewise.
5779 (CFLAGS-ptfork.c): Likewise.
5780 (CFLAGS-cancel.c): Likewise.
5781 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5782 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5784 * mutex.c (pthread_mutex_init): Define as strong symbol.
5785 (pthread_mutex_destroy): Likewise.
5786 (pthread_mutex_trylock): Likewise.
5787 (pthread_mutex_lock): Likewise.
5788 (pthread_mutex_unlock): Likewise.
5789 (pthread_mutexattr_init): Likewise.
5790 (pthread_mutexattr_destroy): Likewise.
5791 (pthread_once): Likewise.
5792 * ptfork.c (pthread_atfork): Likewise.
5793 * specific.c (pthread_key_create): Likewise.
5794 (pthread_setspecific): Likewise.
5795 (pthread_getspecific): Likewise.
5797 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5799 * linuxthreads.texi: Fix punctuation after xref.
5801 1998-11-10 H.J. Lu <hjl@gnu.org>
5803 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5804 if it is defined in <linux/limits.h>.
5806 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
5808 * spinlock.h (__pthread_trylock): Define inline.
5809 (__pthread_lock): Add extra parameter to declaration. Declare
5810 using internal_function.
5811 (__pthread_unlock): Declare using internal_function.
5812 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
5813 of local variable self. Avoid recomputing self. Define using
5815 (__pthread_trylock): Remove.
5816 (__pthread_unlock): Define using internal_function.
5817 * cancel.c: Adjust for __pthread_lock interface change. Use already
5818 computed self value is possible.
5819 * condvar.c: Likewise.
5821 * manager.c: Likewise.
5822 * mutex.c: Likewise.
5823 * pthread.c: Likewise.
5824 * rwlock.c: Likewise.
5825 * semaphore.c: Likewise.
5826 * signals.c: Likewise.
5828 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
5830 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5831 __ to field names of the struct.
5832 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5834 (pthread_attr_t): Likewise.
5835 (pthread_cond_t): Likewise.
5836 (pthread_condattr_t): Likewise.
5837 (pthread_mutex_t): Likewise.
5838 (pthread_mutexattr_t): Likewise.
5839 (pthread_rwlock_t): Likewise.
5840 (pthread_rwlockattr_t): Likewise.
5841 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5842 * cancel.c: Likewise.
5843 * condvar.c: Likewise.
5844 * manager.c: Likewise.
5845 * mutex.c: Likewise.
5846 * pthread.c: Likewise.
5847 * ptlongjmp.c: Likewise.
5848 * rwlock.c: Likewise.
5849 * spinlock.c: Likewise.
5851 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
5853 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5856 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5859 * Makefile (libpthread-routines): Add pt-machine.
5860 * pt-machine.c: New file.
5861 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5862 yet defined. Use PT_EI in extern inline definitions.
5863 * sysdeps/arm/pt-machine.h: Likewise.
5864 * sysdeps/i386/pt-machine.h: Likewise.
5865 * sysdeps/i386/i686/pt-machine.h: Likewise.
5866 * sysdeps/m68k/pt-machine.h: Likewise.
5867 * sysdeps/mips/pt-machine.h: Likewise.
5868 * sysdeps/powerpc/pt-machine.h: Likewise.
5869 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5870 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5872 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5874 * semaphore.h: Include <sys/types.h> so that _pthread_descr
5877 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
5879 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5881 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5883 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5885 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5888 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5890 * signals.c (sigaction): Check that sig is less than NSIG to avoid
5891 array index overflow.
5893 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
5895 * sysdeps/pthread/semaphore.h: New file.
5897 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
5899 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5900 _LIBC_TSD_KEY_DL_ERROR.
5902 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
5904 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5905 * sysdeps/i386/pt-machine.h: Likewise.
5906 Suggested by Roland McGrath.
5908 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
5910 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5911 access thread data with non-constant offsets.
5912 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5915 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
5916 THREAD_SETMEM_NC definitions.
5918 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5920 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5922 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
5924 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5925 not already defined.
5926 (struct _pthread_descr_struct): Add p_self and p_nr field.
5927 * manager.c (__pthread_handles): Define second element to point
5929 (__pthread_handles_num): Initialize to 2.
5930 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5931 (pthread_start_thread): Likewise.
5932 (pthread_handle_create): Start search for free slot at entry 2.
5933 Initialize new fields p_self and p_nr.
5934 Call __clone with CLONE_PTRACE if available.
5935 (pthread_free): Call FREE_THREAD_SELF if available.
5936 * pthread.c (__pthread_initial_thread): Initialize new fields.
5937 (__pthread_manager_thread): Likewise.
5938 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5940 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5941 elements of the thread descriptor.
5942 * condvar.c: Likewise.
5943 * errno.c: Likewise.
5945 * manager.c: Likewise.
5946 * pthread.c: Likewise.
5947 * ptlongjmp.c: Likewise.
5948 * semaphore.c: Likewise.
5949 * signals.c: Likewise.
5950 * specific.c: Likewise.
5951 * spinlock.c: Likewise.
5953 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5955 * sysdeps/i386/useldt.h: New file.
5956 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5958 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5959 THREAD_SETMEM using __thread_self.
5960 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5962 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
5964 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5965 turned out that we didn't need to queue after all.
5967 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
5969 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5970 and wastes space; correct types.
5972 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
5974 * signals.c (sigaction): Handle NULL argument.
5976 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
5978 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5981 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5983 * Makefile (linuxthreads-version): Extract correct number from
5986 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
5988 * Banner: Bump version number to 0.8
5989 * FAQ.html: Many updates, in particular w.r.t. debugging.
5990 * manager.c: Support for non-default stacksize for
5991 LinuxThreads-allocated stacks;
5992 don't use guard pages for stacks with default size, rely on
5993 rlimit(RLIMIT_STACK) instead (it's cheaper).
5995 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5996 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5997 * condvar.c: Likewise.
5998 * internals.h: Likewise.
5999 * restart.h: Likewise.
6000 * signals.c: Likewise.
6001 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
6003 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6005 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
6006 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
6007 * Versions: Put __pthread_mutexattr_settype under version
6008 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
6009 __pthread_mutexattr_gettype.
6011 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6013 * sysdeps/pthread/bits/libc-lock.h: Make
6014 __pthread_mutexattr_settype weak. Don't make
6015 __pthread_mutexattr_setkind_np weak.
6017 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
6019 * manager.c (pthread_handle_create): Check whether sched_setscheduler
6020 call can succeed here.
6022 * mutex.c: Define __pthread_mutexattr_settype and make
6023 __pthread_mutexattr_setkind_np an alias.
6024 Likewise for __pthread_mutexattr_gettype.
6026 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
6028 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
6031 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
6033 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
6035 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6037 * Examples/ex6.c: Include <unistd.h> for usleep.
6039 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6041 * Examples/ex4.c (main): Use exit, not pthread_exit.
6043 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
6045 * Versions: Add __pthread_mutexattr_gettype and
6046 __pthread_mutexattr_settype.
6047 * lockfile.c: Use __pthread_mutexattr_settype instead of
6048 __pthread_mutexattr_setkind_np.
6049 * mutex.c: Define __pthread_mutexattr_gettype and
6050 __pthread_mutexattr_settype.
6052 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
6053 __pthread_mutexattr_settype.
6054 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
6055 Use __pthread_mutexattr_settype.
6057 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
6059 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
6060 * mutex.c: Define weak alias pthread_mutexattr_gettype and
6061 pthread_mutexattr_settype.
6062 * sysdeps/pthread/pthread.h: Declare these functions.
6063 Move pthread_sigmask and pthread_kill declaration in separate header.
6064 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
6066 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
6068 * Makefile: Add rules to compile and run tests.
6069 * Examples/ex1.c: Little changes to fix warnings.
6070 * Examples/ex2.c: Likewise.
6071 * Examples/ex3.c: Likewise.
6072 * Examples/ex4.c: Likewise.
6073 * Examples/ex5.c: Likewise.
6074 * Examples/ex6.c: New file.
6076 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
6078 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
6080 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6082 * attr.c: Include <string.h>.
6084 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
6086 * attr.c: Include errno.h. Use memcpy to copy sched_param.
6087 * internals.h: Include limits.h.
6088 * manager.c: Use memcpy to copy sched_param.
6089 * ptfork.c: Include errno.h.
6090 * pthread.c: Likewise.
6091 * semaphore.c: Likewise.
6092 * specific.c: Likewise.
6093 * spinlock.h: Likewise.
6094 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
6095 type definition to ...
6096 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
6098 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
6100 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6102 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6103 as macros as demanded in POSIX.1, Annex C.
6105 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
6107 * internals.h (struct pthread_request): For free use pthread_t
6108 instead of pthread_descr.
6109 * join.c (pthread_join): Pass thread_id, not th to manager.
6110 (pthread_detach): Likewise.
6111 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6112 (pthread_exited): Remove detached queue code.
6113 (pthread_handle_free): Expect thread ID parameter and use it to
6114 validate the thread decsriptor. Don't use detached queue.
6115 Patches by Xavier Leroy.
6117 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6119 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6120 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6121 __pthread_atfork, __pthread_key_create, __pthread_once.
6122 * internals.h: Doc fix.
6123 * pthread.c (__pthread_initialize): Define again.
6125 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
6127 * manager.c (pthread_exited): If thread is not detached put it on
6129 (pthread_handle_free): If thread is not on list with living threads
6130 search on list with detached threads.
6132 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6133 for new definition of pthread_rwlock_t.
6135 * spinlock.c: Correct test whether to compile
6136 __pthread_compare_and_swap or not.
6138 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
6140 * attr.c: Finish user stack support. Change locking code to be safe
6141 in situations with different priorities.
6142 * cancel.c: Likewise.
6143 * condvar.c: Likewise.
6144 * internals.h: Likewise.
6146 * manager.c: Likewise.
6147 * mutex.c: Likewise.
6148 * pthread.c: Likewise.
6149 * ptlongjmp.c: Likewise.
6150 * queue.h: Likewise.
6151 * rwlock.c: Likewise.
6152 * semaphore.c: Likewise.
6153 * semaphore.h: Likewise.
6154 * signals.c: Likewise.
6155 * spinlock.c: Likewise.
6156 * spinlock.h: Likewise.
6157 * sysdeps/pthread/pthread.h: Likewise.
6158 Patches by Xavier Leroy.
6160 * sysdeps/i386/i686/pt-machine.h: New file.
6162 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
6164 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6165 [sg]et_stackaddr prototypes always available.
6167 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6168 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6170 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
6172 * manager.c (pthread_free): Undo patch from 980430.
6173 Reported by David Wragg <dpw@doc.ic.ac.uk>.
6175 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
6177 * manager.c: Define __pthread_manager_adjust_prio and use it to
6178 increase priority when needed.
6179 * internals.h: Add prototype for __pthread_manager_adjust_prio.
6180 * mutex.c: Optimize mutexes to wake up only one thread.
6181 * pthread.c: Move PID of manager for global variable in structure
6183 Patches by Xavier Leroy.
6185 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
6187 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6189 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6191 * attr.c: Correct typo.
6193 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
6195 * manager.c (pthread_free): Unmap guard before the stack.
6196 Patch by Matthias Urlichs.
6198 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
6200 * manager.c (pthread_free): Detect already free child.
6201 Patch by Xavier Leroy, reported by Matthias Urlichs.
6203 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6205 * Makefile (linuxthreads-version): Renamed back from
6208 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
6210 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6213 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
6215 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6216 * internals.h: Add definitions for new spinlock implementation.
6217 * ptlongjmp.c: New file.
6218 * spinlock.c: New file.
6219 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6220 new function __pthread_acquire to prevent deadlocks with thread
6221 with different priorities.
6222 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6224 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6226 * manager.c (__pthread_manager): Reduce first argument to select
6227 to include just the needed file descriptor.
6229 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
6231 * manager.c: Fix last patch which caused core dumps.
6233 * pthread.c: Correctly handle missing SIGRTMIN.
6235 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6237 * libpthread.map: Add __libc_internal_tsd_get and
6238 __libc_internal_tsd_set. Add missing cancelable functions. Export
6239 libc internal versions of the cancelable functions.
6241 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
6243 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6245 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
6247 * attr.c: Implement pthread_attr_[gs]etguardsize,
6248 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6249 Change pthread_attr_init to have two interfaces.
6250 * internals.h (struct _pthread_descr_struct): Add new fields for
6252 * libpthread.map: Add names in GLIBC_2.1 section.
6253 * manager.c (pthread_handle_create): Implement guardsize and
6255 (pthread_free): Likewise.
6256 * pthread.c (pthread_create): Add new interface for changed
6258 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6259 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6262 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
6264 * manager.c: Enable resetting of the thread scheduling policy
6265 to SCHED_OTHER when the parent thread has a different one.
6267 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
6269 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6270 _POSIX_ASYNCHRONOUS_IO.
6272 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6274 * mutex.c: Implement new mutex types.
6276 * internals.h: Include <signal.h>.
6278 * libpthread.map: Add __erno_location and __h_errno_location.
6280 * errno.c: Return pointer to variable actually in use. This might
6281 not be the one in the thread structure.
6282 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6284 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6285 of manager thread structure.
6286 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6288 * pthread.c: Adapt initializer for thread structures.
6289 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6290 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6291 current thread to global variables.
6293 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
6295 * rwlock.c: New file.
6296 * Makefile (libpthread-routines): Add rwlock.
6297 * sysdeps/pthread/pthread.h: Define data structures and declare
6299 * libpthread.map: Add new functions.
6301 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
6303 * sysdeps/arm/pt-machine.h: New file; add ARM support.
6304 * sysdeps/arm/Implies: likewise.
6305 * README: Document it.
6307 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6309 * signals.c: Remove unneeded initializer for sigwaited, saving a
6312 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6314 * semaphore.c (sem_init): Set sem_spinlock only if available.
6316 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
6318 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6319 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6321 * Makefile: Update from LinuxThreads 0.7.
6322 * internals.h. Likewise.
6323 * manager.c: Likewise.
6324 * mutex.c: Likewise.
6325 * pthread.c: Likewise.
6326 * signals.c: Likewise.
6327 * specific.c: Likewise.
6328 * Examples/ex3.c: Likewise.
6330 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
6332 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6335 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
6337 * wrapsyscall.c: Add socket functions which are also cancelation
6340 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
6342 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6343 New functions for fast thread specific data within libc.
6345 * internals.h: Add new array p_libc_specific to struct
6346 _pthread_descr_struct.
6348 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6350 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
6352 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6353 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6355 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
6357 * internals.h (struct _pthread_descr_struct): Add definitions for
6358 two-level specific key handling.
6359 * manager.c (pthread_handle_create): Initialize specific memory array.
6360 * specific.c: Implement two-level key handling.
6361 * weaks.c: Don't provide dummy key handling.
6362 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6363 Add definition of __libc_key_t.
6364 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6366 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6367 PTHREAD_DESTRUCTOR_ITERATIONS.
6369 * manager.c (pthread_handle_create): Compare mmap result with
6372 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6373 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6375 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
6377 sysdeps/sparc -> sysdeps/sparc/sparc32
6378 sysdeps/sparc64 -> sysdeps/sparc/sparc64
6380 * internals.h: Change definition of THREAD_SELF to be an expression,
6381 not a statement that did a return.
6382 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6383 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6384 Follow Solaris and use a "system reserved" register (%g6) to hold
6385 the thread descriptor.
6386 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6388 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
6390 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
6391 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6392 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6394 * semaphore.c: Include spinlock.h only when needed.
6396 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6397 keys for entries not in use.
6399 * weaks.c: Implement key handling functions for real.
6401 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
6403 Initial sparc64-linux support:
6404 * sysdeps/sparc64/Implies: New file.
6405 * sysdeps/sparc64/pt-machine.h: Likewise.
6407 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
6409 * semaphore.c: Include spinlock.h at correct place.
6412 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
6414 The Great Bit File Move:
6415 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6416 * sysdeps/powerpc/semaphorebits.h: Likewise.
6417 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6418 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6419 * sysdeps/pthread/libc-lock.h: -> bits/
6420 * sysdeps/pthread/stdio-lock.h: Likewise.
6421 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6422 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6423 * semaphore.h: Likewise.
6424 * sysdeps/pthread/pthread.h: Likewise.
6426 * lockfile.c: <foo.h> -> <bits/foo.h>.
6427 * semaphore.h: Likewise.
6429 * Makefile: (headers): foo.h -> bits/foo.h.
6430 * sysdeps/pthread/Makefile: Likewise.
6432 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6434 * semaphore.c (sem_init): Set sem_spinlock only if available.
6436 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6439 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
6441 Update from LinuxThreads 0.6.
6443 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6444 and __sched_get_priority_min instead of names without `__'.
6446 * manager.c: Rewrite large parts to implement opaque pthread_t.
6448 * cancel.c: Adapt for opaque pthread_t type.
6449 * condvar.c: Likewise.
6450 * errno.c: Likewise.
6452 * mutex.c: Likewise.
6453 * pthread.c: Likewise.
6454 * signals.c: Likewise.
6455 * specific.c: Likewise.
6456 * restart.h: Likewise.
6457 * queue.h: Likewise.
6458 * Examples/ex3.c: Likewise.
6459 * Examples/ex4.c: Likewise.
6460 * sysdeps/pthread/pthread.h: Likewise.
6462 * pthread.c: Accumulate time for all threads in thread manager.
6464 * semaphore.c: Implement fallback implementation for architectures
6465 sometimes missing compare-exchange operations.
6467 * cancel.c (pthread_cancel): Validate handle argument.
6468 * join.c (pthread_join): Likewise.
6469 (pthread_detach): Likewise.
6470 * signals.c (pthread_kill): Likewise.
6472 * spinlock.h (acquire): Use __sched_yield not sched_yield.
6474 * queue.h (enqueue): Enqueue thread according to priority.
6476 * internals.c (struct pthread_start_args): New struct for passing
6477 args to cloning function.
6478 (struct _pthread): Rename to _pthread_descr_struct and adapt for
6481 * Examples/Makefile (clean): Pass -f option to rm.
6483 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6484 and define TEST_FOR_COMPARE_AND_SWAP.
6485 * sysdeps/i386/i486/pt-machine.h: Removed.
6487 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6490 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
6492 * restart.h (suspend): Clear p_signal before suspending.
6493 (suspend_with_cancellation): Likewise.
6494 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6496 * weaks.c: Make __pthread_key_create return 1.
6497 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6498 __libc_getspecific, __libc_setspecific, and __libc_key_t.
6499 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6502 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
6504 * sysdeps/sparc/pt-machine (RELEASE): Fix.
6506 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
6508 * sysdeps/powerpc/Implies: Added.
6509 * sysdeps/powerpc/pt-machine.h: Added.
6510 * sysdeps/powerpc/semaphorebits.h: Added.
6512 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
6514 * pthread.c (__pthread_initial_thread): Correct
6516 (__pthread_manager_thread): Likewise.
6517 Reported by Andreas Jaeger.
6519 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
6521 Since sigset_t no longer fits in a register, we can't pass in the
6522 thread's initial mask so easily. Take this opportunity to simplify
6523 the clone implementation by only accepting a single void* argument.
6525 * manager.c (__pthread_manager): Put thread vitals in the thread
6526 struct instead of as arguments through clone.
6527 (pthread_start_thread): Look for them there.
6528 * internals.h (struct _pthread): Add p_initial_fn,
6529 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
6530 * pthread.c (pthread_initialize_manager): Revise clone invocation.