1 2001-04-21 Andreas Jaeger <aj@suse.de>
3 * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
4 attribute, remove statements that will never be executed.
6 * manager.c (__pthread_manager): Add noreturn
8 (pthread_start_thread): Likewise, remove return statement.
9 (pthread_start_thread_event): Likewise.
10 Add noreturn attribute for pthread_handle_exit.
11 * weaks.c: Add noreturn attribute for pthread_exit.
13 * internals.h: Add __pthread_clock_gettime and
14 __pthread_clock_settime prototypes.
16 2001-04-21 Ulrich Drepper <drepper@redhat.com>
18 * internals.h: Include <cpuclock-init.h>.
19 (struct _pthread_descr_struct): Add p_cpuclock_offset field if
20 CPUCLOCK_VARDEF is defined.
21 * pthread.c (__pthread_initialize_minimal): Initialize
22 p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
23 * manager.c (pthread_start_thread): Set p_cpuclock_offset field
24 for new thread to current CPU clock value.
26 * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
28 * sysdeps/i386/i586/Makefile: New file.
29 * sysdeps/i386/i586/Versions: New file.
30 * sysdeps/i386/i586/ptclock_gettime.c: New file.
31 * sysdeps/i386/i586/ptclock_settime.c: New file.
32 * sysdeps/i386/i686/Implies: New file.
34 2001-04-18 Jakub Jelinek <jakub@redhat.com>
36 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
37 $generated, not $postclean-generated.
39 2001-04-18 Andreas Jaeger <aj@suse.de>
41 * Makefile (otherlibs): Added.
43 2001-04-18 Jakub Jelinek <jakub@redhat.com>
45 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
47 2001-04-16 Ulrich Drepper <drepper@redhat.com>
49 * signals.c (sigwait): NSIG is no signal number. Block all
50 signals while in signal handler for signals in SET.
51 Patch by Manfred Spraul <manfred@colorfullife.com>.
53 2001-04-12 Ulrich Drepper <drepper@redhat.com>
55 * tst-cancel.c: Disable most tests. Add new test where all
56 cleanup handlers must run.
57 * Makefile (tests): Add tst-cancel again.
59 * cancel.c (__pthread_perform_cleanup): Correct condition for
60 leaving cleanup loop early.
62 * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
63 all the files which use CURRENT_STACK_FRAME.
64 * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
65 __builtin_frame_address.
66 * sysdeps/i386/i686/pt-machine.h: Likewise.
68 2001-04-11 Ulrich Drepper <drepper@redhat.com>
70 * Makefile (tests): Comment out tst-cancel for now.
72 * tst-cancel.c (main): Cleanup 4 is supposed to run. Create
73 temporary file in object directory.
74 * Makefile: Don't allow inlining when compiling tst-cancel.c.
75 Pass $(objpfx) to tst-cancel.
77 2001-04-11 David S. Miller <davem@redhat.com>
79 * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
80 up closer to user local variables so that new cleanup heuristics work.
81 * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
83 2001-04-11 Ulrich Drepper <drepper@redhat.com>
85 * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
87 (_pthread_cleanup_push_defer): Likewise.
89 * tst-cancel.c (main): Fix loop printing cleanup output.
91 2001-04-10 kaz Kojima <kkojima@rr.iij4u.or.jp>
93 * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
95 (__pthread_spin_trylock): Likewise.
96 * sysdeps/sh/pt-machine.h (testandset): Likewise.
98 2001-04-10 Ulrich Drepper <drepper@redhat.com>
100 * join.c (pthread_exit): Move code to new function __pthread_do_exit
101 which takes an extra parameter with the current frame pointer.
102 Call new function with CURRENT_STACK_FRAME.
103 (__pthread_do_exit): New function. Call __pthread_perform_cleanup
104 with the new parameter.
105 (pthread_join): Call __pthread_do_exit instead of pthread_exit.
106 * cancel.c (__pthread_perform_cleanup): Takes extra parameter. Use
107 this parameter as the initial value the cleanup handler records are
108 compared against. No active cleanup handler record must have an
109 address lower than the previous one and the initial record must be
110 above (below on PA) the frame address passed in.
111 (pthread_setcancelstate): Call __pthread_do_exit instead of
113 (pthread_setcanceltype): Likewise.
114 (pthread_testcancel): Likewise.
115 (_pthread_cleanup_pop_restore): Likewise.
116 * condvar.c (pthread_cond_wait): Likewise.
117 (pthread_cond_timedwait_relative): Likewise.
118 * manager.c (pthread_start_thread): Likewise.
119 * oldsemaphore.c (__old_sem_wait): Likewise.
120 * pthread.c (pthread_handle_sigcancel): Likewise.
121 * semaphore.c (__new_sem_wait): Likewise.
122 (sem_timedwait): Likewise.
123 * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
124 to limit the cleanup handlers which get run.
125 * internals.h: Add prototype for __pthread_do_exit. Adjust prototype
126 for __pthread_perform_cleanup.
128 * Makefile (tests): Add tst-cancel.
129 * tst-cancel.c: New file.
131 2001-04-08 Hans-Peter Nilsson <hp@axis.com>
133 * sysdeps/cris/pt-machine.h: New file.
134 * sysdeps/cris/pspinlock.c: New file.
136 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
138 * shlib-versions: Add case for Linux on CRIS.
140 2001-03-26 Ulrich Drepper <drepper@redhat.com>
142 * attr.c (pthread_getattr_np): Correct computation of stack size
143 for machiens with register stack.
145 * Examples/ex17.c (main): Correct detection of failed mmap call.
147 2001-03-21 Jakub Jelinek <jakub@redhat.com>
149 * pthread.c (__pthread_initialize_manager): Fix a typo.
151 2001-03-21 Jakub Jelinek <jakub@redhat.com>
153 * attr.c (__pthread_attr_setstack): Fix alignment check.
154 (pthread_getattr_np): __stackaddr is top of stack, not bottom.
155 * Makefile (tests): Add ex17 test.
156 * Examples/ex17.c: New test.
158 2001-03-20 Ulrich Drepper <drepper@redhat.com>
160 * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
161 * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
162 * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
164 2001-03-18 Ulrich Drepper <drepper@redhat.com>
166 * Makefile: When generating DSO link with libc_nonshared.a.
168 2001-02-26 Jakub Jelinek <jakub@redhat.com>
170 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
172 2001-02-23 Jakub Jelinek <jakub@redhat.com>
174 * internals.h (__pthread_init_max_stacksize): New prototype.
175 * attr.c (__pthread_attr_setstacksize): Call
176 __pthread_init_max_stacksize if not yet initialized.
177 * pthread.c (__pthread_init_max_stacksize): New function.
178 (__pthread_initialize_manager): Call it.
179 Patch by <dtc@cmucl.cons.org>.
181 2001-03-16 Ulrich Drepper <drepper@redhat.com>
183 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
185 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
187 * shlib-versions: Add rule for Linux on 64 bit S/390.
188 * sysdeps/s390/s390-64/pt-machine.h: New file.
189 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
191 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
193 * sysdeps/s390/pt-machine.h: Move to...
194 * sysdeps/s390/s390-32/pt-machine.h: ...here.
195 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
197 2001-03-15 Ulrich Drepper <drepper@redhat.com>
199 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
200 * attr.c: Implement pthread_getattr_np.
201 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
202 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
203 * manager.c (pthread_handle_create): Initialize p_inheritsched.
205 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
207 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
210 2001-02-20 Hans Boehm <hans_boehm@hp.com>
212 * manager.c (manager_mask): Removed static vesion. Now always local
213 to __pthread_manager().
214 (manager_mask_all): Removed completely.
215 (__pthread_manager): Remove manager_mask_all initialization.
216 (pthread_handle_create): Remove code to set and reset signal mask
217 around __clone2() calls.
219 2001-02-17 Jakub Jelinek <jakub@redhat.com>
221 * spinlock.c (__pthread_lock): Force lock->__status to be read from
222 memory on every spin.
224 2001-02-10 Andreas Jaeger <aj@suse.de>
226 * Makefile (extra-objs): New.
228 2001-02-09 Jakub Jelinek <jakub@redhat.com>
230 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
231 __pthread_initialize_minimal prototype.
233 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
235 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
237 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
239 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
241 2001-02-06 Ulrich Drepper <drepper@redhat.com>
243 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
244 broken code. Patch by Jes Sorensen.
246 2001-02-06 Andreas Jaeger <aj@suse.de>
248 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
250 * internals.h: ...here.
252 2001-02-05 Jes Sorensen <jes@linuxcare.com>
254 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
256 2001-02-02 Ulrich Drepper <drepper@redhat.com>
258 * Versions: Remove __pthread_initialize_minimal.
260 2001-02-01 Ulrich Drepper <drepper@redhat.com>
262 * Makefile: Add rules to build crti.o and make it being used in
263 building libpthread.so.
264 * sysdeps/i386/Makefile: New file.
265 * sysdeps/pthread/pt-initfini.c: New file.
267 * pthread.c: Cleanups.
269 2001-01-28 Andreas Jaeger <aj@suse.de>
271 * oldsemaphore.c (__old_sem_init): Adjust for last change.
272 * sysdeps/pthread/bits/libc-lock.h: Likewise.
273 * spinlock.c: Likewise.
275 2001-01-28 Ulrich Drepper <drepper@redhat.com>
277 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
278 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
279 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
280 * pthread.c: Likewise.
281 * spinlock.h: Likewise.
282 * sysdeps/pthread/pthread.h: Likewise.
284 2001-01-26 Ulrich Drepper <drepper@redhat.com>
286 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
287 as struct __pthread_attr_s.
289 * semaphore.h (sem_t): Cleanup namespace, rename status and
292 2001-01-13 Jakub Jelinek <jakub@redhat.com>
294 * pthread.c (pthread_onexit_process): Clear
295 __pthread_manager_thread_bos after freeing it.
296 * Makefile (tests): Add ex16.
297 * Examples/ex16.c: New file.
299 2001-01-11 Jakub Jelinek <jakub@redhat.com>
301 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
303 * pthread.c (pthread_exit_process): Rename to...
304 (pthread_onexit_process): ...this.
305 (pthread_atexit_process, pthread_atexit_retcode): New.
306 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
307 and only if HAVE_Z_NODELETE is not defined.
308 (__pthread_initialize_manager): Register pthread_atexit_retcode
311 2001-01-11 Ulrich Drepper <drepper@redhat.com>
313 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
315 2001-01-11 Jakub Jelinek <jakub@redhat.com>
317 * Makefile (tests): Add ex15.
318 * Examples/ex15.c: New test.
320 2001-01-08 Ulrich Drepper <drepper@redhat.com>
322 * pthread.c (pthread_exit_process): Free memory allocated for
325 2000-12-31 Ulrich Drepper <drepper@redhat.com>
327 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
328 (pthread_free): Always unmap the stack. It's safe now that we don't
329 use MAP_FIXED to allocate stacks.
331 2000-12-31 Ulrich Drepper <drepper@redhat.com>
333 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
335 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
337 2000-11-15 Wolfram Gloger <wg@malloc.de>
339 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
340 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
342 2000-12-27 Andreas Jaeger <aj@suse.de>
344 * Examples/ex13.c: Make local functions static.
345 * ecmutex.c: Likewise.
346 * joinrace.c: Likewise.
347 * Examples/ex14.c: Likewise.
349 * Examples/ex2.c: Make local functions static; reformat.
350 * Examples/ex1.c: Likewise.
351 * Examples/ex4.c: Likewise.
352 * Examples/ex5.c: Likewise.
353 * Examples/ex7.c: Likewise.
355 * oldsemaphore.c: Add prototypes to shut up GCC.
356 * pt-machine.c: Likewise.
358 * weaks.c: Add prototype for pthread_exit.
360 * internals.h: Add some prototypes, format prototypes and add
362 Move __libc_waitpid prototype to include/sys/wait.h.
364 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
366 * specific.c: Likewise.
367 * ptfork.c: Likewise.
369 * lockfile.c: Include internals.h to get prototypes.
370 * events.c: Likewise.
371 * sysdeps/alpha/pspinlock.c: Likewise.
372 * sysdeps/arm/pspinlock.c: Likewise.
373 * sysdeps/hppa/pspinlock.c: Likewise.
374 * sysdeps/i386/pspinlock.c: Likewise.
375 * sysdeps/ia64/pspinlock.c: Likewise.
376 * sysdeps/m68k/pspinlock.c: Likewise.
377 * sysdeps/mips/pspinlock.c: Likewise.
378 * sysdeps/powerpc/pspinlock.c: Likewise.
379 * sysdeps/s390/pspinlock.c: Likewise.
380 * sysdeps/sh/pspinlock.c: Likewise.
381 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
382 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
383 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
385 2000-12-27 Ulrich Drepper <drepper@redhat.com>
387 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
388 (__pthread_attr_getstack): Return correct address.
389 Add warnings for using pthread_attr_getstackaddr and
390 pthread_attr_setstackaddr.
392 2000-12-26 Ulrich Drepper <drepper@redhat.com>
394 * Examples/ex6.c (test_thread): Make static.
395 * Examples/ex12.c (test_thread): Make static and add noreturn
398 2000-12-18 Jes Sorensen <jes@linuxcare.com>
400 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
401 and compare_and_swap_with_release_semantics returns int not long.
403 2000-12-17 Andreas Jaeger <aj@suse.de>
405 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
407 * sysdeps/arm/pt-machine.h (testandset): Likewise.
408 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
409 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
410 * sysdeps/sh/pt-machine.h (testandset): Likewise.
411 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
412 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
414 2000-12-17 Ulrich Drepper <drepper@redhat.com>
416 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
417 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
419 2000-12-17 Andreas Jaeger <aj@suse.de>
421 * internals.h: Add prototypes for testandset and
422 __compare_and_swap to shut up gcc warnings.
424 2000-12-06 Wolfram Gloger <wg@malloc.de>
426 * join.c (pthread_detach): Allow case where the thread has already
429 2000-12-05 Andreas Jaeger <aj@suse.de>
431 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
432 * sysdeps/mips/pt-machine.h (testandset): Likewise.
433 (__compare_and_swap): Likewise.
434 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
436 2000-11-20 Jakub Jelinek <jakub@redhat.com>
438 * Examples/ex3.c (main): Cast int to long before casting to void *.
439 (search): Cast void * to long, not int.
440 * Examples/ex8.c (main, thread): Similarly.
441 * Examples/ex11.c (main): Similarly.
442 * Examples/ex14.c (worker, do_test): Similarly.
443 * ecmutex.c (worker, do_test): Similarly.
444 (nlocks): Cast to int.
446 2000-11-08 Bruce Mitchener <bruce@cubik.org>
448 * linuxthreads.texi: Add documentation for pthreads attributes
449 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
450 patch. Document pthread_[sg]etconcurrency(). Mark
451 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
453 2000-11-07 Ulrich Drepper <drepper@redhat.com>
455 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
457 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
458 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
460 2000-11-06 Ulrich Drepper <drepper@redhat.com>
462 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
463 not doing it right now.
464 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
466 2000-10-30 Ulrich Drepper <drepper@redhat.com>
468 * Examples/ex4.c (main): Don't use exit() to avoid warning with
471 2000-10-29 Ulrich Drepper <drepper@redhat.com>
473 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
474 here. Reported by Bruce Mitchener <bruce@cubik.org>.
476 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
477 discussing mutexes. (As per the Unix98 name for the API.)
478 Changes documentation for pthread_mutexattr_setkind_np() and
479 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
480 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
481 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
482 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
483 Begins to introduce discussion of the ``timed'' mutex type. This
484 discussion is currently incomplete.
485 Patch by Bruce Mitchener <bruce@cubik.org>.
487 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
488 Yutaka Niibe <gniibe@chroot.org>
490 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
491 has restrictions, use register.
493 2000-10-23 Andreas Schwab <schwab@suse.de>
495 * Examples/ex14.c (TIMEOUT): Override default timeout.
497 2000-10-16 Ulrich Drepper <drepper@redhat.com>
499 * specific.c: Protect tsd array modification in thread data
500 structures by getting the thread lock in pthread_key_delete and
501 __pthread_destroy_specifics.
502 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
504 2000-10-12 Alan Modra <alan@linuxcare.com.au>
506 * sysdeps/pthread/bits/initspin.h: New file.
507 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
508 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
509 (__pthread_alt_init_lock): Likewise.
510 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
512 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
514 * oldsemaphore.c (__old_sem_init): Release lock with
515 LT_SPINLOCK_INIT, not zero.
516 * spinlock.c (__pthread_unlock): Likewise.
517 (__pthread_alt_lock): Likewise.
518 (__pthread_alt_timedlock): Likewise.
519 (__pthread_alt_unlock): Likewise.
520 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
521 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
522 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
523 LT_SPINLOCK_INIT do initialize spinlocks not 0.
525 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
527 * shlib-versions: Add version definitions for hppa-linux.
529 2000-10-12 Alan Modra <alan@linuxcare.com.au>
531 * sysdeps/hppa/pspinlock.c: New file.
532 * sysdeps/hppa/pt-machine.h: New file.
533 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
535 2000-10-05 Jakub Jelinek <jakub@redhat.com>
537 * mutex.c (__pthread_mutex_destroy): Correct test of
538 busy mutex for mutexes using alternate fastlocks.
539 Patch by dtc@cmucl.cons.org.
541 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
543 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
545 2000-09-28 Ulrich Drepper <drepper@redhat.com>
547 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
548 test for owner first.
549 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
551 * cancel.c (pthread_cancel): Don't do anything if cancelation is
554 2000-09-26 Ulrich Drepper <drepper@redhat.com>
556 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
557 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
559 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
560 _POSIX_MONOTONIC_CLOCK.
562 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
565 2000-09-20 Andreas Jaeger <aj@suse.de>
567 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
568 "testrtsig.h" conditional.
570 2000-09-11 Ulrich Drepper <drepper@redhat.com>
572 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
573 pthread_attr_setstack.
574 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
575 pthread_attr_setstack.
576 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
578 2000-09-05 Ulrich Drepper <drepper@redhat.com>
580 * Examples/ex14.c: New file.
581 * Makefile (tests): Add ex14.
583 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
584 mutex. Patch by dtc@cmucl.cons.org.
586 * ecmutex.c: New file.
587 * Makefile (tests): Add ecmutex.
589 2000-09-04 H.J. Lu <hjl@gnu.org>
591 * attr.c (__pthread_attr_setguardsize): Use page_roundup
592 instead of roundup to round up to the page size.
594 2000-09-03 Mark Kettenis <kettenis@gnu.org>
596 * manager.c (pthread_exited): Correctly report event as TD_REAP
597 instead of TD_DEATH. Fix comments.
599 2000-09-03 Ulrich Drepper <drepper@redhat.com>
601 * spinlock.h (testandset): Add cast to avoid warning.
602 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
604 2000-09-02 Andreas Jaeger <aj@suse.de>
606 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
609 2000-09-01 Ulrich Drepper <drepper@redhat.com>
611 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
612 Fix typo in last patch (_mode -> _flags).
614 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
615 Provide definition which respects _IO_USER_LOCK flag.
617 2000-08-30 Ulrich Drepper <drepper@redhat.com>
619 * manager.c (pthread_allocate_stack): Clear descriptor only if not
622 2000-08-25 Ulrich Drepper <drepper@redhat.com>
624 * Makefile: Add rules to build and run unload.
625 * unload.c: New file.
627 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
629 * sysdeps/pthread/pthread.h
630 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
631 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
633 2000-08-24 Andreas Jaeger <aj@suse.de>
635 * Examples/ex13.c: Include <string.h> for strerror prototype and
636 <stdlib.h> for abort prototype.
637 (pthr_cond_signal_mutex): Rewrite to silence GCC.
638 (thread_start): Remove unused variable err.
639 (main): Silence GCC warnings.
641 2000-08-22 Andreas Jaeger <aj@suse.de>
643 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
645 * Makefile (tests): Add ex13.
647 2000-08-20 Ulrich Drepper <drepper@redhat.com>
649 * semaphore.h: Add restrict where required by AGd4.
650 * sysdeps/pthread/pthread.h: Likewise.
651 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
653 2000-08-15 Ulrich Drepper <drepper@redhat.com>
655 * Makefile (tests): Add ex12. Add rule to build it.
656 * Examples/ex12.c: New file.
658 2000-08-13 Ulrich Drepper <drepper@redhat.com>
660 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
661 even though the implementation is not quite complete (but it reports
662 it). Define _POSIX_MESSAGE_PASSING to -1.
663 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
665 2000-08-12 Andreas Jaeger <aj@suse.de>
667 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
669 (__compare_and_swap): Likewise.
670 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
672 2000-08-10 Ulrich Drepper <drepper@redhat.com>
674 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
675 p_h_errnop correctly and not to NULL.
677 2000-08-05 Ulrich Drepper <drepper@redhat.com>
679 * Banner: Bump version number to 0.9.
681 2000-08-04 Ulrich Drepper <drepper@redhat.com>
683 * Makefile (tests): Add tststack. Add rule to build the program.
684 * tststack.c: New file.
686 * internals.h: Declare __pthread_max_stacksize.
687 * pthread.c (__pthread_max_stacksize): New variable.
688 (__pthread_initialize_manager): Determine __pthread_initialize_manager
690 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
691 (pthread_allocate_stack): Allow kernel to choose stack address if
692 FLOATING_STACKS. This also handles variable-sized stacks.
693 Always allocate stack and guardpage together. Use mprotect to
694 change guardpage access.
695 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
698 * attr.c (__pthread_attr_setstacksize): Also test value against
701 * manager.c (__pthread_nonstandard_stacks): Define only if
702 THREAD_SELF is not defined.
703 (pthread_allocate_stack): Always initialize gardaddr to a correct
705 (pthread_handle_create): Unmap thread with one call.
706 (pthread_free): Remove test for initial thread before removing stack.
707 Unmap stack with one call.
709 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
710 1 to avoid removing the stack.
712 2000-07-27 Jes Sorensen <jes@linuxcare.com>
714 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
715 load of spin lock to prime the cache before the atomic compare and
716 exchange operation (cmpxchg4). This avoids the spinning on the
717 cmpxchg4 instruction and reduces movement of the cache line back
718 and forth between the processors (explanation by Asis K. Mallick
719 from Intel). This basically makes the implementation operate the
720 same as the Linux kernel implementation.
722 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
723 * sysdeps/ia64/pspinlock.c: New file.
725 2000-08-03 Ulrich Drepper <drepper@redhat.com>
727 * pthread.c: Move definition of __pthread_set_own_extricate_if...
728 * spinlock.h: ...here. Remove locking.
729 * internals.h: Remove __pthread_set_own_extricate_if prototype.
731 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
732 (rwlock_rd_extricate_func): Don't determine self, let
733 __pthread_lock do it.
734 (rwlock_wr_extricate_func): Likewise.
735 (rwlock_have_already): Optimize *pself handling a bit.
737 * mutex.c: Use __builtin_expect.
738 * pthread.c: Likewise.
740 2000-08-02 Andreas Jaeger <aj@suse.de>
742 * sysdeps/s390/pspinlock.c: New file.
743 * sysdeps/s390/pt-machine.h: New file.
744 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
746 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
748 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
750 * sysdeps/mips/pt-machine.h (testandset): Likewise.
752 2000-07-26 Andreas Jaeger <aj@suse.de>
754 * pthread.c: Initialize p_sem_avail.
756 2000-07-25 Ulrich Drepper <drepper@redhat.com>
758 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
759 * semaphore.c: Handle spurious wakeups.
761 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
762 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
764 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
765 (__pthread_wait_for_restart): Likewise.
767 * condvar.c (pthread_cond_wait): Also check whether thread is
768 cancelable before aborting loop.
769 (pthread_cond_timedwait): Likewise.
771 * signals.c (pthread_sighandler): Remove special code to restrore
773 (pthread_sighandler_t): Likewise.
775 2000-07-25 Mark Kettenis <kettenis@gnu.org>
777 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
778 * pthread.c: Include <resolv.h>.
779 (_res): Undefine. Add extern declaration.
781 2000-07-24 Ulrich Drepper <drepper@redhat.com>
783 * pthread.c (__pthread_initial_thread): Update initializer.
784 (__pthread_manager_thread): Likewise.
785 (pthread_initialize): Move setrlimit call to...
786 (__pthread_initialize_manager): ...here.
787 (__pthread_reset_main_thread): Reset also soft limit on stack size.
789 * condvar.c: Handle spurious wakeups. [PR libc/1749].
790 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
792 2000-07-21 Ulrich Drepper <drepper@redhat.com>
794 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
795 __compare_and_swap to define testandset.
796 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
797 Define IMPLEMENT_TAS_WITH_CAS.
799 2000-07-20 Ulrich Drepper <drepper@redhat.com>
801 * Makefile: Pass -z nodelete to linker for libpthread.so
802 generation if it understand this option.
804 2000-07-18 Mark Kettenis <kettenis@gnu.org>
806 * manager.c (pthread_handle_create): Remove initialization of
807 new_thread->p_res._sock.
809 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
811 Bugfixes to the variant of the code for machines with no compare
814 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
815 node was not being properly enqueued, due to failing to update
816 the lock->__status field.
818 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
819 being set inappropriately, causing the suspend function to be called
820 with a null self pointer and crash.
822 2000-07-18 Ulrich Drepper <drepper@redhat.com>
824 * spinlock.h (__pthread_alt_trylock): Fix code used if no
825 compare&swap is available.
827 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
830 * pthread.c (pthread_initialize): Don't use sysconf to determine
831 whether the machine has more than one processor.
833 * spinlock.c (__pthread_alt_timedlock): Add back one of the
834 removed thread_self calls.
836 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
838 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
839 __compare_and_swap to compare_and_swap in code which assumes
840 compare swap is available.
842 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
844 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
845 bug whereby thr field of waitnode structure would not be correctly
846 set unless a null self pointer is passed to the functions.
847 Eliminated redundant calls to thread_self().
849 2000-07-18 Jakub Jelinek <jakub@redhat.com>
851 * pthread.c (__pthread_initialize_manager): Lock
852 __pthread_manager_thread.p_lock before calling clone.
854 2000-05-05 H.J. Lu <hjl@gnu.org>
856 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
857 have acquire semantics.
858 (__compare_and_swap_with_release_semantics): New inline
860 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
862 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
864 * manager.c: Fix the problem with signals at startup.
865 Change the way that thread stacks are allocated on IA64.
866 Clean up some of the guard page allocation stuff.
868 1999-12-19 H.J. Lu <hjl@gnu.org>
870 * internals.h (page_roundup): New.
871 * attr.c (__pthread_attr_setguardsize); Use page_roundup
873 * manager.c (pthread_allocate_stack): Make sure guardaddr is
874 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
877 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
879 * manager.c (pthread_allocate_stack): Unmap the stack top
880 if failed to map the stack bottom.
882 (pthread_free): Fix the guard page.
884 * pthread.c (pthread_initialize): Set rlimit correctly for
885 NEED_SEPARATE_REGISTER_STACK.
887 1999-12-16 H.J. Lu <hjl@gnu.org>
889 * pthread.c (__pthread_initialize_manager): Pass
890 __pthread_manager_thread_bos instead of
891 __pthread_manager_thread_tos to __clone2.
893 1999-12-16 H.J. Lu <hjl@gnu.org>
895 * manager.c (pthread_allocate_stack): Correct the calculation
896 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
899 1999-12-13 H.J. Lu <hjl@gnu.org>
901 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
902 bit after setting ar.ccv.
904 1999-12-12 H.J. Lu <hjl@gnu.org>
906 * manager.c (pthread_allocate_stack): Make the starting
907 address of the stack bottom page aligned. FIXME: it may
908 need changes in other places.
909 (pthread_handle_create): Likewise.
911 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
913 * manager.c (pthread_allocate_stack): Handle
914 NEED_SEPARATE_REGISTER_STACK.
915 (pthread_handle_create): Likewise.
916 * pthread.c (__pthread_initialize_manager): Likewise.
918 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
920 1999-12-02 H.J. Lu <hjl@gnu.org>
922 * sysdeps/ia64/pt-machine.h: New.
924 2000-07-13 Ulrich Drepper <drepper@redhat.com>
926 * wrapsyscall.c: Mark non-__ protected names as weak.
929 2000-07-12 Bruno Haible <haible@clisp.cons.org>
931 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
933 2000-07-12 Ulrich Drepper <drepper@redhat.com>
935 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
936 Add tests also to new alternative spinlock implementation.
937 * spinlock.h: Likewise.
938 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
940 2000-07-06 Ulrich Drepper <drepper@redhat.com>
942 * Version: Export __sigaction.
943 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
945 * pthread.c: Use __libc_sigaction instead of __sigaction.
947 * condvar.c: Implement pthread_condattr_getpshared and
948 pthread_condattr_setpshared.
949 * mutex.c: Implement pthread_mutexattr_getpshared and
950 pthread_mutexattr_setpshared.
951 * Versions: Export new functions.
952 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
954 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
955 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
958 2000-07-04 Greg McGary <greg@mcgary.org>
960 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
961 pragmas. Include bp-sym.h only if _LIBC.
963 2000-07-04 Ulrich Drepper <drepper@redhat.com>
965 * spinlock.c (__pthread_unlock): Properly place write barrier.
966 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
968 2000-07-03 Ulrich Drepper <drepper@redhat.com>
970 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
971 faster on SMP systems. No more emulation of compare&swap for adaptive
973 * spinlock.h: Likewise.
974 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
975 Replace fast with adaptive mutex.
976 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
977 * condvar.c: Likewise.
978 * pthread.c: Define and initialize __pthread_smp_kernel variable.
979 * internals.h: Declare __pthread_smp_kernel.
980 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
981 _pthread_fastlock structure.
982 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
984 * pthread.c: Remove initialization to zero from global variables.
986 2000-06-29 Jakub Jelinek <jakub@redhat.com>
988 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
990 2000-06-28 Greg McGary <greg@mcgary.org>
992 * weaks.c: Wrap BP_SYM () around weak extern declarations of
993 pthread functions that have pointers in their return+arg signatures.
995 2000-06-27 Greg McGary <greg@mcgary.org>
997 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
998 extern declarations of pthread functions that have pointers in
999 their return+arg signatures.
1001 2000-06-26 Ulrich Drepper <drepper@redhat.com>
1003 * Makefile (tests): Add ex11. Add rules to build it.
1004 * Examples/ex11.c: New file.
1005 * rwlock.c: Fix complete braindamaged previous try to implement
1008 * spinlock.c: Pretty print.
1010 2000-06-25 Ulrich Drepper <drepper@redhat.com>
1012 * Makefile (tests): Add ex10. Add rules to build it.
1013 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
1014 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
1015 * condvar.c (pthread_cond_wait): Allow mutex of kind
1016 PTHREAD_MUTEX_TIMED_NP.
1017 (pthread_cond_timedwait_relative): Likewise.
1018 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
1019 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
1020 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1021 (__pthread_mutex_lock): Use __pthread_alt_lock for
1022 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1023 (__pthread_mutex_timedlock): New function.
1024 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
1025 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
1026 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
1027 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
1028 * spinlock.c: Implement alternate fastlocks.
1029 * spinlock.h: Add prototypes.
1030 * Examples/ex10.c: New file.
1031 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
1032 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1034 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
1035 (__pthread_rwlock_timedrdlock): New function.
1036 (__pthread_rwlock_timedwrlock): New function.
1037 Use laternate fastlock function everywhere.
1039 2000-06-21 Andreas Jaeger <aj@suse.de>
1041 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
1044 * join.c: Include <stdlib.h> for exit prototype.
1046 2000-06-20 Ulrich Drepper <drepper@redhat.com>
1048 * sysdeps/i386/useldt.h: Include <stdlib.h>.
1050 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
1051 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1053 * Makefile (libpthread-routines): Add barrier.
1054 (tests): Add ex9. Add rule to build ex9.
1055 * Versions: Export barrier functions.
1056 * barrier.c: New file.
1057 * Examples/ex9.c: New file.
1058 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
1059 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
1060 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1062 2000-06-19 H.J. Lu <hjl@gnu.org>
1064 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
1065 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
1066 (compare_and_swap_with_release_semantics): New. Default to
1067 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
1070 * spinlock.c (__pthread_unlock): Call
1071 compare_and_swap_with_release_semantics () instead of
1072 compare_and_swap ().
1074 2000-06-19 Ulrich Drepper <drepper@redhat.com>
1076 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
1078 * sysdeps/pthread/timer_delete.c: Likewise.
1079 * sysdeps/pthread/timer_getoverr.c: Likewise.
1080 * sysdeps/pthread/timer_gettime.c: Likewise.
1081 * sysdeps/pthread/timer_settime.c: Likewise.
1083 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1085 Timer nodes are now reference counted, and can be marked
1086 as deleted. This allows for the safe release of the global mutex
1087 in the middle without losing the timer being operated on.
1089 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
1090 member is now an enum with three values, so that an intermediate
1091 state can be represented (deleted but not free for reuse yet).
1092 New refcount member added.
1093 * sysdeps/pthread/timer_routines.c: Likewise.
1095 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
1096 timer_valid): New inline functions added.
1098 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
1099 restructured, recursive deadlock bug fixed.
1101 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
1102 timer_addref to ensure that timer won't be deleted while mutex is not
1103 held. Also uses timer_invalid to perform validation of timer handle.
1104 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1105 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
1107 2000-06-14 Ulrich Drepper <drepper@redhat.com>
1109 * shlib-versions: Add entry for SH.
1110 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
1112 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
1114 A few optimizations. Got rid of unnecessary wakeups of timer threads,
1115 tightened up some critical regions and micro-optimized some list
1118 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1119 Returns int value now to indicate whether timer was queued at head.
1120 * sysdeps/pthread/posix-timer.h: Likewise.
1121 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
1122 new return value from __timer_thread_queue_timer to avoid waking
1123 up timer thread unnecessarily.
1125 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
1126 inuse flag, because this requires mutex to be held. Callers updated
1127 to do the check when they have the mutex.
1128 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
1130 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
1131 regions: avoids making system calls while holding timer mutex, and
1132 a few computations were moved outside of the mutex as well.
1133 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
1135 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
1136 to list_unlink_ip, meaning idempotent. Pointer manipulation
1137 changed to get better better code out of gcc.
1138 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
1139 version of list_unlink added here.
1140 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
1141 function in all places: idempotent one for timers, non-idempotent
1142 one for thread nodes.
1143 * sysdeps/pthread/timer_settime: Likewise.
1144 * sysdeps/pthread/timer_routines.c: Likewise.
1146 2000-06-13 Ulrich Drepper <drepper@redhat.com>
1148 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
1149 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1151 * sysdeps/pthread/Makefile: Remove tests definition.
1153 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
1154 Yutaka Niibe <gniibe@chroot.org>
1156 * sysdeps/sh/pspinlock.c: New file.
1157 * sysdeps/sh/pt-machine.h: New file.
1159 2000-06-12 Ulrich Drepper <drepper@redhat.com>
1161 * Makefile (tests): Add joinrace.
1163 * Examples/ex6.c: Test return value of pthread_join.
1165 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1167 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1168 (__pthread_spin_trylock): Implement.
1169 (__pthread_spin_unlock): Implement.
1170 (__pthread_spin_init): Implement.
1171 (__pthread_spin_destroy): Implement.
1173 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1175 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1176 really append the entry.
1178 2000-06-10 Andreas Jaeger <aj@suse.de>
1180 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1182 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1184 * sysdeps/pthread/timer_create.c: Thread matching now done on
1185 clock type as well as thread attributes.
1186 There are individual global signal-delivering threads for
1187 different clock types.
1188 * sysdeps/pthread/posix-timer.h: Likewise.
1189 * sysdeps/pthread/timer_routines.c: Likewise.
1191 * sysdeps/pthread/timer_routines.c: Thread allocation and
1192 deallocation function now remembers to put thread on active
1193 list and remove from active list.
1194 Thus now the feature of binding multiple timers
1195 to a single thread actually works.
1197 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1199 * pthread.c (__pthread_create_2_1): Optimize a bit.
1201 * internals.h (invalid_handle): Also test for p_terminated != 0.
1202 (nonexisting_handle): New function. Same as old invalid_handle.
1203 * join.c (pthread_join): Use nonexisting_handle instead of
1204 invalid_handle to test for acceptable thread handle.
1205 * manager.c (pthread_handle_free): Likewise.
1206 * joinrace.c: New file.
1207 Reported by Permaine Cheung <pcheung@cygnus.com>.
1209 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1211 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1212 Correct handling of matching variable.
1214 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1217 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1218 Be prepared for empty timer list.
1220 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1221 CPUTIME clock ID. Add support for thread clocks.
1223 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1224 subtraction were switched.
1226 * sysdeps/pthread/timer_routines.c (init_module): Use
1227 THREAD_MAXNODES threads.
1229 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1230 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1231 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1232 with sigqueueinfo is this system call is available.
1234 * sysdeps/pthread/timer_create.c (timer_create): Allow
1235 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1237 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1239 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1241 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1243 * sysdeps/pthread/posix-timer.h: New file.
1244 * sysdeps/pthread/timer_create.c: New file.
1245 * sysdeps/pthread/timer_delete.c: New file.
1246 * sysdeps/pthread/timer_getoverr.c: New file.
1247 * sysdeps/pthread/timer_gettime.c: New file.
1248 * sysdeps/pthread/timer_routines.c: New file.
1249 * sysdeps/pthread/timer_settime.c: New file.
1250 * sysdeps/pthread/tst-timer.c: New file.
1252 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1254 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1255 LINK_MAX definitions if necessary.
1257 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1259 Added missing fork time handling of global libio lock.
1261 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1262 not just the individual stream locks. Rewritten to use new
1263 iterator interface provided by libio rather than accessing
1266 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1267 which lock and unlock the stream list using the new interface
1269 * internals.h: Likewise.
1271 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1272 and __funlockfilelist in the parent after the fork.
1273 Child still calls __fresetlockfiles as before.
1275 * linuxthreads.texi: Now explains what happens to streams at
1276 fork time. Also whole new section on forking and thread added.
1277 Definition of pthread_atfork moved out of Miscellaneous Functions
1278 to this new section.
1280 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1282 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1283 Add missing register.
1284 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1286 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1288 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1289 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1290 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1292 2000-05-31 Andreas Jaeger <aj@suse.de>
1294 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1296 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1298 * spinlock.c (__pthread_lock): Remove ASSERT.
1300 * Makefile (tests): Add ex8.
1301 * Examples/ex8.c: New file.
1303 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1305 Bugfix: The pthread_atfork mechanism now takes care of its
1306 own internal mutex at fork time.
1308 * ptfork.c (__fork): Revised so that the mutex is held across
1309 the fork operation and while the handlers are called, and so that
1310 the child resets the mutex.
1312 * linuxthreads.texi: Updated pthread_atfork documentation to make
1313 it clear that fork and pthread_atfork can't be reentered from
1314 atfork handlers, that pthread_atfork and fork are mutually atomic,
1315 and that the handlers are inherited by the child process.
1317 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1319 * Makefile (libpthread-routines): Add pspinlock.
1320 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1321 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1322 * condvar.c: Likewise.
1323 * internals.h: Likewise.
1325 * manager.c: Likewise.
1326 * mutex.c: Likewise.
1327 * pthread.c: Likewise.
1328 * rwlock.c: Likewise.
1329 * semaphore.c: Likewise.
1330 * signals.c: Likewise.
1331 * spinlock.h: Likewise.
1332 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1333 * sysdeps/alpha/pspinlock.c: New file.
1334 * sysdeps/arm/pspinlock.c: New file.
1335 * sysdeps/i386/pspinlock.c: New file.
1336 * sysdeps/m68k/pspinlock.c: New file.
1337 * sysdeps/mips/pspinlock.c: New file.
1338 * sysdeps/powerpc/pspinlock.c: New file.
1339 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1340 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1341 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1342 back to _pthread_fastlock. Define new pthread_spinlock_t.
1344 2000-05-24 Andreas Jaeger <aj@suse.de>
1346 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1348 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1350 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1352 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1354 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1356 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1358 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1359 object state is represented with additional bits which distinguish
1360 whether that state was set up in the current process, or
1361 in an ancestor process. If that state was set in an ancestor,
1362 it means that a fork happened while thread was executing the init
1363 function. In that case, the state is reset to NEVER.
1364 * mutex.c (__pthread_once_fork_prepare): New function.
1365 (__pthread_once_fork_child): Likewise
1366 (__pthread_once_fork_parent): Likewise
1367 (__pthread_reset_pthread_once): Removed.
1368 * ptfork.c (__fork): Call new handlers in mutex.c.
1369 * internals.h: Declarations of new mutex.c functions added.
1370 Declaration of removed function deleted.
1371 * linuxthreads.texi: Updated documentation about pthread_once
1372 to clarify what happens under cancellation and forking.
1374 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1376 * internals.h: New thread manager request type, REQ_KICK.
1377 * join.c (pthread_exit): main thread now calls exit() instead
1378 of _exit() in order to proper process cleanup.
1379 * manager.c (__pthread_manager): Do not terminate manager
1380 after unblocking main thread; wait for main thread's
1381 REQ_PROCESS_EXIT request instead.
1382 Also, added REQ_KICK case to handle new request; this just does
1384 * manager.c (pthread_exited): Do not terminate manager after
1385 unblocking main thread.
1386 * manager.c (__pthread_manager_sighandler): If the main thread
1387 is waiting for all other threads to die, send a REQ_KICK into
1388 the thread manager request pipe to get it to clean out the threads
1389 and unblock the main thread as soon as possible. This fixes
1390 the 2000 millisecond hang on shutdown bug.
1391 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1392 including the main one call pthread_exit(), or implicitly do so.
1393 * Makefile (tests): Add ex7.
1395 2000-05-05 Andreas Jaeger <aj@suse.de>
1397 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1398 (pthread_getcpuclockid): Correct test for ourselves.
1400 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1402 * internals.h (struct _pthread_descr_struct): Reorganization.
1403 Allocate room for 16 pointers at head of the structure for future
1404 thread-local data handling. Move p_self member in this area.
1405 * manager.c (pthread_handle_create): Adjust use of p_self.
1406 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1407 * pthread.c (__pthread_initial_thread): Adjust initialization.
1408 (__pthread_manager_thread): Likewise.
1410 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1412 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1413 for eventmask larger than 1 word.
1415 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1417 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1418 * pthread.c (__pthread_initialize_minimal): New function. Perform
1419 minimal initialization.
1420 (pthread_initialize): Remove this code here.
1421 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1422 are working around the problem in glibc.
1424 2000-04-25 Ulrich Drepper <drepper@redhat.com>
1426 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1427 now. First gcc must be fixed (more concrete: libgcc).
1429 2000-04-24 Ulrich Drepper <drepper@redhat.com>
1431 * pthread.c: Remove special treatement for interrupt handlers on x86.
1432 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1433 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1435 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1437 2000-04-24 Mark Kettenis <kettenis@gnu.org>
1439 * join.c (pthread_exit): Set p_terminated after reporting the
1440 termination event instead of before.
1442 2000-04-20 Jakub Jelinek <jakub@redhat.com>
1444 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1447 2000-04-18 Andreas Jaeger <aj@suse.de>
1449 * Versions: Use ld instead of ld.so.
1451 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1453 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1454 Remove the typedef keyword.
1456 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1458 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1460 (READ_MEMORY_BARRIER): Define.
1461 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1463 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1466 2000-04-17 Ulrich Drepper <drepper@redhat.com>
1468 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1469 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1470 use thread_handle().
1472 2000-04-16 Ulrich Drepper <drepper@redhat.com>
1474 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1475 if fast mutex is used. Don't initialize `already_canceled' twice.
1476 Correctly test for return value of timedsuspend.
1478 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
1479 therefore don't need the _rt versions of the signal handlers.
1481 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1483 * pthread.c (pthread_yield): New function.
1484 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1485 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1486 * internals.h: Declare __pthread_yield.
1488 * pthread.c (pthread_initialize): Avoid a bit more code if
1489 realtime signals are known to exist.
1491 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1492 to dynamically detect RT signals and avoid generating compatibility
1493 functions with old kernel.
1494 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1495 __pthread_restart_new directly.
1496 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1497 __pthread_wait_for_restart_signal directly.
1498 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1499 __pthread_timedsuspend_new directly.
1501 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1503 * condvar.c: Remove all the special code to handle cond_timedwait.
1504 Use timedsuspend instead.
1505 * internals.h: Declare __pthread_timedsuspend_old,
1506 __pthread_timedsuspend_new, and __pthread_timedsuspend.
1507 Remove declaration of __pthread_init_condvar.
1508 * pthread.c: Define __pthread_timedsuspend variable.
1509 (__pthread_timedsuspend_old): New function. Timed suspension
1510 implementation for old Linux kernels.
1511 (__pthread_timedsuspend_new): New function. Timed suspension
1512 implementation for new Linux kernels.
1513 * restart.h (timedsuspend): New function. Call appropriate
1514 suspension function through __pthread_timedsuspend.
1515 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1517 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1519 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1521 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1523 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1524 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1526 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1527 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1529 2000-04-14 Andreas Jaeger <aj@suse.de>
1531 * weaks.c: Fix typo.
1533 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1534 2.2 for linuxthreads.
1536 2000-04-13 Ulrich Drepper <drepper@redhat.com>
1538 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1539 (pthread_getcpuclockid): Fix typo.
1541 2000-04-12 Ulrich Drepper <drepper@redhat.com>
1543 * Makefile (libpthread-routines): Add getcpuclockid.
1544 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1545 * sysdeps/pthread/getcpuclockid.c: New file.
1546 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1547 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1549 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1551 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1553 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1554 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1555 and pthread_spin_unlock.
1556 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1557 into pthread_spinlock_t. Change all uses.
1558 * spinlock.c: Implement pthread_spin_lock.
1559 Rename __pthread_unlock to __pthread_spin_unlock and define weak
1560 alias for real name.
1561 Define pthread_spin_trylock, pthread_spin_init, and
1562 pthread_spin_destroy.
1563 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1564 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1565 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1566 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1567 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1568 and pthread_spin_unlock.
1569 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1570 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1571 * condvar.c: Likewise.
1572 * internals.h: Likewise.
1574 * manager.c: Likewise.
1575 * mutex.c: Likewise.
1576 * pthread.c: Likewise.
1577 * rwlock.c: Likewise.
1578 * semaphore.c: Likewise.
1579 * signals.c: Likewise.
1581 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1583 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1585 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1587 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1588 _POSIX_SHARED_MEMORY_OBJECTS.
1590 2000-04-11 Andreas Jaeger <aj@suse.de>
1592 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1593 (__compare_and_swap): Mark as modifying memory.
1595 2000-04-11 Geoff Keating <geoffk@cygnus.com>
1597 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1599 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1600 Don't have the 'asm' __volatile__.
1602 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1604 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1605 * spinlock.c (__pthread_lock): Add memory barriers.
1606 (__pthread_unlock): Likewise.
1607 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1609 (RELEASE): Not needed anymore.
1610 (__compare_and_swap): Mark asm as modifying memory.
1611 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
1613 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1614 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1615 (MEMORY_BARRIER): Define using stbar.
1616 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1618 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1619 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1620 Mike Burrows <m3b@pa.dec.com>.
1622 2000-04-09 Ulrich Drepper <drepper@redhat.com>
1624 * signals.c (sigaction): Fix return value for the case SIG is one
1625 of the signals the implementation uses.
1626 Patch by Xavier.Leroy@inria.fr.
1628 2000-04-01 Andreas Jaeger <aj@suse.de>
1630 * attr.c: Use shlib-compat macros.
1631 * oldsemaphore.c: Likewise.
1632 * pthread.c: Likewise.
1633 * weaks.c: Likewise.
1635 2000-03-26 Ulrich Drepper <drepper@redhat.com>
1637 * semaphore.c (sem_timedwait): New function.
1638 Patch by Carl Mailloux <carlm@oricom.ca>.
1639 * semaphore.h: Declare sem_timedwait.
1640 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1642 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
1644 * sysdeps/pthread/Makefile: File removed.
1646 2000-03-23 Ulrich Drepper <drepper@redhat.com>
1648 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1649 * internals.h (__pthread_reset_pthread_once): Add prototype.
1650 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1652 * manager.c (pthread_handle_create): Store ID of new thread before
1655 2000-03-21 Ulrich Drepper <drepper@redhat.com>
1657 * attr.c: Use new macros from shlib-compat.h to define versions.
1658 * oldsemaphore.c: Likewise.
1659 * semaphore.c: Likewise.
1660 * weaks.c: Likewise.
1662 * pthread.c: Update for new SHLIB_COMPAT definition.
1664 * manager.c (__pthread_manager): Unmask debug signal.
1666 * pthread.c (pthread_initialize): Test for address of __dso_handle
1667 being NULL, not value. Use __on_exit, not on_exit.
1668 Patch by Andreas Jaeger <aj@suse.de>.
1670 * pthread.c: Use new macros from shlib-compat.h to define versions.
1672 2000-03-19 Ulrich Drepper <drepper@redhat.com>
1674 * pthread.c (pthread_initialize): Instead of on_exit use
1675 __cxa_atexit if __dso_label is available to allow unloading the
1676 libpthread shared library.
1678 2000-03-16 Ulrich Drepper <drepper@redhat.com>
1680 * condvar.c: Make tests for ownership of mutex less strict.
1682 2000-03-14 Ulrich Drepper <drepper@redhat.com>
1684 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1685 current thread and return error if not.
1686 (pthread_cond_timedwait_relative_old): Likewise.
1687 (pthread_cond_timedwait_relative_new): Likewise.
1689 * mutex.c (__pthread_once): Handle cancelled init function correctly.
1690 (pthread_once_cancelhandler): New function.
1691 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1693 2000-03-14 Andreas Jaeger <aj@suse.de>
1695 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1697 (pthread_handle_sigrestart_rt): Likewise.
1698 * signals.c (pthread_sighandler_rt): Likewise.
1700 2000-03-02 Andreas Jaeger <aj@suse.de>
1702 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1703 Reported by Sean Chen <sean.chen@turbolinux.com>.
1705 2000-02-28 Andreas Jaeger <aj@suse.de>
1707 * rwlock.c: Fix typo.
1709 2000-02-27 Ulrich Drepper <drepper@redhat.com>
1711 * rwlock.c: Define __* variants of the functions and make old names
1713 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1714 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1716 2000-02-25 Andreas Jaeger <aj@suse.de>
1718 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1719 pwrite64, lseek64, open64, and __open64 with version 2.2.
1721 2000-02-22 Ulrich Drepper <drepper@redhat.com>
1723 * semaphore.h (SEM_FAILED): Use 0 not NULL.
1725 2000-02-14 Ulrich Drepper <drepper@redhat.com>
1727 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1728 nanosleep does not work either. Get absolute time inside the
1730 (pthread_cond_timedwait_relative_new): Likewise.
1731 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1733 2000-02-13 Andreas Jaeger <aj@suse.de>
1735 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1736 (pthread_cond_timedwait_relative_old): Likewise.
1738 2000-02-13 Ulrich Drepper <drepper@redhat.com>
1740 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1741 but keep the code around. A bug in the kernel prevent us from
1743 (pthread_cond_timedwait_relative_new): Likewise.
1744 (PR libc/1597 and libc/1598).
1746 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
1748 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1749 loop around nanosleep calls instead of around most of the function
1750 (pthread_cond_timedwait_relative_new): Likewise.
1751 body. Got rid of backwards goto and one local.
1753 2000-01-31 Ulrich Drepper <drepper@redhat.com>
1755 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1756 before every nanosleep call to account for time spent in the rest
1758 (pthread_cond_timedwait_relative_new): Likewise.
1759 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1761 2000-01-29 Ulrich Drepper <drepper@redhat.com>
1763 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1764 from nanosleep call so that in case we restart we only wait for the
1766 (pthread_cond_timedwait_relative_new): Likewise.
1767 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1769 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
1771 * manager.c (pthread_allocate_stack): Compute guard page address
1772 correctly. Patch by HJ Lu.
1774 * sysdeps/pthread/pthread.h: Define
1775 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1777 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
1779 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1780 preference handling.
1781 (pthread_rwlockattr_setkind_np): Allow
1782 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1783 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1785 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
1787 * internals.h (pthread_readlock_info): New structure.
1788 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1789 p_untracked_readlock_count.
1790 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1791 Add initializers for new fields.
1792 * manager.c (pthread_free): Free read/write lock lists.
1793 * queue.h (queue_is_empty): New function.
1794 * rwlock.c: Implement requirements about when readers should get
1796 * sysdeps/pthread/pthread.h
1797 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1798 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1799 Define this name as well.
1800 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1802 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
1804 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1805 Adjust initializers for struct _pthread_descr_struct change.
1806 * internals.h (struct _pthread_descr_struct): Move new elements to
1809 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
1811 Redesigned how cancellation unblocks a thread from internal
1812 cancellation points (sem_wait, pthread_join,
1813 pthread_cond_{wait,timedwait}).
1814 Cancellation won't eat a signal in any of these functions
1815 (*required* by POSIX and Single Unix Spec!).
1816 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1817 simultaneous condition variable signal (not required by POSIX
1818 or Single Unix Spec, but nice).
1819 * spinlock.c: __pthread_lock queues back any received restarts
1820 that don't belong to it instead of assuming ownership of lock
1821 upon any restart; fastlock can no longer be acquired by two threads
1823 * restart.h: Restarts queue even on kernels that don't have
1824 queued real time signals (2.0, early 2.1), thanks to atomic counter,
1825 avoiding a rare race condition in pthread_cond_timedwait.
1827 1999-12-31 Andreas Jaeger <aj@suse.de>
1829 * internals.h: Remove duplicate prototype declarations.
1831 * weaks.c: Remove __THROW from prototypes since the file is not
1832 compiled by a C++ compiler.
1833 * internals.h: Likewise.
1835 1999-12-30 Andreas Jaeger <aj@suse.de>
1837 * sysdeps/pthread/pthread.h: Move internal functions to...
1838 * sysdeps/pthread/bits/libc-lock.h: ...here.
1840 1999-12-29 Andreas Jaeger <aj@suse.de>
1842 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1844 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
1846 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1849 * manager.c (__pthread_start): Add one more cast to prevent
1850 warning on 64bit machines.
1852 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
1854 * manager.c (pthread_handle_create): Set p_pid of new thread
1855 before calling the callback function to report a new thread.
1857 1999-12-20 Andreas Jaeger <aj@suse.de>
1859 * pthread.c (pthread_initialize): Move getrlimit call after
1862 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
1864 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1865 pwrite64, lseek64, open64, and __open64.
1866 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1867 pwrite64, lseek64, open64, and __open64.
1869 * manager.c (pthread_allocate_stack): Correct computation of
1870 new_thread_bottom. Correct handling of stack size and when the
1871 rlimit method to guard for stack growth is used.
1872 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1873 minus one pagesize (not two).
1875 1999-12-03 Andreas Jaeger <aj@suse.de>
1877 * Versions: Add __res_state with version GLIBC_2.2.
1879 * errno.c (__res_state): New function to return thread specific
1882 * pthread.c (pthread_initialize): Initialize p_resp.
1883 (__pthread_reset_main_thread): Also set p_resp.
1885 * manager.c (pthread_handle_create): Initialize p_resp.
1887 * internals.h: Add thread specific resolver state.
1888 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1890 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
1892 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1894 * sysdeps/i386/i686/pt-machine.h: Likewise.
1895 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1897 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
1899 * manager.c (pthread_start_thread_event): Initialize p_pid already
1902 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
1904 * internals.h: Add prototype for __pthread_manager_event.
1905 * manager.c (__pthread_manager_event): New function.
1906 (pthread_start_thread_event): Correct computation of self.
1907 Use INIT_THREAD_SELF.
1908 * pthread.c (__pthread_manager_thread): Initialize p_lock.
1909 (__pthread_initialize_manager): Respect event flags also for creation
1910 of the manager thread.
1912 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
1914 * pthread.c (__pthread_initialize_manager): Initialize
1915 __pthread_manager_thread.p_tid.
1917 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
1919 * internals.h: Declare __pthread_last_event.
1920 * manager.c: Define __pthread_last_event.
1921 (pthread_handle_create): Set __pthread_last_event.
1922 (pthread_exited): Likewise.
1923 * join.c (pthread_exit): Likewise.
1925 * Makefile (libpthread-routines): Add events.
1926 * events.c: New file.
1927 * internals.h: Protect against multiple inclusion.
1928 Include thread_dbP.h header.
1929 (struct _pthread_descr_struct): Add new fields p_report_events and
1931 Declare event reporting functions.
1932 * join.c (pthread_exit): Signal event if this is wanted.
1933 * manager.c (__pthread_threads_events): New variable.
1934 (pthread_handle_create): Take new parameters with event information.
1935 Signal TD_CREATE event if wanted.
1936 (__pthread_manager): Adjust pthread_handle_create call.
1937 (pthread_start_thread_event): New function. Block until manager is
1938 finished and then call pthread_start_thread.
1939 (pthread_exited): Signal TD_REAP event if wanted.
1941 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
1943 * restart.h (suspend_with_cancellation): Rewrite as a macro.
1945 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1947 1999-10-25 Andreas Jaeger <aj@suse.de>
1949 * internals.h: Remove K&R compatibility.
1950 * no-tsd.c: Likewise.
1951 * semaphore.h: Likewise.
1952 * signals.c: Likewise.
1953 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1954 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1955 * weaks.c: Likewise.
1957 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
1959 * pthread.c: For i386, wrap pthread_handle_sigrestart and
1960 pthread_handle_sigcancel with functions that restore %gs from the
1961 signal context. For each signal handling function, two wrappers
1962 are required, one for a non-RT signal and one for a RT signal.
1963 * signal.c: For i386, add code to restore %gs from the signal
1964 context in pthread_sighandler and pthread_sighandler_rt.
1966 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
1968 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1970 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
1972 * pthread.c (__pthread_initial_thread): Pass argument to
1973 PTHREAD_START_ARGS_INITIALIZER.
1974 (__pthread_manager_thread): Likewise.
1976 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1977 initialize function.
1979 * manager.c (pthread_handle_create): Remove p_startfct initialization.
1981 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1983 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
1985 * internals.h: Correct return types for __libc_read and __libc_write.
1987 1999-10-09 Andreas Jaeger <aj@suse.de>
1989 * internals.h: Add __new_sem_post to get prototype in
1990 manager.c; include semaphore.h for needed types.
1992 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
1994 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1995 directly instead of calling sem_post which should not be necessary
1996 but is faster and might help in some case to work around problems.
1997 Patch by khendricks@ivey.uwo.ca [libc/1382].
1999 1999-10-08 Andreas Schwab <schwab@suse.de>
2001 * sysdeps/pthread/Subdirs: New file.
2004 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
2006 * Implies: New file.
2007 * internals.h (struct _pthread_descr_struct): Add p_startfct.
2008 * manager.c (pthread_handle_create): Initialize p_startfct.
2009 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
2011 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
2013 * manager.c (__linuxthreads_pthread_threads_max): New variable.
2014 * specific.c (__linuxthreads_pthread_keys_max): New variable.
2015 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
2017 * condvar.c (pthread_cond_timedwait_relative): Never return with
2018 EINTR. Patch by Andreas Schwab.
2020 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
2022 * signals.c (sigaction): Correct last patch. Don't select
2023 pthread_sighandler_rt based on the signal number but instead of
2024 the SA_SIGINFO flag.
2026 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
2028 * specific.c: Move definitions of struct pthread_key_struct and
2029 destr_function to ...
2030 * internals.h: ...here.
2032 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
2034 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
2035 this instead of pthread_handle_sigrestart if the signal is an RT
2038 * signals.c: Handle passing through of sighandler arguments also
2039 for real-time signals.
2041 1999-09-03 Andreas Schwab <schwab@suse.de>
2043 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
2045 (__vfork): New function, alias vfork.
2046 * Versions: Export __fork, vfork, and __vfork in libpthread.
2048 1999-08-23 Andreas Schwab <schwab@suse.de>
2050 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
2051 call to signal handler.
2053 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
2055 * pthread.c (__pthread_reset_main_thread): Undo last change.
2056 (__pthread_kill_other_threads_np): Reset signal handlers for the
2057 signals we used in the thread implementation here.
2059 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
2061 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
2062 for the signals we used in the thread implementation [PR libc/1234].
2064 * Versions: Export __pthread_kill_other_threads_np from libpthread
2067 * signals.c: Pass sigcontext through wrapper to the user function.
2069 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
2071 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
2072 __libc_internal_tsd_set.
2074 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2076 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
2079 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2081 * internals.h: Align _pthread_descr_struct to 32 bytes.
2082 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
2085 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2087 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
2090 1999-07-09 Cristian Gafton <gafton@redhat.com>
2092 * Makefile (libpthread-routines): Add oldsemaphore routine.
2093 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
2094 sem_trywait, and sem_wait to GLIBC_2.1.
2095 * oldsemaphore.c: New file.
2096 * semaphore.c: Add default_symbol_versions for the changed functions.
2097 (__new_sem_init): Rename from sem_init.
2098 (__new_sem_post): Rename from sem_post.
2099 (__new_sem_wait): Rename from sem_wait.
2100 (__new_sem_trywait): Rename from sem_trywait.
2101 (__new_sem_getvalue): Rename from sem_getvalue.
2102 (__new_sem_destroy): Rename from sem_destroy.
2104 1999-06-23 Robey Pointer <robey@netscape.com>
2106 * internals.h: Added p_nextlock entry to separate queueing for a
2107 lock from queueing for a CV (sometimes a thread queues on a lock
2108 to serialize removing itself from a CV queue).
2109 * pthread.c: Added p_nextlock to initializers.
2110 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
2112 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
2114 * manager.c (pthread_handle_create): Free mmap region after stack
2115 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
2117 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2119 * man/pthread_cond_init.man: Correct example.
2120 Reported by Tomas Berndtsson <tomas@nocrew.org>.
2122 * linuxthreads.texi (Condition Variables): Likewise.
2124 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
2126 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
2127 casx not cas, also successful casx returns the old value in rd
2128 and not the new value.
2130 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
2132 * manager.c: If pthread_create() is given a NULL attribute
2133 and the thread manager runs with a realtime policy, set the
2134 scheduling policy of the newly created thread back to SCHED_OTHER.
2135 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
2136 initialize the schedpolicy field of new_thread->p_start_args
2137 to that of the calling thread.
2139 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
2141 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
2142 instruction does not allow memory element to use offset.
2144 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
2146 * manager.c (pthread_allocate_stack): Optimize initialization of new
2149 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
2150 Don't use initializer since it is all zeroes.
2151 (__libc_once_define): Likewise.
2153 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2155 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
2156 doesn't exist anymore.
2157 * sysdeps/i386/Implies: Likewise.
2158 * sysdeps/m68k/Implies: Likewise.
2159 * sysdeps/mips/Implies: Likewise.
2160 * sysdeps/powerpc/Implies: Likewise.
2161 * sysdeps/sparc/sparc32/Implies: Likewise.
2162 * sysdeps/sparc/sparc64/Implies: Likewise.
2164 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2166 * sysdeps/alpha/bits/semaphore.h: Removed.
2167 * sysdeps/powerpc/bits/semaphore.h: Removed.
2168 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2169 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2170 * Makefile (headers): Remove bits/semaphore.h.
2172 * semaphore.h: Define _pthread_descr if necessary.
2173 Don't include limits.h. Define SEM_VALUE_MAX directly.
2175 (sem_t): Protect element names with leading __.
2176 Add declarations for sem_close, sem_open, and sem_unlink.
2177 * semaphore.c: Adjust all functions for new element names.
2178 Define sem_close, sem_open, and sem_unlink.
2179 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2181 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2184 1999-03-16 H.J. Lu <hjl@gnu.org>
2186 * specific.c (pthread_key_delete): Check th->p_terminated to see
2187 if the thread is running.
2189 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2190 Added to GLIBC_2.0 for libc.so.
2192 1999-02-12 H.J. Lu <hjl@gnu.org>
2194 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2195 __libc_allocate_rtsig): Added to GLIBC_2.1.
2197 * internals.h (DEFAULT_SIG_RESTART): Removed.
2198 (DEFAULT_SIG_CANCEL): Removed.
2200 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2201 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2202 (__pthread_sig_restart, __pthread_sig_cancel,
2203 __pthread_sig_debug): Initialized.
2204 (pthread_initialize): Call init_rtsigs () to initialize
2207 1999-02-03 H.J. Lu <hjl@gnu.org>
2209 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2210 Don't restart the thread which sent REQ_DEBUG.
2211 (pthread_start_thread): Check if __pthread_sig_debug > 0
2214 * pthread.c (__pthread_initialize_manager): Suspend ourself
2215 after sending __pthread_sig_debug to gdb instead of
2216 __pthread_sig_cancel.
2218 1999-01-24 H.J. Lu <hjl@gnu.org>
2220 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2221 from mask if __pthread_sig_debug > 0.
2222 (pthread_handle_create): Increment __pthread_handles_num.
2224 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2225 * pthread.c (__pthread_initialize_manager): Likewise.
2227 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2228 instead of __libc_allocate_rtsig (2).
2229 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2230 instead of __pthread_sig_cancel.
2231 (pthread_handle_sigdebug): Fix comments.
2233 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2235 * manager.c (pthread_allocate_stack): Set
2236 __pthread_nonstandard_stacks if user-specified stack is used.
2238 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2240 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2241 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2243 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2245 * pthread.c: Use a third signal __pthread_sig_debug distinct
2246 from __pthread_sig_cancel to notify gdb when a thread is
2248 * manager.c: Likewise.
2249 * internals.h: Likewise.
2250 * signals.c: The implementation of sigwait(s) assumed that
2251 all signals in s have signal handlers already attached.
2252 This is not required by the standard, so make it work
2253 also if some of the signals have no handlers.
2255 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2257 * linuxthreads.texi: Remove pointers from first @node. Move old
2258 @node spec inside comment.
2260 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2262 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2265 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2267 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2268 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2270 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2272 * manager.c: Threads now send __pthread_sig_cancel on termination.
2273 Change clone call and signal masks.
2274 * thread.c (pthread_handle_sigrestart): Remove special code for
2276 (pthread_handle_sigcancel): In manager thread call
2277 __pthread_manager_sighandler.
2278 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2279 * sysdeps/i386/i686/pt-machine.h: Likewise.
2280 Patches by Xavier Leroy.
2282 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2284 * spinlock.c (__pthread_unlock): Don't crash if called for an
2285 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2287 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2290 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2292 * Examples/ex3.c: Wait until all threads are started before
2293 searching for the number to avoid race condition on very fast
2296 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2298 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2299 declaration since it's not needed.
2301 * sysdeps/pthread/pthread.h: Move internal functions to ...
2302 * internals.h: ...here.
2304 1998-12-02 H.J. Lu <hjl@gnu.org>
2306 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2307 SIGRTMIN is defined.
2308 (__pthread_sig_cancel): Likewise.
2310 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2312 * wrapsyscall.c: Include <sys/mman.h> for msync,
2313 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2314 Correct msync declaration.
2316 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2318 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2319 __libc_tsd_set): New macros for new interface.
2320 * no-tsd.c: New file, provide uninitialized defns of
2321 __libc_internal_tsd_get and __libc_internal_tsd_set.
2322 * Makefile (routines): Add no-tsd.
2324 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2326 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2327 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2328 __libc_internal_tsd_set): Move decls to ...
2329 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2332 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2333 __libc_internal_tsd_set): Make these pointers to functions, not
2334 functions; remove #pragma weak decls for them.
2335 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2336 Define static functions and initialized pointers to them.
2338 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2340 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2341 (CFLAGS-specific.c): Likewise.
2342 (CFLAGS-pthread.c): Likewise.
2343 (CFLAGS-ptfork.c): Likewise.
2344 (CFLAGS-cancel.c): Likewise.
2345 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2346 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2348 * mutex.c (pthread_mutex_init): Define as strong symbol.
2349 (pthread_mutex_destroy): Likewise.
2350 (pthread_mutex_trylock): Likewise.
2351 (pthread_mutex_lock): Likewise.
2352 (pthread_mutex_unlock): Likewise.
2353 (pthread_mutexattr_init): Likewise.
2354 (pthread_mutexattr_destroy): Likewise.
2355 (pthread_once): Likewise.
2356 * ptfork.c (pthread_atfork): Likewise.
2357 * specific.c (pthread_key_create): Likewise.
2358 (pthread_setspecific): Likewise.
2359 (pthread_getspecific): Likewise.
2361 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2363 * linuxthreads.texi: Fix punctuation after xref.
2365 1998-11-10 H.J. Lu <hjl@gnu.org>
2367 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2368 if it is defined in <linux/limits.h>.
2370 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2372 * spinlock.h (__pthread_trylock): Define inline.
2373 (__pthread_lock): Add extra parameter to declaration. Declare
2374 using internal_function.
2375 (__pthread_unlock): Declare using internal_function.
2376 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2377 of local variable self. Avoid recomputing self. Define using
2379 (__pthread_trylock): Remove.
2380 (__pthread_unlock): Define using internal_function.
2381 * cancel.c: Adjust for __pthread_lock interface change. Use already
2382 computed self value is possible.
2383 * condvar.c: Likewise.
2385 * manager.c: Likewise.
2386 * mutex.c: Likewise.
2387 * pthread.c: Likewise.
2388 * rwlock.c: Likewise.
2389 * semaphore.c: Likewise.
2390 * signals.c: Likewise.
2392 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2394 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2395 __ to field names of the struct.
2396 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2398 (pthread_attr_t): Likewise.
2399 (pthread_cond_t): Likewise.
2400 (pthread_condattr_t): Likewise.
2401 (pthread_mutex_t): Likewise.
2402 (pthread_mutexattr_t): Likewise.
2403 (pthread_rwlock_t): Likewise.
2404 (pthread_rwlockattr_t): Likewise.
2405 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2406 * cancel.c: Likewise.
2407 * condvar.c: Likewise.
2408 * manager.c: Likewise.
2409 * mutex.c: Likewise.
2410 * pthread.c: Likewise.
2411 * ptlongjmp.c: Likewise.
2412 * rwlock.c: Likewise.
2413 * spinlock.c: Likewise.
2415 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2417 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2420 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2423 * Makefile (libpthread-routines): Add pt-machine.
2424 * pt-machine.c: New file.
2425 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2426 yet defined. Use PT_EI in extern inline definitions.
2427 * sysdeps/arm/pt-machine.h: Likewise.
2428 * sysdeps/i386/pt-machine.h: Likewise.
2429 * sysdeps/i386/i686/pt-machine.h: Likewise.
2430 * sysdeps/m68k/pt-machine.h: Likewise.
2431 * sysdeps/mips/pt-machine.h: Likewise.
2432 * sysdeps/powerpc/pt-machine.h: Likewise.
2433 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2434 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2436 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2438 * semaphore.h: Include <sys/types.h> so that _pthread_descr
2441 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
2443 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2445 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2447 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2449 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2452 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2454 * signals.c (sigaction): Check that sig is less than NSIG to avoid
2455 array index overflow.
2457 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
2459 * sysdeps/pthread/semaphore.h: New file.
2461 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
2463 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2464 _LIBC_TSD_KEY_DL_ERROR.
2466 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
2468 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2469 * sysdeps/i386/pt-machine.h: Likewise.
2470 Suggested by Roland McGrath.
2472 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
2474 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2475 access thread data with non-constant offsets.
2476 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2479 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
2480 THREAD_SETMEM_NC definitions.
2482 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2484 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2486 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
2488 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2489 not already defined.
2490 (struct _pthread_descr_struct): Add p_self and p_nr field.
2491 * manager.c (__pthread_handles): Define second element to point
2493 (__pthread_handles_num): Initialize to 2.
2494 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2495 (pthread_start_thread): Likewise.
2496 (pthread_handle_create): Start search for free slot at entry 2.
2497 Initialize new fields p_self and p_nr.
2498 Call __clone with CLONE_PTRACE if available.
2499 (pthread_free): Call FREE_THREAD_SELF if available.
2500 * pthread.c (__pthread_initial_thread): Initialize new fields.
2501 (__pthread_manager_thread): Likewise.
2502 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2504 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2505 elements of the thread descriptor.
2506 * condvar.c: Likewise.
2507 * errno.c: Likewise.
2509 * manager.c: Likewise.
2510 * pthread.c: Likewise.
2511 * ptlongjmp.c: Likewise.
2512 * semaphore.c: Likewise.
2513 * signals.c: Likewise.
2514 * specific.c: Likewise.
2515 * spinlock.c: Likewise.
2517 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2519 * sysdeps/i386/useldt.h: New file.
2520 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2522 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2523 THREAD_SETMEM using __thread_self.
2524 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2526 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
2528 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2529 turned out that we didn't need to queue after all.
2531 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
2533 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2534 and wastes space; correct types.
2536 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
2538 * signals.c (sigaction): Handle NULL argument.
2540 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
2542 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2545 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2547 * Makefile (linuxthreads-version): Extract correct number from
2550 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
2552 * Banner: Bump version number to 0.8
2553 * FAQ.html: Many updates, in particular w.r.t. debugging.
2554 * manager.c: Support for non-default stacksize for
2555 LinuxThreads-allocated stacks;
2556 don't use guard pages for stacks with default size, rely on
2557 rlimit(RLIMIT_STACK) instead (it's cheaper).
2559 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2560 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2561 * condvar.c: Likewise.
2562 * internals.h: Likewise.
2563 * restart.h: Likewise.
2564 * signals.c: Likewise.
2565 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2567 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2569 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2570 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
2571 * Versions: Put __pthread_mutexattr_settype under version
2572 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
2573 __pthread_mutexattr_gettype.
2575 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2577 * sysdeps/pthread/bits/libc-lock.h: Make
2578 __pthread_mutexattr_settype weak. Don't make
2579 __pthread_mutexattr_setkind_np weak.
2581 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
2583 * manager.c (pthread_handle_create): Check whether sched_setscheduler
2584 call can succeed here.
2586 * mutex.c: Define __pthread_mutexattr_settype and make
2587 __pthread_mutexattr_setkind_np an alias.
2588 Likewise for __pthread_mutexattr_gettype.
2590 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2592 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2595 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
2597 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2599 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2601 * Examples/ex6.c: Include <unistd.h> for usleep.
2603 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2605 * Examples/ex4.c (main): Use exit, not pthread_exit.
2607 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
2609 * Versions: Add __pthread_mutexattr_gettype and
2610 __pthread_mutexattr_settype.
2611 * lockfile.c: Use __pthread_mutexattr_settype instead of
2612 __pthread_mutexattr_setkind_np.
2613 * mutex.c: Define __pthread_mutexattr_gettype and
2614 __pthread_mutexattr_settype.
2616 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2617 __pthread_mutexattr_settype.
2618 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2619 Use __pthread_mutexattr_settype.
2621 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
2623 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2624 * mutex.c: Define weak alias pthread_mutexattr_gettype and
2625 pthread_mutexattr_settype.
2626 * sysdeps/pthread/pthread.h: Declare these functions.
2627 Move pthread_sigmask and pthread_kill declaration in separate header.
2628 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2630 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
2632 * Makefile: Add rules to compile and run tests.
2633 * Examples/ex1.c: Little changes to fix warnings.
2634 * Examples/ex2.c: Likewise.
2635 * Examples/ex3.c: Likewise.
2636 * Examples/ex4.c: Likewise.
2637 * Examples/ex5.c: Likewise.
2638 * Examples/ex6.c: New file.
2640 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
2642 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2644 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2646 * attr.c: Include <string.h>.
2648 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
2650 * attr.c: Include errno.h. Use memcpy to copy sched_param.
2651 * internals.h: Include limits.h.
2652 * manager.c: Use memcpy to copy sched_param.
2653 * ptfork.c: Include errno.h.
2654 * pthread.c: Likewise.
2655 * semaphore.c: Likewise.
2656 * specific.c: Likewise.
2657 * spinlock.h: Likewise.
2658 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
2659 type definition to ...
2660 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
2662 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
2664 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2666 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2667 as macros as demanded in POSIX.1, Annex C.
2669 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
2671 * internals.h (struct pthread_request): For free use pthread_t
2672 instead of pthread_descr.
2673 * join.c (pthread_join): Pass thread_id, not th to manager.
2674 (pthread_detach): Likewise.
2675 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2676 (pthread_exited): Remove detached queue code.
2677 (pthread_handle_free): Expect thread ID parameter and use it to
2678 validate the thread decsriptor. Don't use detached queue.
2679 Patches by Xavier Leroy.
2681 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2683 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2684 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2685 __pthread_atfork, __pthread_key_create, __pthread_once.
2686 * internals.h: Doc fix.
2687 * pthread.c (__pthread_initialize): Define again.
2689 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
2691 * manager.c (pthread_exited): If thread is not detached put it on
2693 (pthread_handle_free): If thread is not on list with living threads
2694 search on list with detached threads.
2696 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2697 for new definition of pthread_rwlock_t.
2699 * spinlock.c: Correct test whether to compile
2700 __pthread_compare_and_swap or not.
2702 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
2704 * attr.c: Finish user stack support. Change locking code to be safe
2705 in situations with different priorities.
2706 * cancel.c: Likewise.
2707 * condvar.c: Likewise.
2708 * internals.h: Likewise.
2710 * manager.c: Likewise.
2711 * mutex.c: Likewise.
2712 * pthread.c: Likewise.
2713 * ptlongjmp.c: Likewise.
2714 * queue.h: Likewise.
2715 * rwlock.c: Likewise.
2716 * semaphore.c: Likewise.
2717 * semaphore.h: Likewise.
2718 * signals.c: Likewise.
2719 * spinlock.c: Likewise.
2720 * spinlock.h: Likewise.
2721 * sysdeps/pthread/pthread.h: Likewise.
2722 Patches by Xavier Leroy.
2724 * sysdeps/i386/i686/pt-machine.h: New file.
2726 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
2728 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2729 [sg]et_stackaddr prototypes always available.
2731 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2732 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2734 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
2736 * manager.c (pthread_free): Undo patch from 980430.
2737 Reported by David Wragg <dpw@doc.ic.ac.uk>.
2739 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
2741 * manager.c: Define __pthread_manager_adjust_prio and use it to
2742 increase priority when needed.
2743 * internals.h: Add prototype for __pthread_manager_adjust_prio.
2744 * mutex.c: Optimize mutexes to wake up only one thread.
2745 * pthread.c: Move PID of manager for global variable in structure
2747 Patches by Xavier Leroy.
2749 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
2751 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2753 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2755 * attr.c: Correct typo.
2757 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
2759 * manager.c (pthread_free): Unmap guard before the stack.
2760 Patch by Matthias Urlichs.
2762 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
2764 * manager.c (pthread_free): Detect already free child.
2765 Patch by Xavier Leroy, reported by Matthias Urlichs.
2767 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2769 * Makefile (linuxthreads-version): Renamed back from
2772 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
2774 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2777 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
2779 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2780 * internals.h: Add definitions for new spinlock implementation.
2781 * ptlongjmp.c: New file.
2782 * spinlock.c: New file.
2783 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2784 new function __pthread_acquire to prevent deadlocks with thread
2785 with different priorities.
2786 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2788 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2790 * manager.c (__pthread_manager): Reduce first argument to select
2791 to include just the needed file descriptor.
2793 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
2795 * manager.c: Fix last patch which caused core dumps.
2797 * pthread.c: Correctly handle missing SIGRTMIN.
2799 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2801 * libpthread.map: Add __libc_internal_tsd_get and
2802 __libc_internal_tsd_set. Add missing cancelable functions. Export
2803 libc internal versions of the cancelable functions.
2805 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
2807 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2809 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
2811 * attr.c: Implement pthread_attr_[gs]etguardsize,
2812 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2813 Change pthread_attr_init to have two interfaces.
2814 * internals.h (struct _pthread_descr_struct): Add new fields for
2816 * libpthread.map: Add names in GLIBC_2.1 section.
2817 * manager.c (pthread_handle_create): Implement guardsize and
2819 (pthread_free): Likewise.
2820 * pthread.c (pthread_create): Add new interface for changed
2822 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2823 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2826 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
2828 * manager.c: Enable resetting of the thread scheduling policy
2829 to SCHED_OTHER when the parent thread has a different one.
2831 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
2833 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2834 _POSIX_ASYNCHRONOUS_IO.
2836 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2838 * mutex.c: Implement new mutex types.
2840 * internals.h: Include <signal.h>.
2842 * libpthread.map: Add __erno_location and __h_errno_location.
2844 * errno.c: Return pointer to variable actually in use. This might
2845 not be the one in the thread structure.
2846 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2848 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2849 of manager thread structure.
2850 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2852 * pthread.c: Adapt initializer for thread structures.
2853 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2854 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2855 current thread to global variables.
2857 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
2859 * rwlock.c: New file.
2860 * Makefile (libpthread-routines): Add rwlock.
2861 * sysdeps/pthread/pthread.h: Define data structures and declare
2863 * libpthread.map: Add new functions.
2865 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
2867 * sysdeps/arm/pt-machine.h: New file; add ARM support.
2868 * sysdeps/arm/Implies: likewise.
2869 * README: Document it.
2871 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2873 * signals.c: Remove unneeded initializer for sigwaited, saving a
2876 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2878 * semaphore.c (sem_init): Set sem_spinlock only if available.
2880 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
2882 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2883 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2885 * Makefile: Update from LinuxThreads 0.7.
2886 * internals.h. Likewise.
2887 * manager.c: Likewise.
2888 * mutex.c: Likewise.
2889 * pthread.c: Likewise.
2890 * signals.c: Likewise.
2891 * specific.c: Likewise.
2892 * Examples/ex3.c: Likewise.
2894 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
2896 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2899 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
2901 * wrapsyscall.c: Add socket functions which are also cancelation
2904 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
2906 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2907 New functions for fast thread specific data within libc.
2909 * internals.h: Add new array p_libc_specific to struct
2910 _pthread_descr_struct.
2912 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2914 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
2916 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2917 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2919 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
2921 * internals.h (struct _pthread_descr_struct): Add definitions for
2922 two-level specific key handling.
2923 * manager.c (pthread_handle_create): Initialize specific memory array.
2924 * specific.c: Implement two-level key handling.
2925 * weaks.c: Don't provide dummy key handling.
2926 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2927 Add definition of __libc_key_t.
2928 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2930 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2931 PTHREAD_DESTRUCTOR_ITERATIONS.
2933 * manager.c (pthread_handle_create): Compare mmap result with
2936 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2937 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2939 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
2941 sysdeps/sparc -> sysdeps/sparc/sparc32
2942 sysdeps/sparc64 -> sysdeps/sparc/sparc64
2944 * internals.h: Change definition of THREAD_SELF to be an expression,
2945 not a statement that did a return.
2946 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2947 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2948 Follow Solaris and use a "system reserved" register (%g6) to hold
2949 the thread descriptor.
2950 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2952 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
2954 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
2955 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2956 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2958 * semaphore.c: Include spinlock.h only when needed.
2960 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2961 keys for entries not in use.
2963 * weaks.c: Implement key handling functions for real.
2965 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
2967 Initial sparc64-linux support:
2968 * sysdeps/sparc64/Implies: New file.
2969 * sysdeps/sparc64/pt-machine.h: Likewise.
2971 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
2973 * semaphore.c: Include spinlock.h at correct place.
2976 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
2978 The Great Bit File Move:
2979 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2980 * sysdeps/powerpc/semaphorebits.h: Likewise.
2981 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2982 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2983 * sysdeps/pthread/libc-lock.h: -> bits/
2984 * sysdeps/pthread/stdio-lock.h: Likewise.
2985 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2986 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2987 * semaphore.h: Likewise.
2988 * sysdeps/pthread/pthread.h: Likewise.
2990 * lockfile.c: <foo.h> -> <bits/foo.h>.
2991 * semaphore.h: Likewise.
2993 * Makefile: (headers): foo.h -> bits/foo.h.
2994 * sysdeps/pthread/Makefile: Likewise.
2996 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2998 * semaphore.c (sem_init): Set sem_spinlock only if available.
3000 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
3003 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
3005 Update from LinuxThreads 0.6.
3007 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
3008 and __sched_get_priority_min instead of names without `__'.
3010 * manager.c: Rewrite large parts to implement opaque pthread_t.
3012 * cancel.c: Adapt for opaque pthread_t type.
3013 * condvar.c: Likewise.
3014 * errno.c: Likewise.
3016 * mutex.c: Likewise.
3017 * pthread.c: Likewise.
3018 * signals.c: Likewise.
3019 * specific.c: Likewise.
3020 * restart.h: Likewise.
3021 * queue.h: Likewise.
3022 * Examples/ex3.c: Likewise.
3023 * Examples/ex4.c: Likewise.
3024 * sysdeps/pthread/pthread.h: Likewise.
3026 * pthread.c: Accumulate time for all threads in thread manager.
3028 * semaphore.c: Implement fallback implementation for architectures
3029 sometimes missing compare-exchange operations.
3031 * cancel.c (pthread_cancel): Validate handle argument.
3032 * join.c (pthread_join): Likewise.
3033 (pthread_detach): Likewise.
3034 * signals.c (pthread_kill): Likewise.
3036 * spinlock.h (acquire): Use __sched_yield not sched_yield.
3038 * queue.h (enqueue): Enqueue thread according to priority.
3040 * internals.c (struct pthread_start_args): New struct for passing
3041 args to cloning function.
3042 (struct _pthread): Rename to _pthread_descr_struct and adapt for
3045 * Examples/Makefile (clean): Pass -f option to rm.
3047 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
3048 and define TEST_FOR_COMPARE_AND_SWAP.
3049 * sysdeps/i386/i486/pt-machine.h: Removed.
3051 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
3054 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
3056 * restart.h (suspend): Clear p_signal before suspending.
3057 (suspend_with_cancellation): Likewise.
3058 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
3060 * weaks.c: Make __pthread_key_create return 1.
3061 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
3062 __libc_getspecific, __libc_setspecific, and __libc_key_t.
3063 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
3066 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
3068 * sysdeps/sparc/pt-machine (RELEASE): Fix.
3070 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
3072 * sysdeps/powerpc/Implies: Added.
3073 * sysdeps/powerpc/pt-machine.h: Added.
3074 * sysdeps/powerpc/semaphorebits.h: Added.
3076 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
3078 * pthread.c (__pthread_initial_thread): Correct
3080 (__pthread_manager_thread): Likewise.
3081 Reported by Andreas Jaeger.
3083 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
3085 Since sigset_t no longer fits in a register, we can't pass in the
3086 thread's initial mask so easily. Take this opportunity to simplify
3087 the clone implementation by only accepting a single void* argument.
3089 * manager.c (__pthread_manager): Put thread vitals in the thread
3090 struct instead of as arguments through clone.
3091 (pthread_start_thread): Look for them there.
3092 * internals.h (struct _pthread): Add p_initial_fn,
3093 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
3094 * pthread.c (pthread_initialize_manager): Revise clone invocation.