1 2005-05-19 Richard Henderson <rth@redhat.com>
3 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Use
4 __sync_val_compare_and_swap, not explicit _si variant.
5 (__pthread_spin_trylock): Likewise.
7 2005-05-05 Daniel Jacobowitz <dan@codesourcery.com>
9 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
10 .eh_frame section, use cfi_* directives.
12 2005-04-27 Jakub Jelinek <jakub@redhat.com>
14 * sysdeps/pthread/getcpuclockid.c: Include spinlock.h.
15 Fix a typo in kernel-posix-cpy-timers.h include name, use <> instead
17 (pthread_getcpuclockid): Fix 2 typos.
19 2005-04-27 Roland McGrath <roland@redhat.com>
21 * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid)
22 [__NR_clock_getres]: Use kernel-supplied CPU clocks if available.
24 2005-03-31 Jakub Jelinek <jakub@redhat.com>
26 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Use
27 functionally equivalent, but shorter instructions.
29 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
31 * sysdeps/mips/tls.h: New file.
32 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
34 2005-03-21 GOTO Masanori <gotom@debian.or.jp>
36 * linuxthreads/sysdeps/m68k/Makefile: Remove to delete
37 unneeded o-iterator thing.
39 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
41 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Add local _init
44 2005-03-05 Ulrich Drepper <drepper@redhat.com>
46 * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Unconditionally
49 2005-03-05 Roland McGrath <roland@redhat.com>
51 * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Use $(cc-mtune).
53 2005-03-05 Jakub Jelinek <jakub@redhat.com>
55 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Rework for GCC 4.
57 2005-02-09 Daniel Jacobowitz <dan@codesourcery.com>
60 * descr.h (__pthread_find_self, thread_self): Mark as pure
63 2005-02-07 Jakub Jelinek <jakub@redhat.com>
66 * specific.c (pthread_key_delete): If pthread_create has not been
67 called yet, clear p_specific for the current thread.
68 * Makefile (tests): Add tst-tsd1.
69 * tst-tsd1.c: New test.
71 2005-01-08 Andreas Jaeger <aj@suse.de>
73 * pthread.c (init_one_static_tls): Adjust initialization of DTV
74 entry for static tls deallocation fix.
76 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
77 also contains information whether the memory pointed to is static
78 TLS or not, include <stdbool.h>.
79 * sysdeps/i386/tls.h: Likewise.
80 * sysdeps/ia64/tls.h: Likewise.
81 * sysdeps/powerpc/tls.h: Likewise.
82 * sysdeps/s390/tls.h: Likewise.
83 * sysdeps/sh/tls.h: Likewise.
84 * sysdeps/sparc/tls.h: Likewise.
85 * sysdeps/x86_64/tls.h: Likewise.
87 2004-12-21 Jakub Jelinek <jakub@redhat.com>
89 * Makefile (tests): Add tst-align.
90 * tst-align.c: New test.
91 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Add
92 -mpreferred-stack-boundary=4.
94 2004-12-12 Ulrich Drepper <drepper@redhat.com>
96 * internals.h: Include <stdbool.h> to match includes used in nptl.
98 2004-12-01 Jakub Jelinek <jakub@redhat.coM.
100 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
101 _POSIX_THREAD_CPUTIME): Define to 0.
102 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
103 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
104 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
105 __timer_signal_thread_tclk): Remove.
106 (init_module): Remove their initialization.
107 (thread_cleanup): Remove their cleanup assertions.
108 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
109 __timer_signal_thread_tclk): Remove.
110 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
111 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
112 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
113 * tst-clock1.c (do_test): Check for availability of CPU clock.
115 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
117 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use.
118 * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
120 2004-12-02 Roland McGrath <roland@redhat.com>
122 * Makefile (libpthread-nonshared): Variable removed.
123 ($(objpfx)libpthread_nonshared.a): Target removed.
124 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
125 These are now handled by generic magic from
126 libpthread-static-only-routines being set.
128 2004-11-27 Ulrich Drepper <drepper@redhat.com>
130 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
131 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
132 _POSIX_THREAD_PRIO_PROTECT): Define.
133 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
134 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
135 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
137 2004-11-26 Jakub Jelinek <jakub@redhat.com>
139 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
140 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
141 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
142 _POSIX_TYPED_MEMORY_OBJECTS): Define.
143 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
144 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
145 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
147 2004-11-05 Maciej W. Rozycki <macro@mips.com>
149 * sysdeps/mips/pspinlock.c: Include <sgidefs.h>. Use _ABIO32,
150 _ABIN32 and _ABI64 for ABI selection throughout.
151 * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
152 ABI selection throughout.
154 2004-10-18 Roland McGrath <roland@redhat.com>
157 * Makefile (linuxthreads-CPPFLAGS): New variable;
158 adds -DIS_IN_linuxthreads=1.
159 * sysdeps/i386/tls.h: Protect "useldt.h" with
160 [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
161 * sysdeps/i386/i686/pt-machine.h: Revert last change.
163 2004-10-14 Jakub Jelinek <jakub@redhat.com>
165 * sysdeps/pthread/errno-loc.c: Don't undef #errno
166 if RTLD_PRIVATE_ERRNO.
168 2004-10-05 Dwayne Grant McConnell <dgm69@us.ibm.com>
170 * pthread.c: Mask restart signal during cancel signal handler.
172 2004-10-05 Jakub Jelinek <jakub@redhat.com>
174 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
175 _POSIX_THREAD_CPUTIME): Define to 0.
177 2004-10-04 Ulrich Drepper <drepper@redhat.com>
179 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
180 and _POSIX_THREAD_CPUTIME to zero.
181 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
183 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
184 _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
185 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
186 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
187 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
189 2004-09-25 Roland McGrath <roland@redhat.com>
192 * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
193 [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
195 2004-09-24 Roland McGrath <roland@redhat.com>
198 * sysdeps/i386/tls.h: Move #include "useldt.h" outside
199 of [__ASSUME_LDT_WORKS > 0] test.
200 Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
202 2004-09-21 Roland McGrath <roland@redhat.com>
204 * Versions: Add comment about linuxthreads' frozen ABI.
206 2004-09-20 Ulrich Drepper <drepper@redhat.com>
208 * Versions: Remove exports for pthread_set*id_np functions.
209 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
211 * Makefile: Don't build pthread_set*id code for now.
213 2004-09-19 Ulrich Drepper <drepper@redhat.com>
215 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
216 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
217 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
218 and pthread_setresuid_np.
219 * pthread_setgid_np.c: New file.
220 * pthread_setuid_np.c: New file.
221 * pthread_setegid_np.c: New file.
222 * pthread_seteuid_np.c: New file.
223 * pthread_setregid_np.c: New file.
224 * pthread_setreuid_np.c: New file.
225 * pthread_setresgid_np.c: New file.
226 * pthread_setresuid_np.c: New file.
227 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
228 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
229 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
230 and pthread_setresuid_np.
231 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
232 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
233 pthread_setregid, and pthread_setresgid.
235 2004-09-12 Ulrich Drepper <drepper@redhat.com>
237 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
239 * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
240 for __USE_XOPEN2K. [BZ #320]
242 2004-09-04 Jakub Jelinek <jakub@redhat.com>
244 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
246 2004-09-07 Ulrich Drepper <drepper@redhat.com>
248 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
249 the initialization function might throw.
251 2004-08-30 Roland McGrath <roland@frob.com>
253 * Makefile (libpthread-abi-frozen): New variable.
255 2004-08-26 Roland McGrath <roland@redhat.com>
257 * configure.in: New file. If nptl add-on is also selected, barf if
258 explicit and elide ourselves if implicit.
259 * configure: Now generated.
261 2004-08-25 Richard Sandiford <rsandifo@redhat.com>
263 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
264 __local_multiple_threads): Fix definitions for IS_IN_librt.
265 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
267 2004-08-22 Andreas Schwab <schwab@suse.de>
269 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
270 Save gp around CENABLE/CDISABLE calls.
272 2004-08-15 Roland McGrath <roland@frob.com>
274 * pthread_atfork.c: Update copyright terms including special exception
275 for these trivial files, which are statically linked into executables
276 that use dynamic linking for the significant library code.
278 2004-08-09 Jakub Jelinek <jakub@redhat.com>
280 * libc-tsd.c: Move resolv.h include before the #if.
281 (__res_maybe_init): New function. Add libc_hidden_def.
283 2004-08-02 Ulrich Drepper <drepper@redhat.com>
285 * linuxthreads.texi (Cleanup Handlers): Fix typo.
286 Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
288 2004-07-23 Jakub Jelinek <jakub@redhat.com>
291 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
292 instead of clockid_t.
294 2004-07-21 Roland McGrath <roland@redhat.com>
296 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
298 2004-07-02 Roland McGrath <roland@redhat.com>
300 * configure: Don't exit.
302 2004-07-20 Alexandre Oliva <aoliva@redhat.com>
304 * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
306 * sysdeps/mips/atomicity.h: Likewise.
308 2004-07-19 Alexandre Oliva <aoliva@redhat.com>
310 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
311 Remove redundant override that missed -g0.
313 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
315 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
316 (__local_multiple_threads): Define for librt.
317 (SINGLE_THREAD_P): Likewise.
319 2004-07-07 Jakub Jelinek <jakub@redhat.com>
321 * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
322 using other thread's clock.
323 * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
324 * ptclock_settime.c (__pthread_clock_settime): Likewise.
325 * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
327 Reported by Bernd Schmidt <bernds@redhat.com>.
328 * Makefile (librt-tests): Add tst-clock1.
329 * tst-clock1.c: New test.
331 * sysdeps/x86_64/Versions: New file.
332 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
333 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
335 2004-04-16 Andreas Schwab <schwab@suse.de>
337 * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
339 2004-07-05 Jakub Jelinek <jakub@redhat.com>
341 * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
342 __pthread_spin_trylock): Use constraint "m" instead of "0" for
344 * sysdeps/ia64/pt-machine.h (__compare_and_swap,
345 __compare_and_swap_with_release_semantic, testandset): Use
346 constraint "m" instead of "0" for futex.
348 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
350 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
351 branch offset for a PLT entry.
352 (CDISABLE): Likewise.
354 2004-05-31 Andreas Jaeger <aj@suse.de>
356 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
357 Set to -fno-unit-at-a-time.
358 Patch by Dan Kegel <dank@kegel.com>.
360 2004-05-04 Jakub Jelinek <jakub@redhat.com>
362 * tst-stack1.c: Don't include mcheck.h.
363 (do_test): Make sure user defined stacks aren't reused,
364 don't free them at the end. [BZ #110]
366 2004-05-02 Jakub Jelinek <jakub@redhat.com>
368 * manager.c: Include not-cancel.h.
369 (__pthread_manager): Use read_not_cancel instead of __libc_read.
370 (pthread_start_thread, __pthread_manager_sighandler): Use
371 write_not_cancel instead of __libc_write.
372 (pthread_reap_children): Use waitpid_not_cancel instead of
374 * pthread.c: Include not-cancel.h.
375 (__pthread_initialize_minimal, __pthread_create_2_1,
376 pthread_onexit_process, __pthread_message): Use
377 write_not_cancel instead of __libc_write.
378 (__pthread_initialize_manager): Likewise. Use close_not_cancel
379 instead of __libc_close.
380 (__pthread_reset_main_thread): Use close_not_cancel instead of
382 * join.c: Include not-cancel.h.
383 (__pthread_do_exit, pthread_join, pthread_detach): Use
384 write_not_cancel instead of __libc_write.
385 * semaphore.c: Include not-cancel.h.
386 (__new_sem_post): Use write_not_cancel instead of __libc_write.
387 * specific.c: Include not-cancel.h.
388 (pthread_key_delete): Use write_not_cancel instead of __libc_write.
390 2004-05-01 Jakub Jelinek <jakub@redhat.com>
392 * Versions (libc): Add __on_exit and __libc_sigaction.
394 2004-04-28 Jakub Jelinek <jakub@redhat.com>
396 * semaphore.c (sem_timedwait): Return -1 and set errno instead of
397 returning error number [BZ #133]. Patch by <rmhaddad@yahoo.com>.
399 2004-04-22 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
401 * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
402 reference in PIC case.
404 2004-04-20 Jakub Jelinek <jakub@redhat.com>
406 * oldsemaphore.c (SEM_VALUE_MAX): Remove.
408 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
410 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
411 for librt. Save the return value to a safe register.
412 (CDISABLE): Define for librt. Set the function argument correctly.
414 2004-04-18 Jakub Jelinek <jakub@redhat.com>
416 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
417 (PSEUDO_CANCEL): Define.
419 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
420 CDISABLE): For librt, append @PLT.
422 2004-04-17 Jakub Jelinek <jakub@redhat.com>
424 * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
426 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
427 return it_value { 0, 0 }.
428 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
430 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
431 assertion for SIGEV_NONE.
432 (thread_attr_compare): Compare all attributes, not just a partial
435 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
437 2004-04-17 Ulrich Drepper <drepper@redhat.com>
439 * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
441 2004-04-16 Ulrich Drepper <drepper@redhat.com>
443 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
445 2004-04-13 Jakub Jelinek <jakub@redhat.com>
447 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
449 2004-04-12 Ulrich Drepper <drepper@redhat.com>
451 * sysdeps/unix/sysv/linux/mq_notify.c: New file.
453 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
455 (CDISABLE): Likewise.
457 2004-04-08 Jakub Jelinek <jakub@redhat.com>
459 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
460 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
461 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
462 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
463 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
465 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
466 (_POSIX_MESSAGE_PASSING): Define.
468 2004-04-10 Andreas Jaeger <aj@suse.de>
470 * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
471 to avoid warnings with GCC 3.5.
473 2004-04-09 Steven Munroe <sjmunroe@us.ibm.com>
475 * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
476 __thread_self assignment.
477 (THREAD_DTV): Replace __thread_register with __thread_self.
478 (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
481 2004-04-08 Alexandre Oliva <aoliva@redhat.com>
483 * signals.c (pthread_sigmask): Don't ever block or mask
486 2004-03-11 Steven Munroe <sjmunroe@us.ibm.com>
488 * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
490 2004-03-23 Ulrich Drepper <drepper@redhat.com>
492 * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
493 * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
495 2004-03-12 Ulrich Drepper <drepper@redhat.com>
497 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
498 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
499 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
500 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
502 2004-03-08 Andreas Jaeger <aj@suse.de>
504 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
505 dl_osversion is readonly.
507 2004-03-07 Ulrich Drepper <drepper@redhat.com>
509 * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
511 * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
513 2004-02-20 Steven Munroe <sjmunroe@us.ibm.com>
515 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
516 valid for SHARED case. Correct spelling of __vmx_longjmp.
518 * sysdeps/powerpc/pspinlock.c: Move from here.
519 * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
520 * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
521 * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
522 and __compare_and_swap32_with_release_semantics.
524 2004-02-20 Jakub Jelinek <jakub@redhat.com>
526 * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
527 (tests): Remove $(objpfx)tst-stack1-mem.
528 (tst-stack1-ENV): Remove.
529 ($(objpfx)tst-stack1-mem): Remove.
531 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
532 (__syscall_error_handler2): Call CDISABLE.
533 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
534 (__syscall_error_handler2): Call CDISABLE.
536 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
538 2004-02-10 Steven Munroe <sjmunroe@us.ibm.com>
540 * Makefile (libpthread-routines): Add ptcleanup.
541 * ptlongjmp.c: Removed.
542 * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
543 * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
544 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
545 Version longjmp, siglongjmp for GLIBC_2.3.4.
546 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
548 2004-01-22 Andreas Jaeger <aj@suse.de>
550 * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
551 (__pthread_release): Likewise.
553 2004-01-16 Richard Henderson <rth@redhat.com>
555 * attr.c: Include ldsodefs.h.
556 (pthread_getattr_np): Don't declare __libc_stack_end.
558 2004-01-09 Steven Munroe <sjmunroe@us.ibm.com>
560 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
561 [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
562 __lib*_multiple_threads.
563 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
564 [!HAVE_TLS_SUPPORT]: Likewise.
566 2004-01-13 Roland McGrath <roland@redhat.com>
568 * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
571 2004-01-10 Andreas Jaeger <aj@suse.de>
573 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
575 2004-01-01 Andreas Jaeger <aj@suse.de>
577 * Makefile (generated): Add missing files.
579 2003-12-31 Ulrich Drepper <drepper@redhat.com>
581 * attr.c (pthread_getattr_np): Make sure stack info returned for
582 main thread does not overlap with any other VMA.
583 Patch by Jakub Jelinek.
585 2003-12-29 Jakub Jelinek <jakub@redhat.com>
587 * sysdeps/ia64/tls.h: Include dl-sysdep.h.
588 (INIT_SYSINFO): Define.
589 (TLS_INIT_TP): Use it.
591 2003-12-28 Carlos O'Donell <carlos@baldric.uwo.ca>
593 * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
595 2003-12-26 Jakub Jelinek <jakub@redhat.com>
597 * sysdeps/pthread/pthread.h (pthread_setcancelstate,
598 pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
600 * semaphore.h (sem_wait, sem_timedwait): Likewise.
602 2003-12-17 Jakub Jelinek <jakub@redhat.com>
604 * manager.c (pthread_free): Call _dl_deallocate_tls even for
606 * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
608 (pthread_onexit_process): Update comment.
609 * Makefile (tests): Add tst-stack1. Depend on $(objpfx)tst-stack1-mem.
610 (generated): Add tst-stack1.mtrace and tst-stack1-mem.
611 (tst-stack1-ENV): Set.
612 ($(objpfx)tst-stack1-mem): New.
613 * tst-stack1.c: New test.
615 2003-12-16 Steven Munroe <sjmunroe@us.ibm.com>
617 * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
618 conditional so MULTIPLE_THREADS_OFFSET is generated for both.
619 * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
620 so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
621 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
624 2003-12-04 Steven Munroe <sjmunroe@us.ibm.com>
626 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
627 (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
629 2003-12-10 David Mosberger <davidm@hpl.hp.com>
631 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
632 message. Add include of <stddef.h>.
633 (INIT_NEW_WAY): New macro.
634 (INIT_OLD_WAY): Likewise.
635 (_init): Add unwind directives. Invoke
636 __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
638 (_init_EPILOG_BEGINS): Add unwind-directives. Drop unused .regstk
640 (_fini): Add unwind directives. Drop unnecessary .align 16
641 directive (bundles are always 16-byte aligned).
642 (_fini_EPILOG_BEGINS): Add unwind-directives.
644 2003-11-19 David Mosberger <davidm@hpl.hp.com>
646 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
648 2003-12-10 Andreas Jaeger <aj@suse.de>
649 Ruediger Oertel <ro@suse.de>
651 * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
653 2003-11-30 Andreas Jaeger <aj@suse.de>
655 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
656 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
659 2003-11-04 Jakub Jelinek <jakub@redhat.com>
661 * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
662 __libc_sigaction if it has been one of the special values before.
664 2003-10-06 Carlos O'Donell <carlos@baldric.uwo.ca>
666 * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
667 (__pthread_find_self): Likewise.
668 * manager.c (thread_segment): _STACK_GROWS_UP case added.
670 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
672 * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
674 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
676 * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
678 2003-10-07 Jakub Jelinek <jakub@redhat.com>
680 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
682 (SAVE_OLDTYPE_0): Fix a typo.
684 2003-10-02 Ulrich Drepper <drepper@redhat.com>
686 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
689 2003-10-02 Jakub Jelinek <jakub@redhat.com>
691 * Makefile (tests): Add tst-cancel8.
692 * tst-cancel8.c: New test.
694 2003-10-02 Ulrich Drepper <drepper@redhat.com>
696 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
697 restoring of the old cancellation type.
699 2003-09-10 Chris Demetriou <cgd@broadcom.com>
701 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
703 2003-09-30 Jakub Jelinek <jakub@redhat.com>
705 * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
706 mutex_lock, mutex_trylock, mutex_unlock): Remove.
708 2003-09-27 Wolfram Gloger <wg@malloc.de>
710 * sysdeps/pthread/malloc-machine.h: New file.
712 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
714 * attr.c (__pthread_attr_init_2_1): Double __guardsize size
715 if NEED_SEPARATE_REGISTER_STACK is defined.
717 2003-09-22 Philip Blundell <philb@gnu.org>
719 * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
720 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
722 * pthread.c (__pthread_elements): Initialise these new elements.
723 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
725 (__libc_cleanup_pop): Likewise.
727 2003-09-22 Jakub Jelinek <jakub@redhat.com>
729 * attr.c: Include stdlib.h.
731 2003-09-18 Jakub Jelinek <jakub@redhat.com>
733 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
735 * tst-attr1.c: New test.
736 * Makefile (tests): Add tst-attr1.
738 2003-09-17 Philip Blundell <philb@gnu.org>
740 * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
741 libpthread is loaded. Elide backwards compatibility code when not
744 2003-09-17 Jakub Jelinek <jakub@redhat.com>
746 * descr.h (manager_thread): Rename to...
747 (__pthread_manager_threadp): ... this.
748 * pthread.c (manager_thread): Define to __pthread_manager_threadp.
749 (__pthread_manager_threadp): New variable.
750 * internals.h (__manager_thread): Define to
751 __pthread_manager_threadp if USE_TLS.
753 2003-09-15 Jakub Jelinek <jakub@redhat.com>
755 * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
756 CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
757 -mpreferred-stack-boundary=4.
759 2003-09-16 Ulrich Drepper <drepper@redhat.com>
761 * attr.c (pthread_getattr_np): Correctly fill in the stack-related
762 values for the initial thread.
764 2003-09-17 Jakub Jelinek <jakub@redhat.com>
766 * pthread.c (manager_thread): Remove static, add attribute_hidden.
767 (thread_self_stack): Rename to...
768 (__pthread_self_stack): ... this. Remove static.
769 (pthread_handle_sigcancel): Use check_thread_self ().
770 (pthread_handle_sigrestart): Likewise.
771 * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
773 * descr.h (manager_thread): Declare.
774 * internals.h (__pthread_self_stack): New prototype.
775 (__manager_thread): Define.
776 (check_thread_self): New function.
778 2003-09-15 Jakub Jelinek <jakub@redhat.com>
780 * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
781 (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
783 2003-09-12 Jakub Jelinek <jakub@redhat.com>
785 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
786 (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
787 __SLONGWORD_TYPE otherwise.
789 2003-09-11 Steven Munroe <sjmunroe@us.ibm.com>
791 * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
792 [READ_MEMORY_BARRIER]: Define.
793 [WRITE_MEMORY_BARRIER]: Define.
795 2003-09-10 Jakub Jelinek <jakub@redhat.com>
797 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
798 ptr___pthread_cond_timedwait to the end of the structure to avoid
799 breaking Wine unnecessarily.
801 2003-09-08 Jakub Jelinek <jakub@redhat.com>
803 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
805 2003-09-02 Jakub Jelinek <jakub@redhat.com>
807 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
808 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
809 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
810 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
811 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
812 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
813 * attr.c (__old_pthread_attr_setstacksize,
814 __old_pthread_attr_setstack): New functions.
815 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
816 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
817 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
818 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
819 * tststack.c: Include limits.h and sys/param.h.
820 (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
822 * barrier.c (__pthread_barrierattr_getpshared): Always
823 return PTHREAD_PROCESS_PRIVATE.
824 (pthread_barrierattr_setpshared): Return EINVAL if pshared
825 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
827 2003-09-02 Ulrich Drepper <drepper@redhat.com>
829 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
830 (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
833 * barrier.c (pthread_barrierattr_setpshared): We don't handle
834 inter-process barriers.
836 2003-09-01 Jakub Jelinek <jakub@redhat.com>
838 * Makefile (tests): Add tst-tls1.
839 (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
840 ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
841 ($(objpfx)tst-tls1): New.
842 ($(objpfx)tst-tls2.out): Likewise.
843 (tests): Depend on $(objpfx)tst-tls2.out.
844 * tst-tls1.c: New test.
846 * tst-tls1mod.c: New.
847 * tst-tls1moda.c: New.
848 * tst-tls1modb.c: New.
849 * tst-tls1modc.c: New.
850 * tst-tls1modd.c: New.
851 * tst-tls1mode.c: New.
852 * tst-tls1modf.c: New.
853 * tst-tls2.sh: New test.
855 * internals.h (__pthread_cond_timedwait): New prototype.
856 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
857 ptr___pthread_cond_timedwait.
858 * pthread.c (__pthread_functions): Initialize them.
859 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
860 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
861 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
862 pthread_cond_timedwait@@GLIBC_2.3.2.
864 2003-08-27 Ulrich Drepper <drepper@redhat.com>
866 * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
867 pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
868 __THROW to match NPTL.
870 2003-08-13 Ulrich Drepper <drepper@redhat.com>
872 * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
873 -DBROKEN_THREAD_SIGNALS.
875 2003-08-11 Steven Munroe <sjmunroe@us.ibm.com>
877 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
878 Correct spelling of per thread resolver state.
880 2003-08-07 Jakub Jelinek <jakub@redhat.com>
882 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
883 (__rtld_lock_default_lock_recursive,
884 __rtld_lock_default_unlock_recursive): Define.
885 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
886 __rtld_lock_unlock_recursive): Define using
887 GL(_dl_rtld_*lock_recursive).
888 * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
889 and _dl_rtld_unlock_recursive. Lock GL(_dl_load_lock) the same
890 number of times as GL(_dl_load_lock) using non-mt implementation was
893 2003-07-31 Jakub Jelinek <jakub@redhat.com>
895 * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
896 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
898 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
900 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
902 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
903 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
904 PTHREAD_STACK_MIN in comments.
906 * sysdeps/alpha/pt-machine.h (PT_EI): Add
907 __attribute__((always_inline)).
908 * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
909 * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
910 * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
911 * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
912 * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
913 * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
914 * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
915 * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
916 * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
917 * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
918 * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
919 * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
920 * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
921 * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
922 * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
923 * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
924 * spinlock.h (__pthread_set_own_extricate_if): Likewise.
925 * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
927 * Examples/ex13.c (main): Change res type to void * to avoid
929 * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
931 2003-07-30 Jakub Jelinek <jakub@redhat.com>
933 * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
935 (pthread_initialize): Initialize GL(dl_init_static_tls).
937 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
939 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
940 before __timer_dealloc.
941 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
942 Don't call list_unlink.
944 2003-07-29 Roland McGrath <roland@redhat.com>
946 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
948 2003-07-25 Roland McGrath <roland@redhat.com>
950 * manager.c (pthread_start_thread): Fix typo in last change.
952 2003-07-14 Guido Guenther <agx@sigxcpu.org>
954 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
955 use L() for local labels.
957 2003-07-22 Jakub Jelinek <jakub@redhat.com>
959 * descr.h (struct _pthread_descr_struct): Provide p_res member
960 even if USE_TLS && HAVE___THREAD.
961 * sysdeps/pthread/res-state.c (__res_state): Return __resp
963 * manager.c: Include resolv.h.
964 (pthread_start_thread): Initialize __resp.
965 * libc-tls-loc.c (__res_state): Return __resp.
966 * Makefile (tests): Add tst-_res1.
967 (modules-names, extra-objs, test-extras, test-modules): Add support
969 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
970 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
972 * tst-_res1.c: New test.
973 * tst-_res1mod1.c: New test.
974 * tst-_res1mod2.c: New test.
976 2003-07-20 Ulrich Drepper <drepper@redhat.com>
978 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
981 * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
983 2003-07-14 Ulrich Drepper <drepper@redhat.com>
985 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
986 in test for compilation in libc.
988 2003-07-04 Jakub Jelinek <jakub@redhat.com>
990 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
991 different symbol for the cancellation syscall wrapper and
992 non-cancellation syscall wrapper.
993 (PSEUDO_END): Define.
995 2003-07-05 Richard Henderson <rth@redhat.com>
997 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
999 2003-06-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1001 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
1004 2003-06-21 Andreas Schwab <schwab@suse.de>
1006 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
1009 2003-06-20 Richard Henderson <rth@redhat.com>
1011 * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
1012 Remove ptw-osf_sigprocmask.
1014 2003-06-18 Jakub Jelinek <jakub@redhat.com>
1016 * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
1017 __librt_disable_asynccancel): Declare.
1018 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
1020 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
1022 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1023 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1024 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1025 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1026 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1027 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1028 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1029 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1030 * sysdeps/x86_64/tcb-offsets.sym: New file.
1031 * sysdeps/x86_64/Makefile: New file.
1032 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
1033 * Versions (libc): Export __librt_enable_asynccancel,
1034 __librt_disable_asynccancel and __librt_multiple_threads as
1036 * libc-cancellation.c (__librt_multiple_threads,
1037 __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
1039 2003-06-12 Steven Munroe <sjmunroe@us.ibm.com>
1041 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1042 (SINGLE_THREAD_P): Replace @ got notation with @toc.
1044 2003-06-11 Ulrich Drepper <drepper@redhat.com>
1046 * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
1047 initializer [PR libc/5052].
1049 2003-06-09 Andreas Schwab <schwab@suse.de>
1051 * Makefile: Move inclusion of ../Rules down after extra-objs is
1054 2003-06-06 Ulrich Drepper <drepper@redhat.com>
1056 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
1057 5+ arg syscalls only needed for PIC.
1058 Patch by Ralph Siemsen <ralphs@netwinder.org>.
1060 2003-06-05 Richard Henderson <rth@redhat.com>
1062 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1063 and require CFI assembler directives.
1064 * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
1066 2003-05-30 Andreas Jaeger <aj@suse.de>
1068 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
1069 (SAVESTK_0): Add CFI directives.
1070 (SAVESTK_3): Likewise.
1071 (SAVESTK_5): Likewise.
1072 (RESTSTK_0): Likewise.
1073 (RESTSTK_3): Likewise.
1074 (RESTSTK_5): Likewise.
1076 2003-05-05 Ulrich Drepper <drepper@redhat.com>
1078 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
1081 2003-05-04 Roland McGrath <roland@redhat.com>
1083 * Makefile ($(objpfx)../libc.so): New target.
1085 2003-04-26 Ulrich Drepper <drepper@redhat.com>
1087 * pthread.c (__pthread_initialize_manager): Remove one last
1088 p_multiple_threads call.
1090 2003-04-22 Jakub Jelinek <jakub@redhat.com>
1092 * pthread.c (__pthread_initialize_manager): Subtract
1093 TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
1094 * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
1095 instead of sizeof (pthread_descr).
1096 (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
1097 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
1098 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1100 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1102 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1104 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1106 (NO_TLS_OFFSET): Define.
1108 2003-04-22 Roland McGrath <roland@redhat.com>
1110 * Makeconfig (shared-thread-library): Reverse link order to work
1113 2003-04-20 Ulrich Drepper <drepper@redhat.com>
1115 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
1116 compiler knows we use the ldt_entry variable and that the syscall
1117 modifies the memory.
1119 * internals.h: Split pthread_functions definition into...
1120 * sysdeps/pthread/pthread-functions.h: ...new file.
1122 * sysdeps/i386/useldt.h: Include <sysdep.h>.
1124 2003-04-13 Jakub Jelinek <jakub@redhat.com>
1126 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1127 match changes in NPTL sysdep-cancel.h.
1129 2003-04-11 Roland McGrath <roland@redhat.com>
1131 * Makefile (multidir): Don't set the variable here with $(shell ...).
1132 ($(objpfx)multidir.mk): New target, generated makefile; include that.
1133 (generated): Append it.
1135 2003-04-10 Jakub Jelinek <jakub@redhat.com>
1137 * Makefile (multidir, crti-objs, crtn-objs): New variables.
1138 (generated-dirs): Add pathname component of multidir.
1139 (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1140 ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1141 ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1142 $(objpfx)$(multidir)/crtn.o): New.
1143 * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1144 * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1145 before-compile, generated): Don't generate and use specs.
1146 ($(objpfx)specs): Remove.
1148 2003-04-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1150 * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1152 2003-04-03 Ulrich Drepper <drepper@redhat.com>
1154 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1155 missing ; after ENTRY use [PR libc/4997].
1157 2003-04-03 Jakub Jelinek <jakub@redhat.com>
1159 * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1160 in case the parent blocked it.
1162 2003-04-02 Jakub Jelinek <jakub@redhat.com>
1164 * Makefile (libpthread-routines): Add pthread_atfork.
1165 (libpthread-static-only-routines): Add pthread_atfork.
1167 2003-04-01 Jakub Jelinek <jakub@redhat.com>
1169 * pthread.c (__pthread_wait_for_restart_signal): Use
1170 __pthread_sigsuspend instead of sigsuspend.
1171 * internals.h (__pthread_sigsuspend): New prototype.
1172 * Makefile (libpthread-routines): Add pt-sigsuspend.
1173 (tests): Add tst-cancel7.
1174 * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1175 * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1176 * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1177 * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1178 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1179 * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1180 * tst-cancel7.c: New test.
1182 2003-03-31 Alexandre Oliva <aoliva@redhat.com>
1184 * alloca_cutoff.c: Include internals.h.
1185 * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1186 * sysdeps/pthread/herrno-loc.c: Likewise.
1187 * sysdeps/pthread/res-state.c: Likewise.
1189 2003-03-25 Ulrich Drepper <drepper@redhat.com>
1191 * sysdeps/pthread/bits/typesizes.h: New file.
1192 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1193 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1195 2003-03-24 Daniel Jacobowitz <drow@mvista.com>
1197 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1198 (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1200 2003-03-22 Jakub Jelinek <jakub@redhat.com>
1202 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1204 2003-03-21 Daniel Jacobowitz <drow@mvista.com>
1206 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1207 (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1209 2003-03-21 Jakub Jelinek <jakub@redhat.com>
1211 * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1212 (TLS_SETUP_GS_SEGMENT): Fix a typo.
1214 2003-03-19 Ulrich Drepper <drepper@redhat.com>
1216 * sysdeps/pthread/Makefile: Fix cut&paste error.
1218 2003-03-18 Roland McGrath <roland@redhat.com>
1220 * Versions (libpthread: GLIBC_2.2): Remove
1221 pthread_barrierattr_getpshared, never really existed.
1222 (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1223 (libpthread: GLIBC_PRIVATE): ... here.
1225 2003-03-14 Jakub Jelinek <jakub@redhat.com>
1227 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1228 * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1231 2003-03-14 Alexandre Oliva <aoliva@redhat.com>
1233 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1235 * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1236 Handle 64-bit longs on n64.
1238 2003-03-07 Jakub Jelinek <jakub@redhat.com>
1240 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1241 __pthread_spin_trylock): Rewritten.
1243 2003-03-06 Ulrich Drepper <drepper@redhat.com>
1245 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1248 2003-03-02 Ulrich Drepper <drepper@redhat.com>
1250 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1251 error for CPU clocks.
1253 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1254 _POSIX_MONOTONIC_CLOCK.
1255 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1257 2003-03-01 Roland McGrath <roland@redhat.com>
1259 * sysdeps/powerpc/powerpc64/pt-machine.h
1260 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1262 * sysdeps/powerpc/tls.h: Don't define those here.
1264 * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1265 tcbhead_t with multiple_threads member.
1266 [USE_TLS] (tcbhead_t): Define minimal one-word version.
1267 [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1268 * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1269 derive thread register offset of p_multiple_threads member.
1271 * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1272 Conditionalize p_header member on this.
1273 [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1274 * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1275 * sysdeps/sh/tls.h: Likewise.
1276 * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1277 * sysdeps/sh/tcb-offsets.sym: Likewise.
1278 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1279 (SINGLE_THREAD_P): Likewise.
1280 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1281 (SINGLE_THREAD_P): Likewise.
1282 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1283 (SINGLE_THREAD_P): Likewise.
1284 * pthread.c (__pthread_initialize_manager): Likewise.
1285 * manager.c (pthread_handle_create): Likewise.
1287 * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1290 2003-01-31 Steven Munroe <sjmunroe@us.ibm.com>
1292 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1293 Conditionalize .toc section magic on this.
1295 2003-02-21 Roland McGrath <roland@redhat.com>
1297 * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1298 instead of __rpc_thread_destroy.
1300 2003-02-21 Jakub Jelinek <jakub@redhat.com>
1302 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1303 __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1304 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1306 * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1307 to crti.o and crtn.o.
1308 * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1310 2003-02-21 Roland McGrath <roland@redhat.com>
1312 * Makefile (install-lib-ldscripts): New variable.
1314 2003-02-20 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1316 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1317 interprocedure branches.
1319 2003-02-19 Ulrich Drepper <drepper@redhat.com>
1321 * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1322 need the target thread's lock.
1324 2003-02-17 Ulrich Drepper <drepper@redhat.com>
1326 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1329 2003-02-17 Kevin B. Hendricks <kevin.hendricks@sympatico.ca>
1330 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1332 * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1333 * sysdeps/powerpc/tcb-offsets.sym: New file.
1334 * sysdeps/powerpc/tls.h: New file.
1335 * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1336 (ARCH_STACK_MAX_SIZE): Define.
1337 (THREAD_SELF): Define.
1338 (INIT_THREAD_SELF): Define.
1339 (THREAD_GETMEM): Define.
1340 (THREAD_GETMEM_NC): Define.
1341 (THREAD_SETMEM): Define.
1342 (THREAD_SETMEM_NC): Define.
1343 (__thread_self): Declare.
1344 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1345 for thread register.
1347 2003-02-14 Steven Munroe <sjmunroe@us.ibm.com>
1349 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1350 Check pthread_create existance, not __pthread_fork.
1352 2003-02-12 Ulrich Drepper <drepper@redhat.com>
1354 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1356 2003-02-10 Jakub Jelinek <jakub@redhat.com>
1358 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1359 pthread_create existance, not __pthread_fork.
1360 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1361 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1362 * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1363 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1365 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1366 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1367 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1368 Add .weak pthread_create.
1369 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1370 Check pthread_create existance, not __pthread_fork.
1371 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1372 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1373 __fork whenever libpthread.so is loaded.
1375 2003-02-09 Andreas Jaeger <aj@suse.de>
1377 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1378 Rework: %r9 is destroyed by functions so don't use it as
1379 temporary, align stack correctly, fix parameter for CDISABLE.
1381 2003-02-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1383 * sysdeps/sh/Makefile: New file.
1384 * sysdeps/sh/tcb-offsets.sym: Likewise.
1385 * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1386 of linuxthreads/descr.h after the definition of THREAD_SELF.
1387 (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1388 (TLS_TCB_SIZE): Set size of tcbhead_t.
1389 (TLS_PRE_TCB_SIZE): Define.
1390 (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1391 a member of thread structure.
1392 (THREAD_DTV): Likewise.
1393 (TLS_INIT_TP_EXPENSIVE): Remove.
1394 (TLS_INIT_TP): Set gbr register only.
1396 (INIT_THREAD_SELF): Likewise.
1397 (NONTLS_INIT_TP): New.
1398 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1400 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1401 SYSCALL_INST_PAD macro after DO_CALL.
1402 (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1404 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1405 whenever libpthread.so is loaded.
1407 2003-02-08 Andreas Schwab <schwab@suse.de>
1409 * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1410 libpthread.so is loaded.
1412 2003-02-07 Ulrich Drepper <drepper@redhat.com>
1414 * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1415 __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1416 no __NR_vfork definition.
1418 2003-02-07 Jakub Jelinek <jakub@redhat.com>
1420 * tst-popen2.c: New test.
1421 * Makefile (tests): Add tst-popen2.
1422 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1423 whenever libpthread.so is loaded.
1424 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1425 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1426 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1427 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1429 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1430 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1431 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1433 2003-02-05 Ulrich Drepper <drepper@redhat.com>
1435 * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1436 variable for non-libpthread case to the same value the
1437 pthread_once function would use.
1439 2003-02-03 Jakub Jelinek <jakub@redhat.com>
1441 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1442 BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1444 2003-02-04 Andreas Jaeger <aj@suse.de>
1446 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1449 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1451 * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1453 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1455 * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1456 THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1458 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1459 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1460 * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1461 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1462 * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1463 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1464 * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1465 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1466 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1467 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1468 * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1469 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1471 2003-01-27 Martin Schwidefsky <schwidefsky@de.ibm.com>
1473 * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1474 Define TLS versions.
1475 * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1477 * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1478 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1479 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1481 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1482 branch with 32 bit offset.
1483 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1485 2003-01-24 Jakub Jelinek <jakub@redhat.com>
1487 * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1488 as required by TLS ABI.
1489 * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1490 * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1491 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1492 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1494 [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1495 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1496 instead of %g6 for thread pointer.
1497 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1498 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1499 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1501 2003-01-25 Guido Guenther <agx@sigxcpu.org>
1503 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1504 * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1506 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1508 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1509 reference to __fork.
1511 2003-01-17 Richard Henderson <rth@redhat.com>
1513 * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1514 (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1515 (TLS_PRE_TCB_SIZE): New.
1516 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1517 new ia64-style thread pointer layout.
1518 (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1519 (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1520 * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1523 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1525 * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1527 (NONTLS_INIT_TP): Revert last change.
1528 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1529 offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1531 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1533 * pthread.c (_pthread_initialize_minimal): Use
1534 GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1535 been already initialized.
1537 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1539 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1542 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1544 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1545 __libc_lock_init_recursive): Initialize fields directly.
1547 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1549 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1550 __fork to be far away from __vfork ifndef SHARED.
1551 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1553 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1554 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1555 Add a missing instruction.
1556 * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1557 branch to __fork even if __NR_vfork is not defined.
1559 2003-01-14 Ulrich Drepper <drepper@redhat.com>
1561 * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1564 2003-01-14 Steven Munroe <sjmunroe@us.ibm.com>
1566 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1568 2003-01-14 Jakub Jelinek <jakub@redhat.com>
1570 * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1572 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1574 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1575 unterminated string literals.
1576 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1578 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1580 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1581 (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from
1582 PSEUDO_END to PSEUDO.
1583 (PSEUDO_END): Remove.
1584 (SINGLE_THREAD_P): Save an instruction.
1585 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1586 parameter to SINGLE_THREAD_P call.
1587 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1590 2003-01-10 Andreas Schwab <schwab@suse.de>
1592 * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1594 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1596 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1597 backchain in pseudo_cancel. Minor code improvements.
1598 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1601 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1603 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1604 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1606 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1608 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1610 2002-01-09 Richard Henderson <rth@redhat.com>
1612 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1613 ret follows pseudo, and thus avoid branch-to-branch in cancel
1614 case. Use SYSCALL_ERROR_LABEL.
1616 2003-01-11 Philip Blundell <philb@gnu.org>
1618 * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1619 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1620 Correctly unstack lr.
1621 (UNDOARGS_5): Fix ordering of pushes and pops.
1622 (SINGLE_THREAD_P_PIC): New.
1623 (SINGLE_THREAD_P_INT): New.
1624 (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it
1626 (PSEUDO): Use SINGLE_THREAD_P_INT.
1628 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1630 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1632 2003-01-11 Jakub Jelinek <jakub@redhat.com>
1634 * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1635 [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1636 TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1637 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1638 INIT_THREAD_SELF): Define.
1639 [HAVE_TLS_SUPPORT]: Include descr.h.
1640 (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1641 struct _pthread_descr_struct.
1642 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1643 THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1645 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1647 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1649 (__pthread_initialize_manager): Rename tcb to mgr.
1650 Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1651 _pthread_descr) below tcbp, otherwise to tcbp.
1652 * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1653 new_thread to be below _dl_allocate_tls (). Adjust new_thread back
1654 before freeing. Fix clone arguments if report_events and USE_TLS.
1655 (pthread_free): Adjust th back before freeing.
1657 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
1659 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1660 * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1661 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1663 2003-01-09 Jakub Jelinek <jakub@redhat.com>
1665 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1666 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1667 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1668 [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1669 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1670 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1671 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1672 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1673 * tst-popen.c: New test.
1674 * Makefile (tests): Add tst-popen.
1676 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1678 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1679 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1681 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1683 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1684 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
1686 2003-01-06 Philip Blundell <philb@gnu.org>
1688 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1690 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1692 * internals.h (LIBC_CANCEL_HANDLED): Define.
1693 * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1694 * signals.c (LIBC_CANCEL_HANDLED): Add.
1695 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1696 * tst-cancel-wrappers.sh: Remove all exceptions.
1698 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1700 2003-01-05 Andreas Schwab <schwab@suse.de>
1702 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1705 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1707 (CENABLE): Likewise.
1708 (CDISABLE): Likewise.
1710 2003-01-05 Ulrich Drepper <drepper@redhat.com>
1712 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1713 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1715 * Makefile (libc.so-no-z-defs): Define to yes.
1717 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1719 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1720 (tcbhead_t): Add multiple_threads member.
1721 (TLS_INIT_TP_EXPENSIVE): Define.
1722 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1723 strings. Remove unused code.
1724 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1726 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1728 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1729 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1731 2003-01-04 Jakub Jelinek <jakub@redhat.com>
1733 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1734 even if NOT_IN_libc is defined.
1736 2003-01-05 Jakub Jelinek <jakub@redhat.com>
1738 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1739 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1740 * sysdeps/s390/Makefile: New file.
1741 * sysdeps/s390/tcb-offsets.sym: New file.
1742 * sysdeps/s390/tls.h: New file.
1744 2003-01-03 Richard Henderson <rth@redhat.com>
1746 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1748 2003-01-03 Andreas Jaeger <aj@suse.de>
1750 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1752 2003-01-03 Jakub Jelinek <jakub@redhat.com>
1754 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1756 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1758 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1761 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1763 * internals.h (struct pthread_functions): Rename
1764 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1765 * pthread.c (pthread_functions): Adjust.
1766 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1767 pthread_cond_*@GLIBC_2.0 compatibility symbols.
1768 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1769 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1770 and pthread_cond_wait.
1772 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1774 (pthread_cond_t): Add __align member, shorten __padding.
1775 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1776 __padding and __align too.
1778 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1780 * sysdeps/pthread/sigaction.c: New file.
1781 * sysdeps/unix/sysv/linux/raise.c: New file.
1782 * sysdeps/unix/sysv/linux/sigwait.c: New file.
1783 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1784 weak_extern with #ifndef SHARED.
1785 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1787 * signals.c (__sigaction): Renamed to...
1788 (__pthread_sigaction): ... this.
1789 (__sigaction): New strong alias, #ifdef SHARED only.
1790 (sigaction): Protect with #ifdef SHARED.
1791 (sigwait): Renamed to...
1792 (__pthread_sigwait): ... this.
1793 (sigwait): New strong alias, #ifdef SHARED only.
1794 (raise): Renamed to...
1795 (__pthread_raise): ... this.
1796 (raise): New strong alias, #ifdef SHARED only.
1797 * internals.h (__pthread_sigaction, __pthread_sigwait,
1798 __pthread_raise): New prototypes.
1799 (struct pthread_functions): Add ptr_pthread_sigaction,
1800 ptr_pthread_sigwait, ptr_pthread_raise.
1801 * pthread.c (pthread_functions): Renamed to...
1802 (__pthread_functions): ... this. No longer static, no longer
1803 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1804 and ptr_pthread_raise.
1805 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1806 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1807 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1808 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1810 * Makefile (tests, tests-static): Add tst-cancel-static.
1811 * tst-cancel-static.c: New test.
1813 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1815 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1817 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1819 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1820 * condvar.c: Add symbol versioning. The compatibility versions
1821 are the same as the change in the interface does not effect this
1823 * Versions [libpthread]: Add definitions for new pthread_cond_*
1824 interfaces for version GLIBC_2.3.2.
1826 2002-12-31 Ulrich Drepper <drepper@redhat.com>
1828 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1830 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1831 for __register_atfork.
1833 2002-12-31 Jakub Jelinek <jakub@redhat.com>
1835 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1836 ASSEMBLER test macro.
1837 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1838 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1839 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1840 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1841 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1842 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1844 * sysdeps/pthread/errno-loc.c (__errno_location): Add
1846 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1847 * sysdeps/pthread/res-state.c (__res_state): Likewise.
1848 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1849 __libc_current_sigrtmax): Likewise.
1850 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1851 __libc_internal_tsd_set, __libc_internal_tsd_address,
1852 __libc_alloca_cutoff.
1853 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1854 __libc_internal_tsd_set, __libc_internal_tsd_address.
1856 * sysdeps/pthread/list.h: Remove assert.h include.
1857 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1859 * sysdeps/pthread/list.h: New file.
1860 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1861 * sysdeps/unix/sysv/linux/fork.c: New file.
1862 * sysdeps/unix/sysv/linux/fork.h: New file.
1863 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1864 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1865 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1866 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1867 * sysdeps/unix/sysv/linux/Makefile: New file.
1868 * sysdeps/unix/sysv/linux/Versions: New file.
1869 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1870 (__pthread_cleanup_upto): ...this. Add targetframe argument,
1871 use it instead of currentframe. No longer static.
1872 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1873 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1874 (struct pthread_functions): Add ptr_pthread_fork,
1875 ptr_pthread_cleanup_upto.
1876 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1877 ptr_pthread_cleanup_upto.
1878 * ptfork.c: Include fork.h.
1879 (struct handler_list, struct handler_list_block): Remove.
1880 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1881 pthread_atfork_child): Remove.
1882 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1883 (__pthread_fork): New function.
1884 (__fork, __vfork): Call __libc_fork.
1885 * Makefile (libpthread-routines): Add old_pthread_atfork.
1886 (libpthread-nonshared): Add pthread_atfork.
1887 (others): Depend on $(objpfx)libpthread_nonshared.a.
1888 ($(objpfx)libpthread_nonshared.a): New rule.
1889 (install): Depend on $(inst_libdir)/libpthread.so.
1890 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1892 (tests): Depend on libpthread_nonshared.a too.
1893 * old_pthread_atfork.c: New file.
1894 * pthread_atfork.c: New file.
1895 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1898 2002-12-30 Jakub Jelinek <jakub@redhat.com>
1900 * forward.c: Make all functions available by default again. It
1901 caused too much trouble.
1902 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1903 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1904 ptr___pthread_attr_init_2_*.
1905 * pthread.c (pthread_functions): Adjust.
1907 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1909 * libc_pthread_init.c (__libc_pthread_init): Remove
1910 MULTIPLE_THREADS_OFFSET check.
1911 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1912 (SYSINFO_OFFSET): Remove.
1913 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1915 * sysdeps/i386/tcb-offsets.sym: New file.
1916 * sysdeps/pthread/tcb-offsets.h: New file.
1917 * sysdeps/sparc/sparc32/tls.h: Removed.
1918 * sysdeps/sparc/sparc64/tls.h: Move...
1919 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
1920 * sysdeps/sparc/Makefile: New file.
1921 * sysdeps/sparc/tcb-offsets.sym: New file.
1922 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1923 * sysdeps/ia64/Makefile: New file.
1924 * sysdeps/ia64/tcb-offsets.sym: New file.
1925 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1926 (MULTIPLE_THREADS_OFFSET): Remove.
1927 Replace defined MULTIPLE_THREADS_OFFSET
1928 with defined FLOATING_STACKS && USE___THREAD.
1929 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1930 (MULTIPLE_THREADS_OFFSET): Remove.
1931 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1932 (MULTIPLE_THREADS_OFFSET): Remove.
1933 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1934 (MULTIPLE_THREADS_OFFSET): Remove.
1935 * pthread.c (__pthread_initialize_manager): Remove
1936 MULTIPLE_THREADS_OFFSET cbeck.
1938 * tst-cancel-wrappers.sh: Add line continuations.
1940 2002-12-27 Jakub Jelinek <jakub@redhat.com>
1942 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1943 and bits/libc-lock.h.
1944 (__libc_internal_tsd_get, __libc_internal_tsd_set,
1945 __libc_internal_tsd_address): Remove.
1946 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1947 __pthread_internal_tsd_set): New weak_externs.
1948 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1949 using __libc_maybe_call2.
1950 (__libc_tsd_key_t): Move to ...
1951 * descr.h (__libc_tsd_key_t): ...here.
1952 Remove bits/libc-tsd.h include.
1953 * sysdeps/pthread/errno-loc.c: New file.
1954 * sysdeps/pthread/herrno-loc.c: New file.
1955 * sysdeps/pthread/res-state.c: New file.
1956 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1957 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1958 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
1959 of THREAD_[SG]ETMEM.
1960 * specific.c (libc_internal_tsd_set): Renamed to...
1961 __pthread_internal_tsd_set. Remove static.
1962 (libc_internal_tsd_get): Renamed to...
1963 __pthread_internal_tsd_get. Remove static.
1964 (libc_internal_tsd_address): Renamed to...
1965 __pthread_internal_tsd_address. Remove static.
1966 (__libc_internal_tsd_set, __libc_internal_tsd_get,
1967 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1968 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1970 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1971 __pthread_internal_tsd_address): New prototypes.
1972 (struct pthread_functions): Add
1973 ptr_pthread_internal_tsd_([sg]et|address) fields.
1974 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1975 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1976 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1977 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1978 * alloca_cutoff.c: New file.
1979 * no-tsd.c: Removed.
1980 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
1981 * pt-system.c (system): Remove cancellation handling.
1982 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1983 cancellation routines.
1985 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1986 (tcbhead_t): Add sysinfo field.
1987 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1988 (TLS_INIT_TP): Use INIT_SYSINFO.
1989 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1990 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1991 (MULTIPLE_THREADS_OFFSET): Adjust.
1992 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1993 (MULTIPLE_THREADS_OFFSET): Likewise.
1994 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1995 (MULTIPLE_THREADS_OFFSET): Likewise.
1996 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1997 (MULTIPLE_THREADS_OFFSET): Likewise.
1998 * descr.h: Include stdint.h.
1999 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
2001 2002-12-22 Jakub Jelinek <jakub@redhat.com>
2003 * libc_pthread_init.c: Include stdlib.h.
2004 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
2005 (TLS_INIT_TP_EXPENSIVE): Define.
2006 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
2007 __libc_maybe_call2): In _LIBC check SHARED define.
2008 * sysdeps/ia64/tls.h: New file.
2009 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
2010 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
2011 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
2012 * sysdeps/sparc/sparc32/tls.h: New file.
2013 * sysdeps/sparc/sparc64/tls.h: New file.
2014 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
2015 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
2016 * Makefile (tests): Add tst-cancel[1-6].
2017 (tests-reverse): Add tst-cancel5.
2018 Link libc.so before libpthread.so for tests-reverse.
2019 * tst-cancel1.c: New file.
2020 * tst-cancel2.c: New file.
2021 * tst-cancel3.c: New file.
2022 * tst-cancel4.c: New file.
2023 * tst-cancel5.c: New file.
2024 * tst-cancel6.c: New file.
2026 2002-12-27 Andreas Schwab <schwab@suse.de>
2028 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
2030 2002-12-22 Roland McGrath <roland@redhat.com>
2032 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2034 2002-12-21 Ulrich Drepper <drepper@redhat.com>
2036 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
2037 Reported by Art Hass <ahaas@airmail.net>.
2039 2002-12-19 Jakub Jelinek <jakub@redhat.com>
2041 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2042 Use return 0 as 6th argument to FORWARD4.
2044 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2046 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
2047 define if __ASSUME_LDT_WORKS > 0.
2048 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
2049 struct member access if !FLOATING_STACKS.
2050 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2052 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2054 * internals.h (__pthread_thread_self): New prototype.
2055 (struct pthread_functions): Add ptr_pthread_thread_self field.
2056 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
2057 (__pthread_thread_self): New function.
2058 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
2059 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
2060 use thread_self() directly if not FLOATING_STACKS.
2062 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2064 * sysdeps/x86_64/pt-machine.h: Guard most of the header
2065 with #ifndef __ASSEMBLER__.
2066 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
2067 pthread_attr_init_2_0 use.
2069 2002-12-17 Jakub Jelinek <jakub@redhat.com>
2071 * wrapsyscall.c: Removed.
2073 * Makefile (distribute): Add tst-cancel-wrappers.sh.
2074 (routines): Remove weaks. Add forward,
2075 libc_pthread_init, libc-cancellation.
2076 (shared-only-routines): Remove weaks. Add forward.
2077 (libpthread-routines): Remove wrapsyscall.
2078 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
2079 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
2080 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
2081 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
2082 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
2083 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
2084 (libpthread-shared-only-routines): Add pt-allocrtsig.
2085 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2086 ($(objpfx)tst-cancel-wrappers.out): New rule.
2087 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
2089 (__libc_maybe_call): In libpthread.* don't check for existance
2091 (__libc_maybe_call2): Define.
2092 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
2093 __libc_lock_trylock, __libc_lock_unlock): Use it.
2094 * sysdeps/pthread/flockfile.c: New file.
2095 * sysdeps/pthread/ftrylockfile.c: New file.
2096 * sysdeps/pthread/funlockfile.c: New file.
2097 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2098 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2099 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
2100 * libc-cancellation.c: New file.
2101 * forward.c: New file.
2102 * libc_pthread_init.c: New file.
2103 * pt-system.c: New file.
2104 * pthread.c: Remove locale.h.
2105 (__pthread_manager_thread): Initialize multiple_threads.
2106 (__pthread_multiple_threads): Declare.
2107 (pthread_functions): New variable.
2108 (__pthread_initialize_minimal): Remove __uselocale call.
2109 Call __libc_pthread_init.
2110 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
2111 initial thread's multiple_threads and __libc_multiple_threads.
2112 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
2114 (pthread_setschedparam, pthread_getschedparam): Rename to __
2115 prefixed variants. Add strong_alias.
2116 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
2117 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
2118 (init_rtsigs): Use __libc_current_sigrtmin_private.
2119 (pthread_initialize): Only call init_rtsigs if
2120 !__ASSUME_REALTIME_SIGNALS.
2121 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2122 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2123 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2124 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2125 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2126 __pthread_attr_getinheritsched, __pthread_attr_setscope,
2127 __pthread_attr_getscope, __pthread_cond_init,
2128 __pthread_cond_destroy, __pthread_cond_wait,
2129 __pthread_cond_signal, __pthread_cond_broadcast,
2130 __pthread_condattr_init, __pthread_condattr_destroy,
2131 __pthread_equal, __pthread_getschedparam,
2132 __pthread_setschedparam, __pthread_setcancelstate,
2133 __pthread_setcanceltype, __pthread_enable_asynccancel,
2134 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2135 (__pthread_mutex_init, __pthread_mutex_destroy,
2136 __pthread_mutex_lock, __pthread_mutex_unlock,
2137 __pthread_mutex_trylock): Likewise.
2139 (struct pthread_functions): New type.
2140 (__libc_pthread_functions): New variable.
2141 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2142 * descr.h (struct _pthread_descr_struct): Add
2143 p_header.data.multiple_threads field.
2144 * manager.c (pthread_handle_create): Initialize multiple_threads.
2145 * cancel.c (__pthread_enable_asynccancel,
2146 __pthread_disable_asynccancel): New functions.
2147 (__pthread_provide_wrappers): Remove.
2148 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2149 prefixed variants. Add strong_alias.
2150 * condvar.c (pthread_cond_init, pthread_cond_destroy,
2151 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2152 pthread_condattr_init, pthread_condattr_destroy): Likewise.
2153 * join.c (pthread_exit): Likewise.
2154 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2155 pthread_attr_getdetachstate, pthread_attr_setschedparam,
2156 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2157 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2158 pthread_attr_getinheritsched, pthread_attr_setscope,
2159 pthread_attr_getscope): Likewise.
2160 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2161 __pthread_mutex_lock, __pthread_mutex_unlock,
2162 __pthread_mutex_trylock): Add hidden_def.
2163 * Versions (libc): Add __libc_pthread_init,
2164 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2165 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2166 * lockfile.c: Remove some USE_IN_LIBIO guards.
2167 (__pthread_provide_lockfile): Remove.
2168 * pt-allocrtsig.c: New file.
2169 * tst-cancel-wrappers.sh: New test.
2171 2002-12-15 Ulrich Drepper <drepper@redhat.com>
2173 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2174 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2175 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2176 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2178 2002-12-10 Ulrich Drepper <drepper@redhat.com>
2180 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2181 weak. There is no reason for that.
2182 (CANCELABLE_SYSCALL_VA): Likewise.
2184 2002-12-09 Ulrich Drepper <drepper@redhat.com>
2186 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2187 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2188 * Versions: Export creat, poll, pselect, readv, select, sigpause,
2189 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2190 libpthread in version GLIBC_2.3.2.
2192 2002-12-06 Ulrich Drepper <drepper@redhat.com>
2194 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2196 2002-12-05 Roland McGrath <roland@redhat.com>
2198 * pthread.c (__pthread_initialize_minimal)
2199 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2200 TCB if the dynamic linker didn't do it at startup.
2202 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2204 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2206 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2207 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2209 2002-12-03 Roland McGrath <roland@redhat.com>
2211 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2212 from dynamic linker internal cell to new libc cell.
2214 2002-11-28 Roland McGrath <roland@redhat.com>
2216 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2217 before other headers, so FLOATING_STACKS is not defined wrongly.
2219 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2220 even if [! FLOATING_STACKS].
2221 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2222 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2223 dl_osversion >= 2.3.99 and fatal if not.
2224 (TLS_DO_MODIFY_LDT): Use it.
2226 2002-11-28 Ulrich Drepper <drepper@redhat.com>
2228 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2229 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
2230 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2232 2002-11-19 Ulrich Drepper <drepper@redhat.com>
2234 * Versions (libc: GLIBC_2.0): Remove names of functions which are
2235 not defined in libc.
2236 * Makefile (shared-only-routines): Add weaks.
2237 * weaks.c: Remove functions which are not exported from libc.so.
2239 2002-11-14 Roland McGrath <roland@redhat.com>
2241 * libc-tsd.c: New file.
2242 * Makefile (distribute): Add it.
2243 (libc-link.so): New variable.
2244 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2245 (libc-ok-for-link): New variable.
2246 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2247 libc-ok-for-link to $(use-thread).
2248 [$(libc-ok-for-link) = no]
2249 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2250 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2252 (generated): Append them.
2253 (extra-objs): Append libc-tsd.os.
2255 * libc-tls-loc.c: New file.
2256 * Makefile (libpthread-routines): Add it.
2258 2002-11-14 Andreas Schwab <schwab@suse.de>
2260 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2263 2002-11-13 Roland McGrath <roland@redhat.com>
2265 * Examples/ex6.c (main): Improve error reporting.
2267 2002-11-04 Ulrich Drepper <drepper@redhat.com>
2269 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2270 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
2272 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2274 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2276 2002-10-22 Jakub Jelinek <jakub@redhat.com>
2278 * manager.c (pthread_start_thread): Call __uselocale even
2279 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
2281 2002-10-17 Roland McGrath <roland@redhat.com>
2283 * Makefile (unload): Don't link in libpthread.so.
2284 ($(objpfx)unload.out): Do depend on it.
2285 * unload.c (main): Improve error reporting.
2287 2002-10-09 Roland McGrath <roland@redhat.com>
2289 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2290 Under [__PIC__], call the function via the pointer fetched for
2291 comparison rather than a call by name that uses the PLT.
2292 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2293 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2294 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2295 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2296 (__libc_key_create, __libc_getspecific, __libc_setspecific)
2297 (__libc_atfork): Use it.
2299 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2300 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2301 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2302 (ld: GLIBC_PRIVATE): Set removed.
2304 2002-10-11 Ulrich Drepper <drepper@redhat.com>
2306 * sysdeps/unix/sysv/linux/execve.c: New file.
2308 2002-10-09 Jakub Jelinek <jakub@redhat.com>
2310 * no-tsd.c: Include stdlib.h.
2312 2002-10-07 Jakub Jelinek <jakub@redhat.com>
2314 * sysdeps/unix/sysv/linux/allocalim.h: New file.
2315 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2317 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2318 Pass stack size to caller.
2319 (pthread_handle_create): Set p_alloca_cutoff.
2320 * pthread.c (__pthread_initial_thread): Use C99 designated
2321 initializers. Set p_alloca_cutoff.
2322 (__pthread_manager_thread): Likewise.
2323 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2325 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2327 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2329 * specific.c (__libc_alloca_cutoff): New function.
2330 * no-tsd.c (__libc_alloca_cutoff): New function.
2331 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2334 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2336 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2337 * sysdeps/sh/tls.h: Likewise.
2338 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2340 2002-09-29 Jakub Jelinek <jakub@redhat.com>
2342 * sysdeps/pthread/tst-timer.c (main): Clear
2343 SIGEV2.sigev_notify_attributes.
2345 2002-09-29 Ulrich Drepper <drepper@redhat.com>
2347 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2348 INLINE_SYSCALL for set_thread_area syscall.
2350 2002-09-28 Roland McGrath <roland@redhat.com>
2352 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2353 Don't call setrlimit, since we did no prior bogon we need to undo.
2355 2002-09-27 Roland McGrath <roland@redhat.com>
2357 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2359 2002-09-24 Roland McGrath <roland@redhat.com>
2361 * sysdeps/x86_64/tls.h: New file.
2363 2002-09-23 Roland McGrath <roland@redhat.com>
2365 * Examples/ex13.c (dump_mut): int -> size_t for counter.
2367 2002-09-18 Bruno Haible <bruno@clisp.org>
2369 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2370 an unexpected error code.
2372 * internals.h (__pthread_message): Add const to first parameter type.
2373 * pthread.c (__pthread_message): Likewise.
2375 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2377 2002-09-17 Roland McGrath <roland@redhat.com>
2379 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2380 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2381 offset (positive or negative) relative to the thread struct.
2382 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2384 2002-09-12 Jakub Jelinek <jakub@redhat.com>
2386 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2387 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2388 Replace /usr/lib/crt[in].o with crt[in].o too.
2390 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
2392 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2394 2002-09-04 Bruno Haible <bruno@clisp.org>
2396 * pthread.c: Include <sys/time.h>.
2397 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2398 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2399 * Makefile (distribute): Add smp.h to the list.
2401 2002-09-04 Bruno Haible <bruno@clisp.org>
2403 * sysdeps/alpha/pt-machine.h: Choose different include file location
2404 on non-Linux platforms.
2406 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2407 (open, open64): Change va_arg argument type to the integral type to
2408 which mode_t promotes.
2410 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2411 the structure of 'struct sigevent'.
2413 * errno.c (__errno_location, __h_errno_location, __res_state):
2414 Use prototype function definitions.
2416 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
2418 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2419 * sysdeps/powerpc/pt-machine.h: moved to...
2420 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2421 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2423 2002-09-02 Roland McGrath <roland@redhat.com>
2425 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2427 2002-09-01 Roland McGrath <roland@redhat.com>
2429 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2430 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2432 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2433 (__libc_internal_tsd_address): Declare it.
2434 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2435 __libc_internal_tsd_address.
2436 * specific.c (libc_internal_tsd_address): New function.
2437 (__libc_internal_tsd_address): New variable.
2438 * no-tsd.c (__libc_internal_tsd_address): New variable.
2440 2002-08-31 Ulrich Drepper <drepper@redhat.com>
2442 * Makefile: Don't use rule for crt%.o, spell it out as rules for
2445 2002-08-30 Roland McGrath <roland@redhat.com>
2447 * Makefile (extra-objs, omit-deps): Add crtn.
2448 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2449 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2450 ($(objpfx)crtn.S): New target.
2451 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2452 (generated): Add crtn.S.
2454 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2455 crtn.o pathname too.
2457 2002-08-30 Jakub Jelinek <jakub@redhat.com>
2459 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2462 2002-08-30 Roland McGrath <roland@redhat.com>
2464 * tst-static-locale.c: New file.
2465 * Makefile (tests, tests-static): Add it.
2467 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
2469 * spinlock.c (__pthread_lock): Fix spurious wakeup
2470 handling. Don't clear lowest bit of list pointer as sign the thread
2471 is still on the wait list. Don't restart after spurious wakeup
2472 with spinning to get the lock.
2473 (__pthread_unlock): Take set lowest bit into account when handling
2474 pointer to list elements.
2475 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2477 2002-08-28 Roland McGrath <roland@redhat.com>
2479 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2481 2002-08-28 Jakub Jelinek <jakub@redhat.com>
2483 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2484 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2485 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2487 2002-08-28 Ulrich Drepper <drepper@redhat.com>
2489 * sysdeps/pthread/timer_routines.c (thread_func): Change return
2490 type to void and add casts in use to avoid warnings with all gcc
2493 2002-08-08 Jakub Jelinek <jakub@redhat.com>
2495 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2497 * manager.c (__pthread_handles): Remove.
2498 * pthandles.c: New file.
2499 * pthread.c (__pthread_initialize_minimal): Initialize
2500 __pthread_handles[0] and __pthread_handles[1].
2501 * Makefile (libpthread-routines): Add pthandles (must be last).
2503 2002-08-26 Brian Youmans <3diff@gnu.org>
2505 * Examples/ex10.c: Corrected version number in Lesser GPL copying
2506 permission notice from 2 to 2.1.
2507 * Examples/ex11.c: Likewise.
2508 * Examples/ex13.c: Likewise.
2509 * Examples/ex8.c: Likewise.
2510 * Examples/ex9.c: Likewise.
2511 * barrier.c: Likewise.
2512 * events.c: Likewise.
2513 * lockfile.c: Likewise.
2514 * no-tsd.c: Likewise.
2515 * pt-machine.c: Likewise.
2516 * ptclock_gettime.c: Likewise.
2517 * ptclock_settime.c: Likewise.
2518 * rwlock.c: Likewise.
2519 * sysdeps/alpha/pspinlock.c: Likewise.
2520 * sysdeps/alpha/pt-machine.h: Likewise.
2521 * sysdeps/arm/pspinlock.c: Likewise.
2522 * sysdeps/arm/pt-machine.h: Likewise.
2523 * sysdeps/cris/pspinlock.c: Likewise.
2524 * sysdeps/cris/pt-machine.h: Likewise.
2525 * sysdeps/hppa/pspinlock.c: Likewise.
2526 * sysdeps/hppa/pt-machine.h: Likewise.
2527 * sysdeps/i386/i686/pt-machine.h: Likewise.
2528 * sysdeps/i386/pspinlock.c: Likewise.
2529 * sysdeps/i386/pt-machine.h: Likewise.
2530 * sysdeps/i386/useldt.h: Likewise.
2531 * sysdeps/ia64/pspinlock.c: Likewise.
2532 * sysdeps/ia64/pt-machine.h: Likewise.
2533 * sysdeps/m68k/pspinlock.c: Likewise.
2534 * sysdeps/m68k/pt-machine.h: Likewise.
2535 * sysdeps/mips/pspinlock.c: Likewise.
2536 * sysdeps/mips/pt-machine.h: Likewise.
2537 * sysdeps/powerpc/pspinlock.c: Likewise.
2538 * sysdeps/powerpc/pt-machine.h: Likewise.
2539 * sysdeps/pthread/bits/initspin.h: Likewise.
2540 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2541 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2542 * sysdeps/pthread/getcpuclockid.c: Likewise.
2543 * sysdeps/pthread/posix-timer.h: Likewise.
2544 * sysdeps/pthread/timer_create.c: Likewise.
2545 * sysdeps/pthread/timer_delete.c: Likewise.
2546 * sysdeps/pthread/timer_getoverr.c: Likewise.
2547 * sysdeps/pthread/timer_gettime.c: Likewise.
2548 * sysdeps/pthread/timer_routines.c: Likewise.
2549 * sysdeps/pthread/timer_settime.c: Likewise.
2550 * sysdeps/pthread/tst-timer.c: Likewise.
2551 * sysdeps/s390/pspinlock.c: Likewise.
2552 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2553 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2554 * sysdeps/sh/pspinlock.c: Likewise.
2555 * sysdeps/sh/pt-machine.h: Likewise.
2556 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2557 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2558 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2559 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2560 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2561 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2562 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2563 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2564 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2565 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2566 * tststack.c: Likewise.
2567 * unload.c: Likewise.
2568 * weaks.c: Likewise.
2569 * wrapsyscall.c: Likewise.
2571 * sysdeps/pthread/pt-initfini.c: Changed copying
2572 permission notice to Lesser GPL from Library GPL, including the
2573 references in the special exception.
2574 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2575 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2576 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2578 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2580 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2582 2002-08-26 Ulrich Drepper <drepper@redhat.com>
2584 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2585 overflow [PR libc/4244].
2587 2002-08-25 Ulrich Drepper <drepper@redhat.com>
2589 * sysdeps/pthread/timer_routines.c (thread_func): Make the
2590 compiler happy by adding a return statement which will never be
2593 * tst-context.c (main): Cast to long before casting to pointer.
2595 * Examples/ex17.c (main): Use correct format string.
2597 * Examples/ex9.c (thread): Remove incorrect return statement.
2599 2002-08-23 Ulrich Drepper <drepper@redhat.com>
2601 * pthread.c (__linuxthreads_version): New global constant.
2603 2002-08-23 Andreas Jaeger <aj@suse.de>
2605 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2606 as thread specific register.
2607 (testandset): Fix inline asm.
2608 (THREAD_GETMEM): Fix inline asm.
2610 2002-08-22 Roland McGrath <roland@redhat.com>
2612 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2614 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2615 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2616 macro. That chooses whether to reuse %gs value or let kernel set it.
2617 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2618 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2621 2002-08-21 Ulrich Drepper <drepper@redhat.com>
2623 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2624 also to the third definition of this macro.
2626 2002-06-17 Andreas Jaeger <aj@suse.de>
2628 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2631 2002-08-20 Ulrich Drepper <drepper@redhat.com>
2633 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2634 loading/reading segment registers. Some old hardware doesn't
2635 handle the 32-bit instructions as expected.
2636 * sysdeps/i386/tls.h: Likewise.
2638 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2639 renamed to secondcall and use is negated.
2640 (TLS_SETUP_GS_SEGMENT): Likewise.
2641 (TLS_INIT_TP): Likewise.
2642 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2645 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2646 registers. No need to mask upper 16 bits in this case.
2647 * sysdeps/i386/useldt.h: Likewise.
2648 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2649 is the same since the GDT content changed.
2651 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2652 to TLS_SETUP_GS_SEGMENT.
2653 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2654 TLS_DO_SET_THREAD_AREA.
2655 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2656 entry number from %gs value.
2657 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2660 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2661 Pass true to _dl_deallocate_tls.
2662 (pthread_free): Likewise.
2663 * pthread.c (__pthread_initialize_manager): Likewise.
2665 2002-08-19 Ulrich Drepper <drepper@redhat.com>
2667 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2668 computing index from %gs value.
2670 2002-08-16 Roland McGrath <roland@redhat.com>
2672 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2673 register value from entry number properly.
2675 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2676 optimally conditional on [__PIC__].
2677 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2678 without touching errno, and use latest modify_ldt-like interface.
2679 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2680 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2681 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2682 existing %gs value as the segment to set.
2683 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
2684 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2685 by the first thread's early TLS setup.
2687 2002-08-15 Roland McGrath <roland@redhat.com>
2689 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2690 return a value as callers now expect.
2692 2002-08-11 Roland McGrath <roland@redhat.com>
2694 * pthread.c (__pthread_initialize_manager): Initialize
2695 p_header.data.tcb field of manager thread's descriptor.
2696 (__pthread_initialize_minimal): Don't initialize p_header.data.self
2697 field, already done by TLS_INIT_TP.
2699 * manager.c (pthread_handle_create): Move p_header field initializers
2702 2002-08-08 Ulrich Drepper <drepper@redhat.com>
2704 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2706 2002-08-07 Ulrich Drepper <drepper@redhat.com>
2708 * pthread.c (__linuxthreads_initial_report_events): New variable.
2709 (__pthread_initialize_manager): Use it to initialize p_report_events
2711 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2713 2002-08-07 Roland McGrath <roland@redhat.com>
2715 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2716 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2718 2002-08-02 Roland McGrath <roland@redhat.com>
2720 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2721 Add _LIBC_TSD_KEY_LOCALE.
2722 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2723 Call __uselocale to initialize our per-thread locale pointer to
2725 * pthread.c (__pthread_initialize_minimal): Likewise.
2727 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2729 2002-08-02 Ulrich Drepper <drepper@redhat.com>
2731 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2734 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2735 Don't use p_libc_specific element in thread descriptor.
2737 2002-07-30 Roland McGrath <roland@redhat.com>
2739 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2740 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2741 which does the right thing when __thread support is available.
2742 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2743 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2744 `p_h_errno', `p_resp', and `p_res' members.
2745 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2746 Don't initialize `p_errnop' and `p_h_errnop' members.
2747 (__pthread_reset_main_thread): Likewise.
2748 (__pthread_initialize_manager): Likewise.
2749 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2750 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2751 Don't initialize `p_resp' member.
2752 (__pthread_reset_main_thread): Likewise.
2753 * manager.c (pthread_handle_create): Likewise.
2754 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2755 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2756 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2757 * errno.c [USE_TLS && HAVE___THREAD]
2758 (__h_errno_location, __res_state): Don't define these at all.
2760 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2761 (INSTALL_NEW_DTV, GET_DTV): Likewise.
2762 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2764 * weaks.c: Don't include <errno.h> here.
2766 2002-08-01 Roland McGrath <roland@redhat.com>
2768 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2770 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2771 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2772 (TLS_INIT_TP): Use that.
2774 2002-08-02 Jakub Jelinek <jakub@redhat.com>
2776 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2777 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2778 (FREE_THREAD): Avoid modify_ldt if using GDT.
2779 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2781 2002-07-25 Jakub Jelinek <jakub@redhat.com>
2783 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2784 * sysdeps/i386/pt-machine.h: Likewise.
2785 * sysdeps/i386/useldt.h: Likewise.
2787 2002-07-22 Ulrich Drepper <drepper@redhat.com>
2789 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2790 call __libc_setup_tls first.
2791 * Makefile: Actually create tst-signal.out file when running the test.
2792 (tests): Add tststatic.
2793 * Examples/tststatic.c: New file.
2795 2002-07-19 Ulrich Drepper <drepper@redhat.com>
2797 * errno.c (__errno_location): Don't define unless !USE_TLS
2799 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2800 * sysdeps/i386/tls.h: Likewise.
2801 * sysdeps/i386/useldt.h: Likewise.
2802 * sysdeps/i386/i686/pt-machine.h: Likewise.
2804 2002-07-02 H.J. Lu <hjl@gnu.org>
2806 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
2808 * sysdeps/mips/pt-machine.h: Likewise.
2810 2002-07-14 Ulrich Drepper <drepper@redhat.com>
2812 * manager.c (pthread_handle_create): Initialize self-reference in
2815 2002-07-01 Jakub Jelinek <jakub@redhat.com>
2817 * Examples/ex9.c (main): Remove unused th variable.
2819 2002-07-10 Ulrich Drepper <drepper@redhat.com>
2821 * wrapsyscall.c: Add __nanosleep alias.
2822 * Versions (GLIBC_2.2.6): Add __nanosleep.
2823 * bug-sleep.c: New file.
2824 * Makefile (tests): Add bug-sleep.
2826 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
2828 * Examples/ex9.c (main): Use list of children and join them.
2829 (thread): Do not call exit.
2831 2002-06-20 Ulrich Drepper <drepper@redhat.com>
2833 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2834 Unconditionally use the code using spinlock. Use __pthread_release
2836 (wait_node_free): Likewise.
2837 (__pthread_acquire, __pthread_release): Unconditionally define.
2839 2002-06-07 Jakub Jelinek <jakub@redhat.com>
2841 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2843 2002-05-24 Ulrich Drepper <drepper@redhat.com>
2845 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2847 2002-05-21 Ulrich Drepper <drepper@redhat.com>
2849 * sysdeps/pthread/pthread.h (pthread_create): Rename first
2851 (pthread_cancel): Likewise.
2852 * internals.h (__pthread_create_2_1): Likewise.
2853 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2855 2002-05-20 Ulrich Drepper <drepper@redhat.com>
2857 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2858 Patch by Glen Nakamura <gen@flex.com>.
2860 2002-05-03 Ulrich Drepper <drepper@redhat.com>
2862 * signals.c: Move sighandler functions to...
2863 * sighandler.c: ...here. New file.
2864 * signals.c: Move signal handler related type definitions to...
2865 * internals.h: ...here. Add prototypes for signal handlers.
2866 * Makefile (libpthread-routines): Add sighandler.
2867 (CFLAGS-sighandler.c): Add $(exceptions).
2869 2002-04-30 Jakub Jelinek <jakub@redhat.com>
2871 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2873 2002-04-08 Ulrich Drepper <drepper@redhat.com>
2875 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2876 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2877 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2878 based on previous one and not on current time. Count overruns.
2879 Patch by Eric F. Sorton <eric@cctcorp.com>.
2881 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2883 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2885 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2886 if it isn't defined yet.
2887 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2888 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2890 * sysdeps/sh/tls.h: New file.
2892 2002-04-08 Jakub Jelinek <jakub@redhat.com>
2894 * manager.c (__pthread_manager_event): Use self instead of arg
2895 for INIT_THREAD_SELF.
2896 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2897 _pthread_descr_struct) instead of sizeof (*descr).
2899 2002-04-05 Ulrich Drepper <drepper@redhat.com>
2901 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2902 * sysdeps/alpha/pt-machine.h: Likewise.
2903 * sysdeps/arm/pt-machine.h: Likewise.
2904 * sysdeps/cris/pt-machine.h: Likewise.
2905 * sysdeps/hppa/pt-machine.h: Likewise.
2906 * sysdeps/m68k/pt-machine.h: Likewise.
2907 * sysdeps/mips/pt-machine.h: Likewise.
2908 * sysdeps/powerpc/pt-machine.h: Likewise.
2909 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2910 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2911 * sysdeps/sh/pt-machine.h: Likewise.
2912 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2913 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2914 * sysdeps/x86_64/pt-machine.h: Likewise.
2916 2002-04-05 Jakub Jelinek <jakub@redhat.com>
2918 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2919 instead of pthread_mutexattr_setkind_np.
2920 (pthread_mutexattr_gettype): Similarly.
2921 * man/pthread_mutexattr_setkind_np.man: New.
2922 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2924 2002-04-02 Ulrich Drepper <drepper@redhat.com>
2926 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2928 2002-03-22 Jakub Jelinek <jakub@redhat.com>
2930 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2932 2002-03-22 Ulrich Drepper <drepper@redhat.com>
2934 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2936 2002-03-17 Andreas Jaeger <aj@suse.de>
2938 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2940 * sysdeps/alpha/pt-machine.h: Likewise.
2941 * sysdeps/arm/pt-machine.h: Likewise.
2942 * sysdeps/cris/pt-machine.h: Likewise.
2943 * sysdeps/hppa/pt-machine.h: Likewise.
2944 * sysdeps/i386/i686/pt-machine.h: Likewise.
2945 * sysdeps/ia64/pt-machine.h: Likewise.
2946 * sysdeps/m68k/pt-machine.h: Likewise.
2947 * sysdeps/mips/pt-machine.h: Likewise.
2948 * sysdeps/powerpc/pt-machine.h: Likewise.
2949 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2950 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2951 * sysdeps/sh/pt-machine.h: Likewise.
2952 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2953 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2954 * sysdeps/x86_64/pt-machine.h: Likewise.
2956 * internals.h: Move testandset and __compare_and_swap prototypes
2959 2002-03-03 Andreas Jaeger <aj@suse.de>
2961 * errno.c: Include resolv.h to avoid warning.
2963 2002-02-27 Ulrich Drepper <drepper@redhat.com>
2965 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2968 2002-02-23 Ulrich Drepper <drepper@redhat.com>
2970 * attr.c (pthread_getattr_np): Don't take thread descriptor size
2971 into account if USE_TLS.
2972 * manager.c (pthread_handle_create): Free TLS data structures if call
2973 failed. Pass correct stack to clone if USE_TLS.
2974 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2975 * sysdeps/i386/i686/pt-machine.h: Likewise.
2976 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2978 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2979 Add p_stackaddr element #if USE_TLS.
2980 * internals.c: Include <tls.h>.
2981 * manager.c: Integrate creating and handling of thread descriptor
2983 * pthread.c: Likewise.
2984 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2985 Include <linuxthreads/descr.h> only if TLS is really used.
2986 (GET_DTV): New macro.
2987 (TLS_INIT_TP): Initialize self pointer.
2989 2002-02-17 Andreas Schwab <schwab@suse.de>
2991 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2994 2002-02-12 Ulrich Drepper <drepper@redhat.com>
2996 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2997 (INSTALL_DTV): Adjust for being passed pointer to element with length.
2999 2002-02-08 Ulrich Drepper <drepper@redhat.com>
3001 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
3003 2002-02-08 Richard Henderson <rth@redhat.com>
3005 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
3007 2002-02-08 Ulrich Drepper <drepper@redhat.com>
3009 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
3012 2002-02-07 H.J. Lu <hjl@gnu.org>
3014 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
3016 (__pthread_spin_lock): Remove ".set noreorder".
3017 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
3019 2002-02-05 H.J. Lu <hjl@gnu.org>
3021 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
3023 * sysdeps/mips/pt-machine.h (testandset): Likewise.
3024 (__compare_and_swap): Likewise.
3026 2002-02-07 Ulrich Drepper <drepper@redhat.com>
3028 * internals.h: Move declarations/definitions of
3029 __pthread_initial_thread_bos, __pthread_initial_thread,
3030 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
3031 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
3032 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
3034 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
3035 Define THREAD_GETMEM accordingly.
3037 2002-02-06 Ulrich Drepper <drepper@redhat.com>
3039 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
3041 * sysdeps/i386/tls.h: Define THREAD_DTV.
3043 2002-02-04 Ulrich Drepper <drepper@redhat.com>
3045 * internals.h: Move thread descriptor definition...
3046 * descr.h.: ...here. New file.
3047 * sysdeps/i386/tls.h: New file.
3049 2002-02-01 H.J. Lu <hjl@gnu.org>
3051 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
3052 different register in the delayed slot. Use branch likely.
3054 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
3055 (__compare_and_swap): Return 0 only when failed to compare. Use
3058 2002-02-01 Jakub Jelinek <jakub@redhat.com>
3060 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
3061 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
3062 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
3063 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
3064 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
3065 * sysdeps/sparc/sparc64/Versions: New file.
3066 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
3068 2002-01-31 Ulrich Drepper <drepper@redhat.com>
3070 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
3071 in SHARED code, use GL(dl_cpuclock_offset).
3073 2002-01-28 Andreas Jaeger <aj@suse.de>
3075 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
3076 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
3078 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
3080 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
3081 (CURRENT_STACK_FRAME): Remove duplicate definition.
3082 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3084 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
3086 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
3089 2002-01-12 Andreas Schwab <schwab@suse.de>
3091 * Makefile (test-srcs): Add tst-signal.
3092 (tests): Run tst-signal.
3093 (distribute): Add tst-signal.sh.
3094 * tst-signal.c, tst-signal.sh: New files.
3096 2002-01-14 Andreas Jaeger <aj@suse.de>
3098 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
3100 2002-01-11 Andreas Schwab <schwab@suse.de>
3102 * signals.c (sighandler): Initialize all elements to SIG_ERR.
3103 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
3105 2002-01-06 Richard Henderson <rth@redhat.com>
3107 * sysdeps/alpha/elf/pt-initfini.c: New file.
3109 2001-12-29 Andreas Jaeger <aj@suse.de>
3111 * Examples/ex9.c: Add noreturn attribute for thread.
3112 * Examples/ex10.c: Likewise.
3113 * Examples/ex13.c (thread_start): Likewise.
3114 * Examples/ex15.c (worker): Likewise.
3116 * Examples/ex18.c: Include unistd.h for prototype of sleep.
3118 2001-12-14 Ulrich Drepper <drepper@redhat.com>
3120 * man/pthread_atfork.man: Adjust description of mutex handling
3121 after fork for current implementation.
3122 * linuxthreads.texi: Likewise [PR libc/2519].
3124 2001-12-13 Andreas Schwab <schwab@suse.de>
3126 * specific.c (pthread_key_delete): Don't contact the thread
3127 manager if no threads have been created yet.
3129 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
3131 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3132 qualifier to be safe.
3134 2001-11-30 Andreas Schwab <schwab@suse.de>
3136 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3137 that self is the manager thread, and initialize the thread
3139 (thread_self_stack) [THREAD_SELF]: New function to find self via
3141 * manager.c (pthread_handle_create): Don't block cancel signal any
3144 2001-11-29 Andreas Jaeger <aj@suse.de>
3146 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3148 (INIT_THREAD_SELF): New.
3149 (THREAD_GETMEM): New.
3151 (THREAD_SETMEM): New.
3152 (THREAD_SETMEM_NC): New.
3153 (FLOATING_STACKS): Define.
3154 (ARCH_STACK_MAX_SIZE): Define.
3156 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
3158 Bugfix to pthread_key_delete. It was iterating over the thread
3159 manager's linked list of threads, behind the thread manager's
3160 back causing a race. The fix is to have the manager iterate over
3161 the threads instead, using a new request type for doing so.
3162 * internals.h (struct pthread_request): New manager request type
3163 REQ_FOR_EACH_THREAD.
3164 * manager.c (pthread_for_each_thread): New function.
3165 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3166 * specific.c (struct pthread_key_delete_helper_args): New type.
3167 (pthread_key_delete_helper): New static function.
3168 (pthread_key_delete): Use the new thread manager
3169 REQ_FOR_EACH_THREAD function to iterate over the threads and set
3170 the delete key slot to a null value in each thread.
3171 * Examples/ex18.c: New test.
3172 * Makefile (tests): Add ex18.
3174 2001-11-22 Wolfram Gloger <wg@malloc.de>
3176 * pthread.c (pthread_onexit_process): Don't call free
3177 after threads have been asynchronously terminated.
3179 * manager.c (pthread_handle_exit): Surround cancellation
3180 of threads with __flockfilelist()/__funlockfilelist().
3182 2001-11-26 Andreas Schwab <schwab@suse.de>
3184 * manager.c (pthread_handle_create): Start the child thread with
3185 the cancel signal blocked, so that it does not handle it before
3186 the thread register is set up. Save errno from failed clone call.
3188 2001-11-15 Ulrich Drepper <drepper@redhat.com>
3190 * sysdeps/i386/i686/Implies: Removed.
3191 * sysdeps/i386/i686/Versions: New file.
3193 2001-10-31 Andreas Jaeger <aj@suse.de>
3195 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3197 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
3199 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3200 to __linuxthreads_pthread_sizeof_descr to match name used by
3201 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3202 linuxthreads_db/td_symbol_list.c.
3204 2001-09-22 Andreas Jaeger <aj@suse.de>
3206 * linuxthreads/tst-context.c: Avoid compile warning.
3208 2001-09-20 Andreas Jaeger <aj@suse.de>
3210 * shlib-versions: Add x86-64.
3212 2001-09-19 Andreas Jaeger <aj@suse.de>
3214 * sysdeps/x86_64/Makefile: New file.
3215 * sysdeps/x86_64/pspinlock.c: New file.
3216 * sysdeps/x86_64/pt-machine.h: New file.
3218 2001-09-12 Jakub Jelinek <jakub@redhat.com>
3220 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3222 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3224 2001-09-11 Ulrich Drepper <drepper@redhat.com>
3225 Wolfram Gloger <wg@malloc.de>
3227 * join.c: Protect all communications from and to manager with
3229 * manager.c: Likewise.
3230 * pthread.c: Likewise.
3231 * smeaphore.c: Likewise.
3233 2001-08-29 Ulrich Drepper <drepper@redhat.com>
3235 * spinlock.c (__pthread_lock): Top max_count value with
3236 MAX_ADAPTIVE_SPIN_COUNT.
3237 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3239 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3242 2001-08-27 Jakub Jelinek <jakub@redhat.com>
3244 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3245 non-opaque type if __USE_UNIX98.
3247 2001-08-26 Jakub Jelinek <jakub@redhat.com>
3249 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3250 non-opaque lock types also if _IO_MTSAFE_IO is defined.
3252 2001-08-23 Roland McGrath <roland@frob.com>
3254 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3255 new first argument, skip the cleanup handler if it's zero.
3256 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3257 (__libc_lock_define_initialized_recursive): Use it.
3258 * sysdeps/pthread/bits/stdio-lock.h: File removed.
3259 The sysdeps/generic file from the main tree now suffices.
3261 2001-08-22 Roland McGrath <roland@frob.com>
3263 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3264 instead of <pthread.h>.
3265 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3266 (_IO_lock_initializer): Add braces.
3267 (_IO_lock_lock): Use __libc_lock_lock_recursive.
3268 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3270 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3271 (__libc_lock_define_initialized_recursive): Use it.
3272 (__libc_lock_init_recursive): Likewise.
3273 (__libc_lock_fini_recursive): Likewise.
3274 (__libc_lock_lock_recursive): Likewise.
3275 (__libc_lock_trylock_recursive): Likewise.
3276 (__libc_lock_unlock_recursive): Likewise.
3277 (__libc_lock_define_recursive): New macro.
3279 2001-08-14 Jakub Jelinek <jakub@redhat.com>
3281 * lockfile.c (__pthread_provide_lockfile): New variable.
3282 * pthread.c (__pthread_require_lockfile): New variable.
3283 * cancel.c (__pthread_require_lockfile): New variable.
3285 2001-07-31 Ulrich Drepper <drepper@redhat.com>
3287 * tst-context.c (threadfct): Initialize context before calling
3290 * Examples/ex17.c: Make sure test thread is around long enough.
3292 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
3294 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3296 2001-07-24 Ulrich Drepper <drepper@redhat.com>
3298 * tst-context.c (main): Print explanation before bailing out
3299 because context handling is not supported.
3301 2001-07-23 Ulrich Drepper <drepper@redhat.com>
3303 * Makefile (tests): Add tst-context.
3304 * tst-context.c: New file.
3306 * sysdeps/pthread/bits/stdio-lock.h: Define
3307 _IO_cleanup_region_start_noarg.
3309 2001-07-23 Jakub Jelinek <jakub@redhat.com>
3311 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3312 (ARCH_STACK_MAX_SIZE): Define.
3313 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3314 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3316 2001-07-19 Jakub Jelinek <jakub@redhat.com>
3318 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3320 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3321 (ARCH_STACK_MAX_SIZE): Define.
3322 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3323 NEED_SEPARATE_REGISTER_STACK.
3325 2001-07-16 Andreas Schwab <schwab@suse.de>
3327 * Makefile (before-compile): Don't add $(objpfx)crti.o.
3328 (omit-deps): Add crti.
3329 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3330 it is filtered out of the link command.
3332 2001-07-16 Ulrich Drepper <drepper@redhat.com>
3334 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3335 to find the right value for __pthread_initial_thread_bos, it's not
3336 used. If not FLOATING_STACKS first run
3337 __pthread_init_max_stacksize.
3339 2001-06-16 H.J. Lu <hjl@gnu.org>
3341 * internals.h: Include <stackinfo.h>.
3343 * attr.c: Don't include <stackinfo.h> here.
3344 * cancel.c: Likewise.
3345 * manager.c: Likewise.
3346 * pthread.c: Likewise.
3347 * ptlongjmp.c: Likewise.
3349 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
3351 * attr.c: Make _STACK_GROWS_UP work.
3352 * internals.h: Likewise.
3353 * manager.c: Likewise.
3354 * pthread.c: Likewise.
3356 2001-06-15 H.J. Lu <hjl@gnu.org>
3358 * pthread.c (__pthread_reset_main_thread): Fix a typo.
3360 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
3362 * semaphore.h: Use struct _pthread_fastlock as an element of
3363 sem_t instead of an identical struct.
3364 * rwlock.c: Remove casts.
3365 * semaphore.c: Likewise.
3367 2001-04-30 Alan Modra <amodra@one.net.au>
3369 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3371 2001-05-25 Bruce Mitchener <bruce@cubik.org>
3373 * linuxthreads.texi: Spelling corrections.
3375 2001-05-25 Ulrich Drepper <drepper@redhat.com>
3377 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3378 returning successfully.
3379 Patch by Gene Cooperman <gene@ccs.neu.edu>.
3381 2001-05-24 Ulrich Drepper <drepper@redhat.com>
3383 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3384 serious work try once whether the lock is uncontested.
3385 Remove duplicate reading of __status before loop.
3386 Change suggested by Hans Boehm <hans_boehm@hp.com>.
3388 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3389 (__pthread_alt_trylock): Likewise.
3391 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
3393 Memory barrier overhaul following line by line inspection.
3394 * mutex.c (pthread_once): Missing memory barriers added.
3395 * pthread.c (__pthread_wait_for_restart_signal,
3396 __pthread_timedsuspend_new, __pthread_restart_new): Added
3397 memory barriers ``just in case'' and for documentary value.
3398 * spinlock.c (__pthread_release): New inline function for releasing
3399 spinlock, to complement __pthread_acquire. Includes memory
3400 barrier prior to assignment to spinlock, and __asm __volatile
3401 dance to prevent reordering or optimization of the spinlock access.
3402 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3403 __pthread_alt_timedlock, __pthread_alt_unlock,
3404 __pthread_compare_and_swap): Updated to use new __pthread_release
3405 instead of updating spinlock directly.
3406 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3407 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3408 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3409 Memory barrier overhaul. Lots of missing memory barriers added,
3410 a couple needless ones removed.
3411 * spinlock.c (__pthread_compare_and_swap): testandset optimization
3412 removed, just calls __pthread_acquire, which has the new read
3413 barrier in it before its testandset.
3415 2001-05-20 Roland McGrath <roland@frob.com>
3417 * Makeconfig: New file, variables used to be in main libc Makeconfig.
3419 2001-05-09 Geoff Keating <geoffk@redhat.com>
3421 * sysdeps/powerpc/pt-machine.h
3422 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3423 (__compare_and_swap): Remove memory barriers.
3424 (__compare_and_swap_with_release_semantics): New function.
3426 2001-04-24 Andreas Jaeger <aj@suse.de>
3428 * wrapsyscall.c: send* and recv* return ssize_t.
3430 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3431 mutex instead of double locking it.
3432 Reported by Pierre Artaud <partaud@sodatec.com>.
3434 2001-04-23 Ulrich Drepper <drepper@redhat.com>
3436 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3437 using #ifdef whether the clock is available.
3438 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3440 * sysdeps/ia64/Versions: New file.
3442 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3443 have to call __gmon_start__ in the libpthread DSO.
3444 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3446 * Makefile (libpthread-routines): Add ptclock_gettime and
3448 * internals.h: Don't use cpuclock-init.h definitions, use
3449 hp-timing.h definitions.
3450 * pthread.c: Likewise.
3451 * manager.c: Likewise.
3452 * ptclock_gettime.c: New file.
3453 * ptclock_settime.c: New file.
3454 * internals.h: Fix parameter type for __pthread_clock_gettime and
3455 __pthread_clock_settime.
3457 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3458 * sysdeps/i386/i586/ptclock_settime.c: Removed.
3459 * sysdeps/i386/i586/Makefile: Removed.
3461 2001-04-22 Ulrich Drepper <drepper@redhat.com>
3463 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3464 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3466 2001-04-21 Andreas Jaeger <aj@suse.de>
3468 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3469 attribute, remove statements that will never be executed.
3470 (thread_func): Remove mutex_unlock call since it's never executed.
3471 (thread_func): Fix comment as suggested by Jakub Jelinek.
3473 * manager.c (__pthread_manager): Add noreturn
3475 (pthread_start_thread): Likewise, remove return statement.
3476 (pthread_start_thread_event): Likewise.
3477 Add noreturn attribute for pthread_handle_exit.
3478 * weaks.c: Add noreturn attribute for pthread_exit.
3480 * internals.h: Add __pthread_clock_gettime and
3481 __pthread_clock_settime prototypes.
3483 2001-04-21 Ulrich Drepper <drepper@redhat.com>
3485 * internals.h: Include <cpuclock-init.h>.
3486 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3487 CPUCLOCK_VARDEF is defined.
3488 * pthread.c (__pthread_initialize_minimal): Initialize
3489 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3490 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3491 for new thread to current CPU clock value.
3493 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3495 * sysdeps/i386/i586/Makefile: New file.
3496 * sysdeps/i386/i586/Versions: New file.
3497 * sysdeps/i386/i586/ptclock_gettime.c: New file.
3498 * sysdeps/i386/i586/ptclock_settime.c: New file.
3499 * sysdeps/i386/i686/Implies: New file.
3501 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3503 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3504 $generated, not $postclean-generated.
3506 2001-04-18 Andreas Jaeger <aj@suse.de>
3508 * Makefile (otherlibs): Added.
3510 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3512 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3514 2001-04-16 Ulrich Drepper <drepper@redhat.com>
3516 * signals.c (sigwait): NSIG is no signal number. Block all
3517 signals while in signal handler for signals in SET.
3518 Patch by Manfred Spraul <manfred@colorfullife.com>.
3520 2001-04-12 Ulrich Drepper <drepper@redhat.com>
3522 * tst-cancel.c: Disable most tests. Add new test where all
3523 cleanup handlers must run.
3524 * Makefile (tests): Add tst-cancel again.
3526 * cancel.c (__pthread_perform_cleanup): Correct condition for
3527 leaving cleanup loop early.
3529 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3530 all the files which use CURRENT_STACK_FRAME.
3531 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3532 __builtin_frame_address.
3533 * sysdeps/i386/i686/pt-machine.h: Likewise.
3535 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3537 * Makefile (tests): Comment out tst-cancel for now.
3539 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
3540 temporary file in object directory.
3541 * Makefile: Don't allow inlining when compiling tst-cancel.c.
3542 Pass $(objpfx) to tst-cancel.
3544 2001-04-11 David S. Miller <davem@redhat.com>
3546 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3547 up closer to user local variables so that new cleanup heuristics work.
3548 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3550 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3552 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3554 (_pthread_cleanup_push_defer): Likewise.
3556 * tst-cancel.c (main): Fix loop printing cleanup output.
3558 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
3560 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3562 (__pthread_spin_trylock): Likewise.
3563 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3565 2001-04-10 Ulrich Drepper <drepper@redhat.com>
3567 * join.c (pthread_exit): Move code to new function __pthread_do_exit
3568 which takes an extra parameter with the current frame pointer.
3569 Call new function with CURRENT_STACK_FRAME.
3570 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
3571 with the new parameter.
3572 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3573 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
3574 this parameter as the initial value the cleanup handler records are
3575 compared against. No active cleanup handler record must have an
3576 address lower than the previous one and the initial record must be
3577 above (below on PA) the frame address passed in.
3578 (pthread_setcancelstate): Call __pthread_do_exit instead of
3580 (pthread_setcanceltype): Likewise.
3581 (pthread_testcancel): Likewise.
3582 (_pthread_cleanup_pop_restore): Likewise.
3583 * condvar.c (pthread_cond_wait): Likewise.
3584 (pthread_cond_timedwait_relative): Likewise.
3585 * manager.c (pthread_start_thread): Likewise.
3586 * oldsemaphore.c (__old_sem_wait): Likewise.
3587 * pthread.c (pthread_handle_sigcancel): Likewise.
3588 * semaphore.c (__new_sem_wait): Likewise.
3589 (sem_timedwait): Likewise.
3590 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3591 to limit the cleanup handlers which get run.
3592 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
3593 for __pthread_perform_cleanup.
3595 * Makefile (tests): Add tst-cancel.
3596 * tst-cancel.c: New file.
3598 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
3600 * sysdeps/cris/pt-machine.h: New file.
3601 * sysdeps/cris/pspinlock.c: New file.
3603 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3605 * shlib-versions: Add case for Linux on CRIS.
3607 2001-03-26 Ulrich Drepper <drepper@redhat.com>
3609 * attr.c (pthread_getattr_np): Correct computation of stack size
3610 for machiens with register stack.
3612 * Examples/ex17.c (main): Correct detection of failed mmap call.
3614 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3616 * pthread.c (__pthread_initialize_manager): Fix a typo.
3618 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3620 * attr.c (__pthread_attr_setstack): Fix alignment check.
3621 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3622 * Makefile (tests): Add ex17 test.
3623 * Examples/ex17.c: New test.
3625 2001-03-20 Ulrich Drepper <drepper@redhat.com>
3627 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3628 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3629 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3631 2001-03-18 Ulrich Drepper <drepper@redhat.com>
3633 * Makefile: When generating DSO link with libc_nonshared.a.
3635 2001-02-26 Jakub Jelinek <jakub@redhat.com>
3637 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3639 2001-02-23 Jakub Jelinek <jakub@redhat.com>
3641 * internals.h (__pthread_init_max_stacksize): New prototype.
3642 * attr.c (__pthread_attr_setstacksize): Call
3643 __pthread_init_max_stacksize if not yet initialized.
3644 * pthread.c (__pthread_init_max_stacksize): New function.
3645 (__pthread_initialize_manager): Call it.
3646 Patch by <dtc@cmucl.cons.org>.
3648 2001-03-16 Ulrich Drepper <drepper@redhat.com>
3650 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3652 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3654 * shlib-versions: Add rule for Linux on 64 bit S/390.
3655 * sysdeps/s390/s390-64/pt-machine.h: New file.
3656 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3658 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3660 * sysdeps/s390/pt-machine.h: Move to...
3661 * sysdeps/s390/s390-32/pt-machine.h: ...here.
3662 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3664 2001-03-15 Ulrich Drepper <drepper@redhat.com>
3666 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3667 * attr.c: Implement pthread_getattr_np.
3668 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3669 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3670 * manager.c (pthread_handle_create): Initialize p_inheritsched.
3672 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3674 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3677 2001-02-20 Hans Boehm <hans_boehm@hp.com>
3679 * manager.c (manager_mask): Removed static vesion. Now always local
3680 to __pthread_manager().
3681 (manager_mask_all): Removed completely.
3682 (__pthread_manager): Remove manager_mask_all initialization.
3683 (pthread_handle_create): Remove code to set and reset signal mask
3684 around __clone2() calls.
3686 2001-02-17 Jakub Jelinek <jakub@redhat.com>
3688 * spinlock.c (__pthread_lock): Force lock->__status to be read from
3689 memory on every spin.
3691 2001-02-10 Andreas Jaeger <aj@suse.de>
3693 * Makefile (extra-objs): New.
3695 2001-02-09 Jakub Jelinek <jakub@redhat.com>
3697 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3698 __pthread_initialize_minimal prototype.
3700 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
3702 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3704 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
3706 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3708 2001-02-06 Ulrich Drepper <drepper@redhat.com>
3710 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3711 broken code. Patch by Jes Sorensen.
3713 2001-02-06 Andreas Jaeger <aj@suse.de>
3715 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3717 * internals.h: ...here.
3719 2001-02-05 Jes Sorensen <jes@linuxcare.com>
3721 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3723 2001-02-02 Ulrich Drepper <drepper@redhat.com>
3725 * Versions: Remove __pthread_initialize_minimal.
3727 2001-02-01 Ulrich Drepper <drepper@redhat.com>
3729 * Makefile: Add rules to build crti.o and make it being used in
3730 building libpthread.so.
3731 * sysdeps/i386/Makefile: New file.
3732 * sysdeps/pthread/pt-initfini.c: New file.
3734 * pthread.c: Cleanups.
3736 2001-01-28 Andreas Jaeger <aj@suse.de>
3738 * oldsemaphore.c (__old_sem_init): Adjust for last change.
3739 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3740 * spinlock.c: Likewise.
3742 2001-01-28 Ulrich Drepper <drepper@redhat.com>
3744 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3745 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3746 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3747 * pthread.c: Likewise.
3748 * spinlock.h: Likewise.
3749 * sysdeps/pthread/pthread.h: Likewise.
3751 2001-01-26 Ulrich Drepper <drepper@redhat.com>
3753 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3754 as struct __pthread_attr_s.
3756 * semaphore.h (sem_t): Cleanup namespace, rename status and
3759 2001-01-13 Jakub Jelinek <jakub@redhat.com>
3761 * pthread.c (pthread_onexit_process): Clear
3762 __pthread_manager_thread_bos after freeing it.
3763 * Makefile (tests): Add ex16.
3764 * Examples/ex16.c: New file.
3766 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3768 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3770 * pthread.c (pthread_exit_process): Rename to...
3771 (pthread_onexit_process): ...this.
3772 (pthread_atexit_process, pthread_atexit_retcode): New.
3773 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3774 and only if HAVE_Z_NODELETE is not defined.
3775 (__pthread_initialize_manager): Register pthread_atexit_retcode
3778 2001-01-11 Ulrich Drepper <drepper@redhat.com>
3780 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3782 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3784 * Makefile (tests): Add ex15.
3785 * Examples/ex15.c: New test.
3787 2001-01-08 Ulrich Drepper <drepper@redhat.com>
3789 * pthread.c (pthread_exit_process): Free memory allocated for
3792 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3794 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3795 (pthread_free): Always unmap the stack. It's safe now that we don't
3796 use MAP_FIXED to allocate stacks.
3798 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3800 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3802 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3804 2000-11-15 Wolfram Gloger <wg@malloc.de>
3806 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3807 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3809 2000-12-27 Andreas Jaeger <aj@suse.de>
3811 * Examples/ex13.c: Make local functions static.
3812 * ecmutex.c: Likewise.
3813 * joinrace.c: Likewise.
3814 * Examples/ex14.c: Likewise.
3816 * Examples/ex2.c: Make local functions static; reformat.
3817 * Examples/ex1.c: Likewise.
3818 * Examples/ex4.c: Likewise.
3819 * Examples/ex5.c: Likewise.
3820 * Examples/ex7.c: Likewise.
3822 * oldsemaphore.c: Add prototypes to shut up GCC.
3823 * pt-machine.c: Likewise.
3825 * weaks.c: Add prototype for pthread_exit.
3827 * internals.h: Add some prototypes, format prototypes and add
3829 Move __libc_waitpid prototype to include/sys/wait.h.
3831 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3832 * mutex.c: Likewise.
3833 * specific.c: Likewise.
3834 * ptfork.c: Likewise.
3836 * lockfile.c: Include internals.h to get prototypes.
3837 * events.c: Likewise.
3838 * sysdeps/alpha/pspinlock.c: Likewise.
3839 * sysdeps/arm/pspinlock.c: Likewise.
3840 * sysdeps/hppa/pspinlock.c: Likewise.
3841 * sysdeps/i386/pspinlock.c: Likewise.
3842 * sysdeps/ia64/pspinlock.c: Likewise.
3843 * sysdeps/m68k/pspinlock.c: Likewise.
3844 * sysdeps/mips/pspinlock.c: Likewise.
3845 * sysdeps/powerpc/pspinlock.c: Likewise.
3846 * sysdeps/s390/pspinlock.c: Likewise.
3847 * sysdeps/sh/pspinlock.c: Likewise.
3848 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3849 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3850 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3852 2000-12-27 Ulrich Drepper <drepper@redhat.com>
3854 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3855 (__pthread_attr_getstack): Return correct address.
3856 Add warnings for using pthread_attr_getstackaddr and
3857 pthread_attr_setstackaddr.
3859 2000-12-26 Ulrich Drepper <drepper@redhat.com>
3861 * Examples/ex6.c (test_thread): Make static.
3862 * Examples/ex12.c (test_thread): Make static and add noreturn
3865 2000-12-18 Jes Sorensen <jes@linuxcare.com>
3867 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3868 and compare_and_swap_with_release_semantics returns int not long.
3870 2000-12-17 Andreas Jaeger <aj@suse.de>
3872 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3874 * sysdeps/arm/pt-machine.h (testandset): Likewise.
3875 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3876 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3877 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3878 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3879 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3881 2000-12-17 Ulrich Drepper <drepper@redhat.com>
3883 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3884 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3886 2000-12-17 Andreas Jaeger <aj@suse.de>
3888 * internals.h: Add prototypes for testandset and
3889 __compare_and_swap to shut up gcc warnings.
3891 2000-12-06 Wolfram Gloger <wg@malloc.de>
3893 * join.c (pthread_detach): Allow case where the thread has already
3896 2000-12-05 Andreas Jaeger <aj@suse.de>
3898 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3899 * sysdeps/mips/pt-machine.h (testandset): Likewise.
3900 (__compare_and_swap): Likewise.
3901 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3903 2000-11-20 Jakub Jelinek <jakub@redhat.com>
3905 * Examples/ex3.c (main): Cast int to long before casting to void *.
3906 (search): Cast void * to long, not int.
3907 * Examples/ex8.c (main, thread): Similarly.
3908 * Examples/ex11.c (main): Similarly.
3909 * Examples/ex14.c (worker, do_test): Similarly.
3910 * ecmutex.c (worker, do_test): Similarly.
3911 (nlocks): Cast to int.
3913 2000-11-08 Bruce Mitchener <bruce@cubik.org>
3915 * linuxthreads.texi: Add documentation for pthreads attributes
3916 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
3917 patch. Document pthread_[sg]etconcurrency(). Mark
3918 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3920 2000-11-07 Ulrich Drepper <drepper@redhat.com>
3922 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3924 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3925 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3927 2000-11-06 Ulrich Drepper <drepper@redhat.com>
3929 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3930 not doing it right now.
3931 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3933 2000-10-30 Ulrich Drepper <drepper@redhat.com>
3935 * Examples/ex4.c (main): Don't use exit() to avoid warning with
3938 2000-10-29 Ulrich Drepper <drepper@redhat.com>
3940 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3941 here. Reported by Bruce Mitchener <bruce@cubik.org>.
3943 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3944 discussing mutexes. (As per the Unix98 name for the API.)
3945 Changes documentation for pthread_mutexattr_setkind_np() and
3946 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3947 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3948 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3949 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3950 Begins to introduce discussion of the ``timed'' mutex type. This
3951 discussion is currently incomplete.
3952 Patch by Bruce Mitchener <bruce@cubik.org>.
3954 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3955 Yutaka Niibe <gniibe@chroot.org>
3957 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3958 has restrictions, use register.
3960 2000-10-23 Andreas Schwab <schwab@suse.de>
3962 * Examples/ex14.c (TIMEOUT): Override default timeout.
3964 2000-10-16 Ulrich Drepper <drepper@redhat.com>
3966 * specific.c: Protect tsd array modification in thread data
3967 structures by getting the thread lock in pthread_key_delete and
3968 __pthread_destroy_specifics.
3969 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3971 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3973 * sysdeps/pthread/bits/initspin.h: New file.
3974 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3975 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3976 (__pthread_alt_init_lock): Likewise.
3977 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3979 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3981 * oldsemaphore.c (__old_sem_init): Release lock with
3982 LT_SPINLOCK_INIT, not zero.
3983 * spinlock.c (__pthread_unlock): Likewise.
3984 (__pthread_alt_lock): Likewise.
3985 (__pthread_alt_timedlock): Likewise.
3986 (__pthread_alt_unlock): Likewise.
3987 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3988 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
3989 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
3990 LT_SPINLOCK_INIT do initialize spinlocks not 0.
3992 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3994 * shlib-versions: Add version definitions for hppa-linux.
3996 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3998 * sysdeps/hppa/pspinlock.c: New file.
3999 * sysdeps/hppa/pt-machine.h: New file.
4000 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
4002 2000-10-05 Jakub Jelinek <jakub@redhat.com>
4004 * mutex.c (__pthread_mutex_destroy): Correct test of
4005 busy mutex for mutexes using alternate fastlocks.
4006 Patch by dtc@cmucl.cons.org.
4008 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
4010 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
4012 2000-09-28 Ulrich Drepper <drepper@redhat.com>
4014 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
4015 test for owner first.
4016 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4018 * cancel.c (pthread_cancel): Don't do anything if cancelation is
4021 2000-09-26 Ulrich Drepper <drepper@redhat.com>
4023 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
4024 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4026 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
4027 _POSIX_MONOTONIC_CLOCK.
4029 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
4032 2000-09-20 Andreas Jaeger <aj@suse.de>
4034 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
4035 "testrtsig.h" conditional.
4037 2000-09-11 Ulrich Drepper <drepper@redhat.com>
4039 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
4040 pthread_attr_setstack.
4041 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
4042 pthread_attr_setstack.
4043 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
4045 2000-09-05 Ulrich Drepper <drepper@redhat.com>
4047 * Examples/ex14.c: New file.
4048 * Makefile (tests): Add ex14.
4050 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
4051 mutex. Patch by dtc@cmucl.cons.org.
4053 * ecmutex.c: New file.
4054 * Makefile (tests): Add ecmutex.
4056 2000-09-04 H.J. Lu <hjl@gnu.org>
4058 * attr.c (__pthread_attr_setguardsize): Use page_roundup
4059 instead of roundup to round up to the page size.
4061 2000-09-03 Mark Kettenis <kettenis@gnu.org>
4063 * manager.c (pthread_exited): Correctly report event as TD_REAP
4064 instead of TD_DEATH. Fix comments.
4066 2000-09-03 Ulrich Drepper <drepper@redhat.com>
4068 * spinlock.h (testandset): Add cast to avoid warning.
4069 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
4071 2000-09-02 Andreas Jaeger <aj@suse.de>
4073 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
4076 2000-09-01 Ulrich Drepper <drepper@redhat.com>
4078 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4079 Fix typo in last patch (_mode -> _flags).
4081 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4082 Provide definition which respects _IO_USER_LOCK flag.
4084 2000-08-30 Ulrich Drepper <drepper@redhat.com>
4086 * manager.c (pthread_allocate_stack): Clear descriptor only if not
4089 2000-08-25 Ulrich Drepper <drepper@redhat.com>
4091 * Makefile: Add rules to build and run unload.
4092 * unload.c: New file.
4094 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
4096 * sysdeps/pthread/pthread.h
4097 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
4098 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
4100 2000-08-24 Andreas Jaeger <aj@suse.de>
4102 * Examples/ex13.c: Include <string.h> for strerror prototype and
4103 <stdlib.h> for abort prototype.
4104 (pthr_cond_signal_mutex): Rewrite to silence GCC.
4105 (thread_start): Remove unused variable err.
4106 (main): Silence GCC warnings.
4108 2000-08-22 Andreas Jaeger <aj@suse.de>
4110 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
4112 * Makefile (tests): Add ex13.
4114 2000-08-20 Ulrich Drepper <drepper@redhat.com>
4116 * semaphore.h: Add restrict where required by AGd4.
4117 * sysdeps/pthread/pthread.h: Likewise.
4118 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4120 2000-08-15 Ulrich Drepper <drepper@redhat.com>
4122 * Makefile (tests): Add ex12. Add rule to build it.
4123 * Examples/ex12.c: New file.
4125 2000-08-13 Ulrich Drepper <drepper@redhat.com>
4127 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4128 even though the implementation is not quite complete (but it reports
4129 it). Define _POSIX_MESSAGE_PASSING to -1.
4130 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4132 2000-08-12 Andreas Jaeger <aj@suse.de>
4134 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4136 (__compare_and_swap): Likewise.
4137 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4139 2000-08-10 Ulrich Drepper <drepper@redhat.com>
4141 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4142 p_h_errnop correctly and not to NULL.
4144 2000-08-05 Ulrich Drepper <drepper@redhat.com>
4146 * Banner: Bump version number to 0.9.
4148 2000-08-04 Ulrich Drepper <drepper@redhat.com>
4150 * Makefile (tests): Add tststack. Add rule to build the program.
4151 * tststack.c: New file.
4153 * internals.h: Declare __pthread_max_stacksize.
4154 * pthread.c (__pthread_max_stacksize): New variable.
4155 (__pthread_initialize_manager): Determine __pthread_initialize_manager
4157 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4158 (pthread_allocate_stack): Allow kernel to choose stack address if
4159 FLOATING_STACKS. This also handles variable-sized stacks.
4160 Always allocate stack and guardpage together. Use mprotect to
4161 change guardpage access.
4162 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4163 ARCH_STACK_MAX_SIZE.
4165 * attr.c (__pthread_attr_setstacksize): Also test value against
4168 * manager.c (__pthread_nonstandard_stacks): Define only if
4169 THREAD_SELF is not defined.
4170 (pthread_allocate_stack): Always initialize gardaddr to a correct
4172 (pthread_handle_create): Unmap thread with one call.
4173 (pthread_free): Remove test for initial thread before removing stack.
4174 Unmap stack with one call.
4176 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4177 1 to avoid removing the stack.
4179 2000-07-27 Jes Sorensen <jes@linuxcare.com>
4181 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4182 load of spin lock to prime the cache before the atomic compare and
4183 exchange operation (cmpxchg4). This avoids the spinning on the
4184 cmpxchg4 instruction and reduces movement of the cache line back
4185 and forth between the processors (explanation by Asis K. Mallick
4186 from Intel). This basically makes the implementation operate the
4187 same as the Linux kernel implementation.
4189 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4190 * sysdeps/ia64/pspinlock.c: New file.
4192 2000-08-03 Ulrich Drepper <drepper@redhat.com>
4194 * pthread.c: Move definition of __pthread_set_own_extricate_if...
4195 * spinlock.h: ...here. Remove locking.
4196 * internals.h: Remove __pthread_set_own_extricate_if prototype.
4198 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4199 (rwlock_rd_extricate_func): Don't determine self, let
4200 __pthread_lock do it.
4201 (rwlock_wr_extricate_func): Likewise.
4202 (rwlock_have_already): Optimize *pself handling a bit.
4204 * mutex.c: Use __builtin_expect.
4205 * pthread.c: Likewise.
4207 2000-08-02 Andreas Jaeger <aj@suse.de>
4209 * sysdeps/s390/pspinlock.c: New file.
4210 * sysdeps/s390/pt-machine.h: New file.
4211 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4213 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4215 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4217 * sysdeps/mips/pt-machine.h (testandset): Likewise.
4219 2000-07-26 Andreas Jaeger <aj@suse.de>
4221 * pthread.c: Initialize p_sem_avail.
4223 2000-07-25 Ulrich Drepper <drepper@redhat.com>
4225 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4226 * semaphore.c: Handle spurious wakeups.
4228 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4229 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4231 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4232 (__pthread_wait_for_restart): Likewise.
4234 * condvar.c (pthread_cond_wait): Also check whether thread is
4235 cancelable before aborting loop.
4236 (pthread_cond_timedwait): Likewise.
4238 * signals.c (pthread_sighandler): Remove special code to restrore
4240 (pthread_sighandler_t): Likewise.
4242 2000-07-25 Mark Kettenis <kettenis@gnu.org>
4244 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4245 * pthread.c: Include <resolv.h>.
4246 (_res): Undefine. Add extern declaration.
4248 2000-07-24 Ulrich Drepper <drepper@redhat.com>
4250 * pthread.c (__pthread_initial_thread): Update initializer.
4251 (__pthread_manager_thread): Likewise.
4252 (pthread_initialize): Move setrlimit call to...
4253 (__pthread_initialize_manager): ...here.
4254 (__pthread_reset_main_thread): Reset also soft limit on stack size.
4256 * condvar.c: Handle spurious wakeups. [PR libc/1749].
4257 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4259 2000-07-21 Ulrich Drepper <drepper@redhat.com>
4261 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4262 __compare_and_swap to define testandset.
4263 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4264 Define IMPLEMENT_TAS_WITH_CAS.
4266 2000-07-20 Ulrich Drepper <drepper@redhat.com>
4268 * Makefile: Pass -z nodelete to linker for libpthread.so
4269 generation if it understand this option.
4271 2000-07-18 Mark Kettenis <kettenis@gnu.org>
4273 * manager.c (pthread_handle_create): Remove initialization of
4274 new_thread->p_res._sock.
4276 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
4278 Bugfixes to the variant of the code for machines with no compare
4281 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4282 node was not being properly enqueued, due to failing to update
4283 the lock->__status field.
4285 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4286 being set inappropriately, causing the suspend function to be called
4287 with a null self pointer and crash.
4289 2000-07-18 Ulrich Drepper <drepper@redhat.com>
4291 * spinlock.h (__pthread_alt_trylock): Fix code used if no
4292 compare&swap is available.
4294 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4297 * pthread.c (pthread_initialize): Don't use sysconf to determine
4298 whether the machine has more than one processor.
4300 * spinlock.c (__pthread_alt_timedlock): Add back one of the
4301 removed thread_self calls.
4303 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4305 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4306 __compare_and_swap to compare_and_swap in code which assumes
4307 compare swap is available.
4309 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4311 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4312 bug whereby thr field of waitnode structure would not be correctly
4313 set unless a null self pointer is passed to the functions.
4314 Eliminated redundant calls to thread_self().
4316 2000-07-18 Jakub Jelinek <jakub@redhat.com>
4318 * pthread.c (__pthread_initialize_manager): Lock
4319 __pthread_manager_thread.p_lock before calling clone.
4321 2000-05-05 H.J. Lu <hjl@gnu.org>
4323 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4324 have acquire semantics.
4325 (__compare_and_swap_with_release_semantics): New inline
4327 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4329 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
4331 * manager.c: Fix the problem with signals at startup.
4332 Change the way that thread stacks are allocated on IA64.
4333 Clean up some of the guard page allocation stuff.
4335 1999-12-19 H.J. Lu <hjl@gnu.org>
4337 * internals.h (page_roundup): New.
4338 * attr.c (__pthread_attr_setguardsize); Use page_roundup
4340 * manager.c (pthread_allocate_stack): Make sure guardaddr is
4341 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4344 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
4346 * manager.c (pthread_allocate_stack): Unmap the stack top
4347 if failed to map the stack bottom.
4349 (pthread_free): Fix the guard page.
4351 * pthread.c (pthread_initialize): Set rlimit correctly for
4352 NEED_SEPARATE_REGISTER_STACK.
4354 1999-12-16 H.J. Lu <hjl@gnu.org>
4356 * pthread.c (__pthread_initialize_manager): Pass
4357 __pthread_manager_thread_bos instead of
4358 __pthread_manager_thread_tos to __clone2.
4360 1999-12-16 H.J. Lu <hjl@gnu.org>
4362 * manager.c (pthread_allocate_stack): Correct the calculation
4363 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4366 1999-12-13 H.J. Lu <hjl@gnu.org>
4368 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4369 bit after setting ar.ccv.
4371 1999-12-12 H.J. Lu <hjl@gnu.org>
4373 * manager.c (pthread_allocate_stack): Make the starting
4374 address of the stack bottom page aligned. FIXME: it may
4375 need changes in other places.
4376 (pthread_handle_create): Likewise.
4378 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
4380 * manager.c (pthread_allocate_stack): Handle
4381 NEED_SEPARATE_REGISTER_STACK.
4382 (pthread_handle_create): Likewise.
4383 * pthread.c (__pthread_initialize_manager): Likewise.
4385 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4387 1999-12-02 H.J. Lu <hjl@gnu.org>
4389 * sysdeps/ia64/pt-machine.h: New.
4391 2000-07-13 Ulrich Drepper <drepper@redhat.com>
4393 * wrapsyscall.c: Mark non-__ protected names as weak.
4396 2000-07-12 Bruno Haible <haible@clisp.cons.org>
4398 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4400 2000-07-12 Ulrich Drepper <drepper@redhat.com>
4402 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4403 Add tests also to new alternative spinlock implementation.
4404 * spinlock.h: Likewise.
4405 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4407 2000-07-06 Ulrich Drepper <drepper@redhat.com>
4409 * Version: Export __sigaction.
4410 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
4412 * pthread.c: Use __libc_sigaction instead of __sigaction.
4414 * condvar.c: Implement pthread_condattr_getpshared and
4415 pthread_condattr_setpshared.
4416 * mutex.c: Implement pthread_mutexattr_getpshared and
4417 pthread_mutexattr_setpshared.
4418 * Versions: Export new functions.
4419 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4421 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4422 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4425 2000-07-04 Greg McGary <greg@mcgary.org>
4427 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4428 pragmas. Include bp-sym.h only if _LIBC.
4430 2000-07-04 Ulrich Drepper <drepper@redhat.com>
4432 * spinlock.c (__pthread_unlock): Properly place write barrier.
4433 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4435 2000-07-03 Ulrich Drepper <drepper@redhat.com>
4437 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4438 faster on SMP systems. No more emulation of compare&swap for adaptive
4440 * spinlock.h: Likewise.
4441 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4442 Replace fast with adaptive mutex.
4443 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4444 * condvar.c: Likewise.
4445 * pthread.c: Define and initialize __pthread_smp_kernel variable.
4446 * internals.h: Declare __pthread_smp_kernel.
4447 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4448 _pthread_fastlock structure.
4449 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4451 * pthread.c: Remove initialization to zero from global variables.
4453 2000-06-29 Jakub Jelinek <jakub@redhat.com>
4455 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4457 2000-06-28 Greg McGary <greg@mcgary.org>
4459 * weaks.c: Wrap BP_SYM () around weak extern declarations of
4460 pthread functions that have pointers in their return+arg signatures.
4462 2000-06-27 Greg McGary <greg@mcgary.org>
4464 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4465 extern declarations of pthread functions that have pointers in
4466 their return+arg signatures.
4468 2000-06-26 Ulrich Drepper <drepper@redhat.com>
4470 * Makefile (tests): Add ex11. Add rules to build it.
4471 * Examples/ex11.c: New file.
4472 * rwlock.c: Fix complete braindamaged previous try to implement
4475 * spinlock.c: Pretty print.
4477 2000-06-25 Ulrich Drepper <drepper@redhat.com>
4479 * Makefile (tests): Add ex10. Add rules to build it.
4480 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4481 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4482 * condvar.c (pthread_cond_wait): Allow mutex of kind
4483 PTHREAD_MUTEX_TIMED_NP.
4484 (pthread_cond_timedwait_relative): Likewise.
4485 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4486 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4487 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4488 (__pthread_mutex_lock): Use __pthread_alt_lock for
4489 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4490 (__pthread_mutex_timedlock): New function.
4491 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4492 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4493 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4494 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4495 * spinlock.c: Implement alternate fastlocks.
4496 * spinlock.h: Add prototypes.
4497 * Examples/ex10.c: New file.
4498 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4499 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4501 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4502 (__pthread_rwlock_timedrdlock): New function.
4503 (__pthread_rwlock_timedwrlock): New function.
4504 Use laternate fastlock function everywhere.
4506 2000-06-21 Andreas Jaeger <aj@suse.de>
4508 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4511 * join.c: Include <stdlib.h> for exit prototype.
4513 2000-06-20 Ulrich Drepper <drepper@redhat.com>
4515 * sysdeps/i386/useldt.h: Include <stdlib.h>.
4517 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4518 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4520 * Makefile (libpthread-routines): Add barrier.
4521 (tests): Add ex9. Add rule to build ex9.
4522 * Versions: Export barrier functions.
4523 * barrier.c: New file.
4524 * Examples/ex9.c: New file.
4525 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4526 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4527 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4529 2000-06-19 H.J. Lu <hjl@gnu.org>
4531 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4532 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4533 (compare_and_swap_with_release_semantics): New. Default to
4534 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4537 * spinlock.c (__pthread_unlock): Call
4538 compare_and_swap_with_release_semantics () instead of
4539 compare_and_swap ().
4541 2000-06-19 Ulrich Drepper <drepper@redhat.com>
4543 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4545 * sysdeps/pthread/timer_delete.c: Likewise.
4546 * sysdeps/pthread/timer_getoverr.c: Likewise.
4547 * sysdeps/pthread/timer_gettime.c: Likewise.
4548 * sysdeps/pthread/timer_settime.c: Likewise.
4550 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4552 Timer nodes are now reference counted, and can be marked
4553 as deleted. This allows for the safe release of the global mutex
4554 in the middle without losing the timer being operated on.
4556 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
4557 member is now an enum with three values, so that an intermediate
4558 state can be represented (deleted but not free for reuse yet).
4559 New refcount member added.
4560 * sysdeps/pthread/timer_routines.c: Likewise.
4562 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4563 timer_valid): New inline functions added.
4565 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4566 restructured, recursive deadlock bug fixed.
4568 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4569 timer_addref to ensure that timer won't be deleted while mutex is not
4570 held. Also uses timer_invalid to perform validation of timer handle.
4571 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4572 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4574 2000-06-14 Ulrich Drepper <drepper@redhat.com>
4576 * shlib-versions: Add entry for SH.
4577 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4579 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4581 A few optimizations. Got rid of unnecessary wakeups of timer threads,
4582 tightened up some critical regions and micro-optimized some list
4585 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4586 Returns int value now to indicate whether timer was queued at head.
4587 * sysdeps/pthread/posix-timer.h: Likewise.
4588 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4589 new return value from __timer_thread_queue_timer to avoid waking
4590 up timer thread unnecessarily.
4592 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4593 inuse flag, because this requires mutex to be held. Callers updated
4594 to do the check when they have the mutex.
4595 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4597 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4598 regions: avoids making system calls while holding timer mutex, and
4599 a few computations were moved outside of the mutex as well.
4600 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4602 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4603 to list_unlink_ip, meaning idempotent. Pointer manipulation
4604 changed to get better better code out of gcc.
4605 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4606 version of list_unlink added here.
4607 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4608 function in all places: idempotent one for timers, non-idempotent
4609 one for thread nodes.
4610 * sysdeps/pthread/timer_settime: Likewise.
4611 * sysdeps/pthread/timer_routines.c: Likewise.
4613 2000-06-13 Ulrich Drepper <drepper@redhat.com>
4615 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4616 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4618 * sysdeps/pthread/Makefile: Remove tests definition.
4620 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
4621 Yutaka Niibe <gniibe@chroot.org>
4623 * sysdeps/sh/pspinlock.c: New file.
4624 * sysdeps/sh/pt-machine.h: New file.
4626 2000-06-12 Ulrich Drepper <drepper@redhat.com>
4628 * Makefile (tests): Add joinrace.
4630 * Examples/ex6.c: Test return value of pthread_join.
4632 2000-06-11 Geoff Keating <geoffk@cygnus.com>
4634 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4635 (__pthread_spin_trylock): Implement.
4636 (__pthread_spin_unlock): Implement.
4637 (__pthread_spin_init): Implement.
4638 (__pthread_spin_destroy): Implement.
4640 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4642 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4643 really append the entry.
4645 2000-06-10 Andreas Jaeger <aj@suse.de>
4647 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4649 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
4651 * sysdeps/pthread/timer_create.c: Thread matching now done on
4652 clock type as well as thread attributes.
4653 There are individual global signal-delivering threads for
4654 different clock types.
4655 * sysdeps/pthread/posix-timer.h: Likewise.
4656 * sysdeps/pthread/timer_routines.c: Likewise.
4658 * sysdeps/pthread/timer_routines.c: Thread allocation and
4659 deallocation function now remembers to put thread on active
4660 list and remove from active list.
4661 Thus now the feature of binding multiple timers
4662 to a single thread actually works.
4664 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4666 * pthread.c (__pthread_create_2_1): Optimize a bit.
4668 * internals.h (invalid_handle): Also test for p_terminated != 0.
4669 (nonexisting_handle): New function. Same as old invalid_handle.
4670 * join.c (pthread_join): Use nonexisting_handle instead of
4671 invalid_handle to test for acceptable thread handle.
4672 * manager.c (pthread_handle_free): Likewise.
4673 * joinrace.c: New file.
4674 Reported by Permaine Cheung <pcheung@cygnus.com>.
4676 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4678 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4679 Correct handling of matching variable.
4681 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4684 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4685 Be prepared for empty timer list.
4687 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4688 CPUTIME clock ID. Add support for thread clocks.
4690 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4691 subtraction were switched.
4693 * sysdeps/pthread/timer_routines.c (init_module): Use
4694 THREAD_MAXNODES threads.
4696 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4697 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4698 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4699 with sigqueueinfo is this system call is available.
4701 * sysdeps/pthread/timer_create.c (timer_create): Allow
4702 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4704 * sysdeps/pthread/Makefile: New file. Add rules to build timer
4706 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4708 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4710 * sysdeps/pthread/posix-timer.h: New file.
4711 * sysdeps/pthread/timer_create.c: New file.
4712 * sysdeps/pthread/timer_delete.c: New file.
4713 * sysdeps/pthread/timer_getoverr.c: New file.
4714 * sysdeps/pthread/timer_gettime.c: New file.
4715 * sysdeps/pthread/timer_routines.c: New file.
4716 * sysdeps/pthread/timer_settime.c: New file.
4717 * sysdeps/pthread/tst-timer.c: New file.
4719 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4721 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4722 LINK_MAX definitions if necessary.
4724 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4726 Added missing fork time handling of global libio lock.
4728 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4729 not just the individual stream locks. Rewritten to use new
4730 iterator interface provided by libio rather than accessing
4733 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4734 which lock and unlock the stream list using the new interface
4736 * internals.h: Likewise.
4738 * ptfork.c (__fork): Now calls __flockfilelist before fork,
4739 and __funlockfilelist in the parent after the fork.
4740 Child still calls __fresetlockfiles as before.
4742 * linuxthreads.texi: Now explains what happens to streams at
4743 fork time. Also whole new section on forking and thread added.
4744 Definition of pthread_atfork moved out of Miscellaneous Functions
4745 to this new section.
4747 2000-06-04 Jakub Jelinek <jakub@redhat.com>
4749 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4750 Add missing register.
4751 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4753 2000-06-02 Jakub Jelinek <jakub@redhat.com>
4755 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4756 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4757 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4759 2000-05-31 Andreas Jaeger <aj@suse.de>
4761 * sysdeps/mips/pspinlock.c: Implement spinlocks.
4763 2000-05-28 Ulrich Drepper <drepper@redhat.com>
4765 * spinlock.c (__pthread_lock): Remove ASSERT.
4767 * Makefile (tests): Add ex8.
4768 * Examples/ex8.c: New file.
4770 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
4772 Bugfix: The pthread_atfork mechanism now takes care of its
4773 own internal mutex at fork time.
4775 * ptfork.c (__fork): Revised so that the mutex is held across
4776 the fork operation and while the handlers are called, and so that
4777 the child resets the mutex.
4779 * linuxthreads.texi: Updated pthread_atfork documentation to make
4780 it clear that fork and pthread_atfork can't be reentered from
4781 atfork handlers, that pthread_atfork and fork are mutually atomic,
4782 and that the handlers are inherited by the child process.
4784 2000-05-24 Ulrich Drepper <drepper@redhat.com>
4786 * Makefile (libpthread-routines): Add pspinlock.
4787 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4788 Use struct _pthread_fastlock instead of pthread_spinlock_t.
4789 * condvar.c: Likewise.
4790 * internals.h: Likewise.
4792 * manager.c: Likewise.
4793 * mutex.c: Likewise.
4794 * pthread.c: Likewise.
4795 * rwlock.c: Likewise.
4796 * semaphore.c: Likewise.
4797 * signals.c: Likewise.
4798 * spinlock.h: Likewise.
4799 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
4800 * sysdeps/alpha/pspinlock.c: New file.
4801 * sysdeps/arm/pspinlock.c: New file.
4802 * sysdeps/i386/pspinlock.c: New file.
4803 * sysdeps/m68k/pspinlock.c: New file.
4804 * sysdeps/mips/pspinlock.c: New file.
4805 * sysdeps/powerpc/pspinlock.c: New file.
4806 * sysdeps/sparc/sparc32/pspinlock.c: New file.
4807 * sysdeps/sparc/sparc64/pspinlock.c: New file.
4808 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4809 back to _pthread_fastlock. Define new pthread_spinlock_t.
4811 2000-05-24 Andreas Jaeger <aj@suse.de>
4813 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4815 2000-05-21 Jakub Jelinek <jakub@redhat.com>
4817 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4819 2000-05-13 Jakub Jelinek <jakub@redhat.com>
4821 * internals.h (__RES_PTHREAD_INTERNAL): Define.
4823 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4825 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4826 object state is represented with additional bits which distinguish
4827 whether that state was set up in the current process, or
4828 in an ancestor process. If that state was set in an ancestor,
4829 it means that a fork happened while thread was executing the init
4830 function. In that case, the state is reset to NEVER.
4831 * mutex.c (__pthread_once_fork_prepare): New function.
4832 (__pthread_once_fork_child): Likewise
4833 (__pthread_once_fork_parent): Likewise
4834 (__pthread_reset_pthread_once): Removed.
4835 * ptfork.c (__fork): Call new handlers in mutex.c.
4836 * internals.h: Declarations of new mutex.c functions added.
4837 Declaration of removed function deleted.
4838 * linuxthreads.texi: Updated documentation about pthread_once
4839 to clarify what happens under cancellation and forking.
4841 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4843 * internals.h: New thread manager request type, REQ_KICK.
4844 * join.c (pthread_exit): main thread now calls exit() instead
4845 of _exit() in order to proper process cleanup.
4846 * manager.c (__pthread_manager): Do not terminate manager
4847 after unblocking main thread; wait for main thread's
4848 REQ_PROCESS_EXIT request instead.
4849 Also, added REQ_KICK case to handle new request; this just does
4851 * manager.c (pthread_exited): Do not terminate manager after
4852 unblocking main thread.
4853 * manager.c (__pthread_manager_sighandler): If the main thread
4854 is waiting for all other threads to die, send a REQ_KICK into
4855 the thread manager request pipe to get it to clean out the threads
4856 and unblock the main thread as soon as possible. This fixes
4857 the 2000 millisecond hang on shutdown bug.
4858 * Examples/ex7.c: New file, tests shutdown behavior when all threads
4859 including the main one call pthread_exit(), or implicitly do so.
4860 * Makefile (tests): Add ex7.
4862 2000-05-05 Andreas Jaeger <aj@suse.de>
4864 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4865 (pthread_getcpuclockid): Correct test for ourselves.
4867 2000-05-05 Ulrich Drepper <drepper@redhat.com>
4869 * internals.h (struct _pthread_descr_struct): Reorganization.
4870 Allocate room for 16 pointers at head of the structure for future
4871 thread-local data handling. Move p_self member in this area.
4872 * manager.c (pthread_handle_create): Adjust use of p_self.
4873 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4874 * pthread.c (__pthread_initial_thread): Adjust initialization.
4875 (__pthread_manager_thread): Likewise.
4877 2000-04-29 Bruno Haible <haible@clisp.cons.org>
4879 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4880 for eventmask larger than 1 word.
4882 2000-04-27 Ulrich Drepper <drepper@redhat.com>
4884 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4885 * pthread.c (__pthread_initialize_minimal): New function. Perform
4886 minimal initialization.
4887 (pthread_initialize): Remove this code here.
4888 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
4889 are working around the problem in glibc.
4891 2000-04-25 Ulrich Drepper <drepper@redhat.com>
4893 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4894 now. First gcc must be fixed (more concrete: libgcc).
4896 2000-04-24 Ulrich Drepper <drepper@redhat.com>
4898 * pthread.c: Remove special treatement for interrupt handlers on x86.
4899 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4900 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4902 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4904 2000-04-24 Mark Kettenis <kettenis@gnu.org>
4906 * join.c (pthread_exit): Set p_terminated after reporting the
4907 termination event instead of before.
4909 2000-04-20 Jakub Jelinek <jakub@redhat.com>
4911 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4914 2000-04-18 Andreas Jaeger <aj@suse.de>
4916 * Versions: Use ld instead of ld.so.
4918 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4920 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4921 Remove the typedef keyword.
4923 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4925 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4927 (READ_MEMORY_BARRIER): Define.
4928 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4930 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4933 2000-04-17 Ulrich Drepper <drepper@redhat.com>
4935 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4936 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4937 use thread_handle().
4939 2000-04-16 Ulrich Drepper <drepper@redhat.com>
4941 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4942 if fast mutex is used. Don't initialize `already_canceled' twice.
4943 Correctly test for return value of timedsuspend.
4945 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
4946 therefore don't need the _rt versions of the signal handlers.
4948 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4950 * pthread.c (pthread_yield): New function.
4951 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4952 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4953 * internals.h: Declare __pthread_yield.
4955 * pthread.c (pthread_initialize): Avoid a bit more code if
4956 realtime signals are known to exist.
4958 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4959 to dynamically detect RT signals and avoid generating compatibility
4960 functions with old kernel.
4961 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4962 __pthread_restart_new directly.
4963 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4964 __pthread_wait_for_restart_signal directly.
4965 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4966 __pthread_timedsuspend_new directly.
4968 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4970 * condvar.c: Remove all the special code to handle cond_timedwait.
4971 Use timedsuspend instead.
4972 * internals.h: Declare __pthread_timedsuspend_old,
4973 __pthread_timedsuspend_new, and __pthread_timedsuspend.
4974 Remove declaration of __pthread_init_condvar.
4975 * pthread.c: Define __pthread_timedsuspend variable.
4976 (__pthread_timedsuspend_old): New function. Timed suspension
4977 implementation for old Linux kernels.
4978 (__pthread_timedsuspend_new): New function. Timed suspension
4979 implementation for new Linux kernels.
4980 * restart.h (timedsuspend): New function. Call appropriate
4981 suspension function through __pthread_timedsuspend.
4982 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4984 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4986 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4988 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4990 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4991 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4993 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4994 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4996 2000-04-14 Andreas Jaeger <aj@suse.de>
4998 * weaks.c: Fix typo.
5000 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
5001 2.2 for linuxthreads.
5003 2000-04-13 Ulrich Drepper <drepper@redhat.com>
5005 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
5006 (pthread_getcpuclockid): Fix typo.
5008 2000-04-12 Ulrich Drepper <drepper@redhat.com>
5010 * Makefile (libpthread-routines): Add getcpuclockid.
5011 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
5012 * sysdeps/pthread/getcpuclockid.c: New file.
5013 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
5014 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
5016 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
5018 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5020 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
5021 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5022 and pthread_spin_unlock.
5023 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
5024 into pthread_spinlock_t. Change all uses.
5025 * spinlock.c: Implement pthread_spin_lock.
5026 Rename __pthread_unlock to __pthread_spin_unlock and define weak
5027 alias for real name.
5028 Define pthread_spin_trylock, pthread_spin_init, and
5029 pthread_spin_destroy.
5030 Change all uses of _pthread_fastlock to pthread_spinlock_t.
5031 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
5032 Change all uses of _pthread_fastlock to pthread_spinlock_t.
5033 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
5034 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5035 and pthread_spin_unlock.
5036 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
5037 Change all uses of _pthread_fastlock to pthread_spinlock_t.
5038 * condvar.c: Likewise.
5039 * internals.h: Likewise.
5041 * manager.c: Likewise.
5042 * mutex.c: Likewise.
5043 * pthread.c: Likewise.
5044 * rwlock.c: Likewise.
5045 * semaphore.c: Likewise.
5046 * signals.c: Likewise.
5048 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
5050 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
5052 2000-04-11 Ulrich Drepper <drepper@redhat.com>
5054 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
5055 _POSIX_SHARED_MEMORY_OBJECTS.
5057 2000-04-11 Andreas Jaeger <aj@suse.de>
5059 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
5060 (__compare_and_swap): Mark as modifying memory.
5062 2000-04-11 Geoff Keating <geoffk@cygnus.com>
5064 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
5066 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
5067 Don't have the 'asm' __volatile__.
5069 2000-04-11 Ulrich Drepper <drepper@redhat.com>
5071 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
5072 * spinlock.c (__pthread_lock): Add memory barriers.
5073 (__pthread_unlock): Likewise.
5074 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
5076 (RELEASE): Not needed anymore.
5077 (__compare_and_swap): Mark asm as modifying memory.
5078 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
5080 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
5081 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
5082 (MEMORY_BARRIER): Define using stbar.
5083 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
5085 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
5086 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
5087 Mike Burrows <m3b@pa.dec.com>.
5089 2000-04-09 Ulrich Drepper <drepper@redhat.com>
5091 * signals.c (sigaction): Fix return value for the case SIG is one
5092 of the signals the implementation uses.
5093 Patch by Xavier.Leroy@inria.fr.
5095 2000-04-01 Andreas Jaeger <aj@suse.de>
5097 * attr.c: Use shlib-compat macros.
5098 * oldsemaphore.c: Likewise.
5099 * pthread.c: Likewise.
5100 * weaks.c: Likewise.
5102 2000-03-26 Ulrich Drepper <drepper@redhat.com>
5104 * semaphore.c (sem_timedwait): New function.
5105 Patch by Carl Mailloux <carlm@oricom.ca>.
5106 * semaphore.h: Declare sem_timedwait.
5107 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
5109 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
5111 * sysdeps/pthread/Makefile: File removed.
5113 2000-03-23 Ulrich Drepper <drepper@redhat.com>
5115 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
5116 * internals.h (__pthread_reset_pthread_once): Add prototype.
5117 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5119 * manager.c (pthread_handle_create): Store ID of new thread before
5122 2000-03-21 Ulrich Drepper <drepper@redhat.com>
5124 * attr.c: Use new macros from shlib-compat.h to define versions.
5125 * oldsemaphore.c: Likewise.
5126 * semaphore.c: Likewise.
5127 * weaks.c: Likewise.
5129 * pthread.c: Update for new SHLIB_COMPAT definition.
5131 * manager.c (__pthread_manager): Unmask debug signal.
5133 * pthread.c (pthread_initialize): Test for address of __dso_handle
5134 being NULL, not value. Use __on_exit, not on_exit.
5135 Patch by Andreas Jaeger <aj@suse.de>.
5137 * pthread.c: Use new macros from shlib-compat.h to define versions.
5139 2000-03-19 Ulrich Drepper <drepper@redhat.com>
5141 * pthread.c (pthread_initialize): Instead of on_exit use
5142 __cxa_atexit if __dso_label is available to allow unloading the
5143 libpthread shared library.
5145 2000-03-16 Ulrich Drepper <drepper@redhat.com>
5147 * condvar.c: Make tests for ownership of mutex less strict.
5149 2000-03-14 Ulrich Drepper <drepper@redhat.com>
5151 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5152 current thread and return error if not.
5153 (pthread_cond_timedwait_relative_old): Likewise.
5154 (pthread_cond_timedwait_relative_new): Likewise.
5156 * mutex.c (__pthread_once): Handle cancelled init function correctly.
5157 (pthread_once_cancelhandler): New function.
5158 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5160 2000-03-14 Andreas Jaeger <aj@suse.de>
5162 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5164 (pthread_handle_sigrestart_rt): Likewise.
5165 * signals.c (pthread_sighandler_rt): Likewise.
5167 2000-03-02 Andreas Jaeger <aj@suse.de>
5169 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5170 Reported by Sean Chen <sean.chen@turbolinux.com>.
5172 2000-02-28 Andreas Jaeger <aj@suse.de>
5174 * rwlock.c: Fix typo.
5176 2000-02-27 Ulrich Drepper <drepper@redhat.com>
5178 * rwlock.c: Define __* variants of the functions and make old names
5180 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5181 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5183 2000-02-25 Andreas Jaeger <aj@suse.de>
5185 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5186 pwrite64, lseek64, open64, and __open64 with version 2.2.
5188 2000-02-22 Ulrich Drepper <drepper@redhat.com>
5190 * semaphore.h (SEM_FAILED): Use 0 not NULL.
5192 2000-02-14 Ulrich Drepper <drepper@redhat.com>
5194 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5195 nanosleep does not work either. Get absolute time inside the
5197 (pthread_cond_timedwait_relative_new): Likewise.
5198 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5200 2000-02-13 Andreas Jaeger <aj@suse.de>
5202 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5203 (pthread_cond_timedwait_relative_old): Likewise.
5205 2000-02-13 Ulrich Drepper <drepper@redhat.com>
5207 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5208 but keep the code around. A bug in the kernel prevent us from
5210 (pthread_cond_timedwait_relative_new): Likewise.
5211 (PR libc/1597 and libc/1598).
5213 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
5215 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5216 loop around nanosleep calls instead of around most of the function
5217 (pthread_cond_timedwait_relative_new): Likewise.
5218 body. Got rid of backwards goto and one local.
5220 2000-01-31 Ulrich Drepper <drepper@redhat.com>
5222 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5223 before every nanosleep call to account for time spent in the rest
5225 (pthread_cond_timedwait_relative_new): Likewise.
5226 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5228 2000-01-29 Ulrich Drepper <drepper@redhat.com>
5230 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5231 from nanosleep call so that in case we restart we only wait for the
5233 (pthread_cond_timedwait_relative_new): Likewise.
5234 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5236 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
5238 * manager.c (pthread_allocate_stack): Compute guard page address
5239 correctly. Patch by HJ Lu.
5241 * sysdeps/pthread/pthread.h: Define
5242 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5244 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
5246 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5247 preference handling.
5248 (pthread_rwlockattr_setkind_np): Allow
5249 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5250 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5252 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
5254 * internals.h (pthread_readlock_info): New structure.
5255 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5256 p_untracked_readlock_count.
5257 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5258 Add initializers for new fields.
5259 * manager.c (pthread_free): Free read/write lock lists.
5260 * queue.h (queue_is_empty): New function.
5261 * rwlock.c: Implement requirements about when readers should get
5263 * sysdeps/pthread/pthread.h
5264 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5265 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5266 Define this name as well.
5267 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5269 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
5271 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5272 Adjust initializers for struct _pthread_descr_struct change.
5273 * internals.h (struct _pthread_descr_struct): Move new elements to
5276 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
5278 Redesigned how cancellation unblocks a thread from internal
5279 cancellation points (sem_wait, pthread_join,
5280 pthread_cond_{wait,timedwait}).
5281 Cancellation won't eat a signal in any of these functions
5282 (*required* by POSIX and Single Unix Spec!).
5283 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5284 simultaneous condition variable signal (not required by POSIX
5285 or Single Unix Spec, but nice).
5286 * spinlock.c: __pthread_lock queues back any received restarts
5287 that don't belong to it instead of assuming ownership of lock
5288 upon any restart; fastlock can no longer be acquired by two threads
5290 * restart.h: Restarts queue even on kernels that don't have
5291 queued real time signals (2.0, early 2.1), thanks to atomic counter,
5292 avoiding a rare race condition in pthread_cond_timedwait.
5294 1999-12-31 Andreas Jaeger <aj@suse.de>
5296 * internals.h: Remove duplicate prototype declarations.
5298 * weaks.c: Remove __THROW from prototypes since the file is not
5299 compiled by a C++ compiler.
5300 * internals.h: Likewise.
5302 1999-12-30 Andreas Jaeger <aj@suse.de>
5304 * sysdeps/pthread/pthread.h: Move internal functions to...
5305 * sysdeps/pthread/bits/libc-lock.h: ...here.
5307 1999-12-29 Andreas Jaeger <aj@suse.de>
5309 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5311 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
5313 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5316 * manager.c (__pthread_start): Add one more cast to prevent
5317 warning on 64bit machines.
5319 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
5321 * manager.c (pthread_handle_create): Set p_pid of new thread
5322 before calling the callback function to report a new thread.
5324 1999-12-20 Andreas Jaeger <aj@suse.de>
5326 * pthread.c (pthread_initialize): Move getrlimit call after
5329 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
5331 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5332 pwrite64, lseek64, open64, and __open64.
5333 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5334 pwrite64, lseek64, open64, and __open64.
5336 * manager.c (pthread_allocate_stack): Correct computation of
5337 new_thread_bottom. Correct handling of stack size and when the
5338 rlimit method to guard for stack growth is used.
5339 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5340 minus one pagesize (not two).
5342 1999-12-03 Andreas Jaeger <aj@suse.de>
5344 * Versions: Add __res_state with version GLIBC_2.2.
5346 * errno.c (__res_state): New function to return thread specific
5349 * pthread.c (pthread_initialize): Initialize p_resp.
5350 (__pthread_reset_main_thread): Also set p_resp.
5352 * manager.c (pthread_handle_create): Initialize p_resp.
5354 * internals.h: Add thread specific resolver state.
5355 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5357 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
5359 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5361 * sysdeps/i386/i686/pt-machine.h: Likewise.
5362 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5364 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
5366 * manager.c (pthread_start_thread_event): Initialize p_pid already
5369 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
5371 * internals.h: Add prototype for __pthread_manager_event.
5372 * manager.c (__pthread_manager_event): New function.
5373 (pthread_start_thread_event): Correct computation of self.
5374 Use INIT_THREAD_SELF.
5375 * pthread.c (__pthread_manager_thread): Initialize p_lock.
5376 (__pthread_initialize_manager): Respect event flags also for creation
5377 of the manager thread.
5379 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
5381 * pthread.c (__pthread_initialize_manager): Initialize
5382 __pthread_manager_thread.p_tid.
5384 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
5386 * internals.h: Declare __pthread_last_event.
5387 * manager.c: Define __pthread_last_event.
5388 (pthread_handle_create): Set __pthread_last_event.
5389 (pthread_exited): Likewise.
5390 * join.c (pthread_exit): Likewise.
5392 * Makefile (libpthread-routines): Add events.
5393 * events.c: New file.
5394 * internals.h: Protect against multiple inclusion.
5395 Include thread_dbP.h header.
5396 (struct _pthread_descr_struct): Add new fields p_report_events and
5398 Declare event reporting functions.
5399 * join.c (pthread_exit): Signal event if this is wanted.
5400 * manager.c (__pthread_threads_events): New variable.
5401 (pthread_handle_create): Take new parameters with event information.
5402 Signal TD_CREATE event if wanted.
5403 (__pthread_manager): Adjust pthread_handle_create call.
5404 (pthread_start_thread_event): New function. Block until manager is
5405 finished and then call pthread_start_thread.
5406 (pthread_exited): Signal TD_REAP event if wanted.
5408 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
5410 * restart.h (suspend_with_cancellation): Rewrite as a macro.
5412 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5414 1999-10-25 Andreas Jaeger <aj@suse.de>
5416 * internals.h: Remove K&R compatibility.
5417 * no-tsd.c: Likewise.
5418 * semaphore.h: Likewise.
5419 * signals.c: Likewise.
5420 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5421 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5422 * weaks.c: Likewise.
5424 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
5426 * pthread.c: For i386, wrap pthread_handle_sigrestart and
5427 pthread_handle_sigcancel with functions that restore %gs from the
5428 signal context. For each signal handling function, two wrappers
5429 are required, one for a non-RT signal and one for a RT signal.
5430 * signal.c: For i386, add code to restore %gs from the signal
5431 context in pthread_sighandler and pthread_sighandler_rt.
5433 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
5435 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5437 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
5439 * pthread.c (__pthread_initial_thread): Pass argument to
5440 PTHREAD_START_ARGS_INITIALIZER.
5441 (__pthread_manager_thread): Likewise.
5443 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5444 initialize function.
5446 * manager.c (pthread_handle_create): Remove p_startfct initialization.
5448 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5450 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
5452 * internals.h: Correct return types for __libc_read and __libc_write.
5454 1999-10-09 Andreas Jaeger <aj@suse.de>
5456 * internals.h: Add __new_sem_post to get prototype in
5457 manager.c; include semaphore.h for needed types.
5459 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
5461 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5462 directly instead of calling sem_post which should not be necessary
5463 but is faster and might help in some case to work around problems.
5464 Patch by khendricks@ivey.uwo.ca [libc/1382].
5466 1999-10-08 Andreas Schwab <schwab@suse.de>
5468 * sysdeps/pthread/Subdirs: New file.
5471 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
5473 * Implies: New file.
5474 * internals.h (struct _pthread_descr_struct): Add p_startfct.
5475 * manager.c (pthread_handle_create): Initialize p_startfct.
5476 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5478 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
5480 * manager.c (__linuxthreads_pthread_threads_max): New variable.
5481 * specific.c (__linuxthreads_pthread_keys_max): New variable.
5482 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5484 * condvar.c (pthread_cond_timedwait_relative): Never return with
5485 EINTR. Patch by Andreas Schwab.
5487 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
5489 * signals.c (sigaction): Correct last patch. Don't select
5490 pthread_sighandler_rt based on the signal number but instead of
5491 the SA_SIGINFO flag.
5493 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
5495 * specific.c: Move definitions of struct pthread_key_struct and
5496 destr_function to ...
5497 * internals.h: ...here.
5499 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
5501 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
5502 this instead of pthread_handle_sigrestart if the signal is an RT
5505 * signals.c: Handle passing through of sighandler arguments also
5506 for real-time signals.
5508 1999-09-03 Andreas Schwab <schwab@suse.de>
5510 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
5512 (__vfork): New function, alias vfork.
5513 * Versions: Export __fork, vfork, and __vfork in libpthread.
5515 1999-08-23 Andreas Schwab <schwab@suse.de>
5517 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5518 call to signal handler.
5520 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
5522 * pthread.c (__pthread_reset_main_thread): Undo last change.
5523 (__pthread_kill_other_threads_np): Reset signal handlers for the
5524 signals we used in the thread implementation here.
5526 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
5528 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5529 for the signals we used in the thread implementation [PR libc/1234].
5531 * Versions: Export __pthread_kill_other_threads_np from libpthread
5534 * signals.c: Pass sigcontext through wrapper to the user function.
5536 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
5538 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5539 __libc_internal_tsd_set.
5541 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5543 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5546 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5548 * internals.h: Align _pthread_descr_struct to 32 bytes.
5549 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5552 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5554 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5557 1999-07-09 Cristian Gafton <gafton@redhat.com>
5559 * Makefile (libpthread-routines): Add oldsemaphore routine.
5560 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5561 sem_trywait, and sem_wait to GLIBC_2.1.
5562 * oldsemaphore.c: New file.
5563 * semaphore.c: Add default_symbol_versions for the changed functions.
5564 (__new_sem_init): Rename from sem_init.
5565 (__new_sem_post): Rename from sem_post.
5566 (__new_sem_wait): Rename from sem_wait.
5567 (__new_sem_trywait): Rename from sem_trywait.
5568 (__new_sem_getvalue): Rename from sem_getvalue.
5569 (__new_sem_destroy): Rename from sem_destroy.
5571 1999-06-23 Robey Pointer <robey@netscape.com>
5573 * internals.h: Added p_nextlock entry to separate queueing for a
5574 lock from queueing for a CV (sometimes a thread queues on a lock
5575 to serialize removing itself from a CV queue).
5576 * pthread.c: Added p_nextlock to initializers.
5577 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5579 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5581 * manager.c (pthread_handle_create): Free mmap region after stack
5582 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5584 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5586 * man/pthread_cond_init.man: Correct example.
5587 Reported by Tomas Berndtsson <tomas@nocrew.org>.
5589 * linuxthreads.texi (Condition Variables): Likewise.
5591 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
5593 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5594 casx not cas, also successful casx returns the old value in rd
5595 and not the new value.
5597 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
5599 * manager.c: If pthread_create() is given a NULL attribute
5600 and the thread manager runs with a realtime policy, set the
5601 scheduling policy of the newly created thread back to SCHED_OTHER.
5602 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5603 initialize the schedpolicy field of new_thread->p_start_args
5604 to that of the calling thread.
5606 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
5608 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5609 instruction does not allow memory element to use offset.
5611 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
5613 * manager.c (pthread_allocate_stack): Optimize initialization of new
5616 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5617 Don't use initializer since it is all zeroes.
5618 (__libc_once_define): Likewise.
5620 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5622 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5623 doesn't exist anymore.
5624 * sysdeps/i386/Implies: Likewise.
5625 * sysdeps/m68k/Implies: Likewise.
5626 * sysdeps/mips/Implies: Likewise.
5627 * sysdeps/powerpc/Implies: Likewise.
5628 * sysdeps/sparc/sparc32/Implies: Likewise.
5629 * sysdeps/sparc/sparc64/Implies: Likewise.
5631 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
5633 * sysdeps/alpha/bits/semaphore.h: Removed.
5634 * sysdeps/powerpc/bits/semaphore.h: Removed.
5635 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5636 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5637 * Makefile (headers): Remove bits/semaphore.h.
5639 * semaphore.h: Define _pthread_descr if necessary.
5640 Don't include limits.h. Define SEM_VALUE_MAX directly.
5642 (sem_t): Protect element names with leading __.
5643 Add declarations for sem_close, sem_open, and sem_unlink.
5644 * semaphore.c: Adjust all functions for new element names.
5645 Define sem_close, sem_open, and sem_unlink.
5646 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5648 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5651 1999-03-16 H.J. Lu <hjl@gnu.org>
5653 * specific.c (pthread_key_delete): Check th->p_terminated to see
5654 if the thread is running.
5656 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5657 Added to GLIBC_2.0 for libc.so.
5659 1999-02-12 H.J. Lu <hjl@gnu.org>
5661 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5662 __libc_allocate_rtsig): Added to GLIBC_2.1.
5664 * internals.h (DEFAULT_SIG_RESTART): Removed.
5665 (DEFAULT_SIG_CANCEL): Removed.
5667 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5668 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5669 (__pthread_sig_restart, __pthread_sig_cancel,
5670 __pthread_sig_debug): Initialized.
5671 (pthread_initialize): Call init_rtsigs () to initialize
5674 1999-02-03 H.J. Lu <hjl@gnu.org>
5676 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5677 Don't restart the thread which sent REQ_DEBUG.
5678 (pthread_start_thread): Check if __pthread_sig_debug > 0
5681 * pthread.c (__pthread_initialize_manager): Suspend ourself
5682 after sending __pthread_sig_debug to gdb instead of
5683 __pthread_sig_cancel.
5685 1999-01-24 H.J. Lu <hjl@gnu.org>
5687 * manager.c (__pthread_manager): Delete __pthread_sig_debug
5688 from mask if __pthread_sig_debug > 0.
5689 (pthread_handle_create): Increment __pthread_handles_num.
5691 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5692 * pthread.c (__pthread_initialize_manager): Likewise.
5694 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5695 instead of __libc_allocate_rtsig (2).
5696 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5697 instead of __pthread_sig_cancel.
5698 (pthread_handle_sigdebug): Fix comments.
5700 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
5702 * manager.c (pthread_allocate_stack): Set
5703 __pthread_nonstandard_stacks if user-specified stack is used.
5705 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
5707 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5708 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5710 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
5712 * pthread.c: Use a third signal __pthread_sig_debug distinct
5713 from __pthread_sig_cancel to notify gdb when a thread is
5715 * manager.c: Likewise.
5716 * internals.h: Likewise.
5717 * signals.c: The implementation of sigwait(s) assumed that
5718 all signals in s have signal handlers already attached.
5719 This is not required by the standard, so make it work
5720 also if some of the signals have no handlers.
5722 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5724 * linuxthreads.texi: Remove pointers from first @node. Move old
5725 @node spec inside comment.
5727 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
5729 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5732 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
5734 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5735 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5737 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
5739 * manager.c: Threads now send __pthread_sig_cancel on termination.
5740 Change clone call and signal masks.
5741 * thread.c (pthread_handle_sigrestart): Remove special code for
5743 (pthread_handle_sigcancel): In manager thread call
5744 __pthread_manager_sighandler.
5745 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5746 * sysdeps/i386/i686/pt-machine.h: Likewise.
5747 Patches by Xavier Leroy.
5749 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
5751 * spinlock.c (__pthread_unlock): Don't crash if called for an
5752 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5754 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5757 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
5759 * Examples/ex3.c: Wait until all threads are started before
5760 searching for the number to avoid race condition on very fast
5763 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5765 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5766 declaration since it's not needed.
5768 * sysdeps/pthread/pthread.h: Move internal functions to ...
5769 * internals.h: ...here.
5771 1998-12-02 H.J. Lu <hjl@gnu.org>
5773 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5774 SIGRTMIN is defined.
5775 (__pthread_sig_cancel): Likewise.
5777 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5779 * wrapsyscall.c: Include <sys/mman.h> for msync,
5780 <stdlib.h> for system and <termios.h> for tcdrain prototype.
5781 Correct msync declaration.
5783 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
5785 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5786 __libc_tsd_set): New macros for new interface.
5787 * no-tsd.c: New file, provide uninitialized defns of
5788 __libc_internal_tsd_get and __libc_internal_tsd_set.
5789 * Makefile (routines): Add no-tsd.
5791 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
5793 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5794 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5795 __libc_internal_tsd_set): Move decls to ...
5796 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5799 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5800 __libc_internal_tsd_set): Make these pointers to functions, not
5801 functions; remove #pragma weak decls for them.
5802 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5803 Define static functions and initialized pointers to them.
5805 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
5807 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5808 (CFLAGS-specific.c): Likewise.
5809 (CFLAGS-pthread.c): Likewise.
5810 (CFLAGS-ptfork.c): Likewise.
5811 (CFLAGS-cancel.c): Likewise.
5812 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5813 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5815 * mutex.c (pthread_mutex_init): Define as strong symbol.
5816 (pthread_mutex_destroy): Likewise.
5817 (pthread_mutex_trylock): Likewise.
5818 (pthread_mutex_lock): Likewise.
5819 (pthread_mutex_unlock): Likewise.
5820 (pthread_mutexattr_init): Likewise.
5821 (pthread_mutexattr_destroy): Likewise.
5822 (pthread_once): Likewise.
5823 * ptfork.c (pthread_atfork): Likewise.
5824 * specific.c (pthread_key_create): Likewise.
5825 (pthread_setspecific): Likewise.
5826 (pthread_getspecific): Likewise.
5828 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5830 * linuxthreads.texi: Fix punctuation after xref.
5832 1998-11-10 H.J. Lu <hjl@gnu.org>
5834 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5835 if it is defined in <linux/limits.h>.
5837 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
5839 * spinlock.h (__pthread_trylock): Define inline.
5840 (__pthread_lock): Add extra parameter to declaration. Declare
5841 using internal_function.
5842 (__pthread_unlock): Declare using internal_function.
5843 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
5844 of local variable self. Avoid recomputing self. Define using
5846 (__pthread_trylock): Remove.
5847 (__pthread_unlock): Define using internal_function.
5848 * cancel.c: Adjust for __pthread_lock interface change. Use already
5849 computed self value is possible.
5850 * condvar.c: Likewise.
5852 * manager.c: Likewise.
5853 * mutex.c: Likewise.
5854 * pthread.c: Likewise.
5855 * rwlock.c: Likewise.
5856 * semaphore.c: Likewise.
5857 * signals.c: Likewise.
5859 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
5861 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5862 __ to field names of the struct.
5863 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5865 (pthread_attr_t): Likewise.
5866 (pthread_cond_t): Likewise.
5867 (pthread_condattr_t): Likewise.
5868 (pthread_mutex_t): Likewise.
5869 (pthread_mutexattr_t): Likewise.
5870 (pthread_rwlock_t): Likewise.
5871 (pthread_rwlockattr_t): Likewise.
5872 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5873 * cancel.c: Likewise.
5874 * condvar.c: Likewise.
5875 * manager.c: Likewise.
5876 * mutex.c: Likewise.
5877 * pthread.c: Likewise.
5878 * ptlongjmp.c: Likewise.
5879 * rwlock.c: Likewise.
5880 * spinlock.c: Likewise.
5882 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
5884 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5887 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5890 * Makefile (libpthread-routines): Add pt-machine.
5891 * pt-machine.c: New file.
5892 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5893 yet defined. Use PT_EI in extern inline definitions.
5894 * sysdeps/arm/pt-machine.h: Likewise.
5895 * sysdeps/i386/pt-machine.h: Likewise.
5896 * sysdeps/i386/i686/pt-machine.h: Likewise.
5897 * sysdeps/m68k/pt-machine.h: Likewise.
5898 * sysdeps/mips/pt-machine.h: Likewise.
5899 * sysdeps/powerpc/pt-machine.h: Likewise.
5900 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5901 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5903 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5905 * semaphore.h: Include <sys/types.h> so that _pthread_descr
5908 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
5910 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5912 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5914 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5916 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5919 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5921 * signals.c (sigaction): Check that sig is less than NSIG to avoid
5922 array index overflow.
5924 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
5926 * sysdeps/pthread/semaphore.h: New file.
5928 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
5930 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5931 _LIBC_TSD_KEY_DL_ERROR.
5933 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
5935 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5936 * sysdeps/i386/pt-machine.h: Likewise.
5937 Suggested by Roland McGrath.
5939 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
5941 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5942 access thread data with non-constant offsets.
5943 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5946 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
5947 THREAD_SETMEM_NC definitions.
5949 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5951 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5953 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
5955 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5956 not already defined.
5957 (struct _pthread_descr_struct): Add p_self and p_nr field.
5958 * manager.c (__pthread_handles): Define second element to point
5960 (__pthread_handles_num): Initialize to 2.
5961 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5962 (pthread_start_thread): Likewise.
5963 (pthread_handle_create): Start search for free slot at entry 2.
5964 Initialize new fields p_self and p_nr.
5965 Call __clone with CLONE_PTRACE if available.
5966 (pthread_free): Call FREE_THREAD_SELF if available.
5967 * pthread.c (__pthread_initial_thread): Initialize new fields.
5968 (__pthread_manager_thread): Likewise.
5969 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5971 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5972 elements of the thread descriptor.
5973 * condvar.c: Likewise.
5974 * errno.c: Likewise.
5976 * manager.c: Likewise.
5977 * pthread.c: Likewise.
5978 * ptlongjmp.c: Likewise.
5979 * semaphore.c: Likewise.
5980 * signals.c: Likewise.
5981 * specific.c: Likewise.
5982 * spinlock.c: Likewise.
5984 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5986 * sysdeps/i386/useldt.h: New file.
5987 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5989 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5990 THREAD_SETMEM using __thread_self.
5991 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5993 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
5995 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5996 turned out that we didn't need to queue after all.
5998 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
6000 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
6001 and wastes space; correct types.
6003 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
6005 * signals.c (sigaction): Handle NULL argument.
6007 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
6009 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
6012 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6014 * Makefile (linuxthreads-version): Extract correct number from
6017 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
6019 * Banner: Bump version number to 0.8
6020 * FAQ.html: Many updates, in particular w.r.t. debugging.
6021 * manager.c: Support for non-default stacksize for
6022 LinuxThreads-allocated stacks;
6023 don't use guard pages for stacks with default size, rely on
6024 rlimit(RLIMIT_STACK) instead (it's cheaper).
6026 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
6027 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
6028 * condvar.c: Likewise.
6029 * internals.h: Likewise.
6030 * restart.h: Likewise.
6031 * signals.c: Likewise.
6032 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
6034 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6036 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
6037 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
6038 * Versions: Put __pthread_mutexattr_settype under version
6039 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
6040 __pthread_mutexattr_gettype.
6042 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6044 * sysdeps/pthread/bits/libc-lock.h: Make
6045 __pthread_mutexattr_settype weak. Don't make
6046 __pthread_mutexattr_setkind_np weak.
6048 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
6050 * manager.c (pthread_handle_create): Check whether sched_setscheduler
6051 call can succeed here.
6053 * mutex.c: Define __pthread_mutexattr_settype and make
6054 __pthread_mutexattr_setkind_np an alias.
6055 Likewise for __pthread_mutexattr_gettype.
6057 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
6059 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
6062 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
6064 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
6066 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6068 * Examples/ex6.c: Include <unistd.h> for usleep.
6070 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6072 * Examples/ex4.c (main): Use exit, not pthread_exit.
6074 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
6076 * Versions: Add __pthread_mutexattr_gettype and
6077 __pthread_mutexattr_settype.
6078 * lockfile.c: Use __pthread_mutexattr_settype instead of
6079 __pthread_mutexattr_setkind_np.
6080 * mutex.c: Define __pthread_mutexattr_gettype and
6081 __pthread_mutexattr_settype.
6083 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
6084 __pthread_mutexattr_settype.
6085 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
6086 Use __pthread_mutexattr_settype.
6088 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
6090 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
6091 * mutex.c: Define weak alias pthread_mutexattr_gettype and
6092 pthread_mutexattr_settype.
6093 * sysdeps/pthread/pthread.h: Declare these functions.
6094 Move pthread_sigmask and pthread_kill declaration in separate header.
6095 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
6097 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
6099 * Makefile: Add rules to compile and run tests.
6100 * Examples/ex1.c: Little changes to fix warnings.
6101 * Examples/ex2.c: Likewise.
6102 * Examples/ex3.c: Likewise.
6103 * Examples/ex4.c: Likewise.
6104 * Examples/ex5.c: Likewise.
6105 * Examples/ex6.c: New file.
6107 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
6109 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
6111 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6113 * attr.c: Include <string.h>.
6115 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
6117 * attr.c: Include errno.h. Use memcpy to copy sched_param.
6118 * internals.h: Include limits.h.
6119 * manager.c: Use memcpy to copy sched_param.
6120 * ptfork.c: Include errno.h.
6121 * pthread.c: Likewise.
6122 * semaphore.c: Likewise.
6123 * specific.c: Likewise.
6124 * spinlock.h: Likewise.
6125 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
6126 type definition to ...
6127 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
6129 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
6131 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6133 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6134 as macros as demanded in POSIX.1, Annex C.
6136 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
6138 * internals.h (struct pthread_request): For free use pthread_t
6139 instead of pthread_descr.
6140 * join.c (pthread_join): Pass thread_id, not th to manager.
6141 (pthread_detach): Likewise.
6142 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6143 (pthread_exited): Remove detached queue code.
6144 (pthread_handle_free): Expect thread ID parameter and use it to
6145 validate the thread decsriptor. Don't use detached queue.
6146 Patches by Xavier Leroy.
6148 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6150 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6151 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6152 __pthread_atfork, __pthread_key_create, __pthread_once.
6153 * internals.h: Doc fix.
6154 * pthread.c (__pthread_initialize): Define again.
6156 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
6158 * manager.c (pthread_exited): If thread is not detached put it on
6160 (pthread_handle_free): If thread is not on list with living threads
6161 search on list with detached threads.
6163 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6164 for new definition of pthread_rwlock_t.
6166 * spinlock.c: Correct test whether to compile
6167 __pthread_compare_and_swap or not.
6169 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
6171 * attr.c: Finish user stack support. Change locking code to be safe
6172 in situations with different priorities.
6173 * cancel.c: Likewise.
6174 * condvar.c: Likewise.
6175 * internals.h: Likewise.
6177 * manager.c: Likewise.
6178 * mutex.c: Likewise.
6179 * pthread.c: Likewise.
6180 * ptlongjmp.c: Likewise.
6181 * queue.h: Likewise.
6182 * rwlock.c: Likewise.
6183 * semaphore.c: Likewise.
6184 * semaphore.h: Likewise.
6185 * signals.c: Likewise.
6186 * spinlock.c: Likewise.
6187 * spinlock.h: Likewise.
6188 * sysdeps/pthread/pthread.h: Likewise.
6189 Patches by Xavier Leroy.
6191 * sysdeps/i386/i686/pt-machine.h: New file.
6193 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
6195 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6196 [sg]et_stackaddr prototypes always available.
6198 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6199 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6201 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
6203 * manager.c (pthread_free): Undo patch from 980430.
6204 Reported by David Wragg <dpw@doc.ic.ac.uk>.
6206 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
6208 * manager.c: Define __pthread_manager_adjust_prio and use it to
6209 increase priority when needed.
6210 * internals.h: Add prototype for __pthread_manager_adjust_prio.
6211 * mutex.c: Optimize mutexes to wake up only one thread.
6212 * pthread.c: Move PID of manager for global variable in structure
6214 Patches by Xavier Leroy.
6216 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
6218 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6220 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6222 * attr.c: Correct typo.
6224 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
6226 * manager.c (pthread_free): Unmap guard before the stack.
6227 Patch by Matthias Urlichs.
6229 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
6231 * manager.c (pthread_free): Detect already free child.
6232 Patch by Xavier Leroy, reported by Matthias Urlichs.
6234 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6236 * Makefile (linuxthreads-version): Renamed back from
6239 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
6241 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6244 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
6246 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6247 * internals.h: Add definitions for new spinlock implementation.
6248 * ptlongjmp.c: New file.
6249 * spinlock.c: New file.
6250 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6251 new function __pthread_acquire to prevent deadlocks with thread
6252 with different priorities.
6253 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6255 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6257 * manager.c (__pthread_manager): Reduce first argument to select
6258 to include just the needed file descriptor.
6260 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
6262 * manager.c: Fix last patch which caused core dumps.
6264 * pthread.c: Correctly handle missing SIGRTMIN.
6266 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6268 * libpthread.map: Add __libc_internal_tsd_get and
6269 __libc_internal_tsd_set. Add missing cancelable functions. Export
6270 libc internal versions of the cancelable functions.
6272 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
6274 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6276 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
6278 * attr.c: Implement pthread_attr_[gs]etguardsize,
6279 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6280 Change pthread_attr_init to have two interfaces.
6281 * internals.h (struct _pthread_descr_struct): Add new fields for
6283 * libpthread.map: Add names in GLIBC_2.1 section.
6284 * manager.c (pthread_handle_create): Implement guardsize and
6286 (pthread_free): Likewise.
6287 * pthread.c (pthread_create): Add new interface for changed
6289 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6290 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6293 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
6295 * manager.c: Enable resetting of the thread scheduling policy
6296 to SCHED_OTHER when the parent thread has a different one.
6298 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
6300 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6301 _POSIX_ASYNCHRONOUS_IO.
6303 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6305 * mutex.c: Implement new mutex types.
6307 * internals.h: Include <signal.h>.
6309 * libpthread.map: Add __erno_location and __h_errno_location.
6311 * errno.c: Return pointer to variable actually in use. This might
6312 not be the one in the thread structure.
6313 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6315 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6316 of manager thread structure.
6317 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6319 * pthread.c: Adapt initializer for thread structures.
6320 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6321 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6322 current thread to global variables.
6324 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
6326 * rwlock.c: New file.
6327 * Makefile (libpthread-routines): Add rwlock.
6328 * sysdeps/pthread/pthread.h: Define data structures and declare
6330 * libpthread.map: Add new functions.
6332 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
6334 * sysdeps/arm/pt-machine.h: New file; add ARM support.
6335 * sysdeps/arm/Implies: likewise.
6336 * README: Document it.
6338 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6340 * signals.c: Remove unneeded initializer for sigwaited, saving a
6343 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6345 * semaphore.c (sem_init): Set sem_spinlock only if available.
6347 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
6349 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6350 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6352 * Makefile: Update from LinuxThreads 0.7.
6353 * internals.h. Likewise.
6354 * manager.c: Likewise.
6355 * mutex.c: Likewise.
6356 * pthread.c: Likewise.
6357 * signals.c: Likewise.
6358 * specific.c: Likewise.
6359 * Examples/ex3.c: Likewise.
6361 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
6363 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6366 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
6368 * wrapsyscall.c: Add socket functions which are also cancelation
6371 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
6373 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6374 New functions for fast thread specific data within libc.
6376 * internals.h: Add new array p_libc_specific to struct
6377 _pthread_descr_struct.
6379 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6381 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
6383 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6384 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6386 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
6388 * internals.h (struct _pthread_descr_struct): Add definitions for
6389 two-level specific key handling.
6390 * manager.c (pthread_handle_create): Initialize specific memory array.
6391 * specific.c: Implement two-level key handling.
6392 * weaks.c: Don't provide dummy key handling.
6393 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6394 Add definition of __libc_key_t.
6395 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6397 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6398 PTHREAD_DESTRUCTOR_ITERATIONS.
6400 * manager.c (pthread_handle_create): Compare mmap result with
6403 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6404 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6406 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
6408 sysdeps/sparc -> sysdeps/sparc/sparc32
6409 sysdeps/sparc64 -> sysdeps/sparc/sparc64
6411 * internals.h: Change definition of THREAD_SELF to be an expression,
6412 not a statement that did a return.
6413 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6414 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6415 Follow Solaris and use a "system reserved" register (%g6) to hold
6416 the thread descriptor.
6417 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6419 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
6421 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
6422 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6423 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6425 * semaphore.c: Include spinlock.h only when needed.
6427 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6428 keys for entries not in use.
6430 * weaks.c: Implement key handling functions for real.
6432 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
6434 Initial sparc64-linux support:
6435 * sysdeps/sparc64/Implies: New file.
6436 * sysdeps/sparc64/pt-machine.h: Likewise.
6438 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
6440 * semaphore.c: Include spinlock.h at correct place.
6443 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
6445 The Great Bit File Move:
6446 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6447 * sysdeps/powerpc/semaphorebits.h: Likewise.
6448 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6449 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6450 * sysdeps/pthread/libc-lock.h: -> bits/
6451 * sysdeps/pthread/stdio-lock.h: Likewise.
6452 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6453 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6454 * semaphore.h: Likewise.
6455 * sysdeps/pthread/pthread.h: Likewise.
6457 * lockfile.c: <foo.h> -> <bits/foo.h>.
6458 * semaphore.h: Likewise.
6460 * Makefile: (headers): foo.h -> bits/foo.h.
6461 * sysdeps/pthread/Makefile: Likewise.
6463 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6465 * semaphore.c (sem_init): Set sem_spinlock only if available.
6467 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6470 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
6472 Update from LinuxThreads 0.6.
6474 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6475 and __sched_get_priority_min instead of names without `__'.
6477 * manager.c: Rewrite large parts to implement opaque pthread_t.
6479 * cancel.c: Adapt for opaque pthread_t type.
6480 * condvar.c: Likewise.
6481 * errno.c: Likewise.
6483 * mutex.c: Likewise.
6484 * pthread.c: Likewise.
6485 * signals.c: Likewise.
6486 * specific.c: Likewise.
6487 * restart.h: Likewise.
6488 * queue.h: Likewise.
6489 * Examples/ex3.c: Likewise.
6490 * Examples/ex4.c: Likewise.
6491 * sysdeps/pthread/pthread.h: Likewise.
6493 * pthread.c: Accumulate time for all threads in thread manager.
6495 * semaphore.c: Implement fallback implementation for architectures
6496 sometimes missing compare-exchange operations.
6498 * cancel.c (pthread_cancel): Validate handle argument.
6499 * join.c (pthread_join): Likewise.
6500 (pthread_detach): Likewise.
6501 * signals.c (pthread_kill): Likewise.
6503 * spinlock.h (acquire): Use __sched_yield not sched_yield.
6505 * queue.h (enqueue): Enqueue thread according to priority.
6507 * internals.c (struct pthread_start_args): New struct for passing
6508 args to cloning function.
6509 (struct _pthread): Rename to _pthread_descr_struct and adapt for
6512 * Examples/Makefile (clean): Pass -f option to rm.
6514 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6515 and define TEST_FOR_COMPARE_AND_SWAP.
6516 * sysdeps/i386/i486/pt-machine.h: Removed.
6518 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6521 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
6523 * restart.h (suspend): Clear p_signal before suspending.
6524 (suspend_with_cancellation): Likewise.
6525 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6527 * weaks.c: Make __pthread_key_create return 1.
6528 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6529 __libc_getspecific, __libc_setspecific, and __libc_key_t.
6530 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6533 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
6535 * sysdeps/sparc/pt-machine (RELEASE): Fix.
6537 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
6539 * sysdeps/powerpc/Implies: Added.
6540 * sysdeps/powerpc/pt-machine.h: Added.
6541 * sysdeps/powerpc/semaphorebits.h: Added.
6543 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
6545 * pthread.c (__pthread_initial_thread): Correct
6547 (__pthread_manager_thread): Likewise.
6548 Reported by Andreas Jaeger.
6550 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
6552 Since sigset_t no longer fits in a register, we can't pass in the
6553 thread's initial mask so easily. Take this opportunity to simplify
6554 the clone implementation by only accepting a single void* argument.
6556 * manager.c (__pthread_manager): Put thread vitals in the thread
6557 struct instead of as arguments through clone.
6558 (pthread_start_thread): Look for them there.
6559 * internals.h (struct _pthread): Add p_initial_fn,
6560 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
6561 * pthread.c (pthread_initialize_manager): Revise clone invocation.