1 2001-04-21 Ulrich Drepper <drepper@redhat.com>
3 * internals.h: Include <cpuclock-init.h>.
4 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
5 CPUCLOCK_VARDEF is defined.
6 * pthread.c (__pthread_initialize_minimal): Initialize
7 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
8 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
9 for new thread to current CPU clock value.
11 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
13 * sysdeps/i386/i586/Makefile: New file.
14 * sysdeps/i386/i586/Versions: New file.
15 * sysdeps/i386/i586/ptclock_gettime.c: New file.
16 * sysdeps/i386/i586/ptclock_settime.c: New file.
17 * sysdeps/i386/i686/Implies: New file.
19 2001-04-18 Jakub Jelinek <jakub@redhat.com>
21 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
22 $generated, not $postclean-generated.
24 2001-04-18 Andreas Jaeger <aj@suse.de>
26 * Makefile (otherlibs): Added.
28 2001-04-18 Jakub Jelinek <jakub@redhat.com>
30 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
32 2001-04-16 Ulrich Drepper <drepper@redhat.com>
34 * signals.c (sigwait): NSIG is no signal number. Block all
35 signals while in signal handler for signals in SET.
36 Patch by Manfred Spraul <manfred@colorfullife.com>.
38 2001-04-12 Ulrich Drepper <drepper@redhat.com>
40 * tst-cancel.c: Disable most tests. Add new test where all
41 cleanup handlers must run.
42 * Makefile (tests): Add tst-cancel again.
44 * cancel.c (__pthread_perform_cleanup): Correct condition for
45 leaving cleanup loop early.
47 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
48 all the files which use CURRENT_STACK_FRAME.
49 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
50 __builtin_frame_address.
51 * sysdeps/i386/i686/pt-machine.h: Likewise.
53 2001-04-11 Ulrich Drepper <drepper@redhat.com>
55 * Makefile (tests): Comment out tst-cancel for now.
57 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
58 temporary file in object directory.
59 * Makefile: Don't allow inlining when compiling tst-cancel.c.
60 Pass $(objpfx) to tst-cancel.
62 2001-04-11 David S. Miller <davem@redhat.com>
64 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
65 up closer to user local variables so that new cleanup heuristics work.
66 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
68 2001-04-11 Ulrich Drepper <drepper@redhat.com>
70 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
72 (_pthread_cleanup_push_defer): Likewise.
74 * tst-cancel.c (main): Fix loop printing cleanup output.
76 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
78 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
80 (__pthread_spin_trylock): Likewise.
81 * sysdeps/sh/pt-machine.h (testandset): Likewise.
83 2001-04-10 Ulrich Drepper <drepper@redhat.com>
85 * join.c (pthread_exit): Move code to new function __pthread_do_exit
86 which takes an extra parameter with the current frame pointer.
87 Call new function with CURRENT_STACK_FRAME.
88 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
89 with the new parameter.
90 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
91 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
92 this parameter as the initial value the cleanup handler records are
93 compared against. No active cleanup handler record must have an
94 address lower than the previous one and the initial record must be
95 above (below on PA) the frame address passed in.
96 (pthread_setcancelstate): Call __pthread_do_exit instead of
98 (pthread_setcanceltype): Likewise.
99 (pthread_testcancel): Likewise.
100 (_pthread_cleanup_pop_restore): Likewise.
101 * condvar.c (pthread_cond_wait): Likewise.
102 (pthread_cond_timedwait_relative): Likewise.
103 * manager.c (pthread_start_thread): Likewise.
104 * oldsemaphore.c (__old_sem_wait): Likewise.
105 * pthread.c (pthread_handle_sigcancel): Likewise.
106 * semaphore.c (__new_sem_wait): Likewise.
107 (sem_timedwait): Likewise.
108 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
109 to limit the cleanup handlers which get run.
110 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
111 for __pthread_perform_cleanup.
113 * Makefile (tests): Add tst-cancel.
114 * tst-cancel.c: New file.
116 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
118 * sysdeps/cris/pt-machine.h: New file.
119 * sysdeps/cris/pspinlock.c: New file.
121 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
123 * shlib-versions: Add case for Linux on CRIS.
125 2001-03-26 Ulrich Drepper <drepper@redhat.com>
127 * attr.c (pthread_getattr_np): Correct computation of stack size
128 for machiens with register stack.
130 * Examples/ex17.c (main): Correct detection of failed mmap call.
132 2001-03-21 Jakub Jelinek <jakub@redhat.com>
134 * pthread.c (__pthread_initialize_manager): Fix a typo.
136 2001-03-21 Jakub Jelinek <jakub@redhat.com>
138 * attr.c (__pthread_attr_setstack): Fix alignment check.
139 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
140 * Makefile (tests): Add ex17 test.
141 * Examples/ex17.c: New test.
143 2001-03-20 Ulrich Drepper <drepper@redhat.com>
145 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
146 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
147 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
149 2001-03-18 Ulrich Drepper <drepper@redhat.com>
151 * Makefile: When generating DSO link with libc_nonshared.a.
153 2001-02-26 Jakub Jelinek <jakub@redhat.com>
155 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
157 2001-02-23 Jakub Jelinek <jakub@redhat.com>
159 * internals.h (__pthread_init_max_stacksize): New prototype.
160 * attr.c (__pthread_attr_setstacksize): Call
161 __pthread_init_max_stacksize if not yet initialized.
162 * pthread.c (__pthread_init_max_stacksize): New function.
163 (__pthread_initialize_manager): Call it.
164 Patch by <dtc@cmucl.cons.org>.
166 2001-03-16 Ulrich Drepper <drepper@redhat.com>
168 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
170 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
172 * shlib-versions: Add rule for Linux on 64 bit S/390.
173 * sysdeps/s390/s390-64/pt-machine.h: New file.
174 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
176 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
178 * sysdeps/s390/pt-machine.h: Move to...
179 * sysdeps/s390/s390-32/pt-machine.h: ...here.
180 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
182 2001-03-15 Ulrich Drepper <drepper@redhat.com>
184 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
185 * attr.c: Implement pthread_getattr_np.
186 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
187 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
188 * manager.c (pthread_handle_create): Initialize p_inheritsched.
190 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
192 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
195 2001-02-20 Hans Boehm <hans_boehm@hp.com>
197 * manager.c (manager_mask): Removed static vesion. Now always local
198 to __pthread_manager().
199 (manager_mask_all): Removed completely.
200 (__pthread_manager): Remove manager_mask_all initialization.
201 (pthread_handle_create): Remove code to set and reset signal mask
202 around __clone2() calls.
204 2001-02-17 Jakub Jelinek <jakub@redhat.com>
206 * spinlock.c (__pthread_lock): Force lock->__status to be read from
207 memory on every spin.
209 2001-02-10 Andreas Jaeger <aj@suse.de>
211 * Makefile (extra-objs): New.
213 2001-02-09 Jakub Jelinek <jakub@redhat.com>
215 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
216 __pthread_initialize_minimal prototype.
218 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
220 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
222 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
224 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
226 2001-02-06 Ulrich Drepper <drepper@redhat.com>
228 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
229 broken code. Patch by Jes Sorensen.
231 2001-02-06 Andreas Jaeger <aj@suse.de>
233 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
235 * internals.h: ...here.
237 2001-02-05 Jes Sorensen <jes@linuxcare.com>
239 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
241 2001-02-02 Ulrich Drepper <drepper@redhat.com>
243 * Versions: Remove __pthread_initialize_minimal.
245 2001-02-01 Ulrich Drepper <drepper@redhat.com>
247 * Makefile: Add rules to build crti.o and make it being used in
248 building libpthread.so.
249 * sysdeps/i386/Makefile: New file.
250 * sysdeps/pthread/pt-initfini.c: New file.
252 * pthread.c: Cleanups.
254 2001-01-28 Andreas Jaeger <aj@suse.de>
256 * oldsemaphore.c (__old_sem_init): Adjust for last change.
257 * sysdeps/pthread/bits/libc-lock.h: Likewise.
258 * spinlock.c: Likewise.
260 2001-01-28 Ulrich Drepper <drepper@redhat.com>
262 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
263 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
264 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
265 * pthread.c: Likewise.
266 * spinlock.h: Likewise.
267 * sysdeps/pthread/pthread.h: Likewise.
269 2001-01-26 Ulrich Drepper <drepper@redhat.com>
271 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
272 as struct __pthread_attr_s.
274 * semaphore.h (sem_t): Cleanup namespace, rename status and
277 2001-01-13 Jakub Jelinek <jakub@redhat.com>
279 * pthread.c (pthread_onexit_process): Clear
280 __pthread_manager_thread_bos after freeing it.
281 * Makefile (tests): Add ex16.
282 * Examples/ex16.c: New file.
284 2001-01-11 Jakub Jelinek <jakub@redhat.com>
286 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
288 * pthread.c (pthread_exit_process): Rename to...
289 (pthread_onexit_process): ...this.
290 (pthread_atexit_process, pthread_atexit_retcode): New.
291 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
292 and only if HAVE_Z_NODELETE is not defined.
293 (__pthread_initialize_manager): Register pthread_atexit_retcode
296 2001-01-11 Ulrich Drepper <drepper@redhat.com>
298 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
300 2001-01-11 Jakub Jelinek <jakub@redhat.com>
302 * Makefile (tests): Add ex15.
303 * Examples/ex15.c: New test.
305 2001-01-08 Ulrich Drepper <drepper@redhat.com>
307 * pthread.c (pthread_exit_process): Free memory allocated for
310 2000-12-31 Ulrich Drepper <drepper@redhat.com>
312 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
313 (pthread_free): Always unmap the stack. It's safe now that we don't
314 use MAP_FIXED to allocate stacks.
316 2000-12-31 Ulrich Drepper <drepper@redhat.com>
318 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
320 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
322 2000-11-15 Wolfram Gloger <wg@malloc.de>
324 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
325 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
327 2000-12-27 Andreas Jaeger <aj@suse.de>
329 * Examples/ex13.c: Make local functions static.
330 * ecmutex.c: Likewise.
331 * joinrace.c: Likewise.
332 * Examples/ex14.c: Likewise.
334 * Examples/ex2.c: Make local functions static; reformat.
335 * Examples/ex1.c: Likewise.
336 * Examples/ex4.c: Likewise.
337 * Examples/ex5.c: Likewise.
338 * Examples/ex7.c: Likewise.
340 * oldsemaphore.c: Add prototypes to shut up GCC.
341 * pt-machine.c: Likewise.
343 * weaks.c: Add prototype for pthread_exit.
345 * internals.h: Add some prototypes, format prototypes and add
347 Move __libc_waitpid prototype to include/sys/wait.h.
349 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
351 * specific.c: Likewise.
352 * ptfork.c: Likewise.
354 * lockfile.c: Include internals.h to get prototypes.
355 * events.c: Likewise.
356 * sysdeps/alpha/pspinlock.c: Likewise.
357 * sysdeps/arm/pspinlock.c: Likewise.
358 * sysdeps/hppa/pspinlock.c: Likewise.
359 * sysdeps/i386/pspinlock.c: Likewise.
360 * sysdeps/ia64/pspinlock.c: Likewise.
361 * sysdeps/m68k/pspinlock.c: Likewise.
362 * sysdeps/mips/pspinlock.c: Likewise.
363 * sysdeps/powerpc/pspinlock.c: Likewise.
364 * sysdeps/s390/pspinlock.c: Likewise.
365 * sysdeps/sh/pspinlock.c: Likewise.
366 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
367 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
368 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
370 2000-12-27 Ulrich Drepper <drepper@redhat.com>
372 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
373 (__pthread_attr_getstack): Return correct address.
374 Add warnings for using pthread_attr_getstackaddr and
375 pthread_attr_setstackaddr.
377 2000-12-26 Ulrich Drepper <drepper@redhat.com>
379 * Examples/ex6.c (test_thread): Make static.
380 * Examples/ex12.c (test_thread): Make static and add noreturn
383 2000-12-18 Jes Sorensen <jes@linuxcare.com>
385 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
386 and compare_and_swap_with_release_semantics returns int not long.
388 2000-12-17 Andreas Jaeger <aj@suse.de>
390 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
392 * sysdeps/arm/pt-machine.h (testandset): Likewise.
393 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
394 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
395 * sysdeps/sh/pt-machine.h (testandset): Likewise.
396 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
397 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
399 2000-12-17 Ulrich Drepper <drepper@redhat.com>
401 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
402 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
404 2000-12-17 Andreas Jaeger <aj@suse.de>
406 * internals.h: Add prototypes for testandset and
407 __compare_and_swap to shut up gcc warnings.
409 2000-12-06 Wolfram Gloger <wg@malloc.de>
411 * join.c (pthread_detach): Allow case where the thread has already
414 2000-12-05 Andreas Jaeger <aj@suse.de>
416 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
417 * sysdeps/mips/pt-machine.h (testandset): Likewise.
418 (__compare_and_swap): Likewise.
419 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
421 2000-11-20 Jakub Jelinek <jakub@redhat.com>
423 * Examples/ex3.c (main): Cast int to long before casting to void *.
424 (search): Cast void * to long, not int.
425 * Examples/ex8.c (main, thread): Similarly.
426 * Examples/ex11.c (main): Similarly.
427 * Examples/ex14.c (worker, do_test): Similarly.
428 * ecmutex.c (worker, do_test): Similarly.
429 (nlocks): Cast to int.
431 2000-11-08 Bruce Mitchener <bruce@cubik.org>
433 * linuxthreads.texi: Add documentation for pthreads attributes
434 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
435 patch. Document pthread_[sg]etconcurrency(). Mark
436 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
438 2000-11-07 Ulrich Drepper <drepper@redhat.com>
440 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
442 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
443 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
445 2000-11-06 Ulrich Drepper <drepper@redhat.com>
447 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
448 not doing it right now.
449 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
451 2000-10-30 Ulrich Drepper <drepper@redhat.com>
453 * Examples/ex4.c (main): Don't use exit() to avoid warning with
456 2000-10-29 Ulrich Drepper <drepper@redhat.com>
458 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
459 here. Reported by Bruce Mitchener <bruce@cubik.org>.
461 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
462 discussing mutexes. (As per the Unix98 name for the API.)
463 Changes documentation for pthread_mutexattr_setkind_np() and
464 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
465 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
466 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
467 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
468 Begins to introduce discussion of the ``timed'' mutex type. This
469 discussion is currently incomplete.
470 Patch by Bruce Mitchener <bruce@cubik.org>.
472 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
473 Yutaka Niibe <gniibe@chroot.org>
475 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
476 has restrictions, use register.
478 2000-10-23 Andreas Schwab <schwab@suse.de>
480 * Examples/ex14.c (TIMEOUT): Override default timeout.
482 2000-10-16 Ulrich Drepper <drepper@redhat.com>
484 * specific.c: Protect tsd array modification in thread data
485 structures by getting the thread lock in pthread_key_delete and
486 __pthread_destroy_specifics.
487 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
489 2000-10-12 Alan Modra <alan@linuxcare.com.au>
491 * sysdeps/pthread/bits/initspin.h: New file.
492 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
493 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
494 (__pthread_alt_init_lock): Likewise.
495 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
497 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
499 * oldsemaphore.c (__old_sem_init): Release lock with
500 LT_SPINLOCK_INIT, not zero.
501 * spinlock.c (__pthread_unlock): Likewise.
502 (__pthread_alt_lock): Likewise.
503 (__pthread_alt_timedlock): Likewise.
504 (__pthread_alt_unlock): Likewise.
505 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
506 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
507 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
508 LT_SPINLOCK_INIT do initialize spinlocks not 0.
510 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
512 * shlib-versions: Add version definitions for hppa-linux.
514 2000-10-12 Alan Modra <alan@linuxcare.com.au>
516 * sysdeps/hppa/pspinlock.c: New file.
517 * sysdeps/hppa/pt-machine.h: New file.
518 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
520 2000-10-05 Jakub Jelinek <jakub@redhat.com>
522 * mutex.c (__pthread_mutex_destroy): Correct test of
523 busy mutex for mutexes using alternate fastlocks.
524 Patch by dtc@cmucl.cons.org.
526 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
528 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
530 2000-09-28 Ulrich Drepper <drepper@redhat.com>
532 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
533 test for owner first.
534 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
536 * cancel.c (pthread_cancel): Don't do anything if cancelation is
539 2000-09-26 Ulrich Drepper <drepper@redhat.com>
541 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
542 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
544 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
545 _POSIX_MONOTONIC_CLOCK.
547 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
550 2000-09-20 Andreas Jaeger <aj@suse.de>
552 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
553 "testrtsig.h" conditional.
555 2000-09-11 Ulrich Drepper <drepper@redhat.com>
557 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
558 pthread_attr_setstack.
559 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
560 pthread_attr_setstack.
561 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
563 2000-09-05 Ulrich Drepper <drepper@redhat.com>
565 * Examples/ex14.c: New file.
566 * Makefile (tests): Add ex14.
568 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
569 mutex. Patch by dtc@cmucl.cons.org.
571 * ecmutex.c: New file.
572 * Makefile (tests): Add ecmutex.
574 2000-09-04 H.J. Lu <hjl@gnu.org>
576 * attr.c (__pthread_attr_setguardsize): Use page_roundup
577 instead of roundup to round up to the page size.
579 2000-09-03 Mark Kettenis <kettenis@gnu.org>
581 * manager.c (pthread_exited): Correctly report event as TD_REAP
582 instead of TD_DEATH. Fix comments.
584 2000-09-03 Ulrich Drepper <drepper@redhat.com>
586 * spinlock.h (testandset): Add cast to avoid warning.
587 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
589 2000-09-02 Andreas Jaeger <aj@suse.de>
591 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
594 2000-09-01 Ulrich Drepper <drepper@redhat.com>
596 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
597 Fix typo in last patch (_mode -> _flags).
599 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
600 Provide definition which respects _IO_USER_LOCK flag.
602 2000-08-30 Ulrich Drepper <drepper@redhat.com>
604 * manager.c (pthread_allocate_stack): Clear descriptor only if not
607 2000-08-25 Ulrich Drepper <drepper@redhat.com>
609 * Makefile: Add rules to build and run unload.
610 * unload.c: New file.
612 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
614 * sysdeps/pthread/pthread.h
615 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
616 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
618 2000-08-24 Andreas Jaeger <aj@suse.de>
620 * Examples/ex13.c: Include <string.h> for strerror prototype and
621 <stdlib.h> for abort prototype.
622 (pthr_cond_signal_mutex): Rewrite to silence GCC.
623 (thread_start): Remove unused variable err.
624 (main): Silence GCC warnings.
626 2000-08-22 Andreas Jaeger <aj@suse.de>
628 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
630 * Makefile (tests): Add ex13.
632 2000-08-20 Ulrich Drepper <drepper@redhat.com>
634 * semaphore.h: Add restrict where required by AGd4.
635 * sysdeps/pthread/pthread.h: Likewise.
636 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
638 2000-08-15 Ulrich Drepper <drepper@redhat.com>
640 * Makefile (tests): Add ex12. Add rule to build it.
641 * Examples/ex12.c: New file.
643 2000-08-13 Ulrich Drepper <drepper@redhat.com>
645 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
646 even though the implementation is not quite complete (but it reports
647 it). Define _POSIX_MESSAGE_PASSING to -1.
648 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
650 2000-08-12 Andreas Jaeger <aj@suse.de>
652 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
654 (__compare_and_swap): Likewise.
655 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
657 2000-08-10 Ulrich Drepper <drepper@redhat.com>
659 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
660 p_h_errnop correctly and not to NULL.
662 2000-08-05 Ulrich Drepper <drepper@redhat.com>
664 * Banner: Bump version number to 0.9.
666 2000-08-04 Ulrich Drepper <drepper@redhat.com>
668 * Makefile (tests): Add tststack. Add rule to build the program.
669 * tststack.c: New file.
671 * internals.h: Declare __pthread_max_stacksize.
672 * pthread.c (__pthread_max_stacksize): New variable.
673 (__pthread_initialize_manager): Determine __pthread_initialize_manager
675 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
676 (pthread_allocate_stack): Allow kernel to choose stack address if
677 FLOATING_STACKS. This also handles variable-sized stacks.
678 Always allocate stack and guardpage together. Use mprotect to
679 change guardpage access.
680 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
683 * attr.c (__pthread_attr_setstacksize): Also test value against
686 * manager.c (__pthread_nonstandard_stacks): Define only if
687 THREAD_SELF is not defined.
688 (pthread_allocate_stack): Always initialize gardaddr to a correct
690 (pthread_handle_create): Unmap thread with one call.
691 (pthread_free): Remove test for initial thread before removing stack.
692 Unmap stack with one call.
694 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
695 1 to avoid removing the stack.
697 2000-07-27 Jes Sorensen <jes@linuxcare.com>
699 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
700 load of spin lock to prime the cache before the atomic compare and
701 exchange operation (cmpxchg4). This avoids the spinning on the
702 cmpxchg4 instruction and reduces movement of the cache line back
703 and forth between the processors (explanation by Asis K. Mallick
704 from Intel). This basically makes the implementation operate the
705 same as the Linux kernel implementation.
707 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
708 * sysdeps/ia64/pspinlock.c: New file.
710 2000-08-03 Ulrich Drepper <drepper@redhat.com>
712 * pthread.c: Move definition of __pthread_set_own_extricate_if...
713 * spinlock.h: ...here. Remove locking.
714 * internals.h: Remove __pthread_set_own_extricate_if prototype.
716 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
717 (rwlock_rd_extricate_func): Don't determine self, let
718 __pthread_lock do it.
719 (rwlock_wr_extricate_func): Likewise.
720 (rwlock_have_already): Optimize *pself handling a bit.
722 * mutex.c: Use __builtin_expect.
723 * pthread.c: Likewise.
725 2000-08-02 Andreas Jaeger <aj@suse.de>
727 * sysdeps/s390/pspinlock.c: New file.
728 * sysdeps/s390/pt-machine.h: New file.
729 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
731 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
733 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
735 * sysdeps/mips/pt-machine.h (testandset): Likewise.
737 2000-07-26 Andreas Jaeger <aj@suse.de>
739 * pthread.c: Initialize p_sem_avail.
741 2000-07-25 Ulrich Drepper <drepper@redhat.com>
743 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
744 * semaphore.c: Handle spurious wakeups.
746 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
747 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
749 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
750 (__pthread_wait_for_restart): Likewise.
752 * condvar.c (pthread_cond_wait): Also check whether thread is
753 cancelable before aborting loop.
754 (pthread_cond_timedwait): Likewise.
756 * signals.c (pthread_sighandler): Remove special code to restrore
758 (pthread_sighandler_t): Likewise.
760 2000-07-25 Mark Kettenis <kettenis@gnu.org>
762 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
763 * pthread.c: Include <resolv.h>.
764 (_res): Undefine. Add extern declaration.
766 2000-07-24 Ulrich Drepper <drepper@redhat.com>
768 * pthread.c (__pthread_initial_thread): Update initializer.
769 (__pthread_manager_thread): Likewise.
770 (pthread_initialize): Move setrlimit call to...
771 (__pthread_initialize_manager): ...here.
772 (__pthread_reset_main_thread): Reset also soft limit on stack size.
774 * condvar.c: Handle spurious wakeups. [PR libc/1749].
775 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
777 2000-07-21 Ulrich Drepper <drepper@redhat.com>
779 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
780 __compare_and_swap to define testandset.
781 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
782 Define IMPLEMENT_TAS_WITH_CAS.
784 2000-07-20 Ulrich Drepper <drepper@redhat.com>
786 * Makefile: Pass -z nodelete to linker for libpthread.so
787 generation if it understand this option.
789 2000-07-18 Mark Kettenis <kettenis@gnu.org>
791 * manager.c (pthread_handle_create): Remove initialization of
792 new_thread->p_res._sock.
794 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
796 Bugfixes to the variant of the code for machines with no compare
799 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
800 node was not being properly enqueued, due to failing to update
801 the lock->__status field.
803 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
804 being set inappropriately, causing the suspend function to be called
805 with a null self pointer and crash.
807 2000-07-18 Ulrich Drepper <drepper@redhat.com>
809 * spinlock.h (__pthread_alt_trylock): Fix code used if no
810 compare&swap is available.
812 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
815 * pthread.c (pthread_initialize): Don't use sysconf to determine
816 whether the machine has more than one processor.
818 * spinlock.c (__pthread_alt_timedlock): Add back one of the
819 removed thread_self calls.
821 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
823 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
824 __compare_and_swap to compare_and_swap in code which assumes
825 compare swap is available.
827 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
829 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
830 bug whereby thr field of waitnode structure would not be correctly
831 set unless a null self pointer is passed to the functions.
832 Eliminated redundant calls to thread_self().
834 2000-07-18 Jakub Jelinek <jakub@redhat.com>
836 * pthread.c (__pthread_initialize_manager): Lock
837 __pthread_manager_thread.p_lock before calling clone.
839 2000-05-05 H.J. Lu <hjl@gnu.org>
841 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
842 have acquire semantics.
843 (__compare_and_swap_with_release_semantics): New inline
845 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
847 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
849 * manager.c: Fix the problem with signals at startup.
850 Change the way that thread stacks are allocated on IA64.
851 Clean up some of the guard page allocation stuff.
853 1999-12-19 H.J. Lu <hjl@gnu.org>
855 * internals.h (page_roundup): New.
856 * attr.c (__pthread_attr_setguardsize); Use page_roundup
858 * manager.c (pthread_allocate_stack): Make sure guardaddr is
859 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
862 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
864 * manager.c (pthread_allocate_stack): Unmap the stack top
865 if failed to map the stack bottom.
867 (pthread_free): Fix the guard page.
869 * pthread.c (pthread_initialize): Set rlimit correctly for
870 NEED_SEPARATE_REGISTER_STACK.
872 1999-12-16 H.J. Lu <hjl@gnu.org>
874 * pthread.c (__pthread_initialize_manager): Pass
875 __pthread_manager_thread_bos instead of
876 __pthread_manager_thread_tos to __clone2.
878 1999-12-16 H.J. Lu <hjl@gnu.org>
880 * manager.c (pthread_allocate_stack): Correct the calculation
881 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
884 1999-12-13 H.J. Lu <hjl@gnu.org>
886 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
887 bit after setting ar.ccv.
889 1999-12-12 H.J. Lu <hjl@gnu.org>
891 * manager.c (pthread_allocate_stack): Make the starting
892 address of the stack bottom page aligned. FIXME: it may
893 need changes in other places.
894 (pthread_handle_create): Likewise.
896 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
898 * manager.c (pthread_allocate_stack): Handle
899 NEED_SEPARATE_REGISTER_STACK.
900 (pthread_handle_create): Likewise.
901 * pthread.c (__pthread_initialize_manager): Likewise.
903 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
905 1999-12-02 H.J. Lu <hjl@gnu.org>
907 * sysdeps/ia64/pt-machine.h: New.
909 2000-07-13 Ulrich Drepper <drepper@redhat.com>
911 * wrapsyscall.c: Mark non-__ protected names as weak.
914 2000-07-12 Bruno Haible <haible@clisp.cons.org>
916 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
918 2000-07-12 Ulrich Drepper <drepper@redhat.com>
920 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
921 Add tests also to new alternative spinlock implementation.
922 * spinlock.h: Likewise.
923 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
925 2000-07-06 Ulrich Drepper <drepper@redhat.com>
927 * Version: Export __sigaction.
928 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
930 * pthread.c: Use __libc_sigaction instead of __sigaction.
932 * condvar.c: Implement pthread_condattr_getpshared and
933 pthread_condattr_setpshared.
934 * mutex.c: Implement pthread_mutexattr_getpshared and
935 pthread_mutexattr_setpshared.
936 * Versions: Export new functions.
937 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
939 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
940 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
943 2000-07-04 Greg McGary <greg@mcgary.org>
945 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
946 pragmas. Include bp-sym.h only if _LIBC.
948 2000-07-04 Ulrich Drepper <drepper@redhat.com>
950 * spinlock.c (__pthread_unlock): Properly place write barrier.
951 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
953 2000-07-03 Ulrich Drepper <drepper@redhat.com>
955 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
956 faster on SMP systems. No more emulation of compare&swap for adaptive
958 * spinlock.h: Likewise.
959 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
960 Replace fast with adaptive mutex.
961 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
962 * condvar.c: Likewise.
963 * pthread.c: Define and initialize __pthread_smp_kernel variable.
964 * internals.h: Declare __pthread_smp_kernel.
965 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
966 _pthread_fastlock structure.
967 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
969 * pthread.c: Remove initialization to zero from global variables.
971 2000-06-29 Jakub Jelinek <jakub@redhat.com>
973 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
975 2000-06-28 Greg McGary <greg@mcgary.org>
977 * weaks.c: Wrap BP_SYM () around weak extern declarations of
978 pthread functions that have pointers in their return+arg signatures.
980 2000-06-27 Greg McGary <greg@mcgary.org>
982 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
983 extern declarations of pthread functions that have pointers in
984 their return+arg signatures.
986 2000-06-26 Ulrich Drepper <drepper@redhat.com>
988 * Makefile (tests): Add ex11. Add rules to build it.
989 * Examples/ex11.c: New file.
990 * rwlock.c: Fix complete braindamaged previous try to implement
993 * spinlock.c: Pretty print.
995 2000-06-25 Ulrich Drepper <drepper@redhat.com>
997 * Makefile (tests): Add ex10. Add rules to build it.
998 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
999 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1000 * condvar.c (pthread_cond_wait): Allow mutex of kind
1001 PTHREAD_MUTEX_TIMED_NP.
1002 (pthread_cond_timedwait_relative): Likewise.
1003 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1004 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1005 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1006 (__pthread_mutex_lock): Use __pthread_alt_lock for
1007 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1008 (__pthread_mutex_timedlock): New function.
1009 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1010 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1011 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1012 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1013 * spinlock.c: Implement alternate fastlocks.
1014 * spinlock.h: Add prototypes.
1015 * Examples/ex10.c: New file.
1016 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1017 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1019 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1020 (__pthread_rwlock_timedrdlock): New function.
1021 (__pthread_rwlock_timedwrlock): New function.
1022 Use laternate fastlock function everywhere.
1024 2000-06-21 Andreas Jaeger <aj@suse.de>
1026 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1029 * join.c: Include <stdlib.h> for exit prototype.
1031 2000-06-20 Ulrich Drepper <drepper@redhat.com>
1033 * sysdeps/i386/useldt.h: Include <stdlib.h>.
1035 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1036 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1038 * Makefile (libpthread-routines): Add barrier.
1039 (tests): Add ex9. Add rule to build ex9.
1040 * Versions: Export barrier functions.
1041 * barrier.c: New file.
1042 * Examples/ex9.c: New file.
1043 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1044 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1045 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1047 2000-06-19 H.J. Lu <hjl@gnu.org>
1049 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1050 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1051 (compare_and_swap_with_release_semantics): New. Default to
1052 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1055 * spinlock.c (__pthread_unlock): Call
1056 compare_and_swap_with_release_semantics () instead of
1057 compare_and_swap ().
1059 2000-06-19 Ulrich Drepper <drepper@redhat.com>
1061 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1063 * sysdeps/pthread/timer_delete.c: Likewise.
1064 * sysdeps/pthread/timer_getoverr.c: Likewise.
1065 * sysdeps/pthread/timer_gettime.c: Likewise.
1066 * sysdeps/pthread/timer_settime.c: Likewise.
1068 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1070 Timer nodes are now reference counted, and can be marked
1071 as deleted. This allows for the safe release of the global mutex
1072 in the middle without losing the timer being operated on.
1074 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1075 member is now an enum with three values, so that an intermediate
1076 state can be represented (deleted but not free for reuse yet).
1077 New refcount member added.
1078 * sysdeps/pthread/timer_routines.c: Likewise.
1080 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1081 timer_valid): New inline functions added.
1083 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1084 restructured, recursive deadlock bug fixed.
1086 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1087 timer_addref to ensure that timer won't be deleted while mutex is not
1088 held. Also uses timer_invalid to perform validation of timer handle.
1089 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1090 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1092 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1094 * shlib-versions: Add entry for SH.
1095 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1097 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1099 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1100 tightened up some critical regions and micro-optimized some list
1103 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1104 Returns int value now to indicate whether timer was queued at head.
1105 * sysdeps/pthread/posix-timer.h: Likewise.
1106 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1107 new return value from __timer_thread_queue_timer to avoid waking
1108 up timer thread unnecessarily.
1110 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1111 inuse flag, because this requires mutex to be held. Callers updated
1112 to do the check when they have the mutex.
1113 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1115 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1116 regions: avoids making system calls while holding timer mutex, and
1117 a few computations were moved outside of the mutex as well.
1118 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1120 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1121 to list_unlink_ip, meaning idempotent. Pointer manipulation
1122 changed to get better better code out of gcc.
1123 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1124 version of list_unlink added here.
1125 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1126 function in all places: idempotent one for timers, non-idempotent
1127 one for thread nodes.
1128 * sysdeps/pthread/timer_settime: Likewise.
1129 * sysdeps/pthread/timer_routines.c: Likewise.
1131 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1133 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1134 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1136 * sysdeps/pthread/Makefile: Remove tests definition.
1138 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1139 Yutaka Niibe <gniibe@chroot.org>
1141 * sysdeps/sh/pspinlock.c: New file.
1142 * sysdeps/sh/pt-machine.h: New file.
1144 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1146 * Makefile (tests): Add joinrace.
1148 * Examples/ex6.c: Test return value of pthread_join.
1150 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1152 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1153 (__pthread_spin_trylock): Implement.
1154 (__pthread_spin_unlock): Implement.
1155 (__pthread_spin_init): Implement.
1156 (__pthread_spin_destroy): Implement.
1158 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1160 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1161 really append the entry.
1163 2000-06-10 Andreas Jaeger <aj@suse.de>
1165 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1167 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1169 * sysdeps/pthread/timer_create.c: Thread matching now done on
1170 clock type as well as thread attributes.
1171 There are individual global signal-delivering threads for
1172 different clock types.
1173 * sysdeps/pthread/posix-timer.h: Likewise.
1174 * sysdeps/pthread/timer_routines.c: Likewise.
1176 * sysdeps/pthread/timer_routines.c: Thread allocation and
1177 deallocation function now remembers to put thread on active
1178 list and remove from active list.
1179 Thus now the feature of binding multiple timers
1180 to a single thread actually works.
1182 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1184 * pthread.c (__pthread_create_2_1): Optimize a bit.
1186 * internals.h (invalid_handle): Also test for p_terminated != 0.
1187 (nonexisting_handle): New function. Same as old invalid_handle.
1188 * join.c (pthread_join): Use nonexisting_handle instead of
1189 invalid_handle to test for acceptable thread handle.
1190 * manager.c (pthread_handle_free): Likewise.
1191 * joinrace.c: New file.
1192 Reported by Permaine Cheung <pcheung@cygnus.com>.
1194 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1196 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1197 Correct handling of matching variable.
1199 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1202 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1203 Be prepared for empty timer list.
1205 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1206 CPUTIME clock ID. Add support for thread clocks.
1208 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1209 subtraction were switched.
1211 * sysdeps/pthread/timer_routines.c (init_module): Use
1212 THREAD_MAXNODES threads.
1214 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1215 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1216 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1217 with sigqueueinfo is this system call is available.
1219 * sysdeps/pthread/timer_create.c (timer_create): Allow
1220 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1222 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1224 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1226 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1228 * sysdeps/pthread/posix-timer.h: New file.
1229 * sysdeps/pthread/timer_create.c: New file.
1230 * sysdeps/pthread/timer_delete.c: New file.
1231 * sysdeps/pthread/timer_getoverr.c: New file.
1232 * sysdeps/pthread/timer_gettime.c: New file.
1233 * sysdeps/pthread/timer_routines.c: New file.
1234 * sysdeps/pthread/timer_settime.c: New file.
1235 * sysdeps/pthread/tst-timer.c: New file.
1237 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1239 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1240 LINK_MAX definitions if necessary.
1242 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1244 Added missing fork time handling of global libio lock.
1246 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1247 not just the individual stream locks. Rewritten to use new
1248 iterator interface provided by libio rather than accessing
1251 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1252 which lock and unlock the stream list using the new interface
1254 * internals.h: Likewise.
1256 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1257 and __funlockfilelist in the parent after the fork.
1258 Child still calls __fresetlockfiles as before.
1260 * linuxthreads.texi: Now explains what happens to streams at
1261 fork time. Also whole new section on forking and thread added.
1262 Definition of pthread_atfork moved out of Miscellaneous Functions
1263 to this new section.
1265 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1267 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1268 Add missing register.
1269 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1271 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1273 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1274 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1275 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1277 2000-05-31 Andreas Jaeger <aj@suse.de>
1279 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1281 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1283 * spinlock.c (__pthread_lock): Remove ASSERT.
1285 * Makefile (tests): Add ex8.
1286 * Examples/ex8.c: New file.
1288 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1290 Bugfix: The pthread_atfork mechanism now takes care of its
1291 own internal mutex at fork time.
1293 * ptfork.c (__fork): Revised so that the mutex is held across
1294 the fork operation and while the handlers are called, and so that
1295 the child resets the mutex.
1297 * linuxthreads.texi: Updated pthread_atfork documentation to make
1298 it clear that fork and pthread_atfork can't be reentered from
1299 atfork handlers, that pthread_atfork and fork are mutually atomic,
1300 and that the handlers are inherited by the child process.
1302 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1304 * Makefile (libpthread-routines): Add pspinlock.
1305 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1306 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1307 * condvar.c: Likewise.
1308 * internals.h: Likewise.
1310 * manager.c: Likewise.
1311 * mutex.c: Likewise.
1312 * pthread.c: Likewise.
1313 * rwlock.c: Likewise.
1314 * semaphore.c: Likewise.
1315 * signals.c: Likewise.
1316 * spinlock.h: Likewise.
1317 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1318 * sysdeps/alpha/pspinlock.c: New file.
1319 * sysdeps/arm/pspinlock.c: New file.
1320 * sysdeps/i386/pspinlock.c: New file.
1321 * sysdeps/m68k/pspinlock.c: New file.
1322 * sysdeps/mips/pspinlock.c: New file.
1323 * sysdeps/powerpc/pspinlock.c: New file.
1324 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1325 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1326 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1327 back to _pthread_fastlock. Define new pthread_spinlock_t.
1329 2000-05-24 Andreas Jaeger <aj@suse.de>
1331 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1333 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1335 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1337 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1339 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1341 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1343 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1344 object state is represented with additional bits which distinguish
1345 whether that state was set up in the current process, or
1346 in an ancestor process. If that state was set in an ancestor,
1347 it means that a fork happened while thread was executing the init
1348 function. In that case, the state is reset to NEVER.
1349 * mutex.c (__pthread_once_fork_prepare): New function.
1350 (__pthread_once_fork_child): Likewise
1351 (__pthread_once_fork_parent): Likewise
1352 (__pthread_reset_pthread_once): Removed.
1353 * ptfork.c (__fork): Call new handlers in mutex.c.
1354 * internals.h: Declarations of new mutex.c functions added.
1355 Declaration of removed function deleted.
1356 * linuxthreads.texi: Updated documentation about pthread_once
1357 to clarify what happens under cancellation and forking.
1359 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1361 * internals.h: New thread manager request type, REQ_KICK.
1362 * join.c (pthread_exit): main thread now calls exit() instead
1363 of _exit() in order to proper process cleanup.
1364 * manager.c (__pthread_manager): Do not terminate manager
1365 after unblocking main thread; wait for main thread's
1366 REQ_PROCESS_EXIT request instead.
1367 Also, added REQ_KICK case to handle new request; this just does
1369 * manager.c (pthread_exited): Do not terminate manager after
1370 unblocking main thread.
1371 * manager.c (__pthread_manager_sighandler): If the main thread
1372 is waiting for all other threads to die, send a REQ_KICK into
1373 the thread manager request pipe to get it to clean out the threads
1374 and unblock the main thread as soon as possible. This fixes
1375 the 2000 millisecond hang on shutdown bug.
1376 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1377 including the main one call pthread_exit(), or implicitly do so.
1378 * Makefile (tests): Add ex7.
1380 2000-05-05 Andreas Jaeger <aj@suse.de>
1382 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1383 (pthread_getcpuclockid): Correct test for ourselves.
1385 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1387 * internals.h (struct _pthread_descr_struct): Reorganization.
1388 Allocate room for 16 pointers at head of the structure for future
1389 thread-local data handling. Move p_self member in this area.
1390 * manager.c (pthread_handle_create): Adjust use of p_self.
1391 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1392 * pthread.c (__pthread_initial_thread): Adjust initialization.
1393 (__pthread_manager_thread): Likewise.
1395 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1397 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1398 for eventmask larger than 1 word.
1400 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1402 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1403 * pthread.c (__pthread_initialize_minimal): New function. Perform
1404 minimal initialization.
1405 (pthread_initialize): Remove this code here.
1406 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1407 are working around the problem in glibc.
1409 2000-04-25 Ulrich Drepper <drepper@redhat.com>
1411 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1412 now. First gcc must be fixed (more concrete: libgcc).
1414 2000-04-24 Ulrich Drepper <drepper@redhat.com>
1416 * pthread.c: Remove special treatement for interrupt handlers on x86.
1417 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1418 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1420 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1422 2000-04-24 Mark Kettenis <kettenis@gnu.org>
1424 * join.c (pthread_exit): Set p_terminated after reporting the
1425 termination event instead of before.
1427 2000-04-20 Jakub Jelinek <jakub@redhat.com>
1429 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1432 2000-04-18 Andreas Jaeger <aj@suse.de>
1434 * Versions: Use ld instead of ld.so.
1436 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1438 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1439 Remove the typedef keyword.
1441 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1443 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1445 (READ_MEMORY_BARRIER): Define.
1446 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1448 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1451 2000-04-17 Ulrich Drepper <drepper@redhat.com>
1453 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1454 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1455 use thread_handle().
1457 2000-04-16 Ulrich Drepper <drepper@redhat.com>
1459 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1460 if fast mutex is used. Don't initialize `already_canceled' twice.
1461 Correctly test for return value of timedsuspend.
1463 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
1464 therefore don't need the _rt versions of the signal handlers.
1466 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1468 * pthread.c (pthread_yield): New function.
1469 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1470 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1471 * internals.h: Declare __pthread_yield.
1473 * pthread.c (pthread_initialize): Avoid a bit more code if
1474 realtime signals are known to exist.
1476 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1477 to dynamically detect RT signals and avoid generating compatibility
1478 functions with old kernel.
1479 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1480 __pthread_restart_new directly.
1481 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1482 __pthread_wait_for_restart_signal directly.
1483 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1484 __pthread_timedsuspend_new directly.
1486 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1488 * condvar.c: Remove all the special code to handle cond_timedwait.
1489 Use timedsuspend instead.
1490 * internals.h: Declare __pthread_timedsuspend_old,
1491 __pthread_timedsuspend_new, and __pthread_timedsuspend.
1492 Remove declaration of __pthread_init_condvar.
1493 * pthread.c: Define __pthread_timedsuspend variable.
1494 (__pthread_timedsuspend_old): New function. Timed suspension
1495 implementation for old Linux kernels.
1496 (__pthread_timedsuspend_new): New function. Timed suspension
1497 implementation for new Linux kernels.
1498 * restart.h (timedsuspend): New function. Call appropriate
1499 suspension function through __pthread_timedsuspend.
1500 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1502 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1504 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1506 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1508 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1509 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1511 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1512 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1514 2000-04-14 Andreas Jaeger <aj@suse.de>
1516 * weaks.c: Fix typo.
1518 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1519 2.2 for linuxthreads.
1521 2000-04-13 Ulrich Drepper <drepper@redhat.com>
1523 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1524 (pthread_getcpuclockid): Fix typo.
1526 2000-04-12 Ulrich Drepper <drepper@redhat.com>
1528 * Makefile (libpthread-routines): Add getcpuclockid.
1529 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1530 * sysdeps/pthread/getcpuclockid.c: New file.
1531 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1532 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1534 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1536 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1538 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1539 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1540 and pthread_spin_unlock.
1541 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1542 into pthread_spinlock_t. Change all uses.
1543 * spinlock.c: Implement pthread_spin_lock.
1544 Rename __pthread_unlock to __pthread_spin_unlock and define weak
1545 alias for real name.
1546 Define pthread_spin_trylock, pthread_spin_init, and
1547 pthread_spin_destroy.
1548 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1549 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1550 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1551 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1552 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1553 and pthread_spin_unlock.
1554 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1555 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1556 * condvar.c: Likewise.
1557 * internals.h: Likewise.
1559 * manager.c: Likewise.
1560 * mutex.c: Likewise.
1561 * pthread.c: Likewise.
1562 * rwlock.c: Likewise.
1563 * semaphore.c: Likewise.
1564 * signals.c: Likewise.
1566 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1568 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1570 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1572 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1573 _POSIX_SHARED_MEMORY_OBJECTS.
1575 2000-04-11 Andreas Jaeger <aj@suse.de>
1577 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1578 (__compare_and_swap): Mark as modifying memory.
1580 2000-04-11 Geoff Keating <geoffk@cygnus.com>
1582 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1584 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1585 Don't have the 'asm' __volatile__.
1587 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1589 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1590 * spinlock.c (__pthread_lock): Add memory barriers.
1591 (__pthread_unlock): Likewise.
1592 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1594 (RELEASE): Not needed anymore.
1595 (__compare_and_swap): Mark asm as modifying memory.
1596 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
1598 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1599 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1600 (MEMORY_BARRIER): Define using stbar.
1601 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1603 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1604 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1605 Mike Burrows <m3b@pa.dec.com>.
1607 2000-04-09 Ulrich Drepper <drepper@redhat.com>
1609 * signals.c (sigaction): Fix return value for the case SIG is one
1610 of the signals the implementation uses.
1611 Patch by Xavier.Leroy@inria.fr.
1613 2000-04-01 Andreas Jaeger <aj@suse.de>
1615 * attr.c: Use shlib-compat macros.
1616 * oldsemaphore.c: Likewise.
1617 * pthread.c: Likewise.
1618 * weaks.c: Likewise.
1620 2000-03-26 Ulrich Drepper <drepper@redhat.com>
1622 * semaphore.c (sem_timedwait): New function.
1623 Patch by Carl Mailloux <carlm@oricom.ca>.
1624 * semaphore.h: Declare sem_timedwait.
1625 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1627 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
1629 * sysdeps/pthread/Makefile: File removed.
1631 2000-03-23 Ulrich Drepper <drepper@redhat.com>
1633 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1634 * internals.h (__pthread_reset_pthread_once): Add prototype.
1635 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1637 * manager.c (pthread_handle_create): Store ID of new thread before
1640 2000-03-21 Ulrich Drepper <drepper@redhat.com>
1642 * attr.c: Use new macros from shlib-compat.h to define versions.
1643 * oldsemaphore.c: Likewise.
1644 * semaphore.c: Likewise.
1645 * weaks.c: Likewise.
1647 * pthread.c: Update for new SHLIB_COMPAT definition.
1649 * manager.c (__pthread_manager): Unmask debug signal.
1651 * pthread.c (pthread_initialize): Test for address of __dso_handle
1652 being NULL, not value. Use __on_exit, not on_exit.
1653 Patch by Andreas Jaeger <aj@suse.de>.
1655 * pthread.c: Use new macros from shlib-compat.h to define versions.
1657 2000-03-19 Ulrich Drepper <drepper@redhat.com>
1659 * pthread.c (pthread_initialize): Instead of on_exit use
1660 __cxa_atexit if __dso_label is available to allow unloading the
1661 libpthread shared library.
1663 2000-03-16 Ulrich Drepper <drepper@redhat.com>
1665 * condvar.c: Make tests for ownership of mutex less strict.
1667 2000-03-14 Ulrich Drepper <drepper@redhat.com>
1669 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1670 current thread and return error if not.
1671 (pthread_cond_timedwait_relative_old): Likewise.
1672 (pthread_cond_timedwait_relative_new): Likewise.
1674 * mutex.c (__pthread_once): Handle cancelled init function correctly.
1675 (pthread_once_cancelhandler): New function.
1676 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1678 2000-03-14 Andreas Jaeger <aj@suse.de>
1680 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1682 (pthread_handle_sigrestart_rt): Likewise.
1683 * signals.c (pthread_sighandler_rt): Likewise.
1685 2000-03-02 Andreas Jaeger <aj@suse.de>
1687 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1688 Reported by Sean Chen <sean.chen@turbolinux.com>.
1690 2000-02-28 Andreas Jaeger <aj@suse.de>
1692 * rwlock.c: Fix typo.
1694 2000-02-27 Ulrich Drepper <drepper@redhat.com>
1696 * rwlock.c: Define __* variants of the functions and make old names
1698 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1699 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1701 2000-02-25 Andreas Jaeger <aj@suse.de>
1703 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1704 pwrite64, lseek64, open64, and __open64 with version 2.2.
1706 2000-02-22 Ulrich Drepper <drepper@redhat.com>
1708 * semaphore.h (SEM_FAILED): Use 0 not NULL.
1710 2000-02-14 Ulrich Drepper <drepper@redhat.com>
1712 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1713 nanosleep does not work either. Get absolute time inside the
1715 (pthread_cond_timedwait_relative_new): Likewise.
1716 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1718 2000-02-13 Andreas Jaeger <aj@suse.de>
1720 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1721 (pthread_cond_timedwait_relative_old): Likewise.
1723 2000-02-13 Ulrich Drepper <drepper@redhat.com>
1725 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1726 but keep the code around. A bug in the kernel prevent us from
1728 (pthread_cond_timedwait_relative_new): Likewise.
1729 (PR libc/1597 and libc/1598).
1731 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
1733 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1734 loop around nanosleep calls instead of around most of the function
1735 (pthread_cond_timedwait_relative_new): Likewise.
1736 body. Got rid of backwards goto and one local.
1738 2000-01-31 Ulrich Drepper <drepper@redhat.com>
1740 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1741 before every nanosleep call to account for time spent in the rest
1743 (pthread_cond_timedwait_relative_new): Likewise.
1744 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1746 2000-01-29 Ulrich Drepper <drepper@redhat.com>
1748 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1749 from nanosleep call so that in case we restart we only wait for the
1751 (pthread_cond_timedwait_relative_new): Likewise.
1752 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1754 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
1756 * manager.c (pthread_allocate_stack): Compute guard page address
1757 correctly. Patch by HJ Lu.
1759 * sysdeps/pthread/pthread.h: Define
1760 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1762 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
1764 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1765 preference handling.
1766 (pthread_rwlockattr_setkind_np): Allow
1767 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1768 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1770 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
1772 * internals.h (pthread_readlock_info): New structure.
1773 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1774 p_untracked_readlock_count.
1775 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1776 Add initializers for new fields.
1777 * manager.c (pthread_free): Free read/write lock lists.
1778 * queue.h (queue_is_empty): New function.
1779 * rwlock.c: Implement requirements about when readers should get
1781 * sysdeps/pthread/pthread.h
1782 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1783 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1784 Define this name as well.
1785 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1787 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
1789 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1790 Adjust initializers for struct _pthread_descr_struct change.
1791 * internals.h (struct _pthread_descr_struct): Move new elements to
1794 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
1796 Redesigned how cancellation unblocks a thread from internal
1797 cancellation points (sem_wait, pthread_join,
1798 pthread_cond_{wait,timedwait}).
1799 Cancellation won't eat a signal in any of these functions
1800 (*required* by POSIX and Single Unix Spec!).
1801 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1802 simultaneous condition variable signal (not required by POSIX
1803 or Single Unix Spec, but nice).
1804 * spinlock.c: __pthread_lock queues back any received restarts
1805 that don't belong to it instead of assuming ownership of lock
1806 upon any restart; fastlock can no longer be acquired by two threads
1808 * restart.h: Restarts queue even on kernels that don't have
1809 queued real time signals (2.0, early 2.1), thanks to atomic counter,
1810 avoiding a rare race condition in pthread_cond_timedwait.
1812 1999-12-31 Andreas Jaeger <aj@suse.de>
1814 * internals.h: Remove duplicate prototype declarations.
1816 * weaks.c: Remove __THROW from prototypes since the file is not
1817 compiled by a C++ compiler.
1818 * internals.h: Likewise.
1820 1999-12-30 Andreas Jaeger <aj@suse.de>
1822 * sysdeps/pthread/pthread.h: Move internal functions to...
1823 * sysdeps/pthread/bits/libc-lock.h: ...here.
1825 1999-12-29 Andreas Jaeger <aj@suse.de>
1827 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1829 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
1831 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1834 * manager.c (__pthread_start): Add one more cast to prevent
1835 warning on 64bit machines.
1837 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
1839 * manager.c (pthread_handle_create): Set p_pid of new thread
1840 before calling the callback function to report a new thread.
1842 1999-12-20 Andreas Jaeger <aj@suse.de>
1844 * pthread.c (pthread_initialize): Move getrlimit call after
1847 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
1849 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1850 pwrite64, lseek64, open64, and __open64.
1851 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1852 pwrite64, lseek64, open64, and __open64.
1854 * manager.c (pthread_allocate_stack): Correct computation of
1855 new_thread_bottom. Correct handling of stack size and when the
1856 rlimit method to guard for stack growth is used.
1857 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1858 minus one pagesize (not two).
1860 1999-12-03 Andreas Jaeger <aj@suse.de>
1862 * Versions: Add __res_state with version GLIBC_2.2.
1864 * errno.c (__res_state): New function to return thread specific
1867 * pthread.c (pthread_initialize): Initialize p_resp.
1868 (__pthread_reset_main_thread): Also set p_resp.
1870 * manager.c (pthread_handle_create): Initialize p_resp.
1872 * internals.h: Add thread specific resolver state.
1873 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1875 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
1877 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1879 * sysdeps/i386/i686/pt-machine.h: Likewise.
1880 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1882 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
1884 * manager.c (pthread_start_thread_event): Initialize p_pid already
1887 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
1889 * internals.h: Add prototype for __pthread_manager_event.
1890 * manager.c (__pthread_manager_event): New function.
1891 (pthread_start_thread_event): Correct computation of self.
1892 Use INIT_THREAD_SELF.
1893 * pthread.c (__pthread_manager_thread): Initialize p_lock.
1894 (__pthread_initialize_manager): Respect event flags also for creation
1895 of the manager thread.
1897 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
1899 * pthread.c (__pthread_initialize_manager): Initialize
1900 __pthread_manager_thread.p_tid.
1902 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
1904 * internals.h: Declare __pthread_last_event.
1905 * manager.c: Define __pthread_last_event.
1906 (pthread_handle_create): Set __pthread_last_event.
1907 (pthread_exited): Likewise.
1908 * join.c (pthread_exit): Likewise.
1910 * Makefile (libpthread-routines): Add events.
1911 * events.c: New file.
1912 * internals.h: Protect against multiple inclusion.
1913 Include thread_dbP.h header.
1914 (struct _pthread_descr_struct): Add new fields p_report_events and
1916 Declare event reporting functions.
1917 * join.c (pthread_exit): Signal event if this is wanted.
1918 * manager.c (__pthread_threads_events): New variable.
1919 (pthread_handle_create): Take new parameters with event information.
1920 Signal TD_CREATE event if wanted.
1921 (__pthread_manager): Adjust pthread_handle_create call.
1922 (pthread_start_thread_event): New function. Block until manager is
1923 finished and then call pthread_start_thread.
1924 (pthread_exited): Signal TD_REAP event if wanted.
1926 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
1928 * restart.h (suspend_with_cancellation): Rewrite as a macro.
1930 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1932 1999-10-25 Andreas Jaeger <aj@suse.de>
1934 * internals.h: Remove K&R compatibility.
1935 * no-tsd.c: Likewise.
1936 * semaphore.h: Likewise.
1937 * signals.c: Likewise.
1938 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1939 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1940 * weaks.c: Likewise.
1942 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
1944 * pthread.c: For i386, wrap pthread_handle_sigrestart and
1945 pthread_handle_sigcancel with functions that restore %gs from the
1946 signal context. For each signal handling function, two wrappers
1947 are required, one for a non-RT signal and one for a RT signal.
1948 * signal.c: For i386, add code to restore %gs from the signal
1949 context in pthread_sighandler and pthread_sighandler_rt.
1951 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
1953 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1955 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
1957 * pthread.c (__pthread_initial_thread): Pass argument to
1958 PTHREAD_START_ARGS_INITIALIZER.
1959 (__pthread_manager_thread): Likewise.
1961 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1962 initialize function.
1964 * manager.c (pthread_handle_create): Remove p_startfct initialization.
1966 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1968 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
1970 * internals.h: Correct return types for __libc_read and __libc_write.
1972 1999-10-09 Andreas Jaeger <aj@suse.de>
1974 * internals.h: Add __new_sem_post to get prototype in
1975 manager.c; include semaphore.h for needed types.
1977 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
1979 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1980 directly instead of calling sem_post which should not be necessary
1981 but is faster and might help in some case to work around problems.
1982 Patch by khendricks@ivey.uwo.ca [libc/1382].
1984 1999-10-08 Andreas Schwab <schwab@suse.de>
1986 * sysdeps/pthread/Subdirs: New file.
1989 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
1991 * Implies: New file.
1992 * internals.h (struct _pthread_descr_struct): Add p_startfct.
1993 * manager.c (pthread_handle_create): Initialize p_startfct.
1994 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
1996 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
1998 * manager.c (__linuxthreads_pthread_threads_max): New variable.
1999 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2000 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2002 * condvar.c (pthread_cond_timedwait_relative): Never return with
2003 EINTR. Patch by Andreas Schwab.
2005 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2007 * signals.c (sigaction): Correct last patch. Don't select
2008 pthread_sighandler_rt based on the signal number but instead of
2009 the SA_SIGINFO flag.
2011 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2013 * specific.c: Move definitions of struct pthread_key_struct and
2014 destr_function to ...
2015 * internals.h: ...here.
2017 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2019 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
2020 this instead of pthread_handle_sigrestart if the signal is an RT
2023 * signals.c: Handle passing through of sighandler arguments also
2024 for real-time signals.
2026 1999-09-03 Andreas Schwab <schwab@suse.de>
2028 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
2030 (__vfork): New function, alias vfork.
2031 * Versions: Export __fork, vfork, and __vfork in libpthread.
2033 1999-08-23 Andreas Schwab <schwab@suse.de>
2035 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2036 call to signal handler.
2038 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
2040 * pthread.c (__pthread_reset_main_thread): Undo last change.
2041 (__pthread_kill_other_threads_np): Reset signal handlers for the
2042 signals we used in the thread implementation here.
2044 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
2046 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2047 for the signals we used in the thread implementation [PR libc/1234].
2049 * Versions: Export __pthread_kill_other_threads_np from libpthread
2052 * signals.c: Pass sigcontext through wrapper to the user function.
2054 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
2056 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2057 __libc_internal_tsd_set.
2059 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2061 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2064 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2066 * internals.h: Align _pthread_descr_struct to 32 bytes.
2067 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2070 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2072 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2075 1999-07-09 Cristian Gafton <gafton@redhat.com>
2077 * Makefile (libpthread-routines): Add oldsemaphore routine.
2078 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2079 sem_trywait, and sem_wait to GLIBC_2.1.
2080 * oldsemaphore.c: New file.
2081 * semaphore.c: Add default_symbol_versions for the changed functions.
2082 (__new_sem_init): Rename from sem_init.
2083 (__new_sem_post): Rename from sem_post.
2084 (__new_sem_wait): Rename from sem_wait.
2085 (__new_sem_trywait): Rename from sem_trywait.
2086 (__new_sem_getvalue): Rename from sem_getvalue.
2087 (__new_sem_destroy): Rename from sem_destroy.
2089 1999-06-23 Robey Pointer <robey@netscape.com>
2091 * internals.h: Added p_nextlock entry to separate queueing for a
2092 lock from queueing for a CV (sometimes a thread queues on a lock
2093 to serialize removing itself from a CV queue).
2094 * pthread.c: Added p_nextlock to initializers.
2095 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2097 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2099 * manager.c (pthread_handle_create): Free mmap region after stack
2100 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2102 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2104 * man/pthread_cond_init.man: Correct example.
2105 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2107 * linuxthreads.texi (Condition Variables): Likewise.
2109 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2111 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2112 casx not cas, also successful casx returns the old value in rd
2113 and not the new value.
2115 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2117 * manager.c: If pthread_create() is given a NULL attribute
2118 and the thread manager runs with a realtime policy, set the
2119 scheduling policy of the newly created thread back to SCHED_OTHER.
2120 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2121 initialize the schedpolicy field of new_thread->p_start_args
2122 to that of the calling thread.
2124 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2126 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2127 instruction does not allow memory element to use offset.
2129 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2131 * manager.c (pthread_allocate_stack): Optimize initialization of new
2134 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2135 Don't use initializer since it is all zeroes.
2136 (__libc_once_define): Likewise.
2138 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2140 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2141 doesn't exist anymore.
2142 * sysdeps/i386/Implies: Likewise.
2143 * sysdeps/m68k/Implies: Likewise.
2144 * sysdeps/mips/Implies: Likewise.
2145 * sysdeps/powerpc/Implies: Likewise.
2146 * sysdeps/sparc/sparc32/Implies: Likewise.
2147 * sysdeps/sparc/sparc64/Implies: Likewise.
2149 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2151 * sysdeps/alpha/bits/semaphore.h: Removed.
2152 * sysdeps/powerpc/bits/semaphore.h: Removed.
2153 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2154 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2155 * Makefile (headers): Remove bits/semaphore.h.
2157 * semaphore.h: Define _pthread_descr if necessary.
2158 Don't include limits.h. Define SEM_VALUE_MAX directly.
2160 (sem_t): Protect element names with leading __.
2161 Add declarations for sem_close, sem_open, and sem_unlink.
2162 * semaphore.c: Adjust all functions for new element names.
2163 Define sem_close, sem_open, and sem_unlink.
2164 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2166 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2169 1999-03-16 H.J. Lu <hjl@gnu.org>
2171 * specific.c (pthread_key_delete): Check th->p_terminated to see
2172 if the thread is running.
2174 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2175 Added to GLIBC_2.0 for libc.so.
2177 1999-02-12 H.J. Lu <hjl@gnu.org>
2179 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2180 __libc_allocate_rtsig): Added to GLIBC_2.1.
2182 * internals.h (DEFAULT_SIG_RESTART): Removed.
2183 (DEFAULT_SIG_CANCEL): Removed.
2185 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2186 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2187 (__pthread_sig_restart, __pthread_sig_cancel,
2188 __pthread_sig_debug): Initialized.
2189 (pthread_initialize): Call init_rtsigs () to initialize
2192 1999-02-03 H.J. Lu <hjl@gnu.org>
2194 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2195 Don't restart the thread which sent REQ_DEBUG.
2196 (pthread_start_thread): Check if __pthread_sig_debug > 0
2199 * pthread.c (__pthread_initialize_manager): Suspend ourself
2200 after sending __pthread_sig_debug to gdb instead of
2201 __pthread_sig_cancel.
2203 1999-01-24 H.J. Lu <hjl@gnu.org>
2205 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2206 from mask if __pthread_sig_debug > 0.
2207 (pthread_handle_create): Increment __pthread_handles_num.
2209 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2210 * pthread.c (__pthread_initialize_manager): Likewise.
2212 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2213 instead of __libc_allocate_rtsig (2).
2214 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2215 instead of __pthread_sig_cancel.
2216 (pthread_handle_sigdebug): Fix comments.
2218 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2220 * manager.c (pthread_allocate_stack): Set
2221 __pthread_nonstandard_stacks if user-specified stack is used.
2223 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2225 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2226 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2228 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2230 * pthread.c: Use a third signal __pthread_sig_debug distinct
2231 from __pthread_sig_cancel to notify gdb when a thread is
2233 * manager.c: Likewise.
2234 * internals.h: Likewise.
2235 * signals.c: The implementation of sigwait(s) assumed that
2236 all signals in s have signal handlers already attached.
2237 This is not required by the standard, so make it work
2238 also if some of the signals have no handlers.
2240 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2242 * linuxthreads.texi: Remove pointers from first @node. Move old
2243 @node spec inside comment.
2245 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2247 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2250 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2252 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2253 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2255 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2257 * manager.c: Threads now send __pthread_sig_cancel on termination.
2258 Change clone call and signal masks.
2259 * thread.c (pthread_handle_sigrestart): Remove special code for
2261 (pthread_handle_sigcancel): In manager thread call
2262 __pthread_manager_sighandler.
2263 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2264 * sysdeps/i386/i686/pt-machine.h: Likewise.
2265 Patches by Xavier Leroy.
2267 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2269 * spinlock.c (__pthread_unlock): Don't crash if called for an
2270 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2272 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2275 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2277 * Examples/ex3.c: Wait until all threads are started before
2278 searching for the number to avoid race condition on very fast
2281 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2283 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2284 declaration since it's not needed.
2286 * sysdeps/pthread/pthread.h: Move internal functions to ...
2287 * internals.h: ...here.
2289 1998-12-02 H.J. Lu <hjl@gnu.org>
2291 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2292 SIGRTMIN is defined.
2293 (__pthread_sig_cancel): Likewise.
2295 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2297 * wrapsyscall.c: Include <sys/mman.h> for msync,
2298 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2299 Correct msync declaration.
2301 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2303 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2304 __libc_tsd_set): New macros for new interface.
2305 * no-tsd.c: New file, provide uninitialized defns of
2306 __libc_internal_tsd_get and __libc_internal_tsd_set.
2307 * Makefile (routines): Add no-tsd.
2309 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2311 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2312 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2313 __libc_internal_tsd_set): Move decls to ...
2314 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2317 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2318 __libc_internal_tsd_set): Make these pointers to functions, not
2319 functions; remove #pragma weak decls for them.
2320 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2321 Define static functions and initialized pointers to them.
2323 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2325 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2326 (CFLAGS-specific.c): Likewise.
2327 (CFLAGS-pthread.c): Likewise.
2328 (CFLAGS-ptfork.c): Likewise.
2329 (CFLAGS-cancel.c): Likewise.
2330 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2331 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2333 * mutex.c (pthread_mutex_init): Define as strong symbol.
2334 (pthread_mutex_destroy): Likewise.
2335 (pthread_mutex_trylock): Likewise.
2336 (pthread_mutex_lock): Likewise.
2337 (pthread_mutex_unlock): Likewise.
2338 (pthread_mutexattr_init): Likewise.
2339 (pthread_mutexattr_destroy): Likewise.
2340 (pthread_once): Likewise.
2341 * ptfork.c (pthread_atfork): Likewise.
2342 * specific.c (pthread_key_create): Likewise.
2343 (pthread_setspecific): Likewise.
2344 (pthread_getspecific): Likewise.
2346 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2348 * linuxthreads.texi: Fix punctuation after xref.
2350 1998-11-10 H.J. Lu <hjl@gnu.org>
2352 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2353 if it is defined in <linux/limits.h>.
2355 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2357 * spinlock.h (__pthread_trylock): Define inline.
2358 (__pthread_lock): Add extra parameter to declaration. Declare
2359 using internal_function.
2360 (__pthread_unlock): Declare using internal_function.
2361 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2362 of local variable self. Avoid recomputing self. Define using
2364 (__pthread_trylock): Remove.
2365 (__pthread_unlock): Define using internal_function.
2366 * cancel.c: Adjust for __pthread_lock interface change. Use already
2367 computed self value is possible.
2368 * condvar.c: Likewise.
2370 * manager.c: Likewise.
2371 * mutex.c: Likewise.
2372 * pthread.c: Likewise.
2373 * rwlock.c: Likewise.
2374 * semaphore.c: Likewise.
2375 * signals.c: Likewise.
2377 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2379 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2380 __ to field names of the struct.
2381 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2383 (pthread_attr_t): Likewise.
2384 (pthread_cond_t): Likewise.
2385 (pthread_condattr_t): Likewise.
2386 (pthread_mutex_t): Likewise.
2387 (pthread_mutexattr_t): Likewise.
2388 (pthread_rwlock_t): Likewise.
2389 (pthread_rwlockattr_t): Likewise.
2390 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2391 * cancel.c: Likewise.
2392 * condvar.c: Likewise.
2393 * manager.c: Likewise.
2394 * mutex.c: Likewise.
2395 * pthread.c: Likewise.
2396 * ptlongjmp.c: Likewise.
2397 * rwlock.c: Likewise.
2398 * spinlock.c: Likewise.
2400 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2402 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2405 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2408 * Makefile (libpthread-routines): Add pt-machine.
2409 * pt-machine.c: New file.
2410 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2411 yet defined. Use PT_EI in extern inline definitions.
2412 * sysdeps/arm/pt-machine.h: Likewise.
2413 * sysdeps/i386/pt-machine.h: Likewise.
2414 * sysdeps/i386/i686/pt-machine.h: Likewise.
2415 * sysdeps/m68k/pt-machine.h: Likewise.
2416 * sysdeps/mips/pt-machine.h: Likewise.
2417 * sysdeps/powerpc/pt-machine.h: Likewise.
2418 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2419 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2421 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2423 * semaphore.h: Include <sys/types.h> so that _pthread_descr
2426 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
2428 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2430 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2432 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2434 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2437 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2439 * signals.c (sigaction): Check that sig is less than NSIG to avoid
2440 array index overflow.
2442 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
2444 * sysdeps/pthread/semaphore.h: New file.
2446 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
2448 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2449 _LIBC_TSD_KEY_DL_ERROR.
2451 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
2453 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2454 * sysdeps/i386/pt-machine.h: Likewise.
2455 Suggested by Roland McGrath.
2457 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
2459 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2460 access thread data with non-constant offsets.
2461 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2464 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
2465 THREAD_SETMEM_NC definitions.
2467 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2469 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2471 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
2473 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2474 not already defined.
2475 (struct _pthread_descr_struct): Add p_self and p_nr field.
2476 * manager.c (__pthread_handles): Define second element to point
2478 (__pthread_handles_num): Initialize to 2.
2479 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2480 (pthread_start_thread): Likewise.
2481 (pthread_handle_create): Start search for free slot at entry 2.
2482 Initialize new fields p_self and p_nr.
2483 Call __clone with CLONE_PTRACE if available.
2484 (pthread_free): Call FREE_THREAD_SELF if available.
2485 * pthread.c (__pthread_initial_thread): Initialize new fields.
2486 (__pthread_manager_thread): Likewise.
2487 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2489 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2490 elements of the thread descriptor.
2491 * condvar.c: Likewise.
2492 * errno.c: Likewise.
2494 * manager.c: Likewise.
2495 * pthread.c: Likewise.
2496 * ptlongjmp.c: Likewise.
2497 * semaphore.c: Likewise.
2498 * signals.c: Likewise.
2499 * specific.c: Likewise.
2500 * spinlock.c: Likewise.
2502 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2504 * sysdeps/i386/useldt.h: New file.
2505 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2507 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2508 THREAD_SETMEM using __thread_self.
2509 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2511 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
2513 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2514 turned out that we didn't need to queue after all.
2516 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
2518 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2519 and wastes space; correct types.
2521 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
2523 * signals.c (sigaction): Handle NULL argument.
2525 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
2527 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2530 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2532 * Makefile (linuxthreads-version): Extract correct number from
2535 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
2537 * Banner: Bump version number to 0.8
2538 * FAQ.html: Many updates, in particular w.r.t. debugging.
2539 * manager.c: Support for non-default stacksize for
2540 LinuxThreads-allocated stacks;
2541 don't use guard pages for stacks with default size, rely on
2542 rlimit(RLIMIT_STACK) instead (it's cheaper).
2544 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2545 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2546 * condvar.c: Likewise.
2547 * internals.h: Likewise.
2548 * restart.h: Likewise.
2549 * signals.c: Likewise.
2550 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2552 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2554 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2555 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
2556 * Versions: Put __pthread_mutexattr_settype under version
2557 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
2558 __pthread_mutexattr_gettype.
2560 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2562 * sysdeps/pthread/bits/libc-lock.h: Make
2563 __pthread_mutexattr_settype weak. Don't make
2564 __pthread_mutexattr_setkind_np weak.
2566 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
2568 * manager.c (pthread_handle_create): Check whether sched_setscheduler
2569 call can succeed here.
2571 * mutex.c: Define __pthread_mutexattr_settype and make
2572 __pthread_mutexattr_setkind_np an alias.
2573 Likewise for __pthread_mutexattr_gettype.
2575 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2577 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2580 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
2582 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2584 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2586 * Examples/ex6.c: Include <unistd.h> for usleep.
2588 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2590 * Examples/ex4.c (main): Use exit, not pthread_exit.
2592 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
2594 * Versions: Add __pthread_mutexattr_gettype and
2595 __pthread_mutexattr_settype.
2596 * lockfile.c: Use __pthread_mutexattr_settype instead of
2597 __pthread_mutexattr_setkind_np.
2598 * mutex.c: Define __pthread_mutexattr_gettype and
2599 __pthread_mutexattr_settype.
2601 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2602 __pthread_mutexattr_settype.
2603 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2604 Use __pthread_mutexattr_settype.
2606 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
2608 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2609 * mutex.c: Define weak alias pthread_mutexattr_gettype and
2610 pthread_mutexattr_settype.
2611 * sysdeps/pthread/pthread.h: Declare these functions.
2612 Move pthread_sigmask and pthread_kill declaration in separate header.
2613 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2615 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
2617 * Makefile: Add rules to compile and run tests.
2618 * Examples/ex1.c: Little changes to fix warnings.
2619 * Examples/ex2.c: Likewise.
2620 * Examples/ex3.c: Likewise.
2621 * Examples/ex4.c: Likewise.
2622 * Examples/ex5.c: Likewise.
2623 * Examples/ex6.c: New file.
2625 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
2627 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2629 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2631 * attr.c: Include <string.h>.
2633 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
2635 * attr.c: Include errno.h. Use memcpy to copy sched_param.
2636 * internals.h: Include limits.h.
2637 * manager.c: Use memcpy to copy sched_param.
2638 * ptfork.c: Include errno.h.
2639 * pthread.c: Likewise.
2640 * semaphore.c: Likewise.
2641 * specific.c: Likewise.
2642 * spinlock.h: Likewise.
2643 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
2644 type definition to ...
2645 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
2647 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
2649 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2651 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2652 as macros as demanded in POSIX.1, Annex C.
2654 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
2656 * internals.h (struct pthread_request): For free use pthread_t
2657 instead of pthread_descr.
2658 * join.c (pthread_join): Pass thread_id, not th to manager.
2659 (pthread_detach): Likewise.
2660 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2661 (pthread_exited): Remove detached queue code.
2662 (pthread_handle_free): Expect thread ID parameter and use it to
2663 validate the thread decsriptor. Don't use detached queue.
2664 Patches by Xavier Leroy.
2666 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2668 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2669 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2670 __pthread_atfork, __pthread_key_create, __pthread_once.
2671 * internals.h: Doc fix.
2672 * pthread.c (__pthread_initialize): Define again.
2674 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
2676 * manager.c (pthread_exited): If thread is not detached put it on
2678 (pthread_handle_free): If thread is not on list with living threads
2679 search on list with detached threads.
2681 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2682 for new definition of pthread_rwlock_t.
2684 * spinlock.c: Correct test whether to compile
2685 __pthread_compare_and_swap or not.
2687 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
2689 * attr.c: Finish user stack support. Change locking code to be safe
2690 in situations with different priorities.
2691 * cancel.c: Likewise.
2692 * condvar.c: Likewise.
2693 * internals.h: Likewise.
2695 * manager.c: Likewise.
2696 * mutex.c: Likewise.
2697 * pthread.c: Likewise.
2698 * ptlongjmp.c: Likewise.
2699 * queue.h: Likewise.
2700 * rwlock.c: Likewise.
2701 * semaphore.c: Likewise.
2702 * semaphore.h: Likewise.
2703 * signals.c: Likewise.
2704 * spinlock.c: Likewise.
2705 * spinlock.h: Likewise.
2706 * sysdeps/pthread/pthread.h: Likewise.
2707 Patches by Xavier Leroy.
2709 * sysdeps/i386/i686/pt-machine.h: New file.
2711 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
2713 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2714 [sg]et_stackaddr prototypes always available.
2716 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2717 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2719 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
2721 * manager.c (pthread_free): Undo patch from 980430.
2722 Reported by David Wragg <dpw@doc.ic.ac.uk>.
2724 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
2726 * manager.c: Define __pthread_manager_adjust_prio and use it to
2727 increase priority when needed.
2728 * internals.h: Add prototype for __pthread_manager_adjust_prio.
2729 * mutex.c: Optimize mutexes to wake up only one thread.
2730 * pthread.c: Move PID of manager for global variable in structure
2732 Patches by Xavier Leroy.
2734 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
2736 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2738 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2740 * attr.c: Correct typo.
2742 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
2744 * manager.c (pthread_free): Unmap guard before the stack.
2745 Patch by Matthias Urlichs.
2747 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
2749 * manager.c (pthread_free): Detect already free child.
2750 Patch by Xavier Leroy, reported by Matthias Urlichs.
2752 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2754 * Makefile (linuxthreads-version): Renamed back from
2757 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
2759 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2762 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
2764 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2765 * internals.h: Add definitions for new spinlock implementation.
2766 * ptlongjmp.c: New file.
2767 * spinlock.c: New file.
2768 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2769 new function __pthread_acquire to prevent deadlocks with thread
2770 with different priorities.
2771 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2773 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2775 * manager.c (__pthread_manager): Reduce first argument to select
2776 to include just the needed file descriptor.
2778 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
2780 * manager.c: Fix last patch which caused core dumps.
2782 * pthread.c: Correctly handle missing SIGRTMIN.
2784 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2786 * libpthread.map: Add __libc_internal_tsd_get and
2787 __libc_internal_tsd_set. Add missing cancelable functions. Export
2788 libc internal versions of the cancelable functions.
2790 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
2792 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2794 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
2796 * attr.c: Implement pthread_attr_[gs]etguardsize,
2797 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2798 Change pthread_attr_init to have two interfaces.
2799 * internals.h (struct _pthread_descr_struct): Add new fields for
2801 * libpthread.map: Add names in GLIBC_2.1 section.
2802 * manager.c (pthread_handle_create): Implement guardsize and
2804 (pthread_free): Likewise.
2805 * pthread.c (pthread_create): Add new interface for changed
2807 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2808 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2811 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
2813 * manager.c: Enable resetting of the thread scheduling policy
2814 to SCHED_OTHER when the parent thread has a different one.
2816 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
2818 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2819 _POSIX_ASYNCHRONOUS_IO.
2821 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2823 * mutex.c: Implement new mutex types.
2825 * internals.h: Include <signal.h>.
2827 * libpthread.map: Add __erno_location and __h_errno_location.
2829 * errno.c: Return pointer to variable actually in use. This might
2830 not be the one in the thread structure.
2831 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2833 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2834 of manager thread structure.
2835 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2837 * pthread.c: Adapt initializer for thread structures.
2838 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2839 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2840 current thread to global variables.
2842 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
2844 * rwlock.c: New file.
2845 * Makefile (libpthread-routines): Add rwlock.
2846 * sysdeps/pthread/pthread.h: Define data structures and declare
2848 * libpthread.map: Add new functions.
2850 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
2852 * sysdeps/arm/pt-machine.h: New file; add ARM support.
2853 * sysdeps/arm/Implies: likewise.
2854 * README: Document it.
2856 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2858 * signals.c: Remove unneeded initializer for sigwaited, saving a
2861 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2863 * semaphore.c (sem_init): Set sem_spinlock only if available.
2865 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
2867 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2868 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2870 * Makefile: Update from LinuxThreads 0.7.
2871 * internals.h. Likewise.
2872 * manager.c: Likewise.
2873 * mutex.c: Likewise.
2874 * pthread.c: Likewise.
2875 * signals.c: Likewise.
2876 * specific.c: Likewise.
2877 * Examples/ex3.c: Likewise.
2879 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
2881 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2884 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
2886 * wrapsyscall.c: Add socket functions which are also cancelation
2889 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
2891 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2892 New functions for fast thread specific data within libc.
2894 * internals.h: Add new array p_libc_specific to struct
2895 _pthread_descr_struct.
2897 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2899 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
2901 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2902 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2904 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
2906 * internals.h (struct _pthread_descr_struct): Add definitions for
2907 two-level specific key handling.
2908 * manager.c (pthread_handle_create): Initialize specific memory array.
2909 * specific.c: Implement two-level key handling.
2910 * weaks.c: Don't provide dummy key handling.
2911 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2912 Add definition of __libc_key_t.
2913 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2915 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2916 PTHREAD_DESTRUCTOR_ITERATIONS.
2918 * manager.c (pthread_handle_create): Compare mmap result with
2921 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2922 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2924 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
2926 sysdeps/sparc -> sysdeps/sparc/sparc32
2927 sysdeps/sparc64 -> sysdeps/sparc/sparc64
2929 * internals.h: Change definition of THREAD_SELF to be an expression,
2930 not a statement that did a return.
2931 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2932 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2933 Follow Solaris and use a "system reserved" register (%g6) to hold
2934 the thread descriptor.
2935 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2937 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
2939 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
2940 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2941 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2943 * semaphore.c: Include spinlock.h only when needed.
2945 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2946 keys for entries not in use.
2948 * weaks.c: Implement key handling functions for real.
2950 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
2952 Initial sparc64-linux support:
2953 * sysdeps/sparc64/Implies: New file.
2954 * sysdeps/sparc64/pt-machine.h: Likewise.
2956 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
2958 * semaphore.c: Include spinlock.h at correct place.
2961 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
2963 The Great Bit File Move:
2964 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2965 * sysdeps/powerpc/semaphorebits.h: Likewise.
2966 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2967 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2968 * sysdeps/pthread/libc-lock.h: -> bits/
2969 * sysdeps/pthread/stdio-lock.h: Likewise.
2970 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2971 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2972 * semaphore.h: Likewise.
2973 * sysdeps/pthread/pthread.h: Likewise.
2975 * lockfile.c: <foo.h> -> <bits/foo.h>.
2976 * semaphore.h: Likewise.
2978 * Makefile: (headers): foo.h -> bits/foo.h.
2979 * sysdeps/pthread/Makefile: Likewise.
2981 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2983 * semaphore.c (sem_init): Set sem_spinlock only if available.
2985 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
2988 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
2990 Update from LinuxThreads 0.6.
2992 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
2993 and __sched_get_priority_min instead of names without `__'.
2995 * manager.c: Rewrite large parts to implement opaque pthread_t.
2997 * cancel.c: Adapt for opaque pthread_t type.
2998 * condvar.c: Likewise.
2999 * errno.c: Likewise.
3001 * mutex.c: Likewise.
3002 * pthread.c: Likewise.
3003 * signals.c: Likewise.
3004 * specific.c: Likewise.
3005 * restart.h: Likewise.
3006 * queue.h: Likewise.
3007 * Examples/ex3.c: Likewise.
3008 * Examples/ex4.c: Likewise.
3009 * sysdeps/pthread/pthread.h: Likewise.
3011 * pthread.c: Accumulate time for all threads in thread manager.
3013 * semaphore.c: Implement fallback implementation for architectures
3014 sometimes missing compare-exchange operations.
3016 * cancel.c (pthread_cancel): Validate handle argument.
3017 * join.c (pthread_join): Likewise.
3018 (pthread_detach): Likewise.
3019 * signals.c (pthread_kill): Likewise.
3021 * spinlock.h (acquire): Use __sched_yield not sched_yield.
3023 * queue.h (enqueue): Enqueue thread according to priority.
3025 * internals.c (struct pthread_start_args): New struct for passing
3026 args to cloning function.
3027 (struct _pthread): Rename to _pthread_descr_struct and adapt for
3030 * Examples/Makefile (clean): Pass -f option to rm.
3032 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3033 and define TEST_FOR_COMPARE_AND_SWAP.
3034 * sysdeps/i386/i486/pt-machine.h: Removed.
3036 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3039 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
3041 * restart.h (suspend): Clear p_signal before suspending.
3042 (suspend_with_cancellation): Likewise.
3043 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3045 * weaks.c: Make __pthread_key_create return 1.
3046 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3047 __libc_getspecific, __libc_setspecific, and __libc_key_t.
3048 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3051 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
3053 * sysdeps/sparc/pt-machine (RELEASE): Fix.
3055 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
3057 * sysdeps/powerpc/Implies: Added.
3058 * sysdeps/powerpc/pt-machine.h: Added.
3059 * sysdeps/powerpc/semaphorebits.h: Added.
3061 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
3063 * pthread.c (__pthread_initial_thread): Correct
3065 (__pthread_manager_thread): Likewise.
3066 Reported by Andreas Jaeger.
3068 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
3070 Since sigset_t no longer fits in a register, we can't pass in the
3071 thread's initial mask so easily. Take this opportunity to simplify
3072 the clone implementation by only accepting a single void* argument.
3074 * manager.c (__pthread_manager): Put thread vitals in the thread
3075 struct instead of as arguments through clone.
3076 (pthread_start_thread): Look for them there.
3077 * internals.h (struct _pthread): Add p_initial_fn,
3078 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3079 * pthread.c (pthread_initialize_manager): Revise clone invocation.