1 2001-03-18 Ulrich Drepper <drepper@redhat.com>
3 * Makefile: When generating DSO link with libc_nonshared.a.
5 2001-02-26 Jakub Jelinek <jakub@redhat.com>
7 * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
9 2001-02-23 Jakub Jelinek <jakub@redhat.com>
11 * internals.h (__pthread_init_max_stacksize): New prototype.
12 * attr.c (__pthread_attr_setstacksize): Call
13 __pthread_init_max_stacksize if not yet initialized.
14 * pthread.c (__pthread_init_max_stacksize): New function.
15 (__pthread_initialize_manager): Call it.
16 Patch by <dtc@cmucl.cons.org>.
18 2001-03-16 Ulrich Drepper <drepper@redhat.com>
20 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
22 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
24 * shlib-versions: Add rule for Linux on 64 bit S/390.
25 * sysdeps/s390/s390-64/pt-machine.h: New file.
26 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
28 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
30 * sysdeps/s390/pt-machine.h: Move to...
31 * sysdeps/s390/s390-32/pt-machine.h: ...here.
32 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
34 2001-03-15 Ulrich Drepper <drepper@redhat.com>
36 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
37 * attr.c: Implement pthread_getattr_np.
38 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
39 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
40 * manager.c (pthread_handle_create): Initialize p_inheritsched.
42 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
44 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
47 2001-02-20 Hans Boehm <hans_boehm@hp.com>
49 * manager.c (manager_mask): Removed static vesion. Now always local
50 to __pthread_manager().
51 (manager_mask_all): Removed completely.
52 (__pthread_manager): Remove manager_mask_all initialization.
53 (pthread_handle_create): Remove code to set and reset signal mask
54 around __clone2() calls.
56 2001-02-17 Jakub Jelinek <jakub@redhat.com>
58 * spinlock.c (__pthread_lock): Force lock->__status to be read from
61 2001-02-10 Andreas Jaeger <aj@suse.de>
63 * Makefile (extra-objs): New.
65 2001-02-09 Jakub Jelinek <jakub@redhat.com>
67 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
68 __pthread_initialize_minimal prototype.
70 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
72 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
74 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
76 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
78 2001-02-06 Ulrich Drepper <drepper@redhat.com>
80 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
81 broken code. Patch by Jes Sorensen.
83 2001-02-06 Andreas Jaeger <aj@suse.de>
85 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
87 * internals.h: ...here.
89 2001-02-05 Jes Sorensen <jes@linuxcare.com>
91 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
93 2001-02-02 Ulrich Drepper <drepper@redhat.com>
95 * Versions: Remove __pthread_initialize_minimal.
97 2001-02-01 Ulrich Drepper <drepper@redhat.com>
99 * Makefile: Add rules to build crti.o and make it being used in
100 building libpthread.so.
101 * sysdeps/i386/Makefile: New file.
102 * sysdeps/pthread/pt-initfini.c: New file.
104 * pthread.c: Cleanups.
106 2001-01-28 Andreas Jaeger <aj@suse.de>
108 * oldsemaphore.c (__old_sem_init): Adjust for last change.
109 * sysdeps/pthread/bits/libc-lock.h: Likewise.
110 * spinlock.c: Likewise.
112 2001-01-28 Ulrich Drepper <drepper@redhat.com>
114 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
115 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
116 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
117 * pthread.c: Likewise.
118 * spinlock.h: Likewise.
119 * sysdeps/pthread/pthread.h: Likewise.
121 2001-01-26 Ulrich Drepper <drepper@redhat.com>
123 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
124 as struct __pthread_attr_s.
126 * semaphore.h (sem_t): Cleanup namespace, rename status and
129 2001-01-13 Jakub Jelinek <jakub@redhat.com>
131 * pthread.c (pthread_onexit_process): Clear
132 __pthread_manager_thread_bos after freeing it.
133 * Makefile (tests): Add ex16.
134 * Examples/ex16.c: New file.
136 2001-01-11 Jakub Jelinek <jakub@redhat.com>
138 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
140 * pthread.c (pthread_exit_process): Rename to...
141 (pthread_onexit_process): ...this.
142 (pthread_atexit_process, pthread_atexit_retcode): New.
143 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
144 and only if HAVE_Z_NODELETE is not defined.
145 (__pthread_initialize_manager): Register pthread_atexit_retcode
148 2001-01-11 Ulrich Drepper <drepper@redhat.com>
150 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
152 2001-01-11 Jakub Jelinek <jakub@redhat.com>
154 * Makefile (tests): Add ex15.
155 * Examples/ex15.c: New test.
157 2001-01-08 Ulrich Drepper <drepper@redhat.com>
159 * pthread.c (pthread_exit_process): Free memory allocated for
162 2000-12-31 Ulrich Drepper <drepper@redhat.com>
164 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
165 (pthread_free): Always unmap the stack. It's safe now that we don't
166 use MAP_FIXED to allocate stacks.
168 2000-12-31 Ulrich Drepper <drepper@redhat.com>
170 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
172 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
174 2000-11-15 Wolfram Gloger <wg@malloc.de>
176 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
177 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
179 2000-12-27 Andreas Jaeger <aj@suse.de>
181 * Examples/ex13.c: Make local functions static.
182 * ecmutex.c: Likewise.
183 * joinrace.c: Likewise.
184 * Examples/ex14.c: Likewise.
186 * Examples/ex2.c: Make local functions static; reformat.
187 * Examples/ex1.c: Likewise.
188 * Examples/ex4.c: Likewise.
189 * Examples/ex5.c: Likewise.
190 * Examples/ex7.c: Likewise.
192 * oldsemaphore.c: Add prototypes to shut up GCC.
193 * pt-machine.c: Likewise.
195 * weaks.c: Add prototype for pthread_exit.
197 * internals.h: Add some prototypes, format prototypes and add
199 Move __libc_waitpid prototype to include/sys/wait.h.
201 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
203 * specific.c: Likewise.
204 * ptfork.c: Likewise.
206 * lockfile.c: Include internals.h to get prototypes.
207 * events.c: Likewise.
208 * sysdeps/alpha/pspinlock.c: Likewise.
209 * sysdeps/arm/pspinlock.c: Likewise.
210 * sysdeps/hppa/pspinlock.c: Likewise.
211 * sysdeps/i386/pspinlock.c: Likewise.
212 * sysdeps/ia64/pspinlock.c: Likewise.
213 * sysdeps/m68k/pspinlock.c: Likewise.
214 * sysdeps/mips/pspinlock.c: Likewise.
215 * sysdeps/powerpc/pspinlock.c: Likewise.
216 * sysdeps/s390/pspinlock.c: Likewise.
217 * sysdeps/sh/pspinlock.c: Likewise.
218 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
219 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
220 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
222 2000-12-27 Ulrich Drepper <drepper@redhat.com>
224 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
225 (__pthread_attr_getstack): Return correct address.
226 Add warnings for using pthread_attr_getstackaddr and
227 pthread_attr_setstackaddr.
229 2000-12-26 Ulrich Drepper <drepper@redhat.com>
231 * Examples/ex6.c (test_thread): Make static.
232 * Examples/ex12.c (test_thread): Make static and add noreturn
235 2000-12-18 Jes Sorensen <jes@linuxcare.com>
237 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
238 and compare_and_swap_with_release_semantics returns int not long.
240 2000-12-17 Andreas Jaeger <aj@suse.de>
242 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
244 * sysdeps/arm/pt-machine.h (testandset): Likewise.
245 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
246 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
247 * sysdeps/sh/pt-machine.h (testandset): Likewise.
248 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
249 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
251 2000-12-17 Ulrich Drepper <drepper@redhat.com>
253 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
254 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
256 2000-12-17 Andreas Jaeger <aj@suse.de>
258 * internals.h: Add prototypes for testandset and
259 __compare_and_swap to shut up gcc warnings.
261 2000-12-06 Wolfram Gloger <wg@malloc.de>
263 * join.c (pthread_detach): Allow case where the thread has already
266 2000-12-05 Andreas Jaeger <aj@suse.de>
268 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
269 * sysdeps/mips/pt-machine.h (testandset): Likewise.
270 (__compare_and_swap): Likewise.
271 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
273 2000-11-20 Jakub Jelinek <jakub@redhat.com>
275 * Examples/ex3.c (main): Cast int to long before casting to void *.
276 (search): Cast void * to long, not int.
277 * Examples/ex8.c (main, thread): Similarly.
278 * Examples/ex11.c (main): Similarly.
279 * Examples/ex14.c (worker, do_test): Similarly.
280 * ecmutex.c (worker, do_test): Similarly.
281 (nlocks): Cast to int.
283 2000-11-08 Bruce Mitchener <bruce@cubik.org>
285 * linuxthreads.texi: Add documentation for pthreads attributes
286 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
287 patch. Document pthread_[sg]etconcurrency(). Mark
288 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
290 2000-11-07 Ulrich Drepper <drepper@redhat.com>
292 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
294 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
295 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
297 2000-11-06 Ulrich Drepper <drepper@redhat.com>
299 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
300 not doing it right now.
301 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
303 2000-10-30 Ulrich Drepper <drepper@redhat.com>
305 * Examples/ex4.c (main): Don't use exit() to avoid warning with
308 2000-10-29 Ulrich Drepper <drepper@redhat.com>
310 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
311 here. Reported by Bruce Mitchener <bruce@cubik.org>.
313 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
314 discussing mutexes. (As per the Unix98 name for the API.)
315 Changes documentation for pthread_mutexattr_setkind_np() and
316 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
317 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
318 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
319 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
320 Begins to introduce discussion of the ``timed'' mutex type. This
321 discussion is currently incomplete.
322 Patch by Bruce Mitchener <bruce@cubik.org>.
324 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
325 Yutaka Niibe <gniibe@chroot.org>
327 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
328 has restrictions, use register.
330 2000-10-23 Andreas Schwab <schwab@suse.de>
332 * Examples/ex14.c (TIMEOUT): Override default timeout.
334 2000-10-16 Ulrich Drepper <drepper@redhat.com>
336 * specific.c: Protect tsd array modification in thread data
337 structures by getting the thread lock in pthread_key_delete and
338 __pthread_destroy_specifics.
339 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
341 2000-10-12 Alan Modra <alan@linuxcare.com.au>
343 * sysdeps/pthread/bits/initspin.h: New file.
344 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
345 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
346 (__pthread_alt_init_lock): Likewise.
347 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
349 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
351 * oldsemaphore.c (__old_sem_init): Release lock with
352 LT_SPINLOCK_INIT, not zero.
353 * spinlock.c (__pthread_unlock): Likewise.
354 (__pthread_alt_lock): Likewise.
355 (__pthread_alt_timedlock): Likewise.
356 (__pthread_alt_unlock): Likewise.
357 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
358 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
359 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
360 LT_SPINLOCK_INIT do initialize spinlocks not 0.
362 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
364 * shlib-versions: Add version definitions for hppa-linux.
366 2000-10-12 Alan Modra <alan@linuxcare.com.au>
368 * sysdeps/hppa/pspinlock.c: New file.
369 * sysdeps/hppa/pt-machine.h: New file.
370 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
372 2000-10-05 Jakub Jelinek <jakub@redhat.com>
374 * mutex.c (__pthread_mutex_destroy): Correct test of
375 busy mutex for mutexes using alternate fastlocks.
376 Patch by dtc@cmucl.cons.org.
378 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
380 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
382 2000-09-28 Ulrich Drepper <drepper@redhat.com>
384 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
385 test for owner first.
386 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
388 * cancel.c (pthread_cancel): Don't do anything if cancelation is
391 2000-09-26 Ulrich Drepper <drepper@redhat.com>
393 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
394 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
396 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
397 _POSIX_MONOTONIC_CLOCK.
399 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
402 2000-09-20 Andreas Jaeger <aj@suse.de>
404 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
405 "testrtsig.h" conditional.
407 2000-09-11 Ulrich Drepper <drepper@redhat.com>
409 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
410 pthread_attr_setstack.
411 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
412 pthread_attr_setstack.
413 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
415 2000-09-05 Ulrich Drepper <drepper@redhat.com>
417 * Examples/ex14.c: New file.
418 * Makefile (tests): Add ex14.
420 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
421 mutex. Patch by dtc@cmucl.cons.org.
423 * ecmutex.c: New file.
424 * Makefile (tests): Add ecmutex.
426 2000-09-04 H.J. Lu <hjl@gnu.org>
428 * attr.c (__pthread_attr_setguardsize): Use page_roundup
429 instead of roundup to round up to the page size.
431 2000-09-03 Mark Kettenis <kettenis@gnu.org>
433 * manager.c (pthread_exited): Correctly report event as TD_REAP
434 instead of TD_DEATH. Fix comments.
436 2000-09-03 Ulrich Drepper <drepper@redhat.com>
438 * spinlock.h (testandset): Add cast to avoid warning.
439 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
441 2000-09-02 Andreas Jaeger <aj@suse.de>
443 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
446 2000-09-01 Ulrich Drepper <drepper@redhat.com>
448 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
449 Fix typo in last patch (_mode -> _flags).
451 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
452 Provide definition which respects _IO_USER_LOCK flag.
454 2000-08-30 Ulrich Drepper <drepper@redhat.com>
456 * manager.c (pthread_allocate_stack): Clear descriptor only if not
459 2000-08-25 Ulrich Drepper <drepper@redhat.com>
461 * Makefile: Add rules to build and run unload.
462 * unload.c: New file.
464 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
466 * sysdeps/pthread/pthread.h
467 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
468 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
470 2000-08-24 Andreas Jaeger <aj@suse.de>
472 * Examples/ex13.c: Include <string.h> for strerror prototype and
473 <stdlib.h> for abort prototype.
474 (pthr_cond_signal_mutex): Rewrite to silence GCC.
475 (thread_start): Remove unused variable err.
476 (main): Silence GCC warnings.
478 2000-08-22 Andreas Jaeger <aj@suse.de>
480 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
482 * Makefile (tests): Add ex13.
484 2000-08-20 Ulrich Drepper <drepper@redhat.com>
486 * semaphore.h: Add restrict where required by AGd4.
487 * sysdeps/pthread/pthread.h: Likewise.
488 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
490 2000-08-15 Ulrich Drepper <drepper@redhat.com>
492 * Makefile (tests): Add ex12. Add rule to build it.
493 * Examples/ex12.c: New file.
495 2000-08-13 Ulrich Drepper <drepper@redhat.com>
497 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
498 even though the implementation is not quite complete (but it reports
499 it). Define _POSIX_MESSAGE_PASSING to -1.
500 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
502 2000-08-12 Andreas Jaeger <aj@suse.de>
504 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
506 (__compare_and_swap): Likewise.
507 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
509 2000-08-10 Ulrich Drepper <drepper@redhat.com>
511 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
512 p_h_errnop correctly and not to NULL.
514 2000-08-05 Ulrich Drepper <drepper@redhat.com>
516 * Banner: Bump version number to 0.9.
518 2000-08-04 Ulrich Drepper <drepper@redhat.com>
520 * Makefile (tests): Add tststack. Add rule to build the program.
521 * tststack.c: New file.
523 * internals.h: Declare __pthread_max_stacksize.
524 * pthread.c (__pthread_max_stacksize): New variable.
525 (__pthread_initialize_manager): Determine __pthread_initialize_manager
527 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
528 (pthread_allocate_stack): Allow kernel to choose stack address if
529 FLOATING_STACKS. This also handles variable-sized stacks.
530 Always allocate stack and guardpage together. Use mprotect to
531 change guardpage access.
532 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
535 * attr.c (__pthread_attr_setstacksize): Also test value against
538 * manager.c (__pthread_nonstandard_stacks): Define only if
539 THREAD_SELF is not defined.
540 (pthread_allocate_stack): Always initialize gardaddr to a correct
542 (pthread_handle_create): Unmap thread with one call.
543 (pthread_free): Remove test for initial thread before removing stack.
544 Unmap stack with one call.
546 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
547 1 to avoid removing the stack.
549 2000-07-27 Jes Sorensen <jes@linuxcare.com>
551 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
552 load of spin lock to prime the cache before the atomic compare and
553 exchange operation (cmpxchg4). This avoids the spinning on the
554 cmpxchg4 instruction and reduces movement of the cache line back
555 and forth between the processors (explanation by Asis K. Mallick
556 from Intel). This basically makes the implementation operate the
557 same as the Linux kernel implementation.
559 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
560 * sysdeps/ia64/pspinlock.c: New file.
562 2000-08-03 Ulrich Drepper <drepper@redhat.com>
564 * pthread.c: Move definition of __pthread_set_own_extricate_if...
565 * spinlock.h: ...here. Remove locking.
566 * internals.h: Remove __pthread_set_own_extricate_if prototype.
568 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
569 (rwlock_rd_extricate_func): Don't determine self, let
570 __pthread_lock do it.
571 (rwlock_wr_extricate_func): Likewise.
572 (rwlock_have_already): Optimize *pself handling a bit.
574 * mutex.c: Use __builtin_expect.
575 * pthread.c: Likewise.
577 2000-08-02 Andreas Jaeger <aj@suse.de>
579 * sysdeps/s390/pspinlock.c: New file.
580 * sysdeps/s390/pt-machine.h: New file.
581 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
583 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
585 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
587 * sysdeps/mips/pt-machine.h (testandset): Likewise.
589 2000-07-26 Andreas Jaeger <aj@suse.de>
591 * pthread.c: Initialize p_sem_avail.
593 2000-07-25 Ulrich Drepper <drepper@redhat.com>
595 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
596 * semaphore.c: Handle spurious wakeups.
598 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
599 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
601 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
602 (__pthread_wait_for_restart): Likewise.
604 * condvar.c (pthread_cond_wait): Also check whether thread is
605 cancelable before aborting loop.
606 (pthread_cond_timedwait): Likewise.
608 * signals.c (pthread_sighandler): Remove special code to restrore
610 (pthread_sighandler_t): Likewise.
612 2000-07-25 Mark Kettenis <kettenis@gnu.org>
614 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
615 * pthread.c: Include <resolv.h>.
616 (_res): Undefine. Add extern declaration.
618 2000-07-24 Ulrich Drepper <drepper@redhat.com>
620 * pthread.c (__pthread_initial_thread): Update initializer.
621 (__pthread_manager_thread): Likewise.
622 (pthread_initialize): Move setrlimit call to...
623 (__pthread_initialize_manager): ...here.
624 (__pthread_reset_main_thread): Reset also soft limit on stack size.
626 * condvar.c: Handle spurious wakeups. [PR libc/1749].
627 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
629 2000-07-21 Ulrich Drepper <drepper@redhat.com>
631 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
632 __compare_and_swap to define testandset.
633 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
634 Define IMPLEMENT_TAS_WITH_CAS.
636 2000-07-20 Ulrich Drepper <drepper@redhat.com>
638 * Makefile: Pass -z nodelete to linker for libpthread.so
639 generation if it understand this option.
641 2000-07-18 Mark Kettenis <kettenis@gnu.org>
643 * manager.c (pthread_handle_create): Remove initialization of
644 new_thread->p_res._sock.
646 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
648 Bugfixes to the variant of the code for machines with no compare
651 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
652 node was not being properly enqueued, due to failing to update
653 the lock->__status field.
655 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
656 being set inappropriately, causing the suspend function to be called
657 with a null self pointer and crash.
659 2000-07-18 Ulrich Drepper <drepper@redhat.com>
661 * spinlock.h (__pthread_alt_trylock): Fix code used if no
662 compare&swap is available.
664 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
667 * pthread.c (pthread_initialize): Don't use sysconf to determine
668 whether the machine has more than one processor.
670 * spinlock.c (__pthread_alt_timedlock): Add back one of the
671 removed thread_self calls.
673 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
675 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
676 __compare_and_swap to compare_and_swap in code which assumes
677 compare swap is available.
679 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
681 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
682 bug whereby thr field of waitnode structure would not be correctly
683 set unless a null self pointer is passed to the functions.
684 Eliminated redundant calls to thread_self().
686 2000-07-18 Jakub Jelinek <jakub@redhat.com>
688 * pthread.c (__pthread_initialize_manager): Lock
689 __pthread_manager_thread.p_lock before calling clone.
691 2000-05-05 H.J. Lu <hjl@gnu.org>
693 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
694 have acquire semantics.
695 (__compare_and_swap_with_release_semantics): New inline
697 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
699 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
701 * manager.c: Fix the problem with signals at startup.
702 Change the way that thread stacks are allocated on IA64.
703 Clean up some of the guard page allocation stuff.
705 1999-12-19 H.J. Lu <hjl@gnu.org>
707 * internals.h (page_roundup): New.
708 * attr.c (__pthread_attr_setguardsize); Use page_roundup
710 * manager.c (pthread_allocate_stack): Make sure guardaddr is
711 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
714 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
716 * manager.c (pthread_allocate_stack): Unmap the stack top
717 if failed to map the stack bottom.
719 (pthread_free): Fix the guard page.
721 * pthread.c (pthread_initialize): Set rlimit correctly for
722 NEED_SEPARATE_REGISTER_STACK.
724 1999-12-16 H.J. Lu <hjl@gnu.org>
726 * pthread.c (__pthread_initialize_manager): Pass
727 __pthread_manager_thread_bos instead of
728 __pthread_manager_thread_tos to __clone2.
730 1999-12-16 H.J. Lu <hjl@gnu.org>
732 * manager.c (pthread_allocate_stack): Correct the calculation
733 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
736 1999-12-13 H.J. Lu <hjl@gnu.org>
738 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
739 bit after setting ar.ccv.
741 1999-12-12 H.J. Lu <hjl@gnu.org>
743 * manager.c (pthread_allocate_stack): Make the starting
744 address of the stack bottom page aligned. FIXME: it may
745 need changes in other places.
746 (pthread_handle_create): Likewise.
748 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
750 * manager.c (pthread_allocate_stack): Handle
751 NEED_SEPARATE_REGISTER_STACK.
752 (pthread_handle_create): Likewise.
753 * pthread.c (__pthread_initialize_manager): Likewise.
755 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
757 1999-12-02 H.J. Lu <hjl@gnu.org>
759 * sysdeps/ia64/pt-machine.h: New.
761 2000-07-13 Ulrich Drepper <drepper@redhat.com>
763 * wrapsyscall.c: Mark non-__ protected names as weak.
766 2000-07-12 Bruno Haible <haible@clisp.cons.org>
768 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
770 2000-07-12 Ulrich Drepper <drepper@redhat.com>
772 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
773 Add tests also to new alternative spinlock implementation.
774 * spinlock.h: Likewise.
775 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
777 2000-07-06 Ulrich Drepper <drepper@redhat.com>
779 * Version: Export __sigaction.
780 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
782 * pthread.c: Use __libc_sigaction instead of __sigaction.
784 * condvar.c: Implement pthread_condattr_getpshared and
785 pthread_condattr_setpshared.
786 * mutex.c: Implement pthread_mutexattr_getpshared and
787 pthread_mutexattr_setpshared.
788 * Versions: Export new functions.
789 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
791 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
792 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
795 2000-07-04 Greg McGary <greg@mcgary.org>
797 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
798 pragmas. Include bp-sym.h only if _LIBC.
800 2000-07-04 Ulrich Drepper <drepper@redhat.com>
802 * spinlock.c (__pthread_unlock): Properly place write barrier.
803 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
805 2000-07-03 Ulrich Drepper <drepper@redhat.com>
807 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
808 faster on SMP systems. No more emulation of compare&swap for adaptive
810 * spinlock.h: Likewise.
811 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
812 Replace fast with adaptive mutex.
813 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
814 * condvar.c: Likewise.
815 * pthread.c: Define and initialize __pthread_smp_kernel variable.
816 * internals.h: Declare __pthread_smp_kernel.
817 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
818 _pthread_fastlock structure.
819 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
821 * pthread.c: Remove initialization to zero from global variables.
823 2000-06-29 Jakub Jelinek <jakub@redhat.com>
825 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
827 2000-06-28 Greg McGary <greg@mcgary.org>
829 * weaks.c: Wrap BP_SYM () around weak extern declarations of
830 pthread functions that have pointers in their return+arg signatures.
832 2000-06-27 Greg McGary <greg@mcgary.org>
834 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
835 extern declarations of pthread functions that have pointers in
836 their return+arg signatures.
838 2000-06-26 Ulrich Drepper <drepper@redhat.com>
840 * Makefile (tests): Add ex11. Add rules to build it.
841 * Examples/ex11.c: New file.
842 * rwlock.c: Fix complete braindamaged previous try to implement
845 * spinlock.c: Pretty print.
847 2000-06-25 Ulrich Drepper <drepper@redhat.com>
849 * Makefile (tests): Add ex10. Add rules to build it.
850 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
851 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
852 * condvar.c (pthread_cond_wait): Allow mutex of kind
853 PTHREAD_MUTEX_TIMED_NP.
854 (pthread_cond_timedwait_relative): Likewise.
855 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
856 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
857 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
858 (__pthread_mutex_lock): Use __pthread_alt_lock for
859 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
860 (__pthread_mutex_timedlock): New function.
861 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
862 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
863 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
864 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
865 * spinlock.c: Implement alternate fastlocks.
866 * spinlock.h: Add prototypes.
867 * Examples/ex10.c: New file.
868 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
869 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
871 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
872 (__pthread_rwlock_timedrdlock): New function.
873 (__pthread_rwlock_timedwrlock): New function.
874 Use laternate fastlock function everywhere.
876 2000-06-21 Andreas Jaeger <aj@suse.de>
878 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
881 * join.c: Include <stdlib.h> for exit prototype.
883 2000-06-20 Ulrich Drepper <drepper@redhat.com>
885 * sysdeps/i386/useldt.h: Include <stdlib.h>.
887 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
888 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
890 * Makefile (libpthread-routines): Add barrier.
891 (tests): Add ex9. Add rule to build ex9.
892 * Versions: Export barrier functions.
893 * barrier.c: New file.
894 * Examples/ex9.c: New file.
895 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
896 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
897 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
899 2000-06-19 H.J. Lu <hjl@gnu.org>
901 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
902 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
903 (compare_and_swap_with_release_semantics): New. Default to
904 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
907 * spinlock.c (__pthread_unlock): Call
908 compare_and_swap_with_release_semantics () instead of
911 2000-06-19 Ulrich Drepper <drepper@redhat.com>
913 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
915 * sysdeps/pthread/timer_delete.c: Likewise.
916 * sysdeps/pthread/timer_getoverr.c: Likewise.
917 * sysdeps/pthread/timer_gettime.c: Likewise.
918 * sysdeps/pthread/timer_settime.c: Likewise.
920 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
922 Timer nodes are now reference counted, and can be marked
923 as deleted. This allows for the safe release of the global mutex
924 in the middle without losing the timer being operated on.
926 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
927 member is now an enum with three values, so that an intermediate
928 state can be represented (deleted but not free for reuse yet).
929 New refcount member added.
930 * sysdeps/pthread/timer_routines.c: Likewise.
932 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
933 timer_valid): New inline functions added.
935 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
936 restructured, recursive deadlock bug fixed.
938 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
939 timer_addref to ensure that timer won't be deleted while mutex is not
940 held. Also uses timer_invalid to perform validation of timer handle.
941 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
942 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
944 2000-06-14 Ulrich Drepper <drepper@redhat.com>
946 * shlib-versions: Add entry for SH.
947 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
949 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
951 A few optimizations. Got rid of unnecessary wakeups of timer threads,
952 tightened up some critical regions and micro-optimized some list
955 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
956 Returns int value now to indicate whether timer was queued at head.
957 * sysdeps/pthread/posix-timer.h: Likewise.
958 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
959 new return value from __timer_thread_queue_timer to avoid waking
960 up timer thread unnecessarily.
962 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
963 inuse flag, because this requires mutex to be held. Callers updated
964 to do the check when they have the mutex.
965 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
967 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
968 regions: avoids making system calls while holding timer mutex, and
969 a few computations were moved outside of the mutex as well.
970 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
972 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
973 to list_unlink_ip, meaning idempotent. Pointer manipulation
974 changed to get better better code out of gcc.
975 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
976 version of list_unlink added here.
977 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
978 function in all places: idempotent one for timers, non-idempotent
979 one for thread nodes.
980 * sysdeps/pthread/timer_settime: Likewise.
981 * sysdeps/pthread/timer_routines.c: Likewise.
983 2000-06-13 Ulrich Drepper <drepper@redhat.com>
985 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
986 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
988 * sysdeps/pthread/Makefile: Remove tests definition.
990 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
991 Yutaka Niibe <gniibe@chroot.org>
993 * sysdeps/sh/pspinlock.c: New file.
994 * sysdeps/sh/pt-machine.h: New file.
996 2000-06-12 Ulrich Drepper <drepper@redhat.com>
998 * Makefile (tests): Add joinrace.
1000 * Examples/ex6.c: Test return value of pthread_join.
1002 2000-06-11 Geoff Keating <geoffk@cygnus.com>
1004 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
1005 (__pthread_spin_trylock): Implement.
1006 (__pthread_spin_unlock): Implement.
1007 (__pthread_spin_init): Implement.
1008 (__pthread_spin_destroy): Implement.
1010 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1012 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1013 really append the entry.
1015 2000-06-10 Andreas Jaeger <aj@suse.de>
1017 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1019 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1021 * sysdeps/pthread/timer_create.c: Thread matching now done on
1022 clock type as well as thread attributes.
1023 There are individual global signal-delivering threads for
1024 different clock types.
1025 * sysdeps/pthread/posix-timer.h: Likewise.
1026 * sysdeps/pthread/timer_routines.c: Likewise.
1028 * sysdeps/pthread/timer_routines.c: Thread allocation and
1029 deallocation function now remembers to put thread on active
1030 list and remove from active list.
1031 Thus now the feature of binding multiple timers
1032 to a single thread actually works.
1034 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1036 * pthread.c (__pthread_create_2_1): Optimize a bit.
1038 * internals.h (invalid_handle): Also test for p_terminated != 0.
1039 (nonexisting_handle): New function. Same as old invalid_handle.
1040 * join.c (pthread_join): Use nonexisting_handle instead of
1041 invalid_handle to test for acceptable thread handle.
1042 * manager.c (pthread_handle_free): Likewise.
1043 * joinrace.c: New file.
1044 Reported by Permaine Cheung <pcheung@cygnus.com>.
1046 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1048 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1049 Correct handling of matching variable.
1051 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1054 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1055 Be prepared for empty timer list.
1057 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1058 CPUTIME clock ID. Add support for thread clocks.
1060 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1061 subtraction were switched.
1063 * sysdeps/pthread/timer_routines.c (init_module): Use
1064 THREAD_MAXNODES threads.
1066 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1067 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1068 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1069 with sigqueueinfo is this system call is available.
1071 * sysdeps/pthread/timer_create.c (timer_create): Allow
1072 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1074 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1076 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1078 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1080 * sysdeps/pthread/posix-timer.h: New file.
1081 * sysdeps/pthread/timer_create.c: New file.
1082 * sysdeps/pthread/timer_delete.c: New file.
1083 * sysdeps/pthread/timer_getoverr.c: New file.
1084 * sysdeps/pthread/timer_gettime.c: New file.
1085 * sysdeps/pthread/timer_routines.c: New file.
1086 * sysdeps/pthread/timer_settime.c: New file.
1087 * sysdeps/pthread/tst-timer.c: New file.
1089 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1091 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1092 LINK_MAX definitions if necessary.
1094 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1096 Added missing fork time handling of global libio lock.
1098 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1099 not just the individual stream locks. Rewritten to use new
1100 iterator interface provided by libio rather than accessing
1103 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1104 which lock and unlock the stream list using the new interface
1106 * internals.h: Likewise.
1108 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1109 and __funlockfilelist in the parent after the fork.
1110 Child still calls __fresetlockfiles as before.
1112 * linuxthreads.texi: Now explains what happens to streams at
1113 fork time. Also whole new section on forking and thread added.
1114 Definition of pthread_atfork moved out of Miscellaneous Functions
1115 to this new section.
1117 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1119 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1120 Add missing register.
1121 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1123 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1125 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1126 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1127 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1129 2000-05-31 Andreas Jaeger <aj@suse.de>
1131 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1133 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1135 * spinlock.c (__pthread_lock): Remove ASSERT.
1137 * Makefile (tests): Add ex8.
1138 * Examples/ex8.c: New file.
1140 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1142 Bugfix: The pthread_atfork mechanism now takes care of its
1143 own internal mutex at fork time.
1145 * ptfork.c (__fork): Revised so that the mutex is held across
1146 the fork operation and while the handlers are called, and so that
1147 the child resets the mutex.
1149 * linuxthreads.texi: Updated pthread_atfork documentation to make
1150 it clear that fork and pthread_atfork can't be reentered from
1151 atfork handlers, that pthread_atfork and fork are mutually atomic,
1152 and that the handlers are inherited by the child process.
1154 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1156 * Makefile (libpthread-routines): Add pspinlock.
1157 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1158 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1159 * condvar.c: Likewise.
1160 * internals.h: Likewise.
1162 * manager.c: Likewise.
1163 * mutex.c: Likewise.
1164 * pthread.c: Likewise.
1165 * rwlock.c: Likewise.
1166 * semaphore.c: Likewise.
1167 * signals.c: Likewise.
1168 * spinlock.h: Likewise.
1169 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1170 * sysdeps/alpha/pspinlock.c: New file.
1171 * sysdeps/arm/pspinlock.c: New file.
1172 * sysdeps/i386/pspinlock.c: New file.
1173 * sysdeps/m68k/pspinlock.c: New file.
1174 * sysdeps/mips/pspinlock.c: New file.
1175 * sysdeps/powerpc/pspinlock.c: New file.
1176 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1177 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1178 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1179 back to _pthread_fastlock. Define new pthread_spinlock_t.
1181 2000-05-24 Andreas Jaeger <aj@suse.de>
1183 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1185 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1187 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1189 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1191 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1193 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1195 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1196 object state is represented with additional bits which distinguish
1197 whether that state was set up in the current process, or
1198 in an ancestor process. If that state was set in an ancestor,
1199 it means that a fork happened while thread was executing the init
1200 function. In that case, the state is reset to NEVER.
1201 * mutex.c (__pthread_once_fork_prepare): New function.
1202 (__pthread_once_fork_child): Likewise
1203 (__pthread_once_fork_parent): Likewise
1204 (__pthread_reset_pthread_once): Removed.
1205 * ptfork.c (__fork): Call new handlers in mutex.c.
1206 * internals.h: Declarations of new mutex.c functions added.
1207 Declaration of removed function deleted.
1208 * linuxthreads.texi: Updated documentation about pthread_once
1209 to clarify what happens under cancellation and forking.
1211 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1213 * internals.h: New thread manager request type, REQ_KICK.
1214 * join.c (pthread_exit): main thread now calls exit() instead
1215 of _exit() in order to proper process cleanup.
1216 * manager.c (__pthread_manager): Do not terminate manager
1217 after unblocking main thread; wait for main thread's
1218 REQ_PROCESS_EXIT request instead.
1219 Also, added REQ_KICK case to handle new request; this just does
1221 * manager.c (pthread_exited): Do not terminate manager after
1222 unblocking main thread.
1223 * manager.c (__pthread_manager_sighandler): If the main thread
1224 is waiting for all other threads to die, send a REQ_KICK into
1225 the thread manager request pipe to get it to clean out the threads
1226 and unblock the main thread as soon as possible. This fixes
1227 the 2000 millisecond hang on shutdown bug.
1228 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1229 including the main one call pthread_exit(), or implicitly do so.
1230 * Makefile (tests): Add ex7.
1232 2000-05-05 Andreas Jaeger <aj@suse.de>
1234 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1235 (pthread_getcpuclockid): Correct test for ourselves.
1237 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1239 * internals.h (struct _pthread_descr_struct): Reorganization.
1240 Allocate room for 16 pointers at head of the structure for future
1241 thread-local data handling. Move p_self member in this area.
1242 * manager.c (pthread_handle_create): Adjust use of p_self.
1243 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1244 * pthread.c (__pthread_initial_thread): Adjust initialization.
1245 (__pthread_manager_thread): Likewise.
1247 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1249 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1250 for eventmask larger than 1 word.
1252 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1254 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1255 * pthread.c (__pthread_initialize_minimal): New function. Perform
1256 minimal initialization.
1257 (pthread_initialize): Remove this code here.
1258 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1259 are working around the problem in glibc.
1261 2000-04-25 Ulrich Drepper <drepper@redhat.com>
1263 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1264 now. First gcc must be fixed (more concrete: libgcc).
1266 2000-04-24 Ulrich Drepper <drepper@redhat.com>
1268 * pthread.c: Remove special treatement for interrupt handlers on x86.
1269 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1270 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1272 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1274 2000-04-24 Mark Kettenis <kettenis@gnu.org>
1276 * join.c (pthread_exit): Set p_terminated after reporting the
1277 termination event instead of before.
1279 2000-04-20 Jakub Jelinek <jakub@redhat.com>
1281 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1284 2000-04-18 Andreas Jaeger <aj@suse.de>
1286 * Versions: Use ld instead of ld.so.
1288 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1290 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1291 Remove the typedef keyword.
1293 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1295 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1297 (READ_MEMORY_BARRIER): Define.
1298 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1300 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1303 2000-04-17 Ulrich Drepper <drepper@redhat.com>
1305 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1306 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1307 use thread_handle().
1309 2000-04-16 Ulrich Drepper <drepper@redhat.com>
1311 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1312 if fast mutex is used. Don't initialize `already_canceled' twice.
1313 Correctly test for return value of timedsuspend.
1315 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
1316 therefore don't need the _rt versions of the signal handlers.
1318 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1320 * pthread.c (pthread_yield): New function.
1321 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1322 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1323 * internals.h: Declare __pthread_yield.
1325 * pthread.c (pthread_initialize): Avoid a bit more code if
1326 realtime signals are known to exist.
1328 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1329 to dynamically detect RT signals and avoid generating compatibility
1330 functions with old kernel.
1331 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1332 __pthread_restart_new directly.
1333 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1334 __pthread_wait_for_restart_signal directly.
1335 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1336 __pthread_timedsuspend_new directly.
1338 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1340 * condvar.c: Remove all the special code to handle cond_timedwait.
1341 Use timedsuspend instead.
1342 * internals.h: Declare __pthread_timedsuspend_old,
1343 __pthread_timedsuspend_new, and __pthread_timedsuspend.
1344 Remove declaration of __pthread_init_condvar.
1345 * pthread.c: Define __pthread_timedsuspend variable.
1346 (__pthread_timedsuspend_old): New function. Timed suspension
1347 implementation for old Linux kernels.
1348 (__pthread_timedsuspend_new): New function. Timed suspension
1349 implementation for new Linux kernels.
1350 * restart.h (timedsuspend): New function. Call appropriate
1351 suspension function through __pthread_timedsuspend.
1352 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1354 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1356 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1358 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1360 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1361 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1363 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1364 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1366 2000-04-14 Andreas Jaeger <aj@suse.de>
1368 * weaks.c: Fix typo.
1370 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1371 2.2 for linuxthreads.
1373 2000-04-13 Ulrich Drepper <drepper@redhat.com>
1375 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1376 (pthread_getcpuclockid): Fix typo.
1378 2000-04-12 Ulrich Drepper <drepper@redhat.com>
1380 * Makefile (libpthread-routines): Add getcpuclockid.
1381 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1382 * sysdeps/pthread/getcpuclockid.c: New file.
1383 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1384 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1386 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1388 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1390 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1391 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1392 and pthread_spin_unlock.
1393 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1394 into pthread_spinlock_t. Change all uses.
1395 * spinlock.c: Implement pthread_spin_lock.
1396 Rename __pthread_unlock to __pthread_spin_unlock and define weak
1397 alias for real name.
1398 Define pthread_spin_trylock, pthread_spin_init, and
1399 pthread_spin_destroy.
1400 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1401 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1402 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1403 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1404 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1405 and pthread_spin_unlock.
1406 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1407 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1408 * condvar.c: Likewise.
1409 * internals.h: Likewise.
1411 * manager.c: Likewise.
1412 * mutex.c: Likewise.
1413 * pthread.c: Likewise.
1414 * rwlock.c: Likewise.
1415 * semaphore.c: Likewise.
1416 * signals.c: Likewise.
1418 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1420 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1422 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1424 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1425 _POSIX_SHARED_MEMORY_OBJECTS.
1427 2000-04-11 Andreas Jaeger <aj@suse.de>
1429 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1430 (__compare_and_swap): Mark as modifying memory.
1432 2000-04-11 Geoff Keating <geoffk@cygnus.com>
1434 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1436 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1437 Don't have the 'asm' __volatile__.
1439 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1441 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1442 * spinlock.c (__pthread_lock): Add memory barriers.
1443 (__pthread_unlock): Likewise.
1444 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1446 (RELEASE): Not needed anymore.
1447 (__compare_and_swap): Mark asm as modifying memory.
1448 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
1450 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1451 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1452 (MEMORY_BARRIER): Define using stbar.
1453 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1455 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1456 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1457 Mike Burrows <m3b@pa.dec.com>.
1459 2000-04-09 Ulrich Drepper <drepper@redhat.com>
1461 * signals.c (sigaction): Fix return value for the case SIG is one
1462 of the signals the implementation uses.
1463 Patch by Xavier.Leroy@inria.fr.
1465 2000-04-01 Andreas Jaeger <aj@suse.de>
1467 * attr.c: Use shlib-compat macros.
1468 * oldsemaphore.c: Likewise.
1469 * pthread.c: Likewise.
1470 * weaks.c: Likewise.
1472 2000-03-26 Ulrich Drepper <drepper@redhat.com>
1474 * semaphore.c (sem_timedwait): New function.
1475 Patch by Carl Mailloux <carlm@oricom.ca>.
1476 * semaphore.h: Declare sem_timedwait.
1477 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1479 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
1481 * sysdeps/pthread/Makefile: File removed.
1483 2000-03-23 Ulrich Drepper <drepper@redhat.com>
1485 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1486 * internals.h (__pthread_reset_pthread_once): Add prototype.
1487 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1489 * manager.c (pthread_handle_create): Store ID of new thread before
1492 2000-03-21 Ulrich Drepper <drepper@redhat.com>
1494 * attr.c: Use new macros from shlib-compat.h to define versions.
1495 * oldsemaphore.c: Likewise.
1496 * semaphore.c: Likewise.
1497 * weaks.c: Likewise.
1499 * pthread.c: Update for new SHLIB_COMPAT definition.
1501 * manager.c (__pthread_manager): Unmask debug signal.
1503 * pthread.c (pthread_initialize): Test for address of __dso_handle
1504 being NULL, not value. Use __on_exit, not on_exit.
1505 Patch by Andreas Jaeger <aj@suse.de>.
1507 * pthread.c: Use new macros from shlib-compat.h to define versions.
1509 2000-03-19 Ulrich Drepper <drepper@redhat.com>
1511 * pthread.c (pthread_initialize): Instead of on_exit use
1512 __cxa_atexit if __dso_label is available to allow unloading the
1513 libpthread shared library.
1515 2000-03-16 Ulrich Drepper <drepper@redhat.com>
1517 * condvar.c: Make tests for ownership of mutex less strict.
1519 2000-03-14 Ulrich Drepper <drepper@redhat.com>
1521 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1522 current thread and return error if not.
1523 (pthread_cond_timedwait_relative_old): Likewise.
1524 (pthread_cond_timedwait_relative_new): Likewise.
1526 * mutex.c (__pthread_once): Handle cancelled init function correctly.
1527 (pthread_once_cancelhandler): New function.
1528 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1530 2000-03-14 Andreas Jaeger <aj@suse.de>
1532 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1534 (pthread_handle_sigrestart_rt): Likewise.
1535 * signals.c (pthread_sighandler_rt): Likewise.
1537 2000-03-02 Andreas Jaeger <aj@suse.de>
1539 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1540 Reported by Sean Chen <sean.chen@turbolinux.com>.
1542 2000-02-28 Andreas Jaeger <aj@suse.de>
1544 * rwlock.c: Fix typo.
1546 2000-02-27 Ulrich Drepper <drepper@redhat.com>
1548 * rwlock.c: Define __* variants of the functions and make old names
1550 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1551 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1553 2000-02-25 Andreas Jaeger <aj@suse.de>
1555 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1556 pwrite64, lseek64, open64, and __open64 with version 2.2.
1558 2000-02-22 Ulrich Drepper <drepper@redhat.com>
1560 * semaphore.h (SEM_FAILED): Use 0 not NULL.
1562 2000-02-14 Ulrich Drepper <drepper@redhat.com>
1564 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1565 nanosleep does not work either. Get absolute time inside the
1567 (pthread_cond_timedwait_relative_new): Likewise.
1568 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1570 2000-02-13 Andreas Jaeger <aj@suse.de>
1572 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1573 (pthread_cond_timedwait_relative_old): Likewise.
1575 2000-02-13 Ulrich Drepper <drepper@redhat.com>
1577 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1578 but keep the code around. A bug in the kernel prevent us from
1580 (pthread_cond_timedwait_relative_new): Likewise.
1581 (PR libc/1597 and libc/1598).
1583 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
1585 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1586 loop around nanosleep calls instead of around most of the function
1587 (pthread_cond_timedwait_relative_new): Likewise.
1588 body. Got rid of backwards goto and one local.
1590 2000-01-31 Ulrich Drepper <drepper@redhat.com>
1592 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1593 before every nanosleep call to account for time spent in the rest
1595 (pthread_cond_timedwait_relative_new): Likewise.
1596 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1598 2000-01-29 Ulrich Drepper <drepper@redhat.com>
1600 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1601 from nanosleep call so that in case we restart we only wait for the
1603 (pthread_cond_timedwait_relative_new): Likewise.
1604 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1606 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
1608 * manager.c (pthread_allocate_stack): Compute guard page address
1609 correctly. Patch by HJ Lu.
1611 * sysdeps/pthread/pthread.h: Define
1612 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1614 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
1616 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1617 preference handling.
1618 (pthread_rwlockattr_setkind_np): Allow
1619 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1620 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1622 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
1624 * internals.h (pthread_readlock_info): New structure.
1625 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1626 p_untracked_readlock_count.
1627 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1628 Add initializers for new fields.
1629 * manager.c (pthread_free): Free read/write lock lists.
1630 * queue.h (queue_is_empty): New function.
1631 * rwlock.c: Implement requirements about when readers should get
1633 * sysdeps/pthread/pthread.h
1634 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1635 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1636 Define this name as well.
1637 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1639 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
1641 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1642 Adjust initializers for struct _pthread_descr_struct change.
1643 * internals.h (struct _pthread_descr_struct): Move new elements to
1646 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
1648 Redesigned how cancellation unblocks a thread from internal
1649 cancellation points (sem_wait, pthread_join,
1650 pthread_cond_{wait,timedwait}).
1651 Cancellation won't eat a signal in any of these functions
1652 (*required* by POSIX and Single Unix Spec!).
1653 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1654 simultaneous condition variable signal (not required by POSIX
1655 or Single Unix Spec, but nice).
1656 * spinlock.c: __pthread_lock queues back any received restarts
1657 that don't belong to it instead of assuming ownership of lock
1658 upon any restart; fastlock can no longer be acquired by two threads
1660 * restart.h: Restarts queue even on kernels that don't have
1661 queued real time signals (2.0, early 2.1), thanks to atomic counter,
1662 avoiding a rare race condition in pthread_cond_timedwait.
1664 1999-12-31 Andreas Jaeger <aj@suse.de>
1666 * internals.h: Remove duplicate prototype declarations.
1668 * weaks.c: Remove __THROW from prototypes since the file is not
1669 compiled by a C++ compiler.
1670 * internals.h: Likewise.
1672 1999-12-30 Andreas Jaeger <aj@suse.de>
1674 * sysdeps/pthread/pthread.h: Move internal functions to...
1675 * sysdeps/pthread/bits/libc-lock.h: ...here.
1677 1999-12-29 Andreas Jaeger <aj@suse.de>
1679 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1681 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
1683 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1686 * manager.c (__pthread_start): Add one more cast to prevent
1687 warning on 64bit machines.
1689 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
1691 * manager.c (pthread_handle_create): Set p_pid of new thread
1692 before calling the callback function to report a new thread.
1694 1999-12-20 Andreas Jaeger <aj@suse.de>
1696 * pthread.c (pthread_initialize): Move getrlimit call after
1699 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
1701 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1702 pwrite64, lseek64, open64, and __open64.
1703 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1704 pwrite64, lseek64, open64, and __open64.
1706 * manager.c (pthread_allocate_stack): Correct computation of
1707 new_thread_bottom. Correct handling of stack size and when the
1708 rlimit method to guard for stack growth is used.
1709 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1710 minus one pagesize (not two).
1712 1999-12-03 Andreas Jaeger <aj@suse.de>
1714 * Versions: Add __res_state with version GLIBC_2.2.
1716 * errno.c (__res_state): New function to return thread specific
1719 * pthread.c (pthread_initialize): Initialize p_resp.
1720 (__pthread_reset_main_thread): Also set p_resp.
1722 * manager.c (pthread_handle_create): Initialize p_resp.
1724 * internals.h: Add thread specific resolver state.
1725 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1727 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
1729 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1731 * sysdeps/i386/i686/pt-machine.h: Likewise.
1732 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1734 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
1736 * manager.c (pthread_start_thread_event): Initialize p_pid already
1739 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
1741 * internals.h: Add prototype for __pthread_manager_event.
1742 * manager.c (__pthread_manager_event): New function.
1743 (pthread_start_thread_event): Correct computation of self.
1744 Use INIT_THREAD_SELF.
1745 * pthread.c (__pthread_manager_thread): Initialize p_lock.
1746 (__pthread_initialize_manager): Respect event flags also for creation
1747 of the manager thread.
1749 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
1751 * pthread.c (__pthread_initialize_manager): Initialize
1752 __pthread_manager_thread.p_tid.
1754 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
1756 * internals.h: Declare __pthread_last_event.
1757 * manager.c: Define __pthread_last_event.
1758 (pthread_handle_create): Set __pthread_last_event.
1759 (pthread_exited): Likewise.
1760 * join.c (pthread_exit): Likewise.
1762 * Makefile (libpthread-routines): Add events.
1763 * events.c: New file.
1764 * internals.h: Protect against multiple inclusion.
1765 Include thread_dbP.h header.
1766 (struct _pthread_descr_struct): Add new fields p_report_events and
1768 Declare event reporting functions.
1769 * join.c (pthread_exit): Signal event if this is wanted.
1770 * manager.c (__pthread_threads_events): New variable.
1771 (pthread_handle_create): Take new parameters with event information.
1772 Signal TD_CREATE event if wanted.
1773 (__pthread_manager): Adjust pthread_handle_create call.
1774 (pthread_start_thread_event): New function. Block until manager is
1775 finished and then call pthread_start_thread.
1776 (pthread_exited): Signal TD_REAP event if wanted.
1778 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
1780 * restart.h (suspend_with_cancellation): Rewrite as a macro.
1782 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1784 1999-10-25 Andreas Jaeger <aj@suse.de>
1786 * internals.h: Remove K&R compatibility.
1787 * no-tsd.c: Likewise.
1788 * semaphore.h: Likewise.
1789 * signals.c: Likewise.
1790 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1791 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1792 * weaks.c: Likewise.
1794 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
1796 * pthread.c: For i386, wrap pthread_handle_sigrestart and
1797 pthread_handle_sigcancel with functions that restore %gs from the
1798 signal context. For each signal handling function, two wrappers
1799 are required, one for a non-RT signal and one for a RT signal.
1800 * signal.c: For i386, add code to restore %gs from the signal
1801 context in pthread_sighandler and pthread_sighandler_rt.
1803 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
1805 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1807 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
1809 * pthread.c (__pthread_initial_thread): Pass argument to
1810 PTHREAD_START_ARGS_INITIALIZER.
1811 (__pthread_manager_thread): Likewise.
1813 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1814 initialize function.
1816 * manager.c (pthread_handle_create): Remove p_startfct initialization.
1818 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1820 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
1822 * internals.h: Correct return types for __libc_read and __libc_write.
1824 1999-10-09 Andreas Jaeger <aj@suse.de>
1826 * internals.h: Add __new_sem_post to get prototype in
1827 manager.c; include semaphore.h for needed types.
1829 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
1831 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1832 directly instead of calling sem_post which should not be necessary
1833 but is faster and might help in some case to work around problems.
1834 Patch by khendricks@ivey.uwo.ca [libc/1382].
1836 1999-10-08 Andreas Schwab <schwab@suse.de>
1838 * sysdeps/pthread/Subdirs: New file.
1841 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
1843 * Implies: New file.
1844 * internals.h (struct _pthread_descr_struct): Add p_startfct.
1845 * manager.c (pthread_handle_create): Initialize p_startfct.
1846 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
1848 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
1850 * manager.c (__linuxthreads_pthread_threads_max): New variable.
1851 * specific.c (__linuxthreads_pthread_keys_max): New variable.
1852 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
1854 * condvar.c (pthread_cond_timedwait_relative): Never return with
1855 EINTR. Patch by Andreas Schwab.
1857 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
1859 * signals.c (sigaction): Correct last patch. Don't select
1860 pthread_sighandler_rt based on the signal number but instead of
1861 the SA_SIGINFO flag.
1863 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
1865 * specific.c: Move definitions of struct pthread_key_struct and
1866 destr_function to ...
1867 * internals.h: ...here.
1869 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
1871 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
1872 this instead of pthread_handle_sigrestart if the signal is an RT
1875 * signals.c: Handle passing through of sighandler arguments also
1876 for real-time signals.
1878 1999-09-03 Andreas Schwab <schwab@suse.de>
1880 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
1882 (__vfork): New function, alias vfork.
1883 * Versions: Export __fork, vfork, and __vfork in libpthread.
1885 1999-08-23 Andreas Schwab <schwab@suse.de>
1887 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
1888 call to signal handler.
1890 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
1892 * pthread.c (__pthread_reset_main_thread): Undo last change.
1893 (__pthread_kill_other_threads_np): Reset signal handlers for the
1894 signals we used in the thread implementation here.
1896 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
1898 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
1899 for the signals we used in the thread implementation [PR libc/1234].
1901 * Versions: Export __pthread_kill_other_threads_np from libpthread
1904 * signals.c: Pass sigcontext through wrapper to the user function.
1906 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
1908 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
1909 __libc_internal_tsd_set.
1911 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1913 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
1916 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1918 * internals.h: Align _pthread_descr_struct to 32 bytes.
1919 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
1922 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
1924 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
1927 1999-07-09 Cristian Gafton <gafton@redhat.com>
1929 * Makefile (libpthread-routines): Add oldsemaphore routine.
1930 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
1931 sem_trywait, and sem_wait to GLIBC_2.1.
1932 * oldsemaphore.c: New file.
1933 * semaphore.c: Add default_symbol_versions for the changed functions.
1934 (__new_sem_init): Rename from sem_init.
1935 (__new_sem_post): Rename from sem_post.
1936 (__new_sem_wait): Rename from sem_wait.
1937 (__new_sem_trywait): Rename from sem_trywait.
1938 (__new_sem_getvalue): Rename from sem_getvalue.
1939 (__new_sem_destroy): Rename from sem_destroy.
1941 1999-06-23 Robey Pointer <robey@netscape.com>
1943 * internals.h: Added p_nextlock entry to separate queueing for a
1944 lock from queueing for a CV (sometimes a thread queues on a lock
1945 to serialize removing itself from a CV queue).
1946 * pthread.c: Added p_nextlock to initializers.
1947 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
1949 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
1951 * manager.c (pthread_handle_create): Free mmap region after stack
1952 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
1954 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1956 * man/pthread_cond_init.man: Correct example.
1957 Reported by Tomas Berndtsson <tomas@nocrew.org>.
1959 * linuxthreads.texi (Condition Variables): Likewise.
1961 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
1963 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
1964 casx not cas, also successful casx returns the old value in rd
1965 and not the new value.
1967 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
1969 * manager.c: If pthread_create() is given a NULL attribute
1970 and the thread manager runs with a realtime policy, set the
1971 scheduling policy of the newly created thread back to SCHED_OTHER.
1972 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
1973 initialize the schedpolicy field of new_thread->p_start_args
1974 to that of the calling thread.
1976 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
1978 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
1979 instruction does not allow memory element to use offset.
1981 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
1983 * manager.c (pthread_allocate_stack): Optimize initialization of new
1986 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
1987 Don't use initializer since it is all zeroes.
1988 (__libc_once_define): Likewise.
1990 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1992 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
1993 doesn't exist anymore.
1994 * sysdeps/i386/Implies: Likewise.
1995 * sysdeps/m68k/Implies: Likewise.
1996 * sysdeps/mips/Implies: Likewise.
1997 * sysdeps/powerpc/Implies: Likewise.
1998 * sysdeps/sparc/sparc32/Implies: Likewise.
1999 * sysdeps/sparc/sparc64/Implies: Likewise.
2001 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
2003 * sysdeps/alpha/bits/semaphore.h: Removed.
2004 * sysdeps/powerpc/bits/semaphore.h: Removed.
2005 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
2006 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
2007 * Makefile (headers): Remove bits/semaphore.h.
2009 * semaphore.h: Define _pthread_descr if necessary.
2010 Don't include limits.h. Define SEM_VALUE_MAX directly.
2012 (sem_t): Protect element names with leading __.
2013 Add declarations for sem_close, sem_open, and sem_unlink.
2014 * semaphore.c: Adjust all functions for new element names.
2015 Define sem_close, sem_open, and sem_unlink.
2016 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2018 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2021 1999-03-16 H.J. Lu <hjl@gnu.org>
2023 * specific.c (pthread_key_delete): Check th->p_terminated to see
2024 if the thread is running.
2026 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2027 Added to GLIBC_2.0 for libc.so.
2029 1999-02-12 H.J. Lu <hjl@gnu.org>
2031 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2032 __libc_allocate_rtsig): Added to GLIBC_2.1.
2034 * internals.h (DEFAULT_SIG_RESTART): Removed.
2035 (DEFAULT_SIG_CANCEL): Removed.
2037 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2038 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2039 (__pthread_sig_restart, __pthread_sig_cancel,
2040 __pthread_sig_debug): Initialized.
2041 (pthread_initialize): Call init_rtsigs () to initialize
2044 1999-02-03 H.J. Lu <hjl@gnu.org>
2046 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2047 Don't restart the thread which sent REQ_DEBUG.
2048 (pthread_start_thread): Check if __pthread_sig_debug > 0
2051 * pthread.c (__pthread_initialize_manager): Suspend ourself
2052 after sending __pthread_sig_debug to gdb instead of
2053 __pthread_sig_cancel.
2055 1999-01-24 H.J. Lu <hjl@gnu.org>
2057 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2058 from mask if __pthread_sig_debug > 0.
2059 (pthread_handle_create): Increment __pthread_handles_num.
2061 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2062 * pthread.c (__pthread_initialize_manager): Likewise.
2064 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2065 instead of __libc_allocate_rtsig (2).
2066 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2067 instead of __pthread_sig_cancel.
2068 (pthread_handle_sigdebug): Fix comments.
2070 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2072 * manager.c (pthread_allocate_stack): Set
2073 __pthread_nonstandard_stacks if user-specified stack is used.
2075 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2077 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2078 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2080 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2082 * pthread.c: Use a third signal __pthread_sig_debug distinct
2083 from __pthread_sig_cancel to notify gdb when a thread is
2085 * manager.c: Likewise.
2086 * internals.h: Likewise.
2087 * signals.c: The implementation of sigwait(s) assumed that
2088 all signals in s have signal handlers already attached.
2089 This is not required by the standard, so make it work
2090 also if some of the signals have no handlers.
2092 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2094 * linuxthreads.texi: Remove pointers from first @node. Move old
2095 @node spec inside comment.
2097 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2099 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2102 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2104 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2105 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2107 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2109 * manager.c: Threads now send __pthread_sig_cancel on termination.
2110 Change clone call and signal masks.
2111 * thread.c (pthread_handle_sigrestart): Remove special code for
2113 (pthread_handle_sigcancel): In manager thread call
2114 __pthread_manager_sighandler.
2115 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2116 * sysdeps/i386/i686/pt-machine.h: Likewise.
2117 Patches by Xavier Leroy.
2119 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2121 * spinlock.c (__pthread_unlock): Don't crash if called for an
2122 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2124 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2127 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2129 * Examples/ex3.c: Wait until all threads are started before
2130 searching for the number to avoid race condition on very fast
2133 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2135 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2136 declaration since it's not needed.
2138 * sysdeps/pthread/pthread.h: Move internal functions to ...
2139 * internals.h: ...here.
2141 1998-12-02 H.J. Lu <hjl@gnu.org>
2143 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2144 SIGRTMIN is defined.
2145 (__pthread_sig_cancel): Likewise.
2147 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2149 * wrapsyscall.c: Include <sys/mman.h> for msync,
2150 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2151 Correct msync declaration.
2153 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2155 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2156 __libc_tsd_set): New macros for new interface.
2157 * no-tsd.c: New file, provide uninitialized defns of
2158 __libc_internal_tsd_get and __libc_internal_tsd_set.
2159 * Makefile (routines): Add no-tsd.
2161 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2163 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2164 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2165 __libc_internal_tsd_set): Move decls to ...
2166 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2169 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2170 __libc_internal_tsd_set): Make these pointers to functions, not
2171 functions; remove #pragma weak decls for them.
2172 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2173 Define static functions and initialized pointers to them.
2175 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2177 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2178 (CFLAGS-specific.c): Likewise.
2179 (CFLAGS-pthread.c): Likewise.
2180 (CFLAGS-ptfork.c): Likewise.
2181 (CFLAGS-cancel.c): Likewise.
2182 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2183 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2185 * mutex.c (pthread_mutex_init): Define as strong symbol.
2186 (pthread_mutex_destroy): Likewise.
2187 (pthread_mutex_trylock): Likewise.
2188 (pthread_mutex_lock): Likewise.
2189 (pthread_mutex_unlock): Likewise.
2190 (pthread_mutexattr_init): Likewise.
2191 (pthread_mutexattr_destroy): Likewise.
2192 (pthread_once): Likewise.
2193 * ptfork.c (pthread_atfork): Likewise.
2194 * specific.c (pthread_key_create): Likewise.
2195 (pthread_setspecific): Likewise.
2196 (pthread_getspecific): Likewise.
2198 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2200 * linuxthreads.texi: Fix punctuation after xref.
2202 1998-11-10 H.J. Lu <hjl@gnu.org>
2204 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2205 if it is defined in <linux/limits.h>.
2207 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2209 * spinlock.h (__pthread_trylock): Define inline.
2210 (__pthread_lock): Add extra parameter to declaration. Declare
2211 using internal_function.
2212 (__pthread_unlock): Declare using internal_function.
2213 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2214 of local variable self. Avoid recomputing self. Define using
2216 (__pthread_trylock): Remove.
2217 (__pthread_unlock): Define using internal_function.
2218 * cancel.c: Adjust for __pthread_lock interface change. Use already
2219 computed self value is possible.
2220 * condvar.c: Likewise.
2222 * manager.c: Likewise.
2223 * mutex.c: Likewise.
2224 * pthread.c: Likewise.
2225 * rwlock.c: Likewise.
2226 * semaphore.c: Likewise.
2227 * signals.c: Likewise.
2229 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2231 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2232 __ to field names of the struct.
2233 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2235 (pthread_attr_t): Likewise.
2236 (pthread_cond_t): Likewise.
2237 (pthread_condattr_t): Likewise.
2238 (pthread_mutex_t): Likewise.
2239 (pthread_mutexattr_t): Likewise.
2240 (pthread_rwlock_t): Likewise.
2241 (pthread_rwlockattr_t): Likewise.
2242 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2243 * cancel.c: Likewise.
2244 * condvar.c: Likewise.
2245 * manager.c: Likewise.
2246 * mutex.c: Likewise.
2247 * pthread.c: Likewise.
2248 * ptlongjmp.c: Likewise.
2249 * rwlock.c: Likewise.
2250 * spinlock.c: Likewise.
2252 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2254 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2257 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2260 * Makefile (libpthread-routines): Add pt-machine.
2261 * pt-machine.c: New file.
2262 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2263 yet defined. Use PT_EI in extern inline definitions.
2264 * sysdeps/arm/pt-machine.h: Likewise.
2265 * sysdeps/i386/pt-machine.h: Likewise.
2266 * sysdeps/i386/i686/pt-machine.h: Likewise.
2267 * sysdeps/m68k/pt-machine.h: Likewise.
2268 * sysdeps/mips/pt-machine.h: Likewise.
2269 * sysdeps/powerpc/pt-machine.h: Likewise.
2270 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2271 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2273 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2275 * semaphore.h: Include <sys/types.h> so that _pthread_descr
2278 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
2280 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2282 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2284 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2286 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2289 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2291 * signals.c (sigaction): Check that sig is less than NSIG to avoid
2292 array index overflow.
2294 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
2296 * sysdeps/pthread/semaphore.h: New file.
2298 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
2300 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2301 _LIBC_TSD_KEY_DL_ERROR.
2303 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
2305 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2306 * sysdeps/i386/pt-machine.h: Likewise.
2307 Suggested by Roland McGrath.
2309 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
2311 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2312 access thread data with non-constant offsets.
2313 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2316 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
2317 THREAD_SETMEM_NC definitions.
2319 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2321 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2323 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
2325 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2326 not already defined.
2327 (struct _pthread_descr_struct): Add p_self and p_nr field.
2328 * manager.c (__pthread_handles): Define second element to point
2330 (__pthread_handles_num): Initialize to 2.
2331 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2332 (pthread_start_thread): Likewise.
2333 (pthread_handle_create): Start search for free slot at entry 2.
2334 Initialize new fields p_self and p_nr.
2335 Call __clone with CLONE_PTRACE if available.
2336 (pthread_free): Call FREE_THREAD_SELF if available.
2337 * pthread.c (__pthread_initial_thread): Initialize new fields.
2338 (__pthread_manager_thread): Likewise.
2339 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2341 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2342 elements of the thread descriptor.
2343 * condvar.c: Likewise.
2344 * errno.c: Likewise.
2346 * manager.c: Likewise.
2347 * pthread.c: Likewise.
2348 * ptlongjmp.c: Likewise.
2349 * semaphore.c: Likewise.
2350 * signals.c: Likewise.
2351 * specific.c: Likewise.
2352 * spinlock.c: Likewise.
2354 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2356 * sysdeps/i386/useldt.h: New file.
2357 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2359 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2360 THREAD_SETMEM using __thread_self.
2361 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2363 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
2365 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2366 turned out that we didn't need to queue after all.
2368 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
2370 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2371 and wastes space; correct types.
2373 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
2375 * signals.c (sigaction): Handle NULL argument.
2377 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
2379 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2382 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2384 * Makefile (linuxthreads-version): Extract correct number from
2387 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
2389 * Banner: Bump version number to 0.8
2390 * FAQ.html: Many updates, in particular w.r.t. debugging.
2391 * manager.c: Support for non-default stacksize for
2392 LinuxThreads-allocated stacks;
2393 don't use guard pages for stacks with default size, rely on
2394 rlimit(RLIMIT_STACK) instead (it's cheaper).
2396 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2397 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2398 * condvar.c: Likewise.
2399 * internals.h: Likewise.
2400 * restart.h: Likewise.
2401 * signals.c: Likewise.
2402 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2404 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2406 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2407 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
2408 * Versions: Put __pthread_mutexattr_settype under version
2409 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
2410 __pthread_mutexattr_gettype.
2412 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2414 * sysdeps/pthread/bits/libc-lock.h: Make
2415 __pthread_mutexattr_settype weak. Don't make
2416 __pthread_mutexattr_setkind_np weak.
2418 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
2420 * manager.c (pthread_handle_create): Check whether sched_setscheduler
2421 call can succeed here.
2423 * mutex.c: Define __pthread_mutexattr_settype and make
2424 __pthread_mutexattr_setkind_np an alias.
2425 Likewise for __pthread_mutexattr_gettype.
2427 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2429 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2432 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
2434 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2436 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2438 * Examples/ex6.c: Include <unistd.h> for usleep.
2440 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2442 * Examples/ex4.c (main): Use exit, not pthread_exit.
2444 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
2446 * Versions: Add __pthread_mutexattr_gettype and
2447 __pthread_mutexattr_settype.
2448 * lockfile.c: Use __pthread_mutexattr_settype instead of
2449 __pthread_mutexattr_setkind_np.
2450 * mutex.c: Define __pthread_mutexattr_gettype and
2451 __pthread_mutexattr_settype.
2453 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2454 __pthread_mutexattr_settype.
2455 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2456 Use __pthread_mutexattr_settype.
2458 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
2460 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2461 * mutex.c: Define weak alias pthread_mutexattr_gettype and
2462 pthread_mutexattr_settype.
2463 * sysdeps/pthread/pthread.h: Declare these functions.
2464 Move pthread_sigmask and pthread_kill declaration in separate header.
2465 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2467 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
2469 * Makefile: Add rules to compile and run tests.
2470 * Examples/ex1.c: Little changes to fix warnings.
2471 * Examples/ex2.c: Likewise.
2472 * Examples/ex3.c: Likewise.
2473 * Examples/ex4.c: Likewise.
2474 * Examples/ex5.c: Likewise.
2475 * Examples/ex6.c: New file.
2477 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
2479 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2481 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2483 * attr.c: Include <string.h>.
2485 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
2487 * attr.c: Include errno.h. Use memcpy to copy sched_param.
2488 * internals.h: Include limits.h.
2489 * manager.c: Use memcpy to copy sched_param.
2490 * ptfork.c: Include errno.h.
2491 * pthread.c: Likewise.
2492 * semaphore.c: Likewise.
2493 * specific.c: Likewise.
2494 * spinlock.h: Likewise.
2495 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
2496 type definition to ...
2497 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
2499 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
2501 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2503 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2504 as macros as demanded in POSIX.1, Annex C.
2506 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
2508 * internals.h (struct pthread_request): For free use pthread_t
2509 instead of pthread_descr.
2510 * join.c (pthread_join): Pass thread_id, not th to manager.
2511 (pthread_detach): Likewise.
2512 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2513 (pthread_exited): Remove detached queue code.
2514 (pthread_handle_free): Expect thread ID parameter and use it to
2515 validate the thread decsriptor. Don't use detached queue.
2516 Patches by Xavier Leroy.
2518 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2520 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2521 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2522 __pthread_atfork, __pthread_key_create, __pthread_once.
2523 * internals.h: Doc fix.
2524 * pthread.c (__pthread_initialize): Define again.
2526 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
2528 * manager.c (pthread_exited): If thread is not detached put it on
2530 (pthread_handle_free): If thread is not on list with living threads
2531 search on list with detached threads.
2533 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2534 for new definition of pthread_rwlock_t.
2536 * spinlock.c: Correct test whether to compile
2537 __pthread_compare_and_swap or not.
2539 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
2541 * attr.c: Finish user stack support. Change locking code to be safe
2542 in situations with different priorities.
2543 * cancel.c: Likewise.
2544 * condvar.c: Likewise.
2545 * internals.h: Likewise.
2547 * manager.c: Likewise.
2548 * mutex.c: Likewise.
2549 * pthread.c: Likewise.
2550 * ptlongjmp.c: Likewise.
2551 * queue.h: Likewise.
2552 * rwlock.c: Likewise.
2553 * semaphore.c: Likewise.
2554 * semaphore.h: Likewise.
2555 * signals.c: Likewise.
2556 * spinlock.c: Likewise.
2557 * spinlock.h: Likewise.
2558 * sysdeps/pthread/pthread.h: Likewise.
2559 Patches by Xavier Leroy.
2561 * sysdeps/i386/i686/pt-machine.h: New file.
2563 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
2565 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2566 [sg]et_stackaddr prototypes always available.
2568 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2569 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2571 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
2573 * manager.c (pthread_free): Undo patch from 980430.
2574 Reported by David Wragg <dpw@doc.ic.ac.uk>.
2576 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
2578 * manager.c: Define __pthread_manager_adjust_prio and use it to
2579 increase priority when needed.
2580 * internals.h: Add prototype for __pthread_manager_adjust_prio.
2581 * mutex.c: Optimize mutexes to wake up only one thread.
2582 * pthread.c: Move PID of manager for global variable in structure
2584 Patches by Xavier Leroy.
2586 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
2588 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2590 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2592 * attr.c: Correct typo.
2594 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
2596 * manager.c (pthread_free): Unmap guard before the stack.
2597 Patch by Matthias Urlichs.
2599 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
2601 * manager.c (pthread_free): Detect already free child.
2602 Patch by Xavier Leroy, reported by Matthias Urlichs.
2604 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2606 * Makefile (linuxthreads-version): Renamed back from
2609 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
2611 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2614 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
2616 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2617 * internals.h: Add definitions for new spinlock implementation.
2618 * ptlongjmp.c: New file.
2619 * spinlock.c: New file.
2620 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2621 new function __pthread_acquire to prevent deadlocks with thread
2622 with different priorities.
2623 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2625 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2627 * manager.c (__pthread_manager): Reduce first argument to select
2628 to include just the needed file descriptor.
2630 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
2632 * manager.c: Fix last patch which caused core dumps.
2634 * pthread.c: Correctly handle missing SIGRTMIN.
2636 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2638 * libpthread.map: Add __libc_internal_tsd_get and
2639 __libc_internal_tsd_set. Add missing cancelable functions. Export
2640 libc internal versions of the cancelable functions.
2642 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
2644 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2646 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
2648 * attr.c: Implement pthread_attr_[gs]etguardsize,
2649 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2650 Change pthread_attr_init to have two interfaces.
2651 * internals.h (struct _pthread_descr_struct): Add new fields for
2653 * libpthread.map: Add names in GLIBC_2.1 section.
2654 * manager.c (pthread_handle_create): Implement guardsize and
2656 (pthread_free): Likewise.
2657 * pthread.c (pthread_create): Add new interface for changed
2659 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2660 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2663 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
2665 * manager.c: Enable resetting of the thread scheduling policy
2666 to SCHED_OTHER when the parent thread has a different one.
2668 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
2670 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2671 _POSIX_ASYNCHRONOUS_IO.
2673 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2675 * mutex.c: Implement new mutex types.
2677 * internals.h: Include <signal.h>.
2679 * libpthread.map: Add __erno_location and __h_errno_location.
2681 * errno.c: Return pointer to variable actually in use. This might
2682 not be the one in the thread structure.
2683 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2685 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2686 of manager thread structure.
2687 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2689 * pthread.c: Adapt initializer for thread structures.
2690 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2691 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2692 current thread to global variables.
2694 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
2696 * rwlock.c: New file.
2697 * Makefile (libpthread-routines): Add rwlock.
2698 * sysdeps/pthread/pthread.h: Define data structures and declare
2700 * libpthread.map: Add new functions.
2702 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
2704 * sysdeps/arm/pt-machine.h: New file; add ARM support.
2705 * sysdeps/arm/Implies: likewise.
2706 * README: Document it.
2708 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2710 * signals.c: Remove unneeded initializer for sigwaited, saving a
2713 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2715 * semaphore.c (sem_init): Set sem_spinlock only if available.
2717 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
2719 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2720 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2722 * Makefile: Update from LinuxThreads 0.7.
2723 * internals.h. Likewise.
2724 * manager.c: Likewise.
2725 * mutex.c: Likewise.
2726 * pthread.c: Likewise.
2727 * signals.c: Likewise.
2728 * specific.c: Likewise.
2729 * Examples/ex3.c: Likewise.
2731 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
2733 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2736 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
2738 * wrapsyscall.c: Add socket functions which are also cancelation
2741 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
2743 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2744 New functions for fast thread specific data within libc.
2746 * internals.h: Add new array p_libc_specific to struct
2747 _pthread_descr_struct.
2749 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2751 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
2753 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2754 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2756 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
2758 * internals.h (struct _pthread_descr_struct): Add definitions for
2759 two-level specific key handling.
2760 * manager.c (pthread_handle_create): Initialize specific memory array.
2761 * specific.c: Implement two-level key handling.
2762 * weaks.c: Don't provide dummy key handling.
2763 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2764 Add definition of __libc_key_t.
2765 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2767 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2768 PTHREAD_DESTRUCTOR_ITERATIONS.
2770 * manager.c (pthread_handle_create): Compare mmap result with
2773 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2774 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2776 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
2778 sysdeps/sparc -> sysdeps/sparc/sparc32
2779 sysdeps/sparc64 -> sysdeps/sparc/sparc64
2781 * internals.h: Change definition of THREAD_SELF to be an expression,
2782 not a statement that did a return.
2783 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2784 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2785 Follow Solaris and use a "system reserved" register (%g6) to hold
2786 the thread descriptor.
2787 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2789 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
2791 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
2792 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2793 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2795 * semaphore.c: Include spinlock.h only when needed.
2797 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2798 keys for entries not in use.
2800 * weaks.c: Implement key handling functions for real.
2802 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
2804 Initial sparc64-linux support:
2805 * sysdeps/sparc64/Implies: New file.
2806 * sysdeps/sparc64/pt-machine.h: Likewise.
2808 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
2810 * semaphore.c: Include spinlock.h at correct place.
2813 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
2815 The Great Bit File Move:
2816 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2817 * sysdeps/powerpc/semaphorebits.h: Likewise.
2818 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2819 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2820 * sysdeps/pthread/libc-lock.h: -> bits/
2821 * sysdeps/pthread/stdio-lock.h: Likewise.
2822 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2823 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2824 * semaphore.h: Likewise.
2825 * sysdeps/pthread/pthread.h: Likewise.
2827 * lockfile.c: <foo.h> -> <bits/foo.h>.
2828 * semaphore.h: Likewise.
2830 * Makefile: (headers): foo.h -> bits/foo.h.
2831 * sysdeps/pthread/Makefile: Likewise.
2833 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2835 * semaphore.c (sem_init): Set sem_spinlock only if available.
2837 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
2840 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
2842 Update from LinuxThreads 0.6.
2844 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
2845 and __sched_get_priority_min instead of names without `__'.
2847 * manager.c: Rewrite large parts to implement opaque pthread_t.
2849 * cancel.c: Adapt for opaque pthread_t type.
2850 * condvar.c: Likewise.
2851 * errno.c: Likewise.
2853 * mutex.c: Likewise.
2854 * pthread.c: Likewise.
2855 * signals.c: Likewise.
2856 * specific.c: Likewise.
2857 * restart.h: Likewise.
2858 * queue.h: Likewise.
2859 * Examples/ex3.c: Likewise.
2860 * Examples/ex4.c: Likewise.
2861 * sysdeps/pthread/pthread.h: Likewise.
2863 * pthread.c: Accumulate time for all threads in thread manager.
2865 * semaphore.c: Implement fallback implementation for architectures
2866 sometimes missing compare-exchange operations.
2868 * cancel.c (pthread_cancel): Validate handle argument.
2869 * join.c (pthread_join): Likewise.
2870 (pthread_detach): Likewise.
2871 * signals.c (pthread_kill): Likewise.
2873 * spinlock.h (acquire): Use __sched_yield not sched_yield.
2875 * queue.h (enqueue): Enqueue thread according to priority.
2877 * internals.c (struct pthread_start_args): New struct for passing
2878 args to cloning function.
2879 (struct _pthread): Rename to _pthread_descr_struct and adapt for
2882 * Examples/Makefile (clean): Pass -f option to rm.
2884 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
2885 and define TEST_FOR_COMPARE_AND_SWAP.
2886 * sysdeps/i386/i486/pt-machine.h: Removed.
2888 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
2891 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
2893 * restart.h (suspend): Clear p_signal before suspending.
2894 (suspend_with_cancellation): Likewise.
2895 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
2897 * weaks.c: Make __pthread_key_create return 1.
2898 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
2899 __libc_getspecific, __libc_setspecific, and __libc_key_t.
2900 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
2903 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
2905 * sysdeps/sparc/pt-machine (RELEASE): Fix.
2907 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
2909 * sysdeps/powerpc/Implies: Added.
2910 * sysdeps/powerpc/pt-machine.h: Added.
2911 * sysdeps/powerpc/semaphorebits.h: Added.
2913 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
2915 * pthread.c (__pthread_initial_thread): Correct
2917 (__pthread_manager_thread): Likewise.
2918 Reported by Andreas Jaeger.
2920 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
2922 Since sigset_t no longer fits in a register, we can't pass in the
2923 thread's initial mask so easily. Take this opportunity to simplify
2924 the clone implementation by only accepting a single void* argument.
2926 * manager.c (__pthread_manager): Put thread vitals in the thread
2927 struct instead of as arguments through clone.
2928 (pthread_start_thread): Look for them there.
2929 * internals.h (struct _pthread): Add p_initial_fn,
2930 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
2931 * pthread.c (pthread_initialize_manager): Revise clone invocation.