1 2005-04-27 Roland McGrath <roland@redhat.com>
3 * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid)
4 [__NR_clock_getres]: Use kernel-supplied CPU clocks if available.
6 2005-03-31 Jakub Jelinek <jakub@redhat.com>
8 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Use
9 functionally equivalent, but shorter instructions.
11 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
13 * sysdeps/mips/tls.h: New file.
14 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
16 2005-03-21 GOTO Masanori <gotom@debian.or.jp>
18 * linuxthreads/sysdeps/m68k/Makefile: Remove to delete
19 unneeded o-iterator thing.
21 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
23 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Add local _init
26 2005-03-05 Ulrich Drepper <drepper@redhat.com>
28 * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Unconditionally
31 2005-03-05 Roland McGrath <roland@redhat.com>
33 * sysdeps/i386/Makefile (CFLAGS-pt-initfini.s): Use $(cc-mtune).
35 2005-03-05 Jakub Jelinek <jakub@redhat.com>
37 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Rework for GCC 4.
39 2005-02-09 Daniel Jacobowitz <dan@codesourcery.com>
42 * descr.h (__pthread_find_self, thread_self): Mark as pure
45 2005-02-07 Jakub Jelinek <jakub@redhat.com>
48 * specific.c (pthread_key_delete): If pthread_create has not been
49 called yet, clear p_specific for the current thread.
50 * Makefile (tests): Add tst-tsd1.
51 * tst-tsd1.c: New test.
53 2005-01-08 Andreas Jaeger <aj@suse.de>
55 * pthread.c (init_one_static_tls): Adjust initialization of DTV
56 entry for static tls deallocation fix.
58 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
59 also contains information whether the memory pointed to is static
60 TLS or not, include <stdbool.h>.
61 * sysdeps/i386/tls.h: Likewise.
62 * sysdeps/ia64/tls.h: Likewise.
63 * sysdeps/powerpc/tls.h: Likewise.
64 * sysdeps/s390/tls.h: Likewise.
65 * sysdeps/sh/tls.h: Likewise.
66 * sysdeps/sparc/tls.h: Likewise.
67 * sysdeps/x86_64/tls.h: Likewise.
69 2004-12-21 Jakub Jelinek <jakub@redhat.com>
71 * Makefile (tests): Add tst-align.
72 * tst-align.c: New test.
73 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Add
74 -mpreferred-stack-boundary=4.
76 2004-12-12 Ulrich Drepper <drepper@redhat.com>
78 * internals.h: Include <stdbool.h> to match includes used in nptl.
80 2004-12-01 Jakub Jelinek <jakub@redhat.coM.
82 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
83 _POSIX_THREAD_CPUTIME): Define to 0.
84 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
85 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
86 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
87 __timer_signal_thread_tclk): Remove.
88 (init_module): Remove their initialization.
89 (thread_cleanup): Remove their cleanup assertions.
90 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
91 __timer_signal_thread_tclk): Remove.
92 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
93 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
94 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
95 * tst-clock1.c (do_test): Check for availability of CPU clock.
97 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
99 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use.
100 * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
102 2004-12-02 Roland McGrath <roland@redhat.com>
104 * Makefile (libpthread-nonshared): Variable removed.
105 ($(objpfx)libpthread_nonshared.a): Target removed.
106 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
107 These are now handled by generic magic from
108 libpthread-static-only-routines being set.
110 2004-11-27 Ulrich Drepper <drepper@redhat.com>
112 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
113 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
114 _POSIX_THREAD_PRIO_PROTECT): Define.
115 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
116 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
117 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
119 2004-11-26 Jakub Jelinek <jakub@redhat.com>
121 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
122 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
123 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
124 _POSIX_TYPED_MEMORY_OBJECTS): Define.
125 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
126 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
127 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
129 2004-11-05 Maciej W. Rozycki <macro@mips.com>
131 * sysdeps/mips/pspinlock.c: Include <sgidefs.h>. Use _ABIO32,
132 _ABIN32 and _ABI64 for ABI selection throughout.
133 * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
134 ABI selection throughout.
136 2004-10-18 Roland McGrath <roland@redhat.com>
139 * Makefile (linuxthreads-CPPFLAGS): New variable;
140 adds -DIS_IN_linuxthreads=1.
141 * sysdeps/i386/tls.h: Protect "useldt.h" with
142 [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
143 * sysdeps/i386/i686/pt-machine.h: Revert last change.
145 2004-10-14 Jakub Jelinek <jakub@redhat.com>
147 * sysdeps/pthread/errno-loc.c: Don't undef #errno
148 if RTLD_PRIVATE_ERRNO.
150 2004-10-05 Dwayne Grant McConnell <dgm69@us.ibm.com>
152 * pthread.c: Mask restart signal during cancel signal handler.
154 2004-10-05 Jakub Jelinek <jakub@redhat.com>
156 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
157 _POSIX_THREAD_CPUTIME): Define to 0.
159 2004-10-04 Ulrich Drepper <drepper@redhat.com>
161 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
162 and _POSIX_THREAD_CPUTIME to zero.
163 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
165 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
166 _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
167 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
168 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
169 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
171 2004-09-25 Roland McGrath <roland@redhat.com>
174 * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
175 [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
177 2004-09-24 Roland McGrath <roland@redhat.com>
180 * sysdeps/i386/tls.h: Move #include "useldt.h" outside
181 of [__ASSUME_LDT_WORKS > 0] test.
182 Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
184 2004-09-21 Roland McGrath <roland@redhat.com>
186 * Versions: Add comment about linuxthreads' frozen ABI.
188 2004-09-20 Ulrich Drepper <drepper@redhat.com>
190 * Versions: Remove exports for pthread_set*id_np functions.
191 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
193 * Makefile: Don't build pthread_set*id code for now.
195 2004-09-19 Ulrich Drepper <drepper@redhat.com>
197 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
198 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
199 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
200 and pthread_setresuid_np.
201 * pthread_setgid_np.c: New file.
202 * pthread_setuid_np.c: New file.
203 * pthread_setegid_np.c: New file.
204 * pthread_seteuid_np.c: New file.
205 * pthread_setregid_np.c: New file.
206 * pthread_setreuid_np.c: New file.
207 * pthread_setresgid_np.c: New file.
208 * pthread_setresuid_np.c: New file.
209 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
210 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
211 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
212 and pthread_setresuid_np.
213 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
214 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
215 pthread_setregid, and pthread_setresgid.
217 2004-09-12 Ulrich Drepper <drepper@redhat.com>
219 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
221 * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
222 for __USE_XOPEN2K. [BZ #320]
224 2004-09-04 Jakub Jelinek <jakub@redhat.com>
226 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
228 2004-09-07 Ulrich Drepper <drepper@redhat.com>
230 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
231 the initialization function might throw.
233 2004-08-30 Roland McGrath <roland@frob.com>
235 * Makefile (libpthread-abi-frozen): New variable.
237 2004-08-26 Roland McGrath <roland@redhat.com>
239 * configure.in: New file. If nptl add-on is also selected, barf if
240 explicit and elide ourselves if implicit.
241 * configure: Now generated.
243 2004-08-25 Richard Sandiford <rsandifo@redhat.com>
245 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
246 __local_multiple_threads): Fix definitions for IS_IN_librt.
247 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
249 2004-08-22 Andreas Schwab <schwab@suse.de>
251 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
252 Save gp around CENABLE/CDISABLE calls.
254 2004-08-15 Roland McGrath <roland@frob.com>
256 * pthread_atfork.c: Update copyright terms including special exception
257 for these trivial files, which are statically linked into executables
258 that use dynamic linking for the significant library code.
260 2004-08-09 Jakub Jelinek <jakub@redhat.com>
262 * libc-tsd.c: Move resolv.h include before the #if.
263 (__res_maybe_init): New function. Add libc_hidden_def.
265 2004-08-02 Ulrich Drepper <drepper@redhat.com>
267 * linuxthreads.texi (Cleanup Handlers): Fix typo.
268 Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
270 2004-07-23 Jakub Jelinek <jakub@redhat.com>
273 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
274 instead of clockid_t.
276 2004-07-21 Roland McGrath <roland@redhat.com>
278 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
280 2004-07-02 Roland McGrath <roland@redhat.com>
282 * configure: Don't exit.
284 2004-07-20 Alexandre Oliva <aoliva@redhat.com>
286 * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
288 * sysdeps/mips/atomicity.h: Likewise.
290 2004-07-19 Alexandre Oliva <aoliva@redhat.com>
292 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
293 Remove redundant override that missed -g0.
295 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
297 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
298 (__local_multiple_threads): Define for librt.
299 (SINGLE_THREAD_P): Likewise.
301 2004-07-07 Jakub Jelinek <jakub@redhat.com>
303 * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
304 using other thread's clock.
305 * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
306 * ptclock_settime.c (__pthread_clock_settime): Likewise.
307 * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
309 Reported by Bernd Schmidt <bernds@redhat.com>.
310 * Makefile (librt-tests): Add tst-clock1.
311 * tst-clock1.c: New test.
313 * sysdeps/x86_64/Versions: New file.
314 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
315 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
317 2004-04-16 Andreas Schwab <schwab@suse.de>
319 * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
321 2004-07-05 Jakub Jelinek <jakub@redhat.com>
323 * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
324 __pthread_spin_trylock): Use constraint "m" instead of "0" for
326 * sysdeps/ia64/pt-machine.h (__compare_and_swap,
327 __compare_and_swap_with_release_semantic, testandset): Use
328 constraint "m" instead of "0" for futex.
330 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
332 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
333 branch offset for a PLT entry.
334 (CDISABLE): Likewise.
336 2004-05-31 Andreas Jaeger <aj@suse.de>
338 * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
339 Set to -fno-unit-at-a-time.
340 Patch by Dan Kegel <dank@kegel.com>.
342 2004-05-04 Jakub Jelinek <jakub@redhat.com>
344 * tst-stack1.c: Don't include mcheck.h.
345 (do_test): Make sure user defined stacks aren't reused,
346 don't free them at the end. [BZ #110]
348 2004-05-02 Jakub Jelinek <jakub@redhat.com>
350 * manager.c: Include not-cancel.h.
351 (__pthread_manager): Use read_not_cancel instead of __libc_read.
352 (pthread_start_thread, __pthread_manager_sighandler): Use
353 write_not_cancel instead of __libc_write.
354 (pthread_reap_children): Use waitpid_not_cancel instead of
356 * pthread.c: Include not-cancel.h.
357 (__pthread_initialize_minimal, __pthread_create_2_1,
358 pthread_onexit_process, __pthread_message): Use
359 write_not_cancel instead of __libc_write.
360 (__pthread_initialize_manager): Likewise. Use close_not_cancel
361 instead of __libc_close.
362 (__pthread_reset_main_thread): Use close_not_cancel instead of
364 * join.c: Include not-cancel.h.
365 (__pthread_do_exit, pthread_join, pthread_detach): Use
366 write_not_cancel instead of __libc_write.
367 * semaphore.c: Include not-cancel.h.
368 (__new_sem_post): Use write_not_cancel instead of __libc_write.
369 * specific.c: Include not-cancel.h.
370 (pthread_key_delete): Use write_not_cancel instead of __libc_write.
372 2004-05-01 Jakub Jelinek <jakub@redhat.com>
374 * Versions (libc): Add __on_exit and __libc_sigaction.
376 2004-04-28 Jakub Jelinek <jakub@redhat.com>
378 * semaphore.c (sem_timedwait): Return -1 and set errno instead of
379 returning error number [BZ #133]. Patch by <rmhaddad@yahoo.com>.
381 2004-04-22 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
383 * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
384 reference in PIC case.
386 2004-04-20 Jakub Jelinek <jakub@redhat.com>
388 * oldsemaphore.c (SEM_VALUE_MAX): Remove.
390 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
392 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
393 for librt. Save the return value to a safe register.
394 (CDISABLE): Define for librt. Set the function argument correctly.
396 2004-04-18 Jakub Jelinek <jakub@redhat.com>
398 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
399 (PSEUDO_CANCEL): Define.
401 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
402 CDISABLE): For librt, append @PLT.
404 2004-04-17 Jakub Jelinek <jakub@redhat.com>
406 * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
408 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
409 return it_value { 0, 0 }.
410 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
412 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
413 assertion for SIGEV_NONE.
414 (thread_attr_compare): Compare all attributes, not just a partial
417 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
419 2004-04-17 Ulrich Drepper <drepper@redhat.com>
421 * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
423 2004-04-16 Ulrich Drepper <drepper@redhat.com>
425 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
427 2004-04-13 Jakub Jelinek <jakub@redhat.com>
429 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
431 2004-04-12 Ulrich Drepper <drepper@redhat.com>
433 * sysdeps/unix/sysv/linux/mq_notify.c: New file.
435 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
437 (CDISABLE): Likewise.
439 2004-04-08 Jakub Jelinek <jakub@redhat.com>
441 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
442 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
443 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
444 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
445 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
447 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
448 (_POSIX_MESSAGE_PASSING): Define.
450 2004-04-10 Andreas Jaeger <aj@suse.de>
452 * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
453 to avoid warnings with GCC 3.5.
455 2004-04-09 Steven Munroe <sjmunroe@us.ibm.com>
457 * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
458 __thread_self assignment.
459 (THREAD_DTV): Replace __thread_register with __thread_self.
460 (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
463 2004-04-08 Alexandre Oliva <aoliva@redhat.com>
465 * signals.c (pthread_sigmask): Don't ever block or mask
468 2004-03-11 Steven Munroe <sjmunroe@us.ibm.com>
470 * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
472 2004-03-23 Ulrich Drepper <drepper@redhat.com>
474 * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
475 * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
477 2004-03-12 Ulrich Drepper <drepper@redhat.com>
479 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
480 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
481 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
482 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
484 2004-03-08 Andreas Jaeger <aj@suse.de>
486 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
487 dl_osversion is readonly.
489 2004-03-07 Ulrich Drepper <drepper@redhat.com>
491 * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
493 * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
495 2004-02-20 Steven Munroe <sjmunroe@us.ibm.com>
497 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
498 valid for SHARED case. Correct spelling of __vmx_longjmp.
500 * sysdeps/powerpc/pspinlock.c: Move from here.
501 * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
502 * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
503 * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
504 and __compare_and_swap32_with_release_semantics.
506 2004-02-20 Jakub Jelinek <jakub@redhat.com>
508 * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
509 (tests): Remove $(objpfx)tst-stack1-mem.
510 (tst-stack1-ENV): Remove.
511 ($(objpfx)tst-stack1-mem): Remove.
513 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
514 (__syscall_error_handler2): Call CDISABLE.
515 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
516 (__syscall_error_handler2): Call CDISABLE.
518 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
520 2004-02-10 Steven Munroe <sjmunroe@us.ibm.com>
522 * Makefile (libpthread-routines): Add ptcleanup.
523 * ptlongjmp.c: Removed.
524 * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
525 * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
526 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
527 Version longjmp, siglongjmp for GLIBC_2.3.4.
528 * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
530 2004-01-22 Andreas Jaeger <aj@suse.de>
532 * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
533 (__pthread_release): Likewise.
535 2004-01-16 Richard Henderson <rth@redhat.com>
537 * attr.c: Include ldsodefs.h.
538 (pthread_getattr_np): Don't declare __libc_stack_end.
540 2004-01-09 Steven Munroe <sjmunroe@us.ibm.com>
542 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
543 [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
544 __lib*_multiple_threads.
545 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
546 [!HAVE_TLS_SUPPORT]: Likewise.
548 2004-01-13 Roland McGrath <roland@redhat.com>
550 * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
553 2004-01-10 Andreas Jaeger <aj@suse.de>
555 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
557 2004-01-01 Andreas Jaeger <aj@suse.de>
559 * Makefile (generated): Add missing files.
561 2003-12-31 Ulrich Drepper <drepper@redhat.com>
563 * attr.c (pthread_getattr_np): Make sure stack info returned for
564 main thread does not overlap with any other VMA.
565 Patch by Jakub Jelinek.
567 2003-12-29 Jakub Jelinek <jakub@redhat.com>
569 * sysdeps/ia64/tls.h: Include dl-sysdep.h.
570 (INIT_SYSINFO): Define.
571 (TLS_INIT_TP): Use it.
573 2003-12-28 Carlos O'Donell <carlos@baldric.uwo.ca>
575 * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
577 2003-12-26 Jakub Jelinek <jakub@redhat.com>
579 * sysdeps/pthread/pthread.h (pthread_setcancelstate,
580 pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
582 * semaphore.h (sem_wait, sem_timedwait): Likewise.
584 2003-12-17 Jakub Jelinek <jakub@redhat.com>
586 * manager.c (pthread_free): Call _dl_deallocate_tls even for
588 * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
590 (pthread_onexit_process): Update comment.
591 * Makefile (tests): Add tst-stack1. Depend on $(objpfx)tst-stack1-mem.
592 (generated): Add tst-stack1.mtrace and tst-stack1-mem.
593 (tst-stack1-ENV): Set.
594 ($(objpfx)tst-stack1-mem): New.
595 * tst-stack1.c: New test.
597 2003-12-16 Steven Munroe <sjmunroe@us.ibm.com>
599 * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
600 conditional so MULTIPLE_THREADS_OFFSET is generated for both.
601 * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
602 so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
603 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
606 2003-12-04 Steven Munroe <sjmunroe@us.ibm.com>
608 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
609 (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
611 2003-12-10 David Mosberger <davidm@hpl.hp.com>
613 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
614 message. Add include of <stddef.h>.
615 (INIT_NEW_WAY): New macro.
616 (INIT_OLD_WAY): Likewise.
617 (_init): Add unwind directives. Invoke
618 __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
620 (_init_EPILOG_BEGINS): Add unwind-directives. Drop unused .regstk
622 (_fini): Add unwind directives. Drop unnecessary .align 16
623 directive (bundles are always 16-byte aligned).
624 (_fini_EPILOG_BEGINS): Add unwind-directives.
626 2003-11-19 David Mosberger <davidm@hpl.hp.com>
628 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
630 2003-12-10 Andreas Jaeger <aj@suse.de>
631 Ruediger Oertel <ro@suse.de>
633 * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
635 2003-11-30 Andreas Jaeger <aj@suse.de>
637 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
638 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
641 2003-11-04 Jakub Jelinek <jakub@redhat.com>
643 * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
644 __libc_sigaction if it has been one of the special values before.
646 2003-10-06 Carlos O'Donell <carlos@baldric.uwo.ca>
648 * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
649 (__pthread_find_self): Likewise.
650 * manager.c (thread_segment): _STACK_GROWS_UP case added.
652 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
654 * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
656 2003-10-10 Carlos O'Donell <carlos@baldric.uwo.ca>
658 * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
660 2003-10-07 Jakub Jelinek <jakub@redhat.com>
662 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
664 (SAVE_OLDTYPE_0): Fix a typo.
666 2003-10-02 Ulrich Drepper <drepper@redhat.com>
668 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
671 2003-10-02 Jakub Jelinek <jakub@redhat.com>
673 * Makefile (tests): Add tst-cancel8.
674 * tst-cancel8.c: New test.
676 2003-10-02 Ulrich Drepper <drepper@redhat.com>
678 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
679 restoring of the old cancellation type.
681 2003-09-10 Chris Demetriou <cgd@broadcom.com>
683 * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
685 2003-09-30 Jakub Jelinek <jakub@redhat.com>
687 * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
688 mutex_lock, mutex_trylock, mutex_unlock): Remove.
690 2003-09-27 Wolfram Gloger <wg@malloc.de>
692 * sysdeps/pthread/malloc-machine.h: New file.
694 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
696 * attr.c (__pthread_attr_init_2_1): Double __guardsize size
697 if NEED_SEPARATE_REGISTER_STACK is defined.
699 2003-09-22 Philip Blundell <philb@gnu.org>
701 * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
702 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
704 * pthread.c (__pthread_elements): Initialise these new elements.
705 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
707 (__libc_cleanup_pop): Likewise.
709 2003-09-22 Jakub Jelinek <jakub@redhat.com>
711 * attr.c: Include stdlib.h.
713 2003-09-18 Jakub Jelinek <jakub@redhat.com>
715 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
717 * tst-attr1.c: New test.
718 * Makefile (tests): Add tst-attr1.
720 2003-09-17 Philip Blundell <philb@gnu.org>
722 * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
723 libpthread is loaded. Elide backwards compatibility code when not
726 2003-09-17 Jakub Jelinek <jakub@redhat.com>
728 * descr.h (manager_thread): Rename to...
729 (__pthread_manager_threadp): ... this.
730 * pthread.c (manager_thread): Define to __pthread_manager_threadp.
731 (__pthread_manager_threadp): New variable.
732 * internals.h (__manager_thread): Define to
733 __pthread_manager_threadp if USE_TLS.
735 2003-09-15 Jakub Jelinek <jakub@redhat.com>
737 * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
738 CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
739 -mpreferred-stack-boundary=4.
741 2003-09-16 Ulrich Drepper <drepper@redhat.com>
743 * attr.c (pthread_getattr_np): Correctly fill in the stack-related
744 values for the initial thread.
746 2003-09-17 Jakub Jelinek <jakub@redhat.com>
748 * pthread.c (manager_thread): Remove static, add attribute_hidden.
749 (thread_self_stack): Rename to...
750 (__pthread_self_stack): ... this. Remove static.
751 (pthread_handle_sigcancel): Use check_thread_self ().
752 (pthread_handle_sigrestart): Likewise.
753 * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
755 * descr.h (manager_thread): Declare.
756 * internals.h (__pthread_self_stack): New prototype.
757 (__manager_thread): Define.
758 (check_thread_self): New function.
760 2003-09-15 Jakub Jelinek <jakub@redhat.com>
762 * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
763 (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
765 2003-09-12 Jakub Jelinek <jakub@redhat.com>
767 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
768 (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
769 __SLONGWORD_TYPE otherwise.
771 2003-09-11 Steven Munroe <sjmunroe@us.ibm.com>
773 * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
774 [READ_MEMORY_BARRIER]: Define.
775 [WRITE_MEMORY_BARRIER]: Define.
777 2003-09-10 Jakub Jelinek <jakub@redhat.com>
779 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
780 ptr___pthread_cond_timedwait to the end of the structure to avoid
781 breaking Wine unnecessarily.
783 2003-09-08 Jakub Jelinek <jakub@redhat.com>
785 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
787 2003-09-02 Jakub Jelinek <jakub@redhat.com>
789 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
790 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
791 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
792 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
793 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
794 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
795 * attr.c (__old_pthread_attr_setstacksize,
796 __old_pthread_attr_setstack): New functions.
797 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
798 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
799 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
800 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
801 * tststack.c: Include limits.h and sys/param.h.
802 (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
804 * barrier.c (__pthread_barrierattr_getpshared): Always
805 return PTHREAD_PROCESS_PRIVATE.
806 (pthread_barrierattr_setpshared): Return EINVAL if pshared
807 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
809 2003-09-02 Ulrich Drepper <drepper@redhat.com>
811 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
812 (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
815 * barrier.c (pthread_barrierattr_setpshared): We don't handle
816 inter-process barriers.
818 2003-09-01 Jakub Jelinek <jakub@redhat.com>
820 * Makefile (tests): Add tst-tls1.
821 (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
822 ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
823 ($(objpfx)tst-tls1): New.
824 ($(objpfx)tst-tls2.out): Likewise.
825 (tests): Depend on $(objpfx)tst-tls2.out.
826 * tst-tls1.c: New test.
828 * tst-tls1mod.c: New.
829 * tst-tls1moda.c: New.
830 * tst-tls1modb.c: New.
831 * tst-tls1modc.c: New.
832 * tst-tls1modd.c: New.
833 * tst-tls1mode.c: New.
834 * tst-tls1modf.c: New.
835 * tst-tls2.sh: New test.
837 * internals.h (__pthread_cond_timedwait): New prototype.
838 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
839 ptr___pthread_cond_timedwait.
840 * pthread.c (__pthread_functions): Initialize them.
841 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
842 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
843 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
844 pthread_cond_timedwait@@GLIBC_2.3.2.
846 2003-08-27 Ulrich Drepper <drepper@redhat.com>
848 * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
849 pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
850 __THROW to match NPTL.
852 2003-08-13 Ulrich Drepper <drepper@redhat.com>
854 * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
855 -DBROKEN_THREAD_SIGNALS.
857 2003-08-11 Steven Munroe <sjmunroe@us.ibm.com>
859 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
860 Correct spelling of per thread resolver state.
862 2003-08-07 Jakub Jelinek <jakub@redhat.com>
864 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
865 (__rtld_lock_default_lock_recursive,
866 __rtld_lock_default_unlock_recursive): Define.
867 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
868 __rtld_lock_unlock_recursive): Define using
869 GL(_dl_rtld_*lock_recursive).
870 * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
871 and _dl_rtld_unlock_recursive. Lock GL(_dl_load_lock) the same
872 number of times as GL(_dl_load_lock) using non-mt implementation was
875 2003-07-31 Jakub Jelinek <jakub@redhat.com>
877 * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
878 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
880 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
882 * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
884 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
885 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
886 PTHREAD_STACK_MIN in comments.
888 * sysdeps/alpha/pt-machine.h (PT_EI): Add
889 __attribute__((always_inline)).
890 * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
891 * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
892 * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
893 * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
894 * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
895 * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
896 * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
897 * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
898 * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
899 * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
900 * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
901 * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
902 * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
903 * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
904 * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
905 * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
906 * spinlock.h (__pthread_set_own_extricate_if): Likewise.
907 * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
909 * Examples/ex13.c (main): Change res type to void * to avoid
911 * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
913 2003-07-30 Jakub Jelinek <jakub@redhat.com>
915 * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
917 (pthread_initialize): Initialize GL(dl_init_static_tls).
919 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
921 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
922 before __timer_dealloc.
923 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
924 Don't call list_unlink.
926 2003-07-29 Roland McGrath <roland@redhat.com>
928 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
930 2003-07-25 Roland McGrath <roland@redhat.com>
932 * manager.c (pthread_start_thread): Fix typo in last change.
934 2003-07-14 Guido Guenther <agx@sigxcpu.org>
936 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
937 use L() for local labels.
939 2003-07-22 Jakub Jelinek <jakub@redhat.com>
941 * descr.h (struct _pthread_descr_struct): Provide p_res member
942 even if USE_TLS && HAVE___THREAD.
943 * sysdeps/pthread/res-state.c (__res_state): Return __resp
945 * manager.c: Include resolv.h.
946 (pthread_start_thread): Initialize __resp.
947 * libc-tls-loc.c (__res_state): Return __resp.
948 * Makefile (tests): Add tst-_res1.
949 (modules-names, extra-objs, test-extras, test-modules): Add support
951 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
952 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
954 * tst-_res1.c: New test.
955 * tst-_res1mod1.c: New test.
956 * tst-_res1mod2.c: New test.
958 2003-07-20 Ulrich Drepper <drepper@redhat.com>
960 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
963 * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
965 2003-07-14 Ulrich Drepper <drepper@redhat.com>
967 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
968 in test for compilation in libc.
970 2003-07-04 Jakub Jelinek <jakub@redhat.com>
972 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
973 different symbol for the cancellation syscall wrapper and
974 non-cancellation syscall wrapper.
975 (PSEUDO_END): Define.
977 2003-07-05 Richard Henderson <rth@redhat.com>
979 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
981 2003-06-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
983 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
986 2003-06-21 Andreas Schwab <schwab@suse.de>
988 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
991 2003-06-20 Richard Henderson <rth@redhat.com>
993 * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
994 Remove ptw-osf_sigprocmask.
996 2003-06-18 Jakub Jelinek <jakub@redhat.com>
998 * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
999 __librt_disable_asynccancel): Declare.
1000 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
1002 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
1004 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1005 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1006 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1007 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1008 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1009 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1010 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1011 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1012 * sysdeps/x86_64/tcb-offsets.sym: New file.
1013 * sysdeps/x86_64/Makefile: New file.
1014 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
1015 * Versions (libc): Export __librt_enable_asynccancel,
1016 __librt_disable_asynccancel and __librt_multiple_threads as
1018 * libc-cancellation.c (__librt_multiple_threads,
1019 __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
1021 2003-06-12 Steven Munroe <sjmunroe@us.ibm.com>
1023 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1024 (SINGLE_THREAD_P): Replace @ got notation with @toc.
1026 2003-06-11 Ulrich Drepper <drepper@redhat.com>
1028 * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
1029 initializer [PR libc/5052].
1031 2003-06-09 Andreas Schwab <schwab@suse.de>
1033 * Makefile: Move inclusion of ../Rules down after extra-objs is
1036 2003-06-06 Ulrich Drepper <drepper@redhat.com>
1038 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
1039 5+ arg syscalls only needed for PIC.
1040 Patch by Ralph Siemsen <ralphs@netwinder.org>.
1042 2003-06-05 Richard Henderson <rth@redhat.com>
1044 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1045 and require CFI assembler directives.
1046 * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
1048 2003-05-30 Andreas Jaeger <aj@suse.de>
1050 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
1051 (SAVESTK_0): Add CFI directives.
1052 (SAVESTK_3): Likewise.
1053 (SAVESTK_5): Likewise.
1054 (RESTSTK_0): Likewise.
1055 (RESTSTK_3): Likewise.
1056 (RESTSTK_5): Likewise.
1058 2003-05-05 Ulrich Drepper <drepper@redhat.com>
1060 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
1063 2003-05-04 Roland McGrath <roland@redhat.com>
1065 * Makefile ($(objpfx)../libc.so): New target.
1067 2003-04-26 Ulrich Drepper <drepper@redhat.com>
1069 * pthread.c (__pthread_initialize_manager): Remove one last
1070 p_multiple_threads call.
1072 2003-04-22 Jakub Jelinek <jakub@redhat.com>
1074 * pthread.c (__pthread_initialize_manager): Subtract
1075 TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
1076 * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
1077 instead of sizeof (pthread_descr).
1078 (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
1079 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
1080 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1082 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1084 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1086 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1088 (NO_TLS_OFFSET): Define.
1090 2003-04-22 Roland McGrath <roland@redhat.com>
1092 * Makeconfig (shared-thread-library): Reverse link order to work
1095 2003-04-20 Ulrich Drepper <drepper@redhat.com>
1097 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
1098 compiler knows we use the ldt_entry variable and that the syscall
1099 modifies the memory.
1101 * internals.h: Split pthread_functions definition into...
1102 * sysdeps/pthread/pthread-functions.h: ...new file.
1104 * sysdeps/i386/useldt.h: Include <sysdep.h>.
1106 2003-04-13 Jakub Jelinek <jakub@redhat.com>
1108 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1109 match changes in NPTL sysdep-cancel.h.
1111 2003-04-11 Roland McGrath <roland@redhat.com>
1113 * Makefile (multidir): Don't set the variable here with $(shell ...).
1114 ($(objpfx)multidir.mk): New target, generated makefile; include that.
1115 (generated): Append it.
1117 2003-04-10 Jakub Jelinek <jakub@redhat.com>
1119 * Makefile (multidir, crti-objs, crtn-objs): New variables.
1120 (generated-dirs): Add pathname component of multidir.
1121 (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1122 ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1123 ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1124 $(objpfx)$(multidir)/crtn.o): New.
1125 * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1126 * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1127 before-compile, generated): Don't generate and use specs.
1128 ($(objpfx)specs): Remove.
1130 2003-04-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
1132 * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1134 2003-04-03 Ulrich Drepper <drepper@redhat.com>
1136 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1137 missing ; after ENTRY use [PR libc/4997].
1139 2003-04-03 Jakub Jelinek <jakub@redhat.com>
1141 * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1142 in case the parent blocked it.
1144 2003-04-02 Jakub Jelinek <jakub@redhat.com>
1146 * Makefile (libpthread-routines): Add pthread_atfork.
1147 (libpthread-static-only-routines): Add pthread_atfork.
1149 2003-04-01 Jakub Jelinek <jakub@redhat.com>
1151 * pthread.c (__pthread_wait_for_restart_signal): Use
1152 __pthread_sigsuspend instead of sigsuspend.
1153 * internals.h (__pthread_sigsuspend): New prototype.
1154 * Makefile (libpthread-routines): Add pt-sigsuspend.
1155 (tests): Add tst-cancel7.
1156 * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1157 * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1158 * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1159 * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1160 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1161 * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1162 * tst-cancel7.c: New test.
1164 2003-03-31 Alexandre Oliva <aoliva@redhat.com>
1166 * alloca_cutoff.c: Include internals.h.
1167 * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1168 * sysdeps/pthread/herrno-loc.c: Likewise.
1169 * sysdeps/pthread/res-state.c: Likewise.
1171 2003-03-25 Ulrich Drepper <drepper@redhat.com>
1173 * sysdeps/pthread/bits/typesizes.h: New file.
1174 * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1175 * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1177 2003-03-24 Daniel Jacobowitz <drow@mvista.com>
1179 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1180 (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1182 2003-03-22 Jakub Jelinek <jakub@redhat.com>
1184 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1186 2003-03-21 Daniel Jacobowitz <drow@mvista.com>
1188 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1189 (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1191 2003-03-21 Jakub Jelinek <jakub@redhat.com>
1193 * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1194 (TLS_SETUP_GS_SEGMENT): Fix a typo.
1196 2003-03-19 Ulrich Drepper <drepper@redhat.com>
1198 * sysdeps/pthread/Makefile: Fix cut&paste error.
1200 2003-03-18 Roland McGrath <roland@redhat.com>
1202 * Versions (libpthread: GLIBC_2.2): Remove
1203 pthread_barrierattr_getpshared, never really existed.
1204 (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1205 (libpthread: GLIBC_PRIVATE): ... here.
1207 2003-03-14 Jakub Jelinek <jakub@redhat.com>
1209 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1210 * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1213 2003-03-14 Alexandre Oliva <aoliva@redhat.com>
1215 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1217 * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1218 Handle 64-bit longs on n64.
1220 2003-03-07 Jakub Jelinek <jakub@redhat.com>
1222 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1223 __pthread_spin_trylock): Rewritten.
1225 2003-03-06 Ulrich Drepper <drepper@redhat.com>
1227 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1230 2003-03-02 Ulrich Drepper <drepper@redhat.com>
1232 * sysdeps/pthread/timer_create.c (timer_create): Return correct
1233 error for CPU clocks.
1235 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1236 _POSIX_MONOTONIC_CLOCK.
1237 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1239 2003-03-01 Roland McGrath <roland@redhat.com>
1241 * sysdeps/powerpc/powerpc64/pt-machine.h
1242 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1244 * sysdeps/powerpc/tls.h: Don't define those here.
1246 * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1247 tcbhead_t with multiple_threads member.
1248 [USE_TLS] (tcbhead_t): Define minimal one-word version.
1249 [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1250 * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1251 derive thread register offset of p_multiple_threads member.
1253 * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1254 Conditionalize p_header member on this.
1255 [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1256 * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1257 * sysdeps/sh/tls.h: Likewise.
1258 * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1259 * sysdeps/sh/tcb-offsets.sym: Likewise.
1260 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1261 (SINGLE_THREAD_P): Likewise.
1262 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1263 (SINGLE_THREAD_P): Likewise.
1264 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1265 (SINGLE_THREAD_P): Likewise.
1266 * pthread.c (__pthread_initialize_manager): Likewise.
1267 * manager.c (pthread_handle_create): Likewise.
1269 * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1272 2003-01-31 Steven Munroe <sjmunroe@us.ibm.com>
1274 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1275 Conditionalize .toc section magic on this.
1277 2003-02-21 Roland McGrath <roland@redhat.com>
1279 * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1280 instead of __rpc_thread_destroy.
1282 2003-02-21 Jakub Jelinek <jakub@redhat.com>
1284 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1285 __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1286 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1288 * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1289 to crti.o and crtn.o.
1290 * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1292 2003-02-21 Roland McGrath <roland@redhat.com>
1294 * Makefile (install-lib-ldscripts): New variable.
1296 2003-02-20 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1298 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1299 interprocedure branches.
1301 2003-02-19 Ulrich Drepper <drepper@redhat.com>
1303 * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1304 need the target thread's lock.
1306 2003-02-17 Ulrich Drepper <drepper@redhat.com>
1308 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1311 2003-02-17 Kevin B. Hendricks <kevin.hendricks@sympatico.ca>
1312 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1314 * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1315 * sysdeps/powerpc/tcb-offsets.sym: New file.
1316 * sysdeps/powerpc/tls.h: New file.
1317 * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1318 (ARCH_STACK_MAX_SIZE): Define.
1319 (THREAD_SELF): Define.
1320 (INIT_THREAD_SELF): Define.
1321 (THREAD_GETMEM): Define.
1322 (THREAD_GETMEM_NC): Define.
1323 (THREAD_SETMEM): Define.
1324 (THREAD_SETMEM_NC): Define.
1325 (__thread_self): Declare.
1326 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1327 for thread register.
1329 2003-02-14 Steven Munroe <sjmunroe@us.ibm.com>
1331 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1332 Check pthread_create existance, not __pthread_fork.
1334 2003-02-12 Ulrich Drepper <drepper@redhat.com>
1336 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1338 2003-02-10 Jakub Jelinek <jakub@redhat.com>
1340 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1341 pthread_create existance, not __pthread_fork.
1342 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1343 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1344 * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1345 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1347 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1348 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1349 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1350 Add .weak pthread_create.
1351 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1352 Check pthread_create existance, not __pthread_fork.
1353 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1354 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1355 __fork whenever libpthread.so is loaded.
1357 2003-02-09 Andreas Jaeger <aj@suse.de>
1359 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1360 Rework: %r9 is destroyed by functions so don't use it as
1361 temporary, align stack correctly, fix parameter for CDISABLE.
1363 2003-02-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1365 * sysdeps/sh/Makefile: New file.
1366 * sysdeps/sh/tcb-offsets.sym: Likewise.
1367 * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1368 of linuxthreads/descr.h after the definition of THREAD_SELF.
1369 (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1370 (TLS_TCB_SIZE): Set size of tcbhead_t.
1371 (TLS_PRE_TCB_SIZE): Define.
1372 (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1373 a member of thread structure.
1374 (THREAD_DTV): Likewise.
1375 (TLS_INIT_TP_EXPENSIVE): Remove.
1376 (TLS_INIT_TP): Set gbr register only.
1378 (INIT_THREAD_SELF): Likewise.
1379 (NONTLS_INIT_TP): New.
1380 * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1382 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1383 SYSCALL_INST_PAD macro after DO_CALL.
1384 (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1386 * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1387 whenever libpthread.so is loaded.
1389 2003-02-08 Andreas Schwab <schwab@suse.de>
1391 * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1392 libpthread.so is loaded.
1394 2003-02-07 Ulrich Drepper <drepper@redhat.com>
1396 * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1397 __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1398 no __NR_vfork definition.
1400 2003-02-07 Jakub Jelinek <jakub@redhat.com>
1402 * tst-popen2.c: New test.
1403 * Makefile (tests): Add tst-popen2.
1404 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1405 whenever libpthread.so is loaded.
1406 * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1407 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1408 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1409 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1411 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1412 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1413 * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1415 2003-02-05 Ulrich Drepper <drepper@redhat.com>
1417 * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1418 variable for non-libpthread case to the same value the
1419 pthread_once function would use.
1421 2003-02-03 Jakub Jelinek <jakub@redhat.com>
1423 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1424 BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1426 2003-02-04 Andreas Jaeger <aj@suse.de>
1428 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1431 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1433 * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1435 2003-01-30 Jakub Jelinek <jakub@redhat.com>
1437 * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1438 THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1440 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1441 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1442 * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1443 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1444 * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1445 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1446 * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1447 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1448 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1449 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1450 * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1451 THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1453 2003-01-27 Martin Schwidefsky <schwidefsky@de.ibm.com>
1455 * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1456 Define TLS versions.
1457 * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1459 * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1460 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1461 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1463 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1464 branch with 32 bit offset.
1465 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1467 2003-01-24 Jakub Jelinek <jakub@redhat.com>
1469 * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1470 as required by TLS ABI.
1471 * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1472 * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1473 TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1474 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1476 [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1477 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1478 instead of %g6 for thread pointer.
1479 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1480 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1481 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1483 2003-01-25 Guido Guenther <agx@sigxcpu.org>
1485 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1486 * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1488 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1490 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1491 reference to __fork.
1493 2003-01-17 Richard Henderson <rth@redhat.com>
1495 * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1496 (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1497 (TLS_PRE_TCB_SIZE): New.
1498 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1499 new ia64-style thread pointer layout.
1500 (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1501 (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1502 * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1505 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1507 * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1509 (NONTLS_INIT_TP): Revert last change.
1510 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1511 offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1513 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1515 * pthread.c (_pthread_initialize_minimal): Use
1516 GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1517 been already initialized.
1519 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1521 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1524 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1526 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1527 __libc_lock_init_recursive): Initialize fields directly.
1529 2003-01-15 Jakub Jelinek <jakub@redhat.com>
1531 * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1532 __fork to be far away from __vfork ifndef SHARED.
1533 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1535 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1536 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1537 Add a missing instruction.
1538 * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1539 branch to __fork even if __NR_vfork is not defined.
1541 2003-01-14 Ulrich Drepper <drepper@redhat.com>
1543 * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1546 2003-01-14 Steven Munroe <sjmunroe@us.ibm.com>
1548 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1550 2003-01-14 Jakub Jelinek <jakub@redhat.com>
1552 * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1554 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1556 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1557 unterminated string literals.
1558 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1560 2003-01-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
1562 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1563 (PSEUDO): Code reordering. Move CENABLE and CDISABLE literals from
1564 PSEUDO_END to PSEUDO.
1565 (PSEUDO_END): Remove.
1566 (SINGLE_THREAD_P): Save an instruction.
1567 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1568 parameter to SINGLE_THREAD_P call.
1569 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1572 2003-01-10 Andreas Schwab <schwab@suse.de>
1574 * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1576 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1578 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1579 backchain in pseudo_cancel. Minor code improvements.
1580 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1583 2003-01-10 Martin Schwidefsky <schwidefsky@de.ibm.com>
1585 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1586 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1588 2002-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1590 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1592 2002-01-09 Richard Henderson <rth@redhat.com>
1594 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1595 ret follows pseudo, and thus avoid branch-to-branch in cancel
1596 case. Use SYSCALL_ERROR_LABEL.
1598 2003-01-11 Philip Blundell <philb@gnu.org>
1600 * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1601 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1602 Correctly unstack lr.
1603 (UNDOARGS_5): Fix ordering of pushes and pops.
1604 (SINGLE_THREAD_P_PIC): New.
1605 (SINGLE_THREAD_P_INT): New.
1606 (SINGLE_THREAD_P): Implement in terms of above. Restore lr if it
1608 (PSEUDO): Use SINGLE_THREAD_P_INT.
1610 2003-01-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1612 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1614 2003-01-11 Jakub Jelinek <jakub@redhat.com>
1616 * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1617 [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1618 TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1619 INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1620 INIT_THREAD_SELF): Define.
1621 [HAVE_TLS_SUPPORT]: Include descr.h.
1622 (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1623 struct _pthread_descr_struct.
1624 * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1625 THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1627 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1629 * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1631 (__pthread_initialize_manager): Rename tcb to mgr.
1632 Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1633 _pthread_descr) below tcbp, otherwise to tcbp.
1634 * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1635 new_thread to be below _dl_allocate_tls (). Adjust new_thread back
1636 before freeing. Fix clone arguments if report_events and USE_TLS.
1637 (pthread_free): Adjust th back before freeing.
1639 2003-01-10 Steven Munroe <sjmunroe@us.ibm.com>
1641 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1642 * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1643 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1645 2003-01-09 Jakub Jelinek <jakub@redhat.com>
1647 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1648 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1649 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1650 [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1651 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1652 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1653 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1654 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1655 * tst-popen.c: New test.
1656 * Makefile (tests): Add tst-popen.
1658 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1660 * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1661 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1663 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1665 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1666 PSEUDO_PREPARE_ARGS. Fix branch condition after SINGLE_THREAD_P.
1668 2003-01-06 Philip Blundell <philb@gnu.org>
1670 * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1672 2003-01-06 Jakub Jelinek <jakub@redhat.com>
1674 * internals.h (LIBC_CANCEL_HANDLED): Define.
1675 * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1676 * signals.c (LIBC_CANCEL_HANDLED): Add.
1677 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1678 * tst-cancel-wrappers.sh: Remove all exceptions.
1680 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1682 2003-01-05 Andreas Schwab <schwab@suse.de>
1684 * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1687 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1689 (CENABLE): Likewise.
1690 (CDISABLE): Likewise.
1692 2003-01-05 Ulrich Drepper <drepper@redhat.com>
1694 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1695 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
1697 * Makefile (libc.so-no-z-defs): Define to yes.
1699 2003-01-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1701 * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1702 (tcbhead_t): Add multiple_threads member.
1703 (TLS_INIT_TP_EXPENSIVE): Define.
1704 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1705 strings. Remove unused code.
1706 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1708 2003-01-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
1710 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1711 * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1713 2003-01-04 Jakub Jelinek <jakub@redhat.com>
1715 * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1716 even if NOT_IN_libc is defined.
1718 2003-01-05 Jakub Jelinek <jakub@redhat.com>
1720 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1721 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1722 * sysdeps/s390/Makefile: New file.
1723 * sysdeps/s390/tcb-offsets.sym: New file.
1724 * sysdeps/s390/tls.h: New file.
1726 2003-01-03 Richard Henderson <rth@redhat.com>
1728 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1730 2003-01-03 Andreas Jaeger <aj@suse.de>
1732 * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1734 2003-01-03 Jakub Jelinek <jakub@redhat.com>
1736 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1738 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1740 * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1743 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1745 * internals.h (struct pthread_functions): Rename
1746 ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1747 * pthread.c (pthread_functions): Adjust.
1748 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1749 pthread_cond_*@GLIBC_2.0 compatibility symbols.
1750 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1751 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1752 and pthread_cond_wait.
1754 * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1756 (pthread_cond_t): Add __align member, shorten __padding.
1757 * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1758 __padding and __align too.
1760 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1762 * sysdeps/pthread/sigaction.c: New file.
1763 * sysdeps/unix/sysv/linux/raise.c: New file.
1764 * sysdeps/unix/sysv/linux/sigwait.c: New file.
1765 * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1766 weak_extern with #ifndef SHARED.
1767 * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1769 * signals.c (__sigaction): Renamed to...
1770 (__pthread_sigaction): ... this.
1771 (__sigaction): New strong alias, #ifdef SHARED only.
1772 (sigaction): Protect with #ifdef SHARED.
1773 (sigwait): Renamed to...
1774 (__pthread_sigwait): ... this.
1775 (sigwait): New strong alias, #ifdef SHARED only.
1776 (raise): Renamed to...
1777 (__pthread_raise): ... this.
1778 (raise): New strong alias, #ifdef SHARED only.
1779 * internals.h (__pthread_sigaction, __pthread_sigwait,
1780 __pthread_raise): New prototypes.
1781 (struct pthread_functions): Add ptr_pthread_sigaction,
1782 ptr_pthread_sigwait, ptr_pthread_raise.
1783 * pthread.c (pthread_functions): Renamed to...
1784 (__pthread_functions): ... this. No longer static, no longer
1785 SHARED only. Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1786 and ptr_pthread_raise.
1787 [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1788 * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1789 * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1790 * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1792 * Makefile (tests, tests-static): Add tst-cancel-static.
1793 * tst-cancel-static.c: New test.
1795 2003-01-02 Jakub Jelinek <jakub@redhat.com>
1797 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1799 2003-01-02 Ulrich Drepper <drepper@redhat.com>
1801 * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1802 * condvar.c: Add symbol versioning. The compatibility versions
1803 are the same as the change in the interface does not effect this
1805 * Versions [libpthread]: Add definitions for new pthread_cond_*
1806 interfaces for version GLIBC_2.3.2.
1808 2002-12-31 Ulrich Drepper <drepper@redhat.com>
1810 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1812 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1813 for __register_atfork.
1815 2002-12-31 Jakub Jelinek <jakub@redhat.com>
1817 * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1818 ASSEMBLER test macro.
1819 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1820 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1821 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1822 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1823 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1824 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1826 * sysdeps/pthread/errno-loc.c (__errno_location): Add
1828 * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1829 * sysdeps/pthread/res-state.c (__res_state): Likewise.
1830 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1831 __libc_current_sigrtmax): Likewise.
1832 * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1833 __libc_internal_tsd_set, __libc_internal_tsd_address,
1834 __libc_alloca_cutoff.
1835 [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1836 __libc_internal_tsd_set, __libc_internal_tsd_address.
1838 * sysdeps/pthread/list.h: Remove assert.h include.
1839 * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1841 * sysdeps/pthread/list.h: New file.
1842 * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1843 * sysdeps/unix/sysv/linux/fork.c: New file.
1844 * sysdeps/unix/sysv/linux/fork.h: New file.
1845 * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1846 * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1847 * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1848 * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1849 * sysdeps/unix/sysv/linux/Makefile: New file.
1850 * sysdeps/unix/sysv/linux/Versions: New file.
1851 * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1852 (__pthread_cleanup_upto): ...this. Add targetframe argument,
1853 use it instead of currentframe. No longer static.
1854 (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1855 * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1856 (struct pthread_functions): Add ptr_pthread_fork,
1857 ptr_pthread_cleanup_upto.
1858 * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1859 ptr_pthread_cleanup_upto.
1860 * ptfork.c: Include fork.h.
1861 (struct handler_list, struct handler_list_block): Remove.
1862 (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1863 pthread_atfork_child): Remove.
1864 (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1865 (__pthread_fork): New function.
1866 (__fork, __vfork): Call __libc_fork.
1867 * Makefile (libpthread-routines): Add old_pthread_atfork.
1868 (libpthread-nonshared): Add pthread_atfork.
1869 (others): Depend on $(objpfx)libpthread_nonshared.a.
1870 ($(objpfx)libpthread_nonshared.a): New rule.
1871 (install): Depend on $(inst_libdir)/libpthread.so.
1872 ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1874 (tests): Depend on libpthread_nonshared.a too.
1875 * old_pthread_atfork.c: New file.
1876 * pthread_atfork.c: New file.
1877 * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1880 2002-12-30 Jakub Jelinek <jakub@redhat.com>
1882 * forward.c: Make all functions available by default again. It
1883 caused too much trouble.
1884 * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1885 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1886 ptr___pthread_attr_init_2_*.
1887 * pthread.c (pthread_functions): Adjust.
1889 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1891 * libc_pthread_init.c (__libc_pthread_init): Remove
1892 MULTIPLE_THREADS_OFFSET check.
1893 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1894 (SYSINFO_OFFSET): Remove.
1895 * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1897 * sysdeps/i386/tcb-offsets.sym: New file.
1898 * sysdeps/pthread/tcb-offsets.h: New file.
1899 * sysdeps/sparc/sparc32/tls.h: Removed.
1900 * sysdeps/sparc/sparc64/tls.h: Move...
1901 * sysdeps/sparc/tls.h: ...here. Include tcb-offsets.h in assembler.
1902 * sysdeps/sparc/Makefile: New file.
1903 * sysdeps/sparc/tcb-offsets.sym: New file.
1904 * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1905 * sysdeps/ia64/Makefile: New file.
1906 * sysdeps/ia64/tcb-offsets.sym: New file.
1907 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1908 (MULTIPLE_THREADS_OFFSET): Remove.
1909 Replace defined MULTIPLE_THREADS_OFFSET
1910 with defined FLOATING_STACKS && USE___THREAD.
1911 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1912 (MULTIPLE_THREADS_OFFSET): Remove.
1913 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1914 (MULTIPLE_THREADS_OFFSET): Remove.
1915 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1916 (MULTIPLE_THREADS_OFFSET): Remove.
1917 * pthread.c (__pthread_initialize_manager): Remove
1918 MULTIPLE_THREADS_OFFSET cbeck.
1920 * tst-cancel-wrappers.sh: Add line continuations.
1922 2002-12-27 Jakub Jelinek <jakub@redhat.com>
1924 * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1925 and bits/libc-lock.h.
1926 (__libc_internal_tsd_get, __libc_internal_tsd_set,
1927 __libc_internal_tsd_address): Remove.
1928 (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1929 __pthread_internal_tsd_set): New weak_externs.
1930 (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1931 using __libc_maybe_call2.
1932 (__libc_tsd_key_t): Move to ...
1933 * descr.h (__libc_tsd_key_t): ...here.
1934 Remove bits/libc-tsd.h include.
1935 * sysdeps/pthread/errno-loc.c: New file.
1936 * sysdeps/pthread/herrno-loc.c: New file.
1937 * sysdeps/pthread/res-state.c: New file.
1938 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1939 (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1940 thread_self unconditionally. Use LIBC_THREAD_[SG]ETMEM instead
1941 of THREAD_[SG]ETMEM.
1942 * specific.c (libc_internal_tsd_set): Renamed to...
1943 __pthread_internal_tsd_set. Remove static.
1944 (libc_internal_tsd_get): Renamed to...
1945 __pthread_internal_tsd_get. Remove static.
1946 (libc_internal_tsd_address): Renamed to...
1947 __pthread_internal_tsd_address. Remove static.
1948 (__libc_internal_tsd_set, __libc_internal_tsd_get,
1949 __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1950 * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1952 (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1953 __pthread_internal_tsd_address): New prototypes.
1954 (struct pthread_functions): Add
1955 ptr_pthread_internal_tsd_([sg]et|address) fields.
1956 [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1957 * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1958 Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1959 * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1960 * alloca_cutoff.c: New file.
1961 * no-tsd.c: Removed.
1962 * Makefile (routines): Remove no-tsd. Add alloca_cutoff.
1963 * pt-system.c (system): Remove cancellation handling.
1964 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1965 cancellation routines.
1967 * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1968 (tcbhead_t): Add sysinfo field.
1969 (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1970 (TLS_INIT_TP): Use INIT_SYSINFO.
1971 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1972 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1973 (MULTIPLE_THREADS_OFFSET): Adjust.
1974 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1975 (MULTIPLE_THREADS_OFFSET): Likewise.
1976 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1977 (MULTIPLE_THREADS_OFFSET): Likewise.
1978 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1979 (MULTIPLE_THREADS_OFFSET): Likewise.
1980 * descr.h: Include stdint.h.
1981 (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1983 2002-12-22 Jakub Jelinek <jakub@redhat.com>
1985 * libc_pthread_init.c: Include stdlib.h.
1986 * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1987 (TLS_INIT_TP_EXPENSIVE): Define.
1988 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1989 __libc_maybe_call2): In _LIBC check SHARED define.
1990 * sysdeps/ia64/tls.h: New file.
1991 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1992 * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1993 * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1994 * sysdeps/sparc/sparc32/tls.h: New file.
1995 * sysdeps/sparc/sparc64/tls.h: New file.
1996 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1997 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1998 * Makefile (tests): Add tst-cancel[1-6].
1999 (tests-reverse): Add tst-cancel5.
2000 Link libc.so before libpthread.so for tests-reverse.
2001 * tst-cancel1.c: New file.
2002 * tst-cancel2.c: New file.
2003 * tst-cancel3.c: New file.
2004 * tst-cancel4.c: New file.
2005 * tst-cancel5.c: New file.
2006 * tst-cancel6.c: New file.
2008 2002-12-27 Andreas Schwab <schwab@suse.de>
2010 * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
2012 2002-12-22 Roland McGrath <roland@redhat.com>
2014 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
2016 2002-12-21 Ulrich Drepper <drepper@redhat.com>
2018 * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
2019 Reported by Art Hass <ahaas@airmail.net>.
2021 2002-12-19 Jakub Jelinek <jakub@redhat.com>
2023 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2024 Use return 0 as 6th argument to FORWARD4.
2026 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2028 * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
2029 define if __ASSUME_LDT_WORKS > 0.
2030 * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
2031 struct member access if !FLOATING_STACKS.
2032 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2034 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2036 * internals.h (__pthread_thread_self): New prototype.
2037 (struct pthread_functions): Add ptr_pthread_thread_self field.
2038 * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
2039 (__pthread_thread_self): New function.
2040 * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
2041 (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
2042 use thread_self() directly if not FLOATING_STACKS.
2044 2002-12-18 Jakub Jelinek <jakub@redhat.com>
2046 * sysdeps/x86_64/pt-machine.h: Guard most of the header
2047 with #ifndef __ASSEMBLER__.
2048 * pthread.c (pthread_functions): Use SHLIB_COMPAT around
2049 pthread_attr_init_2_0 use.
2051 2002-12-17 Jakub Jelinek <jakub@redhat.com>
2053 * wrapsyscall.c: Removed.
2055 * Makefile (distribute): Add tst-cancel-wrappers.sh.
2056 (routines): Remove weaks. Add forward,
2057 libc_pthread_init, libc-cancellation.
2058 (shared-only-routines): Remove weaks. Add forward.
2059 (libpthread-routines): Remove wrapsyscall.
2060 Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
2061 ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
2062 ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
2063 ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
2064 ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
2065 ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
2066 (libpthread-shared-only-routines): Add pt-allocrtsig.
2067 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2068 ($(objpfx)tst-cancel-wrappers.out): New rule.
2069 * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
2071 (__libc_maybe_call): In libpthread.* don't check for existance
2073 (__libc_maybe_call2): Define.
2074 (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
2075 __libc_lock_trylock, __libc_lock_unlock): Use it.
2076 * sysdeps/pthread/flockfile.c: New file.
2077 * sysdeps/pthread/ftrylockfile.c: New file.
2078 * sysdeps/pthread/funlockfile.c: New file.
2079 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2080 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2081 * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
2082 * libc-cancellation.c: New file.
2083 * forward.c: New file.
2084 * libc_pthread_init.c: New file.
2085 * pt-system.c: New file.
2086 * pthread.c: Remove locale.h.
2087 (__pthread_manager_thread): Initialize multiple_threads.
2088 (__pthread_multiple_threads): Declare.
2089 (pthread_functions): New variable.
2090 (__pthread_initialize_minimal): Remove __uselocale call.
2091 Call __libc_pthread_init.
2092 (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
2093 initial thread's multiple_threads and __libc_multiple_threads.
2094 Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
2096 (pthread_setschedparam, pthread_getschedparam): Rename to __
2097 prefixed variants. Add strong_alias.
2098 (current_rtmin, current_rtmax, __libc_current_sigrtmin,
2099 __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
2100 (init_rtsigs): Use __libc_current_sigrtmin_private.
2101 (pthread_initialize): Only call init_rtsigs if
2102 !__ASSUME_REALTIME_SIGNALS.
2103 (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2104 * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2105 __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2106 __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2107 __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2108 __pthread_attr_getinheritsched, __pthread_attr_setscope,
2109 __pthread_attr_getscope, __pthread_cond_init,
2110 __pthread_cond_destroy, __pthread_cond_wait,
2111 __pthread_cond_signal, __pthread_cond_broadcast,
2112 __pthread_condattr_init, __pthread_condattr_destroy,
2113 __pthread_equal, __pthread_getschedparam,
2114 __pthread_setschedparam, __pthread_setcancelstate,
2115 __pthread_setcanceltype, __pthread_enable_asynccancel,
2116 __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2117 (__pthread_mutex_init, __pthread_mutex_destroy,
2118 __pthread_mutex_lock, __pthread_mutex_unlock,
2119 __pthread_mutex_trylock): Likewise.
2121 (struct pthread_functions): New type.
2122 (__libc_pthread_functions): New variable.
2123 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2124 * descr.h (struct _pthread_descr_struct): Add
2125 p_header.data.multiple_threads field.
2126 * manager.c (pthread_handle_create): Initialize multiple_threads.
2127 * cancel.c (__pthread_enable_asynccancel,
2128 __pthread_disable_asynccancel): New functions.
2129 (__pthread_provide_wrappers): Remove.
2130 (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2131 prefixed variants. Add strong_alias.
2132 * condvar.c (pthread_cond_init, pthread_cond_destroy,
2133 pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2134 pthread_condattr_init, pthread_condattr_destroy): Likewise.
2135 * join.c (pthread_exit): Likewise.
2136 * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2137 pthread_attr_getdetachstate, pthread_attr_setschedparam,
2138 pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2139 pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2140 pthread_attr_getinheritsched, pthread_attr_setscope,
2141 pthread_attr_getscope): Likewise.
2142 * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2143 __pthread_mutex_lock, __pthread_mutex_unlock,
2144 __pthread_mutex_trylock): Add hidden_def.
2145 * Versions (libc): Add __libc_pthread_init,
2146 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2147 __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2148 * lockfile.c: Remove some USE_IN_LIBIO guards.
2149 (__pthread_provide_lockfile): Remove.
2150 * pt-allocrtsig.c: New file.
2151 * tst-cancel-wrappers.sh: New test.
2153 2002-12-15 Ulrich Drepper <drepper@redhat.com>
2155 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2156 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2157 * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2158 sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2160 2002-12-10 Ulrich Drepper <drepper@redhat.com>
2162 * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2163 weak. There is no reason for that.
2164 (CANCELABLE_SYSCALL_VA): Likewise.
2166 2002-12-09 Ulrich Drepper <drepper@redhat.com>
2168 * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2169 sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2170 * Versions: Export creat, poll, pselect, readv, select, sigpause,
2171 __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2172 libpthread in version GLIBC_2.3.2.
2174 2002-12-06 Ulrich Drepper <drepper@redhat.com>
2176 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2178 2002-12-05 Roland McGrath <roland@redhat.com>
2180 * pthread.c (__pthread_initialize_minimal)
2181 [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2182 TCB if the dynamic linker didn't do it at startup.
2184 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2186 (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2188 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2189 * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2191 2002-12-03 Roland McGrath <roland@redhat.com>
2193 * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2194 from dynamic linker internal cell to new libc cell.
2196 2002-11-28 Roland McGrath <roland@redhat.com>
2198 * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2199 before other headers, so FLOATING_STACKS is not defined wrongly.
2201 * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2202 even if [! FLOATING_STACKS].
2203 (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2204 If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2205 dl_osversion >= 2.3.99 and fatal if not.
2206 (TLS_DO_MODIFY_LDT): Use it.
2208 2002-11-28 Ulrich Drepper <drepper@redhat.com>
2210 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2211 require it to 200112L. Remove _POSIX_POLL and _POSIX_SELECT.
2212 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2214 2002-11-19 Ulrich Drepper <drepper@redhat.com>
2216 * Versions (libc: GLIBC_2.0): Remove names of functions which are
2217 not defined in libc.
2218 * Makefile (shared-only-routines): Add weaks.
2219 * weaks.c: Remove functions which are not exported from libc.so.
2221 2002-11-14 Roland McGrath <roland@redhat.com>
2223 * libc-tsd.c: New file.
2224 * Makefile (distribute): Add it.
2225 (libc-link.so): New variable.
2226 ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2227 (libc-ok-for-link): New variable.
2228 [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2229 libc-ok-for-link to $(use-thread).
2230 [$(libc-ok-for-link) = no]
2231 (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2232 ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2234 (generated): Append them.
2235 (extra-objs): Append libc-tsd.os.
2237 * libc-tls-loc.c: New file.
2238 * Makefile (libpthread-routines): Add it.
2240 2002-11-14 Andreas Schwab <schwab@suse.de>
2242 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2245 2002-11-13 Roland McGrath <roland@redhat.com>
2247 * Examples/ex6.c (main): Improve error reporting.
2249 2002-11-04 Ulrich Drepper <drepper@redhat.com>
2251 * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2252 -fno-omit-frame-pointer. Patch by Andreas Steinmetz <ast@domdv.de>.
2254 * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2256 (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2258 2002-10-22 Jakub Jelinek <jakub@redhat.com>
2260 * manager.c (pthread_start_thread): Call __uselocale even
2261 if [! SHARED]. Patch by Leon Kanter <leon@geon.donetsk.ua>.
2263 2002-10-17 Roland McGrath <roland@redhat.com>
2265 * Makefile (unload): Don't link in libpthread.so.
2266 ($(objpfx)unload.out): Do depend on it.
2267 * unload.c (main): Improve error reporting.
2269 2002-10-09 Roland McGrath <roland@redhat.com>
2271 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2272 Under [__PIC__], call the function via the pointer fetched for
2273 comparison rather than a call by name that uses the PLT.
2274 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2275 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2276 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2277 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2278 (__libc_key_create, __libc_getspecific, __libc_setspecific)
2279 (__libc_atfork): Use it.
2281 * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2282 (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2283 * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2284 (ld: GLIBC_PRIVATE): Set removed.
2286 2002-10-11 Ulrich Drepper <drepper@redhat.com>
2288 * sysdeps/unix/sysv/linux/execve.c: New file.
2290 2002-10-09 Jakub Jelinek <jakub@redhat.com>
2292 * no-tsd.c: Include stdlib.h.
2294 2002-10-07 Jakub Jelinek <jakub@redhat.com>
2296 * sysdeps/unix/sysv/linux/allocalim.h: New file.
2297 * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2299 * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2300 Pass stack size to caller.
2301 (pthread_handle_create): Set p_alloca_cutoff.
2302 * pthread.c (__pthread_initial_thread): Use C99 designated
2303 initializers. Set p_alloca_cutoff.
2304 (__pthread_manager_thread): Likewise.
2305 (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2307 (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2309 (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2311 * specific.c (__libc_alloca_cutoff): New function.
2312 * no-tsd.c (__libc_alloca_cutoff): New function.
2313 * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2316 2002-10-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2318 * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2319 * sysdeps/sh/tls.h: Likewise.
2320 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2322 2002-09-29 Jakub Jelinek <jakub@redhat.com>
2324 * sysdeps/pthread/tst-timer.c (main): Clear
2325 SIGEV2.sigev_notify_attributes.
2327 2002-09-29 Ulrich Drepper <drepper@redhat.com>
2329 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2330 INLINE_SYSCALL for set_thread_area syscall.
2332 2002-09-28 Roland McGrath <roland@redhat.com>
2334 * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2335 Don't call setrlimit, since we did no prior bogon we need to undo.
2337 2002-09-27 Roland McGrath <roland@redhat.com>
2339 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2341 2002-09-24 Roland McGrath <roland@redhat.com>
2343 * sysdeps/x86_64/tls.h: New file.
2345 2002-09-23 Roland McGrath <roland@redhat.com>
2347 * Examples/ex13.c (dump_mut): int -> size_t for counter.
2349 2002-09-18 Bruno Haible <bruno@clisp.org>
2351 * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2352 an unexpected error code.
2354 * internals.h (__pthread_message): Add const to first parameter type.
2355 * pthread.c (__pthread_message): Likewise.
2357 * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2359 2002-09-17 Roland McGrath <roland@redhat.com>
2361 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2362 Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2363 offset (positive or negative) relative to the thread struct.
2364 * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2366 2002-09-12 Jakub Jelinek <jakub@redhat.com>
2368 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2369 * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2370 Replace /usr/lib/crt[in].o with crt[in].o too.
2372 2002-09-11 Steven Munroe <sjmunroe@us.ibm.com>
2374 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2376 2002-09-04 Bruno Haible <bruno@clisp.org>
2378 * pthread.c: Include <sys/time.h>.
2379 (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2380 * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2381 * Makefile (distribute): Add smp.h to the list.
2383 2002-09-04 Bruno Haible <bruno@clisp.org>
2385 * sysdeps/alpha/pt-machine.h: Choose different include file location
2386 on non-Linux platforms.
2388 * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2389 (open, open64): Change va_arg argument type to the integral type to
2390 which mode_t promotes.
2392 * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2393 the structure of 'struct sigevent'.
2395 * errno.c (__errno_location, __h_errno_location, __res_state):
2396 Use prototype function definitions.
2398 2002-07-29 Steven Munroe <sjmunroe@us.ibm.com>
2400 * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2401 * sysdeps/powerpc/pt-machine.h: moved to...
2402 * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2403 * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2405 2002-09-02 Roland McGrath <roland@redhat.com>
2407 * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2409 2002-09-01 Roland McGrath <roland@redhat.com>
2411 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2412 CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2414 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2415 (__libc_internal_tsd_address): Declare it.
2416 * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2417 __libc_internal_tsd_address.
2418 * specific.c (libc_internal_tsd_address): New function.
2419 (__libc_internal_tsd_address): New variable.
2420 * no-tsd.c (__libc_internal_tsd_address): New variable.
2422 2002-08-31 Ulrich Drepper <drepper@redhat.com>
2424 * Makefile: Don't use rule for crt%.o, spell it out as rules for
2427 2002-08-30 Roland McGrath <roland@redhat.com>
2429 * Makefile (extra-objs, omit-deps): Add crtn.
2430 ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2431 ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2432 ($(objpfx)crtn.S): New target.
2433 ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2434 (generated): Add crtn.S.
2436 * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2437 crtn.o pathname too.
2439 2002-08-30 Jakub Jelinek <jakub@redhat.com>
2441 * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2444 2002-08-30 Roland McGrath <roland@redhat.com>
2446 * tst-static-locale.c: New file.
2447 * Makefile (tests, tests-static): Add it.
2449 2002-04-24 Steven Munroe <sjmunroe@us.ibm.com>
2451 * spinlock.c (__pthread_lock): Fix spurious wakeup
2452 handling. Don't clear lowest bit of list pointer as sign the thread
2453 is still on the wait list. Don't restart after spurious wakeup
2454 with spinning to get the lock.
2455 (__pthread_unlock): Take set lowest bit into account when handling
2456 pointer to list elements.
2457 Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2459 2002-08-28 Roland McGrath <roland@redhat.com>
2461 * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2463 2002-08-28 Jakub Jelinek <jakub@redhat.com>
2465 * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2466 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2467 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2469 2002-08-28 Ulrich Drepper <drepper@redhat.com>
2471 * sysdeps/pthread/timer_routines.c (thread_func): Change return
2472 type to void and add casts in use to avoid warnings with all gcc
2475 2002-08-08 Jakub Jelinek <jakub@redhat.com>
2477 * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2479 * manager.c (__pthread_handles): Remove.
2480 * pthandles.c: New file.
2481 * pthread.c (__pthread_initialize_minimal): Initialize
2482 __pthread_handles[0] and __pthread_handles[1].
2483 * Makefile (libpthread-routines): Add pthandles (must be last).
2485 2002-08-26 Brian Youmans <3diff@gnu.org>
2487 * Examples/ex10.c: Corrected version number in Lesser GPL copying
2488 permission notice from 2 to 2.1.
2489 * Examples/ex11.c: Likewise.
2490 * Examples/ex13.c: Likewise.
2491 * Examples/ex8.c: Likewise.
2492 * Examples/ex9.c: Likewise.
2493 * barrier.c: Likewise.
2494 * events.c: Likewise.
2495 * lockfile.c: Likewise.
2496 * no-tsd.c: Likewise.
2497 * pt-machine.c: Likewise.
2498 * ptclock_gettime.c: Likewise.
2499 * ptclock_settime.c: Likewise.
2500 * rwlock.c: Likewise.
2501 * sysdeps/alpha/pspinlock.c: Likewise.
2502 * sysdeps/alpha/pt-machine.h: Likewise.
2503 * sysdeps/arm/pspinlock.c: Likewise.
2504 * sysdeps/arm/pt-machine.h: Likewise.
2505 * sysdeps/cris/pspinlock.c: Likewise.
2506 * sysdeps/cris/pt-machine.h: Likewise.
2507 * sysdeps/hppa/pspinlock.c: Likewise.
2508 * sysdeps/hppa/pt-machine.h: Likewise.
2509 * sysdeps/i386/i686/pt-machine.h: Likewise.
2510 * sysdeps/i386/pspinlock.c: Likewise.
2511 * sysdeps/i386/pt-machine.h: Likewise.
2512 * sysdeps/i386/useldt.h: Likewise.
2513 * sysdeps/ia64/pspinlock.c: Likewise.
2514 * sysdeps/ia64/pt-machine.h: Likewise.
2515 * sysdeps/m68k/pspinlock.c: Likewise.
2516 * sysdeps/m68k/pt-machine.h: Likewise.
2517 * sysdeps/mips/pspinlock.c: Likewise.
2518 * sysdeps/mips/pt-machine.h: Likewise.
2519 * sysdeps/powerpc/pspinlock.c: Likewise.
2520 * sysdeps/powerpc/pt-machine.h: Likewise.
2521 * sysdeps/pthread/bits/initspin.h: Likewise.
2522 * sysdeps/pthread/bits/libc-lock.h: Likewise.
2523 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2524 * sysdeps/pthread/getcpuclockid.c: Likewise.
2525 * sysdeps/pthread/posix-timer.h: Likewise.
2526 * sysdeps/pthread/timer_create.c: Likewise.
2527 * sysdeps/pthread/timer_delete.c: Likewise.
2528 * sysdeps/pthread/timer_getoverr.c: Likewise.
2529 * sysdeps/pthread/timer_gettime.c: Likewise.
2530 * sysdeps/pthread/timer_routines.c: Likewise.
2531 * sysdeps/pthread/timer_settime.c: Likewise.
2532 * sysdeps/pthread/tst-timer.c: Likewise.
2533 * sysdeps/s390/pspinlock.c: Likewise.
2534 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2535 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2536 * sysdeps/sh/pspinlock.c: Likewise.
2537 * sysdeps/sh/pt-machine.h: Likewise.
2538 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2539 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2540 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2541 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2542 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2543 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2544 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2545 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2546 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2547 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2548 * tststack.c: Likewise.
2549 * unload.c: Likewise.
2550 * weaks.c: Likewise.
2551 * wrapsyscall.c: Likewise.
2553 * sysdeps/pthread/pt-initfini.c: Changed copying
2554 permission notice to Lesser GPL from Library GPL, including the
2555 references in the special exception.
2556 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2557 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2558 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2560 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2562 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2564 2002-08-26 Ulrich Drepper <drepper@redhat.com>
2566 * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2567 overflow [PR libc/4244].
2569 2002-08-25 Ulrich Drepper <drepper@redhat.com>
2571 * sysdeps/pthread/timer_routines.c (thread_func): Make the
2572 compiler happy by adding a return statement which will never be
2575 * tst-context.c (main): Cast to long before casting to pointer.
2577 * Examples/ex17.c (main): Use correct format string.
2579 * Examples/ex9.c (thread): Remove incorrect return statement.
2581 2002-08-23 Ulrich Drepper <drepper@redhat.com>
2583 * pthread.c (__linuxthreads_version): New global constant.
2585 2002-08-23 Andreas Jaeger <aj@suse.de>
2587 * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2588 as thread specific register.
2589 (testandset): Fix inline asm.
2590 (THREAD_GETMEM): Fix inline asm.
2592 2002-08-22 Roland McGrath <roland@redhat.com>
2594 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2596 (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2597 (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2598 macro. That chooses whether to reuse %gs value or let kernel set it.
2599 [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2600 [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2603 2002-08-21 Ulrich Drepper <drepper@redhat.com>
2605 * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2606 also to the third definition of this macro.
2608 2002-06-17 Andreas Jaeger <aj@suse.de>
2610 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2613 2002-08-20 Ulrich Drepper <drepper@redhat.com>
2615 * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2616 loading/reading segment registers. Some old hardware doesn't
2617 handle the 32-bit instructions as expected.
2618 * sysdeps/i386/tls.h: Likewise.
2620 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2621 renamed to secondcall and use is negated.
2622 (TLS_SETUP_GS_SEGMENT): Likewise.
2623 (TLS_INIT_TP): Likewise.
2624 * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2627 * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2628 registers. No need to mask upper 16 bits in this case.
2629 * sysdeps/i386/useldt.h: Likewise.
2630 (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2631 is the same since the GDT content changed.
2633 * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2634 to TLS_SETUP_GS_SEGMENT.
2635 (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2636 TLS_DO_SET_THREAD_AREA.
2637 (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2638 entry number from %gs value.
2639 * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2642 * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2643 Pass true to _dl_deallocate_tls.
2644 (pthread_free): Likewise.
2645 * pthread.c (__pthread_initialize_manager): Likewise.
2647 2002-08-19 Ulrich Drepper <drepper@redhat.com>
2649 * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2650 computing index from %gs value.
2652 2002-08-16 Roland McGrath <roland@redhat.com>
2654 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2655 register value from entry number properly.
2657 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2658 optimally conditional on [__PIC__].
2659 (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2660 without touching errno, and use latest modify_ldt-like interface.
2661 (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2662 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2663 (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2664 existing %gs value as the segment to set.
2665 (INIT_THREAD_SELF): Rewritten using those. Use set_thread_area only
2666 under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2667 by the first thread's early TLS setup.
2669 2002-08-15 Roland McGrath <roland@redhat.com>
2671 * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2672 return a value as callers now expect.
2674 2002-08-11 Roland McGrath <roland@redhat.com>
2676 * pthread.c (__pthread_initialize_manager): Initialize
2677 p_header.data.tcb field of manager thread's descriptor.
2678 (__pthread_initialize_minimal): Don't initialize p_header.data.self
2679 field, already done by TLS_INIT_TP.
2681 * manager.c (pthread_handle_create): Move p_header field initializers
2684 2002-08-08 Ulrich Drepper <drepper@redhat.com>
2686 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2688 2002-08-07 Ulrich Drepper <drepper@redhat.com>
2690 * pthread.c (__linuxthreads_initial_report_events): New variable.
2691 (__pthread_initialize_manager): Use it to initialize p_report_events
2693 [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2695 2002-08-07 Roland McGrath <roland@redhat.com>
2697 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2698 an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2700 2002-08-02 Roland McGrath <roland@redhat.com>
2702 * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2703 Add _LIBC_TSD_KEY_LOCALE.
2704 * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2705 Call __uselocale to initialize our per-thread locale pointer to
2707 * pthread.c (__pthread_initialize_minimal): Likewise.
2709 * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2711 2002-08-02 Ulrich Drepper <drepper@redhat.com>
2713 * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2716 * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2717 Don't use p_libc_specific element in thread descriptor.
2719 2002-07-30 Roland McGrath <roland@redhat.com>
2721 * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2722 [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2723 which does the right thing when __thread support is available.
2724 * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2725 Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2726 `p_h_errno', `p_resp', and `p_res' members.
2727 * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2728 Don't initialize `p_errnop' and `p_h_errnop' members.
2729 (__pthread_reset_main_thread): Likewise.
2730 (__pthread_initialize_manager): Likewise.
2731 * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2732 * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2733 Don't initialize `p_resp' member.
2734 (__pthread_reset_main_thread): Likewise.
2735 * manager.c (pthread_handle_create): Likewise.
2736 * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2737 Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2738 * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2739 * errno.c [USE_TLS && HAVE___THREAD]
2740 (__h_errno_location, __res_state): Don't define these at all.
2742 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2743 (INSTALL_NEW_DTV, GET_DTV): Likewise.
2744 * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2746 * weaks.c: Don't include <errno.h> here.
2748 2002-08-01 Roland McGrath <roland@redhat.com>
2750 * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2752 (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2753 (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2754 (TLS_INIT_TP): Use that.
2756 2002-08-02 Jakub Jelinek <jakub@redhat.com>
2758 * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2759 (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2760 (FREE_THREAD): Avoid modify_ldt if using GDT.
2761 * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2763 2002-07-25 Jakub Jelinek <jakub@redhat.com>
2765 * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2766 * sysdeps/i386/pt-machine.h: Likewise.
2767 * sysdeps/i386/useldt.h: Likewise.
2769 2002-07-22 Ulrich Drepper <drepper@redhat.com>
2771 * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2772 call __libc_setup_tls first.
2773 * Makefile: Actually create tst-signal.out file when running the test.
2774 (tests): Add tststatic.
2775 * Examples/tststatic.c: New file.
2777 2002-07-19 Ulrich Drepper <drepper@redhat.com>
2779 * errno.c (__errno_location): Don't define unless !USE_TLS
2781 * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2782 * sysdeps/i386/tls.h: Likewise.
2783 * sysdeps/i386/useldt.h: Likewise.
2784 * sysdeps/i386/i686/pt-machine.h: Likewise.
2786 2002-07-02 H.J. Lu <hjl@gnu.org>
2788 * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>. Always
2790 * sysdeps/mips/pt-machine.h: Likewise.
2792 2002-07-14 Ulrich Drepper <drepper@redhat.com>
2794 * manager.c (pthread_handle_create): Initialize self-reference in
2797 2002-07-01 Jakub Jelinek <jakub@redhat.com>
2799 * Examples/ex9.c (main): Remove unused th variable.
2801 2002-07-10 Ulrich Drepper <drepper@redhat.com>
2803 * wrapsyscall.c: Add __nanosleep alias.
2804 * Versions (GLIBC_2.2.6): Add __nanosleep.
2805 * bug-sleep.c: New file.
2806 * Makefile (tests): Add bug-sleep.
2808 2002-06-19 Steven Munroe <sjmunroe@vnet.ibm.com>
2810 * Examples/ex9.c (main): Use list of children and join them.
2811 (thread): Do not call exit.
2813 2002-06-20 Ulrich Drepper <drepper@redhat.com>
2815 * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2816 Unconditionally use the code using spinlock. Use __pthread_release
2818 (wait_node_free): Likewise.
2819 (__pthread_acquire, __pthread_release): Unconditionally define.
2821 2002-06-07 Jakub Jelinek <jakub@redhat.com>
2823 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2825 2002-05-24 Ulrich Drepper <drepper@redhat.com>
2827 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2829 2002-05-21 Ulrich Drepper <drepper@redhat.com>
2831 * sysdeps/pthread/pthread.h (pthread_create): Rename first
2833 (pthread_cancel): Likewise.
2834 * internals.h (__pthread_create_2_1): Likewise.
2835 * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2837 2002-05-20 Ulrich Drepper <drepper@redhat.com>
2839 * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2840 Patch by Glen Nakamura <gen@flex.com>.
2842 2002-05-03 Ulrich Drepper <drepper@redhat.com>
2844 * signals.c: Move sighandler functions to...
2845 * sighandler.c: ...here. New file.
2846 * signals.c: Move signal handler related type definitions to...
2847 * internals.h: ...here. Add prototypes for signal handlers.
2848 * Makefile (libpthread-routines): Add sighandler.
2849 (CFLAGS-sighandler.c): Add $(exceptions).
2851 2002-04-30 Jakub Jelinek <jakub@redhat.com>
2853 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2855 2002-04-08 Ulrich Drepper <drepper@redhat.com>
2857 * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2858 * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2859 * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2860 based on previous one and not on current time. Count overruns.
2861 Patch by Eric F. Sorton <eric@cctcorp.com>.
2863 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2865 2002-04-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
2867 * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2868 if it isn't defined yet.
2869 (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2870 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2872 * sysdeps/sh/tls.h: New file.
2874 2002-04-08 Jakub Jelinek <jakub@redhat.com>
2876 * manager.c (__pthread_manager_event): Use self instead of arg
2877 for INIT_THREAD_SELF.
2878 * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2879 _pthread_descr_struct) instead of sizeof (*descr).
2881 2002-04-05 Ulrich Drepper <drepper@redhat.com>
2883 * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2884 * sysdeps/alpha/pt-machine.h: Likewise.
2885 * sysdeps/arm/pt-machine.h: Likewise.
2886 * sysdeps/cris/pt-machine.h: Likewise.
2887 * sysdeps/hppa/pt-machine.h: Likewise.
2888 * sysdeps/m68k/pt-machine.h: Likewise.
2889 * sysdeps/mips/pt-machine.h: Likewise.
2890 * sysdeps/powerpc/pt-machine.h: Likewise.
2891 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2892 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2893 * sysdeps/sh/pt-machine.h: Likewise.
2894 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2895 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2896 * sysdeps/x86_64/pt-machine.h: Likewise.
2898 2002-04-05 Jakub Jelinek <jakub@redhat.com>
2900 * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2901 instead of pthread_mutexattr_setkind_np.
2902 (pthread_mutexattr_gettype): Similarly.
2903 * man/pthread_mutexattr_setkind_np.man: New.
2904 * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2906 2002-04-02 Ulrich Drepper <drepper@redhat.com>
2908 * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2910 2002-03-22 Jakub Jelinek <jakub@redhat.com>
2912 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2914 2002-03-22 Ulrich Drepper <drepper@redhat.com>
2916 * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2918 2002-03-17 Andreas Jaeger <aj@suse.de>
2920 * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2922 * sysdeps/alpha/pt-machine.h: Likewise.
2923 * sysdeps/arm/pt-machine.h: Likewise.
2924 * sysdeps/cris/pt-machine.h: Likewise.
2925 * sysdeps/hppa/pt-machine.h: Likewise.
2926 * sysdeps/i386/i686/pt-machine.h: Likewise.
2927 * sysdeps/ia64/pt-machine.h: Likewise.
2928 * sysdeps/m68k/pt-machine.h: Likewise.
2929 * sysdeps/mips/pt-machine.h: Likewise.
2930 * sysdeps/powerpc/pt-machine.h: Likewise.
2931 * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2932 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2933 * sysdeps/sh/pt-machine.h: Likewise.
2934 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2935 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2936 * sysdeps/x86_64/pt-machine.h: Likewise.
2938 * internals.h: Move testandset and __compare_and_swap prototypes
2941 2002-03-03 Andreas Jaeger <aj@suse.de>
2943 * errno.c: Include resolv.h to avoid warning.
2945 2002-02-27 Ulrich Drepper <drepper@redhat.com>
2947 * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2950 2002-02-23 Ulrich Drepper <drepper@redhat.com>
2952 * attr.c (pthread_getattr_np): Don't take thread descriptor size
2953 into account if USE_TLS.
2954 * manager.c (pthread_handle_create): Free TLS data structures if call
2955 failed. Pass correct stack to clone if USE_TLS.
2956 * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2957 * sysdeps/i386/i686/pt-machine.h: Likewise.
2958 * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2960 * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2961 Add p_stackaddr element #if USE_TLS.
2962 * internals.c: Include <tls.h>.
2963 * manager.c: Integrate creating and handling of thread descriptor
2965 * pthread.c: Likewise.
2966 * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2967 Include <linuxthreads/descr.h> only if TLS is really used.
2968 (GET_DTV): New macro.
2969 (TLS_INIT_TP): Initialize self pointer.
2971 2002-02-17 Andreas Schwab <schwab@suse.de>
2973 * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2976 2002-02-12 Ulrich Drepper <drepper@redhat.com>
2978 * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2979 (INSTALL_DTV): Adjust for being passed pointer to element with length.
2981 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2983 * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2985 2002-02-08 Richard Henderson <rth@redhat.com>
2987 * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2989 2002-02-08 Ulrich Drepper <drepper@redhat.com>
2991 * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2994 2002-02-07 H.J. Lu <hjl@gnu.org>
2996 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2998 (__pthread_spin_lock): Remove ".set noreorder".
2999 * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
3001 2002-02-05 H.J. Lu <hjl@gnu.org>
3003 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
3005 * sysdeps/mips/pt-machine.h (testandset): Likewise.
3006 (__compare_and_swap): Likewise.
3008 2002-02-07 Ulrich Drepper <drepper@redhat.com>
3010 * internals.h: Move declarations/definitions of
3011 __pthread_initial_thread_bos, __pthread_initial_thread,
3012 __pthread_manager_thread_bos, __pthread_manager_thread_tos,
3013 __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
3014 CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
3016 * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
3017 Define THREAD_GETMEM accordingly.
3019 2002-02-06 Ulrich Drepper <drepper@redhat.com>
3021 * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
3023 * sysdeps/i386/tls.h: Define THREAD_DTV.
3025 2002-02-04 Ulrich Drepper <drepper@redhat.com>
3027 * internals.h: Move thread descriptor definition...
3028 * descr.h.: ...here. New file.
3029 * sysdeps/i386/tls.h: New file.
3031 2002-02-01 H.J. Lu <hjl@gnu.org>
3033 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
3034 different register in the delayed slot. Use branch likely.
3036 * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
3037 (__compare_and_swap): Return 0 only when failed to compare. Use
3040 2002-02-01 Jakub Jelinek <jakub@redhat.com>
3042 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
3043 __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
3044 * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
3045 * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
3046 * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
3047 * sysdeps/sparc/sparc64/Versions: New file.
3048 * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
3050 2002-01-31 Ulrich Drepper <drepper@redhat.com>
3052 * pthread.c: _dl_cpuclock_offset is not any longer a global variable
3053 in SHARED code, use GL(dl_cpuclock_offset).
3055 2002-01-28 Andreas Jaeger <aj@suse.de>
3057 * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
3058 0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
3060 2002-01-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
3062 * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
3063 (CURRENT_STACK_FRAME): Remove duplicate definition.
3064 * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3066 2002-01-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
3068 * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
3071 2002-01-12 Andreas Schwab <schwab@suse.de>
3073 * Makefile (test-srcs): Add tst-signal.
3074 (tests): Run tst-signal.
3075 (distribute): Add tst-signal.sh.
3076 * tst-signal.c, tst-signal.sh: New files.
3078 2002-01-14 Andreas Jaeger <aj@suse.de>
3080 * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
3082 2002-01-11 Andreas Schwab <schwab@suse.de>
3084 * signals.c (sighandler): Initialize all elements to SIG_ERR.
3085 (__sigaction): Don't use value from sighandler if it is SIG_ERR.
3087 2002-01-06 Richard Henderson <rth@redhat.com>
3089 * sysdeps/alpha/elf/pt-initfini.c: New file.
3091 2001-12-29 Andreas Jaeger <aj@suse.de>
3093 * Examples/ex9.c: Add noreturn attribute for thread.
3094 * Examples/ex10.c: Likewise.
3095 * Examples/ex13.c (thread_start): Likewise.
3096 * Examples/ex15.c (worker): Likewise.
3098 * Examples/ex18.c: Include unistd.h for prototype of sleep.
3100 2001-12-14 Ulrich Drepper <drepper@redhat.com>
3102 * man/pthread_atfork.man: Adjust description of mutex handling
3103 after fork for current implementation.
3104 * linuxthreads.texi: Likewise [PR libc/2519].
3106 2001-12-13 Andreas Schwab <schwab@suse.de>
3108 * specific.c (pthread_key_delete): Don't contact the thread
3109 manager if no threads have been created yet.
3111 2001-12-12 NIIBE Yutaka <gniibe@m17n.org>
3113 * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3114 qualifier to be safe.
3116 2001-11-30 Andreas Schwab <schwab@suse.de>
3118 * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3119 that self is the manager thread, and initialize the thread
3121 (thread_self_stack) [THREAD_SELF]: New function to find self via
3123 * manager.c (pthread_handle_create): Don't block cancel signal any
3126 2001-11-29 Andreas Jaeger <aj@suse.de>
3128 * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3130 (INIT_THREAD_SELF): New.
3131 (THREAD_GETMEM): New.
3133 (THREAD_SETMEM): New.
3134 (THREAD_SETMEM_NC): New.
3135 (FLOATING_STACKS): Define.
3136 (ARCH_STACK_MAX_SIZE): Define.
3138 2001-11-28 Kaz Kylheku <kaz@ashi.footprints.net>
3140 Bugfix to pthread_key_delete. It was iterating over the thread
3141 manager's linked list of threads, behind the thread manager's
3142 back causing a race. The fix is to have the manager iterate over
3143 the threads instead, using a new request type for doing so.
3144 * internals.h (struct pthread_request): New manager request type
3145 REQ_FOR_EACH_THREAD.
3146 * manager.c (pthread_for_each_thread): New function.
3147 (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3148 * specific.c (struct pthread_key_delete_helper_args): New type.
3149 (pthread_key_delete_helper): New static function.
3150 (pthread_key_delete): Use the new thread manager
3151 REQ_FOR_EACH_THREAD function to iterate over the threads and set
3152 the delete key slot to a null value in each thread.
3153 * Examples/ex18.c: New test.
3154 * Makefile (tests): Add ex18.
3156 2001-11-22 Wolfram Gloger <wg@malloc.de>
3158 * pthread.c (pthread_onexit_process): Don't call free
3159 after threads have been asynchronously terminated.
3161 * manager.c (pthread_handle_exit): Surround cancellation
3162 of threads with __flockfilelist()/__funlockfilelist().
3164 2001-11-26 Andreas Schwab <schwab@suse.de>
3166 * manager.c (pthread_handle_create): Start the child thread with
3167 the cancel signal blocked, so that it does not handle it before
3168 the thread register is set up. Save errno from failed clone call.
3170 2001-11-15 Ulrich Drepper <drepper@redhat.com>
3172 * sysdeps/i386/i686/Implies: Removed.
3173 * sysdeps/i386/i686/Versions: New file.
3175 2001-10-31 Andreas Jaeger <aj@suse.de>
3177 * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3179 2001-10-05 Kevin Buettner <kevinb@cygnus.com>
3181 * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3182 to __linuxthreads_pthread_sizeof_descr to match name used by
3183 symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3184 linuxthreads_db/td_symbol_list.c.
3186 2001-09-22 Andreas Jaeger <aj@suse.de>
3188 * linuxthreads/tst-context.c: Avoid compile warning.
3190 2001-09-20 Andreas Jaeger <aj@suse.de>
3192 * shlib-versions: Add x86-64.
3194 2001-09-19 Andreas Jaeger <aj@suse.de>
3196 * sysdeps/x86_64/Makefile: New file.
3197 * sysdeps/x86_64/pspinlock.c: New file.
3198 * sysdeps/x86_64/pt-machine.h: New file.
3200 2001-09-12 Jakub Jelinek <jakub@redhat.com>
3202 * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3204 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3206 2001-09-11 Ulrich Drepper <drepper@redhat.com>
3207 Wolfram Gloger <wg@malloc.de>
3209 * join.c: Protect all communications from and to manager with
3211 * manager.c: Likewise.
3212 * pthread.c: Likewise.
3213 * smeaphore.c: Likewise.
3215 2001-08-29 Ulrich Drepper <drepper@redhat.com>
3217 * spinlock.c (__pthread_lock): Top max_count value with
3218 MAX_ADAPTIVE_SPIN_COUNT.
3219 * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3221 * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3224 2001-08-27 Jakub Jelinek <jakub@redhat.com>
3226 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3227 non-opaque type if __USE_UNIX98.
3229 2001-08-26 Jakub Jelinek <jakub@redhat.com>
3231 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3232 non-opaque lock types also if _IO_MTSAFE_IO is defined.
3234 2001-08-23 Roland McGrath <roland@frob.com>
3236 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3237 new first argument, skip the cleanup handler if it's zero.
3238 (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3239 (__libc_lock_define_initialized_recursive): Use it.
3240 * sysdeps/pthread/bits/stdio-lock.h: File removed.
3241 The sysdeps/generic file from the main tree now suffices.
3243 2001-08-22 Roland McGrath <roland@frob.com>
3245 * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3246 instead of <pthread.h>.
3247 (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3248 (_IO_lock_initializer): Add braces.
3249 (_IO_lock_lock): Use __libc_lock_lock_recursive.
3250 (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3252 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3253 (__libc_lock_define_initialized_recursive): Use it.
3254 (__libc_lock_init_recursive): Likewise.
3255 (__libc_lock_fini_recursive): Likewise.
3256 (__libc_lock_lock_recursive): Likewise.
3257 (__libc_lock_trylock_recursive): Likewise.
3258 (__libc_lock_unlock_recursive): Likewise.
3259 (__libc_lock_define_recursive): New macro.
3261 2001-08-14 Jakub Jelinek <jakub@redhat.com>
3263 * lockfile.c (__pthread_provide_lockfile): New variable.
3264 * pthread.c (__pthread_require_lockfile): New variable.
3265 * cancel.c (__pthread_require_lockfile): New variable.
3267 2001-07-31 Ulrich Drepper <drepper@redhat.com>
3269 * tst-context.c (threadfct): Initialize context before calling
3272 * Examples/ex17.c: Make sure test thread is around long enough.
3274 2001-07-26 kaz Kojima <kkojima@rr.iij4u.or.jp>
3276 * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3278 2001-07-24 Ulrich Drepper <drepper@redhat.com>
3280 * tst-context.c (main): Print explanation before bailing out
3281 because context handling is not supported.
3283 2001-07-23 Ulrich Drepper <drepper@redhat.com>
3285 * Makefile (tests): Add tst-context.
3286 * tst-context.c: New file.
3288 * sysdeps/pthread/bits/stdio-lock.h: Define
3289 _IO_cleanup_region_start_noarg.
3291 2001-07-23 Jakub Jelinek <jakub@redhat.com>
3293 * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3294 (ARCH_STACK_MAX_SIZE): Define.
3295 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3296 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3298 2001-07-19 Jakub Jelinek <jakub@redhat.com>
3300 * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3302 * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3303 (ARCH_STACK_MAX_SIZE): Define.
3304 * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3305 NEED_SEPARATE_REGISTER_STACK.
3307 2001-07-16 Andreas Schwab <schwab@suse.de>
3309 * Makefile (before-compile): Don't add $(objpfx)crti.o.
3310 (omit-deps): Add crti.
3311 ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3312 it is filtered out of the link command.
3314 2001-07-16 Ulrich Drepper <drepper@redhat.com>
3316 * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3317 to find the right value for __pthread_initial_thread_bos, it's not
3318 used. If not FLOATING_STACKS first run
3319 __pthread_init_max_stacksize.
3321 2001-06-16 H.J. Lu <hjl@gnu.org>
3323 * internals.h: Include <stackinfo.h>.
3325 * attr.c: Don't include <stackinfo.h> here.
3326 * cancel.c: Likewise.
3327 * manager.c: Likewise.
3328 * pthread.c: Likewise.
3329 * ptlongjmp.c: Likewise.
3331 2001-03-23 Matthew Wilcox <willy@ldl.fc.hp.com>
3333 * attr.c: Make _STACK_GROWS_UP work.
3334 * internals.h: Likewise.
3335 * manager.c: Likewise.
3336 * pthread.c: Likewise.
3338 2001-06-15 H.J. Lu <hjl@gnu.org>
3340 * pthread.c (__pthread_reset_main_thread): Fix a typo.
3342 2001-02-02 John S. Marvin <jsm@udlkern.fc.hp.com>
3344 * semaphore.h: Use struct _pthread_fastlock as an element of
3345 sem_t instead of an identical struct.
3346 * rwlock.c: Remove casts.
3347 * semaphore.c: Likewise.
3349 2001-04-30 Alan Modra <amodra@one.net.au>
3351 * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3353 2001-05-25 Bruce Mitchener <bruce@cubik.org>
3355 * linuxthreads.texi: Spelling corrections.
3357 2001-05-25 Ulrich Drepper <drepper@redhat.com>
3359 * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3360 returning successfully.
3361 Patch by Gene Cooperman <gene@ccs.neu.edu>.
3363 2001-05-24 Ulrich Drepper <drepper@redhat.com>
3365 * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3366 serious work try once whether the lock is uncontested.
3367 Remove duplicate reading of __status before loop.
3368 Change suggested by Hans Boehm <hans_boehm@hp.com>.
3370 * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3371 (__pthread_alt_trylock): Likewise.
3373 2001-05-01 Kaz Kylheku <kaz@ashi.footprints.net>
3375 Memory barrier overhaul following line by line inspection.
3376 * mutex.c (pthread_once): Missing memory barriers added.
3377 * pthread.c (__pthread_wait_for_restart_signal,
3378 __pthread_timedsuspend_new, __pthread_restart_new): Added
3379 memory barriers ``just in case'' and for documentary value.
3380 * spinlock.c (__pthread_release): New inline function for releasing
3381 spinlock, to complement __pthread_acquire. Includes memory
3382 barrier prior to assignment to spinlock, and __asm __volatile
3383 dance to prevent reordering or optimization of the spinlock access.
3384 * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3385 __pthread_alt_timedlock, __pthread_alt_unlock,
3386 __pthread_compare_and_swap): Updated to use new __pthread_release
3387 instead of updating spinlock directly.
3388 * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3389 wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3390 __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3391 Memory barrier overhaul. Lots of missing memory barriers added,
3392 a couple needless ones removed.
3393 * spinlock.c (__pthread_compare_and_swap): testandset optimization
3394 removed, just calls __pthread_acquire, which has the new read
3395 barrier in it before its testandset.
3397 2001-05-20 Roland McGrath <roland@frob.com>
3399 * Makeconfig: New file, variables used to be in main libc Makeconfig.
3401 2001-05-09 Geoff Keating <geoffk@redhat.com>
3403 * sysdeps/powerpc/pt-machine.h
3404 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3405 (__compare_and_swap): Remove memory barriers.
3406 (__compare_and_swap_with_release_semantics): New function.
3408 2001-04-24 Andreas Jaeger <aj@suse.de>
3410 * wrapsyscall.c: send* and recv* return ssize_t.
3412 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3413 mutex instead of double locking it.
3414 Reported by Pierre Artaud <partaud@sodatec.com>.
3416 2001-04-23 Ulrich Drepper <drepper@redhat.com>
3418 * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3419 using #ifdef whether the clock is available.
3420 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3422 * sysdeps/ia64/Versions: New file.
3424 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3425 have to call __gmon_start__ in the libpthread DSO.
3426 * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3428 * Makefile (libpthread-routines): Add ptclock_gettime and
3430 * internals.h: Don't use cpuclock-init.h definitions, use
3431 hp-timing.h definitions.
3432 * pthread.c: Likewise.
3433 * manager.c: Likewise.
3434 * ptclock_gettime.c: New file.
3435 * ptclock_settime.c: New file.
3436 * internals.h: Fix parameter type for __pthread_clock_gettime and
3437 __pthread_clock_settime.
3439 * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3440 * sysdeps/i386/i586/ptclock_settime.c: Removed.
3441 * sysdeps/i386/i586/Makefile: Removed.
3443 2001-04-22 Ulrich Drepper <drepper@redhat.com>
3445 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3446 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3448 2001-04-21 Andreas Jaeger <aj@suse.de>
3450 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3451 attribute, remove statements that will never be executed.
3452 (thread_func): Remove mutex_unlock call since it's never executed.
3453 (thread_func): Fix comment as suggested by Jakub Jelinek.
3455 * manager.c (__pthread_manager): Add noreturn
3457 (pthread_start_thread): Likewise, remove return statement.
3458 (pthread_start_thread_event): Likewise.
3459 Add noreturn attribute for pthread_handle_exit.
3460 * weaks.c: Add noreturn attribute for pthread_exit.
3462 * internals.h: Add __pthread_clock_gettime and
3463 __pthread_clock_settime prototypes.
3465 2001-04-21 Ulrich Drepper <drepper@redhat.com>
3467 * internals.h: Include <cpuclock-init.h>.
3468 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3469 CPUCLOCK_VARDEF is defined.
3470 * pthread.c (__pthread_initialize_minimal): Initialize
3471 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3472 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3473 for new thread to current CPU clock value.
3475 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3477 * sysdeps/i386/i586/Makefile: New file.
3478 * sysdeps/i386/i586/Versions: New file.
3479 * sysdeps/i386/i586/ptclock_gettime.c: New file.
3480 * sysdeps/i386/i586/ptclock_settime.c: New file.
3481 * sysdeps/i386/i686/Implies: New file.
3483 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3485 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3486 $generated, not $postclean-generated.
3488 2001-04-18 Andreas Jaeger <aj@suse.de>
3490 * Makefile (otherlibs): Added.
3492 2001-04-18 Jakub Jelinek <jakub@redhat.com>
3494 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3496 2001-04-16 Ulrich Drepper <drepper@redhat.com>
3498 * signals.c (sigwait): NSIG is no signal number. Block all
3499 signals while in signal handler for signals in SET.
3500 Patch by Manfred Spraul <manfred@colorfullife.com>.
3502 2001-04-12 Ulrich Drepper <drepper@redhat.com>
3504 * tst-cancel.c: Disable most tests. Add new test where all
3505 cleanup handlers must run.
3506 * Makefile (tests): Add tst-cancel again.
3508 * cancel.c (__pthread_perform_cleanup): Correct condition for
3509 leaving cleanup loop early.
3511 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3512 all the files which use CURRENT_STACK_FRAME.
3513 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3514 __builtin_frame_address.
3515 * sysdeps/i386/i686/pt-machine.h: Likewise.
3517 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3519 * Makefile (tests): Comment out tst-cancel for now.
3521 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
3522 temporary file in object directory.
3523 * Makefile: Don't allow inlining when compiling tst-cancel.c.
3524 Pass $(objpfx) to tst-cancel.
3526 2001-04-11 David S. Miller <davem@redhat.com>
3528 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3529 up closer to user local variables so that new cleanup heuristics work.
3530 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3532 2001-04-11 Ulrich Drepper <drepper@redhat.com>
3534 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3536 (_pthread_cleanup_push_defer): Likewise.
3538 * tst-cancel.c (main): Fix loop printing cleanup output.
3540 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
3542 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3544 (__pthread_spin_trylock): Likewise.
3545 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3547 2001-04-10 Ulrich Drepper <drepper@redhat.com>
3549 * join.c (pthread_exit): Move code to new function __pthread_do_exit
3550 which takes an extra parameter with the current frame pointer.
3551 Call new function with CURRENT_STACK_FRAME.
3552 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
3553 with the new parameter.
3554 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3555 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
3556 this parameter as the initial value the cleanup handler records are
3557 compared against. No active cleanup handler record must have an
3558 address lower than the previous one and the initial record must be
3559 above (below on PA) the frame address passed in.
3560 (pthread_setcancelstate): Call __pthread_do_exit instead of
3562 (pthread_setcanceltype): Likewise.
3563 (pthread_testcancel): Likewise.
3564 (_pthread_cleanup_pop_restore): Likewise.
3565 * condvar.c (pthread_cond_wait): Likewise.
3566 (pthread_cond_timedwait_relative): Likewise.
3567 * manager.c (pthread_start_thread): Likewise.
3568 * oldsemaphore.c (__old_sem_wait): Likewise.
3569 * pthread.c (pthread_handle_sigcancel): Likewise.
3570 * semaphore.c (__new_sem_wait): Likewise.
3571 (sem_timedwait): Likewise.
3572 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3573 to limit the cleanup handlers which get run.
3574 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
3575 for __pthread_perform_cleanup.
3577 * Makefile (tests): Add tst-cancel.
3578 * tst-cancel.c: New file.
3580 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
3582 * sysdeps/cris/pt-machine.h: New file.
3583 * sysdeps/cris/pspinlock.c: New file.
3585 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3587 * shlib-versions: Add case for Linux on CRIS.
3589 2001-03-26 Ulrich Drepper <drepper@redhat.com>
3591 * attr.c (pthread_getattr_np): Correct computation of stack size
3592 for machiens with register stack.
3594 * Examples/ex17.c (main): Correct detection of failed mmap call.
3596 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3598 * pthread.c (__pthread_initialize_manager): Fix a typo.
3600 2001-03-21 Jakub Jelinek <jakub@redhat.com>
3602 * attr.c (__pthread_attr_setstack): Fix alignment check.
3603 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3604 * Makefile (tests): Add ex17 test.
3605 * Examples/ex17.c: New test.
3607 2001-03-20 Ulrich Drepper <drepper@redhat.com>
3609 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3610 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3611 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3613 2001-03-18 Ulrich Drepper <drepper@redhat.com>
3615 * Makefile: When generating DSO link with libc_nonshared.a.
3617 2001-02-26 Jakub Jelinek <jakub@redhat.com>
3619 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3621 2001-02-23 Jakub Jelinek <jakub@redhat.com>
3623 * internals.h (__pthread_init_max_stacksize): New prototype.
3624 * attr.c (__pthread_attr_setstacksize): Call
3625 __pthread_init_max_stacksize if not yet initialized.
3626 * pthread.c (__pthread_init_max_stacksize): New function.
3627 (__pthread_initialize_manager): Call it.
3628 Patch by <dtc@cmucl.cons.org>.
3630 2001-03-16 Ulrich Drepper <drepper@redhat.com>
3632 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3634 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3636 * shlib-versions: Add rule for Linux on 64 bit S/390.
3637 * sysdeps/s390/s390-64/pt-machine.h: New file.
3638 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3640 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
3642 * sysdeps/s390/pt-machine.h: Move to...
3643 * sysdeps/s390/s390-32/pt-machine.h: ...here.
3644 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3646 2001-03-15 Ulrich Drepper <drepper@redhat.com>
3648 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3649 * attr.c: Implement pthread_getattr_np.
3650 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3651 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3652 * manager.c (pthread_handle_create): Initialize p_inheritsched.
3654 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3656 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3659 2001-02-20 Hans Boehm <hans_boehm@hp.com>
3661 * manager.c (manager_mask): Removed static vesion. Now always local
3662 to __pthread_manager().
3663 (manager_mask_all): Removed completely.
3664 (__pthread_manager): Remove manager_mask_all initialization.
3665 (pthread_handle_create): Remove code to set and reset signal mask
3666 around __clone2() calls.
3668 2001-02-17 Jakub Jelinek <jakub@redhat.com>
3670 * spinlock.c (__pthread_lock): Force lock->__status to be read from
3671 memory on every spin.
3673 2001-02-10 Andreas Jaeger <aj@suse.de>
3675 * Makefile (extra-objs): New.
3677 2001-02-09 Jakub Jelinek <jakub@redhat.com>
3679 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3680 __pthread_initialize_minimal prototype.
3682 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
3684 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3686 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
3688 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3690 2001-02-06 Ulrich Drepper <drepper@redhat.com>
3692 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3693 broken code. Patch by Jes Sorensen.
3695 2001-02-06 Andreas Jaeger <aj@suse.de>
3697 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3699 * internals.h: ...here.
3701 2001-02-05 Jes Sorensen <jes@linuxcare.com>
3703 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3705 2001-02-02 Ulrich Drepper <drepper@redhat.com>
3707 * Versions: Remove __pthread_initialize_minimal.
3709 2001-02-01 Ulrich Drepper <drepper@redhat.com>
3711 * Makefile: Add rules to build crti.o and make it being used in
3712 building libpthread.so.
3713 * sysdeps/i386/Makefile: New file.
3714 * sysdeps/pthread/pt-initfini.c: New file.
3716 * pthread.c: Cleanups.
3718 2001-01-28 Andreas Jaeger <aj@suse.de>
3720 * oldsemaphore.c (__old_sem_init): Adjust for last change.
3721 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3722 * spinlock.c: Likewise.
3724 2001-01-28 Ulrich Drepper <drepper@redhat.com>
3726 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3727 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3728 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3729 * pthread.c: Likewise.
3730 * spinlock.h: Likewise.
3731 * sysdeps/pthread/pthread.h: Likewise.
3733 2001-01-26 Ulrich Drepper <drepper@redhat.com>
3735 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3736 as struct __pthread_attr_s.
3738 * semaphore.h (sem_t): Cleanup namespace, rename status and
3741 2001-01-13 Jakub Jelinek <jakub@redhat.com>
3743 * pthread.c (pthread_onexit_process): Clear
3744 __pthread_manager_thread_bos after freeing it.
3745 * Makefile (tests): Add ex16.
3746 * Examples/ex16.c: New file.
3748 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3750 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3752 * pthread.c (pthread_exit_process): Rename to...
3753 (pthread_onexit_process): ...this.
3754 (pthread_atexit_process, pthread_atexit_retcode): New.
3755 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3756 and only if HAVE_Z_NODELETE is not defined.
3757 (__pthread_initialize_manager): Register pthread_atexit_retcode
3760 2001-01-11 Ulrich Drepper <drepper@redhat.com>
3762 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3764 2001-01-11 Jakub Jelinek <jakub@redhat.com>
3766 * Makefile (tests): Add ex15.
3767 * Examples/ex15.c: New test.
3769 2001-01-08 Ulrich Drepper <drepper@redhat.com>
3771 * pthread.c (pthread_exit_process): Free memory allocated for
3774 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3776 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3777 (pthread_free): Always unmap the stack. It's safe now that we don't
3778 use MAP_FIXED to allocate stacks.
3780 2000-12-31 Ulrich Drepper <drepper@redhat.com>
3782 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3784 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3786 2000-11-15 Wolfram Gloger <wg@malloc.de>
3788 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3789 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3791 2000-12-27 Andreas Jaeger <aj@suse.de>
3793 * Examples/ex13.c: Make local functions static.
3794 * ecmutex.c: Likewise.
3795 * joinrace.c: Likewise.
3796 * Examples/ex14.c: Likewise.
3798 * Examples/ex2.c: Make local functions static; reformat.
3799 * Examples/ex1.c: Likewise.
3800 * Examples/ex4.c: Likewise.
3801 * Examples/ex5.c: Likewise.
3802 * Examples/ex7.c: Likewise.
3804 * oldsemaphore.c: Add prototypes to shut up GCC.
3805 * pt-machine.c: Likewise.
3807 * weaks.c: Add prototype for pthread_exit.
3809 * internals.h: Add some prototypes, format prototypes and add
3811 Move __libc_waitpid prototype to include/sys/wait.h.
3813 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3814 * mutex.c: Likewise.
3815 * specific.c: Likewise.
3816 * ptfork.c: Likewise.
3818 * lockfile.c: Include internals.h to get prototypes.
3819 * events.c: Likewise.
3820 * sysdeps/alpha/pspinlock.c: Likewise.
3821 * sysdeps/arm/pspinlock.c: Likewise.
3822 * sysdeps/hppa/pspinlock.c: Likewise.
3823 * sysdeps/i386/pspinlock.c: Likewise.
3824 * sysdeps/ia64/pspinlock.c: Likewise.
3825 * sysdeps/m68k/pspinlock.c: Likewise.
3826 * sysdeps/mips/pspinlock.c: Likewise.
3827 * sysdeps/powerpc/pspinlock.c: Likewise.
3828 * sysdeps/s390/pspinlock.c: Likewise.
3829 * sysdeps/sh/pspinlock.c: Likewise.
3830 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3831 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3832 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3834 2000-12-27 Ulrich Drepper <drepper@redhat.com>
3836 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3837 (__pthread_attr_getstack): Return correct address.
3838 Add warnings for using pthread_attr_getstackaddr and
3839 pthread_attr_setstackaddr.
3841 2000-12-26 Ulrich Drepper <drepper@redhat.com>
3843 * Examples/ex6.c (test_thread): Make static.
3844 * Examples/ex12.c (test_thread): Make static and add noreturn
3847 2000-12-18 Jes Sorensen <jes@linuxcare.com>
3849 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3850 and compare_and_swap_with_release_semantics returns int not long.
3852 2000-12-17 Andreas Jaeger <aj@suse.de>
3854 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3856 * sysdeps/arm/pt-machine.h (testandset): Likewise.
3857 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3858 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3859 * sysdeps/sh/pt-machine.h (testandset): Likewise.
3860 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3861 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3863 2000-12-17 Ulrich Drepper <drepper@redhat.com>
3865 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3866 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3868 2000-12-17 Andreas Jaeger <aj@suse.de>
3870 * internals.h: Add prototypes for testandset and
3871 __compare_and_swap to shut up gcc warnings.
3873 2000-12-06 Wolfram Gloger <wg@malloc.de>
3875 * join.c (pthread_detach): Allow case where the thread has already
3878 2000-12-05 Andreas Jaeger <aj@suse.de>
3880 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3881 * sysdeps/mips/pt-machine.h (testandset): Likewise.
3882 (__compare_and_swap): Likewise.
3883 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3885 2000-11-20 Jakub Jelinek <jakub@redhat.com>
3887 * Examples/ex3.c (main): Cast int to long before casting to void *.
3888 (search): Cast void * to long, not int.
3889 * Examples/ex8.c (main, thread): Similarly.
3890 * Examples/ex11.c (main): Similarly.
3891 * Examples/ex14.c (worker, do_test): Similarly.
3892 * ecmutex.c (worker, do_test): Similarly.
3893 (nlocks): Cast to int.
3895 2000-11-08 Bruce Mitchener <bruce@cubik.org>
3897 * linuxthreads.texi: Add documentation for pthreads attributes
3898 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
3899 patch. Document pthread_[sg]etconcurrency(). Mark
3900 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3902 2000-11-07 Ulrich Drepper <drepper@redhat.com>
3904 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3906 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3907 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3909 2000-11-06 Ulrich Drepper <drepper@redhat.com>
3911 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3912 not doing it right now.
3913 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3915 2000-10-30 Ulrich Drepper <drepper@redhat.com>
3917 * Examples/ex4.c (main): Don't use exit() to avoid warning with
3920 2000-10-29 Ulrich Drepper <drepper@redhat.com>
3922 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3923 here. Reported by Bruce Mitchener <bruce@cubik.org>.
3925 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3926 discussing mutexes. (As per the Unix98 name for the API.)
3927 Changes documentation for pthread_mutexattr_setkind_np() and
3928 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3929 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3930 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3931 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3932 Begins to introduce discussion of the ``timed'' mutex type. This
3933 discussion is currently incomplete.
3934 Patch by Bruce Mitchener <bruce@cubik.org>.
3936 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
3937 Yutaka Niibe <gniibe@chroot.org>
3939 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3940 has restrictions, use register.
3942 2000-10-23 Andreas Schwab <schwab@suse.de>
3944 * Examples/ex14.c (TIMEOUT): Override default timeout.
3946 2000-10-16 Ulrich Drepper <drepper@redhat.com>
3948 * specific.c: Protect tsd array modification in thread data
3949 structures by getting the thread lock in pthread_key_delete and
3950 __pthread_destroy_specifics.
3951 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3953 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3955 * sysdeps/pthread/bits/initspin.h: New file.
3956 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3957 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3958 (__pthread_alt_init_lock): Likewise.
3959 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3961 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3963 * oldsemaphore.c (__old_sem_init): Release lock with
3964 LT_SPINLOCK_INIT, not zero.
3965 * spinlock.c (__pthread_unlock): Likewise.
3966 (__pthread_alt_lock): Likewise.
3967 (__pthread_alt_timedlock): Likewise.
3968 (__pthread_alt_unlock): Likewise.
3969 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3970 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
3971 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
3972 LT_SPINLOCK_INIT do initialize spinlocks not 0.
3974 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
3976 * shlib-versions: Add version definitions for hppa-linux.
3978 2000-10-12 Alan Modra <alan@linuxcare.com.au>
3980 * sysdeps/hppa/pspinlock.c: New file.
3981 * sysdeps/hppa/pt-machine.h: New file.
3982 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3984 2000-10-05 Jakub Jelinek <jakub@redhat.com>
3986 * mutex.c (__pthread_mutex_destroy): Correct test of
3987 busy mutex for mutexes using alternate fastlocks.
3988 Patch by dtc@cmucl.cons.org.
3990 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
3992 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3994 2000-09-28 Ulrich Drepper <drepper@redhat.com>
3996 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3997 test for owner first.
3998 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4000 * cancel.c (pthread_cancel): Don't do anything if cancelation is
4003 2000-09-26 Ulrich Drepper <drepper@redhat.com>
4005 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
4006 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4008 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
4009 _POSIX_MONOTONIC_CLOCK.
4011 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
4014 2000-09-20 Andreas Jaeger <aj@suse.de>
4016 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
4017 "testrtsig.h" conditional.
4019 2000-09-11 Ulrich Drepper <drepper@redhat.com>
4021 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
4022 pthread_attr_setstack.
4023 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
4024 pthread_attr_setstack.
4025 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
4027 2000-09-05 Ulrich Drepper <drepper@redhat.com>
4029 * Examples/ex14.c: New file.
4030 * Makefile (tests): Add ex14.
4032 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
4033 mutex. Patch by dtc@cmucl.cons.org.
4035 * ecmutex.c: New file.
4036 * Makefile (tests): Add ecmutex.
4038 2000-09-04 H.J. Lu <hjl@gnu.org>
4040 * attr.c (__pthread_attr_setguardsize): Use page_roundup
4041 instead of roundup to round up to the page size.
4043 2000-09-03 Mark Kettenis <kettenis@gnu.org>
4045 * manager.c (pthread_exited): Correctly report event as TD_REAP
4046 instead of TD_DEATH. Fix comments.
4048 2000-09-03 Ulrich Drepper <drepper@redhat.com>
4050 * spinlock.h (testandset): Add cast to avoid warning.
4051 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
4053 2000-09-02 Andreas Jaeger <aj@suse.de>
4055 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
4058 2000-09-01 Ulrich Drepper <drepper@redhat.com>
4060 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4061 Fix typo in last patch (_mode -> _flags).
4063 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4064 Provide definition which respects _IO_USER_LOCK flag.
4066 2000-08-30 Ulrich Drepper <drepper@redhat.com>
4068 * manager.c (pthread_allocate_stack): Clear descriptor only if not
4071 2000-08-25 Ulrich Drepper <drepper@redhat.com>
4073 * Makefile: Add rules to build and run unload.
4074 * unload.c: New file.
4076 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
4078 * sysdeps/pthread/pthread.h
4079 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
4080 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
4082 2000-08-24 Andreas Jaeger <aj@suse.de>
4084 * Examples/ex13.c: Include <string.h> for strerror prototype and
4085 <stdlib.h> for abort prototype.
4086 (pthr_cond_signal_mutex): Rewrite to silence GCC.
4087 (thread_start): Remove unused variable err.
4088 (main): Silence GCC warnings.
4090 2000-08-22 Andreas Jaeger <aj@suse.de>
4092 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
4094 * Makefile (tests): Add ex13.
4096 2000-08-20 Ulrich Drepper <drepper@redhat.com>
4098 * semaphore.h: Add restrict where required by AGd4.
4099 * sysdeps/pthread/pthread.h: Likewise.
4100 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4102 2000-08-15 Ulrich Drepper <drepper@redhat.com>
4104 * Makefile (tests): Add ex12. Add rule to build it.
4105 * Examples/ex12.c: New file.
4107 2000-08-13 Ulrich Drepper <drepper@redhat.com>
4109 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4110 even though the implementation is not quite complete (but it reports
4111 it). Define _POSIX_MESSAGE_PASSING to -1.
4112 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4114 2000-08-12 Andreas Jaeger <aj@suse.de>
4116 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4118 (__compare_and_swap): Likewise.
4119 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4121 2000-08-10 Ulrich Drepper <drepper@redhat.com>
4123 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4124 p_h_errnop correctly and not to NULL.
4126 2000-08-05 Ulrich Drepper <drepper@redhat.com>
4128 * Banner: Bump version number to 0.9.
4130 2000-08-04 Ulrich Drepper <drepper@redhat.com>
4132 * Makefile (tests): Add tststack. Add rule to build the program.
4133 * tststack.c: New file.
4135 * internals.h: Declare __pthread_max_stacksize.
4136 * pthread.c (__pthread_max_stacksize): New variable.
4137 (__pthread_initialize_manager): Determine __pthread_initialize_manager
4139 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4140 (pthread_allocate_stack): Allow kernel to choose stack address if
4141 FLOATING_STACKS. This also handles variable-sized stacks.
4142 Always allocate stack and guardpage together. Use mprotect to
4143 change guardpage access.
4144 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4145 ARCH_STACK_MAX_SIZE.
4147 * attr.c (__pthread_attr_setstacksize): Also test value against
4150 * manager.c (__pthread_nonstandard_stacks): Define only if
4151 THREAD_SELF is not defined.
4152 (pthread_allocate_stack): Always initialize gardaddr to a correct
4154 (pthread_handle_create): Unmap thread with one call.
4155 (pthread_free): Remove test for initial thread before removing stack.
4156 Unmap stack with one call.
4158 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4159 1 to avoid removing the stack.
4161 2000-07-27 Jes Sorensen <jes@linuxcare.com>
4163 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4164 load of spin lock to prime the cache before the atomic compare and
4165 exchange operation (cmpxchg4). This avoids the spinning on the
4166 cmpxchg4 instruction and reduces movement of the cache line back
4167 and forth between the processors (explanation by Asis K. Mallick
4168 from Intel). This basically makes the implementation operate the
4169 same as the Linux kernel implementation.
4171 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4172 * sysdeps/ia64/pspinlock.c: New file.
4174 2000-08-03 Ulrich Drepper <drepper@redhat.com>
4176 * pthread.c: Move definition of __pthread_set_own_extricate_if...
4177 * spinlock.h: ...here. Remove locking.
4178 * internals.h: Remove __pthread_set_own_extricate_if prototype.
4180 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4181 (rwlock_rd_extricate_func): Don't determine self, let
4182 __pthread_lock do it.
4183 (rwlock_wr_extricate_func): Likewise.
4184 (rwlock_have_already): Optimize *pself handling a bit.
4186 * mutex.c: Use __builtin_expect.
4187 * pthread.c: Likewise.
4189 2000-08-02 Andreas Jaeger <aj@suse.de>
4191 * sysdeps/s390/pspinlock.c: New file.
4192 * sysdeps/s390/pt-machine.h: New file.
4193 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4195 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4197 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4199 * sysdeps/mips/pt-machine.h (testandset): Likewise.
4201 2000-07-26 Andreas Jaeger <aj@suse.de>
4203 * pthread.c: Initialize p_sem_avail.
4205 2000-07-25 Ulrich Drepper <drepper@redhat.com>
4207 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4208 * semaphore.c: Handle spurious wakeups.
4210 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4211 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4213 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4214 (__pthread_wait_for_restart): Likewise.
4216 * condvar.c (pthread_cond_wait): Also check whether thread is
4217 cancelable before aborting loop.
4218 (pthread_cond_timedwait): Likewise.
4220 * signals.c (pthread_sighandler): Remove special code to restrore
4222 (pthread_sighandler_t): Likewise.
4224 2000-07-25 Mark Kettenis <kettenis@gnu.org>
4226 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4227 * pthread.c: Include <resolv.h>.
4228 (_res): Undefine. Add extern declaration.
4230 2000-07-24 Ulrich Drepper <drepper@redhat.com>
4232 * pthread.c (__pthread_initial_thread): Update initializer.
4233 (__pthread_manager_thread): Likewise.
4234 (pthread_initialize): Move setrlimit call to...
4235 (__pthread_initialize_manager): ...here.
4236 (__pthread_reset_main_thread): Reset also soft limit on stack size.
4238 * condvar.c: Handle spurious wakeups. [PR libc/1749].
4239 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4241 2000-07-21 Ulrich Drepper <drepper@redhat.com>
4243 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4244 __compare_and_swap to define testandset.
4245 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4246 Define IMPLEMENT_TAS_WITH_CAS.
4248 2000-07-20 Ulrich Drepper <drepper@redhat.com>
4250 * Makefile: Pass -z nodelete to linker for libpthread.so
4251 generation if it understand this option.
4253 2000-07-18 Mark Kettenis <kettenis@gnu.org>
4255 * manager.c (pthread_handle_create): Remove initialization of
4256 new_thread->p_res._sock.
4258 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
4260 Bugfixes to the variant of the code for machines with no compare
4263 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4264 node was not being properly enqueued, due to failing to update
4265 the lock->__status field.
4267 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4268 being set inappropriately, causing the suspend function to be called
4269 with a null self pointer and crash.
4271 2000-07-18 Ulrich Drepper <drepper@redhat.com>
4273 * spinlock.h (__pthread_alt_trylock): Fix code used if no
4274 compare&swap is available.
4276 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4279 * pthread.c (pthread_initialize): Don't use sysconf to determine
4280 whether the machine has more than one processor.
4282 * spinlock.c (__pthread_alt_timedlock): Add back one of the
4283 removed thread_self calls.
4285 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4287 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4288 __compare_and_swap to compare_and_swap in code which assumes
4289 compare swap is available.
4291 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
4293 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4294 bug whereby thr field of waitnode structure would not be correctly
4295 set unless a null self pointer is passed to the functions.
4296 Eliminated redundant calls to thread_self().
4298 2000-07-18 Jakub Jelinek <jakub@redhat.com>
4300 * pthread.c (__pthread_initialize_manager): Lock
4301 __pthread_manager_thread.p_lock before calling clone.
4303 2000-05-05 H.J. Lu <hjl@gnu.org>
4305 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4306 have acquire semantics.
4307 (__compare_and_swap_with_release_semantics): New inline
4309 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4311 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
4313 * manager.c: Fix the problem with signals at startup.
4314 Change the way that thread stacks are allocated on IA64.
4315 Clean up some of the guard page allocation stuff.
4317 1999-12-19 H.J. Lu <hjl@gnu.org>
4319 * internals.h (page_roundup): New.
4320 * attr.c (__pthread_attr_setguardsize); Use page_roundup
4322 * manager.c (pthread_allocate_stack): Make sure guardaddr is
4323 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4326 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
4328 * manager.c (pthread_allocate_stack): Unmap the stack top
4329 if failed to map the stack bottom.
4331 (pthread_free): Fix the guard page.
4333 * pthread.c (pthread_initialize): Set rlimit correctly for
4334 NEED_SEPARATE_REGISTER_STACK.
4336 1999-12-16 H.J. Lu <hjl@gnu.org>
4338 * pthread.c (__pthread_initialize_manager): Pass
4339 __pthread_manager_thread_bos instead of
4340 __pthread_manager_thread_tos to __clone2.
4342 1999-12-16 H.J. Lu <hjl@gnu.org>
4344 * manager.c (pthread_allocate_stack): Correct the calculation
4345 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4348 1999-12-13 H.J. Lu <hjl@gnu.org>
4350 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4351 bit after setting ar.ccv.
4353 1999-12-12 H.J. Lu <hjl@gnu.org>
4355 * manager.c (pthread_allocate_stack): Make the starting
4356 address of the stack bottom page aligned. FIXME: it may
4357 need changes in other places.
4358 (pthread_handle_create): Likewise.
4360 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
4362 * manager.c (pthread_allocate_stack): Handle
4363 NEED_SEPARATE_REGISTER_STACK.
4364 (pthread_handle_create): Likewise.
4365 * pthread.c (__pthread_initialize_manager): Likewise.
4367 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4369 1999-12-02 H.J. Lu <hjl@gnu.org>
4371 * sysdeps/ia64/pt-machine.h: New.
4373 2000-07-13 Ulrich Drepper <drepper@redhat.com>
4375 * wrapsyscall.c: Mark non-__ protected names as weak.
4378 2000-07-12 Bruno Haible <haible@clisp.cons.org>
4380 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4382 2000-07-12 Ulrich Drepper <drepper@redhat.com>
4384 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4385 Add tests also to new alternative spinlock implementation.
4386 * spinlock.h: Likewise.
4387 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4389 2000-07-06 Ulrich Drepper <drepper@redhat.com>
4391 * Version: Export __sigaction.
4392 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
4394 * pthread.c: Use __libc_sigaction instead of __sigaction.
4396 * condvar.c: Implement pthread_condattr_getpshared and
4397 pthread_condattr_setpshared.
4398 * mutex.c: Implement pthread_mutexattr_getpshared and
4399 pthread_mutexattr_setpshared.
4400 * Versions: Export new functions.
4401 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4403 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4404 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4407 2000-07-04 Greg McGary <greg@mcgary.org>
4409 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4410 pragmas. Include bp-sym.h only if _LIBC.
4412 2000-07-04 Ulrich Drepper <drepper@redhat.com>
4414 * spinlock.c (__pthread_unlock): Properly place write barrier.
4415 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4417 2000-07-03 Ulrich Drepper <drepper@redhat.com>
4419 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4420 faster on SMP systems. No more emulation of compare&swap for adaptive
4422 * spinlock.h: Likewise.
4423 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4424 Replace fast with adaptive mutex.
4425 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4426 * condvar.c: Likewise.
4427 * pthread.c: Define and initialize __pthread_smp_kernel variable.
4428 * internals.h: Declare __pthread_smp_kernel.
4429 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4430 _pthread_fastlock structure.
4431 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4433 * pthread.c: Remove initialization to zero from global variables.
4435 2000-06-29 Jakub Jelinek <jakub@redhat.com>
4437 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4439 2000-06-28 Greg McGary <greg@mcgary.org>
4441 * weaks.c: Wrap BP_SYM () around weak extern declarations of
4442 pthread functions that have pointers in their return+arg signatures.
4444 2000-06-27 Greg McGary <greg@mcgary.org>
4446 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4447 extern declarations of pthread functions that have pointers in
4448 their return+arg signatures.
4450 2000-06-26 Ulrich Drepper <drepper@redhat.com>
4452 * Makefile (tests): Add ex11. Add rules to build it.
4453 * Examples/ex11.c: New file.
4454 * rwlock.c: Fix complete braindamaged previous try to implement
4457 * spinlock.c: Pretty print.
4459 2000-06-25 Ulrich Drepper <drepper@redhat.com>
4461 * Makefile (tests): Add ex10. Add rules to build it.
4462 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4463 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4464 * condvar.c (pthread_cond_wait): Allow mutex of kind
4465 PTHREAD_MUTEX_TIMED_NP.
4466 (pthread_cond_timedwait_relative): Likewise.
4467 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4468 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4469 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4470 (__pthread_mutex_lock): Use __pthread_alt_lock for
4471 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4472 (__pthread_mutex_timedlock): New function.
4473 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4474 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
4475 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4476 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4477 * spinlock.c: Implement alternate fastlocks.
4478 * spinlock.h: Add prototypes.
4479 * Examples/ex10.c: New file.
4480 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4481 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4483 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4484 (__pthread_rwlock_timedrdlock): New function.
4485 (__pthread_rwlock_timedwrlock): New function.
4486 Use laternate fastlock function everywhere.
4488 2000-06-21 Andreas Jaeger <aj@suse.de>
4490 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4493 * join.c: Include <stdlib.h> for exit prototype.
4495 2000-06-20 Ulrich Drepper <drepper@redhat.com>
4497 * sysdeps/i386/useldt.h: Include <stdlib.h>.
4499 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4500 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4502 * Makefile (libpthread-routines): Add barrier.
4503 (tests): Add ex9. Add rule to build ex9.
4504 * Versions: Export barrier functions.
4505 * barrier.c: New file.
4506 * Examples/ex9.c: New file.
4507 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4508 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4509 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4511 2000-06-19 H.J. Lu <hjl@gnu.org>
4513 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4514 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4515 (compare_and_swap_with_release_semantics): New. Default to
4516 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4519 * spinlock.c (__pthread_unlock): Call
4520 compare_and_swap_with_release_semantics () instead of
4521 compare_and_swap ().
4523 2000-06-19 Ulrich Drepper <drepper@redhat.com>
4525 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4527 * sysdeps/pthread/timer_delete.c: Likewise.
4528 * sysdeps/pthread/timer_getoverr.c: Likewise.
4529 * sysdeps/pthread/timer_gettime.c: Likewise.
4530 * sysdeps/pthread/timer_settime.c: Likewise.
4532 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4534 Timer nodes are now reference counted, and can be marked
4535 as deleted. This allows for the safe release of the global mutex
4536 in the middle without losing the timer being operated on.
4538 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
4539 member is now an enum with three values, so that an intermediate
4540 state can be represented (deleted but not free for reuse yet).
4541 New refcount member added.
4542 * sysdeps/pthread/timer_routines.c: Likewise.
4544 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4545 timer_valid): New inline functions added.
4547 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4548 restructured, recursive deadlock bug fixed.
4550 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4551 timer_addref to ensure that timer won't be deleted while mutex is not
4552 held. Also uses timer_invalid to perform validation of timer handle.
4553 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4554 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4556 2000-06-14 Ulrich Drepper <drepper@redhat.com>
4558 * shlib-versions: Add entry for SH.
4559 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4561 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
4563 A few optimizations. Got rid of unnecessary wakeups of timer threads,
4564 tightened up some critical regions and micro-optimized some list
4567 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4568 Returns int value now to indicate whether timer was queued at head.
4569 * sysdeps/pthread/posix-timer.h: Likewise.
4570 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4571 new return value from __timer_thread_queue_timer to avoid waking
4572 up timer thread unnecessarily.
4574 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4575 inuse flag, because this requires mutex to be held. Callers updated
4576 to do the check when they have the mutex.
4577 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4579 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4580 regions: avoids making system calls while holding timer mutex, and
4581 a few computations were moved outside of the mutex as well.
4582 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4584 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4585 to list_unlink_ip, meaning idempotent. Pointer manipulation
4586 changed to get better better code out of gcc.
4587 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4588 version of list_unlink added here.
4589 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4590 function in all places: idempotent one for timers, non-idempotent
4591 one for thread nodes.
4592 * sysdeps/pthread/timer_settime: Likewise.
4593 * sysdeps/pthread/timer_routines.c: Likewise.
4595 2000-06-13 Ulrich Drepper <drepper@redhat.com>
4597 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4598 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4600 * sysdeps/pthread/Makefile: Remove tests definition.
4602 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
4603 Yutaka Niibe <gniibe@chroot.org>
4605 * sysdeps/sh/pspinlock.c: New file.
4606 * sysdeps/sh/pt-machine.h: New file.
4608 2000-06-12 Ulrich Drepper <drepper@redhat.com>
4610 * Makefile (tests): Add joinrace.
4612 * Examples/ex6.c: Test return value of pthread_join.
4614 2000-06-11 Geoff Keating <geoffk@cygnus.com>
4616 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4617 (__pthread_spin_trylock): Implement.
4618 (__pthread_spin_unlock): Implement.
4619 (__pthread_spin_init): Implement.
4620 (__pthread_spin_destroy): Implement.
4622 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4624 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4625 really append the entry.
4627 2000-06-10 Andreas Jaeger <aj@suse.de>
4629 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4631 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
4633 * sysdeps/pthread/timer_create.c: Thread matching now done on
4634 clock type as well as thread attributes.
4635 There are individual global signal-delivering threads for
4636 different clock types.
4637 * sysdeps/pthread/posix-timer.h: Likewise.
4638 * sysdeps/pthread/timer_routines.c: Likewise.
4640 * sysdeps/pthread/timer_routines.c: Thread allocation and
4641 deallocation function now remembers to put thread on active
4642 list and remove from active list.
4643 Thus now the feature of binding multiple timers
4644 to a single thread actually works.
4646 2000-06-10 Ulrich Drepper <drepper@redhat.com>
4648 * pthread.c (__pthread_create_2_1): Optimize a bit.
4650 * internals.h (invalid_handle): Also test for p_terminated != 0.
4651 (nonexisting_handle): New function. Same as old invalid_handle.
4652 * join.c (pthread_join): Use nonexisting_handle instead of
4653 invalid_handle to test for acceptable thread handle.
4654 * manager.c (pthread_handle_free): Likewise.
4655 * joinrace.c: New file.
4656 Reported by Permaine Cheung <pcheung@cygnus.com>.
4658 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4660 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4661 Correct handling of matching variable.
4663 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4666 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4667 Be prepared for empty timer list.
4669 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4670 CPUTIME clock ID. Add support for thread clocks.
4672 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4673 subtraction were switched.
4675 * sysdeps/pthread/timer_routines.c (init_module): Use
4676 THREAD_MAXNODES threads.
4678 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4679 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4680 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4681 with sigqueueinfo is this system call is available.
4683 * sysdeps/pthread/timer_create.c (timer_create): Allow
4684 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4686 * sysdeps/pthread/Makefile: New file. Add rules to build timer
4688 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4690 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4692 * sysdeps/pthread/posix-timer.h: New file.
4693 * sysdeps/pthread/timer_create.c: New file.
4694 * sysdeps/pthread/timer_delete.c: New file.
4695 * sysdeps/pthread/timer_getoverr.c: New file.
4696 * sysdeps/pthread/timer_gettime.c: New file.
4697 * sysdeps/pthread/timer_routines.c: New file.
4698 * sysdeps/pthread/timer_settime.c: New file.
4699 * sysdeps/pthread/tst-timer.c: New file.
4701 2000-06-08 Ulrich Drepper <drepper@redhat.com>
4703 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4704 LINK_MAX definitions if necessary.
4706 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
4708 Added missing fork time handling of global libio lock.
4710 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4711 not just the individual stream locks. Rewritten to use new
4712 iterator interface provided by libio rather than accessing
4715 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4716 which lock and unlock the stream list using the new interface
4718 * internals.h: Likewise.
4720 * ptfork.c (__fork): Now calls __flockfilelist before fork,
4721 and __funlockfilelist in the parent after the fork.
4722 Child still calls __fresetlockfiles as before.
4724 * linuxthreads.texi: Now explains what happens to streams at
4725 fork time. Also whole new section on forking and thread added.
4726 Definition of pthread_atfork moved out of Miscellaneous Functions
4727 to this new section.
4729 2000-06-04 Jakub Jelinek <jakub@redhat.com>
4731 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4732 Add missing register.
4733 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4735 2000-06-02 Jakub Jelinek <jakub@redhat.com>
4737 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4738 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4739 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4741 2000-05-31 Andreas Jaeger <aj@suse.de>
4743 * sysdeps/mips/pspinlock.c: Implement spinlocks.
4745 2000-05-28 Ulrich Drepper <drepper@redhat.com>
4747 * spinlock.c (__pthread_lock): Remove ASSERT.
4749 * Makefile (tests): Add ex8.
4750 * Examples/ex8.c: New file.
4752 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
4754 Bugfix: The pthread_atfork mechanism now takes care of its
4755 own internal mutex at fork time.
4757 * ptfork.c (__fork): Revised so that the mutex is held across
4758 the fork operation and while the handlers are called, and so that
4759 the child resets the mutex.
4761 * linuxthreads.texi: Updated pthread_atfork documentation to make
4762 it clear that fork and pthread_atfork can't be reentered from
4763 atfork handlers, that pthread_atfork and fork are mutually atomic,
4764 and that the handlers are inherited by the child process.
4766 2000-05-24 Ulrich Drepper <drepper@redhat.com>
4768 * Makefile (libpthread-routines): Add pspinlock.
4769 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4770 Use struct _pthread_fastlock instead of pthread_spinlock_t.
4771 * condvar.c: Likewise.
4772 * internals.h: Likewise.
4774 * manager.c: Likewise.
4775 * mutex.c: Likewise.
4776 * pthread.c: Likewise.
4777 * rwlock.c: Likewise.
4778 * semaphore.c: Likewise.
4779 * signals.c: Likewise.
4780 * spinlock.h: Likewise.
4781 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
4782 * sysdeps/alpha/pspinlock.c: New file.
4783 * sysdeps/arm/pspinlock.c: New file.
4784 * sysdeps/i386/pspinlock.c: New file.
4785 * sysdeps/m68k/pspinlock.c: New file.
4786 * sysdeps/mips/pspinlock.c: New file.
4787 * sysdeps/powerpc/pspinlock.c: New file.
4788 * sysdeps/sparc/sparc32/pspinlock.c: New file.
4789 * sysdeps/sparc/sparc64/pspinlock.c: New file.
4790 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4791 back to _pthread_fastlock. Define new pthread_spinlock_t.
4793 2000-05-24 Andreas Jaeger <aj@suse.de>
4795 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4797 2000-05-21 Jakub Jelinek <jakub@redhat.com>
4799 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4801 2000-05-13 Jakub Jelinek <jakub@redhat.com>
4803 * internals.h (__RES_PTHREAD_INTERNAL): Define.
4805 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4807 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4808 object state is represented with additional bits which distinguish
4809 whether that state was set up in the current process, or
4810 in an ancestor process. If that state was set in an ancestor,
4811 it means that a fork happened while thread was executing the init
4812 function. In that case, the state is reset to NEVER.
4813 * mutex.c (__pthread_once_fork_prepare): New function.
4814 (__pthread_once_fork_child): Likewise
4815 (__pthread_once_fork_parent): Likewise
4816 (__pthread_reset_pthread_once): Removed.
4817 * ptfork.c (__fork): Call new handlers in mutex.c.
4818 * internals.h: Declarations of new mutex.c functions added.
4819 Declaration of removed function deleted.
4820 * linuxthreads.texi: Updated documentation about pthread_once
4821 to clarify what happens under cancellation and forking.
4823 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
4825 * internals.h: New thread manager request type, REQ_KICK.
4826 * join.c (pthread_exit): main thread now calls exit() instead
4827 of _exit() in order to proper process cleanup.
4828 * manager.c (__pthread_manager): Do not terminate manager
4829 after unblocking main thread; wait for main thread's
4830 REQ_PROCESS_EXIT request instead.
4831 Also, added REQ_KICK case to handle new request; this just does
4833 * manager.c (pthread_exited): Do not terminate manager after
4834 unblocking main thread.
4835 * manager.c (__pthread_manager_sighandler): If the main thread
4836 is waiting for all other threads to die, send a REQ_KICK into
4837 the thread manager request pipe to get it to clean out the threads
4838 and unblock the main thread as soon as possible. This fixes
4839 the 2000 millisecond hang on shutdown bug.
4840 * Examples/ex7.c: New file, tests shutdown behavior when all threads
4841 including the main one call pthread_exit(), or implicitly do so.
4842 * Makefile (tests): Add ex7.
4844 2000-05-05 Andreas Jaeger <aj@suse.de>
4846 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4847 (pthread_getcpuclockid): Correct test for ourselves.
4849 2000-05-05 Ulrich Drepper <drepper@redhat.com>
4851 * internals.h (struct _pthread_descr_struct): Reorganization.
4852 Allocate room for 16 pointers at head of the structure for future
4853 thread-local data handling. Move p_self member in this area.
4854 * manager.c (pthread_handle_create): Adjust use of p_self.
4855 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4856 * pthread.c (__pthread_initial_thread): Adjust initialization.
4857 (__pthread_manager_thread): Likewise.
4859 2000-04-29 Bruno Haible <haible@clisp.cons.org>
4861 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4862 for eventmask larger than 1 word.
4864 2000-04-27 Ulrich Drepper <drepper@redhat.com>
4866 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4867 * pthread.c (__pthread_initialize_minimal): New function. Perform
4868 minimal initialization.
4869 (pthread_initialize): Remove this code here.
4870 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
4871 are working around the problem in glibc.
4873 2000-04-25 Ulrich Drepper <drepper@redhat.com>
4875 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4876 now. First gcc must be fixed (more concrete: libgcc).
4878 2000-04-24 Ulrich Drepper <drepper@redhat.com>
4880 * pthread.c: Remove special treatement for interrupt handlers on x86.
4881 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4882 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4884 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4886 2000-04-24 Mark Kettenis <kettenis@gnu.org>
4888 * join.c (pthread_exit): Set p_terminated after reporting the
4889 termination event instead of before.
4891 2000-04-20 Jakub Jelinek <jakub@redhat.com>
4893 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4896 2000-04-18 Andreas Jaeger <aj@suse.de>
4898 * Versions: Use ld instead of ld.so.
4900 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4902 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4903 Remove the typedef keyword.
4905 2000-04-18 Jakub Jelinek <jakub@redhat.com>
4907 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4909 (READ_MEMORY_BARRIER): Define.
4910 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4912 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4915 2000-04-17 Ulrich Drepper <drepper@redhat.com>
4917 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4918 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4919 use thread_handle().
4921 2000-04-16 Ulrich Drepper <drepper@redhat.com>
4923 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4924 if fast mutex is used. Don't initialize `already_canceled' twice.
4925 Correctly test for return value of timedsuspend.
4927 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
4928 therefore don't need the _rt versions of the signal handlers.
4930 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4932 * pthread.c (pthread_yield): New function.
4933 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4934 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4935 * internals.h: Declare __pthread_yield.
4937 * pthread.c (pthread_initialize): Avoid a bit more code if
4938 realtime signals are known to exist.
4940 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4941 to dynamically detect RT signals and avoid generating compatibility
4942 functions with old kernel.
4943 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4944 __pthread_restart_new directly.
4945 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4946 __pthread_wait_for_restart_signal directly.
4947 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4948 __pthread_timedsuspend_new directly.
4950 2000-04-15 Ulrich Drepper <drepper@redhat.com>
4952 * condvar.c: Remove all the special code to handle cond_timedwait.
4953 Use timedsuspend instead.
4954 * internals.h: Declare __pthread_timedsuspend_old,
4955 __pthread_timedsuspend_new, and __pthread_timedsuspend.
4956 Remove declaration of __pthread_init_condvar.
4957 * pthread.c: Define __pthread_timedsuspend variable.
4958 (__pthread_timedsuspend_old): New function. Timed suspension
4959 implementation for old Linux kernels.
4960 (__pthread_timedsuspend_new): New function. Timed suspension
4961 implementation for new Linux kernels.
4962 * restart.h (timedsuspend): New function. Call appropriate
4963 suspension function through __pthread_timedsuspend.
4964 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4966 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4968 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4970 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4972 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4973 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4975 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4976 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4978 2000-04-14 Andreas Jaeger <aj@suse.de>
4980 * weaks.c: Fix typo.
4982 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4983 2.2 for linuxthreads.
4985 2000-04-13 Ulrich Drepper <drepper@redhat.com>
4987 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4988 (pthread_getcpuclockid): Fix typo.
4990 2000-04-12 Ulrich Drepper <drepper@redhat.com>
4992 * Makefile (libpthread-routines): Add getcpuclockid.
4993 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4994 * sysdeps/pthread/getcpuclockid.c: New file.
4995 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4996 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4998 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
5000 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5002 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
5003 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5004 and pthread_spin_unlock.
5005 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
5006 into pthread_spinlock_t. Change all uses.
5007 * spinlock.c: Implement pthread_spin_lock.
5008 Rename __pthread_unlock to __pthread_spin_unlock and define weak
5009 alias for real name.
5010 Define pthread_spin_trylock, pthread_spin_init, and
5011 pthread_spin_destroy.
5012 Change all uses of _pthread_fastlock to pthread_spinlock_t.
5013 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
5014 Change all uses of _pthread_fastlock to pthread_spinlock_t.
5015 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
5016 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
5017 and pthread_spin_unlock.
5018 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
5019 Change all uses of _pthread_fastlock to pthread_spinlock_t.
5020 * condvar.c: Likewise.
5021 * internals.h: Likewise.
5023 * manager.c: Likewise.
5024 * mutex.c: Likewise.
5025 * pthread.c: Likewise.
5026 * rwlock.c: Likewise.
5027 * semaphore.c: Likewise.
5028 * signals.c: Likewise.
5030 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
5032 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
5034 2000-04-11 Ulrich Drepper <drepper@redhat.com>
5036 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
5037 _POSIX_SHARED_MEMORY_OBJECTS.
5039 2000-04-11 Andreas Jaeger <aj@suse.de>
5041 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
5042 (__compare_and_swap): Mark as modifying memory.
5044 2000-04-11 Geoff Keating <geoffk@cygnus.com>
5046 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
5048 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
5049 Don't have the 'asm' __volatile__.
5051 2000-04-11 Ulrich Drepper <drepper@redhat.com>
5053 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
5054 * spinlock.c (__pthread_lock): Add memory barriers.
5055 (__pthread_unlock): Likewise.
5056 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
5058 (RELEASE): Not needed anymore.
5059 (__compare_and_swap): Mark asm as modifying memory.
5060 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
5062 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
5063 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
5064 (MEMORY_BARRIER): Define using stbar.
5065 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
5067 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
5068 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
5069 Mike Burrows <m3b@pa.dec.com>.
5071 2000-04-09 Ulrich Drepper <drepper@redhat.com>
5073 * signals.c (sigaction): Fix return value for the case SIG is one
5074 of the signals the implementation uses.
5075 Patch by Xavier.Leroy@inria.fr.
5077 2000-04-01 Andreas Jaeger <aj@suse.de>
5079 * attr.c: Use shlib-compat macros.
5080 * oldsemaphore.c: Likewise.
5081 * pthread.c: Likewise.
5082 * weaks.c: Likewise.
5084 2000-03-26 Ulrich Drepper <drepper@redhat.com>
5086 * semaphore.c (sem_timedwait): New function.
5087 Patch by Carl Mailloux <carlm@oricom.ca>.
5088 * semaphore.h: Declare sem_timedwait.
5089 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
5091 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
5093 * sysdeps/pthread/Makefile: File removed.
5095 2000-03-23 Ulrich Drepper <drepper@redhat.com>
5097 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
5098 * internals.h (__pthread_reset_pthread_once): Add prototype.
5099 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5101 * manager.c (pthread_handle_create): Store ID of new thread before
5104 2000-03-21 Ulrich Drepper <drepper@redhat.com>
5106 * attr.c: Use new macros from shlib-compat.h to define versions.
5107 * oldsemaphore.c: Likewise.
5108 * semaphore.c: Likewise.
5109 * weaks.c: Likewise.
5111 * pthread.c: Update for new SHLIB_COMPAT definition.
5113 * manager.c (__pthread_manager): Unmask debug signal.
5115 * pthread.c (pthread_initialize): Test for address of __dso_handle
5116 being NULL, not value. Use __on_exit, not on_exit.
5117 Patch by Andreas Jaeger <aj@suse.de>.
5119 * pthread.c: Use new macros from shlib-compat.h to define versions.
5121 2000-03-19 Ulrich Drepper <drepper@redhat.com>
5123 * pthread.c (pthread_initialize): Instead of on_exit use
5124 __cxa_atexit if __dso_label is available to allow unloading the
5125 libpthread shared library.
5127 2000-03-16 Ulrich Drepper <drepper@redhat.com>
5129 * condvar.c: Make tests for ownership of mutex less strict.
5131 2000-03-14 Ulrich Drepper <drepper@redhat.com>
5133 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5134 current thread and return error if not.
5135 (pthread_cond_timedwait_relative_old): Likewise.
5136 (pthread_cond_timedwait_relative_new): Likewise.
5138 * mutex.c (__pthread_once): Handle cancelled init function correctly.
5139 (pthread_once_cancelhandler): New function.
5140 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5142 2000-03-14 Andreas Jaeger <aj@suse.de>
5144 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5146 (pthread_handle_sigrestart_rt): Likewise.
5147 * signals.c (pthread_sighandler_rt): Likewise.
5149 2000-03-02 Andreas Jaeger <aj@suse.de>
5151 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5152 Reported by Sean Chen <sean.chen@turbolinux.com>.
5154 2000-02-28 Andreas Jaeger <aj@suse.de>
5156 * rwlock.c: Fix typo.
5158 2000-02-27 Ulrich Drepper <drepper@redhat.com>
5160 * rwlock.c: Define __* variants of the functions and make old names
5162 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5163 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5165 2000-02-25 Andreas Jaeger <aj@suse.de>
5167 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5168 pwrite64, lseek64, open64, and __open64 with version 2.2.
5170 2000-02-22 Ulrich Drepper <drepper@redhat.com>
5172 * semaphore.h (SEM_FAILED): Use 0 not NULL.
5174 2000-02-14 Ulrich Drepper <drepper@redhat.com>
5176 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5177 nanosleep does not work either. Get absolute time inside the
5179 (pthread_cond_timedwait_relative_new): Likewise.
5180 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5182 2000-02-13 Andreas Jaeger <aj@suse.de>
5184 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5185 (pthread_cond_timedwait_relative_old): Likewise.
5187 2000-02-13 Ulrich Drepper <drepper@redhat.com>
5189 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5190 but keep the code around. A bug in the kernel prevent us from
5192 (pthread_cond_timedwait_relative_new): Likewise.
5193 (PR libc/1597 and libc/1598).
5195 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
5197 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5198 loop around nanosleep calls instead of around most of the function
5199 (pthread_cond_timedwait_relative_new): Likewise.
5200 body. Got rid of backwards goto and one local.
5202 2000-01-31 Ulrich Drepper <drepper@redhat.com>
5204 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5205 before every nanosleep call to account for time spent in the rest
5207 (pthread_cond_timedwait_relative_new): Likewise.
5208 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5210 2000-01-29 Ulrich Drepper <drepper@redhat.com>
5212 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5213 from nanosleep call so that in case we restart we only wait for the
5215 (pthread_cond_timedwait_relative_new): Likewise.
5216 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5218 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
5220 * manager.c (pthread_allocate_stack): Compute guard page address
5221 correctly. Patch by HJ Lu.
5223 * sysdeps/pthread/pthread.h: Define
5224 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5226 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
5228 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5229 preference handling.
5230 (pthread_rwlockattr_setkind_np): Allow
5231 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5232 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5234 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
5236 * internals.h (pthread_readlock_info): New structure.
5237 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5238 p_untracked_readlock_count.
5239 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5240 Add initializers for new fields.
5241 * manager.c (pthread_free): Free read/write lock lists.
5242 * queue.h (queue_is_empty): New function.
5243 * rwlock.c: Implement requirements about when readers should get
5245 * sysdeps/pthread/pthread.h
5246 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5247 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5248 Define this name as well.
5249 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5251 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
5253 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5254 Adjust initializers for struct _pthread_descr_struct change.
5255 * internals.h (struct _pthread_descr_struct): Move new elements to
5258 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
5260 Redesigned how cancellation unblocks a thread from internal
5261 cancellation points (sem_wait, pthread_join,
5262 pthread_cond_{wait,timedwait}).
5263 Cancellation won't eat a signal in any of these functions
5264 (*required* by POSIX and Single Unix Spec!).
5265 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5266 simultaneous condition variable signal (not required by POSIX
5267 or Single Unix Spec, but nice).
5268 * spinlock.c: __pthread_lock queues back any received restarts
5269 that don't belong to it instead of assuming ownership of lock
5270 upon any restart; fastlock can no longer be acquired by two threads
5272 * restart.h: Restarts queue even on kernels that don't have
5273 queued real time signals (2.0, early 2.1), thanks to atomic counter,
5274 avoiding a rare race condition in pthread_cond_timedwait.
5276 1999-12-31 Andreas Jaeger <aj@suse.de>
5278 * internals.h: Remove duplicate prototype declarations.
5280 * weaks.c: Remove __THROW from prototypes since the file is not
5281 compiled by a C++ compiler.
5282 * internals.h: Likewise.
5284 1999-12-30 Andreas Jaeger <aj@suse.de>
5286 * sysdeps/pthread/pthread.h: Move internal functions to...
5287 * sysdeps/pthread/bits/libc-lock.h: ...here.
5289 1999-12-29 Andreas Jaeger <aj@suse.de>
5291 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5293 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
5295 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5298 * manager.c (__pthread_start): Add one more cast to prevent
5299 warning on 64bit machines.
5301 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
5303 * manager.c (pthread_handle_create): Set p_pid of new thread
5304 before calling the callback function to report a new thread.
5306 1999-12-20 Andreas Jaeger <aj@suse.de>
5308 * pthread.c (pthread_initialize): Move getrlimit call after
5311 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
5313 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5314 pwrite64, lseek64, open64, and __open64.
5315 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5316 pwrite64, lseek64, open64, and __open64.
5318 * manager.c (pthread_allocate_stack): Correct computation of
5319 new_thread_bottom. Correct handling of stack size and when the
5320 rlimit method to guard for stack growth is used.
5321 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5322 minus one pagesize (not two).
5324 1999-12-03 Andreas Jaeger <aj@suse.de>
5326 * Versions: Add __res_state with version GLIBC_2.2.
5328 * errno.c (__res_state): New function to return thread specific
5331 * pthread.c (pthread_initialize): Initialize p_resp.
5332 (__pthread_reset_main_thread): Also set p_resp.
5334 * manager.c (pthread_handle_create): Initialize p_resp.
5336 * internals.h: Add thread specific resolver state.
5337 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5339 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
5341 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5343 * sysdeps/i386/i686/pt-machine.h: Likewise.
5344 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5346 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
5348 * manager.c (pthread_start_thread_event): Initialize p_pid already
5351 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
5353 * internals.h: Add prototype for __pthread_manager_event.
5354 * manager.c (__pthread_manager_event): New function.
5355 (pthread_start_thread_event): Correct computation of self.
5356 Use INIT_THREAD_SELF.
5357 * pthread.c (__pthread_manager_thread): Initialize p_lock.
5358 (__pthread_initialize_manager): Respect event flags also for creation
5359 of the manager thread.
5361 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
5363 * pthread.c (__pthread_initialize_manager): Initialize
5364 __pthread_manager_thread.p_tid.
5366 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
5368 * internals.h: Declare __pthread_last_event.
5369 * manager.c: Define __pthread_last_event.
5370 (pthread_handle_create): Set __pthread_last_event.
5371 (pthread_exited): Likewise.
5372 * join.c (pthread_exit): Likewise.
5374 * Makefile (libpthread-routines): Add events.
5375 * events.c: New file.
5376 * internals.h: Protect against multiple inclusion.
5377 Include thread_dbP.h header.
5378 (struct _pthread_descr_struct): Add new fields p_report_events and
5380 Declare event reporting functions.
5381 * join.c (pthread_exit): Signal event if this is wanted.
5382 * manager.c (__pthread_threads_events): New variable.
5383 (pthread_handle_create): Take new parameters with event information.
5384 Signal TD_CREATE event if wanted.
5385 (__pthread_manager): Adjust pthread_handle_create call.
5386 (pthread_start_thread_event): New function. Block until manager is
5387 finished and then call pthread_start_thread.
5388 (pthread_exited): Signal TD_REAP event if wanted.
5390 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
5392 * restart.h (suspend_with_cancellation): Rewrite as a macro.
5394 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5396 1999-10-25 Andreas Jaeger <aj@suse.de>
5398 * internals.h: Remove K&R compatibility.
5399 * no-tsd.c: Likewise.
5400 * semaphore.h: Likewise.
5401 * signals.c: Likewise.
5402 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5403 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5404 * weaks.c: Likewise.
5406 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
5408 * pthread.c: For i386, wrap pthread_handle_sigrestart and
5409 pthread_handle_sigcancel with functions that restore %gs from the
5410 signal context. For each signal handling function, two wrappers
5411 are required, one for a non-RT signal and one for a RT signal.
5412 * signal.c: For i386, add code to restore %gs from the signal
5413 context in pthread_sighandler and pthread_sighandler_rt.
5415 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
5417 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5419 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
5421 * pthread.c (__pthread_initial_thread): Pass argument to
5422 PTHREAD_START_ARGS_INITIALIZER.
5423 (__pthread_manager_thread): Likewise.
5425 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5426 initialize function.
5428 * manager.c (pthread_handle_create): Remove p_startfct initialization.
5430 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5432 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
5434 * internals.h: Correct return types for __libc_read and __libc_write.
5436 1999-10-09 Andreas Jaeger <aj@suse.de>
5438 * internals.h: Add __new_sem_post to get prototype in
5439 manager.c; include semaphore.h for needed types.
5441 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
5443 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5444 directly instead of calling sem_post which should not be necessary
5445 but is faster and might help in some case to work around problems.
5446 Patch by khendricks@ivey.uwo.ca [libc/1382].
5448 1999-10-08 Andreas Schwab <schwab@suse.de>
5450 * sysdeps/pthread/Subdirs: New file.
5453 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
5455 * Implies: New file.
5456 * internals.h (struct _pthread_descr_struct): Add p_startfct.
5457 * manager.c (pthread_handle_create): Initialize p_startfct.
5458 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5460 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
5462 * manager.c (__linuxthreads_pthread_threads_max): New variable.
5463 * specific.c (__linuxthreads_pthread_keys_max): New variable.
5464 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5466 * condvar.c (pthread_cond_timedwait_relative): Never return with
5467 EINTR. Patch by Andreas Schwab.
5469 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
5471 * signals.c (sigaction): Correct last patch. Don't select
5472 pthread_sighandler_rt based on the signal number but instead of
5473 the SA_SIGINFO flag.
5475 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
5477 * specific.c: Move definitions of struct pthread_key_struct and
5478 destr_function to ...
5479 * internals.h: ...here.
5481 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
5483 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
5484 this instead of pthread_handle_sigrestart if the signal is an RT
5487 * signals.c: Handle passing through of sighandler arguments also
5488 for real-time signals.
5490 1999-09-03 Andreas Schwab <schwab@suse.de>
5492 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
5494 (__vfork): New function, alias vfork.
5495 * Versions: Export __fork, vfork, and __vfork in libpthread.
5497 1999-08-23 Andreas Schwab <schwab@suse.de>
5499 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5500 call to signal handler.
5502 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
5504 * pthread.c (__pthread_reset_main_thread): Undo last change.
5505 (__pthread_kill_other_threads_np): Reset signal handlers for the
5506 signals we used in the thread implementation here.
5508 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
5510 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5511 for the signals we used in the thread implementation [PR libc/1234].
5513 * Versions: Export __pthread_kill_other_threads_np from libpthread
5516 * signals.c: Pass sigcontext through wrapper to the user function.
5518 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
5520 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5521 __libc_internal_tsd_set.
5523 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5525 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5528 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5530 * internals.h: Align _pthread_descr_struct to 32 bytes.
5531 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5534 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5536 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5539 1999-07-09 Cristian Gafton <gafton@redhat.com>
5541 * Makefile (libpthread-routines): Add oldsemaphore routine.
5542 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5543 sem_trywait, and sem_wait to GLIBC_2.1.
5544 * oldsemaphore.c: New file.
5545 * semaphore.c: Add default_symbol_versions for the changed functions.
5546 (__new_sem_init): Rename from sem_init.
5547 (__new_sem_post): Rename from sem_post.
5548 (__new_sem_wait): Rename from sem_wait.
5549 (__new_sem_trywait): Rename from sem_trywait.
5550 (__new_sem_getvalue): Rename from sem_getvalue.
5551 (__new_sem_destroy): Rename from sem_destroy.
5553 1999-06-23 Robey Pointer <robey@netscape.com>
5555 * internals.h: Added p_nextlock entry to separate queueing for a
5556 lock from queueing for a CV (sometimes a thread queues on a lock
5557 to serialize removing itself from a CV queue).
5558 * pthread.c: Added p_nextlock to initializers.
5559 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5561 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
5563 * manager.c (pthread_handle_create): Free mmap region after stack
5564 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5566 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5568 * man/pthread_cond_init.man: Correct example.
5569 Reported by Tomas Berndtsson <tomas@nocrew.org>.
5571 * linuxthreads.texi (Condition Variables): Likewise.
5573 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
5575 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5576 casx not cas, also successful casx returns the old value in rd
5577 and not the new value.
5579 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
5581 * manager.c: If pthread_create() is given a NULL attribute
5582 and the thread manager runs with a realtime policy, set the
5583 scheduling policy of the newly created thread back to SCHED_OTHER.
5584 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5585 initialize the schedpolicy field of new_thread->p_start_args
5586 to that of the calling thread.
5588 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
5590 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5591 instruction does not allow memory element to use offset.
5593 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
5595 * manager.c (pthread_allocate_stack): Optimize initialization of new
5598 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5599 Don't use initializer since it is all zeroes.
5600 (__libc_once_define): Likewise.
5602 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5604 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5605 doesn't exist anymore.
5606 * sysdeps/i386/Implies: Likewise.
5607 * sysdeps/m68k/Implies: Likewise.
5608 * sysdeps/mips/Implies: Likewise.
5609 * sysdeps/powerpc/Implies: Likewise.
5610 * sysdeps/sparc/sparc32/Implies: Likewise.
5611 * sysdeps/sparc/sparc64/Implies: Likewise.
5613 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
5615 * sysdeps/alpha/bits/semaphore.h: Removed.
5616 * sysdeps/powerpc/bits/semaphore.h: Removed.
5617 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5618 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5619 * Makefile (headers): Remove bits/semaphore.h.
5621 * semaphore.h: Define _pthread_descr if necessary.
5622 Don't include limits.h. Define SEM_VALUE_MAX directly.
5624 (sem_t): Protect element names with leading __.
5625 Add declarations for sem_close, sem_open, and sem_unlink.
5626 * semaphore.c: Adjust all functions for new element names.
5627 Define sem_close, sem_open, and sem_unlink.
5628 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5630 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5633 1999-03-16 H.J. Lu <hjl@gnu.org>
5635 * specific.c (pthread_key_delete): Check th->p_terminated to see
5636 if the thread is running.
5638 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5639 Added to GLIBC_2.0 for libc.so.
5641 1999-02-12 H.J. Lu <hjl@gnu.org>
5643 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5644 __libc_allocate_rtsig): Added to GLIBC_2.1.
5646 * internals.h (DEFAULT_SIG_RESTART): Removed.
5647 (DEFAULT_SIG_CANCEL): Removed.
5649 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5650 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5651 (__pthread_sig_restart, __pthread_sig_cancel,
5652 __pthread_sig_debug): Initialized.
5653 (pthread_initialize): Call init_rtsigs () to initialize
5656 1999-02-03 H.J. Lu <hjl@gnu.org>
5658 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5659 Don't restart the thread which sent REQ_DEBUG.
5660 (pthread_start_thread): Check if __pthread_sig_debug > 0
5663 * pthread.c (__pthread_initialize_manager): Suspend ourself
5664 after sending __pthread_sig_debug to gdb instead of
5665 __pthread_sig_cancel.
5667 1999-01-24 H.J. Lu <hjl@gnu.org>
5669 * manager.c (__pthread_manager): Delete __pthread_sig_debug
5670 from mask if __pthread_sig_debug > 0.
5671 (pthread_handle_create): Increment __pthread_handles_num.
5673 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5674 * pthread.c (__pthread_initialize_manager): Likewise.
5676 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5677 instead of __libc_allocate_rtsig (2).
5678 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5679 instead of __pthread_sig_cancel.
5680 (pthread_handle_sigdebug): Fix comments.
5682 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
5684 * manager.c (pthread_allocate_stack): Set
5685 __pthread_nonstandard_stacks if user-specified stack is used.
5687 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
5689 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5690 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5692 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
5694 * pthread.c: Use a third signal __pthread_sig_debug distinct
5695 from __pthread_sig_cancel to notify gdb when a thread is
5697 * manager.c: Likewise.
5698 * internals.h: Likewise.
5699 * signals.c: The implementation of sigwait(s) assumed that
5700 all signals in s have signal handlers already attached.
5701 This is not required by the standard, so make it work
5702 also if some of the signals have no handlers.
5704 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5706 * linuxthreads.texi: Remove pointers from first @node. Move old
5707 @node spec inside comment.
5709 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
5711 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5714 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
5716 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5717 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5719 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
5721 * manager.c: Threads now send __pthread_sig_cancel on termination.
5722 Change clone call and signal masks.
5723 * thread.c (pthread_handle_sigrestart): Remove special code for
5725 (pthread_handle_sigcancel): In manager thread call
5726 __pthread_manager_sighandler.
5727 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5728 * sysdeps/i386/i686/pt-machine.h: Likewise.
5729 Patches by Xavier Leroy.
5731 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
5733 * spinlock.c (__pthread_unlock): Don't crash if called for an
5734 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5736 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5739 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
5741 * Examples/ex3.c: Wait until all threads are started before
5742 searching for the number to avoid race condition on very fast
5745 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5747 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5748 declaration since it's not needed.
5750 * sysdeps/pthread/pthread.h: Move internal functions to ...
5751 * internals.h: ...here.
5753 1998-12-02 H.J. Lu <hjl@gnu.org>
5755 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5756 SIGRTMIN is defined.
5757 (__pthread_sig_cancel): Likewise.
5759 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5761 * wrapsyscall.c: Include <sys/mman.h> for msync,
5762 <stdlib.h> for system and <termios.h> for tcdrain prototype.
5763 Correct msync declaration.
5765 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
5767 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5768 __libc_tsd_set): New macros for new interface.
5769 * no-tsd.c: New file, provide uninitialized defns of
5770 __libc_internal_tsd_get and __libc_internal_tsd_set.
5771 * Makefile (routines): Add no-tsd.
5773 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
5775 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5776 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5777 __libc_internal_tsd_set): Move decls to ...
5778 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5781 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5782 __libc_internal_tsd_set): Make these pointers to functions, not
5783 functions; remove #pragma weak decls for them.
5784 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5785 Define static functions and initialized pointers to them.
5787 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
5789 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5790 (CFLAGS-specific.c): Likewise.
5791 (CFLAGS-pthread.c): Likewise.
5792 (CFLAGS-ptfork.c): Likewise.
5793 (CFLAGS-cancel.c): Likewise.
5794 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5795 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5797 * mutex.c (pthread_mutex_init): Define as strong symbol.
5798 (pthread_mutex_destroy): Likewise.
5799 (pthread_mutex_trylock): Likewise.
5800 (pthread_mutex_lock): Likewise.
5801 (pthread_mutex_unlock): Likewise.
5802 (pthread_mutexattr_init): Likewise.
5803 (pthread_mutexattr_destroy): Likewise.
5804 (pthread_once): Likewise.
5805 * ptfork.c (pthread_atfork): Likewise.
5806 * specific.c (pthread_key_create): Likewise.
5807 (pthread_setspecific): Likewise.
5808 (pthread_getspecific): Likewise.
5810 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5812 * linuxthreads.texi: Fix punctuation after xref.
5814 1998-11-10 H.J. Lu <hjl@gnu.org>
5816 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5817 if it is defined in <linux/limits.h>.
5819 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
5821 * spinlock.h (__pthread_trylock): Define inline.
5822 (__pthread_lock): Add extra parameter to declaration. Declare
5823 using internal_function.
5824 (__pthread_unlock): Declare using internal_function.
5825 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
5826 of local variable self. Avoid recomputing self. Define using
5828 (__pthread_trylock): Remove.
5829 (__pthread_unlock): Define using internal_function.
5830 * cancel.c: Adjust for __pthread_lock interface change. Use already
5831 computed self value is possible.
5832 * condvar.c: Likewise.
5834 * manager.c: Likewise.
5835 * mutex.c: Likewise.
5836 * pthread.c: Likewise.
5837 * rwlock.c: Likewise.
5838 * semaphore.c: Likewise.
5839 * signals.c: Likewise.
5841 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
5843 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5844 __ to field names of the struct.
5845 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5847 (pthread_attr_t): Likewise.
5848 (pthread_cond_t): Likewise.
5849 (pthread_condattr_t): Likewise.
5850 (pthread_mutex_t): Likewise.
5851 (pthread_mutexattr_t): Likewise.
5852 (pthread_rwlock_t): Likewise.
5853 (pthread_rwlockattr_t): Likewise.
5854 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5855 * cancel.c: Likewise.
5856 * condvar.c: Likewise.
5857 * manager.c: Likewise.
5858 * mutex.c: Likewise.
5859 * pthread.c: Likewise.
5860 * ptlongjmp.c: Likewise.
5861 * rwlock.c: Likewise.
5862 * spinlock.c: Likewise.
5864 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
5866 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5869 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5872 * Makefile (libpthread-routines): Add pt-machine.
5873 * pt-machine.c: New file.
5874 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5875 yet defined. Use PT_EI in extern inline definitions.
5876 * sysdeps/arm/pt-machine.h: Likewise.
5877 * sysdeps/i386/pt-machine.h: Likewise.
5878 * sysdeps/i386/i686/pt-machine.h: Likewise.
5879 * sysdeps/m68k/pt-machine.h: Likewise.
5880 * sysdeps/mips/pt-machine.h: Likewise.
5881 * sysdeps/powerpc/pt-machine.h: Likewise.
5882 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5883 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5885 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
5887 * semaphore.h: Include <sys/types.h> so that _pthread_descr
5890 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
5892 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5894 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5896 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
5898 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5901 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5903 * signals.c (sigaction): Check that sig is less than NSIG to avoid
5904 array index overflow.
5906 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
5908 * sysdeps/pthread/semaphore.h: New file.
5910 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
5912 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5913 _LIBC_TSD_KEY_DL_ERROR.
5915 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
5917 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5918 * sysdeps/i386/pt-machine.h: Likewise.
5919 Suggested by Roland McGrath.
5921 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
5923 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5924 access thread data with non-constant offsets.
5925 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5928 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
5929 THREAD_SETMEM_NC definitions.
5931 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5933 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5935 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
5937 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5938 not already defined.
5939 (struct _pthread_descr_struct): Add p_self and p_nr field.
5940 * manager.c (__pthread_handles): Define second element to point
5942 (__pthread_handles_num): Initialize to 2.
5943 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5944 (pthread_start_thread): Likewise.
5945 (pthread_handle_create): Start search for free slot at entry 2.
5946 Initialize new fields p_self and p_nr.
5947 Call __clone with CLONE_PTRACE if available.
5948 (pthread_free): Call FREE_THREAD_SELF if available.
5949 * pthread.c (__pthread_initial_thread): Initialize new fields.
5950 (__pthread_manager_thread): Likewise.
5951 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5953 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5954 elements of the thread descriptor.
5955 * condvar.c: Likewise.
5956 * errno.c: Likewise.
5958 * manager.c: Likewise.
5959 * pthread.c: Likewise.
5960 * ptlongjmp.c: Likewise.
5961 * semaphore.c: Likewise.
5962 * signals.c: Likewise.
5963 * specific.c: Likewise.
5964 * spinlock.c: Likewise.
5966 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5968 * sysdeps/i386/useldt.h: New file.
5969 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5971 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5972 THREAD_SETMEM using __thread_self.
5973 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5975 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
5977 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5978 turned out that we didn't need to queue after all.
5980 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
5982 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5983 and wastes space; correct types.
5985 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
5987 * signals.c (sigaction): Handle NULL argument.
5989 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
5991 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5994 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5996 * Makefile (linuxthreads-version): Extract correct number from
5999 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
6001 * Banner: Bump version number to 0.8
6002 * FAQ.html: Many updates, in particular w.r.t. debugging.
6003 * manager.c: Support for non-default stacksize for
6004 LinuxThreads-allocated stacks;
6005 don't use guard pages for stacks with default size, rely on
6006 rlimit(RLIMIT_STACK) instead (it's cheaper).
6008 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
6009 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
6010 * condvar.c: Likewise.
6011 * internals.h: Likewise.
6012 * restart.h: Likewise.
6013 * signals.c: Likewise.
6014 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
6016 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6018 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
6019 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
6020 * Versions: Put __pthread_mutexattr_settype under version
6021 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
6022 __pthread_mutexattr_gettype.
6024 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6026 * sysdeps/pthread/bits/libc-lock.h: Make
6027 __pthread_mutexattr_settype weak. Don't make
6028 __pthread_mutexattr_setkind_np weak.
6030 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
6032 * manager.c (pthread_handle_create): Check whether sched_setscheduler
6033 call can succeed here.
6035 * mutex.c: Define __pthread_mutexattr_settype and make
6036 __pthread_mutexattr_setkind_np an alias.
6037 Likewise for __pthread_mutexattr_gettype.
6039 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
6041 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
6044 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
6046 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
6048 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6050 * Examples/ex6.c: Include <unistd.h> for usleep.
6052 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6054 * Examples/ex4.c (main): Use exit, not pthread_exit.
6056 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
6058 * Versions: Add __pthread_mutexattr_gettype and
6059 __pthread_mutexattr_settype.
6060 * lockfile.c: Use __pthread_mutexattr_settype instead of
6061 __pthread_mutexattr_setkind_np.
6062 * mutex.c: Define __pthread_mutexattr_gettype and
6063 __pthread_mutexattr_settype.
6065 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
6066 __pthread_mutexattr_settype.
6067 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
6068 Use __pthread_mutexattr_settype.
6070 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
6072 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
6073 * mutex.c: Define weak alias pthread_mutexattr_gettype and
6074 pthread_mutexattr_settype.
6075 * sysdeps/pthread/pthread.h: Declare these functions.
6076 Move pthread_sigmask and pthread_kill declaration in separate header.
6077 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
6079 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
6081 * Makefile: Add rules to compile and run tests.
6082 * Examples/ex1.c: Little changes to fix warnings.
6083 * Examples/ex2.c: Likewise.
6084 * Examples/ex3.c: Likewise.
6085 * Examples/ex4.c: Likewise.
6086 * Examples/ex5.c: Likewise.
6087 * Examples/ex6.c: New file.
6089 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
6091 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
6093 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6095 * attr.c: Include <string.h>.
6097 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
6099 * attr.c: Include errno.h. Use memcpy to copy sched_param.
6100 * internals.h: Include limits.h.
6101 * manager.c: Use memcpy to copy sched_param.
6102 * ptfork.c: Include errno.h.
6103 * pthread.c: Likewise.
6104 * semaphore.c: Likewise.
6105 * specific.c: Likewise.
6106 * spinlock.h: Likewise.
6107 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
6108 type definition to ...
6109 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
6111 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
6113 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6115 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6116 as macros as demanded in POSIX.1, Annex C.
6118 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
6120 * internals.h (struct pthread_request): For free use pthread_t
6121 instead of pthread_descr.
6122 * join.c (pthread_join): Pass thread_id, not th to manager.
6123 (pthread_detach): Likewise.
6124 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6125 (pthread_exited): Remove detached queue code.
6126 (pthread_handle_free): Expect thread ID parameter and use it to
6127 validate the thread decsriptor. Don't use detached queue.
6128 Patches by Xavier Leroy.
6130 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6132 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6133 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6134 __pthread_atfork, __pthread_key_create, __pthread_once.
6135 * internals.h: Doc fix.
6136 * pthread.c (__pthread_initialize): Define again.
6138 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
6140 * manager.c (pthread_exited): If thread is not detached put it on
6142 (pthread_handle_free): If thread is not on list with living threads
6143 search on list with detached threads.
6145 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6146 for new definition of pthread_rwlock_t.
6148 * spinlock.c: Correct test whether to compile
6149 __pthread_compare_and_swap or not.
6151 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
6153 * attr.c: Finish user stack support. Change locking code to be safe
6154 in situations with different priorities.
6155 * cancel.c: Likewise.
6156 * condvar.c: Likewise.
6157 * internals.h: Likewise.
6159 * manager.c: Likewise.
6160 * mutex.c: Likewise.
6161 * pthread.c: Likewise.
6162 * ptlongjmp.c: Likewise.
6163 * queue.h: Likewise.
6164 * rwlock.c: Likewise.
6165 * semaphore.c: Likewise.
6166 * semaphore.h: Likewise.
6167 * signals.c: Likewise.
6168 * spinlock.c: Likewise.
6169 * spinlock.h: Likewise.
6170 * sysdeps/pthread/pthread.h: Likewise.
6171 Patches by Xavier Leroy.
6173 * sysdeps/i386/i686/pt-machine.h: New file.
6175 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
6177 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6178 [sg]et_stackaddr prototypes always available.
6180 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6181 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6183 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
6185 * manager.c (pthread_free): Undo patch from 980430.
6186 Reported by David Wragg <dpw@doc.ic.ac.uk>.
6188 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
6190 * manager.c: Define __pthread_manager_adjust_prio and use it to
6191 increase priority when needed.
6192 * internals.h: Add prototype for __pthread_manager_adjust_prio.
6193 * mutex.c: Optimize mutexes to wake up only one thread.
6194 * pthread.c: Move PID of manager for global variable in structure
6196 Patches by Xavier Leroy.
6198 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
6200 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6202 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
6204 * attr.c: Correct typo.
6206 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
6208 * manager.c (pthread_free): Unmap guard before the stack.
6209 Patch by Matthias Urlichs.
6211 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
6213 * manager.c (pthread_free): Detect already free child.
6214 Patch by Xavier Leroy, reported by Matthias Urlichs.
6216 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6218 * Makefile (linuxthreads-version): Renamed back from
6221 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
6223 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6226 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
6228 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6229 * internals.h: Add definitions for new spinlock implementation.
6230 * ptlongjmp.c: New file.
6231 * spinlock.c: New file.
6232 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6233 new function __pthread_acquire to prevent deadlocks with thread
6234 with different priorities.
6235 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6237 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6239 * manager.c (__pthread_manager): Reduce first argument to select
6240 to include just the needed file descriptor.
6242 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
6244 * manager.c: Fix last patch which caused core dumps.
6246 * pthread.c: Correctly handle missing SIGRTMIN.
6248 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6250 * libpthread.map: Add __libc_internal_tsd_get and
6251 __libc_internal_tsd_set. Add missing cancelable functions. Export
6252 libc internal versions of the cancelable functions.
6254 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
6256 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6258 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
6260 * attr.c: Implement pthread_attr_[gs]etguardsize,
6261 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6262 Change pthread_attr_init to have two interfaces.
6263 * internals.h (struct _pthread_descr_struct): Add new fields for
6265 * libpthread.map: Add names in GLIBC_2.1 section.
6266 * manager.c (pthread_handle_create): Implement guardsize and
6268 (pthread_free): Likewise.
6269 * pthread.c (pthread_create): Add new interface for changed
6271 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6272 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6275 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
6277 * manager.c: Enable resetting of the thread scheduling policy
6278 to SCHED_OTHER when the parent thread has a different one.
6280 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
6282 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6283 _POSIX_ASYNCHRONOUS_IO.
6285 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6287 * mutex.c: Implement new mutex types.
6289 * internals.h: Include <signal.h>.
6291 * libpthread.map: Add __erno_location and __h_errno_location.
6293 * errno.c: Return pointer to variable actually in use. This might
6294 not be the one in the thread structure.
6295 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6297 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6298 of manager thread structure.
6299 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6301 * pthread.c: Adapt initializer for thread structures.
6302 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6303 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6304 current thread to global variables.
6306 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
6308 * rwlock.c: New file.
6309 * Makefile (libpthread-routines): Add rwlock.
6310 * sysdeps/pthread/pthread.h: Define data structures and declare
6312 * libpthread.map: Add new functions.
6314 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
6316 * sysdeps/arm/pt-machine.h: New file; add ARM support.
6317 * sysdeps/arm/Implies: likewise.
6318 * README: Document it.
6320 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6322 * signals.c: Remove unneeded initializer for sigwaited, saving a
6325 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6327 * semaphore.c (sem_init): Set sem_spinlock only if available.
6329 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
6331 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6332 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6334 * Makefile: Update from LinuxThreads 0.7.
6335 * internals.h. Likewise.
6336 * manager.c: Likewise.
6337 * mutex.c: Likewise.
6338 * pthread.c: Likewise.
6339 * signals.c: Likewise.
6340 * specific.c: Likewise.
6341 * Examples/ex3.c: Likewise.
6343 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
6345 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6348 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
6350 * wrapsyscall.c: Add socket functions which are also cancelation
6353 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
6355 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6356 New functions for fast thread specific data within libc.
6358 * internals.h: Add new array p_libc_specific to struct
6359 _pthread_descr_struct.
6361 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6363 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
6365 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6366 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6368 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
6370 * internals.h (struct _pthread_descr_struct): Add definitions for
6371 two-level specific key handling.
6372 * manager.c (pthread_handle_create): Initialize specific memory array.
6373 * specific.c: Implement two-level key handling.
6374 * weaks.c: Don't provide dummy key handling.
6375 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6376 Add definition of __libc_key_t.
6377 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6379 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6380 PTHREAD_DESTRUCTOR_ITERATIONS.
6382 * manager.c (pthread_handle_create): Compare mmap result with
6385 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6386 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6388 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
6390 sysdeps/sparc -> sysdeps/sparc/sparc32
6391 sysdeps/sparc64 -> sysdeps/sparc/sparc64
6393 * internals.h: Change definition of THREAD_SELF to be an expression,
6394 not a statement that did a return.
6395 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6396 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6397 Follow Solaris and use a "system reserved" register (%g6) to hold
6398 the thread descriptor.
6399 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6401 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
6403 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
6404 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6405 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6407 * semaphore.c: Include spinlock.h only when needed.
6409 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6410 keys for entries not in use.
6412 * weaks.c: Implement key handling functions for real.
6414 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
6416 Initial sparc64-linux support:
6417 * sysdeps/sparc64/Implies: New file.
6418 * sysdeps/sparc64/pt-machine.h: Likewise.
6420 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
6422 * semaphore.c: Include spinlock.h at correct place.
6425 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
6427 The Great Bit File Move:
6428 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6429 * sysdeps/powerpc/semaphorebits.h: Likewise.
6430 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6431 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6432 * sysdeps/pthread/libc-lock.h: -> bits/
6433 * sysdeps/pthread/stdio-lock.h: Likewise.
6434 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6435 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6436 * semaphore.h: Likewise.
6437 * sysdeps/pthread/pthread.h: Likewise.
6439 * lockfile.c: <foo.h> -> <bits/foo.h>.
6440 * semaphore.h: Likewise.
6442 * Makefile: (headers): foo.h -> bits/foo.h.
6443 * sysdeps/pthread/Makefile: Likewise.
6445 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6447 * semaphore.c (sem_init): Set sem_spinlock only if available.
6449 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6452 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
6454 Update from LinuxThreads 0.6.
6456 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6457 and __sched_get_priority_min instead of names without `__'.
6459 * manager.c: Rewrite large parts to implement opaque pthread_t.
6461 * cancel.c: Adapt for opaque pthread_t type.
6462 * condvar.c: Likewise.
6463 * errno.c: Likewise.
6465 * mutex.c: Likewise.
6466 * pthread.c: Likewise.
6467 * signals.c: Likewise.
6468 * specific.c: Likewise.
6469 * restart.h: Likewise.
6470 * queue.h: Likewise.
6471 * Examples/ex3.c: Likewise.
6472 * Examples/ex4.c: Likewise.
6473 * sysdeps/pthread/pthread.h: Likewise.
6475 * pthread.c: Accumulate time for all threads in thread manager.
6477 * semaphore.c: Implement fallback implementation for architectures
6478 sometimes missing compare-exchange operations.
6480 * cancel.c (pthread_cancel): Validate handle argument.
6481 * join.c (pthread_join): Likewise.
6482 (pthread_detach): Likewise.
6483 * signals.c (pthread_kill): Likewise.
6485 * spinlock.h (acquire): Use __sched_yield not sched_yield.
6487 * queue.h (enqueue): Enqueue thread according to priority.
6489 * internals.c (struct pthread_start_args): New struct for passing
6490 args to cloning function.
6491 (struct _pthread): Rename to _pthread_descr_struct and adapt for
6494 * Examples/Makefile (clean): Pass -f option to rm.
6496 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6497 and define TEST_FOR_COMPARE_AND_SWAP.
6498 * sysdeps/i386/i486/pt-machine.h: Removed.
6500 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6503 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
6505 * restart.h (suspend): Clear p_signal before suspending.
6506 (suspend_with_cancellation): Likewise.
6507 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6509 * weaks.c: Make __pthread_key_create return 1.
6510 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6511 __libc_getspecific, __libc_setspecific, and __libc_key_t.
6512 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6515 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
6517 * sysdeps/sparc/pt-machine (RELEASE): Fix.
6519 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
6521 * sysdeps/powerpc/Implies: Added.
6522 * sysdeps/powerpc/pt-machine.h: Added.
6523 * sysdeps/powerpc/semaphorebits.h: Added.
6525 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
6527 * pthread.c (__pthread_initial_thread): Correct
6529 (__pthread_manager_thread): Likewise.
6530 Reported by Andreas Jaeger.
6532 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
6534 Since sigset_t no longer fits in a register, we can't pass in the
6535 thread's initial mask so easily. Take this opportunity to simplify
6536 the clone implementation by only accepting a single void* argument.
6538 * manager.c (__pthread_manager): Put thread vitals in the thread
6539 struct instead of as arguments through clone.
6540 (pthread_start_thread): Look for them there.
6541 * internals.h (struct _pthread): Add p_initial_fn,
6542 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
6543 * pthread.c (pthread_initialize_manager): Revise clone invocation.