1 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
3 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
5 (__pthread_spin_trylock): Likewise.
6 * sysdeps/sh/pt-machine.h (testandset): Likewise.
8 2001-04-10 Ulrich Drepper <drepper@redhat.com>
10 * join.c (pthread_exit): Move code to new function __pthread_do_exit
11 which takes an extra parameter with the current frame pointer.
12 Call new function with CURRENT_STACK_FRAME.
13 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
14 with the new parameter.
15 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
16 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
17 this parameter as the initial value the cleanup handler records are
18 compared against. No active cleanup handler record must have an
19 address lower than the previous one and the initial record must be
20 above (below on PA) the frame address passed in.
21 (pthread_setcancelstate): Call __pthread_do_exit instead of
23 (pthread_setcanceltype): Likewise.
24 (pthread_testcancel): Likewise.
25 (_pthread_cleanup_pop_restore): Likewise.
26 * condvar.c (pthread_cond_wait): Likewise.
27 (pthread_cond_timedwait_relative): Likewise.
28 * manager.c (pthread_start_thread): Likewise.
29 * oldsemaphore.c (__old_sem_wait): Likewise.
30 * pthread.c (pthread_handle_sigcancel): Likewise.
31 * semaphore.c (__new_sem_wait): Likewise.
32 (sem_timedwait): Likewise.
33 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
34 to limit the cleanup handlers which get run.
35 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
36 for __pthread_perform_cleanup.
38 * Makefile (tests): Add tst-cancel.
39 * tst-cancel.c: New file.
41 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
43 * sysdeps/cris/pt-machine.h: New file.
44 * sysdeps/cris/pspinlock.c: New file.
46 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
48 * shlib-versions: Add case for Linux on CRIS.
50 2001-03-26 Ulrich Drepper <drepper@redhat.com>
52 * attr.c (pthread_getattr_np): Correct computation of stack size
53 for machiens with register stack.
55 * Examples/ex17.c (main): Correct detection of failed mmap call.
57 2001-03-21 Jakub Jelinek <jakub@redhat.com>
59 * pthread.c (__pthread_initialize_manager): Fix a typo.
61 2001-03-21 Jakub Jelinek <jakub@redhat.com>
63 * attr.c (__pthread_attr_setstack): Fix alignment check.
64 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
65 * Makefile (tests): Add ex17 test.
66 * Examples/ex17.c: New test.
68 2001-03-20 Ulrich Drepper <drepper@redhat.com>
70 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
71 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
72 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
74 2001-03-18 Ulrich Drepper <drepper@redhat.com>
76 * Makefile: When generating DSO link with libc_nonshared.a.
78 2001-02-26 Jakub Jelinek <jakub@redhat.com>
80 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
82 2001-02-23 Jakub Jelinek <jakub@redhat.com>
84 * internals.h (__pthread_init_max_stacksize): New prototype.
85 * attr.c (__pthread_attr_setstacksize): Call
86 __pthread_init_max_stacksize if not yet initialized.
87 * pthread.c (__pthread_init_max_stacksize): New function.
88 (__pthread_initialize_manager): Call it.
89 Patch by <dtc@cmucl.cons.org>.
91 2001-03-16 Ulrich Drepper <drepper@redhat.com>
93 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
95 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
97 * shlib-versions: Add rule for Linux on 64 bit S/390.
98 * sysdeps/s390/s390-64/pt-machine.h: New file.
99 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
101 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
103 * sysdeps/s390/pt-machine.h: Move to...
104 * sysdeps/s390/s390-32/pt-machine.h: ...here.
105 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
107 2001-03-15 Ulrich Drepper <drepper@redhat.com>
109 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
110 * attr.c: Implement pthread_getattr_np.
111 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
112 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
113 * manager.c (pthread_handle_create): Initialize p_inheritsched.
115 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
117 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
120 2001-02-20 Hans Boehm <hans_boehm@hp.com>
122 * manager.c (manager_mask): Removed static vesion. Now always local
123 to __pthread_manager().
124 (manager_mask_all): Removed completely.
125 (__pthread_manager): Remove manager_mask_all initialization.
126 (pthread_handle_create): Remove code to set and reset signal mask
127 around __clone2() calls.
129 2001-02-17 Jakub Jelinek <jakub@redhat.com>
131 * spinlock.c (__pthread_lock): Force lock->__status to be read from
132 memory on every spin.
134 2001-02-10 Andreas Jaeger <aj@suse.de>
136 * Makefile (extra-objs): New.
138 2001-02-09 Jakub Jelinek <jakub@redhat.com>
140 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
141 __pthread_initialize_minimal prototype.
143 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
145 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
147 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
149 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
151 2001-02-06 Ulrich Drepper <drepper@redhat.com>
153 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
154 broken code. Patch by Jes Sorensen.
156 2001-02-06 Andreas Jaeger <aj@suse.de>
158 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
160 * internals.h: ...here.
162 2001-02-05 Jes Sorensen <jes@linuxcare.com>
164 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
166 2001-02-02 Ulrich Drepper <drepper@redhat.com>
168 * Versions: Remove __pthread_initialize_minimal.
170 2001-02-01 Ulrich Drepper <drepper@redhat.com>
172 * Makefile: Add rules to build crti.o and make it being used in
173 building libpthread.so.
174 * sysdeps/i386/Makefile: New file.
175 * sysdeps/pthread/pt-initfini.c: New file.
177 * pthread.c: Cleanups.
179 2001-01-28 Andreas Jaeger <aj@suse.de>
181 * oldsemaphore.c (__old_sem_init): Adjust for last change.
182 * sysdeps/pthread/bits/libc-lock.h: Likewise.
183 * spinlock.c: Likewise.
185 2001-01-28 Ulrich Drepper <drepper@redhat.com>
187 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
188 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
189 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
190 * pthread.c: Likewise.
191 * spinlock.h: Likewise.
192 * sysdeps/pthread/pthread.h: Likewise.
194 2001-01-26 Ulrich Drepper <drepper@redhat.com>
196 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
197 as struct __pthread_attr_s.
199 * semaphore.h (sem_t): Cleanup namespace, rename status and
202 2001-01-13 Jakub Jelinek <jakub@redhat.com>
204 * pthread.c (pthread_onexit_process): Clear
205 __pthread_manager_thread_bos after freeing it.
206 * Makefile (tests): Add ex16.
207 * Examples/ex16.c: New file.
209 2001-01-11 Jakub Jelinek <jakub@redhat.com>
211 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
213 * pthread.c (pthread_exit_process): Rename to...
214 (pthread_onexit_process): ...this.
215 (pthread_atexit_process, pthread_atexit_retcode): New.
216 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
217 and only if HAVE_Z_NODELETE is not defined.
218 (__pthread_initialize_manager): Register pthread_atexit_retcode
221 2001-01-11 Ulrich Drepper <drepper@redhat.com>
223 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
225 2001-01-11 Jakub Jelinek <jakub@redhat.com>
227 * Makefile (tests): Add ex15.
228 * Examples/ex15.c: New test.
230 2001-01-08 Ulrich Drepper <drepper@redhat.com>
232 * pthread.c (pthread_exit_process): Free memory allocated for
235 2000-12-31 Ulrich Drepper <drepper@redhat.com>
237 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
238 (pthread_free): Always unmap the stack. It's safe now that we don't
239 use MAP_FIXED to allocate stacks.
241 2000-12-31 Ulrich Drepper <drepper@redhat.com>
243 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
245 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
247 2000-11-15 Wolfram Gloger <wg@malloc.de>
249 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
250 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
252 2000-12-27 Andreas Jaeger <aj@suse.de>
254 * Examples/ex13.c: Make local functions static.
255 * ecmutex.c: Likewise.
256 * joinrace.c: Likewise.
257 * Examples/ex14.c: Likewise.
259 * Examples/ex2.c: Make local functions static; reformat.
260 * Examples/ex1.c: Likewise.
261 * Examples/ex4.c: Likewise.
262 * Examples/ex5.c: Likewise.
263 * Examples/ex7.c: Likewise.
265 * oldsemaphore.c: Add prototypes to shut up GCC.
266 * pt-machine.c: Likewise.
268 * weaks.c: Add prototype for pthread_exit.
270 * internals.h: Add some prototypes, format prototypes and add
272 Move __libc_waitpid prototype to include/sys/wait.h.
274 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
276 * specific.c: Likewise.
277 * ptfork.c: Likewise.
279 * lockfile.c: Include internals.h to get prototypes.
280 * events.c: Likewise.
281 * sysdeps/alpha/pspinlock.c: Likewise.
282 * sysdeps/arm/pspinlock.c: Likewise.
283 * sysdeps/hppa/pspinlock.c: Likewise.
284 * sysdeps/i386/pspinlock.c: Likewise.
285 * sysdeps/ia64/pspinlock.c: Likewise.
286 * sysdeps/m68k/pspinlock.c: Likewise.
287 * sysdeps/mips/pspinlock.c: Likewise.
288 * sysdeps/powerpc/pspinlock.c: Likewise.
289 * sysdeps/s390/pspinlock.c: Likewise.
290 * sysdeps/sh/pspinlock.c: Likewise.
291 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
292 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
293 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
295 2000-12-27 Ulrich Drepper <drepper@redhat.com>
297 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
298 (__pthread_attr_getstack): Return correct address.
299 Add warnings for using pthread_attr_getstackaddr and
300 pthread_attr_setstackaddr.
302 2000-12-26 Ulrich Drepper <drepper@redhat.com>
304 * Examples/ex6.c (test_thread): Make static.
305 * Examples/ex12.c (test_thread): Make static and add noreturn
308 2000-12-18 Jes Sorensen <jes@linuxcare.com>
310 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
311 and compare_and_swap_with_release_semantics returns int not long.
313 2000-12-17 Andreas Jaeger <aj@suse.de>
315 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
317 * sysdeps/arm/pt-machine.h (testandset): Likewise.
318 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
319 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
320 * sysdeps/sh/pt-machine.h (testandset): Likewise.
321 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
322 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
324 2000-12-17 Ulrich Drepper <drepper@redhat.com>
326 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
327 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
329 2000-12-17 Andreas Jaeger <aj@suse.de>
331 * internals.h: Add prototypes for testandset and
332 __compare_and_swap to shut up gcc warnings.
334 2000-12-06 Wolfram Gloger <wg@malloc.de>
336 * join.c (pthread_detach): Allow case where the thread has already
339 2000-12-05 Andreas Jaeger <aj@suse.de>
341 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
342 * sysdeps/mips/pt-machine.h (testandset): Likewise.
343 (__compare_and_swap): Likewise.
344 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
346 2000-11-20 Jakub Jelinek <jakub@redhat.com>
348 * Examples/ex3.c (main): Cast int to long before casting to void *.
349 (search): Cast void * to long, not int.
350 * Examples/ex8.c (main, thread): Similarly.
351 * Examples/ex11.c (main): Similarly.
352 * Examples/ex14.c (worker, do_test): Similarly.
353 * ecmutex.c (worker, do_test): Similarly.
354 (nlocks): Cast to int.
356 2000-11-08 Bruce Mitchener <bruce@cubik.org>
358 * linuxthreads.texi: Add documentation for pthreads attributes
359 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
360 patch. Document pthread_[sg]etconcurrency(). Mark
361 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
363 2000-11-07 Ulrich Drepper <drepper@redhat.com>
365 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
367 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
368 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
370 2000-11-06 Ulrich Drepper <drepper@redhat.com>
372 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
373 not doing it right now.
374 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
376 2000-10-30 Ulrich Drepper <drepper@redhat.com>
378 * Examples/ex4.c (main): Don't use exit() to avoid warning with
381 2000-10-29 Ulrich Drepper <drepper@redhat.com>
383 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
384 here. Reported by Bruce Mitchener <bruce@cubik.org>.
386 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
387 discussing mutexes. (As per the Unix98 name for the API.)
388 Changes documentation for pthread_mutexattr_setkind_np() and
389 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
390 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
391 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
392 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
393 Begins to introduce discussion of the ``timed'' mutex type. This
394 discussion is currently incomplete.
395 Patch by Bruce Mitchener <bruce@cubik.org>.
397 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
398 Yutaka Niibe <gniibe@chroot.org>
400 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
401 has restrictions, use register.
403 2000-10-23 Andreas Schwab <schwab@suse.de>
405 * Examples/ex14.c (TIMEOUT): Override default timeout.
407 2000-10-16 Ulrich Drepper <drepper@redhat.com>
409 * specific.c: Protect tsd array modification in thread data
410 structures by getting the thread lock in pthread_key_delete and
411 __pthread_destroy_specifics.
412 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
414 2000-10-12 Alan Modra <alan@linuxcare.com.au>
416 * sysdeps/pthread/bits/initspin.h: New file.
417 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
418 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
419 (__pthread_alt_init_lock): Likewise.
420 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
422 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
424 * oldsemaphore.c (__old_sem_init): Release lock with
425 LT_SPINLOCK_INIT, not zero.
426 * spinlock.c (__pthread_unlock): Likewise.
427 (__pthread_alt_lock): Likewise.
428 (__pthread_alt_timedlock): Likewise.
429 (__pthread_alt_unlock): Likewise.
430 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
431 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
432 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
433 LT_SPINLOCK_INIT do initialize spinlocks not 0.
435 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
437 * shlib-versions: Add version definitions for hppa-linux.
439 2000-10-12 Alan Modra <alan@linuxcare.com.au>
441 * sysdeps/hppa/pspinlock.c: New file.
442 * sysdeps/hppa/pt-machine.h: New file.
443 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
445 2000-10-05 Jakub Jelinek <jakub@redhat.com>
447 * mutex.c (__pthread_mutex_destroy): Correct test of
448 busy mutex for mutexes using alternate fastlocks.
449 Patch by dtc@cmucl.cons.org.
451 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
453 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
455 2000-09-28 Ulrich Drepper <drepper@redhat.com>
457 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
458 test for owner first.
459 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
461 * cancel.c (pthread_cancel): Don't do anything if cancelation is
464 2000-09-26 Ulrich Drepper <drepper@redhat.com>
466 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
467 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
469 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
470 _POSIX_MONOTONIC_CLOCK.
472 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
475 2000-09-20 Andreas Jaeger <aj@suse.de>
477 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
478 "testrtsig.h" conditional.
480 2000-09-11 Ulrich Drepper <drepper@redhat.com>
482 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
483 pthread_attr_setstack.
484 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
485 pthread_attr_setstack.
486 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
488 2000-09-05 Ulrich Drepper <drepper@redhat.com>
490 * Examples/ex14.c: New file.
491 * Makefile (tests): Add ex14.
493 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
494 mutex. Patch by dtc@cmucl.cons.org.
496 * ecmutex.c: New file.
497 * Makefile (tests): Add ecmutex.
499 2000-09-04 H.J. Lu <hjl@gnu.org>
501 * attr.c (__pthread_attr_setguardsize): Use page_roundup
502 instead of roundup to round up to the page size.
504 2000-09-03 Mark Kettenis <kettenis@gnu.org>
506 * manager.c (pthread_exited): Correctly report event as TD_REAP
507 instead of TD_DEATH. Fix comments.
509 2000-09-03 Ulrich Drepper <drepper@redhat.com>
511 * spinlock.h (testandset): Add cast to avoid warning.
512 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
514 2000-09-02 Andreas Jaeger <aj@suse.de>
516 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
519 2000-09-01 Ulrich Drepper <drepper@redhat.com>
521 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
522 Fix typo in last patch (_mode -> _flags).
524 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
525 Provide definition which respects _IO_USER_LOCK flag.
527 2000-08-30 Ulrich Drepper <drepper@redhat.com>
529 * manager.c (pthread_allocate_stack): Clear descriptor only if not
532 2000-08-25 Ulrich Drepper <drepper@redhat.com>
534 * Makefile: Add rules to build and run unload.
535 * unload.c: New file.
537 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
539 * sysdeps/pthread/pthread.h
540 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
541 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
543 2000-08-24 Andreas Jaeger <aj@suse.de>
545 * Examples/ex13.c: Include <string.h> for strerror prototype and
546 <stdlib.h> for abort prototype.
547 (pthr_cond_signal_mutex): Rewrite to silence GCC.
548 (thread_start): Remove unused variable err.
549 (main): Silence GCC warnings.
551 2000-08-22 Andreas Jaeger <aj@suse.de>
553 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
555 * Makefile (tests): Add ex13.
557 2000-08-20 Ulrich Drepper <drepper@redhat.com>
559 * semaphore.h: Add restrict where required by AGd4.
560 * sysdeps/pthread/pthread.h: Likewise.
561 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
563 2000-08-15 Ulrich Drepper <drepper@redhat.com>
565 * Makefile (tests): Add ex12. Add rule to build it.
566 * Examples/ex12.c: New file.
568 2000-08-13 Ulrich Drepper <drepper@redhat.com>
570 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
571 even though the implementation is not quite complete (but it reports
572 it). Define _POSIX_MESSAGE_PASSING to -1.
573 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
575 2000-08-12 Andreas Jaeger <aj@suse.de>
577 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
579 (__compare_and_swap): Likewise.
580 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
582 2000-08-10 Ulrich Drepper <drepper@redhat.com>
584 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
585 p_h_errnop correctly and not to NULL.
587 2000-08-05 Ulrich Drepper <drepper@redhat.com>
589 * Banner: Bump version number to 0.9.
591 2000-08-04 Ulrich Drepper <drepper@redhat.com>
593 * Makefile (tests): Add tststack. Add rule to build the program.
594 * tststack.c: New file.
596 * internals.h: Declare __pthread_max_stacksize.
597 * pthread.c (__pthread_max_stacksize): New variable.
598 (__pthread_initialize_manager): Determine __pthread_initialize_manager
600 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
601 (pthread_allocate_stack): Allow kernel to choose stack address if
602 FLOATING_STACKS. This also handles variable-sized stacks.
603 Always allocate stack and guardpage together. Use mprotect to
604 change guardpage access.
605 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
608 * attr.c (__pthread_attr_setstacksize): Also test value against
611 * manager.c (__pthread_nonstandard_stacks): Define only if
612 THREAD_SELF is not defined.
613 (pthread_allocate_stack): Always initialize gardaddr to a correct
615 (pthread_handle_create): Unmap thread with one call.
616 (pthread_free): Remove test for initial thread before removing stack.
617 Unmap stack with one call.
619 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
620 1 to avoid removing the stack.
622 2000-07-27 Jes Sorensen <jes@linuxcare.com>
624 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
625 load of spin lock to prime the cache before the atomic compare and
626 exchange operation (cmpxchg4). This avoids the spinning on the
627 cmpxchg4 instruction and reduces movement of the cache line back
628 and forth between the processors (explanation by Asis K. Mallick
629 from Intel). This basically makes the implementation operate the
630 same as the Linux kernel implementation.
632 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
633 * sysdeps/ia64/pspinlock.c: New file.
635 2000-08-03 Ulrich Drepper <drepper@redhat.com>
637 * pthread.c: Move definition of __pthread_set_own_extricate_if...
638 * spinlock.h: ...here. Remove locking.
639 * internals.h: Remove __pthread_set_own_extricate_if prototype.
641 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
642 (rwlock_rd_extricate_func): Don't determine self, let
643 __pthread_lock do it.
644 (rwlock_wr_extricate_func): Likewise.
645 (rwlock_have_already): Optimize *pself handling a bit.
647 * mutex.c: Use __builtin_expect.
648 * pthread.c: Likewise.
650 2000-08-02 Andreas Jaeger <aj@suse.de>
652 * sysdeps/s390/pspinlock.c: New file.
653 * sysdeps/s390/pt-machine.h: New file.
654 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
656 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
658 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
660 * sysdeps/mips/pt-machine.h (testandset): Likewise.
662 2000-07-26 Andreas Jaeger <aj@suse.de>
664 * pthread.c: Initialize p_sem_avail.
666 2000-07-25 Ulrich Drepper <drepper@redhat.com>
668 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
669 * semaphore.c: Handle spurious wakeups.
671 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
672 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
674 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
675 (__pthread_wait_for_restart): Likewise.
677 * condvar.c (pthread_cond_wait): Also check whether thread is
678 cancelable before aborting loop.
679 (pthread_cond_timedwait): Likewise.
681 * signals.c (pthread_sighandler): Remove special code to restrore
683 (pthread_sighandler_t): Likewise.
685 2000-07-25 Mark Kettenis <kettenis@gnu.org>
687 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
688 * pthread.c: Include <resolv.h>.
689 (_res): Undefine. Add extern declaration.
691 2000-07-24 Ulrich Drepper <drepper@redhat.com>
693 * pthread.c (__pthread_initial_thread): Update initializer.
694 (__pthread_manager_thread): Likewise.
695 (pthread_initialize): Move setrlimit call to...
696 (__pthread_initialize_manager): ...here.
697 (__pthread_reset_main_thread): Reset also soft limit on stack size.
699 * condvar.c: Handle spurious wakeups. [PR libc/1749].
700 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
702 2000-07-21 Ulrich Drepper <drepper@redhat.com>
704 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
705 __compare_and_swap to define testandset.
706 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
707 Define IMPLEMENT_TAS_WITH_CAS.
709 2000-07-20 Ulrich Drepper <drepper@redhat.com>
711 * Makefile: Pass -z nodelete to linker for libpthread.so
712 generation if it understand this option.
714 2000-07-18 Mark Kettenis <kettenis@gnu.org>
716 * manager.c (pthread_handle_create): Remove initialization of
717 new_thread->p_res._sock.
719 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
721 Bugfixes to the variant of the code for machines with no compare
724 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
725 node was not being properly enqueued, due to failing to update
726 the lock->__status field.
728 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
729 being set inappropriately, causing the suspend function to be called
730 with a null self pointer and crash.
732 2000-07-18 Ulrich Drepper <drepper@redhat.com>
734 * spinlock.h (__pthread_alt_trylock): Fix code used if no
735 compare&swap is available.
737 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
740 * pthread.c (pthread_initialize): Don't use sysconf to determine
741 whether the machine has more than one processor.
743 * spinlock.c (__pthread_alt_timedlock): Add back one of the
744 removed thread_self calls.
746 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
748 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
749 __compare_and_swap to compare_and_swap in code which assumes
750 compare swap is available.
752 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
754 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
755 bug whereby thr field of waitnode structure would not be correctly
756 set unless a null self pointer is passed to the functions.
757 Eliminated redundant calls to thread_self().
759 2000-07-18 Jakub Jelinek <jakub@redhat.com>
761 * pthread.c (__pthread_initialize_manager): Lock
762 __pthread_manager_thread.p_lock before calling clone.
764 2000-05-05 H.J. Lu <hjl@gnu.org>
766 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
767 have acquire semantics.
768 (__compare_and_swap_with_release_semantics): New inline
770 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
772 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
774 * manager.c: Fix the problem with signals at startup.
775 Change the way that thread stacks are allocated on IA64.
776 Clean up some of the guard page allocation stuff.
778 1999-12-19 H.J. Lu <hjl@gnu.org>
780 * internals.h (page_roundup): New.
781 * attr.c (__pthread_attr_setguardsize); Use page_roundup
783 * manager.c (pthread_allocate_stack): Make sure guardaddr is
784 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
787 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
789 * manager.c (pthread_allocate_stack): Unmap the stack top
790 if failed to map the stack bottom.
792 (pthread_free): Fix the guard page.
794 * pthread.c (pthread_initialize): Set rlimit correctly for
795 NEED_SEPARATE_REGISTER_STACK.
797 1999-12-16 H.J. Lu <hjl@gnu.org>
799 * pthread.c (__pthread_initialize_manager): Pass
800 __pthread_manager_thread_bos instead of
801 __pthread_manager_thread_tos to __clone2.
803 1999-12-16 H.J. Lu <hjl@gnu.org>
805 * manager.c (pthread_allocate_stack): Correct the calculation
806 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
809 1999-12-13 H.J. Lu <hjl@gnu.org>
811 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
812 bit after setting ar.ccv.
814 1999-12-12 H.J. Lu <hjl@gnu.org>
816 * manager.c (pthread_allocate_stack): Make the starting
817 address of the stack bottom page aligned. FIXME: it may
818 need changes in other places.
819 (pthread_handle_create): Likewise.
821 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
823 * manager.c (pthread_allocate_stack): Handle
824 NEED_SEPARATE_REGISTER_STACK.
825 (pthread_handle_create): Likewise.
826 * pthread.c (__pthread_initialize_manager): Likewise.
828 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
830 1999-12-02 H.J. Lu <hjl@gnu.org>
832 * sysdeps/ia64/pt-machine.h: New.
834 2000-07-13 Ulrich Drepper <drepper@redhat.com>
836 * wrapsyscall.c: Mark non-__ protected names as weak.
839 2000-07-12 Bruno Haible <haible@clisp.cons.org>
841 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
843 2000-07-12 Ulrich Drepper <drepper@redhat.com>
845 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
846 Add tests also to new alternative spinlock implementation.
847 * spinlock.h: Likewise.
848 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
850 2000-07-06 Ulrich Drepper <drepper@redhat.com>
852 * Version: Export __sigaction.
853 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
855 * pthread.c: Use __libc_sigaction instead of __sigaction.
857 * condvar.c: Implement pthread_condattr_getpshared and
858 pthread_condattr_setpshared.
859 * mutex.c: Implement pthread_mutexattr_getpshared and
860 pthread_mutexattr_setpshared.
861 * Versions: Export new functions.
862 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
864 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
865 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
868 2000-07-04 Greg McGary <greg@mcgary.org>
870 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
871 pragmas. Include bp-sym.h only if _LIBC.
873 2000-07-04 Ulrich Drepper <drepper@redhat.com>
875 * spinlock.c (__pthread_unlock): Properly place write barrier.
876 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
878 2000-07-03 Ulrich Drepper <drepper@redhat.com>
880 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
881 faster on SMP systems. No more emulation of compare&swap for adaptive
883 * spinlock.h: Likewise.
884 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
885 Replace fast with adaptive mutex.
886 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
887 * condvar.c: Likewise.
888 * pthread.c: Define and initialize __pthread_smp_kernel variable.
889 * internals.h: Declare __pthread_smp_kernel.
890 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
891 _pthread_fastlock structure.
892 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
894 * pthread.c: Remove initialization to zero from global variables.
896 2000-06-29 Jakub Jelinek <jakub@redhat.com>
898 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
900 2000-06-28 Greg McGary <greg@mcgary.org>
902 * weaks.c: Wrap BP_SYM () around weak extern declarations of
903 pthread functions that have pointers in their return+arg signatures.
905 2000-06-27 Greg McGary <greg@mcgary.org>
907 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
908 extern declarations of pthread functions that have pointers in
909 their return+arg signatures.
911 2000-06-26 Ulrich Drepper <drepper@redhat.com>
913 * Makefile (tests): Add ex11. Add rules to build it.
914 * Examples/ex11.c: New file.
915 * rwlock.c: Fix complete braindamaged previous try to implement
918 * spinlock.c: Pretty print.
920 2000-06-25 Ulrich Drepper <drepper@redhat.com>
922 * Makefile (tests): Add ex10. Add rules to build it.
923 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
924 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
925 * condvar.c (pthread_cond_wait): Allow mutex of kind
926 PTHREAD_MUTEX_TIMED_NP.
927 (pthread_cond_timedwait_relative): Likewise.
928 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
929 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
930 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
931 (__pthread_mutex_lock): Use __pthread_alt_lock for
932 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
933 (__pthread_mutex_timedlock): New function.
934 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
935 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
936 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
937 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
938 * spinlock.c: Implement alternate fastlocks.
939 * spinlock.h: Add prototypes.
940 * Examples/ex10.c: New file.
941 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
942 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
944 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
945 (__pthread_rwlock_timedrdlock): New function.
946 (__pthread_rwlock_timedwrlock): New function.
947 Use laternate fastlock function everywhere.
949 2000-06-21 Andreas Jaeger <aj@suse.de>
951 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
954 * join.c: Include <stdlib.h> for exit prototype.
956 2000-06-20 Ulrich Drepper <drepper@redhat.com>
958 * sysdeps/i386/useldt.h: Include <stdlib.h>.
960 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
961 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
963 * Makefile (libpthread-routines): Add barrier.
964 (tests): Add ex9. Add rule to build ex9.
965 * Versions: Export barrier functions.
966 * barrier.c: New file.
967 * Examples/ex9.c: New file.
968 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
969 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
970 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
972 2000-06-19 H.J. Lu <hjl@gnu.org>
974 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
975 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
976 (compare_and_swap_with_release_semantics): New. Default to
977 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
980 * spinlock.c (__pthread_unlock): Call
981 compare_and_swap_with_release_semantics () instead of
984 2000-06-19 Ulrich Drepper <drepper@redhat.com>
986 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
988 * sysdeps/pthread/timer_delete.c: Likewise.
989 * sysdeps/pthread/timer_getoverr.c: Likewise.
990 * sysdeps/pthread/timer_gettime.c: Likewise.
991 * sysdeps/pthread/timer_settime.c: Likewise.
993 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
995 Timer nodes are now reference counted, and can be marked
996 as deleted. This allows for the safe release of the global mutex
997 in the middle without losing the timer being operated on.
999 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1000 member is now an enum with three values, so that an intermediate
1001 state can be represented (deleted but not free for reuse yet).
1002 New refcount member added.
1003 * sysdeps/pthread/timer_routines.c: Likewise.
1005 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1006 timer_valid): New inline functions added.
1008 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1009 restructured, recursive deadlock bug fixed.
1011 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1012 timer_addref to ensure that timer won't be deleted while mutex is not
1013 held. Also uses timer_invalid to perform validation of timer handle.
1014 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1015 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1017 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1019 * shlib-versions: Add entry for SH.
1020 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1022 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1024 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1025 tightened up some critical regions and micro-optimized some list
1028 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1029 Returns int value now to indicate whether timer was queued at head.
1030 * sysdeps/pthread/posix-timer.h: Likewise.
1031 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1032 new return value from __timer_thread_queue_timer to avoid waking
1033 up timer thread unnecessarily.
1035 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1036 inuse flag, because this requires mutex to be held. Callers updated
1037 to do the check when they have the mutex.
1038 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1040 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1041 regions: avoids making system calls while holding timer mutex, and
1042 a few computations were moved outside of the mutex as well.
1043 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1045 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1046 to list_unlink_ip, meaning idempotent. Pointer manipulation
1047 changed to get better better code out of gcc.
1048 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1049 version of list_unlink added here.
1050 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1051 function in all places: idempotent one for timers, non-idempotent
1052 one for thread nodes.
1053 * sysdeps/pthread/timer_settime: Likewise.
1054 * sysdeps/pthread/timer_routines.c: Likewise.
1056 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1058 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1059 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1061 * sysdeps/pthread/Makefile: Remove tests definition.
1063 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1064 Yutaka Niibe <gniibe@chroot.org>
1066 * sysdeps/sh/pspinlock.c: New file.
1067 * sysdeps/sh/pt-machine.h: New file.
1069 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1071 * Makefile (tests): Add joinrace.
1073 * Examples/ex6.c: Test return value of pthread_join.
1075 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1077 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1078 (__pthread_spin_trylock): Implement.
1079 (__pthread_spin_unlock): Implement.
1080 (__pthread_spin_init): Implement.
1081 (__pthread_spin_destroy): Implement.
1083 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1085 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1086 really append the entry.
1088 2000-06-10 Andreas Jaeger <aj@suse.de>
1090 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1092 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1094 * sysdeps/pthread/timer_create.c: Thread matching now done on
1095 clock type as well as thread attributes.
1096 There are individual global signal-delivering threads for
1097 different clock types.
1098 * sysdeps/pthread/posix-timer.h: Likewise.
1099 * sysdeps/pthread/timer_routines.c: Likewise.
1101 * sysdeps/pthread/timer_routines.c: Thread allocation and
1102 deallocation function now remembers to put thread on active
1103 list and remove from active list.
1104 Thus now the feature of binding multiple timers
1105 to a single thread actually works.
1107 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1109 * pthread.c (__pthread_create_2_1): Optimize a bit.
1111 * internals.h (invalid_handle): Also test for p_terminated != 0.
1112 (nonexisting_handle): New function. Same as old invalid_handle.
1113 * join.c (pthread_join): Use nonexisting_handle instead of
1114 invalid_handle to test for acceptable thread handle.
1115 * manager.c (pthread_handle_free): Likewise.
1116 * joinrace.c: New file.
1117 Reported by Permaine Cheung <pcheung@cygnus.com>.
1119 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1121 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1122 Correct handling of matching variable.
1124 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1127 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1128 Be prepared for empty timer list.
1130 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1131 CPUTIME clock ID. Add support for thread clocks.
1133 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1134 subtraction were switched.
1136 * sysdeps/pthread/timer_routines.c (init_module): Use
1137 THREAD_MAXNODES threads.
1139 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1140 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1141 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1142 with sigqueueinfo is this system call is available.
1144 * sysdeps/pthread/timer_create.c (timer_create): Allow
1145 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1147 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1149 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1151 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1153 * sysdeps/pthread/posix-timer.h: New file.
1154 * sysdeps/pthread/timer_create.c: New file.
1155 * sysdeps/pthread/timer_delete.c: New file.
1156 * sysdeps/pthread/timer_getoverr.c: New file.
1157 * sysdeps/pthread/timer_gettime.c: New file.
1158 * sysdeps/pthread/timer_routines.c: New file.
1159 * sysdeps/pthread/timer_settime.c: New file.
1160 * sysdeps/pthread/tst-timer.c: New file.
1162 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1164 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1165 LINK_MAX definitions if necessary.
1167 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1169 Added missing fork time handling of global libio lock.
1171 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1172 not just the individual stream locks. Rewritten to use new
1173 iterator interface provided by libio rather than accessing
1176 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1177 which lock and unlock the stream list using the new interface
1179 * internals.h: Likewise.
1181 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1182 and __funlockfilelist in the parent after the fork.
1183 Child still calls __fresetlockfiles as before.
1185 * linuxthreads.texi: Now explains what happens to streams at
1186 fork time. Also whole new section on forking and thread added.
1187 Definition of pthread_atfork moved out of Miscellaneous Functions
1188 to this new section.
1190 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1192 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1193 Add missing register.
1194 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1196 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1198 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1199 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1200 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1202 2000-05-31 Andreas Jaeger <aj@suse.de>
1204 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1206 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1208 * spinlock.c (__pthread_lock): Remove ASSERT.
1210 * Makefile (tests): Add ex8.
1211 * Examples/ex8.c: New file.
1213 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1215 Bugfix: The pthread_atfork mechanism now takes care of its
1216 own internal mutex at fork time.
1218 * ptfork.c (__fork): Revised so that the mutex is held across
1219 the fork operation and while the handlers are called, and so that
1220 the child resets the mutex.
1222 * linuxthreads.texi: Updated pthread_atfork documentation to make
1223 it clear that fork and pthread_atfork can't be reentered from
1224 atfork handlers, that pthread_atfork and fork are mutually atomic,
1225 and that the handlers are inherited by the child process.
1227 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1229 * Makefile (libpthread-routines): Add pspinlock.
1230 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1231 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1232 * condvar.c: Likewise.
1233 * internals.h: Likewise.
1235 * manager.c: Likewise.
1236 * mutex.c: Likewise.
1237 * pthread.c: Likewise.
1238 * rwlock.c: Likewise.
1239 * semaphore.c: Likewise.
1240 * signals.c: Likewise.
1241 * spinlock.h: Likewise.
1242 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1243 * sysdeps/alpha/pspinlock.c: New file.
1244 * sysdeps/arm/pspinlock.c: New file.
1245 * sysdeps/i386/pspinlock.c: New file.
1246 * sysdeps/m68k/pspinlock.c: New file.
1247 * sysdeps/mips/pspinlock.c: New file.
1248 * sysdeps/powerpc/pspinlock.c: New file.
1249 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1250 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1251 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1252 back to _pthread_fastlock. Define new pthread_spinlock_t.
1254 2000-05-24 Andreas Jaeger <aj@suse.de>
1256 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1258 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1260 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1262 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1264 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1266 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1268 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1269 object state is represented with additional bits which distinguish
1270 whether that state was set up in the current process, or
1271 in an ancestor process. If that state was set in an ancestor,
1272 it means that a fork happened while thread was executing the init
1273 function. In that case, the state is reset to NEVER.
1274 * mutex.c (__pthread_once_fork_prepare): New function.
1275 (__pthread_once_fork_child): Likewise
1276 (__pthread_once_fork_parent): Likewise
1277 (__pthread_reset_pthread_once): Removed.
1278 * ptfork.c (__fork): Call new handlers in mutex.c.
1279 * internals.h: Declarations of new mutex.c functions added.
1280 Declaration of removed function deleted.
1281 * linuxthreads.texi: Updated documentation about pthread_once
1282 to clarify what happens under cancellation and forking.
1284 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1286 * internals.h: New thread manager request type, REQ_KICK.
1287 * join.c (pthread_exit): main thread now calls exit() instead
1288 of _exit() in order to proper process cleanup.
1289 * manager.c (__pthread_manager): Do not terminate manager
1290 after unblocking main thread; wait for main thread's
1291 REQ_PROCESS_EXIT request instead.
1292 Also, added REQ_KICK case to handle new request; this just does
1294 * manager.c (pthread_exited): Do not terminate manager after
1295 unblocking main thread.
1296 * manager.c (__pthread_manager_sighandler): If the main thread
1297 is waiting for all other threads to die, send a REQ_KICK into
1298 the thread manager request pipe to get it to clean out the threads
1299 and unblock the main thread as soon as possible. This fixes
1300 the 2000 millisecond hang on shutdown bug.
1301 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1302 including the main one call pthread_exit(), or implicitly do so.
1303 * Makefile (tests): Add ex7.
1305 2000-05-05 Andreas Jaeger <aj@suse.de>
1307 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1308 (pthread_getcpuclockid): Correct test for ourselves.
1310 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1312 * internals.h (struct _pthread_descr_struct): Reorganization.
1313 Allocate room for 16 pointers at head of the structure for future
1314 thread-local data handling. Move p_self member in this area.
1315 * manager.c (pthread_handle_create): Adjust use of p_self.
1316 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1317 * pthread.c (__pthread_initial_thread): Adjust initialization.
1318 (__pthread_manager_thread): Likewise.
1320 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1322 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1323 for eventmask larger than 1 word.
1325 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1327 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1328 * pthread.c (__pthread_initialize_minimal): New function. Perform
1329 minimal initialization.
1330 (pthread_initialize): Remove this code here.
1331 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1332 are working around the problem in glibc.
1334 2000-04-25 Ulrich Drepper <drepper@redhat.com>
1336 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1337 now. First gcc must be fixed (more concrete: libgcc).
1339 2000-04-24 Ulrich Drepper <drepper@redhat.com>
1341 * pthread.c: Remove special treatement for interrupt handlers on x86.
1342 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1343 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1345 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1347 2000-04-24 Mark Kettenis <kettenis@gnu.org>
1349 * join.c (pthread_exit): Set p_terminated after reporting the
1350 termination event instead of before.
1352 2000-04-20 Jakub Jelinek <jakub@redhat.com>
1354 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1357 2000-04-18 Andreas Jaeger <aj@suse.de>
1359 * Versions: Use ld instead of ld.so.
1361 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1363 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1364 Remove the typedef keyword.
1366 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1368 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1370 (READ_MEMORY_BARRIER): Define.
1371 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1373 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1376 2000-04-17 Ulrich Drepper <drepper@redhat.com>
1378 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1379 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1380 use thread_handle().
1382 2000-04-16 Ulrich Drepper <drepper@redhat.com>
1384 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1385 if fast mutex is used. Don't initialize `already_canceled' twice.
1386 Correctly test for return value of timedsuspend.
1388 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
1389 therefore don't need the _rt versions of the signal handlers.
1391 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1393 * pthread.c (pthread_yield): New function.
1394 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1395 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1396 * internals.h: Declare __pthread_yield.
1398 * pthread.c (pthread_initialize): Avoid a bit more code if
1399 realtime signals are known to exist.
1401 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1402 to dynamically detect RT signals and avoid generating compatibility
1403 functions with old kernel.
1404 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1405 __pthread_restart_new directly.
1406 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1407 __pthread_wait_for_restart_signal directly.
1408 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1409 __pthread_timedsuspend_new directly.
1411 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1413 * condvar.c: Remove all the special code to handle cond_timedwait.
1414 Use timedsuspend instead.
1415 * internals.h: Declare __pthread_timedsuspend_old,
1416 __pthread_timedsuspend_new, and __pthread_timedsuspend.
1417 Remove declaration of __pthread_init_condvar.
1418 * pthread.c: Define __pthread_timedsuspend variable.
1419 (__pthread_timedsuspend_old): New function. Timed suspension
1420 implementation for old Linux kernels.
1421 (__pthread_timedsuspend_new): New function. Timed suspension
1422 implementation for new Linux kernels.
1423 * restart.h (timedsuspend): New function. Call appropriate
1424 suspension function through __pthread_timedsuspend.
1425 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1427 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1429 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1431 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1433 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1434 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1436 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1437 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1439 2000-04-14 Andreas Jaeger <aj@suse.de>
1441 * weaks.c: Fix typo.
1443 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1444 2.2 for linuxthreads.
1446 2000-04-13 Ulrich Drepper <drepper@redhat.com>
1448 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1449 (pthread_getcpuclockid): Fix typo.
1451 2000-04-12 Ulrich Drepper <drepper@redhat.com>
1453 * Makefile (libpthread-routines): Add getcpuclockid.
1454 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1455 * sysdeps/pthread/getcpuclockid.c: New file.
1456 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1457 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1459 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1461 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1463 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1464 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1465 and pthread_spin_unlock.
1466 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1467 into pthread_spinlock_t. Change all uses.
1468 * spinlock.c: Implement pthread_spin_lock.
1469 Rename __pthread_unlock to __pthread_spin_unlock and define weak
1470 alias for real name.
1471 Define pthread_spin_trylock, pthread_spin_init, and
1472 pthread_spin_destroy.
1473 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1474 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1475 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1476 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1477 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1478 and pthread_spin_unlock.
1479 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1480 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1481 * condvar.c: Likewise.
1482 * internals.h: Likewise.
1484 * manager.c: Likewise.
1485 * mutex.c: Likewise.
1486 * pthread.c: Likewise.
1487 * rwlock.c: Likewise.
1488 * semaphore.c: Likewise.
1489 * signals.c: Likewise.
1491 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1493 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1495 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1497 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1498 _POSIX_SHARED_MEMORY_OBJECTS.
1500 2000-04-11 Andreas Jaeger <aj@suse.de>
1502 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1503 (__compare_and_swap): Mark as modifying memory.
1505 2000-04-11 Geoff Keating <geoffk@cygnus.com>
1507 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1509 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1510 Don't have the 'asm' __volatile__.
1512 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1514 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1515 * spinlock.c (__pthread_lock): Add memory barriers.
1516 (__pthread_unlock): Likewise.
1517 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1519 (RELEASE): Not needed anymore.
1520 (__compare_and_swap): Mark asm as modifying memory.
1521 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
1523 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1524 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1525 (MEMORY_BARRIER): Define using stbar.
1526 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1528 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1529 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1530 Mike Burrows <m3b@pa.dec.com>.
1532 2000-04-09 Ulrich Drepper <drepper@redhat.com>
1534 * signals.c (sigaction): Fix return value for the case SIG is one
1535 of the signals the implementation uses.
1536 Patch by Xavier.Leroy@inria.fr.
1538 2000-04-01 Andreas Jaeger <aj@suse.de>
1540 * attr.c: Use shlib-compat macros.
1541 * oldsemaphore.c: Likewise.
1542 * pthread.c: Likewise.
1543 * weaks.c: Likewise.
1545 2000-03-26 Ulrich Drepper <drepper@redhat.com>
1547 * semaphore.c (sem_timedwait): New function.
1548 Patch by Carl Mailloux <carlm@oricom.ca>.
1549 * semaphore.h: Declare sem_timedwait.
1550 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1552 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
1554 * sysdeps/pthread/Makefile: File removed.
1556 2000-03-23 Ulrich Drepper <drepper@redhat.com>
1558 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1559 * internals.h (__pthread_reset_pthread_once): Add prototype.
1560 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1562 * manager.c (pthread_handle_create): Store ID of new thread before
1565 2000-03-21 Ulrich Drepper <drepper@redhat.com>
1567 * attr.c: Use new macros from shlib-compat.h to define versions.
1568 * oldsemaphore.c: Likewise.
1569 * semaphore.c: Likewise.
1570 * weaks.c: Likewise.
1572 * pthread.c: Update for new SHLIB_COMPAT definition.
1574 * manager.c (__pthread_manager): Unmask debug signal.
1576 * pthread.c (pthread_initialize): Test for address of __dso_handle
1577 being NULL, not value. Use __on_exit, not on_exit.
1578 Patch by Andreas Jaeger <aj@suse.de>.
1580 * pthread.c: Use new macros from shlib-compat.h to define versions.
1582 2000-03-19 Ulrich Drepper <drepper@redhat.com>
1584 * pthread.c (pthread_initialize): Instead of on_exit use
1585 __cxa_atexit if __dso_label is available to allow unloading the
1586 libpthread shared library.
1588 2000-03-16 Ulrich Drepper <drepper@redhat.com>
1590 * condvar.c: Make tests for ownership of mutex less strict.
1592 2000-03-14 Ulrich Drepper <drepper@redhat.com>
1594 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1595 current thread and return error if not.
1596 (pthread_cond_timedwait_relative_old): Likewise.
1597 (pthread_cond_timedwait_relative_new): Likewise.
1599 * mutex.c (__pthread_once): Handle cancelled init function correctly.
1600 (pthread_once_cancelhandler): New function.
1601 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1603 2000-03-14 Andreas Jaeger <aj@suse.de>
1605 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1607 (pthread_handle_sigrestart_rt): Likewise.
1608 * signals.c (pthread_sighandler_rt): Likewise.
1610 2000-03-02 Andreas Jaeger <aj@suse.de>
1612 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1613 Reported by Sean Chen <sean.chen@turbolinux.com>.
1615 2000-02-28 Andreas Jaeger <aj@suse.de>
1617 * rwlock.c: Fix typo.
1619 2000-02-27 Ulrich Drepper <drepper@redhat.com>
1621 * rwlock.c: Define __* variants of the functions and make old names
1623 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1624 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1626 2000-02-25 Andreas Jaeger <aj@suse.de>
1628 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1629 pwrite64, lseek64, open64, and __open64 with version 2.2.
1631 2000-02-22 Ulrich Drepper <drepper@redhat.com>
1633 * semaphore.h (SEM_FAILED): Use 0 not NULL.
1635 2000-02-14 Ulrich Drepper <drepper@redhat.com>
1637 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1638 nanosleep does not work either. Get absolute time inside the
1640 (pthread_cond_timedwait_relative_new): Likewise.
1641 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1643 2000-02-13 Andreas Jaeger <aj@suse.de>
1645 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1646 (pthread_cond_timedwait_relative_old): Likewise.
1648 2000-02-13 Ulrich Drepper <drepper@redhat.com>
1650 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1651 but keep the code around. A bug in the kernel prevent us from
1653 (pthread_cond_timedwait_relative_new): Likewise.
1654 (PR libc/1597 and libc/1598).
1656 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
1658 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1659 loop around nanosleep calls instead of around most of the function
1660 (pthread_cond_timedwait_relative_new): Likewise.
1661 body. Got rid of backwards goto and one local.
1663 2000-01-31 Ulrich Drepper <drepper@redhat.com>
1665 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1666 before every nanosleep call to account for time spent in the rest
1668 (pthread_cond_timedwait_relative_new): Likewise.
1669 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1671 2000-01-29 Ulrich Drepper <drepper@redhat.com>
1673 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1674 from nanosleep call so that in case we restart we only wait for the
1676 (pthread_cond_timedwait_relative_new): Likewise.
1677 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1679 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
1681 * manager.c (pthread_allocate_stack): Compute guard page address
1682 correctly. Patch by HJ Lu.
1684 * sysdeps/pthread/pthread.h: Define
1685 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1687 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
1689 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1690 preference handling.
1691 (pthread_rwlockattr_setkind_np): Allow
1692 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1693 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1695 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
1697 * internals.h (pthread_readlock_info): New structure.
1698 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1699 p_untracked_readlock_count.
1700 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1701 Add initializers for new fields.
1702 * manager.c (pthread_free): Free read/write lock lists.
1703 * queue.h (queue_is_empty): New function.
1704 * rwlock.c: Implement requirements about when readers should get
1706 * sysdeps/pthread/pthread.h
1707 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1708 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1709 Define this name as well.
1710 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1712 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
1714 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1715 Adjust initializers for struct _pthread_descr_struct change.
1716 * internals.h (struct _pthread_descr_struct): Move new elements to
1719 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
1721 Redesigned how cancellation unblocks a thread from internal
1722 cancellation points (sem_wait, pthread_join,
1723 pthread_cond_{wait,timedwait}).
1724 Cancellation won't eat a signal in any of these functions
1725 (*required* by POSIX and Single Unix Spec!).
1726 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1727 simultaneous condition variable signal (not required by POSIX
1728 or Single Unix Spec, but nice).
1729 * spinlock.c: __pthread_lock queues back any received restarts
1730 that don't belong to it instead of assuming ownership of lock
1731 upon any restart; fastlock can no longer be acquired by two threads
1733 * restart.h: Restarts queue even on kernels that don't have
1734 queued real time signals (2.0, early 2.1), thanks to atomic counter,
1735 avoiding a rare race condition in pthread_cond_timedwait.
1737 1999-12-31 Andreas Jaeger <aj@suse.de>
1739 * internals.h: Remove duplicate prototype declarations.
1741 * weaks.c: Remove __THROW from prototypes since the file is not
1742 compiled by a C++ compiler.
1743 * internals.h: Likewise.
1745 1999-12-30 Andreas Jaeger <aj@suse.de>
1747 * sysdeps/pthread/pthread.h: Move internal functions to...
1748 * sysdeps/pthread/bits/libc-lock.h: ...here.
1750 1999-12-29 Andreas Jaeger <aj@suse.de>
1752 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1754 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
1756 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1759 * manager.c (__pthread_start): Add one more cast to prevent
1760 warning on 64bit machines.
1762 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
1764 * manager.c (pthread_handle_create): Set p_pid of new thread
1765 before calling the callback function to report a new thread.
1767 1999-12-20 Andreas Jaeger <aj@suse.de>
1769 * pthread.c (pthread_initialize): Move getrlimit call after
1772 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
1774 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1775 pwrite64, lseek64, open64, and __open64.
1776 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1777 pwrite64, lseek64, open64, and __open64.
1779 * manager.c (pthread_allocate_stack): Correct computation of
1780 new_thread_bottom. Correct handling of stack size and when the
1781 rlimit method to guard for stack growth is used.
1782 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1783 minus one pagesize (not two).
1785 1999-12-03 Andreas Jaeger <aj@suse.de>
1787 * Versions: Add __res_state with version GLIBC_2.2.
1789 * errno.c (__res_state): New function to return thread specific
1792 * pthread.c (pthread_initialize): Initialize p_resp.
1793 (__pthread_reset_main_thread): Also set p_resp.
1795 * manager.c (pthread_handle_create): Initialize p_resp.
1797 * internals.h: Add thread specific resolver state.
1798 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1800 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
1802 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1804 * sysdeps/i386/i686/pt-machine.h: Likewise.
1805 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1807 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
1809 * manager.c (pthread_start_thread_event): Initialize p_pid already
1812 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
1814 * internals.h: Add prototype for __pthread_manager_event.
1815 * manager.c (__pthread_manager_event): New function.
1816 (pthread_start_thread_event): Correct computation of self.
1817 Use INIT_THREAD_SELF.
1818 * pthread.c (__pthread_manager_thread): Initialize p_lock.
1819 (__pthread_initialize_manager): Respect event flags also for creation
1820 of the manager thread.
1822 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
1824 * pthread.c (__pthread_initialize_manager): Initialize
1825 __pthread_manager_thread.p_tid.
1827 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
1829 * internals.h: Declare __pthread_last_event.
1830 * manager.c: Define __pthread_last_event.
1831 (pthread_handle_create): Set __pthread_last_event.
1832 (pthread_exited): Likewise.
1833 * join.c (pthread_exit): Likewise.
1835 * Makefile (libpthread-routines): Add events.
1836 * events.c: New file.
1837 * internals.h: Protect against multiple inclusion.
1838 Include thread_dbP.h header.
1839 (struct _pthread_descr_struct): Add new fields p_report_events and
1841 Declare event reporting functions.
1842 * join.c (pthread_exit): Signal event if this is wanted.
1843 * manager.c (__pthread_threads_events): New variable.
1844 (pthread_handle_create): Take new parameters with event information.
1845 Signal TD_CREATE event if wanted.
1846 (__pthread_manager): Adjust pthread_handle_create call.
1847 (pthread_start_thread_event): New function. Block until manager is
1848 finished and then call pthread_start_thread.
1849 (pthread_exited): Signal TD_REAP event if wanted.
1851 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
1853 * restart.h (suspend_with_cancellation): Rewrite as a macro.
1855 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1857 1999-10-25 Andreas Jaeger <aj@suse.de>
1859 * internals.h: Remove K&R compatibility.
1860 * no-tsd.c: Likewise.
1861 * semaphore.h: Likewise.
1862 * signals.c: Likewise.
1863 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1864 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1865 * weaks.c: Likewise.
1867 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
1869 * pthread.c: For i386, wrap pthread_handle_sigrestart and
1870 pthread_handle_sigcancel with functions that restore %gs from the
1871 signal context. For each signal handling function, two wrappers
1872 are required, one for a non-RT signal and one for a RT signal.
1873 * signal.c: For i386, add code to restore %gs from the signal
1874 context in pthread_sighandler and pthread_sighandler_rt.
1876 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
1878 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1880 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
1882 * pthread.c (__pthread_initial_thread): Pass argument to
1883 PTHREAD_START_ARGS_INITIALIZER.
1884 (__pthread_manager_thread): Likewise.
1886 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1887 initialize function.
1889 * manager.c (pthread_handle_create): Remove p_startfct initialization.
1891 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1893 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
1895 * internals.h: Correct return types for __libc_read and __libc_write.
1897 1999-10-09 Andreas Jaeger <aj@suse.de>
1899 * internals.h: Add __new_sem_post to get prototype in
1900 manager.c; include semaphore.h for needed types.
1902 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
1904 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1905 directly instead of calling sem_post which should not be necessary
1906 but is faster and might help in some case to work around problems.
1907 Patch by khendricks@ivey.uwo.ca [libc/1382].
1909 1999-10-08 Andreas Schwab <schwab@suse.de>
1911 * sysdeps/pthread/Subdirs: New file.
1914 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
1916 * Implies: New file.
1917 * internals.h (struct _pthread_descr_struct): Add p_startfct.
1918 * manager.c (pthread_handle_create): Initialize p_startfct.
1919 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
1921 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
1923 * manager.c (__linuxthreads_pthread_threads_max): New variable.
1924 * specific.c (__linuxthreads_pthread_keys_max): New variable.
1925 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
1927 * condvar.c (pthread_cond_timedwait_relative): Never return with
1928 EINTR. Patch by Andreas Schwab.
1930 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
1932 * signals.c (sigaction): Correct last patch. Don't select
1933 pthread_sighandler_rt based on the signal number but instead of
1934 the SA_SIGINFO flag.
1936 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
1938 * specific.c: Move definitions of struct pthread_key_struct and
1939 destr_function to ...
1940 * internals.h: ...here.
1942 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
1944 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
1945 this instead of pthread_handle_sigrestart if the signal is an RT
1948 * signals.c: Handle passing through of sighandler arguments also
1949 for real-time signals.
1951 1999-09-03 Andreas Schwab <schwab@suse.de>
1953 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
1955 (__vfork): New function, alias vfork.
1956 * Versions: Export __fork, vfork, and __vfork in libpthread.
1958 1999-08-23 Andreas Schwab <schwab@suse.de>
1960 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
1961 call to signal handler.
1963 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
1965 * pthread.c (__pthread_reset_main_thread): Undo last change.
1966 (__pthread_kill_other_threads_np): Reset signal handlers for the
1967 signals we used in the thread implementation here.
1969 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
1971 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
1972 for the signals we used in the thread implementation [PR libc/1234].
1974 * Versions: Export __pthread_kill_other_threads_np from libpthread
1977 * signals.c: Pass sigcontext through wrapper to the user function.
1979 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
1981 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
1982 __libc_internal_tsd_set.
1984 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1986 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
1989 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1991 * internals.h: Align _pthread_descr_struct to 32 bytes.
1992 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
1995 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
1997 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2000 1999-07-09 Cristian Gafton <gafton@redhat.com>
2002 * Makefile (libpthread-routines): Add oldsemaphore routine.
2003 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2004 sem_trywait, and sem_wait to GLIBC_2.1.
2005 * oldsemaphore.c: New file.
2006 * semaphore.c: Add default_symbol_versions for the changed functions.
2007 (__new_sem_init): Rename from sem_init.
2008 (__new_sem_post): Rename from sem_post.
2009 (__new_sem_wait): Rename from sem_wait.
2010 (__new_sem_trywait): Rename from sem_trywait.
2011 (__new_sem_getvalue): Rename from sem_getvalue.
2012 (__new_sem_destroy): Rename from sem_destroy.
2014 1999-06-23 Robey Pointer <robey@netscape.com>
2016 * internals.h: Added p_nextlock entry to separate queueing for a
2017 lock from queueing for a CV (sometimes a thread queues on a lock
2018 to serialize removing itself from a CV queue).
2019 * pthread.c: Added p_nextlock to initializers.
2020 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2022 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2024 * manager.c (pthread_handle_create): Free mmap region after stack
2025 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2027 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2029 * man/pthread_cond_init.man: Correct example.
2030 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2032 * linuxthreads.texi (Condition Variables): Likewise.
2034 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2036 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2037 casx not cas, also successful casx returns the old value in rd
2038 and not the new value.
2040 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2042 * manager.c: If pthread_create() is given a NULL attribute
2043 and the thread manager runs with a realtime policy, set the
2044 scheduling policy of the newly created thread back to SCHED_OTHER.
2045 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2046 initialize the schedpolicy field of new_thread->p_start_args
2047 to that of the calling thread.
2049 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2051 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2052 instruction does not allow memory element to use offset.
2054 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2056 * manager.c (pthread_allocate_stack): Optimize initialization of new
2059 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2060 Don't use initializer since it is all zeroes.
2061 (__libc_once_define): Likewise.
2063 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2065 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2066 doesn't exist anymore.
2067 * sysdeps/i386/Implies: Likewise.
2068 * sysdeps/m68k/Implies: Likewise.
2069 * sysdeps/mips/Implies: Likewise.
2070 * sysdeps/powerpc/Implies: Likewise.
2071 * sysdeps/sparc/sparc32/Implies: Likewise.
2072 * sysdeps/sparc/sparc64/Implies: Likewise.
2074 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2076 * sysdeps/alpha/bits/semaphore.h: Removed.
2077 * sysdeps/powerpc/bits/semaphore.h: Removed.
2078 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2079 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2080 * Makefile (headers): Remove bits/semaphore.h.
2082 * semaphore.h: Define _pthread_descr if necessary.
2083 Don't include limits.h. Define SEM_VALUE_MAX directly.
2085 (sem_t): Protect element names with leading __.
2086 Add declarations for sem_close, sem_open, and sem_unlink.
2087 * semaphore.c: Adjust all functions for new element names.
2088 Define sem_close, sem_open, and sem_unlink.
2089 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2091 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2094 1999-03-16 H.J. Lu <hjl@gnu.org>
2096 * specific.c (pthread_key_delete): Check th->p_terminated to see
2097 if the thread is running.
2099 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2100 Added to GLIBC_2.0 for libc.so.
2102 1999-02-12 H.J. Lu <hjl@gnu.org>
2104 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2105 __libc_allocate_rtsig): Added to GLIBC_2.1.
2107 * internals.h (DEFAULT_SIG_RESTART): Removed.
2108 (DEFAULT_SIG_CANCEL): Removed.
2110 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2111 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2112 (__pthread_sig_restart, __pthread_sig_cancel,
2113 __pthread_sig_debug): Initialized.
2114 (pthread_initialize): Call init_rtsigs () to initialize
2117 1999-02-03 H.J. Lu <hjl@gnu.org>
2119 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2120 Don't restart the thread which sent REQ_DEBUG.
2121 (pthread_start_thread): Check if __pthread_sig_debug > 0
2124 * pthread.c (__pthread_initialize_manager): Suspend ourself
2125 after sending __pthread_sig_debug to gdb instead of
2126 __pthread_sig_cancel.
2128 1999-01-24 H.J. Lu <hjl@gnu.org>
2130 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2131 from mask if __pthread_sig_debug > 0.
2132 (pthread_handle_create): Increment __pthread_handles_num.
2134 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2135 * pthread.c (__pthread_initialize_manager): Likewise.
2137 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2138 instead of __libc_allocate_rtsig (2).
2139 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2140 instead of __pthread_sig_cancel.
2141 (pthread_handle_sigdebug): Fix comments.
2143 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2145 * manager.c (pthread_allocate_stack): Set
2146 __pthread_nonstandard_stacks if user-specified stack is used.
2148 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2150 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2151 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2153 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2155 * pthread.c: Use a third signal __pthread_sig_debug distinct
2156 from __pthread_sig_cancel to notify gdb when a thread is
2158 * manager.c: Likewise.
2159 * internals.h: Likewise.
2160 * signals.c: The implementation of sigwait(s) assumed that
2161 all signals in s have signal handlers already attached.
2162 This is not required by the standard, so make it work
2163 also if some of the signals have no handlers.
2165 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2167 * linuxthreads.texi: Remove pointers from first @node. Move old
2168 @node spec inside comment.
2170 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2172 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2175 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2177 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2178 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2180 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2182 * manager.c: Threads now send __pthread_sig_cancel on termination.
2183 Change clone call and signal masks.
2184 * thread.c (pthread_handle_sigrestart): Remove special code for
2186 (pthread_handle_sigcancel): In manager thread call
2187 __pthread_manager_sighandler.
2188 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2189 * sysdeps/i386/i686/pt-machine.h: Likewise.
2190 Patches by Xavier Leroy.
2192 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2194 * spinlock.c (__pthread_unlock): Don't crash if called for an
2195 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2197 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2200 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2202 * Examples/ex3.c: Wait until all threads are started before
2203 searching for the number to avoid race condition on very fast
2206 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2208 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2209 declaration since it's not needed.
2211 * sysdeps/pthread/pthread.h: Move internal functions to ...
2212 * internals.h: ...here.
2214 1998-12-02 H.J. Lu <hjl@gnu.org>
2216 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2217 SIGRTMIN is defined.
2218 (__pthread_sig_cancel): Likewise.
2220 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2222 * wrapsyscall.c: Include <sys/mman.h> for msync,
2223 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2224 Correct msync declaration.
2226 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2228 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2229 __libc_tsd_set): New macros for new interface.
2230 * no-tsd.c: New file, provide uninitialized defns of
2231 __libc_internal_tsd_get and __libc_internal_tsd_set.
2232 * Makefile (routines): Add no-tsd.
2234 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2236 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2237 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2238 __libc_internal_tsd_set): Move decls to ...
2239 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2242 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2243 __libc_internal_tsd_set): Make these pointers to functions, not
2244 functions; remove #pragma weak decls for them.
2245 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2246 Define static functions and initialized pointers to them.
2248 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2250 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2251 (CFLAGS-specific.c): Likewise.
2252 (CFLAGS-pthread.c): Likewise.
2253 (CFLAGS-ptfork.c): Likewise.
2254 (CFLAGS-cancel.c): Likewise.
2255 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2256 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2258 * mutex.c (pthread_mutex_init): Define as strong symbol.
2259 (pthread_mutex_destroy): Likewise.
2260 (pthread_mutex_trylock): Likewise.
2261 (pthread_mutex_lock): Likewise.
2262 (pthread_mutex_unlock): Likewise.
2263 (pthread_mutexattr_init): Likewise.
2264 (pthread_mutexattr_destroy): Likewise.
2265 (pthread_once): Likewise.
2266 * ptfork.c (pthread_atfork): Likewise.
2267 * specific.c (pthread_key_create): Likewise.
2268 (pthread_setspecific): Likewise.
2269 (pthread_getspecific): Likewise.
2271 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2273 * linuxthreads.texi: Fix punctuation after xref.
2275 1998-11-10 H.J. Lu <hjl@gnu.org>
2277 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2278 if it is defined in <linux/limits.h>.
2280 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2282 * spinlock.h (__pthread_trylock): Define inline.
2283 (__pthread_lock): Add extra parameter to declaration. Declare
2284 using internal_function.
2285 (__pthread_unlock): Declare using internal_function.
2286 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2287 of local variable self. Avoid recomputing self. Define using
2289 (__pthread_trylock): Remove.
2290 (__pthread_unlock): Define using internal_function.
2291 * cancel.c: Adjust for __pthread_lock interface change. Use already
2292 computed self value is possible.
2293 * condvar.c: Likewise.
2295 * manager.c: Likewise.
2296 * mutex.c: Likewise.
2297 * pthread.c: Likewise.
2298 * rwlock.c: Likewise.
2299 * semaphore.c: Likewise.
2300 * signals.c: Likewise.
2302 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2304 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2305 __ to field names of the struct.
2306 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2308 (pthread_attr_t): Likewise.
2309 (pthread_cond_t): Likewise.
2310 (pthread_condattr_t): Likewise.
2311 (pthread_mutex_t): Likewise.
2312 (pthread_mutexattr_t): Likewise.
2313 (pthread_rwlock_t): Likewise.
2314 (pthread_rwlockattr_t): Likewise.
2315 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2316 * cancel.c: Likewise.
2317 * condvar.c: Likewise.
2318 * manager.c: Likewise.
2319 * mutex.c: Likewise.
2320 * pthread.c: Likewise.
2321 * ptlongjmp.c: Likewise.
2322 * rwlock.c: Likewise.
2323 * spinlock.c: Likewise.
2325 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2327 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2330 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2333 * Makefile (libpthread-routines): Add pt-machine.
2334 * pt-machine.c: New file.
2335 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2336 yet defined. Use PT_EI in extern inline definitions.
2337 * sysdeps/arm/pt-machine.h: Likewise.
2338 * sysdeps/i386/pt-machine.h: Likewise.
2339 * sysdeps/i386/i686/pt-machine.h: Likewise.
2340 * sysdeps/m68k/pt-machine.h: Likewise.
2341 * sysdeps/mips/pt-machine.h: Likewise.
2342 * sysdeps/powerpc/pt-machine.h: Likewise.
2343 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2344 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2346 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2348 * semaphore.h: Include <sys/types.h> so that _pthread_descr
2351 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
2353 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2355 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2357 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2359 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2362 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2364 * signals.c (sigaction): Check that sig is less than NSIG to avoid
2365 array index overflow.
2367 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
2369 * sysdeps/pthread/semaphore.h: New file.
2371 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
2373 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2374 _LIBC_TSD_KEY_DL_ERROR.
2376 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
2378 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2379 * sysdeps/i386/pt-machine.h: Likewise.
2380 Suggested by Roland McGrath.
2382 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
2384 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2385 access thread data with non-constant offsets.
2386 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2389 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
2390 THREAD_SETMEM_NC definitions.
2392 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2394 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2396 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
2398 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2399 not already defined.
2400 (struct _pthread_descr_struct): Add p_self and p_nr field.
2401 * manager.c (__pthread_handles): Define second element to point
2403 (__pthread_handles_num): Initialize to 2.
2404 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2405 (pthread_start_thread): Likewise.
2406 (pthread_handle_create): Start search for free slot at entry 2.
2407 Initialize new fields p_self and p_nr.
2408 Call __clone with CLONE_PTRACE if available.
2409 (pthread_free): Call FREE_THREAD_SELF if available.
2410 * pthread.c (__pthread_initial_thread): Initialize new fields.
2411 (__pthread_manager_thread): Likewise.
2412 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2414 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2415 elements of the thread descriptor.
2416 * condvar.c: Likewise.
2417 * errno.c: Likewise.
2419 * manager.c: Likewise.
2420 * pthread.c: Likewise.
2421 * ptlongjmp.c: Likewise.
2422 * semaphore.c: Likewise.
2423 * signals.c: Likewise.
2424 * specific.c: Likewise.
2425 * spinlock.c: Likewise.
2427 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2429 * sysdeps/i386/useldt.h: New file.
2430 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2432 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2433 THREAD_SETMEM using __thread_self.
2434 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2436 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
2438 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2439 turned out that we didn't need to queue after all.
2441 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
2443 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2444 and wastes space; correct types.
2446 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
2448 * signals.c (sigaction): Handle NULL argument.
2450 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
2452 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2455 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2457 * Makefile (linuxthreads-version): Extract correct number from
2460 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
2462 * Banner: Bump version number to 0.8
2463 * FAQ.html: Many updates, in particular w.r.t. debugging.
2464 * manager.c: Support for non-default stacksize for
2465 LinuxThreads-allocated stacks;
2466 don't use guard pages for stacks with default size, rely on
2467 rlimit(RLIMIT_STACK) instead (it's cheaper).
2469 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2470 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2471 * condvar.c: Likewise.
2472 * internals.h: Likewise.
2473 * restart.h: Likewise.
2474 * signals.c: Likewise.
2475 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2477 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2479 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2480 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
2481 * Versions: Put __pthread_mutexattr_settype under version
2482 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
2483 __pthread_mutexattr_gettype.
2485 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2487 * sysdeps/pthread/bits/libc-lock.h: Make
2488 __pthread_mutexattr_settype weak. Don't make
2489 __pthread_mutexattr_setkind_np weak.
2491 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
2493 * manager.c (pthread_handle_create): Check whether sched_setscheduler
2494 call can succeed here.
2496 * mutex.c: Define __pthread_mutexattr_settype and make
2497 __pthread_mutexattr_setkind_np an alias.
2498 Likewise for __pthread_mutexattr_gettype.
2500 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2502 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2505 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
2507 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2509 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2511 * Examples/ex6.c: Include <unistd.h> for usleep.
2513 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2515 * Examples/ex4.c (main): Use exit, not pthread_exit.
2517 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
2519 * Versions: Add __pthread_mutexattr_gettype and
2520 __pthread_mutexattr_settype.
2521 * lockfile.c: Use __pthread_mutexattr_settype instead of
2522 __pthread_mutexattr_setkind_np.
2523 * mutex.c: Define __pthread_mutexattr_gettype and
2524 __pthread_mutexattr_settype.
2526 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2527 __pthread_mutexattr_settype.
2528 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2529 Use __pthread_mutexattr_settype.
2531 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
2533 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2534 * mutex.c: Define weak alias pthread_mutexattr_gettype and
2535 pthread_mutexattr_settype.
2536 * sysdeps/pthread/pthread.h: Declare these functions.
2537 Move pthread_sigmask and pthread_kill declaration in separate header.
2538 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2540 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
2542 * Makefile: Add rules to compile and run tests.
2543 * Examples/ex1.c: Little changes to fix warnings.
2544 * Examples/ex2.c: Likewise.
2545 * Examples/ex3.c: Likewise.
2546 * Examples/ex4.c: Likewise.
2547 * Examples/ex5.c: Likewise.
2548 * Examples/ex6.c: New file.
2550 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
2552 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2554 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2556 * attr.c: Include <string.h>.
2558 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
2560 * attr.c: Include errno.h. Use memcpy to copy sched_param.
2561 * internals.h: Include limits.h.
2562 * manager.c: Use memcpy to copy sched_param.
2563 * ptfork.c: Include errno.h.
2564 * pthread.c: Likewise.
2565 * semaphore.c: Likewise.
2566 * specific.c: Likewise.
2567 * spinlock.h: Likewise.
2568 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
2569 type definition to ...
2570 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
2572 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
2574 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2576 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2577 as macros as demanded in POSIX.1, Annex C.
2579 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
2581 * internals.h (struct pthread_request): For free use pthread_t
2582 instead of pthread_descr.
2583 * join.c (pthread_join): Pass thread_id, not th to manager.
2584 (pthread_detach): Likewise.
2585 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2586 (pthread_exited): Remove detached queue code.
2587 (pthread_handle_free): Expect thread ID parameter and use it to
2588 validate the thread decsriptor. Don't use detached queue.
2589 Patches by Xavier Leroy.
2591 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2593 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2594 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2595 __pthread_atfork, __pthread_key_create, __pthread_once.
2596 * internals.h: Doc fix.
2597 * pthread.c (__pthread_initialize): Define again.
2599 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
2601 * manager.c (pthread_exited): If thread is not detached put it on
2603 (pthread_handle_free): If thread is not on list with living threads
2604 search on list with detached threads.
2606 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2607 for new definition of pthread_rwlock_t.
2609 * spinlock.c: Correct test whether to compile
2610 __pthread_compare_and_swap or not.
2612 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
2614 * attr.c: Finish user stack support. Change locking code to be safe
2615 in situations with different priorities.
2616 * cancel.c: Likewise.
2617 * condvar.c: Likewise.
2618 * internals.h: Likewise.
2620 * manager.c: Likewise.
2621 * mutex.c: Likewise.
2622 * pthread.c: Likewise.
2623 * ptlongjmp.c: Likewise.
2624 * queue.h: Likewise.
2625 * rwlock.c: Likewise.
2626 * semaphore.c: Likewise.
2627 * semaphore.h: Likewise.
2628 * signals.c: Likewise.
2629 * spinlock.c: Likewise.
2630 * spinlock.h: Likewise.
2631 * sysdeps/pthread/pthread.h: Likewise.
2632 Patches by Xavier Leroy.
2634 * sysdeps/i386/i686/pt-machine.h: New file.
2636 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
2638 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2639 [sg]et_stackaddr prototypes always available.
2641 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2642 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2644 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
2646 * manager.c (pthread_free): Undo patch from 980430.
2647 Reported by David Wragg <dpw@doc.ic.ac.uk>.
2649 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
2651 * manager.c: Define __pthread_manager_adjust_prio and use it to
2652 increase priority when needed.
2653 * internals.h: Add prototype for __pthread_manager_adjust_prio.
2654 * mutex.c: Optimize mutexes to wake up only one thread.
2655 * pthread.c: Move PID of manager for global variable in structure
2657 Patches by Xavier Leroy.
2659 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
2661 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2663 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2665 * attr.c: Correct typo.
2667 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
2669 * manager.c (pthread_free): Unmap guard before the stack.
2670 Patch by Matthias Urlichs.
2672 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
2674 * manager.c (pthread_free): Detect already free child.
2675 Patch by Xavier Leroy, reported by Matthias Urlichs.
2677 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2679 * Makefile (linuxthreads-version): Renamed back from
2682 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
2684 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2687 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
2689 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2690 * internals.h: Add definitions for new spinlock implementation.
2691 * ptlongjmp.c: New file.
2692 * spinlock.c: New file.
2693 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2694 new function __pthread_acquire to prevent deadlocks with thread
2695 with different priorities.
2696 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2698 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2700 * manager.c (__pthread_manager): Reduce first argument to select
2701 to include just the needed file descriptor.
2703 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
2705 * manager.c: Fix last patch which caused core dumps.
2707 * pthread.c: Correctly handle missing SIGRTMIN.
2709 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2711 * libpthread.map: Add __libc_internal_tsd_get and
2712 __libc_internal_tsd_set. Add missing cancelable functions. Export
2713 libc internal versions of the cancelable functions.
2715 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
2717 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2719 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
2721 * attr.c: Implement pthread_attr_[gs]etguardsize,
2722 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2723 Change pthread_attr_init to have two interfaces.
2724 * internals.h (struct _pthread_descr_struct): Add new fields for
2726 * libpthread.map: Add names in GLIBC_2.1 section.
2727 * manager.c (pthread_handle_create): Implement guardsize and
2729 (pthread_free): Likewise.
2730 * pthread.c (pthread_create): Add new interface for changed
2732 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2733 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2736 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
2738 * manager.c: Enable resetting of the thread scheduling policy
2739 to SCHED_OTHER when the parent thread has a different one.
2741 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
2743 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2744 _POSIX_ASYNCHRONOUS_IO.
2746 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2748 * mutex.c: Implement new mutex types.
2750 * internals.h: Include <signal.h>.
2752 * libpthread.map: Add __erno_location and __h_errno_location.
2754 * errno.c: Return pointer to variable actually in use. This might
2755 not be the one in the thread structure.
2756 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2758 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2759 of manager thread structure.
2760 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2762 * pthread.c: Adapt initializer for thread structures.
2763 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2764 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2765 current thread to global variables.
2767 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
2769 * rwlock.c: New file.
2770 * Makefile (libpthread-routines): Add rwlock.
2771 * sysdeps/pthread/pthread.h: Define data structures and declare
2773 * libpthread.map: Add new functions.
2775 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
2777 * sysdeps/arm/pt-machine.h: New file; add ARM support.
2778 * sysdeps/arm/Implies: likewise.
2779 * README: Document it.
2781 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2783 * signals.c: Remove unneeded initializer for sigwaited, saving a
2786 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2788 * semaphore.c (sem_init): Set sem_spinlock only if available.
2790 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
2792 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2793 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2795 * Makefile: Update from LinuxThreads 0.7.
2796 * internals.h. Likewise.
2797 * manager.c: Likewise.
2798 * mutex.c: Likewise.
2799 * pthread.c: Likewise.
2800 * signals.c: Likewise.
2801 * specific.c: Likewise.
2802 * Examples/ex3.c: Likewise.
2804 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
2806 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2809 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
2811 * wrapsyscall.c: Add socket functions which are also cancelation
2814 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
2816 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2817 New functions for fast thread specific data within libc.
2819 * internals.h: Add new array p_libc_specific to struct
2820 _pthread_descr_struct.
2822 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2824 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
2826 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2827 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2829 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
2831 * internals.h (struct _pthread_descr_struct): Add definitions for
2832 two-level specific key handling.
2833 * manager.c (pthread_handle_create): Initialize specific memory array.
2834 * specific.c: Implement two-level key handling.
2835 * weaks.c: Don't provide dummy key handling.
2836 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2837 Add definition of __libc_key_t.
2838 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2840 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2841 PTHREAD_DESTRUCTOR_ITERATIONS.
2843 * manager.c (pthread_handle_create): Compare mmap result with
2846 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2847 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2849 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
2851 sysdeps/sparc -> sysdeps/sparc/sparc32
2852 sysdeps/sparc64 -> sysdeps/sparc/sparc64
2854 * internals.h: Change definition of THREAD_SELF to be an expression,
2855 not a statement that did a return.
2856 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2857 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2858 Follow Solaris and use a "system reserved" register (%g6) to hold
2859 the thread descriptor.
2860 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2862 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
2864 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
2865 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2866 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2868 * semaphore.c: Include spinlock.h only when needed.
2870 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2871 keys for entries not in use.
2873 * weaks.c: Implement key handling functions for real.
2875 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
2877 Initial sparc64-linux support:
2878 * sysdeps/sparc64/Implies: New file.
2879 * sysdeps/sparc64/pt-machine.h: Likewise.
2881 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
2883 * semaphore.c: Include spinlock.h at correct place.
2886 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
2888 The Great Bit File Move:
2889 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2890 * sysdeps/powerpc/semaphorebits.h: Likewise.
2891 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2892 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2893 * sysdeps/pthread/libc-lock.h: -> bits/
2894 * sysdeps/pthread/stdio-lock.h: Likewise.
2895 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2896 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2897 * semaphore.h: Likewise.
2898 * sysdeps/pthread/pthread.h: Likewise.
2900 * lockfile.c: <foo.h> -> <bits/foo.h>.
2901 * semaphore.h: Likewise.
2903 * Makefile: (headers): foo.h -> bits/foo.h.
2904 * sysdeps/pthread/Makefile: Likewise.
2906 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2908 * semaphore.c (sem_init): Set sem_spinlock only if available.
2910 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
2913 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
2915 Update from LinuxThreads 0.6.
2917 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
2918 and __sched_get_priority_min instead of names without `__'.
2920 * manager.c: Rewrite large parts to implement opaque pthread_t.
2922 * cancel.c: Adapt for opaque pthread_t type.
2923 * condvar.c: Likewise.
2924 * errno.c: Likewise.
2926 * mutex.c: Likewise.
2927 * pthread.c: Likewise.
2928 * signals.c: Likewise.
2929 * specific.c: Likewise.
2930 * restart.h: Likewise.
2931 * queue.h: Likewise.
2932 * Examples/ex3.c: Likewise.
2933 * Examples/ex4.c: Likewise.
2934 * sysdeps/pthread/pthread.h: Likewise.
2936 * pthread.c: Accumulate time for all threads in thread manager.
2938 * semaphore.c: Implement fallback implementation for architectures
2939 sometimes missing compare-exchange operations.
2941 * cancel.c (pthread_cancel): Validate handle argument.
2942 * join.c (pthread_join): Likewise.
2943 (pthread_detach): Likewise.
2944 * signals.c (pthread_kill): Likewise.
2946 * spinlock.h (acquire): Use __sched_yield not sched_yield.
2948 * queue.h (enqueue): Enqueue thread according to priority.
2950 * internals.c (struct pthread_start_args): New struct for passing
2951 args to cloning function.
2952 (struct _pthread): Rename to _pthread_descr_struct and adapt for
2955 * Examples/Makefile (clean): Pass -f option to rm.
2957 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
2958 and define TEST_FOR_COMPARE_AND_SWAP.
2959 * sysdeps/i386/i486/pt-machine.h: Removed.
2961 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
2964 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
2966 * restart.h (suspend): Clear p_signal before suspending.
2967 (suspend_with_cancellation): Likewise.
2968 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
2970 * weaks.c: Make __pthread_key_create return 1.
2971 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
2972 __libc_getspecific, __libc_setspecific, and __libc_key_t.
2973 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
2976 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
2978 * sysdeps/sparc/pt-machine (RELEASE): Fix.
2980 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
2982 * sysdeps/powerpc/Implies: Added.
2983 * sysdeps/powerpc/pt-machine.h: Added.
2984 * sysdeps/powerpc/semaphorebits.h: Added.
2986 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
2988 * pthread.c (__pthread_initial_thread): Correct
2990 (__pthread_manager_thread): Likewise.
2991 Reported by Andreas Jaeger.
2993 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
2995 Since sigset_t no longer fits in a register, we can't pass in the
2996 thread's initial mask so easily. Take this opportunity to simplify
2997 the clone implementation by only accepting a single void* argument.
2999 * manager.c (__pthread_manager): Put thread vitals in the thread
3000 struct instead of as arguments through clone.
3001 (pthread_start_thread): Look for them there.
3002 * internals.h (struct _pthread): Add p_initial_fn,
3003 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3004 * pthread.c (pthread_initialize_manager): Revise clone invocation.