1 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3 * Makefile (tests): Add tst-align.
4 * tst-align.c: New test.
5 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Add
6 -mpreferred-stack-boundary=4.
8 2004-12-12 Ulrich Drepper <drepper@redhat.com>
10 * internals.h: Include <stdbool.h> to match includes used in nptl.
12 2004-12-01 Jakub Jelinek <jakub@redhat.coM.
14 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
15 _POSIX_THREAD_CPUTIME): Define to 0.
16 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
17 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
18 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
19 __timer_signal_thread_tclk): Remove.
20 (init_module): Remove their initialization.
21 (thread_cleanup): Remove their cleanup assertions.
22 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
23 __timer_signal_thread_tclk): Remove.
24 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
25 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
26 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
27 * tst-clock1.c (do_test): Check for availability of CPU clock.
29 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
31 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use.
32 * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
34 2004-12-02 Roland McGrath <roland@redhat.com>
36 * Makefile (libpthread-nonshared): Variable removed.
37 ($(objpfx)libpthread_nonshared.a): Target removed.
38 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
39 These are now handled by generic magic from
40 libpthread-static-only-routines being set.
42 2004-11-27 Ulrich Drepper <drepper@redhat.com>
44 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
45 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
46 _POSIX_THREAD_PRIO_PROTECT): Define.
47 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
48 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
49 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
51 2004-11-26 Jakub Jelinek <jakub@redhat.com>
53 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
54 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
55 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
56 _POSIX_TYPED_MEMORY_OBJECTS): Define.
57 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
58 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
59 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
61 2004-11-05 Maciej W. Rozycki <macro@mips.com>
63 * sysdeps/mips/pspinlock.c: Include <sgidefs.h>. Use _ABIO32,
64 _ABIN32 and _ABI64 for ABI selection throughout.
65 * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
66 ABI selection throughout.
68 2004-10-18 Roland McGrath <roland@redhat.com>
71 * Makefile (linuxthreads-CPPFLAGS): New variable;
72 adds -DIS_IN_linuxthreads=1.
73 * sysdeps/i386/tls.h: Protect "useldt.h" with
74 [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
75 * sysdeps/i386/i686/pt-machine.h: Revert last change.
77 2004-10-14 Jakub Jelinek <jakub@redhat.com>
79 * sysdeps/pthread/errno-loc.c: Don't undef #errno
80 if RTLD_PRIVATE_ERRNO.
82 2004-10-05 Dwayne Grant McConnell <dgm69@us.ibm.com>
84 * pthread.c: Mask restart signal during cancel signal handler.
86 2004-10-05 Jakub Jelinek <jakub@redhat.com>
88 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
89 _POSIX_THREAD_CPUTIME): Define to 0.
91 2004-10-04 Ulrich Drepper <drepper@redhat.com>
93 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
94 and _POSIX_THREAD_CPUTIME to zero.
95 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
97 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
98 _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
99 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
100 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
101 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
103 2004-09-25 Roland McGrath <roland@redhat.com>
106 * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
107 [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
109 2004-09-24 Roland McGrath <roland@redhat.com>
112 * sysdeps/i386/tls.h: Move #include "useldt.h" outside
113 of [__ASSUME_LDT_WORKS > 0] test.
114 Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
116 2004-09-21 Roland McGrath <roland@redhat.com>
118 * Versions: Add comment about linuxthreads' frozen ABI.
120 2004-09-20 Ulrich Drepper <drepper@redhat.com>
122 * Versions: Remove exports for pthread_set*id_np functions.
123 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
125 * Makefile: Don't build pthread_set*id code for now.
127 2004-09-19 Ulrich Drepper <drepper@redhat.com>
129 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
130 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
131 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
132 and pthread_setresuid_np.
133 * pthread_setgid_np.c: New file.
134 * pthread_setuid_np.c: New file.
135 * pthread_setegid_np.c: New file.
136 * pthread_seteuid_np.c: New file.
137 * pthread_setregid_np.c: New file.
138 * pthread_setreuid_np.c: New file.
139 * pthread_setresgid_np.c: New file.
140 * pthread_setresuid_np.c: New file.
141 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
142 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
143 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
144 and pthread_setresuid_np.
145 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
146 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
147 pthread_setregid, and pthread_setresgid.
149 2004-09-12 Ulrich Drepper <drepper@redhat.com>
151 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
153 * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
154 for __USE_XOPEN2K. [BZ #320]
156 2004-09-04 Jakub Jelinek <jakub@redhat.com>
158 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
160 2004-09-07 Ulrich Drepper <drepper@redhat.com>
162 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
163 the initialization function might throw.
165 2004-08-30 Roland McGrath <roland@frob.com>
167 * Makefile (libpthread-abi-frozen): New variable.
169 2004-08-26 Roland McGrath <roland@redhat.com>
171 * configure.in: New file. If nptl add-on is also selected, barf if
172 explicit and elide ourselves if implicit.
173 * configure: Now generated.
175 2004-08-25 Richard Sandiford <rsandifo@redhat.com>
177 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
178 __local_multiple_threads): Fix definitions for IS_IN_librt.
179 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
181 2004-08-22 Andreas Schwab <schwab@suse.de>
183 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
184 Save gp around CENABLE/CDISABLE calls.
186 2004-08-15 Roland McGrath <roland@frob.com>
188 * pthread_atfork.c: Update copyright terms including special exception
189 for these trivial files, which are statically linked into executables
190 that use dynamic linking for the significant library code.
192 2004-08-09 Jakub Jelinek <jakub@redhat.com>
194 * libc-tsd.c: Move resolv.h include before the #if.
195 (__res_maybe_init): New function. Add libc_hidden_def.
197 2004-08-02 Ulrich Drepper <drepper@redhat.com>
199 * linuxthreads.texi (Cleanup Handlers): Fix typo.
200 Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
202 2004-07-23 Jakub Jelinek <jakub@redhat.com>
205 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
206 instead of clockid_t.
208 2004-07-21 Roland McGrath <roland@redhat.com>
210 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
212 2004-07-02 Roland McGrath <roland@redhat.com>
214 * configure: Don't exit.
216 2004-07-20 Alexandre Oliva <aoliva@redhat.com>
218 * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
220 * sysdeps/mips/atomicity.h: Likewise.
222 2004-07-19 Alexandre Oliva <aoliva@redhat.com>
224 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
225 Remove redundant override that missed -g0.
227 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
229 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
230 (__local_multiple_threads): Define for librt.
231 (SINGLE_THREAD_P): Likewise.
233 2004-07-07 Jakub Jelinek <jakub@redhat.com>
235 * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
236 using other thread's clock.
237 * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
238 * ptclock_settime.c (__pthread_clock_settime): Likewise.
239 * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
241 Reported by Bernd Schmidt <bernds@redhat.com>.
242 * Makefile (librt-tests): Add tst-clock1.
243 * tst-clock1.c: New test.
245 * sysdeps/x86_64/Versions: New file.
246 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
247 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
249 2004-04-16 Andreas Schwab <schwab@suse.de>
251 * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
253 2004-07-05 Jakub Jelinek <jakub@redhat.com>
255 * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
256 __pthread_spin_trylock): Use constraint "m" instead of "0" for
258 * sysdeps/ia64/pt-machine.h (__compare_and_swap,
259 __compare_and_swap_with_release_semantic, testandset): Use
260 constraint "m" instead of "0" for futex.
262 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
264 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
265 branch offset for a PLT entry.
266 (CDISABLE): Likewise.
268 2004-05-31 Andreas Jaeger <aj@suse.de>
270 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
271 Set to -fno-unit-at-a-time.
272 Patch by Dan Kegel <dank@kegel.com>.
274 2004-05-04 Jakub Jelinek <jakub@redhat.com>
276 * tst-stack1.c: Don't include mcheck.h.
277 (do_test): Make sure user defined stacks aren't reused,
278 don't free them at the end. [BZ #110]
280 2004-05-02 Jakub Jelinek <jakub@redhat.com>
282 * manager.c: Include not-cancel.h.
283 (__pthread_manager): Use read_not_cancel instead of __libc_read.
284 (pthread_start_thread, __pthread_manager_sighandler): Use
285 write_not_cancel instead of __libc_write.
286 (pthread_reap_children): Use waitpid_not_cancel instead of
288 * pthread.c: Include not-cancel.h.
289 (__pthread_initialize_minimal, __pthread_create_2_1,
290 pthread_onexit_process, __pthread_message): Use
291 write_not_cancel instead of __libc_write.
292 (__pthread_initialize_manager): Likewise. Use close_not_cancel
293 instead of __libc_close.
294 (__pthread_reset_main_thread): Use close_not_cancel instead of
296 * join.c: Include not-cancel.h.
297 (__pthread_do_exit, pthread_join, pthread_detach): Use
298 write_not_cancel instead of __libc_write.
299 * semaphore.c: Include not-cancel.h.
300 (__new_sem_post): Use write_not_cancel instead of __libc_write.
301 * specific.c: Include not-cancel.h.
302 (pthread_key_delete): Use write_not_cancel instead of __libc_write.
304 2004-05-01 Jakub Jelinek <jakub@redhat.com>
306 * Versions (libc): Add __on_exit and __libc_sigaction.
308 2004-04-28 Jakub Jelinek <jakub@redhat.com>
310 * semaphore.c (sem_timedwait): Return -1 and set errno instead of
311 returning error number [BZ #133]. Patch by <rmhaddad@yahoo.com>.
313 2004-04-22 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
315 * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
316 reference in PIC case.
318 2004-04-20 Jakub Jelinek <jakub@redhat.com>
320 * oldsemaphore.c (SEM_VALUE_MAX): Remove.
322 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
324 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
325 for librt. Save the return value to a safe register.
326 (CDISABLE): Define for librt. Set the function argument correctly.
328 2004-04-18 Jakub Jelinek <jakub@redhat.com>
330 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
331 (PSEUDO_CANCEL): Define.
333 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
334 CDISABLE): For librt, append @PLT.
336 2004-04-17 Jakub Jelinek <jakub@redhat.com>
338 * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
340 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
341 return it_value { 0, 0 }.
342 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
344 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
345 assertion for SIGEV_NONE.
346 (thread_attr_compare): Compare all attributes, not just a partial
349 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
351 2004-04-17 Ulrich Drepper <drepper@redhat.com>
353 * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
355 2004-04-16 Ulrich Drepper <drepper@redhat.com>
357 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
359 2004-04-13 Jakub Jelinek <jakub@redhat.com>
361 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
363 2004-04-12 Ulrich Drepper <drepper@redhat.com>
365 * sysdeps/unix/sysv/linux/mq_notify.c: New file.
367 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
369 (CDISABLE): Likewise.
371 2004-04-08 Jakub Jelinek <jakub@redhat.com>
373 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
374 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
375 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
376 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
377 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
379 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
380 (_POSIX_MESSAGE_PASSING): Define.
382 2004-04-10 Andreas Jaeger <aj@suse.de>
384 * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
385 to avoid warnings with GCC 3.5.
387 2004-04-09 Steven Munroe <sjmunroe@us.ibm.com>
389 * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
390 __thread_self assignment.
391 (THREAD_DTV): Replace __thread_register with __thread_self.
392 (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
395 2004-04-08 Alexandre Oliva <aoliva@redhat.com>
397 * signals.c (pthread_sigmask): Don't ever block or mask
400 2004-03-11 Steven Munroe <sjmunroe@us.ibm.com>
402 * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
404 2004-03-23 Ulrich Drepper <drepper@redhat.com>
406 * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
407 * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
409 2004-03-12 Ulrich Drepper <drepper@redhat.com>
411 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
412 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
413 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
414 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
416 2004-03-08 Andreas Jaeger <aj@suse.de>
418 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
419 dl_osversion is readonly.
421 2004-03-07 Ulrich Drepper <drepper@redhat.com>
423 * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
425 * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
427 2004-02-20 Steven Munroe <sjmunroe@us.ibm.com>
429 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
430 valid for SHARED case. Correct spelling of __vmx_longjmp.
432 * sysdeps/powerpc/pspinlock.c: Move from here.
433 * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
434 * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
435 * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
436 and __compare_and_swap32_with_release_semantics.
438 2004-02-20 Jakub Jelinek <jakub@redhat.com>
440 * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
441 (tests): Remove $(objpfx)tst-stack1-mem.
442 (tst-stack1-ENV): Remove.
443 ($(objpfx)tst-stack1-mem): Remove.
445 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
446 (__syscall_error_handler2): Call CDISABLE.
447 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
448 (__syscall_error_handler2): Call CDISABLE.
450 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
452 2004-02-10 Steven Munroe <sjmunroe@us.ibm.com>
454 * Makefile (libpthread-routines): Add ptcleanup.
455 * ptlongjmp.c: Removed.
456 * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
457 * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
458 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
459 Version longjmp, siglongjmp for GLIBC_2.3.4.
460 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
462 2004-01-22 Andreas Jaeger <aj@suse.de>
464 * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
465 (__pthread_release): Likewise.
467 2004-01-16 Richard Henderson <rth@redhat.com>
469 * attr.c: Include ldsodefs.h.
470 (pthread_getattr_np): Don't declare __libc_stack_end.
472 2004-01-09 Steven Munroe <sjmunroe@us.ibm.com>
474 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
475 [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
476 __lib*_multiple_threads.
477 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
478 [!HAVE_TLS_SUPPORT]: Likewise.
480 2004-01-13 Roland McGrath <roland@redhat.com>
482 * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
485 2004-01-10 Andreas Jaeger <aj@suse.de>
487 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
489 2004-01-01 Andreas Jaeger <aj@suse.de>
491 * Makefile (generated): Add missing files.
493 2003-12-31 Ulrich Drepper <drepper@redhat.com>
495 * attr.c (pthread_getattr_np): Make sure stack info returned for
496 main thread does not overlap with any other VMA.
497 Patch by Jakub Jelinek.
499 2003-12-29 Jakub Jelinek <jakub@redhat.com>
501 * sysdeps/ia64/tls.h: Include dl-sysdep.h.
502 (INIT_SYSINFO): Define.
503 (TLS_INIT_TP): Use it.
505 2003-12-28 Carlos O'Donell <carlos@baldric.uwo.ca>
507 * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
509 2003-12-26 Jakub Jelinek <jakub@redhat.com>
511 * sysdeps/pthread/pthread.h (pthread_setcancelstate,
512 pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
514 * semaphore.h (sem_wait, sem_timedwait): Likewise.
516 2003-12-17 Jakub Jelinek <jakub@redhat.com>
518 * manager.c (pthread_free): Call _dl_deallocate_tls even for
520 * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
522 (pthread_onexit_process): Update comment.
523 * Makefile (tests): Add tst-stack1. Depend on $(objpfx)tst-stack1-mem.
524 (generated): Add tst-stack1.mtrace and tst-stack1-mem.
525 (tst-stack1-ENV): Set.
526 ($(objpfx)tst-stack1-mem): New.
527 * tst-stack1.c: New test.
529 2003-12-16 Steven Munroe <sjmunroe@us.ibm.com>
531 * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
532 conditional so MULTIPLE_THREADS_OFFSET is generated for both.
533 * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
534 so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
535 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
538 2003-12-04 Steven Munroe <sjmunroe@us.ibm.com>
540 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
541 (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
543 2003-12-10 David Mosberger <davidm@hpl.hp.com>
545 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
546 message. Add include of <stddef.h>.
547 (INIT_NEW_WAY): New macro.
548 (INIT_OLD_WAY): Likewise.
549 (_init): Add unwind directives. Invoke
550 __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
552 (_init_EPILOG_BEGINS): Add unwind-directives. Drop unused .regstk
554 (_fini): Add unwind directives. Drop unnecessary .align 16
555 directive (bundles are always 16-byte aligned).
556 (_fini_EPILOG_BEGINS): Add unwind-directives.
558 2003-11-19 David Mosberger <davidm@hpl.hp.com>
560 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
562 2003-12-10 Andreas Jaeger <aj@suse.de>
563 Ruediger Oertel <ro@suse.de>
565 * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
567 2003-11-30 Andreas Jaeger <aj@suse.de>
569 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
570 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
573 2003-11-04 Jakub Jelinek <jakub@redhat.com>
575 * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
576 __libc_sigaction if it has been one of the special values before.
578 2003-10-06 Carlos O'Donell <carlos@baldric.uwo.ca>
580 * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
581 (__pthread_find_self): Likewise.
582 * manager.c (thread_segment): _STACK_GROWS_UP case added.
584 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
586 * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
588 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
590 * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
592 2003-10-07 Jakub Jelinek <jakub@redhat.com>
594 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
596 (SAVE_OLDTYPE_0): Fix a typo.
598 2003-10-02 Ulrich Drepper <drepper@redhat.com>
600 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
603 2003-10-02 Jakub Jelinek <jakub@redhat.com>
605 * Makefile (tests): Add tst-cancel8.
606 * tst-cancel8.c: New test.
608 2003-10-02 Ulrich Drepper <drepper@redhat.com>
610 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
611 restoring of the old cancellation type.
613 2003-09-10 Chris Demetriou <cgd@broadcom.com>
615 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
617 2003-09-30 Jakub Jelinek <jakub@redhat.com>
619 * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
620 mutex_lock, mutex_trylock, mutex_unlock): Remove.
622 2003-09-27 Wolfram Gloger <wg@malloc.de>
624 * sysdeps/pthread/malloc-machine.h: New file.
626 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
628 * attr.c (__pthread_attr_init_2_1): Double __guardsize size
629 if NEED_SEPARATE_REGISTER_STACK is defined.
631 2003-09-22 Philip Blundell <philb@gnu.org>
633 * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
634 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
636 * pthread.c (__pthread_elements): Initialise these new elements.
637 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
639 (__libc_cleanup_pop): Likewise.
641 2003-09-22 Jakub Jelinek <jakub@redhat.com>
643 * attr.c: Include stdlib.h.
645 2003-09-18 Jakub Jelinek <jakub@redhat.com>
647 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
649 * tst-attr1.c: New test.
650 * Makefile (tests): Add tst-attr1.
652 2003-09-17 Philip Blundell <philb@gnu.org>
654 * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
655 libpthread is loaded. Elide backwards compatibility code when not
658 2003-09-17 Jakub Jelinek <jakub@redhat.com>
660 * descr.h (manager_thread): Rename to...
661 (__pthread_manager_threadp): ... this.
662 * pthread.c (manager_thread): Define to __pthread_manager_threadp.
663 (__pthread_manager_threadp): New variable.
664 * internals.h (__manager_thread): Define to
665 __pthread_manager_threadp if USE_TLS.
667 2003-09-15 Jakub Jelinek <jakub@redhat.com>
669 * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
670 CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
671 -mpreferred-stack-boundary=4.
673 2003-09-16 Ulrich Drepper <drepper@redhat.com>
675 * attr.c (pthread_getattr_np): Correctly fill in the stack-related
676 values for the initial thread.
678 2003-09-17 Jakub Jelinek <jakub@redhat.com>
680 * pthread.c (manager_thread): Remove static, add attribute_hidden.
681 (thread_self_stack): Rename to...
682 (__pthread_self_stack): ... this. Remove static.
683 (pthread_handle_sigcancel): Use check_thread_self ().
684 (pthread_handle_sigrestart): Likewise.
685 * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
687 * descr.h (manager_thread): Declare.
688 * internals.h (__pthread_self_stack): New prototype.
689 (__manager_thread): Define.
690 (check_thread_self): New function.
692 2003-09-15 Jakub Jelinek <jakub@redhat.com>
694 * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
695 (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
697 2003-09-12 Jakub Jelinek <jakub@redhat.com>
699 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
700 (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
701 __SLONGWORD_TYPE otherwise.
703 2003-09-11 Steven Munroe <sjmunroe@us.ibm.com>
705 * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
706 [READ_MEMORY_BARRIER]: Define.
707 [WRITE_MEMORY_BARRIER]: Define.
709 2003-09-10 Jakub Jelinek <jakub@redhat.com>
711 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
712 ptr___pthread_cond_timedwait to the end of the structure to avoid
713 breaking Wine unnecessarily.
715 2003-09-08 Jakub Jelinek <jakub@redhat.com>
717 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
719 2003-09-02 Jakub Jelinek <jakub@redhat.com>
721 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
722 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
723 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
724 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
725 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
726 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
727 * attr.c (__old_pthread_attr_setstacksize,
728 __old_pthread_attr_setstack): New functions.
729 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
730 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
731 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
732 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
733 * tststack.c: Include limits.h and sys/param.h.
734 (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
736 * barrier.c (__pthread_barrierattr_getpshared): Always
737 return PTHREAD_PROCESS_PRIVATE.
738 (pthread_barrierattr_setpshared): Return EINVAL if pshared
739 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
741 2003-09-02 Jakub Jelinek <jakub@redhat.com>
743 * sysdeps/sparc/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
744 pthread is bigger than struct _pthread_descr_struct, use NPTL struct
747 2003-09-02 Ulrich Drepper <drepper@redhat.com>
749 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
750 (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
753 * barrier.c (pthread_barrierattr_setpshared): We don't handle
754 inter-process barriers.
756 2003-09-01 Jakub Jelinek <jakub@redhat.com>
758 * Makefile (tests): Add tst-tls1.
759 (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
760 ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
761 ($(objpfx)tst-tls1): New.
762 ($(objpfx)tst-tls2.out): Likewise.
763 (tests): Depend on $(objpfx)tst-tls2.out.
764 * tst-tls1.c: New test.
766 * tst-tls1mod.c: New.
767 * tst-tls1moda.c: New.
768 * tst-tls1modb.c: New.
769 * tst-tls1modc.c: New.
770 * tst-tls1modd.c: New.
771 * tst-tls1mode.c: New.
772 * tst-tls1modf.c: New.
773 * tst-tls2.sh: New test.
775 * internals.h (__pthread_cond_timedwait): New prototype.
776 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
777 ptr___pthread_cond_timedwait.
778 * pthread.c (__pthread_functions): Initialize them.
779 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
780 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
781 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
782 pthread_cond_timedwait@@GLIBC_2.3.2.
784 2003-08-27 Ulrich Drepper <drepper@redhat.com>
786 * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
787 pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
788 __THROW to match NPTL.
790 2003-08-13 Ulrich Drepper <drepper@redhat.com>
792 * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
793 -DBROKEN_THREAD_SIGNALS.
795 2003-08-11 Steven Munroe <sjmunroe@us.ibm.com>
797 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
798 Correct spelling of per thread resolver state.
800 2003-08-07 Jakub Jelinek <jakub@redhat.com>
802 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
803 (__rtld_lock_default_lock_recursive,
804 __rtld_lock_default_unlock_recursive): Define.
805 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
806 __rtld_lock_unlock_recursive): Define using
807 GL(_dl_rtld_*lock_recursive).
808 * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
809 and _dl_rtld_unlock_recursive. Lock GL(_dl_load_lock) the same
810 number of times as GL(_dl_load_lock) using non-mt implementation was
813 2003-07-31 Jakub Jelinek <jakub@redhat.com>
815 * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
816 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
818 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
820 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
822 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
823 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
824 PTHREAD_STACK_MIN in comments.
826 * sysdeps/alpha/pt-machine.h (PT_EI): Add
827 __attribute__((always_inline)).
828 * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
829 * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
830 * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
831 * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
832 * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
833 * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
834 * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
835 * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
836 * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
837 * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
838 * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
839 * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
840 * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
841 * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
842 * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
843 * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
844 * spinlock.h (__pthread_set_own_extricate_if): Likewise.
845 * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
847 * Examples/ex13.c (main): Change res type to void * to avoid
849 * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
851 2003-07-30 Jakub Jelinek <jakub@redhat.com>
853 * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
855 (pthread_initialize): Initialize GL(dl_init_static_tls).
857 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
859 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
860 before __timer_dealloc.
861 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
862 Don't call list_unlink.
864 2003-07-29 Roland McGrath <roland@redhat.com>
866 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
868 2003-07-25 Roland McGrath <roland@redhat.com>
870 * manager.c (pthread_start_thread): Fix typo in last change.
872 2003-07-14 Guido Guenther <agx@sigxcpu.org>
874 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
875 use L() for local labels.
877 2003-07-22 Jakub Jelinek <jakub@redhat.com>
879 * sysdeps/alpha/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Change to 0.
880 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Alignment of struct
881 _pthread_descr_struct.
882 (TLS_PRE_TCB_SIZE): Add sizeof (tcbhead_t) and pad to align.
883 If in ld.so and NPTL struct pthread is bigger than struct
884 _pthread_descr_struct, use NPTL struct pthread size.
885 (TLS_TCB_OFFSET): Define.
886 (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV,
887 THREAD_SELF, INIT_THREAD_SELF): Changed to match NPTL tls.h
889 * sysdeps/i386/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
890 pthread is bigger than struct _pthread_descr_struct, use NPTL struct
892 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Likewise.
893 * sysdeps/powerpc/tls.h (TLS_PRE_TCB_SIZE): Likewise.
894 * sysdeps/s390/tls.h (TLS_TCB_SIZE): Likewise.
895 * sysdeps/sh/tls.h (TLS_PRE_TCB_SIZE): Likewise.
896 * sysdeps/x86_64/tls.h (TLS_TCB_SIZE): Likewise.
897 * sysdeps/pthread/Makefile (gen-as-const-headers): Add
898 nptl-struct-pthread.sym if nptl tree is present.
899 (before-compile): Add $(common-objpfx)nptl-struct-pthread.h
900 if nptl tree is not present.
901 (common-generated): Add nptl-struct-pthread.h.
902 ($(common-objpfx)nptl-struct-pthread.h): New rule.
903 * sysdeps/pthread/nptl-struct-pthread.sym: New file.
905 2003-07-22 Jakub Jelinek <jakub@redhat.com>
907 * descr.h (struct _pthread_descr_struct): Provide p_res member
908 even if USE_TLS && HAVE___THREAD.
909 * sysdeps/pthread/res-state.c (__res_state): Return __resp
911 * manager.c: Include resolv.h.
912 (pthread_start_thread): Initialize __resp.
913 * libc-tls-loc.c (__res_state): Return __resp.
914 * Makefile (tests): Add tst-_res1.
915 (modules-names, extra-objs, test-extras, test-modules): Add support
917 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
918 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
920 * tst-_res1.c: New test.
921 * tst-_res1mod1.c: New test.
922 * tst-_res1mod2.c: New test.
924 2003-07-20 Ulrich Drepper <drepper@redhat.com>
926 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
929 * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
931 2003-07-14 Ulrich Drepper <drepper@redhat.com>
933 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
934 in test for compilation in libc.
936 2003-07-04 Jakub Jelinek <jakub@redhat.com>
938 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
939 different symbol for the cancellation syscall wrapper and
940 non-cancellation syscall wrapper.
941 (PSEUDO_END): Define.
943 2003-07-05 Richard Henderson <rth@redhat.com>
945 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
947 2003-06-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
949 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
952 2003-06-21 Andreas Schwab <schwab@suse.de>
954 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
957 2003-06-20 Richard Henderson <rth@redhat.com>
959 * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
960 Remove ptw-osf_sigprocmask.
962 2003-06-18 Jakub Jelinek <jakub@redhat.com>
964 * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
965 __librt_disable_asynccancel): Declare.
966 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
968 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
970 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
971 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
972 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
973 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
974 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
975 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
976 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
977 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
978 * sysdeps/x86_64/tcb-offsets.sym: New file.
979 * sysdeps/x86_64/Makefile: New file.
980 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
981 * Versions (libc): Export __librt_enable_asynccancel,
982 __librt_disable_asynccancel and __librt_multiple_threads as
984 * libc-cancellation.c (__librt_multiple_threads,
985 __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
987 2003-06-12 Steven Munroe <sjmunroe@us.ibm.com>
989 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
990 (SINGLE_THREAD_P): Replace @ got notation with @toc.
992 2003-06-11 Ulrich Drepper <drepper@redhat.com>
994 * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
995 initializer [PR libc/5052].
997 2003-06-09 Andreas Schwab <schwab@suse.de>
999 * Makefile: Move inclusion of ../Rules down after extra-objs is
1002 2003-06-06 Ulrich Drepper <drepper@redhat.com>
1004 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
1005 5+ arg syscalls only needed for PIC.
1006 Patch by Ralph Siemsen <ralphs@netwinder.org>.
1008 2003-06-05 Richard Henderson <rth@redhat.com>
1010 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1011 and require CFI assembler directives.
1012 * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
1014 2003-05-30 Andreas Jaeger <aj@suse.de>
1016 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
1017 (SAVESTK_0): Add CFI directives.
1018 (SAVESTK_3): Likewise.
1019 (SAVESTK_5): Likewise.
1020 (RESTSTK_0): Likewise.
1021 (RESTSTK_3): Likewise.
1022 (RESTSTK_5): Likewise.
1024 2003-05-05 Ulrich Drepper <drepper@redhat.com>
1026 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
1029 2003-05-04 Roland McGrath <roland@redhat.com>
1031 * Makefile ($(objpfx)../libc.so): New target.
1033 2003-04-26 Ulrich Drepper <drepper@redhat.com>
1035 * pthread.c (__pthread_initialize_manager): Remove one last
1036 p_multiple_threads call.
1038 2003-04-22 Jakub Jelinek <jakub@redhat.com>
1040 * pthread.c (__pthread_initialize_manager): Subtract
1041 TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
1042 * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
1043 instead of sizeof (pthread_descr).
1044 (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
1045 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
1046 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1048 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1050 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1052 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1054 (NO_TLS_OFFSET): Define.
1056 2003-04-22 Roland McGrath <roland@redhat.com>
1058 * Makeconfig (shared-thread-library): Reverse link order to work
1061 2003-04-20 Ulrich Drepper <drepper@redhat.com>
1063 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
1064 compiler knows we use the ldt_entry variable and that the syscall
1065 modifies the memory.
1067 * internals.h: Split pthread_functions definition into...
1068 * sysdeps/pthread/pthread-functions.h: ...new file.
1070 * sysdeps/i386/useldt.h: Include <sysdep.h>.
1072 2003-04-13 Jakub Jelinek <jakub@redhat.com>
1074 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1075 match changes in NPTL sysdep-cancel.h.
1077 2003-04-11 Roland McGrath <roland@redhat.com>
1079 * Makefile (multidir): Don't set the variable here with $(shell ...).
1080 ($(objpfx)multidir.mk): New target, generated makefile; include that.
1081 (generated): Append it.
1083 2003-04-10 Jakub Jelinek <jakub@redhat.com>
1085 * Makefile (multidir, crti-objs, crtn-objs): New variables.
1086 (generated-dirs): Add pathname component of multidir.
1087 (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1088 ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1089 ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1090 $(objpfx)$(multidir)/crtn.o): New.
1091 * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1092 * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1093 before-compile, generated): Don't generate and use specs.
1094 ($(objpfx)specs): Remove.
1096 2003-04-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1098 * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1100 2003-04-03 Ulrich Drepper <drepper@redhat.com>
1102 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1103 missing ; after ENTRY use [PR libc/4997].
1105 2003-04-03 Jakub Jelinek <jakub@redhat.com>
1107 * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1108 in case the parent blocked it.
1110 2003-04-02 Jakub Jelinek <jakub@redhat.com>
1112 * Makefile (libpthread-routines): Add pthread_atfork.
1113 (libpthread-static-only-routines): Add pthread_atfork.
1115 2003-04-01 Jakub Jelinek <jakub@redhat.com>
1117 * pthread.c (__pthread_wait_for_restart_signal): Use
1118 __pthread_sigsuspend instead of sigsuspend.
1119 * internals.h (__pthread_sigsuspend): New prototype.
1120 * Makefile (libpthread-routines): Add pt-sigsuspend.
1121 (tests): Add tst-cancel7.
1122 * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1123 * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1124 * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1125 * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1126 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1127 * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1128 * tst-cancel7.c: New test.
1130 2003-03-31 Alexandre Oliva <aoliva@redhat.com>
1132 * alloca_cutoff.c: Include internals.h.
1133 * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1134 * sysdeps/pthread/herrno-loc.c: Likewise.
1135 * sysdeps/pthread/res-state.c: Likewise.
1137 2003-03-25 Ulrich Drepper <drepper@redhat.com>
1139 * sysdeps/pthread/bits/typesizes.h: New file.
1140 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1141 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1143 2003-03-24 Daniel Jacobowitz <drow@mvista.com>
1145 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1146 (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1148 2003-03-22 Jakub Jelinek <jakub@redhat.com>
1150 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1152 2003-03-21 Daniel Jacobowitz <drow@mvista.com>
1154 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1155 (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1157 2003-03-21 Jakub Jelinek <jakub@redhat.com>
1159 * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1160 (TLS_SETUP_GS_SEGMENT): Fix a typo.
1162 2003-03-19 Ulrich Drepper <drepper@redhat.com>
1164 * sysdeps/pthread/Makefile: Fix cut&paste error.
1166 2003-03-18 Roland McGrath <roland@redhat.com>
1168 * Versions (libpthread: GLIBC_2.2): Remove
1169 pthread_barrierattr_getpshared, never really existed.
1170 (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1171 (libpthread: GLIBC_PRIVATE): ... here.
1173 2003-03-14 Jakub Jelinek <jakub@redhat.com>
1175 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1176 * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1179 2003-03-14 Alexandre Oliva <aoliva@redhat.com>
1181 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1183 * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1184 Handle 64-bit longs on n64.
1186 2003-03-07 Jakub Jelinek <jakub@redhat.com>
1188 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1189 __pthread_spin_trylock): Rewritten.
1191 2003-03-06 Ulrich Drepper <drepper@redhat.com>
1193 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1196 2003-03-02 Ulrich Drepper <drepper@redhat.com>
1198 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1199 error for CPU clocks.
1201 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1202 _POSIX_MONOTONIC_CLOCK.
1203 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1205 2003-03-01 Roland McGrath <roland@redhat.com>
1207 * sysdeps/powerpc/powerpc64/pt-machine.h
1208 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1210 * sysdeps/powerpc/tls.h: Don't define those here.
1212 * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1213 tcbhead_t with multiple_threads member.
1214 [USE_TLS] (tcbhead_t): Define minimal one-word version.
1215 [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1216 * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1217 derive thread register offset of p_multiple_threads member.
1219 * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1220 Conditionalize p_header member on this.
1221 [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1222 * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1223 * sysdeps/sh/tls.h: Likewise.
1224 * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1225 * sysdeps/sh/tcb-offsets.sym: Likewise.
1226 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1227 (SINGLE_THREAD_P): Likewise.
1228 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1229 (SINGLE_THREAD_P): Likewise.
1230 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1231 (SINGLE_THREAD_P): Likewise.
1232 * pthread.c (__pthread_initialize_manager): Likewise.
1233 * manager.c (pthread_handle_create): Likewise.
1235 * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1238 2003-01-31 Steven Munroe <sjmunroe@us.ibm.com>
1240 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1241 Conditionalize .toc section magic on this.
1243 2003-02-21 Roland McGrath <roland@redhat.com>
1245 * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1246 instead of __rpc_thread_destroy.
1248 2003-02-21 Jakub Jelinek <jakub@redhat.com>
1250 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1251 __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1252 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1254 * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1255 to crti.o and crtn.o.
1256 * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1258 2003-02-21 Roland McGrath <roland@redhat.com>
1260 * Makefile (install-lib-ldscripts): New variable.
1262 2003-02-20 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1264 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1265 interprocedure branches.
1267 2003-02-19 Ulrich Drepper <drepper@redhat.com>
1269 * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1270 need the target thread's lock.
1272 2003-02-17 Ulrich Drepper <drepper@redhat.com>
1274 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1277 2003-02-17 Kevin B. Hendricks <kevin.hendricks@sympatico.ca>
1278 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1280 * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1281 * sysdeps/powerpc/tcb-offsets.sym: New file.
1282 * sysdeps/powerpc/tls.h: New file.
1283 * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1284 (ARCH_STACK_MAX_SIZE): Define.
1285 (THREAD_SELF): Define.
1286 (INIT_THREAD_SELF): Define.
1287 (THREAD_GETMEM): Define.
1288 (THREAD_GETMEM_NC): Define.
1289 (THREAD_SETMEM): Define.
1290 (THREAD_SETMEM_NC): Define.
1291 (__thread_self): Declare.
1292 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1293 for thread register.
1295 2003-02-14 Steven Munroe <sjmunroe@us.ibm.com>
1297 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1298 Check pthread_create existance, not __pthread_fork.
1300 2003-02-12 Ulrich Drepper <drepper@redhat.com>
1302 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1304 2003-02-10 Jakub Jelinek <jakub@redhat.com>
1306 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1307 pthread_create existance, not __pthread_fork.
1308 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1309 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1310 * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1311 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1313 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1314 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1315 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1316 Add .weak pthread_create.
1317 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1318 Check pthread_create existance, not __pthread_fork.
1319 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1320 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1321 __fork whenever libpthread.so is loaded.
1323 2003-02-09 Andreas Jaeger <aj@suse.de>
1325 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1326 Rework: %r9 is destroyed by functions so don't use it as
1327 temporary, align stack correctly, fix parameter for CDISABLE.
1329 2003-02-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1331 * sysdeps/sh/Makefile: New file.
1332 * sysdeps/sh/tcb-offsets.sym: Likewise.
1333 * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1334 of linuxthreads/descr.h after the definition of THREAD_SELF.
1335 (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1336 (TLS_TCB_SIZE): Set size of tcbhead_t.
1337 (TLS_PRE_TCB_SIZE): Define.
1338 (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1339 a member of thread structure.
1340 (THREAD_DTV): Likewise.
1341 (TLS_INIT_TP_EXPENSIVE): Remove.
1342 (TLS_INIT_TP): Set gbr register only.
1344 (INIT_THREAD_SELF): Likewise.
1345 (NONTLS_INIT_TP): New.
1346 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1348 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1349 SYSCALL_INST_PAD macro after DO_CALL.
1350 (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1352 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1353 whenever libpthread.so is loaded.
1355 2003-02-08 Andreas Schwab <schwab@suse.de>
1357 * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1358 libpthread.so is loaded.
1360 2003-02-07 Ulrich Drepper <drepper@redhat.com>
1362 * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1363 __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1364 no __NR_vfork definition.
1366 2003-02-07 Jakub Jelinek <jakub@redhat.com>
1368 * tst-popen2.c: New test.
1369 * Makefile (tests): Add tst-popen2.
1370 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1371 whenever libpthread.so is loaded.
1372 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1373 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1374 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1375 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1377 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1378 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1379 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1381 2003-02-05 Ulrich Drepper <drepper@redhat.com>
1383 * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1384 variable for non-libpthread case to the same value the
1385 pthread_once function would use.
1387 2003-02-03 Jakub Jelinek <jakub@redhat.com>
1389 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1390 BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1392 2003-02-04 Andreas Jaeger <aj@suse.de>
1394 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1397 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1399 * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1401 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1403 * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1404 THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1406 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1407 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1408 * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1409 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1410 * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1411 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1412 * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1413 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1414 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1415 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1416 * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1417 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1419 2003-01-27 Martin Schwidefsky <schwidefsky@de.ibm.com>
1421 * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1422 Define TLS versions.
1423 * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1425 * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1426 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1427 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1429 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1430 branch with 32 bit offset.
1431 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1433 2003-01-24 Jakub Jelinek <jakub@redhat.com>
1435 * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1436 as required by TLS ABI.
1437 * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1438 * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1439 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1440 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1442 [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1443 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1444 instead of %g6 for thread pointer.
1445 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1446 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1447 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1449 2003-01-25 Guido Guenther <agx@sigxcpu.org>
1451 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1452 * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1454 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1456 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1457 reference to __fork.
1459 2003-01-17 Richard Henderson <rth@redhat.com>
1461 * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1462 (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1463 (TLS_PRE_TCB_SIZE): New.
1464 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1465 new ia64-style thread pointer layout.
1466 (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1467 (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1468 * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1471 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1473 * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1475 (NONTLS_INIT_TP): Revert last change.
1476 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1477 offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1479 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1481 * pthread.c (_pthread_initialize_minimal): Use
1482 GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1483 been already initialized.
1485 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1487 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1490 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1492 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1493 __libc_lock_init_recursive): Initialize fields directly.
1495 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1497 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1498 __fork to be far away from __vfork ifndef SHARED.
1499 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1501 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1502 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1503 Add a missing instruction.
1504 * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1505 branch to __fork even if __NR_vfork is not defined.
1507 2003-01-14 Ulrich Drepper <drepper@redhat.com>
1509 * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1512 2003-01-14 Steven Munroe <sjmunroe@us.ibm.com>
1514 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1516 2003-01-14 Jakub Jelinek <jakub@redhat.com>
1518 * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1520 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1522 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1523 unterminated string literals.
1524 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1526 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1528 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1529 (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from
1530 PSEUDO_END to PSEUDO.
1531 (PSEUDO_END): Remove.
1532 (SINGLE_THREAD_P): Save an instruction.
1533 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1534 parameter to SINGLE_THREAD_P call.
1535 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1538 2003-01-10 Andreas Schwab <schwab@suse.de>
1540 * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1542 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1544 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1545 backchain in pseudo_cancel. Minor code improvements.
1546 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1549 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1551 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1552 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1554 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1556 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1558 2002-01-09 Richard Henderson <rth@redhat.com>
1560 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1561 ret follows pseudo, and thus avoid branch-to-branch in cancel
1562 case. Use SYSCALL_ERROR_LABEL.
1564 2003-01-11 Philip Blundell <philb@gnu.org>
1566 * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1567 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1568 Correctly unstack lr.
1569 (UNDOARGS_5): Fix ordering of pushes and pops.
1570 (SINGLE_THREAD_P_PIC): New.
1571 (SINGLE_THREAD_P_INT): New.
1572 (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it
1574 (PSEUDO): Use SINGLE_THREAD_P_INT.
1576 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1578 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1580 2003-01-11 Jakub Jelinek <jakub@redhat.com>
1582 * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1583 [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1584 TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1585 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1586 INIT_THREAD_SELF): Define.
1587 [HAVE_TLS_SUPPORT]: Include descr.h.
1588 (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1589 struct _pthread_descr_struct.
1590 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1591 THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1593 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1595 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1597 (__pthread_initialize_manager): Rename tcb to mgr.
1598 Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1599 _pthread_descr) below tcbp, otherwise to tcbp.
1600 * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1601 new_thread to be below _dl_allocate_tls (). Adjust new_thread back
1602 before freeing. Fix clone arguments if report_events and USE_TLS.
1603 (pthread_free): Adjust th back before freeing.
1605 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
1607 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1608 * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1609 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1611 2003-01-09 Jakub Jelinek <jakub@redhat.com>
1613 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1614 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1615 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1616 [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1617 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1618 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1619 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1620 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1621 * tst-popen.c: New test.
1622 * Makefile (tests): Add tst-popen.
1624 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1626 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1627 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1629 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1631 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1632 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
1634 2003-01-06 Philip Blundell <philb@gnu.org>
1636 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1638 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1640 * internals.h (LIBC_CANCEL_HANDLED): Define.
1641 * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1642 * signals.c (LIBC_CANCEL_HANDLED): Add.
1643 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1644 * tst-cancel-wrappers.sh: Remove all exceptions.
1646 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1648 2003-01-05 Andreas Schwab <schwab@suse.de>
1650 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1653 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1655 (CENABLE): Likewise.
1656 (CDISABLE): Likewise.
1658 2003-01-05 Ulrich Drepper <drepper@redhat.com>
1660 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1661 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1663 * Makefile (libc.so-no-z-defs): Define to yes.
1665 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1667 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1668 (tcbhead_t): Add multiple_threads member.
1669 (TLS_INIT_TP_EXPENSIVE): Define.
1670 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1671 strings. Remove unused code.
1672 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1674 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1676 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1677 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1679 2003-01-04 Jakub Jelinek <jakub@redhat.com>
1681 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1682 even if NOT_IN_libc is defined.
1684 2003-01-05 Jakub Jelinek <jakub@redhat.com>
1686 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1687 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1688 * sysdeps/s390/Makefile: New file.
1689 * sysdeps/s390/tcb-offsets.sym: New file.
1690 * sysdeps/s390/tls.h: New file.
1692 2003-01-03 Richard Henderson <rth@redhat.com>
1694 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1696 2003-01-03 Andreas Jaeger <aj@suse.de>
1698 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1700 2003-01-03 Jakub Jelinek <jakub@redhat.com>
1702 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1704 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1706 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1709 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1711 * internals.h (struct pthread_functions): Rename
1712 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1713 * pthread.c (pthread_functions): Adjust.
1714 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1715 pthread_cond_*@GLIBC_2.0 compatibility symbols.
1716 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1717 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1718 and pthread_cond_wait.
1720 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1722 (pthread_cond_t): Add __align member, shorten __padding.
1723 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1724 __padding and __align too.
1726 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1728 * sysdeps/pthread/sigaction.c: New file.
1729 * sysdeps/unix/sysv/linux/raise.c: New file.
1730 * sysdeps/unix/sysv/linux/sigwait.c: New file.
1731 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1732 weak_extern with #ifndef SHARED.
1733 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1735 * signals.c (__sigaction): Renamed to...
1736 (__pthread_sigaction): ... this.
1737 (__sigaction): New strong alias, #ifdef SHARED only.
1738 (sigaction): Protect with #ifdef SHARED.
1739 (sigwait): Renamed to...
1740 (__pthread_sigwait): ... this.
1741 (sigwait): New strong alias, #ifdef SHARED only.
1742 (raise): Renamed to...
1743 (__pthread_raise): ... this.
1744 (raise): New strong alias, #ifdef SHARED only.
1745 * internals.h (__pthread_sigaction, __pthread_sigwait,
1746 __pthread_raise): New prototypes.
1747 (struct pthread_functions): Add ptr_pthread_sigaction,
1748 ptr_pthread_sigwait, ptr_pthread_raise.
1749 * pthread.c (pthread_functions): Renamed to...
1750 (__pthread_functions): ... this. No longer static, no longer
1751 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1752 and ptr_pthread_raise.
1753 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1754 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1755 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1756 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1758 * Makefile (tests, tests-static): Add tst-cancel-static.
1759 * tst-cancel-static.c: New test.
1761 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1763 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1765 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1767 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1768 * condvar.c: Add symbol versioning. The compatibility versions
1769 are the same as the change in the interface does not effect this
1771 * Versions [libpthread]: Add definitions for new pthread_cond_*
1772 interfaces for version GLIBC_2.3.2.
1774 2002-12-31 Ulrich Drepper <drepper@redhat.com>
1776 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1778 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1779 for __register_atfork.
1781 2002-12-31 Jakub Jelinek <jakub@redhat.com>
1783 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1784 ASSEMBLER test macro.
1785 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1786 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1787 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1788 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1789 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1790 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1792 * sysdeps/pthread/errno-loc.c (__errno_location): Add
1794 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1795 * sysdeps/pthread/res-state.c (__res_state): Likewise.
1796 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1797 __libc_current_sigrtmax): Likewise.
1798 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1799 __libc_internal_tsd_set, __libc_internal_tsd_address,
1800 __libc_alloca_cutoff.
1801 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1802 __libc_internal_tsd_set, __libc_internal_tsd_address.
1804 * sysdeps/pthread/list.h: Remove assert.h include.
1805 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1807 * sysdeps/pthread/list.h: New file.
1808 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1809 * sysdeps/unix/sysv/linux/fork.c: New file.
1810 * sysdeps/unix/sysv/linux/fork.h: New file.
1811 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1812 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1813 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1814 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1815 * sysdeps/unix/sysv/linux/Makefile: New file.
1816 * sysdeps/unix/sysv/linux/Versions: New file.
1817 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1818 (__pthread_cleanup_upto): ...this. Add targetframe argument,
1819 use it instead of currentframe. No longer static.
1820 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1821 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1822 (struct pthread_functions): Add ptr_pthread_fork,
1823 ptr_pthread_cleanup_upto.
1824 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1825 ptr_pthread_cleanup_upto.
1826 * ptfork.c: Include fork.h.
1827 (struct handler_list, struct handler_list_block): Remove.
1828 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1829 pthread_atfork_child): Remove.
1830 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1831 (__pthread_fork): New function.
1832 (__fork, __vfork): Call __libc_fork.
1833 * Makefile (libpthread-routines): Add old_pthread_atfork.
1834 (libpthread-nonshared): Add pthread_atfork.
1835 (others): Depend on $(objpfx)libpthread_nonshared.a.
1836 ($(objpfx)libpthread_nonshared.a): New rule.
1837 (install): Depend on $(inst_libdir)/libpthread.so.
1838 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1840 (tests): Depend on libpthread_nonshared.a too.
1841 * old_pthread_atfork.c: New file.
1842 * pthread_atfork.c: New file.
1843 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1846 2002-12-30 Jakub Jelinek <jakub@redhat.com>
1848 * forward.c: Make all functions available by default again. It
1849 caused too much trouble.
1850 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1851 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1852 ptr___pthread_attr_init_2_*.
1853 * pthread.c (pthread_functions): Adjust.
1855 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1857 * libc_pthread_init.c (__libc_pthread_init): Remove
1858 MULTIPLE_THREADS_OFFSET check.
1859 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1860 (SYSINFO_OFFSET): Remove.
1861 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1863 * sysdeps/i386/tcb-offsets.sym: New file.
1864 * sysdeps/pthread/tcb-offsets.h: New file.
1865 * sysdeps/sparc/sparc32/tls.h: Removed.
1866 * sysdeps/sparc/sparc64/tls.h: Move...
1867 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
1868 * sysdeps/sparc/Makefile: New file.
1869 * sysdeps/sparc/tcb-offsets.sym: New file.
1870 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1871 * sysdeps/ia64/Makefile: New file.
1872 * sysdeps/ia64/tcb-offsets.sym: New file.
1873 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1874 (MULTIPLE_THREADS_OFFSET): Remove.
1875 Replace defined MULTIPLE_THREADS_OFFSET
1876 with defined FLOATING_STACKS && USE___THREAD.
1877 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1878 (MULTIPLE_THREADS_OFFSET): Remove.
1879 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1880 (MULTIPLE_THREADS_OFFSET): Remove.
1881 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1882 (MULTIPLE_THREADS_OFFSET): Remove.
1883 * pthread.c (__pthread_initialize_manager): Remove
1884 MULTIPLE_THREADS_OFFSET cbeck.
1886 * tst-cancel-wrappers.sh: Add line continuations.
1888 2002-12-27 Jakub Jelinek <jakub@redhat.com>
1890 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1891 and bits/libc-lock.h.
1892 (__libc_internal_tsd_get, __libc_internal_tsd_set,
1893 __libc_internal_tsd_address): Remove.
1894 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1895 __pthread_internal_tsd_set): New weak_externs.
1896 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1897 using __libc_maybe_call2.
1898 (__libc_tsd_key_t): Move to ...
1899 * descr.h (__libc_tsd_key_t): ...here.
1900 Remove bits/libc-tsd.h include.
1901 * sysdeps/pthread/errno-loc.c: New file.
1902 * sysdeps/pthread/herrno-loc.c: New file.
1903 * sysdeps/pthread/res-state.c: New file.
1904 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1905 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1906 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
1907 of THREAD_[SG]ETMEM.
1908 * specific.c (libc_internal_tsd_set): Renamed to...
1909 __pthread_internal_tsd_set. Remove static.
1910 (libc_internal_tsd_get): Renamed to...
1911 __pthread_internal_tsd_get. Remove static.
1912 (libc_internal_tsd_address): Renamed to...
1913 __pthread_internal_tsd_address. Remove static.
1914 (__libc_internal_tsd_set, __libc_internal_tsd_get,
1915 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1916 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1918 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1919 __pthread_internal_tsd_address): New prototypes.
1920 (struct pthread_functions): Add
1921 ptr_pthread_internal_tsd_([sg]et|address) fields.
1922 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1923 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1924 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1925 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1926 * alloca_cutoff.c: New file.
1927 * no-tsd.c: Removed.
1928 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
1929 * pt-system.c (system): Remove cancellation handling.
1930 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1931 cancellation routines.
1933 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1934 (tcbhead_t): Add sysinfo field.
1935 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1936 (TLS_INIT_TP): Use INIT_SYSINFO.
1937 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1938 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1939 (MULTIPLE_THREADS_OFFSET): Adjust.
1940 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1941 (MULTIPLE_THREADS_OFFSET): Likewise.
1942 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1943 (MULTIPLE_THREADS_OFFSET): Likewise.
1944 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1945 (MULTIPLE_THREADS_OFFSET): Likewise.
1946 * descr.h: Include stdint.h.
1947 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1949 2002-12-22 Jakub Jelinek <jakub@redhat.com>
1951 * libc_pthread_init.c: Include stdlib.h.
1952 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1953 (TLS_INIT_TP_EXPENSIVE): Define.
1954 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1955 __libc_maybe_call2): In _LIBC check SHARED define.
1956 * sysdeps/ia64/tls.h: New file.
1957 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1958 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1959 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1960 * sysdeps/sparc/sparc32/tls.h: New file.
1961 * sysdeps/sparc/sparc64/tls.h: New file.
1962 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1963 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1964 * Makefile (tests): Add tst-cancel[1-6].
1965 (tests-reverse): Add tst-cancel5.
1966 Link libc.so before libpthread.so for tests-reverse.
1967 * tst-cancel1.c: New file.
1968 * tst-cancel2.c: New file.
1969 * tst-cancel3.c: New file.
1970 * tst-cancel4.c: New file.
1971 * tst-cancel5.c: New file.
1972 * tst-cancel6.c: New file.
1974 2002-12-27 Andreas Schwab <schwab@suse.de>
1976 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1978 2002-12-22 Roland McGrath <roland@redhat.com>
1980 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1982 2002-12-21 Ulrich Drepper <drepper@redhat.com>
1984 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
1985 Reported by Art Hass <ahaas@airmail.net>.
1987 2002-12-19 Jakub Jelinek <jakub@redhat.com>
1989 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1990 Use return 0 as 6th argument to FORWARD4.
1992 2002-12-18 Jakub Jelinek <jakub@redhat.com>
1994 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
1995 define if __ASSUME_LDT_WORKS > 0.
1996 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
1997 struct member access if !FLOATING_STACKS.
1998 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2000 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2002 * internals.h (__pthread_thread_self): New prototype.
2003 (struct pthread_functions): Add ptr_pthread_thread_self field.
2004 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
2005 (__pthread_thread_self): New function.
2006 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
2007 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
2008 use thread_self() directly if not FLOATING_STACKS.
2010 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2012 * sysdeps/x86_64/pt-machine.h: Guard most of the header
2013 with #ifndef __ASSEMBLER__.
2014 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
2015 pthread_attr_init_2_0 use.
2017 2002-12-17 Jakub Jelinek <jakub@redhat.com>
2019 * wrapsyscall.c: Removed.
2021 * Makefile (distribute): Add tst-cancel-wrappers.sh.
2022 (routines): Remove weaks. Add forward,
2023 libc_pthread_init, libc-cancellation.
2024 (shared-only-routines): Remove weaks. Add forward.
2025 (libpthread-routines): Remove wrapsyscall.
2026 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
2027 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
2028 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
2029 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
2030 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
2031 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
2032 (libpthread-shared-only-routines): Add pt-allocrtsig.
2033 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2034 ($(objpfx)tst-cancel-wrappers.out): New rule.
2035 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
2037 (__libc_maybe_call): In libpthread.* don't check for existance
2039 (__libc_maybe_call2): Define.
2040 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
2041 __libc_lock_trylock, __libc_lock_unlock): Use it.
2042 * sysdeps/pthread/flockfile.c: New file.
2043 * sysdeps/pthread/ftrylockfile.c: New file.
2044 * sysdeps/pthread/funlockfile.c: New file.
2045 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2046 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2047 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
2048 * libc-cancellation.c: New file.
2049 * forward.c: New file.
2050 * libc_pthread_init.c: New file.
2051 * pt-system.c: New file.
2052 * pthread.c: Remove locale.h.
2053 (__pthread_manager_thread): Initialize multiple_threads.
2054 (__pthread_multiple_threads): Declare.
2055 (pthread_functions): New variable.
2056 (__pthread_initialize_minimal): Remove __uselocale call.
2057 Call __libc_pthread_init.
2058 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
2059 initial thread's multiple_threads and __libc_multiple_threads.
2060 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
2062 (pthread_setschedparam, pthread_getschedparam): Rename to __
2063 prefixed variants. Add strong_alias.
2064 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
2065 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
2066 (init_rtsigs): Use __libc_current_sigrtmin_private.
2067 (pthread_initialize): Only call init_rtsigs if
2068 !__ASSUME_REALTIME_SIGNALS.
2069 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2070 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2071 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2072 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2073 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2074 __pthread_attr_getinheritsched, __pthread_attr_setscope,
2075 __pthread_attr_getscope, __pthread_cond_init,
2076 __pthread_cond_destroy, __pthread_cond_wait,
2077 __pthread_cond_signal, __pthread_cond_broadcast,
2078 __pthread_condattr_init, __pthread_condattr_destroy,
2079 __pthread_equal, __pthread_getschedparam,
2080 __pthread_setschedparam, __pthread_setcancelstate,
2081 __pthread_setcanceltype, __pthread_enable_asynccancel,
2082 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2083 (__pthread_mutex_init, __pthread_mutex_destroy,
2084 __pthread_mutex_lock, __pthread_mutex_unlock,
2085 __pthread_mutex_trylock): Likewise.
2087 (struct pthread_functions): New type.
2088 (__libc_pthread_functions): New variable.
2089 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2090 * descr.h (struct _pthread_descr_struct): Add
2091 p_header.data.multiple_threads field.
2092 * manager.c (pthread_handle_create): Initialize multiple_threads.
2093 * cancel.c (__pthread_enable_asynccancel,
2094 __pthread_disable_asynccancel): New functions.
2095 (__pthread_provide_wrappers): Remove.
2096 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2097 prefixed variants. Add strong_alias.
2098 * condvar.c (pthread_cond_init, pthread_cond_destroy,
2099 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2100 pthread_condattr_init, pthread_condattr_destroy): Likewise.
2101 * join.c (pthread_exit): Likewise.
2102 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2103 pthread_attr_getdetachstate, pthread_attr_setschedparam,
2104 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2105 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2106 pthread_attr_getinheritsched, pthread_attr_setscope,
2107 pthread_attr_getscope): Likewise.
2108 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2109 __pthread_mutex_lock, __pthread_mutex_unlock,
2110 __pthread_mutex_trylock): Add hidden_def.
2111 * Versions (libc): Add __libc_pthread_init,
2112 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2113 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2114 * lockfile.c: Remove some USE_IN_LIBIO guards.
2115 (__pthread_provide_lockfile): Remove.
2116 * pt-allocrtsig.c: New file.
2117 * tst-cancel-wrappers.sh: New test.
2119 2002-12-15 Ulrich Drepper <drepper@redhat.com>
2121 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2122 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2123 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2124 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2126 2002-12-10 Ulrich Drepper <drepper@redhat.com>
2128 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2129 weak. There is no reason for that.
2130 (CANCELABLE_SYSCALL_VA): Likewise.
2132 2002-12-09 Ulrich Drepper <drepper@redhat.com>
2134 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2135 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2136 * Versions: Export creat, poll, pselect, readv, select, sigpause,
2137 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2138 libpthread in version GLIBC_2.3.2.
2140 2002-12-06 Ulrich Drepper <drepper@redhat.com>
2142 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2144 2002-12-05 Roland McGrath <roland@redhat.com>
2146 * pthread.c (__pthread_initialize_minimal)
2147 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2148 TCB if the dynamic linker didn't do it at startup.
2150 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2152 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2154 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2155 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2157 2002-12-03 Roland McGrath <roland@redhat.com>
2159 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2160 from dynamic linker internal cell to new libc cell.
2162 2002-11-28 Roland McGrath <roland@redhat.com>
2164 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2165 before other headers, so FLOATING_STACKS is not defined wrongly.
2167 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2168 even if [! FLOATING_STACKS].
2169 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2170 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2171 dl_osversion >= 2.3.99 and fatal if not.
2172 (TLS_DO_MODIFY_LDT): Use it.
2174 2002-11-28 Ulrich Drepper <drepper@redhat.com>
2176 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2177 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
2178 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2180 2002-11-19 Ulrich Drepper <drepper@redhat.com>
2182 * Versions (libc: GLIBC_2.0): Remove names of functions which are
2183 not defined in libc.
2184 * Makefile (shared-only-routines): Add weaks.
2185 * weaks.c: Remove functions which are not exported from libc.so.
2187 2002-11-14 Roland McGrath <roland@redhat.com>
2189 * libc-tsd.c: New file.
2190 * Makefile (distribute): Add it.
2191 (libc-link.so): New variable.
2192 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2193 (libc-ok-for-link): New variable.
2194 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2195 libc-ok-for-link to $(use-thread).
2196 [$(libc-ok-for-link) = no]
2197 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2198 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2200 (generated): Append them.
2201 (extra-objs): Append libc-tsd.os.
2203 * libc-tls-loc.c: New file.
2204 * Makefile (libpthread-routines): Add it.
2206 2002-11-14 Andreas Schwab <schwab@suse.de>
2208 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2211 2002-11-13 Roland McGrath <roland@redhat.com>
2213 * Examples/ex6.c (main): Improve error reporting.
2215 2002-11-04 Ulrich Drepper <drepper@redhat.com>
2217 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2218 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
2220 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2222 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2224 2002-10-22 Jakub Jelinek <jakub@redhat.com>
2226 * manager.c (pthread_start_thread): Call __uselocale even
2227 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
2229 2002-10-17 Roland McGrath <roland@redhat.com>
2231 * Makefile (unload): Don't link in libpthread.so.
2232 ($(objpfx)unload.out): Do depend on it.
2233 * unload.c (main): Improve error reporting.
2235 2002-10-09 Roland McGrath <roland@redhat.com>
2237 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2238 Under [__PIC__], call the function via the pointer fetched for
2239 comparison rather than a call by name that uses the PLT.
2240 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2241 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2242 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2243 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2244 (__libc_key_create, __libc_getspecific, __libc_setspecific)
2245 (__libc_atfork): Use it.
2247 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2248 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2249 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2250 (ld: GLIBC_PRIVATE): Set removed.
2252 2002-10-11 Ulrich Drepper <drepper@redhat.com>
2254 * sysdeps/unix/sysv/linux/execve.c: New file.
2256 2002-10-09 Jakub Jelinek <jakub@redhat.com>
2258 * no-tsd.c: Include stdlib.h.
2260 2002-10-07 Jakub Jelinek <jakub@redhat.com>
2262 * sysdeps/unix/sysv/linux/allocalim.h: New file.
2263 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2265 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2266 Pass stack size to caller.
2267 (pthread_handle_create): Set p_alloca_cutoff.
2268 * pthread.c (__pthread_initial_thread): Use C99 designated
2269 initializers. Set p_alloca_cutoff.
2270 (__pthread_manager_thread): Likewise.
2271 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2273 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2275 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2277 * specific.c (__libc_alloca_cutoff): New function.
2278 * no-tsd.c (__libc_alloca_cutoff): New function.
2279 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2282 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2284 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2285 * sysdeps/sh/tls.h: Likewise.
2286 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2288 2002-09-29 Jakub Jelinek <jakub@redhat.com>
2290 * sysdeps/pthread/tst-timer.c (main): Clear
2291 SIGEV2.sigev_notify_attributes.
2293 2002-09-29 Ulrich Drepper <drepper@redhat.com>
2295 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2296 INLINE_SYSCALL for set_thread_area syscall.
2298 2002-09-28 Roland McGrath <roland@redhat.com>
2300 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2301 Don't call setrlimit, since we did no prior bogon we need to undo.
2303 2002-09-27 Roland McGrath <roland@redhat.com>
2305 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2307 2002-09-24 Roland McGrath <roland@redhat.com>
2309 * sysdeps/x86_64/tls.h: New file.
2311 2002-09-23 Roland McGrath <roland@redhat.com>
2313 * Examples/ex13.c (dump_mut): int -> size_t for counter.
2315 2002-09-18 Bruno Haible <bruno@clisp.org>
2317 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2318 an unexpected error code.
2320 * internals.h (__pthread_message): Add const to first parameter type.
2321 * pthread.c (__pthread_message): Likewise.
2323 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2325 2002-09-17 Roland McGrath <roland@redhat.com>
2327 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2328 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2329 offset (positive or negative) relative to the thread struct.
2330 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2332 2002-09-12 Jakub Jelinek <jakub@redhat.com>
2334 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2335 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2336 Replace /usr/lib/crt[in].o with crt[in].o too.
2338 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
2340 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2342 2002-09-04 Bruno Haible <bruno@clisp.org>
2344 * pthread.c: Include <sys/time.h>.
2345 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2346 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2347 * Makefile (distribute): Add smp.h to the list.
2349 2002-09-04 Bruno Haible <bruno@clisp.org>
2351 * sysdeps/alpha/pt-machine.h: Choose different include file location
2352 on non-Linux platforms.
2354 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2355 (open, open64): Change va_arg argument type to the integral type to
2356 which mode_t promotes.
2358 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2359 the structure of 'struct sigevent'.
2361 * errno.c (__errno_location, __h_errno_location, __res_state):
2362 Use prototype function definitions.
2364 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
2366 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2367 * sysdeps/powerpc/pt-machine.h: moved to...
2368 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2369 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2371 2002-09-02 Roland McGrath <roland@redhat.com>
2373 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2375 2002-09-01 Roland McGrath <roland@redhat.com>
2377 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2378 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2380 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2381 (__libc_internal_tsd_address): Declare it.
2382 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2383 __libc_internal_tsd_address.
2384 * specific.c (libc_internal_tsd_address): New function.
2385 (__libc_internal_tsd_address): New variable.
2386 * no-tsd.c (__libc_internal_tsd_address): New variable.
2388 2002-08-31 Ulrich Drepper <drepper@redhat.com>
2390 * Makefile: Don't use rule for crt%.o, spell it out as rules for
2393 2002-08-30 Roland McGrath <roland@redhat.com>
2395 * Makefile (extra-objs, omit-deps): Add crtn.
2396 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2397 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2398 ($(objpfx)crtn.S): New target.
2399 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2400 (generated): Add crtn.S.
2402 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2403 crtn.o pathname too.
2405 2002-08-30 Jakub Jelinek <jakub@redhat.com>
2407 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2410 2002-08-30 Roland McGrath <roland@redhat.com>
2412 * tst-static-locale.c: New file.
2413 * Makefile (tests, tests-static): Add it.
2415 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
2417 * spinlock.c (__pthread_lock): Fix spurious wakeup
2418 handling. Don't clear lowest bit of list pointer as sign the thread
2419 is still on the wait list. Don't restart after spurious wakeup
2420 with spinning to get the lock.
2421 (__pthread_unlock): Take set lowest bit into account when handling
2422 pointer to list elements.
2423 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2425 2002-08-28 Roland McGrath <roland@redhat.com>
2427 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2429 2002-08-28 Jakub Jelinek <jakub@redhat.com>
2431 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2432 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2433 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2435 2002-08-28 Ulrich Drepper <drepper@redhat.com>
2437 * sysdeps/pthread/timer_routines.c (thread_func): Change return
2438 type to void and add casts in use to avoid warnings with all gcc
2441 2002-08-08 Jakub Jelinek <jakub@redhat.com>
2443 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2445 * manager.c (__pthread_handles): Remove.
2446 * pthandles.c: New file.
2447 * pthread.c (__pthread_initialize_minimal): Initialize
2448 __pthread_handles[0] and __pthread_handles[1].
2449 * Makefile (libpthread-routines): Add pthandles (must be last).
2451 2002-08-26 Brian Youmans <3diff@gnu.org>
2453 * Examples/ex10.c: Corrected version number in Lesser GPL copying
2454 permission notice from 2 to 2.1.
2455 * Examples/ex11.c: Likewise.
2456 * Examples/ex13.c: Likewise.
2457 * Examples/ex8.c: Likewise.
2458 * Examples/ex9.c: Likewise.
2459 * barrier.c: Likewise.
2460 * events.c: Likewise.
2461 * lockfile.c: Likewise.
2462 * no-tsd.c: Likewise.
2463 * pt-machine.c: Likewise.
2464 * ptclock_gettime.c: Likewise.
2465 * ptclock_settime.c: Likewise.
2466 * rwlock.c: Likewise.
2467 * sysdeps/alpha/pspinlock.c: Likewise.
2468 * sysdeps/alpha/pt-machine.h: Likewise.
2469 * sysdeps/arm/pspinlock.c: Likewise.
2470 * sysdeps/arm/pt-machine.h: Likewise.
2471 * sysdeps/cris/pspinlock.c: Likewise.
2472 * sysdeps/cris/pt-machine.h: Likewise.
2473 * sysdeps/hppa/pspinlock.c: Likewise.
2474 * sysdeps/hppa/pt-machine.h: Likewise.
2475 * sysdeps/i386/i686/pt-machine.h: Likewise.
2476 * sysdeps/i386/pspinlock.c: Likewise.
2477 * sysdeps/i386/pt-machine.h: Likewise.
2478 * sysdeps/i386/useldt.h: Likewise.
2479 * sysdeps/ia64/pspinlock.c: Likewise.
2480 * sysdeps/ia64/pt-machine.h: Likewise.
2481 * sysdeps/m68k/pspinlock.c: Likewise.
2482 * sysdeps/m68k/pt-machine.h: Likewise.
2483 * sysdeps/mips/pspinlock.c: Likewise.
2484 * sysdeps/mips/pt-machine.h: Likewise.
2485 * sysdeps/powerpc/pspinlock.c: Likewise.
2486 * sysdeps/powerpc/pt-machine.h: Likewise.
2487 * sysdeps/pthread/bits/initspin.h: Likewise.
2488 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2489 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2490 * sysdeps/pthread/getcpuclockid.c: Likewise.
2491 * sysdeps/pthread/posix-timer.h: Likewise.
2492 * sysdeps/pthread/timer_create.c: Likewise.
2493 * sysdeps/pthread/timer_delete.c: Likewise.
2494 * sysdeps/pthread/timer_getoverr.c: Likewise.
2495 * sysdeps/pthread/timer_gettime.c: Likewise.
2496 * sysdeps/pthread/timer_routines.c: Likewise.
2497 * sysdeps/pthread/timer_settime.c: Likewise.
2498 * sysdeps/pthread/tst-timer.c: Likewise.
2499 * sysdeps/s390/pspinlock.c: Likewise.
2500 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2501 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2502 * sysdeps/sh/pspinlock.c: Likewise.
2503 * sysdeps/sh/pt-machine.h: Likewise.
2504 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2505 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2506 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2507 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2508 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2509 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2510 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2511 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2512 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2513 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2514 * tststack.c: Likewise.
2515 * unload.c: Likewise.
2516 * weaks.c: Likewise.
2517 * wrapsyscall.c: Likewise.
2519 * sysdeps/pthread/pt-initfini.c: Changed copying
2520 permission notice to Lesser GPL from Library GPL, including the
2521 references in the special exception.
2522 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2523 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2524 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2526 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2528 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2530 2002-08-26 Ulrich Drepper <drepper@redhat.com>
2532 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2533 overflow [PR libc/4244].
2535 2002-08-25 Ulrich Drepper <drepper@redhat.com>
2537 * sysdeps/pthread/timer_routines.c (thread_func): Make the
2538 compiler happy by adding a return statement which will never be
2541 * tst-context.c (main): Cast to long before casting to pointer.
2543 * Examples/ex17.c (main): Use correct format string.
2545 * Examples/ex9.c (thread): Remove incorrect return statement.
2547 2002-08-23 Ulrich Drepper <drepper@redhat.com>
2549 * pthread.c (__linuxthreads_version): New global constant.
2551 2002-08-23 Andreas Jaeger <aj@suse.de>
2553 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2554 as thread specific register.
2555 (testandset): Fix inline asm.
2556 (THREAD_GETMEM): Fix inline asm.
2558 2002-08-22 Roland McGrath <roland@redhat.com>
2560 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2562 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2563 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2564 macro. That chooses whether to reuse %gs value or let kernel set it.
2565 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2566 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2569 2002-08-21 Ulrich Drepper <drepper@redhat.com>
2571 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2572 also to the third definition of this macro.
2574 2002-06-17 Andreas Jaeger <aj@suse.de>
2576 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2579 2002-08-20 Ulrich Drepper <drepper@redhat.com>
2581 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2582 loading/reading segment registers. Some old hardware doesn't
2583 handle the 32-bit instructions as expected.
2584 * sysdeps/i386/tls.h: Likewise.
2586 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2587 renamed to secondcall and use is negated.
2588 (TLS_SETUP_GS_SEGMENT): Likewise.
2589 (TLS_INIT_TP): Likewise.
2590 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2593 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2594 registers. No need to mask upper 16 bits in this case.
2595 * sysdeps/i386/useldt.h: Likewise.
2596 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2597 is the same since the GDT content changed.
2599 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2600 to TLS_SETUP_GS_SEGMENT.
2601 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2602 TLS_DO_SET_THREAD_AREA.
2603 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2604 entry number from %gs value.
2605 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2608 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2609 Pass true to _dl_deallocate_tls.
2610 (pthread_free): Likewise.
2611 * pthread.c (__pthread_initialize_manager): Likewise.
2613 2002-08-19 Ulrich Drepper <drepper@redhat.com>
2615 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2616 computing index from %gs value.
2618 2002-08-16 Roland McGrath <roland@redhat.com>
2620 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2621 register value from entry number properly.
2623 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2624 optimally conditional on [__PIC__].
2625 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2626 without touching errno, and use latest modify_ldt-like interface.
2627 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2628 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2629 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2630 existing %gs value as the segment to set.
2631 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
2632 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2633 by the first thread's early TLS setup.
2635 2002-08-15 Roland McGrath <roland@redhat.com>
2637 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2638 return a value as callers now expect.
2640 2002-08-11 Roland McGrath <roland@redhat.com>
2642 * pthread.c (__pthread_initialize_manager): Initialize
2643 p_header.data.tcb field of manager thread's descriptor.
2644 (__pthread_initialize_minimal): Don't initialize p_header.data.self
2645 field, already done by TLS_INIT_TP.
2647 * manager.c (pthread_handle_create): Move p_header field initializers
2650 2002-08-08 Ulrich Drepper <drepper@redhat.com>
2652 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2654 2002-08-07 Ulrich Drepper <drepper@redhat.com>
2656 * pthread.c (__linuxthreads_initial_report_events): New variable.
2657 (__pthread_initialize_manager): Use it to initialize p_report_events
2659 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2661 2002-08-07 Roland McGrath <roland@redhat.com>
2663 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2664 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2666 2002-08-02 Roland McGrath <roland@redhat.com>
2668 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2669 Add _LIBC_TSD_KEY_LOCALE.
2670 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2671 Call __uselocale to initialize our per-thread locale pointer to
2673 * pthread.c (__pthread_initialize_minimal): Likewise.
2675 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2677 2002-08-02 Ulrich Drepper <drepper@redhat.com>
2679 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2682 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2683 Don't use p_libc_specific element in thread descriptor.
2685 2002-07-30 Roland McGrath <roland@redhat.com>
2687 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2688 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2689 which does the right thing when __thread support is available.
2690 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2691 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2692 `p_h_errno', `p_resp', and `p_res' members.
2693 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2694 Don't initialize `p_errnop' and `p_h_errnop' members.
2695 (__pthread_reset_main_thread): Likewise.
2696 (__pthread_initialize_manager): Likewise.
2697 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2698 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2699 Don't initialize `p_resp' member.
2700 (__pthread_reset_main_thread): Likewise.
2701 * manager.c (pthread_handle_create): Likewise.
2702 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2703 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2704 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2705 * errno.c [USE_TLS && HAVE___THREAD]
2706 (__h_errno_location, __res_state): Don't define these at all.
2708 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2709 (INSTALL_NEW_DTV, GET_DTV): Likewise.
2710 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2712 * weaks.c: Don't include <errno.h> here.
2714 2002-08-01 Roland McGrath <roland@redhat.com>
2716 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2718 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2719 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2720 (TLS_INIT_TP): Use that.
2722 2002-08-02 Jakub Jelinek <jakub@redhat.com>
2724 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2725 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2726 (FREE_THREAD): Avoid modify_ldt if using GDT.
2727 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2729 2002-07-25 Jakub Jelinek <jakub@redhat.com>
2731 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2732 * sysdeps/i386/pt-machine.h: Likewise.
2733 * sysdeps/i386/useldt.h: Likewise.
2735 2002-07-22 Ulrich Drepper <drepper@redhat.com>
2737 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2738 call __libc_setup_tls first.
2739 * Makefile: Actually create tst-signal.out file when running the test.
2740 (tests): Add tststatic.
2741 * Examples/tststatic.c: New file.
2743 2002-07-19 Ulrich Drepper <drepper@redhat.com>
2745 * errno.c (__errno_location): Don't define unless !USE_TLS
2747 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2748 * sysdeps/i386/tls.h: Likewise.
2749 * sysdeps/i386/useldt.h: Likewise.
2750 * sysdeps/i386/i686/pt-machine.h: Likewise.
2752 2002-07-02 H.J. Lu <hjl@gnu.org>
2754 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
2756 * sysdeps/mips/pt-machine.h: Likewise.
2758 2002-07-14 Ulrich Drepper <drepper@redhat.com>
2760 * manager.c (pthread_handle_create): Initialize self-reference in
2763 2002-07-01 Jakub Jelinek <jakub@redhat.com>
2765 * Examples/ex9.c (main): Remove unused th variable.
2767 2002-07-10 Ulrich Drepper <drepper@redhat.com>
2769 * wrapsyscall.c: Add __nanosleep alias.
2770 * Versions (GLIBC_2.2.6): Add __nanosleep.
2771 * bug-sleep.c: New file.
2772 * Makefile (tests): Add bug-sleep.
2774 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
2776 * Examples/ex9.c (main): Use list of children and join them.
2777 (thread): Do not call exit.
2779 2002-06-20 Ulrich Drepper <drepper@redhat.com>
2781 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2782 Unconditionally use the code using spinlock. Use __pthread_release
2784 (wait_node_free): Likewise.
2785 (__pthread_acquire, __pthread_release): Unconditionally define.
2787 2002-06-07 Jakub Jelinek <jakub@redhat.com>
2789 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2791 2002-05-24 Ulrich Drepper <drepper@redhat.com>
2793 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2795 2002-05-21 Ulrich Drepper <drepper@redhat.com>
2797 * sysdeps/pthread/pthread.h (pthread_create): Rename first
2799 (pthread_cancel): Likewise.
2800 * internals.h (__pthread_create_2_1): Likewise.
2801 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2803 2002-05-20 Ulrich Drepper <drepper@redhat.com>
2805 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2806 Patch by Glen Nakamura <gen@flex.com>.
2808 2002-05-03 Ulrich Drepper <drepper@redhat.com>
2810 * signals.c: Move sighandler functions to...
2811 * sighandler.c: ...here. New file.
2812 * signals.c: Move signal handler related type definitions to...
2813 * internals.h: ...here. Add prototypes for signal handlers.
2814 * Makefile (libpthread-routines): Add sighandler.
2815 (CFLAGS-sighandler.c): Add $(exceptions).
2817 2002-04-30 Jakub Jelinek <jakub@redhat.com>
2819 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2821 2002-04-08 Ulrich Drepper <drepper@redhat.com>
2823 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2824 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2825 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2826 based on previous one and not on current time. Count overruns.
2827 Patch by Eric F. Sorton <eric@cctcorp.com>.
2829 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2831 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2833 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2834 if it isn't defined yet.
2835 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2836 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2838 * sysdeps/sh/tls.h: New file.
2840 2002-04-08 Jakub Jelinek <jakub@redhat.com>
2842 * manager.c (__pthread_manager_event): Use self instead of arg
2843 for INIT_THREAD_SELF.
2844 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2845 _pthread_descr_struct) instead of sizeof (*descr).
2847 2002-04-05 Ulrich Drepper <drepper@redhat.com>
2849 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2850 * sysdeps/alpha/pt-machine.h: Likewise.
2851 * sysdeps/arm/pt-machine.h: Likewise.
2852 * sysdeps/cris/pt-machine.h: Likewise.
2853 * sysdeps/hppa/pt-machine.h: Likewise.
2854 * sysdeps/m68k/pt-machine.h: Likewise.
2855 * sysdeps/mips/pt-machine.h: Likewise.
2856 * sysdeps/powerpc/pt-machine.h: Likewise.
2857 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2858 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2859 * sysdeps/sh/pt-machine.h: Likewise.
2860 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2861 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2862 * sysdeps/x86_64/pt-machine.h: Likewise.
2864 2002-04-05 Jakub Jelinek <jakub@redhat.com>
2866 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2867 instead of pthread_mutexattr_setkind_np.
2868 (pthread_mutexattr_gettype): Similarly.
2869 * man/pthread_mutexattr_setkind_np.man: New.
2870 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2872 2002-04-02 Ulrich Drepper <drepper@redhat.com>
2874 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2876 2002-03-22 Jakub Jelinek <jakub@redhat.com>
2878 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2880 2002-03-22 Ulrich Drepper <drepper@redhat.com>
2882 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2884 2002-03-17 Andreas Jaeger <aj@suse.de>
2886 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2888 * sysdeps/alpha/pt-machine.h: Likewise.
2889 * sysdeps/arm/pt-machine.h: Likewise.
2890 * sysdeps/cris/pt-machine.h: Likewise.
2891 * sysdeps/hppa/pt-machine.h: Likewise.
2892 * sysdeps/i386/i686/pt-machine.h: Likewise.
2893 * sysdeps/ia64/pt-machine.h: Likewise.
2894 * sysdeps/m68k/pt-machine.h: Likewise.
2895 * sysdeps/mips/pt-machine.h: Likewise.
2896 * sysdeps/powerpc/pt-machine.h: Likewise.
2897 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2898 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2899 * sysdeps/sh/pt-machine.h: Likewise.
2900 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2901 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2902 * sysdeps/x86_64/pt-machine.h: Likewise.
2904 * internals.h: Move testandset and __compare_and_swap prototypes
2907 2002-03-03 Andreas Jaeger <aj@suse.de>
2909 * errno.c: Include resolv.h to avoid warning.
2911 2002-02-27 Ulrich Drepper <drepper@redhat.com>
2913 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2916 2002-02-23 Ulrich Drepper <drepper@redhat.com>
2918 * attr.c (pthread_getattr_np): Don't take thread descriptor size
2919 into account if USE_TLS.
2920 * manager.c (pthread_handle_create): Free TLS data structures if call
2921 failed. Pass correct stack to clone if USE_TLS.
2922 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2923 * sysdeps/i386/i686/pt-machine.h: Likewise.
2924 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2926 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2927 Add p_stackaddr element #if USE_TLS.
2928 * internals.c: Include <tls.h>.
2929 * manager.c: Integrate creating and handling of thread descriptor
2931 * pthread.c: Likewise.
2932 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2933 Include <linuxthreads/descr.h> only if TLS is really used.
2934 (GET_DTV): New macro.
2935 (TLS_INIT_TP): Initialize self pointer.
2937 2002-02-17 Andreas Schwab <schwab@suse.de>
2939 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2942 2002-02-12 Ulrich Drepper <drepper@redhat.com>
2944 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2945 (INSTALL_DTV): Adjust for being passed pointer to element with length.
2947 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2949 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2951 2002-02-08 Richard Henderson <rth@redhat.com>
2953 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2955 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2957 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2960 2002-02-07 H.J. Lu <hjl@gnu.org>
2962 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2964 (__pthread_spin_lock): Remove ".set noreorder".
2965 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2967 2002-02-05 H.J. Lu <hjl@gnu.org>
2969 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2971 * sysdeps/mips/pt-machine.h (testandset): Likewise.
2972 (__compare_and_swap): Likewise.
2974 2002-02-07 Ulrich Drepper <drepper@redhat.com>
2976 * internals.h: Move declarations/definitions of
2977 __pthread_initial_thread_bos, __pthread_initial_thread,
2978 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2979 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2980 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2982 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2983 Define THREAD_GETMEM accordingly.
2985 2002-02-06 Ulrich Drepper <drepper@redhat.com>
2987 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
2989 * sysdeps/i386/tls.h: Define THREAD_DTV.
2991 2002-02-04 Ulrich Drepper <drepper@redhat.com>
2993 * internals.h: Move thread descriptor definition...
2994 * descr.h.: ...here. New file.
2995 * sysdeps/i386/tls.h: New file.
2997 2002-02-01 H.J. Lu <hjl@gnu.org>
2999 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
3000 different register in the delayed slot. Use branch likely.
3002 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
3003 (__compare_and_swap): Return 0 only when failed to compare. Use
3006 2002-02-01 Jakub Jelinek <jakub@redhat.com>
3008 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
3009 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
3010 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
3011 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
3012 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
3013 * sysdeps/sparc/sparc64/Versions: New file.
3014 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
3016 2002-01-31 Ulrich Drepper <drepper@redhat.com>
3018 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
3019 in SHARED code, use GL(dl_cpuclock_offset).
3021 2002-01-28 Andreas Jaeger <aj@suse.de>
3023 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
3024 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
3026 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
3028 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
3029 (CURRENT_STACK_FRAME): Remove duplicate definition.
3030 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3032 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
3034 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
3037 2002-01-12 Andreas Schwab <schwab@suse.de>
3039 * Makefile (test-srcs): Add tst-signal.
3040 (tests): Run tst-signal.
3041 (distribute): Add tst-signal.sh.
3042 * tst-signal.c, tst-signal.sh: New files.
3044 2002-01-14 Andreas Jaeger <aj@suse.de>
3046 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
3048 2002-01-11 Andreas Schwab <schwab@suse.de>
3050 * signals.c (sighandler): Initialize all elements to SIG_ERR.
3051 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
3053 2002-01-06 Richard Henderson <rth@redhat.com>
3055 * sysdeps/alpha/elf/pt-initfini.c: New file.
3057 2001-12-29 Andreas Jaeger <aj@suse.de>
3059 * Examples/ex9.c: Add noreturn attribute for thread.
3060 * Examples/ex10.c: Likewise.
3061 * Examples/ex13.c (thread_start): Likewise.
3062 * Examples/ex15.c (worker): Likewise.
3064 * Examples/ex18.c: Include unistd.h for prototype of sleep.
3066 2001-12-14 Ulrich Drepper <drepper@redhat.com>
3068 * man/pthread_atfork.man: Adjust description of mutex handling
3069 after fork for current implementation.
3070 * linuxthreads.texi: Likewise [PR libc/2519].
3072 2001-12-13 Andreas Schwab <schwab@suse.de>
3074 * specific.c (pthread_key_delete): Don't contact the thread
3075 manager if no threads have been created yet.
3077 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
3079 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3080 qualifier to be safe.
3082 2001-11-30 Andreas Schwab <schwab@suse.de>
3084 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3085 that self is the manager thread, and initialize the thread
3087 (thread_self_stack) [THREAD_SELF]: New function to find self via
3089 * manager.c (pthread_handle_create): Don't block cancel signal any
3092 2001-11-29 Andreas Jaeger <aj@suse.de>
3094 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3096 (INIT_THREAD_SELF): New.
3097 (THREAD_GETMEM): New.
3099 (THREAD_SETMEM): New.
3100 (THREAD_SETMEM_NC): New.
3101 (FLOATING_STACKS): Define.
3102 (ARCH_STACK_MAX_SIZE): Define.
3104 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
3106 Bugfix to pthread_key_delete. It was iterating over the thread
3107 manager's linked list of threads, behind the thread manager's
3108 back causing a race. The fix is to have the manager iterate over
3109 the threads instead, using a new request type for doing so.
3110 * internals.h (struct pthread_request): New manager request type
3111 REQ_FOR_EACH_THREAD.
3112 * manager.c (pthread_for_each_thread): New function.
3113 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3114 * specific.c (struct pthread_key_delete_helper_args): New type.
3115 (pthread_key_delete_helper): New static function.
3116 (pthread_key_delete): Use the new thread manager
3117 REQ_FOR_EACH_THREAD function to iterate over the threads and set
3118 the delete key slot to a null value in each thread.
3119 * Examples/ex18.c: New test.
3120 * Makefile (tests): Add ex18.
3122 2001-11-22 Wolfram Gloger <wg@malloc.de>
3124 * pthread.c (pthread_onexit_process): Don't call free
3125 after threads have been asynchronously terminated.
3127 * manager.c (pthread_handle_exit): Surround cancellation
3128 of threads with __flockfilelist()/__funlockfilelist().
3130 2001-11-26 Andreas Schwab <schwab@suse.de>
3132 * manager.c (pthread_handle_create): Start the child thread with
3133 the cancel signal blocked, so that it does not handle it before
3134 the thread register is set up. Save errno from failed clone call.
3136 2001-11-15 Ulrich Drepper <drepper@redhat.com>
3138 * sysdeps/i386/i686/Implies: Removed.
3139 * sysdeps/i386/i686/Versions: New file.
3141 2001-10-31 Andreas Jaeger <aj@suse.de>
3143 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3145 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
3147 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3148 to __linuxthreads_pthread_sizeof_descr to match name used by
3149 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3150 linuxthreads_db/td_symbol_list.c.
3152 2001-09-22 Andreas Jaeger <aj@suse.de>
3154 * linuxthreads/tst-context.c: Avoid compile warning.
3156 2001-09-20 Andreas Jaeger <aj@suse.de>
3158 * shlib-versions: Add x86-64.
3160 2001-09-19 Andreas Jaeger <aj@suse.de>
3162 * sysdeps/x86_64/Makefile: New file.
3163 * sysdeps/x86_64/pspinlock.c: New file.
3164 * sysdeps/x86_64/pt-machine.h: New file.
3166 2001-09-12 Jakub Jelinek <jakub@redhat.com>
3168 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3170 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3172 2001-09-11 Ulrich Drepper <drepper@redhat.com>
3173 Wolfram Gloger <wg@malloc.de>
3175 * join.c: Protect all communications from and to manager with
3177 * manager.c: Likewise.
3178 * pthread.c: Likewise.
3179 * smeaphore.c: Likewise.
3181 2001-08-29 Ulrich Drepper <drepper@redhat.com>
3183 * spinlock.c (__pthread_lock): Top max_count value with
3184 MAX_ADAPTIVE_SPIN_COUNT.
3185 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3187 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3190 2001-08-27 Jakub Jelinek <jakub@redhat.com>
3192 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3193 non-opaque type if __USE_UNIX98.
3195 2001-08-26 Jakub Jelinek <jakub@redhat.com>
3197 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3198 non-opaque lock types also if _IO_MTSAFE_IO is defined.
3200 2001-08-23 Roland McGrath <roland@frob.com>
3202 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3203 new first argument, skip the cleanup handler if it's zero.
3204 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3205 (__libc_lock_define_initialized_recursive): Use it.
3206 * sysdeps/pthread/bits/stdio-lock.h: File removed.
3207 The sysdeps/generic file from the main tree now suffices.
3209 2001-08-22 Roland McGrath <roland@frob.com>
3211 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3212 instead of <pthread.h>.
3213 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3214 (_IO_lock_initializer): Add braces.
3215 (_IO_lock_lock): Use __libc_lock_lock_recursive.
3216 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3218 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3219 (__libc_lock_define_initialized_recursive): Use it.
3220 (__libc_lock_init_recursive): Likewise.
3221 (__libc_lock_fini_recursive): Likewise.
3222 (__libc_lock_lock_recursive): Likewise.
3223 (__libc_lock_trylock_recursive): Likewise.
3224 (__libc_lock_unlock_recursive): Likewise.
3225 (__libc_lock_define_recursive): New macro.
3227 2001-08-14 Jakub Jelinek <jakub@redhat.com>
3229 * lockfile.c (__pthread_provide_lockfile): New variable.
3230 * pthread.c (__pthread_require_lockfile): New variable.
3231 * cancel.c (__pthread_require_lockfile): New variable.
3233 2001-07-31 Ulrich Drepper <drepper@redhat.com>
3235 * tst-context.c (threadfct): Initialize context before calling
3238 * Examples/ex17.c: Make sure test thread is around long enough.
3240 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
3242 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3244 2001-07-24 Ulrich Drepper <drepper@redhat.com>
3246 * tst-context.c (main): Print explanation before bailing out
3247 because context handling is not supported.
3249 2001-07-23 Ulrich Drepper <drepper@redhat.com>
3251 * Makefile (tests): Add tst-context.
3252 * tst-context.c: New file.
3254 * sysdeps/pthread/bits/stdio-lock.h: Define
3255 _IO_cleanup_region_start_noarg.
3257 2001-07-23 Jakub Jelinek <jakub@redhat.com>
3259 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3260 (ARCH_STACK_MAX_SIZE): Define.
3261 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3262 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3264 2001-07-19 Jakub Jelinek <jakub@redhat.com>
3266 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3268 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3269 (ARCH_STACK_MAX_SIZE): Define.
3270 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3271 NEED_SEPARATE_REGISTER_STACK.
3273 2001-07-16 Andreas Schwab <schwab@suse.de>
3275 * Makefile (before-compile): Don't add $(objpfx)crti.o.
3276 (omit-deps): Add crti.
3277 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3278 it is filtered out of the link command.
3280 2001-07-16 Ulrich Drepper <drepper@redhat.com>
3282 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3283 to find the right value for __pthread_initial_thread_bos, it's not
3284 used. If not FLOATING_STACKS first run
3285 __pthread_init_max_stacksize.
3287 2001-06-16 H.J. Lu <hjl@gnu.org>
3289 * internals.h: Include <stackinfo.h>.
3291 * attr.c: Don't include <stackinfo.h> here.
3292 * cancel.c: Likewise.
3293 * manager.c: Likewise.
3294 * pthread.c: Likewise.
3295 * ptlongjmp.c: Likewise.
3297 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
3299 * attr.c: Make _STACK_GROWS_UP work.
3300 * internals.h: Likewise.
3301 * manager.c: Likewise.
3302 * pthread.c: Likewise.
3304 2001-06-15 H.J. Lu <hjl@gnu.org>
3306 * pthread.c (__pthread_reset_main_thread): Fix a typo.
3308 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
3310 * semaphore.h: Use struct _pthread_fastlock as an element of
3311 sem_t instead of an identical struct.
3312 * rwlock.c: Remove casts.
3313 * semaphore.c: Likewise.
3315 2001-04-30 Alan Modra <amodra@one.net.au>
3317 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3319 2001-05-25 Bruce Mitchener <bruce@cubik.org>
3321 * linuxthreads.texi: Spelling corrections.
3323 2001-05-25 Ulrich Drepper <drepper@redhat.com>
3325 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3326 returning successfully.
3327 Patch by Gene Cooperman <gene@ccs.neu.edu>.
3329 2001-05-24 Ulrich Drepper <drepper@redhat.com>
3331 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3332 serious work try once whether the lock is uncontested.
3333 Remove duplicate reading of __status before loop.
3334 Change suggested by Hans Boehm <hans_boehm@hp.com>.
3336 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3337 (__pthread_alt_trylock): Likewise.
3339 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
3341 Memory barrier overhaul following line by line inspection.
3342 * mutex.c (pthread_once): Missing memory barriers added.
3343 * pthread.c (__pthread_wait_for_restart_signal,
3344 __pthread_timedsuspend_new, __pthread_restart_new): Added
3345 memory barriers ``just in case'' and for documentary value.
3346 * spinlock.c (__pthread_release): New inline function for releasing
3347 spinlock, to complement __pthread_acquire. Includes memory
3348 barrier prior to assignment to spinlock, and __asm __volatile
3349 dance to prevent reordering or optimization of the spinlock access.
3350 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3351 __pthread_alt_timedlock, __pthread_alt_unlock,
3352 __pthread_compare_and_swap): Updated to use new __pthread_release
3353 instead of updating spinlock directly.
3354 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3355 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3356 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3357 Memory barrier overhaul. Lots of missing memory barriers added,
3358 a couple needless ones removed.
3359 * spinlock.c (__pthread_compare_and_swap): testandset optimization
3360 removed, just calls __pthread_acquire, which has the new read
3361 barrier in it before its testandset.
3363 2001-05-20 Roland McGrath <roland@frob.com>
3365 * Makeconfig: New file, variables used to be in main libc Makeconfig.
3367 2001-05-09 Geoff Keating <geoffk@redhat.com>
3369 * sysdeps/powerpc/pt-machine.h
3370 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3371 (__compare_and_swap): Remove memory barriers.
3372 (__compare_and_swap_with_release_semantics): New function.
3374 2001-04-24 Andreas Jaeger <aj@suse.de>
3376 * wrapsyscall.c: send* and recv* return ssize_t.
3378 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3379 mutex instead of double locking it.
3380 Reported by Pierre Artaud <partaud@sodatec.com>.
3382 2001-04-23 Ulrich Drepper <drepper@redhat.com>
3384 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3385 using #ifdef whether the clock is available.
3386 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3388 * sysdeps/ia64/Versions: New file.
3390 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3391 have to call __gmon_start__ in the libpthread DSO.
3392 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3394 * Makefile (libpthread-routines): Add ptclock_gettime and
3396 * internals.h: Don't use cpuclock-init.h definitions, use
3397 hp-timing.h definitions.
3398 * pthread.c: Likewise.
3399 * manager.c: Likewise.
3400 * ptclock_gettime.c: New file.
3401 * ptclock_settime.c: New file.
3402 * internals.h: Fix parameter type for __pthread_clock_gettime and
3403 __pthread_clock_settime.
3405 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3406 * sysdeps/i386/i586/ptclock_settime.c: Removed.
3407 * sysdeps/i386/i586/Makefile: Removed.
3409 2001-04-22 Ulrich Drepper <drepper@redhat.com>
3411 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3412 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3414 2001-04-21 Andreas Jaeger <aj@suse.de>
3416 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3417 attribute, remove statements that will never be executed.
3418 (thread_func): Remove mutex_unlock call since it's never executed.
3419 (thread_func): Fix comment as suggested by Jakub Jelinek.
3421 * manager.c (__pthread_manager): Add noreturn
3423 (pthread_start_thread): Likewise, remove return statement.
3424 (pthread_start_thread_event): Likewise.
3425 Add noreturn attribute for pthread_handle_exit.
3426 * weaks.c: Add noreturn attribute for pthread_exit.
3428 * internals.h: Add __pthread_clock_gettime and
3429 __pthread_clock_settime prototypes.
3431 2001-04-21 Ulrich Drepper <drepper@redhat.com>
3433 * internals.h: Include <cpuclock-init.h>.
3434 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3435 CPUCLOCK_VARDEF is defined.
3436 * pthread.c (__pthread_initialize_minimal): Initialize
3437 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3438 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3439 for new thread to current CPU clock value.
3441 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3443 * sysdeps/i386/i586/Makefile: New file.
3444 * sysdeps/i386/i586/Versions: New file.
3445 * sysdeps/i386/i586/ptclock_gettime.c: New file.
3446 * sysdeps/i386/i586/ptclock_settime.c: New file.
3447 * sysdeps/i386/i686/Implies: New file.
3449 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3451 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3452 $generated, not $postclean-generated.
3454 2001-04-18 Andreas Jaeger <aj@suse.de>
3456 * Makefile (otherlibs): Added.
3458 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3460 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3462 2001-04-16 Ulrich Drepper <drepper@redhat.com>
3464 * signals.c (sigwait): NSIG is no signal number. Block all
3465 signals while in signal handler for signals in SET.
3466 Patch by Manfred Spraul <manfred@colorfullife.com>.
3468 2001-04-12 Ulrich Drepper <drepper@redhat.com>
3470 * tst-cancel.c: Disable most tests. Add new test where all
3471 cleanup handlers must run.
3472 * Makefile (tests): Add tst-cancel again.
3474 * cancel.c (__pthread_perform_cleanup): Correct condition for
3475 leaving cleanup loop early.
3477 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3478 all the files which use CURRENT_STACK_FRAME.
3479 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3480 __builtin_frame_address.
3481 * sysdeps/i386/i686/pt-machine.h: Likewise.
3483 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3485 * Makefile (tests): Comment out tst-cancel for now.
3487 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
3488 temporary file in object directory.
3489 * Makefile: Don't allow inlining when compiling tst-cancel.c.
3490 Pass $(objpfx) to tst-cancel.
3492 2001-04-11 David S. Miller <davem@redhat.com>
3494 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3495 up closer to user local variables so that new cleanup heuristics work.
3496 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3498 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3500 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3502 (_pthread_cleanup_push_defer): Likewise.
3504 * tst-cancel.c (main): Fix loop printing cleanup output.
3506 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
3508 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3510 (__pthread_spin_trylock): Likewise.
3511 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3513 2001-04-10 Ulrich Drepper <drepper@redhat.com>
3515 * join.c (pthread_exit): Move code to new function __pthread_do_exit
3516 which takes an extra parameter with the current frame pointer.
3517 Call new function with CURRENT_STACK_FRAME.
3518 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
3519 with the new parameter.
3520 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3521 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
3522 this parameter as the initial value the cleanup handler records are
3523 compared against. No active cleanup handler record must have an
3524 address lower than the previous one and the initial record must be
3525 above (below on PA) the frame address passed in.
3526 (pthread_setcancelstate): Call __pthread_do_exit instead of
3528 (pthread_setcanceltype): Likewise.
3529 (pthread_testcancel): Likewise.
3530 (_pthread_cleanup_pop_restore): Likewise.
3531 * condvar.c (pthread_cond_wait): Likewise.
3532 (pthread_cond_timedwait_relative): Likewise.
3533 * manager.c (pthread_start_thread): Likewise.
3534 * oldsemaphore.c (__old_sem_wait): Likewise.
3535 * pthread.c (pthread_handle_sigcancel): Likewise.
3536 * semaphore.c (__new_sem_wait): Likewise.
3537 (sem_timedwait): Likewise.
3538 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3539 to limit the cleanup handlers which get run.
3540 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
3541 for __pthread_perform_cleanup.
3543 * Makefile (tests): Add tst-cancel.
3544 * tst-cancel.c: New file.
3546 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
3548 * sysdeps/cris/pt-machine.h: New file.
3549 * sysdeps/cris/pspinlock.c: New file.
3551 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3553 * shlib-versions: Add case for Linux on CRIS.
3555 2001-03-26 Ulrich Drepper <drepper@redhat.com>
3557 * attr.c (pthread_getattr_np): Correct computation of stack size
3558 for machiens with register stack.
3560 * Examples/ex17.c (main): Correct detection of failed mmap call.
3562 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3564 * pthread.c (__pthread_initialize_manager): Fix a typo.
3566 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3568 * attr.c (__pthread_attr_setstack): Fix alignment check.
3569 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3570 * Makefile (tests): Add ex17 test.
3571 * Examples/ex17.c: New test.
3573 2001-03-20 Ulrich Drepper <drepper@redhat.com>
3575 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3576 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3577 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3579 2001-03-18 Ulrich Drepper <drepper@redhat.com>
3581 * Makefile: When generating DSO link with libc_nonshared.a.
3583 2001-02-26 Jakub Jelinek <jakub@redhat.com>
3585 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3587 2001-02-23 Jakub Jelinek <jakub@redhat.com>
3589 * internals.h (__pthread_init_max_stacksize): New prototype.
3590 * attr.c (__pthread_attr_setstacksize): Call
3591 __pthread_init_max_stacksize if not yet initialized.
3592 * pthread.c (__pthread_init_max_stacksize): New function.
3593 (__pthread_initialize_manager): Call it.
3594 Patch by <dtc@cmucl.cons.org>.
3596 2001-03-16 Ulrich Drepper <drepper@redhat.com>
3598 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3600 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3602 * shlib-versions: Add rule for Linux on 64 bit S/390.
3603 * sysdeps/s390/s390-64/pt-machine.h: New file.
3604 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3606 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3608 * sysdeps/s390/pt-machine.h: Move to...
3609 * sysdeps/s390/s390-32/pt-machine.h: ...here.
3610 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3612 2001-03-15 Ulrich Drepper <drepper@redhat.com>
3614 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3615 * attr.c: Implement pthread_getattr_np.
3616 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3617 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3618 * manager.c (pthread_handle_create): Initialize p_inheritsched.
3620 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3622 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3625 2001-02-20 Hans Boehm <hans_boehm@hp.com>
3627 * manager.c (manager_mask): Removed static vesion. Now always local
3628 to __pthread_manager().
3629 (manager_mask_all): Removed completely.
3630 (__pthread_manager): Remove manager_mask_all initialization.
3631 (pthread_handle_create): Remove code to set and reset signal mask
3632 around __clone2() calls.
3634 2001-02-17 Jakub Jelinek <jakub@redhat.com>
3636 * spinlock.c (__pthread_lock): Force lock->__status to be read from
3637 memory on every spin.
3639 2001-02-10 Andreas Jaeger <aj@suse.de>
3641 * Makefile (extra-objs): New.
3643 2001-02-09 Jakub Jelinek <jakub@redhat.com>
3645 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3646 __pthread_initialize_minimal prototype.
3648 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
3650 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3652 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
3654 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3656 2001-02-06 Ulrich Drepper <drepper@redhat.com>
3658 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3659 broken code. Patch by Jes Sorensen.
3661 2001-02-06 Andreas Jaeger <aj@suse.de>
3663 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3665 * internals.h: ...here.
3667 2001-02-05 Jes Sorensen <jes@linuxcare.com>
3669 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3671 2001-02-02 Ulrich Drepper <drepper@redhat.com>
3673 * Versions: Remove __pthread_initialize_minimal.
3675 2001-02-01 Ulrich Drepper <drepper@redhat.com>
3677 * Makefile: Add rules to build crti.o and make it being used in
3678 building libpthread.so.
3679 * sysdeps/i386/Makefile: New file.
3680 * sysdeps/pthread/pt-initfini.c: New file.
3682 * pthread.c: Cleanups.
3684 2001-01-28 Andreas Jaeger <aj@suse.de>
3686 * oldsemaphore.c (__old_sem_init): Adjust for last change.
3687 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3688 * spinlock.c: Likewise.
3690 2001-01-28 Ulrich Drepper <drepper@redhat.com>
3692 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3693 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3694 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3695 * pthread.c: Likewise.
3696 * spinlock.h: Likewise.
3697 * sysdeps/pthread/pthread.h: Likewise.
3699 2001-01-26 Ulrich Drepper <drepper@redhat.com>
3701 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3702 as struct __pthread_attr_s.
3704 * semaphore.h (sem_t): Cleanup namespace, rename status and
3707 2001-01-13 Jakub Jelinek <jakub@redhat.com>
3709 * pthread.c (pthread_onexit_process): Clear
3710 __pthread_manager_thread_bos after freeing it.
3711 * Makefile (tests): Add ex16.
3712 * Examples/ex16.c: New file.
3714 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3716 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3718 * pthread.c (pthread_exit_process): Rename to...
3719 (pthread_onexit_process): ...this.
3720 (pthread_atexit_process, pthread_atexit_retcode): New.
3721 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3722 and only if HAVE_Z_NODELETE is not defined.
3723 (__pthread_initialize_manager): Register pthread_atexit_retcode
3726 2001-01-11 Ulrich Drepper <drepper@redhat.com>
3728 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3730 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3732 * Makefile (tests): Add ex15.
3733 * Examples/ex15.c: New test.
3735 2001-01-08 Ulrich Drepper <drepper@redhat.com>
3737 * pthread.c (pthread_exit_process): Free memory allocated for
3740 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3742 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3743 (pthread_free): Always unmap the stack. It's safe now that we don't
3744 use MAP_FIXED to allocate stacks.
3746 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3748 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3750 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3752 2000-11-15 Wolfram Gloger <wg@malloc.de>
3754 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3755 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3757 2000-12-27 Andreas Jaeger <aj@suse.de>
3759 * Examples/ex13.c: Make local functions static.
3760 * ecmutex.c: Likewise.
3761 * joinrace.c: Likewise.
3762 * Examples/ex14.c: Likewise.
3764 * Examples/ex2.c: Make local functions static; reformat.
3765 * Examples/ex1.c: Likewise.
3766 * Examples/ex4.c: Likewise.
3767 * Examples/ex5.c: Likewise.
3768 * Examples/ex7.c: Likewise.
3770 * oldsemaphore.c: Add prototypes to shut up GCC.
3771 * pt-machine.c: Likewise.
3773 * weaks.c: Add prototype for pthread_exit.
3775 * internals.h: Add some prototypes, format prototypes and add
3777 Move __libc_waitpid prototype to include/sys/wait.h.
3779 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3780 * mutex.c: Likewise.
3781 * specific.c: Likewise.
3782 * ptfork.c: Likewise.
3784 * lockfile.c: Include internals.h to get prototypes.
3785 * events.c: Likewise.
3786 * sysdeps/alpha/pspinlock.c: Likewise.
3787 * sysdeps/arm/pspinlock.c: Likewise.
3788 * sysdeps/hppa/pspinlock.c: Likewise.
3789 * sysdeps/i386/pspinlock.c: Likewise.
3790 * sysdeps/ia64/pspinlock.c: Likewise.
3791 * sysdeps/m68k/pspinlock.c: Likewise.
3792 * sysdeps/mips/pspinlock.c: Likewise.
3793 * sysdeps/powerpc/pspinlock.c: Likewise.
3794 * sysdeps/s390/pspinlock.c: Likewise.
3795 * sysdeps/sh/pspinlock.c: Likewise.
3796 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3797 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3798 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3800 2000-12-27 Ulrich Drepper <drepper@redhat.com>
3802 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3803 (__pthread_attr_getstack): Return correct address.
3804 Add warnings for using pthread_attr_getstackaddr and
3805 pthread_attr_setstackaddr.
3807 2000-12-26 Ulrich Drepper <drepper@redhat.com>
3809 * Examples/ex6.c (test_thread): Make static.
3810 * Examples/ex12.c (test_thread): Make static and add noreturn
3813 2000-12-18 Jes Sorensen <jes@linuxcare.com>
3815 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3816 and compare_and_swap_with_release_semantics returns int not long.
3818 2000-12-17 Andreas Jaeger <aj@suse.de>
3820 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3822 * sysdeps/arm/pt-machine.h (testandset): Likewise.
3823 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3824 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3825 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3826 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3827 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3829 2000-12-17 Ulrich Drepper <drepper@redhat.com>
3831 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3832 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3834 2000-12-17 Andreas Jaeger <aj@suse.de>
3836 * internals.h: Add prototypes for testandset and
3837 __compare_and_swap to shut up gcc warnings.
3839 2000-12-06 Wolfram Gloger <wg@malloc.de>
3841 * join.c (pthread_detach): Allow case where the thread has already
3844 2000-12-05 Andreas Jaeger <aj@suse.de>
3846 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3847 * sysdeps/mips/pt-machine.h (testandset): Likewise.
3848 (__compare_and_swap): Likewise.
3849 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3851 2000-11-20 Jakub Jelinek <jakub@redhat.com>
3853 * Examples/ex3.c (main): Cast int to long before casting to void *.
3854 (search): Cast void * to long, not int.
3855 * Examples/ex8.c (main, thread): Similarly.
3856 * Examples/ex11.c (main): Similarly.
3857 * Examples/ex14.c (worker, do_test): Similarly.
3858 * ecmutex.c (worker, do_test): Similarly.
3859 (nlocks): Cast to int.
3861 2000-11-08 Bruce Mitchener <bruce@cubik.org>
3863 * linuxthreads.texi: Add documentation for pthreads attributes
3864 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
3865 patch. Document pthread_[sg]etconcurrency(). Mark
3866 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3868 2000-11-07 Ulrich Drepper <drepper@redhat.com>
3870 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3872 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3873 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3875 2000-11-06 Ulrich Drepper <drepper@redhat.com>
3877 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3878 not doing it right now.
3879 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3881 2000-10-30 Ulrich Drepper <drepper@redhat.com>
3883 * Examples/ex4.c (main): Don't use exit() to avoid warning with
3886 2000-10-29 Ulrich Drepper <drepper@redhat.com>
3888 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3889 here. Reported by Bruce Mitchener <bruce@cubik.org>.
3891 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3892 discussing mutexes. (As per the Unix98 name for the API.)
3893 Changes documentation for pthread_mutexattr_setkind_np() and
3894 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3895 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3896 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3897 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3898 Begins to introduce discussion of the ``timed'' mutex type. This
3899 discussion is currently incomplete.
3900 Patch by Bruce Mitchener <bruce@cubik.org>.
3902 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3903 Yutaka Niibe <gniibe@chroot.org>
3905 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3906 has restrictions, use register.
3908 2000-10-23 Andreas Schwab <schwab@suse.de>
3910 * Examples/ex14.c (TIMEOUT): Override default timeout.
3912 2000-10-16 Ulrich Drepper <drepper@redhat.com>
3914 * specific.c: Protect tsd array modification in thread data
3915 structures by getting the thread lock in pthread_key_delete and
3916 __pthread_destroy_specifics.
3917 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3919 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3921 * sysdeps/pthread/bits/initspin.h: New file.
3922 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3923 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3924 (__pthread_alt_init_lock): Likewise.
3925 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3927 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3929 * oldsemaphore.c (__old_sem_init): Release lock with
3930 LT_SPINLOCK_INIT, not zero.
3931 * spinlock.c (__pthread_unlock): Likewise.
3932 (__pthread_alt_lock): Likewise.
3933 (__pthread_alt_timedlock): Likewise.
3934 (__pthread_alt_unlock): Likewise.
3935 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3936 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
3937 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
3938 LT_SPINLOCK_INIT do initialize spinlocks not 0.
3940 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3942 * shlib-versions: Add version definitions for hppa-linux.
3944 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3946 * sysdeps/hppa/pspinlock.c: New file.
3947 * sysdeps/hppa/pt-machine.h: New file.
3948 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3950 2000-10-05 Jakub Jelinek <jakub@redhat.com>
3952 * mutex.c (__pthread_mutex_destroy): Correct test of
3953 busy mutex for mutexes using alternate fastlocks.
3954 Patch by dtc@cmucl.cons.org.
3956 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
3958 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3960 2000-09-28 Ulrich Drepper <drepper@redhat.com>
3962 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3963 test for owner first.
3964 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3966 * cancel.c (pthread_cancel): Don't do anything if cancelation is
3969 2000-09-26 Ulrich Drepper <drepper@redhat.com>
3971 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3972 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3974 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3975 _POSIX_MONOTONIC_CLOCK.
3977 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3980 2000-09-20 Andreas Jaeger <aj@suse.de>
3982 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3983 "testrtsig.h" conditional.
3985 2000-09-11 Ulrich Drepper <drepper@redhat.com>
3987 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
3988 pthread_attr_setstack.
3989 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
3990 pthread_attr_setstack.
3991 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
3993 2000-09-05 Ulrich Drepper <drepper@redhat.com>
3995 * Examples/ex14.c: New file.
3996 * Makefile (tests): Add ex14.
3998 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
3999 mutex. Patch by dtc@cmucl.cons.org.
4001 * ecmutex.c: New file.
4002 * Makefile (tests): Add ecmutex.
4004 2000-09-04 H.J. Lu <hjl@gnu.org>
4006 * attr.c (__pthread_attr_setguardsize): Use page_roundup
4007 instead of roundup to round up to the page size.
4009 2000-09-03 Mark Kettenis <kettenis@gnu.org>
4011 * manager.c (pthread_exited): Correctly report event as TD_REAP
4012 instead of TD_DEATH. Fix comments.
4014 2000-09-03 Ulrich Drepper <drepper@redhat.com>
4016 * spinlock.h (testandset): Add cast to avoid warning.
4017 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
4019 2000-09-02 Andreas Jaeger <aj@suse.de>
4021 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
4024 2000-09-01 Ulrich Drepper <drepper@redhat.com>
4026 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4027 Fix typo in last patch (_mode -> _flags).
4029 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4030 Provide definition which respects _IO_USER_LOCK flag.
4032 2000-08-30 Ulrich Drepper <drepper@redhat.com>
4034 * manager.c (pthread_allocate_stack): Clear descriptor only if not
4037 2000-08-25 Ulrich Drepper <drepper@redhat.com>
4039 * Makefile: Add rules to build and run unload.
4040 * unload.c: New file.
4042 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
4044 * sysdeps/pthread/pthread.h
4045 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
4046 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
4048 2000-08-24 Andreas Jaeger <aj@suse.de>
4050 * Examples/ex13.c: Include <string.h> for strerror prototype and
4051 <stdlib.h> for abort prototype.
4052 (pthr_cond_signal_mutex): Rewrite to silence GCC.
4053 (thread_start): Remove unused variable err.
4054 (main): Silence GCC warnings.
4056 2000-08-22 Andreas Jaeger <aj@suse.de>
4058 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
4060 * Makefile (tests): Add ex13.
4062 2000-08-20 Ulrich Drepper <drepper@redhat.com>
4064 * semaphore.h: Add restrict where required by AGd4.
4065 * sysdeps/pthread/pthread.h: Likewise.
4066 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4068 2000-08-15 Ulrich Drepper <drepper@redhat.com>
4070 * Makefile (tests): Add ex12. Add rule to build it.
4071 * Examples/ex12.c: New file.
4073 2000-08-13 Ulrich Drepper <drepper@redhat.com>
4075 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4076 even though the implementation is not quite complete (but it reports
4077 it). Define _POSIX_MESSAGE_PASSING to -1.
4078 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4080 2000-08-12 Andreas Jaeger <aj@suse.de>
4082 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4084 (__compare_and_swap): Likewise.
4085 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4087 2000-08-10 Ulrich Drepper <drepper@redhat.com>
4089 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4090 p_h_errnop correctly and not to NULL.
4092 2000-08-05 Ulrich Drepper <drepper@redhat.com>
4094 * Banner: Bump version number to 0.9.
4096 2000-08-04 Ulrich Drepper <drepper@redhat.com>
4098 * Makefile (tests): Add tststack. Add rule to build the program.
4099 * tststack.c: New file.
4101 * internals.h: Declare __pthread_max_stacksize.
4102 * pthread.c (__pthread_max_stacksize): New variable.
4103 (__pthread_initialize_manager): Determine __pthread_initialize_manager
4105 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4106 (pthread_allocate_stack): Allow kernel to choose stack address if
4107 FLOATING_STACKS. This also handles variable-sized stacks.
4108 Always allocate stack and guardpage together. Use mprotect to
4109 change guardpage access.
4110 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4111 ARCH_STACK_MAX_SIZE.
4113 * attr.c (__pthread_attr_setstacksize): Also test value against
4116 * manager.c (__pthread_nonstandard_stacks): Define only if
4117 THREAD_SELF is not defined.
4118 (pthread_allocate_stack): Always initialize gardaddr to a correct
4120 (pthread_handle_create): Unmap thread with one call.
4121 (pthread_free): Remove test for initial thread before removing stack.
4122 Unmap stack with one call.
4124 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4125 1 to avoid removing the stack.
4127 2000-07-27 Jes Sorensen <jes@linuxcare.com>
4129 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4130 load of spin lock to prime the cache before the atomic compare and
4131 exchange operation (cmpxchg4). This avoids the spinning on the
4132 cmpxchg4 instruction and reduces movement of the cache line back
4133 and forth between the processors (explanation by Asis K. Mallick
4134 from Intel). This basically makes the implementation operate the
4135 same as the Linux kernel implementation.
4137 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4138 * sysdeps/ia64/pspinlock.c: New file.
4140 2000-08-03 Ulrich Drepper <drepper@redhat.com>
4142 * pthread.c: Move definition of __pthread_set_own_extricate_if...
4143 * spinlock.h: ...here. Remove locking.
4144 * internals.h: Remove __pthread_set_own_extricate_if prototype.
4146 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4147 (rwlock_rd_extricate_func): Don't determine self, let
4148 __pthread_lock do it.
4149 (rwlock_wr_extricate_func): Likewise.
4150 (rwlock_have_already): Optimize *pself handling a bit.
4152 * mutex.c: Use __builtin_expect.
4153 * pthread.c: Likewise.
4155 2000-08-02 Andreas Jaeger <aj@suse.de>
4157 * sysdeps/s390/pspinlock.c: New file.
4158 * sysdeps/s390/pt-machine.h: New file.
4159 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4161 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4163 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4165 * sysdeps/mips/pt-machine.h (testandset): Likewise.
4167 2000-07-26 Andreas Jaeger <aj@suse.de>
4169 * pthread.c: Initialize p_sem_avail.
4171 2000-07-25 Ulrich Drepper <drepper@redhat.com>
4173 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4174 * semaphore.c: Handle spurious wakeups.
4176 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4177 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4179 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4180 (__pthread_wait_for_restart): Likewise.
4182 * condvar.c (pthread_cond_wait): Also check whether thread is
4183 cancelable before aborting loop.
4184 (pthread_cond_timedwait): Likewise.
4186 * signals.c (pthread_sighandler): Remove special code to restrore
4188 (pthread_sighandler_t): Likewise.
4190 2000-07-25 Mark Kettenis <kettenis@gnu.org>
4192 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4193 * pthread.c: Include <resolv.h>.
4194 (_res): Undefine. Add extern declaration.
4196 2000-07-24 Ulrich Drepper <drepper@redhat.com>
4198 * pthread.c (__pthread_initial_thread): Update initializer.
4199 (__pthread_manager_thread): Likewise.
4200 (pthread_initialize): Move setrlimit call to...
4201 (__pthread_initialize_manager): ...here.
4202 (__pthread_reset_main_thread): Reset also soft limit on stack size.
4204 * condvar.c: Handle spurious wakeups. [PR libc/1749].
4205 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4207 2000-07-21 Ulrich Drepper <drepper@redhat.com>
4209 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4210 __compare_and_swap to define testandset.
4211 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4212 Define IMPLEMENT_TAS_WITH_CAS.
4214 2000-07-20 Ulrich Drepper <drepper@redhat.com>
4216 * Makefile: Pass -z nodelete to linker for libpthread.so
4217 generation if it understand this option.
4219 2000-07-18 Mark Kettenis <kettenis@gnu.org>
4221 * manager.c (pthread_handle_create): Remove initialization of
4222 new_thread->p_res._sock.
4224 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
4226 Bugfixes to the variant of the code for machines with no compare
4229 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4230 node was not being properly enqueued, due to failing to update
4231 the lock->__status field.
4233 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4234 being set inappropriately, causing the suspend function to be called
4235 with a null self pointer and crash.
4237 2000-07-18 Ulrich Drepper <drepper@redhat.com>
4239 * spinlock.h (__pthread_alt_trylock): Fix code used if no
4240 compare&swap is available.
4242 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4245 * pthread.c (pthread_initialize): Don't use sysconf to determine
4246 whether the machine has more than one processor.
4248 * spinlock.c (__pthread_alt_timedlock): Add back one of the
4249 removed thread_self calls.
4251 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4253 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4254 __compare_and_swap to compare_and_swap in code which assumes
4255 compare swap is available.
4257 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4259 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4260 bug whereby thr field of waitnode structure would not be correctly
4261 set unless a null self pointer is passed to the functions.
4262 Eliminated redundant calls to thread_self().
4264 2000-07-18 Jakub Jelinek <jakub@redhat.com>
4266 * pthread.c (__pthread_initialize_manager): Lock
4267 __pthread_manager_thread.p_lock before calling clone.
4269 2000-05-05 H.J. Lu <hjl@gnu.org>
4271 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4272 have acquire semantics.
4273 (__compare_and_swap_with_release_semantics): New inline
4275 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4277 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
4279 * manager.c: Fix the problem with signals at startup.
4280 Change the way that thread stacks are allocated on IA64.
4281 Clean up some of the guard page allocation stuff.
4283 1999-12-19 H.J. Lu <hjl@gnu.org>
4285 * internals.h (page_roundup): New.
4286 * attr.c (__pthread_attr_setguardsize); Use page_roundup
4288 * manager.c (pthread_allocate_stack): Make sure guardaddr is
4289 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4292 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
4294 * manager.c (pthread_allocate_stack): Unmap the stack top
4295 if failed to map the stack bottom.
4297 (pthread_free): Fix the guard page.
4299 * pthread.c (pthread_initialize): Set rlimit correctly for
4300 NEED_SEPARATE_REGISTER_STACK.
4302 1999-12-16 H.J. Lu <hjl@gnu.org>
4304 * pthread.c (__pthread_initialize_manager): Pass
4305 __pthread_manager_thread_bos instead of
4306 __pthread_manager_thread_tos to __clone2.
4308 1999-12-16 H.J. Lu <hjl@gnu.org>
4310 * manager.c (pthread_allocate_stack): Correct the calculation
4311 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4314 1999-12-13 H.J. Lu <hjl@gnu.org>
4316 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4317 bit after setting ar.ccv.
4319 1999-12-12 H.J. Lu <hjl@gnu.org>
4321 * manager.c (pthread_allocate_stack): Make the starting
4322 address of the stack bottom page aligned. FIXME: it may
4323 need changes in other places.
4324 (pthread_handle_create): Likewise.
4326 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
4328 * manager.c (pthread_allocate_stack): Handle
4329 NEED_SEPARATE_REGISTER_STACK.
4330 (pthread_handle_create): Likewise.
4331 * pthread.c (__pthread_initialize_manager): Likewise.
4333 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4335 1999-12-02 H.J. Lu <hjl@gnu.org>
4337 * sysdeps/ia64/pt-machine.h: New.
4339 2000-07-13 Ulrich Drepper <drepper@redhat.com>
4341 * wrapsyscall.c: Mark non-__ protected names as weak.
4344 2000-07-12 Bruno Haible <haible@clisp.cons.org>
4346 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4348 2000-07-12 Ulrich Drepper <drepper@redhat.com>
4350 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4351 Add tests also to new alternative spinlock implementation.
4352 * spinlock.h: Likewise.
4353 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4355 2000-07-06 Ulrich Drepper <drepper@redhat.com>
4357 * Version: Export __sigaction.
4358 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
4360 * pthread.c: Use __libc_sigaction instead of __sigaction.
4362 * condvar.c: Implement pthread_condattr_getpshared and
4363 pthread_condattr_setpshared.
4364 * mutex.c: Implement pthread_mutexattr_getpshared and
4365 pthread_mutexattr_setpshared.
4366 * Versions: Export new functions.
4367 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4369 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4370 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4373 2000-07-04 Greg McGary <greg@mcgary.org>
4375 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4376 pragmas. Include bp-sym.h only if _LIBC.
4378 2000-07-04 Ulrich Drepper <drepper@redhat.com>
4380 * spinlock.c (__pthread_unlock): Properly place write barrier.
4381 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4383 2000-07-03 Ulrich Drepper <drepper@redhat.com>
4385 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4386 faster on SMP systems. No more emulation of compare&swap for adaptive
4388 * spinlock.h: Likewise.
4389 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4390 Replace fast with adaptive mutex.
4391 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4392 * condvar.c: Likewise.
4393 * pthread.c: Define and initialize __pthread_smp_kernel variable.
4394 * internals.h: Declare __pthread_smp_kernel.
4395 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4396 _pthread_fastlock structure.
4397 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4399 * pthread.c: Remove initialization to zero from global variables.
4401 2000-06-29 Jakub Jelinek <jakub@redhat.com>
4403 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4405 2000-06-28 Greg McGary <greg@mcgary.org>
4407 * weaks.c: Wrap BP_SYM () around weak extern declarations of
4408 pthread functions that have pointers in their return+arg signatures.
4410 2000-06-27 Greg McGary <greg@mcgary.org>
4412 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4413 extern declarations of pthread functions that have pointers in
4414 their return+arg signatures.
4416 2000-06-26 Ulrich Drepper <drepper@redhat.com>
4418 * Makefile (tests): Add ex11. Add rules to build it.
4419 * Examples/ex11.c: New file.
4420 * rwlock.c: Fix complete braindamaged previous try to implement
4423 * spinlock.c: Pretty print.
4425 2000-06-25 Ulrich Drepper <drepper@redhat.com>
4427 * Makefile (tests): Add ex10. Add rules to build it.
4428 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4429 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4430 * condvar.c (pthread_cond_wait): Allow mutex of kind
4431 PTHREAD_MUTEX_TIMED_NP.
4432 (pthread_cond_timedwait_relative): Likewise.
4433 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4434 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4435 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4436 (__pthread_mutex_lock): Use __pthread_alt_lock for
4437 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4438 (__pthread_mutex_timedlock): New function.
4439 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4440 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4441 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4442 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4443 * spinlock.c: Implement alternate fastlocks.
4444 * spinlock.h: Add prototypes.
4445 * Examples/ex10.c: New file.
4446 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4447 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4449 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4450 (__pthread_rwlock_timedrdlock): New function.
4451 (__pthread_rwlock_timedwrlock): New function.
4452 Use laternate fastlock function everywhere.
4454 2000-06-21 Andreas Jaeger <aj@suse.de>
4456 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4459 * join.c: Include <stdlib.h> for exit prototype.
4461 2000-06-20 Ulrich Drepper <drepper@redhat.com>
4463 * sysdeps/i386/useldt.h: Include <stdlib.h>.
4465 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4466 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4468 * Makefile (libpthread-routines): Add barrier.
4469 (tests): Add ex9. Add rule to build ex9.
4470 * Versions: Export barrier functions.
4471 * barrier.c: New file.
4472 * Examples/ex9.c: New file.
4473 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4474 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4475 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4477 2000-06-19 H.J. Lu <hjl@gnu.org>
4479 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4480 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4481 (compare_and_swap_with_release_semantics): New. Default to
4482 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4485 * spinlock.c (__pthread_unlock): Call
4486 compare_and_swap_with_release_semantics () instead of
4487 compare_and_swap ().
4489 2000-06-19 Ulrich Drepper <drepper@redhat.com>
4491 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4493 * sysdeps/pthread/timer_delete.c: Likewise.
4494 * sysdeps/pthread/timer_getoverr.c: Likewise.
4495 * sysdeps/pthread/timer_gettime.c: Likewise.
4496 * sysdeps/pthread/timer_settime.c: Likewise.
4498 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4500 Timer nodes are now reference counted, and can be marked
4501 as deleted. This allows for the safe release of the global mutex
4502 in the middle without losing the timer being operated on.
4504 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
4505 member is now an enum with three values, so that an intermediate
4506 state can be represented (deleted but not free for reuse yet).
4507 New refcount member added.
4508 * sysdeps/pthread/timer_routines.c: Likewise.
4510 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4511 timer_valid): New inline functions added.
4513 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4514 restructured, recursive deadlock bug fixed.
4516 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4517 timer_addref to ensure that timer won't be deleted while mutex is not
4518 held. Also uses timer_invalid to perform validation of timer handle.
4519 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4520 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4522 2000-06-14 Ulrich Drepper <drepper@redhat.com>
4524 * shlib-versions: Add entry for SH.
4525 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4527 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4529 A few optimizations. Got rid of unnecessary wakeups of timer threads,
4530 tightened up some critical regions and micro-optimized some list
4533 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4534 Returns int value now to indicate whether timer was queued at head.
4535 * sysdeps/pthread/posix-timer.h: Likewise.
4536 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4537 new return value from __timer_thread_queue_timer to avoid waking
4538 up timer thread unnecessarily.
4540 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4541 inuse flag, because this requires mutex to be held. Callers updated
4542 to do the check when they have the mutex.
4543 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4545 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4546 regions: avoids making system calls while holding timer mutex, and
4547 a few computations were moved outside of the mutex as well.
4548 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4550 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4551 to list_unlink_ip, meaning idempotent. Pointer manipulation
4552 changed to get better better code out of gcc.
4553 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4554 version of list_unlink added here.
4555 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4556 function in all places: idempotent one for timers, non-idempotent
4557 one for thread nodes.
4558 * sysdeps/pthread/timer_settime: Likewise.
4559 * sysdeps/pthread/timer_routines.c: Likewise.
4561 2000-06-13 Ulrich Drepper <drepper@redhat.com>
4563 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4564 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4566 * sysdeps/pthread/Makefile: Remove tests definition.
4568 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
4569 Yutaka Niibe <gniibe@chroot.org>
4571 * sysdeps/sh/pspinlock.c: New file.
4572 * sysdeps/sh/pt-machine.h: New file.
4574 2000-06-12 Ulrich Drepper <drepper@redhat.com>
4576 * Makefile (tests): Add joinrace.
4578 * Examples/ex6.c: Test return value of pthread_join.
4580 2000-06-11 Geoff Keating <geoffk@cygnus.com>
4582 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4583 (__pthread_spin_trylock): Implement.
4584 (__pthread_spin_unlock): Implement.
4585 (__pthread_spin_init): Implement.
4586 (__pthread_spin_destroy): Implement.
4588 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4590 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4591 really append the entry.
4593 2000-06-10 Andreas Jaeger <aj@suse.de>
4595 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4597 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
4599 * sysdeps/pthread/timer_create.c: Thread matching now done on
4600 clock type as well as thread attributes.
4601 There are individual global signal-delivering threads for
4602 different clock types.
4603 * sysdeps/pthread/posix-timer.h: Likewise.
4604 * sysdeps/pthread/timer_routines.c: Likewise.
4606 * sysdeps/pthread/timer_routines.c: Thread allocation and
4607 deallocation function now remembers to put thread on active
4608 list and remove from active list.
4609 Thus now the feature of binding multiple timers
4610 to a single thread actually works.
4612 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4614 * pthread.c (__pthread_create_2_1): Optimize a bit.
4616 * internals.h (invalid_handle): Also test for p_terminated != 0.
4617 (nonexisting_handle): New function. Same as old invalid_handle.
4618 * join.c (pthread_join): Use nonexisting_handle instead of
4619 invalid_handle to test for acceptable thread handle.
4620 * manager.c (pthread_handle_free): Likewise.
4621 * joinrace.c: New file.
4622 Reported by Permaine Cheung <pcheung@cygnus.com>.
4624 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4626 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4627 Correct handling of matching variable.
4629 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4632 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4633 Be prepared for empty timer list.
4635 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4636 CPUTIME clock ID. Add support for thread clocks.
4638 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4639 subtraction were switched.
4641 * sysdeps/pthread/timer_routines.c (init_module): Use
4642 THREAD_MAXNODES threads.
4644 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4645 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4646 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4647 with sigqueueinfo is this system call is available.
4649 * sysdeps/pthread/timer_create.c (timer_create): Allow
4650 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4652 * sysdeps/pthread/Makefile: New file. Add rules to build timer
4654 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4656 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4658 * sysdeps/pthread/posix-timer.h: New file.
4659 * sysdeps/pthread/timer_create.c: New file.
4660 * sysdeps/pthread/timer_delete.c: New file.
4661 * sysdeps/pthread/timer_getoverr.c: New file.
4662 * sysdeps/pthread/timer_gettime.c: New file.
4663 * sysdeps/pthread/timer_routines.c: New file.
4664 * sysdeps/pthread/timer_settime.c: New file.
4665 * sysdeps/pthread/tst-timer.c: New file.
4667 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4669 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4670 LINK_MAX definitions if necessary.
4672 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4674 Added missing fork time handling of global libio lock.
4676 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4677 not just the individual stream locks. Rewritten to use new
4678 iterator interface provided by libio rather than accessing
4681 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4682 which lock and unlock the stream list using the new interface
4684 * internals.h: Likewise.
4686 * ptfork.c (__fork): Now calls __flockfilelist before fork,
4687 and __funlockfilelist in the parent after the fork.
4688 Child still calls __fresetlockfiles as before.
4690 * linuxthreads.texi: Now explains what happens to streams at
4691 fork time. Also whole new section on forking and thread added.
4692 Definition of pthread_atfork moved out of Miscellaneous Functions
4693 to this new section.
4695 2000-06-04 Jakub Jelinek <jakub@redhat.com>
4697 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4698 Add missing register.
4699 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4701 2000-06-02 Jakub Jelinek <jakub@redhat.com>
4703 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4704 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4705 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4707 2000-05-31 Andreas Jaeger <aj@suse.de>
4709 * sysdeps/mips/pspinlock.c: Implement spinlocks.
4711 2000-05-28 Ulrich Drepper <drepper@redhat.com>
4713 * spinlock.c (__pthread_lock): Remove ASSERT.
4715 * Makefile (tests): Add ex8.
4716 * Examples/ex8.c: New file.
4718 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
4720 Bugfix: The pthread_atfork mechanism now takes care of its
4721 own internal mutex at fork time.
4723 * ptfork.c (__fork): Revised so that the mutex is held across
4724 the fork operation and while the handlers are called, and so that
4725 the child resets the mutex.
4727 * linuxthreads.texi: Updated pthread_atfork documentation to make
4728 it clear that fork and pthread_atfork can't be reentered from
4729 atfork handlers, that pthread_atfork and fork are mutually atomic,
4730 and that the handlers are inherited by the child process.
4732 2000-05-24 Ulrich Drepper <drepper@redhat.com>
4734 * Makefile (libpthread-routines): Add pspinlock.
4735 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4736 Use struct _pthread_fastlock instead of pthread_spinlock_t.
4737 * condvar.c: Likewise.
4738 * internals.h: Likewise.
4740 * manager.c: Likewise.
4741 * mutex.c: Likewise.
4742 * pthread.c: Likewise.
4743 * rwlock.c: Likewise.
4744 * semaphore.c: Likewise.
4745 * signals.c: Likewise.
4746 * spinlock.h: Likewise.
4747 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
4748 * sysdeps/alpha/pspinlock.c: New file.
4749 * sysdeps/arm/pspinlock.c: New file.
4750 * sysdeps/i386/pspinlock.c: New file.
4751 * sysdeps/m68k/pspinlock.c: New file.
4752 * sysdeps/mips/pspinlock.c: New file.
4753 * sysdeps/powerpc/pspinlock.c: New file.
4754 * sysdeps/sparc/sparc32/pspinlock.c: New file.
4755 * sysdeps/sparc/sparc64/pspinlock.c: New file.
4756 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4757 back to _pthread_fastlock. Define new pthread_spinlock_t.
4759 2000-05-24 Andreas Jaeger <aj@suse.de>
4761 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4763 2000-05-21 Jakub Jelinek <jakub@redhat.com>
4765 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4767 2000-05-13 Jakub Jelinek <jakub@redhat.com>
4769 * internals.h (__RES_PTHREAD_INTERNAL): Define.
4771 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4773 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4774 object state is represented with additional bits which distinguish
4775 whether that state was set up in the current process, or
4776 in an ancestor process. If that state was set in an ancestor,
4777 it means that a fork happened while thread was executing the init
4778 function. In that case, the state is reset to NEVER.
4779 * mutex.c (__pthread_once_fork_prepare): New function.
4780 (__pthread_once_fork_child): Likewise
4781 (__pthread_once_fork_parent): Likewise
4782 (__pthread_reset_pthread_once): Removed.
4783 * ptfork.c (__fork): Call new handlers in mutex.c.
4784 * internals.h: Declarations of new mutex.c functions added.
4785 Declaration of removed function deleted.
4786 * linuxthreads.texi: Updated documentation about pthread_once
4787 to clarify what happens under cancellation and forking.
4789 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4791 * internals.h: New thread manager request type, REQ_KICK.
4792 * join.c (pthread_exit): main thread now calls exit() instead
4793 of _exit() in order to proper process cleanup.
4794 * manager.c (__pthread_manager): Do not terminate manager
4795 after unblocking main thread; wait for main thread's
4796 REQ_PROCESS_EXIT request instead.
4797 Also, added REQ_KICK case to handle new request; this just does
4799 * manager.c (pthread_exited): Do not terminate manager after
4800 unblocking main thread.
4801 * manager.c (__pthread_manager_sighandler): If the main thread
4802 is waiting for all other threads to die, send a REQ_KICK into
4803 the thread manager request pipe to get it to clean out the threads
4804 and unblock the main thread as soon as possible. This fixes
4805 the 2000 millisecond hang on shutdown bug.
4806 * Examples/ex7.c: New file, tests shutdown behavior when all threads
4807 including the main one call pthread_exit(), or implicitly do so.
4808 * Makefile (tests): Add ex7.
4810 2000-05-05 Andreas Jaeger <aj@suse.de>
4812 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4813 (pthread_getcpuclockid): Correct test for ourselves.
4815 2000-05-05 Ulrich Drepper <drepper@redhat.com>
4817 * internals.h (struct _pthread_descr_struct): Reorganization.
4818 Allocate room for 16 pointers at head of the structure for future
4819 thread-local data handling. Move p_self member in this area.
4820 * manager.c (pthread_handle_create): Adjust use of p_self.
4821 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4822 * pthread.c (__pthread_initial_thread): Adjust initialization.
4823 (__pthread_manager_thread): Likewise.
4825 2000-04-29 Bruno Haible <haible@clisp.cons.org>
4827 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4828 for eventmask larger than 1 word.
4830 2000-04-27 Ulrich Drepper <drepper@redhat.com>
4832 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4833 * pthread.c (__pthread_initialize_minimal): New function. Perform
4834 minimal initialization.
4835 (pthread_initialize): Remove this code here.
4836 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
4837 are working around the problem in glibc.
4839 2000-04-25 Ulrich Drepper <drepper@redhat.com>
4841 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4842 now. First gcc must be fixed (more concrete: libgcc).
4844 2000-04-24 Ulrich Drepper <drepper@redhat.com>
4846 * pthread.c: Remove special treatement for interrupt handlers on x86.
4847 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4848 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4850 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4852 2000-04-24 Mark Kettenis <kettenis@gnu.org>
4854 * join.c (pthread_exit): Set p_terminated after reporting the
4855 termination event instead of before.
4857 2000-04-20 Jakub Jelinek <jakub@redhat.com>
4859 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4862 2000-04-18 Andreas Jaeger <aj@suse.de>
4864 * Versions: Use ld instead of ld.so.
4866 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4868 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4869 Remove the typedef keyword.
4871 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4873 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4875 (READ_MEMORY_BARRIER): Define.
4876 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4878 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4881 2000-04-17 Ulrich Drepper <drepper@redhat.com>
4883 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4884 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4885 use thread_handle().
4887 2000-04-16 Ulrich Drepper <drepper@redhat.com>
4889 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4890 if fast mutex is used. Don't initialize `already_canceled' twice.
4891 Correctly test for return value of timedsuspend.
4893 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
4894 therefore don't need the _rt versions of the signal handlers.
4896 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4898 * pthread.c (pthread_yield): New function.
4899 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4900 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4901 * internals.h: Declare __pthread_yield.
4903 * pthread.c (pthread_initialize): Avoid a bit more code if
4904 realtime signals are known to exist.
4906 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4907 to dynamically detect RT signals and avoid generating compatibility
4908 functions with old kernel.
4909 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4910 __pthread_restart_new directly.
4911 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4912 __pthread_wait_for_restart_signal directly.
4913 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4914 __pthread_timedsuspend_new directly.
4916 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4918 * condvar.c: Remove all the special code to handle cond_timedwait.
4919 Use timedsuspend instead.
4920 * internals.h: Declare __pthread_timedsuspend_old,
4921 __pthread_timedsuspend_new, and __pthread_timedsuspend.
4922 Remove declaration of __pthread_init_condvar.
4923 * pthread.c: Define __pthread_timedsuspend variable.
4924 (__pthread_timedsuspend_old): New function. Timed suspension
4925 implementation for old Linux kernels.
4926 (__pthread_timedsuspend_new): New function. Timed suspension
4927 implementation for new Linux kernels.
4928 * restart.h (timedsuspend): New function. Call appropriate
4929 suspension function through __pthread_timedsuspend.
4930 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4932 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4934 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4936 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4938 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4939 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4941 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4942 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4944 2000-04-14 Andreas Jaeger <aj@suse.de>
4946 * weaks.c: Fix typo.
4948 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4949 2.2 for linuxthreads.
4951 2000-04-13 Ulrich Drepper <drepper@redhat.com>
4953 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4954 (pthread_getcpuclockid): Fix typo.
4956 2000-04-12 Ulrich Drepper <drepper@redhat.com>
4958 * Makefile (libpthread-routines): Add getcpuclockid.
4959 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4960 * sysdeps/pthread/getcpuclockid.c: New file.
4961 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4962 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4964 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4966 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4968 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4969 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4970 and pthread_spin_unlock.
4971 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4972 into pthread_spinlock_t. Change all uses.
4973 * spinlock.c: Implement pthread_spin_lock.
4974 Rename __pthread_unlock to __pthread_spin_unlock and define weak
4975 alias for real name.
4976 Define pthread_spin_trylock, pthread_spin_init, and
4977 pthread_spin_destroy.
4978 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4979 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
4980 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4981 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
4982 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4983 and pthread_spin_unlock.
4984 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
4985 Change all uses of _pthread_fastlock to pthread_spinlock_t.
4986 * condvar.c: Likewise.
4987 * internals.h: Likewise.
4989 * manager.c: Likewise.
4990 * mutex.c: Likewise.
4991 * pthread.c: Likewise.
4992 * rwlock.c: Likewise.
4993 * semaphore.c: Likewise.
4994 * signals.c: Likewise.
4996 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
4998 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
5000 2000-04-11 Ulrich Drepper <drepper@redhat.com>
5002 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
5003 _POSIX_SHARED_MEMORY_OBJECTS.
5005 2000-04-11 Andreas Jaeger <aj@suse.de>
5007 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
5008 (__compare_and_swap): Mark as modifying memory.
5010 2000-04-11 Geoff Keating <geoffk@cygnus.com>
5012 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
5014 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
5015 Don't have the 'asm' __volatile__.
5017 2000-04-11 Ulrich Drepper <drepper@redhat.com>
5019 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
5020 * spinlock.c (__pthread_lock): Add memory barriers.
5021 (__pthread_unlock): Likewise.
5022 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
5024 (RELEASE): Not needed anymore.
5025 (__compare_and_swap): Mark asm as modifying memory.
5026 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
5028 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
5029 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
5030 (MEMORY_BARRIER): Define using stbar.
5031 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
5033 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
5034 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
5035 Mike Burrows <m3b@pa.dec.com>.
5037 2000-04-09 Ulrich Drepper <drepper@redhat.com>
5039 * signals.c (sigaction): Fix return value for the case SIG is one
5040 of the signals the implementation uses.
5041 Patch by Xavier.Leroy@inria.fr.
5043 2000-04-01 Andreas Jaeger <aj@suse.de>
5045 * attr.c: Use shlib-compat macros.
5046 * oldsemaphore.c: Likewise.
5047 * pthread.c: Likewise.
5048 * weaks.c: Likewise.
5050 2000-03-26 Ulrich Drepper <drepper@redhat.com>
5052 * semaphore.c (sem_timedwait): New function.
5053 Patch by Carl Mailloux <carlm@oricom.ca>.
5054 * semaphore.h: Declare sem_timedwait.
5055 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
5057 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
5059 * sysdeps/pthread/Makefile: File removed.
5061 2000-03-23 Ulrich Drepper <drepper@redhat.com>
5063 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
5064 * internals.h (__pthread_reset_pthread_once): Add prototype.
5065 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5067 * manager.c (pthread_handle_create): Store ID of new thread before
5070 2000-03-21 Ulrich Drepper <drepper@redhat.com>
5072 * attr.c: Use new macros from shlib-compat.h to define versions.
5073 * oldsemaphore.c: Likewise.
5074 * semaphore.c: Likewise.
5075 * weaks.c: Likewise.
5077 * pthread.c: Update for new SHLIB_COMPAT definition.
5079 * manager.c (__pthread_manager): Unmask debug signal.
5081 * pthread.c (pthread_initialize): Test for address of __dso_handle
5082 being NULL, not value. Use __on_exit, not on_exit.
5083 Patch by Andreas Jaeger <aj@suse.de>.
5085 * pthread.c: Use new macros from shlib-compat.h to define versions.
5087 2000-03-19 Ulrich Drepper <drepper@redhat.com>
5089 * pthread.c (pthread_initialize): Instead of on_exit use
5090 __cxa_atexit if __dso_label is available to allow unloading the
5091 libpthread shared library.
5093 2000-03-16 Ulrich Drepper <drepper@redhat.com>
5095 * condvar.c: Make tests for ownership of mutex less strict.
5097 2000-03-14 Ulrich Drepper <drepper@redhat.com>
5099 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5100 current thread and return error if not.
5101 (pthread_cond_timedwait_relative_old): Likewise.
5102 (pthread_cond_timedwait_relative_new): Likewise.
5104 * mutex.c (__pthread_once): Handle cancelled init function correctly.
5105 (pthread_once_cancelhandler): New function.
5106 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5108 2000-03-14 Andreas Jaeger <aj@suse.de>
5110 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5112 (pthread_handle_sigrestart_rt): Likewise.
5113 * signals.c (pthread_sighandler_rt): Likewise.
5115 2000-03-02 Andreas Jaeger <aj@suse.de>
5117 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5118 Reported by Sean Chen <sean.chen@turbolinux.com>.
5120 2000-02-28 Andreas Jaeger <aj@suse.de>
5122 * rwlock.c: Fix typo.
5124 2000-02-27 Ulrich Drepper <drepper@redhat.com>
5126 * rwlock.c: Define __* variants of the functions and make old names
5128 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5129 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5131 2000-02-25 Andreas Jaeger <aj@suse.de>
5133 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5134 pwrite64, lseek64, open64, and __open64 with version 2.2.
5136 2000-02-22 Ulrich Drepper <drepper@redhat.com>
5138 * semaphore.h (SEM_FAILED): Use 0 not NULL.
5140 2000-02-14 Ulrich Drepper <drepper@redhat.com>
5142 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5143 nanosleep does not work either. Get absolute time inside the
5145 (pthread_cond_timedwait_relative_new): Likewise.
5146 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5148 2000-02-13 Andreas Jaeger <aj@suse.de>
5150 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5151 (pthread_cond_timedwait_relative_old): Likewise.
5153 2000-02-13 Ulrich Drepper <drepper@redhat.com>
5155 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5156 but keep the code around. A bug in the kernel prevent us from
5158 (pthread_cond_timedwait_relative_new): Likewise.
5159 (PR libc/1597 and libc/1598).
5161 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
5163 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5164 loop around nanosleep calls instead of around most of the function
5165 (pthread_cond_timedwait_relative_new): Likewise.
5166 body. Got rid of backwards goto and one local.
5168 2000-01-31 Ulrich Drepper <drepper@redhat.com>
5170 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5171 before every nanosleep call to account for time spent in the rest
5173 (pthread_cond_timedwait_relative_new): Likewise.
5174 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5176 2000-01-29 Ulrich Drepper <drepper@redhat.com>
5178 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5179 from nanosleep call so that in case we restart we only wait for the
5181 (pthread_cond_timedwait_relative_new): Likewise.
5182 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5184 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
5186 * manager.c (pthread_allocate_stack): Compute guard page address
5187 correctly. Patch by HJ Lu.
5189 * sysdeps/pthread/pthread.h: Define
5190 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5192 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
5194 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5195 preference handling.
5196 (pthread_rwlockattr_setkind_np): Allow
5197 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5198 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5200 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
5202 * internals.h (pthread_readlock_info): New structure.
5203 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5204 p_untracked_readlock_count.
5205 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5206 Add initializers for new fields.
5207 * manager.c (pthread_free): Free read/write lock lists.
5208 * queue.h (queue_is_empty): New function.
5209 * rwlock.c: Implement requirements about when readers should get
5211 * sysdeps/pthread/pthread.h
5212 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5213 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5214 Define this name as well.
5215 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5217 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
5219 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5220 Adjust initializers for struct _pthread_descr_struct change.
5221 * internals.h (struct _pthread_descr_struct): Move new elements to
5224 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
5226 Redesigned how cancellation unblocks a thread from internal
5227 cancellation points (sem_wait, pthread_join,
5228 pthread_cond_{wait,timedwait}).
5229 Cancellation won't eat a signal in any of these functions
5230 (*required* by POSIX and Single Unix Spec!).
5231 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5232 simultaneous condition variable signal (not required by POSIX
5233 or Single Unix Spec, but nice).
5234 * spinlock.c: __pthread_lock queues back any received restarts
5235 that don't belong to it instead of assuming ownership of lock
5236 upon any restart; fastlock can no longer be acquired by two threads
5238 * restart.h: Restarts queue even on kernels that don't have
5239 queued real time signals (2.0, early 2.1), thanks to atomic counter,
5240 avoiding a rare race condition in pthread_cond_timedwait.
5242 1999-12-31 Andreas Jaeger <aj@suse.de>
5244 * internals.h: Remove duplicate prototype declarations.
5246 * weaks.c: Remove __THROW from prototypes since the file is not
5247 compiled by a C++ compiler.
5248 * internals.h: Likewise.
5250 1999-12-30 Andreas Jaeger <aj@suse.de>
5252 * sysdeps/pthread/pthread.h: Move internal functions to...
5253 * sysdeps/pthread/bits/libc-lock.h: ...here.
5255 1999-12-29 Andreas Jaeger <aj@suse.de>
5257 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5259 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
5261 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5264 * manager.c (__pthread_start): Add one more cast to prevent
5265 warning on 64bit machines.
5267 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
5269 * manager.c (pthread_handle_create): Set p_pid of new thread
5270 before calling the callback function to report a new thread.
5272 1999-12-20 Andreas Jaeger <aj@suse.de>
5274 * pthread.c (pthread_initialize): Move getrlimit call after
5277 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
5279 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5280 pwrite64, lseek64, open64, and __open64.
5281 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5282 pwrite64, lseek64, open64, and __open64.
5284 * manager.c (pthread_allocate_stack): Correct computation of
5285 new_thread_bottom. Correct handling of stack size and when the
5286 rlimit method to guard for stack growth is used.
5287 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5288 minus one pagesize (not two).
5290 1999-12-03 Andreas Jaeger <aj@suse.de>
5292 * Versions: Add __res_state with version GLIBC_2.2.
5294 * errno.c (__res_state): New function to return thread specific
5297 * pthread.c (pthread_initialize): Initialize p_resp.
5298 (__pthread_reset_main_thread): Also set p_resp.
5300 * manager.c (pthread_handle_create): Initialize p_resp.
5302 * internals.h: Add thread specific resolver state.
5303 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5305 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
5307 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5309 * sysdeps/i386/i686/pt-machine.h: Likewise.
5310 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5312 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
5314 * manager.c (pthread_start_thread_event): Initialize p_pid already
5317 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
5319 * internals.h: Add prototype for __pthread_manager_event.
5320 * manager.c (__pthread_manager_event): New function.
5321 (pthread_start_thread_event): Correct computation of self.
5322 Use INIT_THREAD_SELF.
5323 * pthread.c (__pthread_manager_thread): Initialize p_lock.
5324 (__pthread_initialize_manager): Respect event flags also for creation
5325 of the manager thread.
5327 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
5329 * pthread.c (__pthread_initialize_manager): Initialize
5330 __pthread_manager_thread.p_tid.
5332 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
5334 * internals.h: Declare __pthread_last_event.
5335 * manager.c: Define __pthread_last_event.
5336 (pthread_handle_create): Set __pthread_last_event.
5337 (pthread_exited): Likewise.
5338 * join.c (pthread_exit): Likewise.
5340 * Makefile (libpthread-routines): Add events.
5341 * events.c: New file.
5342 * internals.h: Protect against multiple inclusion.
5343 Include thread_dbP.h header.
5344 (struct _pthread_descr_struct): Add new fields p_report_events and
5346 Declare event reporting functions.
5347 * join.c (pthread_exit): Signal event if this is wanted.
5348 * manager.c (__pthread_threads_events): New variable.
5349 (pthread_handle_create): Take new parameters with event information.
5350 Signal TD_CREATE event if wanted.
5351 (__pthread_manager): Adjust pthread_handle_create call.
5352 (pthread_start_thread_event): New function. Block until manager is
5353 finished and then call pthread_start_thread.
5354 (pthread_exited): Signal TD_REAP event if wanted.
5356 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
5358 * restart.h (suspend_with_cancellation): Rewrite as a macro.
5360 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5362 1999-10-25 Andreas Jaeger <aj@suse.de>
5364 * internals.h: Remove K&R compatibility.
5365 * no-tsd.c: Likewise.
5366 * semaphore.h: Likewise.
5367 * signals.c: Likewise.
5368 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5369 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5370 * weaks.c: Likewise.
5372 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
5374 * pthread.c: For i386, wrap pthread_handle_sigrestart and
5375 pthread_handle_sigcancel with functions that restore %gs from the
5376 signal context. For each signal handling function, two wrappers
5377 are required, one for a non-RT signal and one for a RT signal.
5378 * signal.c: For i386, add code to restore %gs from the signal
5379 context in pthread_sighandler and pthread_sighandler_rt.
5381 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
5383 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5385 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
5387 * pthread.c (__pthread_initial_thread): Pass argument to
5388 PTHREAD_START_ARGS_INITIALIZER.
5389 (__pthread_manager_thread): Likewise.
5391 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5392 initialize function.
5394 * manager.c (pthread_handle_create): Remove p_startfct initialization.
5396 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5398 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
5400 * internals.h: Correct return types for __libc_read and __libc_write.
5402 1999-10-09 Andreas Jaeger <aj@suse.de>
5404 * internals.h: Add __new_sem_post to get prototype in
5405 manager.c; include semaphore.h for needed types.
5407 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
5409 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5410 directly instead of calling sem_post which should not be necessary
5411 but is faster and might help in some case to work around problems.
5412 Patch by khendricks@ivey.uwo.ca [libc/1382].
5414 1999-10-08 Andreas Schwab <schwab@suse.de>
5416 * sysdeps/pthread/Subdirs: New file.
5419 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
5421 * Implies: New file.
5422 * internals.h (struct _pthread_descr_struct): Add p_startfct.
5423 * manager.c (pthread_handle_create): Initialize p_startfct.
5424 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5426 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
5428 * manager.c (__linuxthreads_pthread_threads_max): New variable.
5429 * specific.c (__linuxthreads_pthread_keys_max): New variable.
5430 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5432 * condvar.c (pthread_cond_timedwait_relative): Never return with
5433 EINTR. Patch by Andreas Schwab.
5435 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
5437 * signals.c (sigaction): Correct last patch. Don't select
5438 pthread_sighandler_rt based on the signal number but instead of
5439 the SA_SIGINFO flag.
5441 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
5443 * specific.c: Move definitions of struct pthread_key_struct and
5444 destr_function to ...
5445 * internals.h: ...here.
5447 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
5449 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
5450 this instead of pthread_handle_sigrestart if the signal is an RT
5453 * signals.c: Handle passing through of sighandler arguments also
5454 for real-time signals.
5456 1999-09-03 Andreas Schwab <schwab@suse.de>
5458 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
5460 (__vfork): New function, alias vfork.
5461 * Versions: Export __fork, vfork, and __vfork in libpthread.
5463 1999-08-23 Andreas Schwab <schwab@suse.de>
5465 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5466 call to signal handler.
5468 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
5470 * pthread.c (__pthread_reset_main_thread): Undo last change.
5471 (__pthread_kill_other_threads_np): Reset signal handlers for the
5472 signals we used in the thread implementation here.
5474 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
5476 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5477 for the signals we used in the thread implementation [PR libc/1234].
5479 * Versions: Export __pthread_kill_other_threads_np from libpthread
5482 * signals.c: Pass sigcontext through wrapper to the user function.
5484 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
5486 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5487 __libc_internal_tsd_set.
5489 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5491 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5494 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5496 * internals.h: Align _pthread_descr_struct to 32 bytes.
5497 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5500 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5502 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5505 1999-07-09 Cristian Gafton <gafton@redhat.com>
5507 * Makefile (libpthread-routines): Add oldsemaphore routine.
5508 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5509 sem_trywait, and sem_wait to GLIBC_2.1.
5510 * oldsemaphore.c: New file.
5511 * semaphore.c: Add default_symbol_versions for the changed functions.
5512 (__new_sem_init): Rename from sem_init.
5513 (__new_sem_post): Rename from sem_post.
5514 (__new_sem_wait): Rename from sem_wait.
5515 (__new_sem_trywait): Rename from sem_trywait.
5516 (__new_sem_getvalue): Rename from sem_getvalue.
5517 (__new_sem_destroy): Rename from sem_destroy.
5519 1999-06-23 Robey Pointer <robey@netscape.com>
5521 * internals.h: Added p_nextlock entry to separate queueing for a
5522 lock from queueing for a CV (sometimes a thread queues on a lock
5523 to serialize removing itself from a CV queue).
5524 * pthread.c: Added p_nextlock to initializers.
5525 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5527 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5529 * manager.c (pthread_handle_create): Free mmap region after stack
5530 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5532 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5534 * man/pthread_cond_init.man: Correct example.
5535 Reported by Tomas Berndtsson <tomas@nocrew.org>.
5537 * linuxthreads.texi (Condition Variables): Likewise.
5539 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
5541 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5542 casx not cas, also successful casx returns the old value in rd
5543 and not the new value.
5545 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
5547 * manager.c: If pthread_create() is given a NULL attribute
5548 and the thread manager runs with a realtime policy, set the
5549 scheduling policy of the newly created thread back to SCHED_OTHER.
5550 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5551 initialize the schedpolicy field of new_thread->p_start_args
5552 to that of the calling thread.
5554 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
5556 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5557 instruction does not allow memory element to use offset.
5559 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
5561 * manager.c (pthread_allocate_stack): Optimize initialization of new
5564 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5565 Don't use initializer since it is all zeroes.
5566 (__libc_once_define): Likewise.
5568 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5570 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5571 doesn't exist anymore.
5572 * sysdeps/i386/Implies: Likewise.
5573 * sysdeps/m68k/Implies: Likewise.
5574 * sysdeps/mips/Implies: Likewise.
5575 * sysdeps/powerpc/Implies: Likewise.
5576 * sysdeps/sparc/sparc32/Implies: Likewise.
5577 * sysdeps/sparc/sparc64/Implies: Likewise.
5579 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
5581 * sysdeps/alpha/bits/semaphore.h: Removed.
5582 * sysdeps/powerpc/bits/semaphore.h: Removed.
5583 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5584 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5585 * Makefile (headers): Remove bits/semaphore.h.
5587 * semaphore.h: Define _pthread_descr if necessary.
5588 Don't include limits.h. Define SEM_VALUE_MAX directly.
5590 (sem_t): Protect element names with leading __.
5591 Add declarations for sem_close, sem_open, and sem_unlink.
5592 * semaphore.c: Adjust all functions for new element names.
5593 Define sem_close, sem_open, and sem_unlink.
5594 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5596 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5599 1999-03-16 H.J. Lu <hjl@gnu.org>
5601 * specific.c (pthread_key_delete): Check th->p_terminated to see
5602 if the thread is running.
5604 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5605 Added to GLIBC_2.0 for libc.so.
5607 1999-02-12 H.J. Lu <hjl@gnu.org>
5609 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5610 __libc_allocate_rtsig): Added to GLIBC_2.1.
5612 * internals.h (DEFAULT_SIG_RESTART): Removed.
5613 (DEFAULT_SIG_CANCEL): Removed.
5615 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5616 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5617 (__pthread_sig_restart, __pthread_sig_cancel,
5618 __pthread_sig_debug): Initialized.
5619 (pthread_initialize): Call init_rtsigs () to initialize
5622 1999-02-03 H.J. Lu <hjl@gnu.org>
5624 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5625 Don't restart the thread which sent REQ_DEBUG.
5626 (pthread_start_thread): Check if __pthread_sig_debug > 0
5629 * pthread.c (__pthread_initialize_manager): Suspend ourself
5630 after sending __pthread_sig_debug to gdb instead of
5631 __pthread_sig_cancel.
5633 1999-01-24 H.J. Lu <hjl@gnu.org>
5635 * manager.c (__pthread_manager): Delete __pthread_sig_debug
5636 from mask if __pthread_sig_debug > 0.
5637 (pthread_handle_create): Increment __pthread_handles_num.
5639 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5640 * pthread.c (__pthread_initialize_manager): Likewise.
5642 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5643 instead of __libc_allocate_rtsig (2).
5644 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5645 instead of __pthread_sig_cancel.
5646 (pthread_handle_sigdebug): Fix comments.
5648 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
5650 * manager.c (pthread_allocate_stack): Set
5651 __pthread_nonstandard_stacks if user-specified stack is used.
5653 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
5655 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5656 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5658 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
5660 * pthread.c: Use a third signal __pthread_sig_debug distinct
5661 from __pthread_sig_cancel to notify gdb when a thread is
5663 * manager.c: Likewise.
5664 * internals.h: Likewise.
5665 * signals.c: The implementation of sigwait(s) assumed that
5666 all signals in s have signal handlers already attached.
5667 This is not required by the standard, so make it work
5668 also if some of the signals have no handlers.
5670 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5672 * linuxthreads.texi: Remove pointers from first @node. Move old
5673 @node spec inside comment.
5675 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
5677 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5680 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
5682 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5683 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5685 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
5687 * manager.c: Threads now send __pthread_sig_cancel on termination.
5688 Change clone call and signal masks.
5689 * thread.c (pthread_handle_sigrestart): Remove special code for
5691 (pthread_handle_sigcancel): In manager thread call
5692 __pthread_manager_sighandler.
5693 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5694 * sysdeps/i386/i686/pt-machine.h: Likewise.
5695 Patches by Xavier Leroy.
5697 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
5699 * spinlock.c (__pthread_unlock): Don't crash if called for an
5700 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5702 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5705 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
5707 * Examples/ex3.c: Wait until all threads are started before
5708 searching for the number to avoid race condition on very fast
5711 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5713 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5714 declaration since it's not needed.
5716 * sysdeps/pthread/pthread.h: Move internal functions to ...
5717 * internals.h: ...here.
5719 1998-12-02 H.J. Lu <hjl@gnu.org>
5721 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5722 SIGRTMIN is defined.
5723 (__pthread_sig_cancel): Likewise.
5725 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5727 * wrapsyscall.c: Include <sys/mman.h> for msync,
5728 <stdlib.h> for system and <termios.h> for tcdrain prototype.
5729 Correct msync declaration.
5731 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
5733 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5734 __libc_tsd_set): New macros for new interface.
5735 * no-tsd.c: New file, provide uninitialized defns of
5736 __libc_internal_tsd_get and __libc_internal_tsd_set.
5737 * Makefile (routines): Add no-tsd.
5739 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
5741 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5742 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5743 __libc_internal_tsd_set): Move decls to ...
5744 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5747 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5748 __libc_internal_tsd_set): Make these pointers to functions, not
5749 functions; remove #pragma weak decls for them.
5750 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5751 Define static functions and initialized pointers to them.
5753 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
5755 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5756 (CFLAGS-specific.c): Likewise.
5757 (CFLAGS-pthread.c): Likewise.
5758 (CFLAGS-ptfork.c): Likewise.
5759 (CFLAGS-cancel.c): Likewise.
5760 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5761 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5763 * mutex.c (pthread_mutex_init): Define as strong symbol.
5764 (pthread_mutex_destroy): Likewise.
5765 (pthread_mutex_trylock): Likewise.
5766 (pthread_mutex_lock): Likewise.
5767 (pthread_mutex_unlock): Likewise.
5768 (pthread_mutexattr_init): Likewise.
5769 (pthread_mutexattr_destroy): Likewise.
5770 (pthread_once): Likewise.
5771 * ptfork.c (pthread_atfork): Likewise.
5772 * specific.c (pthread_key_create): Likewise.
5773 (pthread_setspecific): Likewise.
5774 (pthread_getspecific): Likewise.
5776 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5778 * linuxthreads.texi: Fix punctuation after xref.
5780 1998-11-10 H.J. Lu <hjl@gnu.org>
5782 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5783 if it is defined in <linux/limits.h>.
5785 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
5787 * spinlock.h (__pthread_trylock): Define inline.
5788 (__pthread_lock): Add extra parameter to declaration. Declare
5789 using internal_function.
5790 (__pthread_unlock): Declare using internal_function.
5791 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
5792 of local variable self. Avoid recomputing self. Define using
5794 (__pthread_trylock): Remove.
5795 (__pthread_unlock): Define using internal_function.
5796 * cancel.c: Adjust for __pthread_lock interface change. Use already
5797 computed self value is possible.
5798 * condvar.c: Likewise.
5800 * manager.c: Likewise.
5801 * mutex.c: Likewise.
5802 * pthread.c: Likewise.
5803 * rwlock.c: Likewise.
5804 * semaphore.c: Likewise.
5805 * signals.c: Likewise.
5807 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
5809 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5810 __ to field names of the struct.
5811 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5813 (pthread_attr_t): Likewise.
5814 (pthread_cond_t): Likewise.
5815 (pthread_condattr_t): Likewise.
5816 (pthread_mutex_t): Likewise.
5817 (pthread_mutexattr_t): Likewise.
5818 (pthread_rwlock_t): Likewise.
5819 (pthread_rwlockattr_t): Likewise.
5820 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5821 * cancel.c: Likewise.
5822 * condvar.c: Likewise.
5823 * manager.c: Likewise.
5824 * mutex.c: Likewise.
5825 * pthread.c: Likewise.
5826 * ptlongjmp.c: Likewise.
5827 * rwlock.c: Likewise.
5828 * spinlock.c: Likewise.
5830 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
5832 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5835 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5838 * Makefile (libpthread-routines): Add pt-machine.
5839 * pt-machine.c: New file.
5840 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5841 yet defined. Use PT_EI in extern inline definitions.
5842 * sysdeps/arm/pt-machine.h: Likewise.
5843 * sysdeps/i386/pt-machine.h: Likewise.
5844 * sysdeps/i386/i686/pt-machine.h: Likewise.
5845 * sysdeps/m68k/pt-machine.h: Likewise.
5846 * sysdeps/mips/pt-machine.h: Likewise.
5847 * sysdeps/powerpc/pt-machine.h: Likewise.
5848 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5849 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5851 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5853 * semaphore.h: Include <sys/types.h> so that _pthread_descr
5856 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
5858 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5860 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5862 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5864 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5867 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5869 * signals.c (sigaction): Check that sig is less than NSIG to avoid
5870 array index overflow.
5872 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
5874 * sysdeps/pthread/semaphore.h: New file.
5876 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
5878 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5879 _LIBC_TSD_KEY_DL_ERROR.
5881 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
5883 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5884 * sysdeps/i386/pt-machine.h: Likewise.
5885 Suggested by Roland McGrath.
5887 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
5889 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5890 access thread data with non-constant offsets.
5891 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5894 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
5895 THREAD_SETMEM_NC definitions.
5897 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5899 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5901 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
5903 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5904 not already defined.
5905 (struct _pthread_descr_struct): Add p_self and p_nr field.
5906 * manager.c (__pthread_handles): Define second element to point
5908 (__pthread_handles_num): Initialize to 2.
5909 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5910 (pthread_start_thread): Likewise.
5911 (pthread_handle_create): Start search for free slot at entry 2.
5912 Initialize new fields p_self and p_nr.
5913 Call __clone with CLONE_PTRACE if available.
5914 (pthread_free): Call FREE_THREAD_SELF if available.
5915 * pthread.c (__pthread_initial_thread): Initialize new fields.
5916 (__pthread_manager_thread): Likewise.
5917 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5919 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5920 elements of the thread descriptor.
5921 * condvar.c: Likewise.
5922 * errno.c: Likewise.
5924 * manager.c: Likewise.
5925 * pthread.c: Likewise.
5926 * ptlongjmp.c: Likewise.
5927 * semaphore.c: Likewise.
5928 * signals.c: Likewise.
5929 * specific.c: Likewise.
5930 * spinlock.c: Likewise.
5932 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5934 * sysdeps/i386/useldt.h: New file.
5935 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5937 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5938 THREAD_SETMEM using __thread_self.
5939 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5941 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
5943 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5944 turned out that we didn't need to queue after all.
5946 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
5948 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5949 and wastes space; correct types.
5951 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
5953 * signals.c (sigaction): Handle NULL argument.
5955 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
5957 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5960 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5962 * Makefile (linuxthreads-version): Extract correct number from
5965 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
5967 * Banner: Bump version number to 0.8
5968 * FAQ.html: Many updates, in particular w.r.t. debugging.
5969 * manager.c: Support for non-default stacksize for
5970 LinuxThreads-allocated stacks;
5971 don't use guard pages for stacks with default size, rely on
5972 rlimit(RLIMIT_STACK) instead (it's cheaper).
5974 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5975 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5976 * condvar.c: Likewise.
5977 * internals.h: Likewise.
5978 * restart.h: Likewise.
5979 * signals.c: Likewise.
5980 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
5982 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5984 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
5985 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
5986 * Versions: Put __pthread_mutexattr_settype under version
5987 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
5988 __pthread_mutexattr_gettype.
5990 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5992 * sysdeps/pthread/bits/libc-lock.h: Make
5993 __pthread_mutexattr_settype weak. Don't make
5994 __pthread_mutexattr_setkind_np weak.
5996 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
5998 * manager.c (pthread_handle_create): Check whether sched_setscheduler
5999 call can succeed here.
6001 * mutex.c: Define __pthread_mutexattr_settype and make
6002 __pthread_mutexattr_setkind_np an alias.
6003 Likewise for __pthread_mutexattr_gettype.
6005 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
6007 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
6010 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
6012 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
6014 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6016 * Examples/ex6.c: Include <unistd.h> for usleep.
6018 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6020 * Examples/ex4.c (main): Use exit, not pthread_exit.
6022 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
6024 * Versions: Add __pthread_mutexattr_gettype and
6025 __pthread_mutexattr_settype.
6026 * lockfile.c: Use __pthread_mutexattr_settype instead of
6027 __pthread_mutexattr_setkind_np.
6028 * mutex.c: Define __pthread_mutexattr_gettype and
6029 __pthread_mutexattr_settype.
6031 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
6032 __pthread_mutexattr_settype.
6033 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
6034 Use __pthread_mutexattr_settype.
6036 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
6038 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
6039 * mutex.c: Define weak alias pthread_mutexattr_gettype and
6040 pthread_mutexattr_settype.
6041 * sysdeps/pthread/pthread.h: Declare these functions.
6042 Move pthread_sigmask and pthread_kill declaration in separate header.
6043 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
6045 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
6047 * Makefile: Add rules to compile and run tests.
6048 * Examples/ex1.c: Little changes to fix warnings.
6049 * Examples/ex2.c: Likewise.
6050 * Examples/ex3.c: Likewise.
6051 * Examples/ex4.c: Likewise.
6052 * Examples/ex5.c: Likewise.
6053 * Examples/ex6.c: New file.
6055 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
6057 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
6059 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6061 * attr.c: Include <string.h>.
6063 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
6065 * attr.c: Include errno.h. Use memcpy to copy sched_param.
6066 * internals.h: Include limits.h.
6067 * manager.c: Use memcpy to copy sched_param.
6068 * ptfork.c: Include errno.h.
6069 * pthread.c: Likewise.
6070 * semaphore.c: Likewise.
6071 * specific.c: Likewise.
6072 * spinlock.h: Likewise.
6073 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
6074 type definition to ...
6075 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
6077 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
6079 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6081 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6082 as macros as demanded in POSIX.1, Annex C.
6084 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
6086 * internals.h (struct pthread_request): For free use pthread_t
6087 instead of pthread_descr.
6088 * join.c (pthread_join): Pass thread_id, not th to manager.
6089 (pthread_detach): Likewise.
6090 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6091 (pthread_exited): Remove detached queue code.
6092 (pthread_handle_free): Expect thread ID parameter and use it to
6093 validate the thread decsriptor. Don't use detached queue.
6094 Patches by Xavier Leroy.
6096 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6098 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6099 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6100 __pthread_atfork, __pthread_key_create, __pthread_once.
6101 * internals.h: Doc fix.
6102 * pthread.c (__pthread_initialize): Define again.
6104 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
6106 * manager.c (pthread_exited): If thread is not detached put it on
6108 (pthread_handle_free): If thread is not on list with living threads
6109 search on list with detached threads.
6111 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6112 for new definition of pthread_rwlock_t.
6114 * spinlock.c: Correct test whether to compile
6115 __pthread_compare_and_swap or not.
6117 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
6119 * attr.c: Finish user stack support. Change locking code to be safe
6120 in situations with different priorities.
6121 * cancel.c: Likewise.
6122 * condvar.c: Likewise.
6123 * internals.h: Likewise.
6125 * manager.c: Likewise.
6126 * mutex.c: Likewise.
6127 * pthread.c: Likewise.
6128 * ptlongjmp.c: Likewise.
6129 * queue.h: Likewise.
6130 * rwlock.c: Likewise.
6131 * semaphore.c: Likewise.
6132 * semaphore.h: Likewise.
6133 * signals.c: Likewise.
6134 * spinlock.c: Likewise.
6135 * spinlock.h: Likewise.
6136 * sysdeps/pthread/pthread.h: Likewise.
6137 Patches by Xavier Leroy.
6139 * sysdeps/i386/i686/pt-machine.h: New file.
6141 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
6143 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6144 [sg]et_stackaddr prototypes always available.
6146 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6147 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6149 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
6151 * manager.c (pthread_free): Undo patch from 980430.
6152 Reported by David Wragg <dpw@doc.ic.ac.uk>.
6154 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
6156 * manager.c: Define __pthread_manager_adjust_prio and use it to
6157 increase priority when needed.
6158 * internals.h: Add prototype for __pthread_manager_adjust_prio.
6159 * mutex.c: Optimize mutexes to wake up only one thread.
6160 * pthread.c: Move PID of manager for global variable in structure
6162 Patches by Xavier Leroy.
6164 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
6166 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6168 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6170 * attr.c: Correct typo.
6172 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
6174 * manager.c (pthread_free): Unmap guard before the stack.
6175 Patch by Matthias Urlichs.
6177 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
6179 * manager.c (pthread_free): Detect already free child.
6180 Patch by Xavier Leroy, reported by Matthias Urlichs.
6182 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6184 * Makefile (linuxthreads-version): Renamed back from
6187 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
6189 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6192 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
6194 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6195 * internals.h: Add definitions for new spinlock implementation.
6196 * ptlongjmp.c: New file.
6197 * spinlock.c: New file.
6198 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6199 new function __pthread_acquire to prevent deadlocks with thread
6200 with different priorities.
6201 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6203 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6205 * manager.c (__pthread_manager): Reduce first argument to select
6206 to include just the needed file descriptor.
6208 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
6210 * manager.c: Fix last patch which caused core dumps.
6212 * pthread.c: Correctly handle missing SIGRTMIN.
6214 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6216 * libpthread.map: Add __libc_internal_tsd_get and
6217 __libc_internal_tsd_set. Add missing cancelable functions. Export
6218 libc internal versions of the cancelable functions.
6220 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
6222 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6224 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
6226 * attr.c: Implement pthread_attr_[gs]etguardsize,
6227 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6228 Change pthread_attr_init to have two interfaces.
6229 * internals.h (struct _pthread_descr_struct): Add new fields for
6231 * libpthread.map: Add names in GLIBC_2.1 section.
6232 * manager.c (pthread_handle_create): Implement guardsize and
6234 (pthread_free): Likewise.
6235 * pthread.c (pthread_create): Add new interface for changed
6237 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6238 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6241 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
6243 * manager.c: Enable resetting of the thread scheduling policy
6244 to SCHED_OTHER when the parent thread has a different one.
6246 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
6248 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6249 _POSIX_ASYNCHRONOUS_IO.
6251 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6253 * mutex.c: Implement new mutex types.
6255 * internals.h: Include <signal.h>.
6257 * libpthread.map: Add __erno_location and __h_errno_location.
6259 * errno.c: Return pointer to variable actually in use. This might
6260 not be the one in the thread structure.
6261 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6263 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6264 of manager thread structure.
6265 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6267 * pthread.c: Adapt initializer for thread structures.
6268 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6269 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6270 current thread to global variables.
6272 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
6274 * rwlock.c: New file.
6275 * Makefile (libpthread-routines): Add rwlock.
6276 * sysdeps/pthread/pthread.h: Define data structures and declare
6278 * libpthread.map: Add new functions.
6280 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
6282 * sysdeps/arm/pt-machine.h: New file; add ARM support.
6283 * sysdeps/arm/Implies: likewise.
6284 * README: Document it.
6286 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6288 * signals.c: Remove unneeded initializer for sigwaited, saving a
6291 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6293 * semaphore.c (sem_init): Set sem_spinlock only if available.
6295 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
6297 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6298 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6300 * Makefile: Update from LinuxThreads 0.7.
6301 * internals.h. Likewise.
6302 * manager.c: Likewise.
6303 * mutex.c: Likewise.
6304 * pthread.c: Likewise.
6305 * signals.c: Likewise.
6306 * specific.c: Likewise.
6307 * Examples/ex3.c: Likewise.
6309 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
6311 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6314 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
6316 * wrapsyscall.c: Add socket functions which are also cancelation
6319 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
6321 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6322 New functions for fast thread specific data within libc.
6324 * internals.h: Add new array p_libc_specific to struct
6325 _pthread_descr_struct.
6327 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6329 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
6331 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6332 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6334 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
6336 * internals.h (struct _pthread_descr_struct): Add definitions for
6337 two-level specific key handling.
6338 * manager.c (pthread_handle_create): Initialize specific memory array.
6339 * specific.c: Implement two-level key handling.
6340 * weaks.c: Don't provide dummy key handling.
6341 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6342 Add definition of __libc_key_t.
6343 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6345 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6346 PTHREAD_DESTRUCTOR_ITERATIONS.
6348 * manager.c (pthread_handle_create): Compare mmap result with
6351 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6352 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6354 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
6356 sysdeps/sparc -> sysdeps/sparc/sparc32
6357 sysdeps/sparc64 -> sysdeps/sparc/sparc64
6359 * internals.h: Change definition of THREAD_SELF to be an expression,
6360 not a statement that did a return.
6361 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6362 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6363 Follow Solaris and use a "system reserved" register (%g6) to hold
6364 the thread descriptor.
6365 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6367 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
6369 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
6370 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6371 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6373 * semaphore.c: Include spinlock.h only when needed.
6375 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6376 keys for entries not in use.
6378 * weaks.c: Implement key handling functions for real.
6380 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
6382 Initial sparc64-linux support:
6383 * sysdeps/sparc64/Implies: New file.
6384 * sysdeps/sparc64/pt-machine.h: Likewise.
6386 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
6388 * semaphore.c: Include spinlock.h at correct place.
6391 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
6393 The Great Bit File Move:
6394 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6395 * sysdeps/powerpc/semaphorebits.h: Likewise.
6396 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6397 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6398 * sysdeps/pthread/libc-lock.h: -> bits/
6399 * sysdeps/pthread/stdio-lock.h: Likewise.
6400 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6401 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6402 * semaphore.h: Likewise.
6403 * sysdeps/pthread/pthread.h: Likewise.
6405 * lockfile.c: <foo.h> -> <bits/foo.h>.
6406 * semaphore.h: Likewise.
6408 * Makefile: (headers): foo.h -> bits/foo.h.
6409 * sysdeps/pthread/Makefile: Likewise.
6411 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6413 * semaphore.c (sem_init): Set sem_spinlock only if available.
6415 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6418 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
6420 Update from LinuxThreads 0.6.
6422 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6423 and __sched_get_priority_min instead of names without `__'.
6425 * manager.c: Rewrite large parts to implement opaque pthread_t.
6427 * cancel.c: Adapt for opaque pthread_t type.
6428 * condvar.c: Likewise.
6429 * errno.c: Likewise.
6431 * mutex.c: Likewise.
6432 * pthread.c: Likewise.
6433 * signals.c: Likewise.
6434 * specific.c: Likewise.
6435 * restart.h: Likewise.
6436 * queue.h: Likewise.
6437 * Examples/ex3.c: Likewise.
6438 * Examples/ex4.c: Likewise.
6439 * sysdeps/pthread/pthread.h: Likewise.
6441 * pthread.c: Accumulate time for all threads in thread manager.
6443 * semaphore.c: Implement fallback implementation for architectures
6444 sometimes missing compare-exchange operations.
6446 * cancel.c (pthread_cancel): Validate handle argument.
6447 * join.c (pthread_join): Likewise.
6448 (pthread_detach): Likewise.
6449 * signals.c (pthread_kill): Likewise.
6451 * spinlock.h (acquire): Use __sched_yield not sched_yield.
6453 * queue.h (enqueue): Enqueue thread according to priority.
6455 * internals.c (struct pthread_start_args): New struct for passing
6456 args to cloning function.
6457 (struct _pthread): Rename to _pthread_descr_struct and adapt for
6460 * Examples/Makefile (clean): Pass -f option to rm.
6462 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6463 and define TEST_FOR_COMPARE_AND_SWAP.
6464 * sysdeps/i386/i486/pt-machine.h: Removed.
6466 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6469 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
6471 * restart.h (suspend): Clear p_signal before suspending.
6472 (suspend_with_cancellation): Likewise.
6473 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6475 * weaks.c: Make __pthread_key_create return 1.
6476 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6477 __libc_getspecific, __libc_setspecific, and __libc_key_t.
6478 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6481 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
6483 * sysdeps/sparc/pt-machine (RELEASE): Fix.
6485 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
6487 * sysdeps/powerpc/Implies: Added.
6488 * sysdeps/powerpc/pt-machine.h: Added.
6489 * sysdeps/powerpc/semaphorebits.h: Added.
6491 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
6493 * pthread.c (__pthread_initial_thread): Correct
6495 (__pthread_manager_thread): Likewise.
6496 Reported by Andreas Jaeger.
6498 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
6500 Since sigset_t no longer fits in a register, we can't pass in the
6501 thread's initial mask so easily. Take this opportunity to simplify
6502 the clone implementation by only accepting a single void* argument.
6504 * manager.c (__pthread_manager): Put thread vitals in the thread
6505 struct instead of as arguments through clone.
6506 (pthread_start_thread): Look for them there.
6507 * internals.h (struct _pthread): Add p_initial_fn,
6508 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
6509 * pthread.c (pthread_initialize_manager): Revise clone invocation.