1 2001-02-23 Jakub Jelinek <jakub@redhat.com>
3 * internals.h (__pthread_init_max_stacksize): New prototype.
4 * attr.c (__pthread_attr_setstacksize): Call
5 __pthread_init_max_stacksize if not yet initialized.
6 * pthread.c (__pthread_init_max_stacksize): New function.
7 (__pthread_initialize_manager): Call it.
8 Patch by <dtc@cmucl.cons.org>.
10 2001-03-16 Ulrich Drepper <drepper@redhat.com>
12 * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
14 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
16 * shlib-versions: Add rule for Linux on 64 bit S/390.
17 * sysdeps/s390/s390-64/pt-machine.h: New file.
18 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
20 2001-03-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
22 * sysdeps/s390/pt-machine.h: Move to...
23 * sysdeps/s390/s390-32/pt-machine.h: ...here.
24 Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
26 2001-03-15 Ulrich Drepper <drepper@redhat.com>
28 * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
29 * attr.c: Implement pthread_getattr_np.
30 * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
31 * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
32 * manager.c (pthread_handle_create): Initialize p_inheritsched.
34 2001-03-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
36 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
39 2001-02-20 Hans Boehm <hans_boehm@hp.com>
41 * manager.c (manager_mask): Removed static vesion. Now always local
42 to __pthread_manager().
43 (manager_mask_all): Removed completely.
44 (__pthread_manager): Remove manager_mask_all initialization.
45 (pthread_handle_create): Remove code to set and reset signal mask
46 around __clone2() calls.
48 2001-02-17 Jakub Jelinek <jakub@redhat.com>
50 * spinlock.c (__pthread_lock): Force lock->__status to be read from
53 2001-02-10 Andreas Jaeger <aj@suse.de>
55 * Makefile (extra-objs): New.
57 2001-02-09 Jakub Jelinek <jakub@redhat.com>
59 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
60 __pthread_initialize_minimal prototype.
62 2001-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
64 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
66 2001-02-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
68 * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
70 2001-02-06 Ulrich Drepper <drepper@redhat.com>
72 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
73 broken code. Patch by Jes Sorensen.
75 2001-02-06 Andreas Jaeger <aj@suse.de>
77 * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
79 * internals.h: ...here.
81 2001-02-05 Jes Sorensen <jes@linuxcare.com>
83 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
85 2001-02-02 Ulrich Drepper <drepper@redhat.com>
87 * Versions: Remove __pthread_initialize_minimal.
89 2001-02-01 Ulrich Drepper <drepper@redhat.com>
91 * Makefile: Add rules to build crti.o and make it being used in
92 building libpthread.so.
93 * sysdeps/i386/Makefile: New file.
94 * sysdeps/pthread/pt-initfini.c: New file.
96 * pthread.c: Cleanups.
98 2001-01-28 Andreas Jaeger <aj@suse.de>
100 * oldsemaphore.c (__old_sem_init): Adjust for last change.
101 * sysdeps/pthread/bits/libc-lock.h: Likewise.
102 * spinlock.c: Likewise.
104 2001-01-28 Ulrich Drepper <drepper@redhat.com>
106 * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
107 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
108 * manager.c: Adjust for namespace cleanup in bits/initspin.h.
109 * pthread.c: Likewise.
110 * spinlock.h: Likewise.
111 * sysdeps/pthread/pthread.h: Likewise.
113 2001-01-26 Ulrich Drepper <drepper@redhat.com>
115 * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
116 as struct __pthread_attr_s.
118 * semaphore.h (sem_t): Cleanup namespace, rename status and
121 2001-01-13 Jakub Jelinek <jakub@redhat.com>
123 * pthread.c (pthread_onexit_process): Clear
124 __pthread_manager_thread_bos after freeing it.
125 * Makefile (tests): Add ex16.
126 * Examples/ex16.c: New file.
128 2001-01-11 Jakub Jelinek <jakub@redhat.com>
130 * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
132 * pthread.c (pthread_exit_process): Rename to...
133 (pthread_onexit_process): ...this.
134 (pthread_atexit_process, pthread_atexit_retcode): New.
135 (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
136 and only if HAVE_Z_NODELETE is not defined.
137 (__pthread_initialize_manager): Register pthread_atexit_retcode
140 2001-01-11 Ulrich Drepper <drepper@redhat.com>
142 * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
144 2001-01-11 Jakub Jelinek <jakub@redhat.com>
146 * Makefile (tests): Add ex15.
147 * Examples/ex15.c: New test.
149 2001-01-08 Ulrich Drepper <drepper@redhat.com>
151 * pthread.c (pthread_exit_process): Free memory allocated for
154 2000-12-31 Ulrich Drepper <drepper@redhat.com>
156 * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
157 (pthread_free): Always unmap the stack. It's safe now that we don't
158 use MAP_FIXED to allocate stacks.
160 2000-12-31 Ulrich Drepper <drepper@redhat.com>
162 * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
164 * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
166 2000-11-15 Wolfram Gloger <wg@malloc.de>
168 * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
169 stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
171 2000-12-27 Andreas Jaeger <aj@suse.de>
173 * Examples/ex13.c: Make local functions static.
174 * ecmutex.c: Likewise.
175 * joinrace.c: Likewise.
176 * Examples/ex14.c: Likewise.
178 * Examples/ex2.c: Make local functions static; reformat.
179 * Examples/ex1.c: Likewise.
180 * Examples/ex4.c: Likewise.
181 * Examples/ex5.c: Likewise.
182 * Examples/ex7.c: Likewise.
184 * oldsemaphore.c: Add prototypes to shut up GCC.
185 * pt-machine.c: Likewise.
187 * weaks.c: Add prototype for pthread_exit.
189 * internals.h: Add some prototypes, format prototypes and add
191 Move __libc_waitpid prototype to include/sys/wait.h.
193 * rwlock.c: Include <bits/libc-lock.h> for prototypes.
195 * specific.c: Likewise.
196 * ptfork.c: Likewise.
198 * lockfile.c: Include internals.h to get prototypes.
199 * events.c: Likewise.
200 * sysdeps/alpha/pspinlock.c: Likewise.
201 * sysdeps/arm/pspinlock.c: Likewise.
202 * sysdeps/hppa/pspinlock.c: Likewise.
203 * sysdeps/i386/pspinlock.c: Likewise.
204 * sysdeps/ia64/pspinlock.c: Likewise.
205 * sysdeps/m68k/pspinlock.c: Likewise.
206 * sysdeps/mips/pspinlock.c: Likewise.
207 * sysdeps/powerpc/pspinlock.c: Likewise.
208 * sysdeps/s390/pspinlock.c: Likewise.
209 * sysdeps/sh/pspinlock.c: Likewise.
210 * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
211 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
212 * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
214 2000-12-27 Ulrich Drepper <drepper@redhat.com>
216 * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
217 (__pthread_attr_getstack): Return correct address.
218 Add warnings for using pthread_attr_getstackaddr and
219 pthread_attr_setstackaddr.
221 2000-12-26 Ulrich Drepper <drepper@redhat.com>
223 * Examples/ex6.c (test_thread): Make static.
224 * Examples/ex12.c (test_thread): Make static and add noreturn
227 2000-12-18 Jes Sorensen <jes@linuxcare.com>
229 * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
230 and compare_and_swap_with_release_semantics returns int not long.
232 2000-12-17 Andreas Jaeger <aj@suse.de>
234 * sysdeps/s390/pt-machine.h (testandset): Use long int as return
236 * sysdeps/arm/pt-machine.h (testandset): Likewise.
237 * sysdeps/hppa/pt-machine.h (testandset): Likewise.
238 * sysdeps/m68k/pt-machine.h (testandset): Likewise.
239 * sysdeps/sh/pt-machine.h (testandset): Likewise.
240 * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
241 * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
243 2000-12-17 Ulrich Drepper <drepper@redhat.com>
245 * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
246 * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
248 2000-12-17 Andreas Jaeger <aj@suse.de>
250 * internals.h: Add prototypes for testandset and
251 __compare_and_swap to shut up gcc warnings.
253 2000-12-06 Wolfram Gloger <wg@malloc.de>
255 * join.c (pthread_detach): Allow case where the thread has already
258 2000-12-05 Andreas Jaeger <aj@suse.de>
260 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
261 * sysdeps/mips/pt-machine.h (testandset): Likewise.
262 (__compare_and_swap): Likewise.
263 Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
265 2000-11-20 Jakub Jelinek <jakub@redhat.com>
267 * Examples/ex3.c (main): Cast int to long before casting to void *.
268 (search): Cast void * to long, not int.
269 * Examples/ex8.c (main, thread): Similarly.
270 * Examples/ex11.c (main): Similarly.
271 * Examples/ex14.c (worker, do_test): Similarly.
272 * ecmutex.c (worker, do_test): Similarly.
273 (nlocks): Cast to int.
275 2000-11-08 Bruce Mitchener <bruce@cubik.org>
277 * linuxthreads.texi: Add documentation for pthreads attributes
278 guardsize, stackaddr, stacksize, and stack. Fix typo in previous
279 patch. Document pthread_[sg]etconcurrency(). Mark
280 pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
282 2000-11-07 Ulrich Drepper <drepper@redhat.com>
284 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
286 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
287 Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
289 2000-11-06 Ulrich Drepper <drepper@redhat.com>
291 * cancel.c (pthread_cancel): Always set p_canceled, even if we are
292 not doing it right now.
293 Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
295 2000-10-30 Ulrich Drepper <drepper@redhat.com>
297 * Examples/ex4.c (main): Don't use exit() to avoid warning with
300 2000-10-29 Ulrich Drepper <drepper@redhat.com>
302 * attr.c (__pthread_attr_setguardsize): Don't round guardsize
303 here. Reported by Bruce Mitchener <bruce@cubik.org>.
305 * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
306 discussing mutexes. (As per the Unix98 name for the API.)
307 Changes documentation for pthread_mutexattr_setkind_np() and
308 pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
309 same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
310 Changes references to PTHREAD_MUTEXATTR_FAST_NP to
311 PTHREAD_MUTEXATTR_ADAPTIVE_NP.
312 Begins to introduce discussion of the ``timed'' mutex type. This
313 discussion is currently incomplete.
314 Patch by Bruce Mitchener <bruce@cubik.org>.
316 2000-10-26 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
317 Yutaka Niibe <gniibe@chroot.org>
319 * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
320 has restrictions, use register.
322 2000-10-23 Andreas Schwab <schwab@suse.de>
324 * Examples/ex14.c (TIMEOUT): Override default timeout.
326 2000-10-16 Ulrich Drepper <drepper@redhat.com>
328 * specific.c: Protect tsd array modification in thread data
329 structures by getting the thread lock in pthread_key_delete and
330 __pthread_destroy_specifics.
331 Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
333 2000-10-12 Alan Modra <alan@linuxcare.com.au>
335 * sysdeps/pthread/bits/initspin.h: New file.
336 * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
337 (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
338 (__pthread_alt_init_lock): Likewise.
339 (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
341 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
343 * oldsemaphore.c (__old_sem_init): Release lock with
344 LT_SPINLOCK_INIT, not zero.
345 * spinlock.c (__pthread_unlock): Likewise.
346 (__pthread_alt_lock): Likewise.
347 (__pthread_alt_timedlock): Likewise.
348 (__pthread_alt_unlock): Likewise.
349 * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
350 LT_SPINLOCK_INIT if it is non-zero. Likewise for init-once flags.
351 * sysdeps/pthread/pthread.h: Include bits/initspin.h. Use
352 LT_SPINLOCK_INIT do initialize spinlocks not 0.
354 2000-10-12 David Huggins-Daines <dhd@linuxcare.com>
356 * shlib-versions: Add version definitions for hppa-linux.
358 2000-10-12 Alan Modra <alan@linuxcare.com.au>
360 * sysdeps/hppa/pspinlock.c: New file.
361 * sysdeps/hppa/pt-machine.h: New file.
362 * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
364 2000-10-05 Jakub Jelinek <jakub@redhat.com>
366 * mutex.c (__pthread_mutex_destroy): Correct test of
367 busy mutex for mutexes using alternate fastlocks.
368 Patch by dtc@cmucl.cons.org.
370 2000-09-28 Martin Schwidefsksy <schwidefsky@de.ibm.com>
372 * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
374 2000-09-28 Ulrich Drepper <drepper@redhat.com>
376 * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
377 test for owner first.
378 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
380 * cancel.c (pthread_cancel): Don't do anything if cancelation is
383 2000-09-26 Ulrich Drepper <drepper@redhat.com>
385 * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
386 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
388 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
389 _POSIX_MONOTONIC_CLOCK.
391 * spinlock.h (__pthread_set_own_extricate_if): Add back locking
394 2000-09-20 Andreas Jaeger <aj@suse.de>
396 * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
397 "testrtsig.h" conditional.
399 2000-09-11 Ulrich Drepper <drepper@redhat.com>
401 * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
402 pthread_attr_setstack.
403 * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
404 pthread_attr_setstack.
405 * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
407 2000-09-05 Ulrich Drepper <drepper@redhat.com>
409 * Examples/ex14.c: New file.
410 * Makefile (tests): Add ex14.
412 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
413 mutex. Patch by dtc@cmucl.cons.org.
415 * ecmutex.c: New file.
416 * Makefile (tests): Add ecmutex.
418 2000-09-04 H.J. Lu <hjl@gnu.org>
420 * attr.c (__pthread_attr_setguardsize): Use page_roundup
421 instead of roundup to round up to the page size.
423 2000-09-03 Mark Kettenis <kettenis@gnu.org>
425 * manager.c (pthread_exited): Correctly report event as TD_REAP
426 instead of TD_DEATH. Fix comments.
428 2000-09-03 Ulrich Drepper <drepper@redhat.com>
430 * spinlock.h (testandset): Add cast to avoid warning.
431 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
433 2000-09-02 Andreas Jaeger <aj@suse.de>
435 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
438 2000-09-01 Ulrich Drepper <drepper@redhat.com>
440 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
441 Fix typo in last patch (_mode -> _flags).
443 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
444 Provide definition which respects _IO_USER_LOCK flag.
446 2000-08-30 Ulrich Drepper <drepper@redhat.com>
448 * manager.c (pthread_allocate_stack): Clear descriptor only if not
451 2000-08-25 Ulrich Drepper <drepper@redhat.com>
453 * Makefile: Add rules to build and run unload.
454 * unload.c: New file.
456 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
458 * sysdeps/pthread/pthread.h
459 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
460 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
462 2000-08-24 Andreas Jaeger <aj@suse.de>
464 * Examples/ex13.c: Include <string.h> for strerror prototype and
465 <stdlib.h> for abort prototype.
466 (pthr_cond_signal_mutex): Rewrite to silence GCC.
467 (thread_start): Remove unused variable err.
468 (main): Silence GCC warnings.
470 2000-08-22 Andreas Jaeger <aj@suse.de>
472 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
474 * Makefile (tests): Add ex13.
476 2000-08-20 Ulrich Drepper <drepper@redhat.com>
478 * semaphore.h: Add restrict where required by AGd4.
479 * sysdeps/pthread/pthread.h: Likewise.
480 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
482 2000-08-15 Ulrich Drepper <drepper@redhat.com>
484 * Makefile (tests): Add ex12. Add rule to build it.
485 * Examples/ex12.c: New file.
487 2000-08-13 Ulrich Drepper <drepper@redhat.com>
489 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
490 even though the implementation is not quite complete (but it reports
491 it). Define _POSIX_MESSAGE_PASSING to -1.
492 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
494 2000-08-12 Andreas Jaeger <aj@suse.de>
496 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
498 (__compare_and_swap): Likewise.
499 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
501 2000-08-10 Ulrich Drepper <drepper@redhat.com>
503 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
504 p_h_errnop correctly and not to NULL.
506 2000-08-05 Ulrich Drepper <drepper@redhat.com>
508 * Banner: Bump version number to 0.9.
510 2000-08-04 Ulrich Drepper <drepper@redhat.com>
512 * Makefile (tests): Add tststack. Add rule to build the program.
513 * tststack.c: New file.
515 * internals.h: Declare __pthread_max_stacksize.
516 * pthread.c (__pthread_max_stacksize): New variable.
517 (__pthread_initialize_manager): Determine __pthread_initialize_manager
519 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
520 (pthread_allocate_stack): Allow kernel to choose stack address if
521 FLOATING_STACKS. This also handles variable-sized stacks.
522 Always allocate stack and guardpage together. Use mprotect to
523 change guardpage access.
524 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
527 * attr.c (__pthread_attr_setstacksize): Also test value against
530 * manager.c (__pthread_nonstandard_stacks): Define only if
531 THREAD_SELF is not defined.
532 (pthread_allocate_stack): Always initialize gardaddr to a correct
534 (pthread_handle_create): Unmap thread with one call.
535 (pthread_free): Remove test for initial thread before removing stack.
536 Unmap stack with one call.
538 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
539 1 to avoid removing the stack.
541 2000-07-27 Jes Sorensen <jes@linuxcare.com>
543 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
544 load of spin lock to prime the cache before the atomic compare and
545 exchange operation (cmpxchg4). This avoids the spinning on the
546 cmpxchg4 instruction and reduces movement of the cache line back
547 and forth between the processors (explanation by Asis K. Mallick
548 from Intel). This basically makes the implementation operate the
549 same as the Linux kernel implementation.
551 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
552 * sysdeps/ia64/pspinlock.c: New file.
554 2000-08-03 Ulrich Drepper <drepper@redhat.com>
556 * pthread.c: Move definition of __pthread_set_own_extricate_if...
557 * spinlock.h: ...here. Remove locking.
558 * internals.h: Remove __pthread_set_own_extricate_if prototype.
560 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
561 (rwlock_rd_extricate_func): Don't determine self, let
562 __pthread_lock do it.
563 (rwlock_wr_extricate_func): Likewise.
564 (rwlock_have_already): Optimize *pself handling a bit.
566 * mutex.c: Use __builtin_expect.
567 * pthread.c: Likewise.
569 2000-08-02 Andreas Jaeger <aj@suse.de>
571 * sysdeps/s390/pspinlock.c: New file.
572 * sysdeps/s390/pt-machine.h: New file.
573 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
575 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
577 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
579 * sysdeps/mips/pt-machine.h (testandset): Likewise.
581 2000-07-26 Andreas Jaeger <aj@suse.de>
583 * pthread.c: Initialize p_sem_avail.
585 2000-07-25 Ulrich Drepper <drepper@redhat.com>
587 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
588 * semaphore.c: Handle spurious wakeups.
590 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
591 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
593 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
594 (__pthread_wait_for_restart): Likewise.
596 * condvar.c (pthread_cond_wait): Also check whether thread is
597 cancelable before aborting loop.
598 (pthread_cond_timedwait): Likewise.
600 * signals.c (pthread_sighandler): Remove special code to restrore
602 (pthread_sighandler_t): Likewise.
604 2000-07-25 Mark Kettenis <kettenis@gnu.org>
606 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
607 * pthread.c: Include <resolv.h>.
608 (_res): Undefine. Add extern declaration.
610 2000-07-24 Ulrich Drepper <drepper@redhat.com>
612 * pthread.c (__pthread_initial_thread): Update initializer.
613 (__pthread_manager_thread): Likewise.
614 (pthread_initialize): Move setrlimit call to...
615 (__pthread_initialize_manager): ...here.
616 (__pthread_reset_main_thread): Reset also soft limit on stack size.
618 * condvar.c: Handle spurious wakeups. [PR libc/1749].
619 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
621 2000-07-21 Ulrich Drepper <drepper@redhat.com>
623 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
624 __compare_and_swap to define testandset.
625 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
626 Define IMPLEMENT_TAS_WITH_CAS.
628 2000-07-20 Ulrich Drepper <drepper@redhat.com>
630 * Makefile: Pass -z nodelete to linker for libpthread.so
631 generation if it understand this option.
633 2000-07-18 Mark Kettenis <kettenis@gnu.org>
635 * manager.c (pthread_handle_create): Remove initialization of
636 new_thread->p_res._sock.
638 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
640 Bugfixes to the variant of the code for machines with no compare
643 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
644 node was not being properly enqueued, due to failing to update
645 the lock->__status field.
647 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
648 being set inappropriately, causing the suspend function to be called
649 with a null self pointer and crash.
651 2000-07-18 Ulrich Drepper <drepper@redhat.com>
653 * spinlock.h (__pthread_alt_trylock): Fix code used if no
654 compare&swap is available.
656 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
659 * pthread.c (pthread_initialize): Don't use sysconf to determine
660 whether the machine has more than one processor.
662 * spinlock.c (__pthread_alt_timedlock): Add back one of the
663 removed thread_self calls.
665 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
667 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
668 __compare_and_swap to compare_and_swap in code which assumes
669 compare swap is available.
671 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
673 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
674 bug whereby thr field of waitnode structure would not be correctly
675 set unless a null self pointer is passed to the functions.
676 Eliminated redundant calls to thread_self().
678 2000-07-18 Jakub Jelinek <jakub@redhat.com>
680 * pthread.c (__pthread_initialize_manager): Lock
681 __pthread_manager_thread.p_lock before calling clone.
683 2000-05-05 H.J. Lu <hjl@gnu.org>
685 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
686 have acquire semantics.
687 (__compare_and_swap_with_release_semantics): New inline
689 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
691 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
693 * manager.c: Fix the problem with signals at startup.
694 Change the way that thread stacks are allocated on IA64.
695 Clean up some of the guard page allocation stuff.
697 1999-12-19 H.J. Lu <hjl@gnu.org>
699 * internals.h (page_roundup): New.
700 * attr.c (__pthread_attr_setguardsize); Use page_roundup
702 * manager.c (pthread_allocate_stack): Make sure guardaddr is
703 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
706 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
708 * manager.c (pthread_allocate_stack): Unmap the stack top
709 if failed to map the stack bottom.
711 (pthread_free): Fix the guard page.
713 * pthread.c (pthread_initialize): Set rlimit correctly for
714 NEED_SEPARATE_REGISTER_STACK.
716 1999-12-16 H.J. Lu <hjl@gnu.org>
718 * pthread.c (__pthread_initialize_manager): Pass
719 __pthread_manager_thread_bos instead of
720 __pthread_manager_thread_tos to __clone2.
722 1999-12-16 H.J. Lu <hjl@gnu.org>
724 * manager.c (pthread_allocate_stack): Correct the calculation
725 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
728 1999-12-13 H.J. Lu <hjl@gnu.org>
730 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
731 bit after setting ar.ccv.
733 1999-12-12 H.J. Lu <hjl@gnu.org>
735 * manager.c (pthread_allocate_stack): Make the starting
736 address of the stack bottom page aligned. FIXME: it may
737 need changes in other places.
738 (pthread_handle_create): Likewise.
740 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
742 * manager.c (pthread_allocate_stack): Handle
743 NEED_SEPARATE_REGISTER_STACK.
744 (pthread_handle_create): Likewise.
745 * pthread.c (__pthread_initialize_manager): Likewise.
747 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
749 1999-12-02 H.J. Lu <hjl@gnu.org>
751 * sysdeps/ia64/pt-machine.h: New.
753 2000-07-13 Ulrich Drepper <drepper@redhat.com>
755 * wrapsyscall.c: Mark non-__ protected names as weak.
758 2000-07-12 Bruno Haible <haible@clisp.cons.org>
760 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
762 2000-07-12 Ulrich Drepper <drepper@redhat.com>
764 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
765 Add tests also to new alternative spinlock implementation.
766 * spinlock.h: Likewise.
767 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
769 2000-07-06 Ulrich Drepper <drepper@redhat.com>
771 * Version: Export __sigaction.
772 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
774 * pthread.c: Use __libc_sigaction instead of __sigaction.
776 * condvar.c: Implement pthread_condattr_getpshared and
777 pthread_condattr_setpshared.
778 * mutex.c: Implement pthread_mutexattr_getpshared and
779 pthread_mutexattr_setpshared.
780 * Versions: Export new functions.
781 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
783 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
784 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
787 2000-07-04 Greg McGary <greg@mcgary.org>
789 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
790 pragmas. Include bp-sym.h only if _LIBC.
792 2000-07-04 Ulrich Drepper <drepper@redhat.com>
794 * spinlock.c (__pthread_unlock): Properly place write barrier.
795 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
797 2000-07-03 Ulrich Drepper <drepper@redhat.com>
799 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
800 faster on SMP systems. No more emulation of compare&swap for adaptive
802 * spinlock.h: Likewise.
803 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
804 Replace fast with adaptive mutex.
805 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
806 * condvar.c: Likewise.
807 * pthread.c: Define and initialize __pthread_smp_kernel variable.
808 * internals.h: Declare __pthread_smp_kernel.
809 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
810 _pthread_fastlock structure.
811 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
813 * pthread.c: Remove initialization to zero from global variables.
815 2000-06-29 Jakub Jelinek <jakub@redhat.com>
817 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
819 2000-06-28 Greg McGary <greg@mcgary.org>
821 * weaks.c: Wrap BP_SYM () around weak extern declarations of
822 pthread functions that have pointers in their return+arg signatures.
824 2000-06-27 Greg McGary <greg@mcgary.org>
826 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
827 extern declarations of pthread functions that have pointers in
828 their return+arg signatures.
830 2000-06-26 Ulrich Drepper <drepper@redhat.com>
832 * Makefile (tests): Add ex11. Add rules to build it.
833 * Examples/ex11.c: New file.
834 * rwlock.c: Fix complete braindamaged previous try to implement
837 * spinlock.c: Pretty print.
839 2000-06-25 Ulrich Drepper <drepper@redhat.com>
841 * Makefile (tests): Add ex10. Add rules to build it.
842 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
843 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
844 * condvar.c (pthread_cond_wait): Allow mutex of kind
845 PTHREAD_MUTEX_TIMED_NP.
846 (pthread_cond_timedwait_relative): Likewise.
847 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
848 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
849 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
850 (__pthread_mutex_lock): Use __pthread_alt_lock for
851 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
852 (__pthread_mutex_timedlock): New function.
853 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
854 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
855 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
856 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
857 * spinlock.c: Implement alternate fastlocks.
858 * spinlock.h: Add prototypes.
859 * Examples/ex10.c: New file.
860 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
861 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
863 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
864 (__pthread_rwlock_timedrdlock): New function.
865 (__pthread_rwlock_timedwrlock): New function.
866 Use laternate fastlock function everywhere.
868 2000-06-21 Andreas Jaeger <aj@suse.de>
870 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
873 * join.c: Include <stdlib.h> for exit prototype.
875 2000-06-20 Ulrich Drepper <drepper@redhat.com>
877 * sysdeps/i386/useldt.h: Include <stdlib.h>.
879 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
880 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
882 * Makefile (libpthread-routines): Add barrier.
883 (tests): Add ex9. Add rule to build ex9.
884 * Versions: Export barrier functions.
885 * barrier.c: New file.
886 * Examples/ex9.c: New file.
887 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
888 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
889 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
891 2000-06-19 H.J. Lu <hjl@gnu.org>
893 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
894 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
895 (compare_and_swap_with_release_semantics): New. Default to
896 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
899 * spinlock.c (__pthread_unlock): Call
900 compare_and_swap_with_release_semantics () instead of
903 2000-06-19 Ulrich Drepper <drepper@redhat.com>
905 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
907 * sysdeps/pthread/timer_delete.c: Likewise.
908 * sysdeps/pthread/timer_getoverr.c: Likewise.
909 * sysdeps/pthread/timer_gettime.c: Likewise.
910 * sysdeps/pthread/timer_settime.c: Likewise.
912 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
914 Timer nodes are now reference counted, and can be marked
915 as deleted. This allows for the safe release of the global mutex
916 in the middle without losing the timer being operated on.
918 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
919 member is now an enum with three values, so that an intermediate
920 state can be represented (deleted but not free for reuse yet).
921 New refcount member added.
922 * sysdeps/pthread/timer_routines.c: Likewise.
924 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
925 timer_valid): New inline functions added.
927 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
928 restructured, recursive deadlock bug fixed.
930 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
931 timer_addref to ensure that timer won't be deleted while mutex is not
932 held. Also uses timer_invalid to perform validation of timer handle.
933 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
934 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
936 2000-06-14 Ulrich Drepper <drepper@redhat.com>
938 * shlib-versions: Add entry for SH.
939 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
941 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
943 A few optimizations. Got rid of unnecessary wakeups of timer threads,
944 tightened up some critical regions and micro-optimized some list
947 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
948 Returns int value now to indicate whether timer was queued at head.
949 * sysdeps/pthread/posix-timer.h: Likewise.
950 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
951 new return value from __timer_thread_queue_timer to avoid waking
952 up timer thread unnecessarily.
954 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
955 inuse flag, because this requires mutex to be held. Callers updated
956 to do the check when they have the mutex.
957 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
959 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
960 regions: avoids making system calls while holding timer mutex, and
961 a few computations were moved outside of the mutex as well.
962 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
964 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
965 to list_unlink_ip, meaning idempotent. Pointer manipulation
966 changed to get better better code out of gcc.
967 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
968 version of list_unlink added here.
969 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
970 function in all places: idempotent one for timers, non-idempotent
971 one for thread nodes.
972 * sysdeps/pthread/timer_settime: Likewise.
973 * sysdeps/pthread/timer_routines.c: Likewise.
975 2000-06-13 Ulrich Drepper <drepper@redhat.com>
977 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
978 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
980 * sysdeps/pthread/Makefile: Remove tests definition.
982 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
983 Yutaka Niibe <gniibe@chroot.org>
985 * sysdeps/sh/pspinlock.c: New file.
986 * sysdeps/sh/pt-machine.h: New file.
988 2000-06-12 Ulrich Drepper <drepper@redhat.com>
990 * Makefile (tests): Add joinrace.
992 * Examples/ex6.c: Test return value of pthread_join.
994 2000-06-11 Geoff Keating <geoffk@cygnus.com>
996 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
997 (__pthread_spin_trylock): Implement.
998 (__pthread_spin_unlock): Implement.
999 (__pthread_spin_init): Implement.
1000 (__pthread_spin_destroy): Implement.
1002 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1004 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
1005 really append the entry.
1007 2000-06-10 Andreas Jaeger <aj@suse.de>
1009 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
1011 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
1013 * sysdeps/pthread/timer_create.c: Thread matching now done on
1014 clock type as well as thread attributes.
1015 There are individual global signal-delivering threads for
1016 different clock types.
1017 * sysdeps/pthread/posix-timer.h: Likewise.
1018 * sysdeps/pthread/timer_routines.c: Likewise.
1020 * sysdeps/pthread/timer_routines.c: Thread allocation and
1021 deallocation function now remembers to put thread on active
1022 list and remove from active list.
1023 Thus now the feature of binding multiple timers
1024 to a single thread actually works.
1026 2000-06-10 Ulrich Drepper <drepper@redhat.com>
1028 * pthread.c (__pthread_create_2_1): Optimize a bit.
1030 * internals.h (invalid_handle): Also test for p_terminated != 0.
1031 (nonexisting_handle): New function. Same as old invalid_handle.
1032 * join.c (pthread_join): Use nonexisting_handle instead of
1033 invalid_handle to test for acceptable thread handle.
1034 * manager.c (pthread_handle_free): Likewise.
1035 * joinrace.c: New file.
1036 Reported by Permaine Cheung <pcheung@cygnus.com>.
1038 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1040 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1041 Correct handling of matching variable.
1043 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
1046 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
1047 Be prepared for empty timer list.
1049 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
1050 CPUTIME clock ID. Add support for thread clocks.
1052 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
1053 subtraction were switched.
1055 * sysdeps/pthread/timer_routines.c (init_module): Use
1056 THREAD_MAXNODES threads.
1058 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
1059 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
1060 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
1061 with sigqueueinfo is this system call is available.
1063 * sysdeps/pthread/timer_create.c (timer_create): Allow
1064 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
1066 * sysdeps/pthread/Makefile: New file. Add rules to build timer
1068 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
1070 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1072 * sysdeps/pthread/posix-timer.h: New file.
1073 * sysdeps/pthread/timer_create.c: New file.
1074 * sysdeps/pthread/timer_delete.c: New file.
1075 * sysdeps/pthread/timer_getoverr.c: New file.
1076 * sysdeps/pthread/timer_gettime.c: New file.
1077 * sysdeps/pthread/timer_routines.c: New file.
1078 * sysdeps/pthread/timer_settime.c: New file.
1079 * sysdeps/pthread/tst-timer.c: New file.
1081 2000-06-08 Ulrich Drepper <drepper@redhat.com>
1083 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
1084 LINK_MAX definitions if necessary.
1086 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
1088 Added missing fork time handling of global libio lock.
1090 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
1091 not just the individual stream locks. Rewritten to use new
1092 iterator interface provided by libio rather than accessing
1095 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
1096 which lock and unlock the stream list using the new interface
1098 * internals.h: Likewise.
1100 * ptfork.c (__fork): Now calls __flockfilelist before fork,
1101 and __funlockfilelist in the parent after the fork.
1102 Child still calls __fresetlockfiles as before.
1104 * linuxthreads.texi: Now explains what happens to streams at
1105 fork time. Also whole new section on forking and thread added.
1106 Definition of pthread_atfork moved out of Miscellaneous Functions
1107 to this new section.
1109 2000-06-04 Jakub Jelinek <jakub@redhat.com>
1111 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
1112 Add missing register.
1113 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
1115 2000-06-02 Jakub Jelinek <jakub@redhat.com>
1117 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
1118 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
1119 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
1121 2000-05-31 Andreas Jaeger <aj@suse.de>
1123 * sysdeps/mips/pspinlock.c: Implement spinlocks.
1125 2000-05-28 Ulrich Drepper <drepper@redhat.com>
1127 * spinlock.c (__pthread_lock): Remove ASSERT.
1129 * Makefile (tests): Add ex8.
1130 * Examples/ex8.c: New file.
1132 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
1134 Bugfix: The pthread_atfork mechanism now takes care of its
1135 own internal mutex at fork time.
1137 * ptfork.c (__fork): Revised so that the mutex is held across
1138 the fork operation and while the handlers are called, and so that
1139 the child resets the mutex.
1141 * linuxthreads.texi: Updated pthread_atfork documentation to make
1142 it clear that fork and pthread_atfork can't be reentered from
1143 atfork handlers, that pthread_atfork and fork are mutually atomic,
1144 and that the handlers are inherited by the child process.
1146 2000-05-24 Ulrich Drepper <drepper@redhat.com>
1148 * Makefile (libpthread-routines): Add pspinlock.
1149 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
1150 Use struct _pthread_fastlock instead of pthread_spinlock_t.
1151 * condvar.c: Likewise.
1152 * internals.h: Likewise.
1154 * manager.c: Likewise.
1155 * mutex.c: Likewise.
1156 * pthread.c: Likewise.
1157 * rwlock.c: Likewise.
1158 * semaphore.c: Likewise.
1159 * signals.c: Likewise.
1160 * spinlock.h: Likewise.
1161 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
1162 * sysdeps/alpha/pspinlock.c: New file.
1163 * sysdeps/arm/pspinlock.c: New file.
1164 * sysdeps/i386/pspinlock.c: New file.
1165 * sysdeps/m68k/pspinlock.c: New file.
1166 * sysdeps/mips/pspinlock.c: New file.
1167 * sysdeps/powerpc/pspinlock.c: New file.
1168 * sysdeps/sparc/sparc32/pspinlock.c: New file.
1169 * sysdeps/sparc/sparc64/pspinlock.c: New file.
1170 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
1171 back to _pthread_fastlock. Define new pthread_spinlock_t.
1173 2000-05-24 Andreas Jaeger <aj@suse.de>
1175 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
1177 2000-05-21 Jakub Jelinek <jakub@redhat.com>
1179 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
1181 2000-05-13 Jakub Jelinek <jakub@redhat.com>
1183 * internals.h (__RES_PTHREAD_INTERNAL): Define.
1185 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1187 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
1188 object state is represented with additional bits which distinguish
1189 whether that state was set up in the current process, or
1190 in an ancestor process. If that state was set in an ancestor,
1191 it means that a fork happened while thread was executing the init
1192 function. In that case, the state is reset to NEVER.
1193 * mutex.c (__pthread_once_fork_prepare): New function.
1194 (__pthread_once_fork_child): Likewise
1195 (__pthread_once_fork_parent): Likewise
1196 (__pthread_reset_pthread_once): Removed.
1197 * ptfork.c (__fork): Call new handlers in mutex.c.
1198 * internals.h: Declarations of new mutex.c functions added.
1199 Declaration of removed function deleted.
1200 * linuxthreads.texi: Updated documentation about pthread_once
1201 to clarify what happens under cancellation and forking.
1203 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
1205 * internals.h: New thread manager request type, REQ_KICK.
1206 * join.c (pthread_exit): main thread now calls exit() instead
1207 of _exit() in order to proper process cleanup.
1208 * manager.c (__pthread_manager): Do not terminate manager
1209 after unblocking main thread; wait for main thread's
1210 REQ_PROCESS_EXIT request instead.
1211 Also, added REQ_KICK case to handle new request; this just does
1213 * manager.c (pthread_exited): Do not terminate manager after
1214 unblocking main thread.
1215 * manager.c (__pthread_manager_sighandler): If the main thread
1216 is waiting for all other threads to die, send a REQ_KICK into
1217 the thread manager request pipe to get it to clean out the threads
1218 and unblock the main thread as soon as possible. This fixes
1219 the 2000 millisecond hang on shutdown bug.
1220 * Examples/ex7.c: New file, tests shutdown behavior when all threads
1221 including the main one call pthread_exit(), or implicitly do so.
1222 * Makefile (tests): Add ex7.
1224 2000-05-05 Andreas Jaeger <aj@suse.de>
1226 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1227 (pthread_getcpuclockid): Correct test for ourselves.
1229 2000-05-05 Ulrich Drepper <drepper@redhat.com>
1231 * internals.h (struct _pthread_descr_struct): Reorganization.
1232 Allocate room for 16 pointers at head of the structure for future
1233 thread-local data handling. Move p_self member in this area.
1234 * manager.c (pthread_handle_create): Adjust use of p_self.
1235 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
1236 * pthread.c (__pthread_initial_thread): Adjust initialization.
1237 (__pthread_manager_thread): Likewise.
1239 2000-04-29 Bruno Haible <haible@clisp.cons.org>
1241 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
1242 for eventmask larger than 1 word.
1244 2000-04-27 Ulrich Drepper <drepper@redhat.com>
1246 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
1247 * pthread.c (__pthread_initialize_minimal): New function. Perform
1248 minimal initialization.
1249 (pthread_initialize): Remove this code here.
1250 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
1251 are working around the problem in glibc.
1253 2000-04-25 Ulrich Drepper <drepper@redhat.com>
1255 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
1256 now. First gcc must be fixed (more concrete: libgcc).
1258 2000-04-24 Ulrich Drepper <drepper@redhat.com>
1260 * pthread.c: Remove special treatement for interrupt handlers on x86.
1261 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
1262 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
1264 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
1266 2000-04-24 Mark Kettenis <kettenis@gnu.org>
1268 * join.c (pthread_exit): Set p_terminated after reporting the
1269 termination event instead of before.
1271 2000-04-20 Jakub Jelinek <jakub@redhat.com>
1273 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
1276 2000-04-18 Andreas Jaeger <aj@suse.de>
1278 * Versions: Use ld instead of ld.so.
1280 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1282 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
1283 Remove the typedef keyword.
1285 2000-04-18 Jakub Jelinek <jakub@redhat.com>
1287 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
1289 (READ_MEMORY_BARRIER): Define.
1290 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
1292 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
1295 2000-04-17 Ulrich Drepper <drepper@redhat.com>
1297 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1298 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
1299 use thread_handle().
1301 2000-04-16 Ulrich Drepper <drepper@redhat.com>
1303 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
1304 if fast mutex is used. Don't initialize `already_canceled' twice.
1305 Correctly test for return value of timedsuspend.
1307 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
1308 therefore don't need the _rt versions of the signal handlers.
1310 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1312 * pthread.c (pthread_yield): New function.
1313 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
1314 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
1315 * internals.h: Declare __pthread_yield.
1317 * pthread.c (pthread_initialize): Avoid a bit more code if
1318 realtime signals are known to exist.
1320 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
1321 to dynamically detect RT signals and avoid generating compatibility
1322 functions with old kernel.
1323 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
1324 __pthread_restart_new directly.
1325 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
1326 __pthread_wait_for_restart_signal directly.
1327 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
1328 __pthread_timedsuspend_new directly.
1330 2000-04-15 Ulrich Drepper <drepper@redhat.com>
1332 * condvar.c: Remove all the special code to handle cond_timedwait.
1333 Use timedsuspend instead.
1334 * internals.h: Declare __pthread_timedsuspend_old,
1335 __pthread_timedsuspend_new, and __pthread_timedsuspend.
1336 Remove declaration of __pthread_init_condvar.
1337 * pthread.c: Define __pthread_timedsuspend variable.
1338 (__pthread_timedsuspend_old): New function. Timed suspension
1339 implementation for old Linux kernels.
1340 (__pthread_timedsuspend_new): New function. Timed suspension
1341 implementation for new Linux kernels.
1342 * restart.h (timedsuspend): New function. Call appropriate
1343 suspension function through __pthread_timedsuspend.
1344 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
1346 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1348 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
1350 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
1352 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
1353 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1355 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
1356 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1358 2000-04-14 Andreas Jaeger <aj@suse.de>
1360 * weaks.c: Fix typo.
1362 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
1363 2.2 for linuxthreads.
1365 2000-04-13 Ulrich Drepper <drepper@redhat.com>
1367 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
1368 (pthread_getcpuclockid): Fix typo.
1370 2000-04-12 Ulrich Drepper <drepper@redhat.com>
1372 * Makefile (libpthread-routines): Add getcpuclockid.
1373 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
1374 * sysdeps/pthread/getcpuclockid.c: New file.
1375 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
1376 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
1378 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
1380 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1382 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
1383 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1384 and pthread_spin_unlock.
1385 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
1386 into pthread_spinlock_t. Change all uses.
1387 * spinlock.c: Implement pthread_spin_lock.
1388 Rename __pthread_unlock to __pthread_spin_unlock and define weak
1389 alias for real name.
1390 Define pthread_spin_trylock, pthread_spin_init, and
1391 pthread_spin_destroy.
1392 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1393 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
1394 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1395 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
1396 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
1397 and pthread_spin_unlock.
1398 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
1399 Change all uses of _pthread_fastlock to pthread_spinlock_t.
1400 * condvar.c: Likewise.
1401 * internals.h: Likewise.
1403 * manager.c: Likewise.
1404 * mutex.c: Likewise.
1405 * pthread.c: Likewise.
1406 * rwlock.c: Likewise.
1407 * semaphore.c: Likewise.
1408 * signals.c: Likewise.
1410 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1412 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1414 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1416 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1417 _POSIX_SHARED_MEMORY_OBJECTS.
1419 2000-04-11 Andreas Jaeger <aj@suse.de>
1421 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1422 (__compare_and_swap): Mark as modifying memory.
1424 2000-04-11 Geoff Keating <geoffk@cygnus.com>
1426 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1428 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1429 Don't have the 'asm' __volatile__.
1431 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1433 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1434 * spinlock.c (__pthread_lock): Add memory barriers.
1435 (__pthread_unlock): Likewise.
1436 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1438 (RELEASE): Not needed anymore.
1439 (__compare_and_swap): Mark asm as modifying memory.
1440 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
1442 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1443 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1444 (MEMORY_BARRIER): Define using stbar.
1445 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1447 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1448 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1449 Mike Burrows <m3b@pa.dec.com>.
1451 2000-04-09 Ulrich Drepper <drepper@redhat.com>
1453 * signals.c (sigaction): Fix return value for the case SIG is one
1454 of the signals the implementation uses.
1455 Patch by Xavier.Leroy@inria.fr.
1457 2000-04-01 Andreas Jaeger <aj@suse.de>
1459 * attr.c: Use shlib-compat macros.
1460 * oldsemaphore.c: Likewise.
1461 * pthread.c: Likewise.
1462 * weaks.c: Likewise.
1464 2000-03-26 Ulrich Drepper <drepper@redhat.com>
1466 * semaphore.c (sem_timedwait): New function.
1467 Patch by Carl Mailloux <carlm@oricom.ca>.
1468 * semaphore.h: Declare sem_timedwait.
1469 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1471 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
1473 * sysdeps/pthread/Makefile: File removed.
1475 2000-03-23 Ulrich Drepper <drepper@redhat.com>
1477 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1478 * internals.h (__pthread_reset_pthread_once): Add prototype.
1479 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1481 * manager.c (pthread_handle_create): Store ID of new thread before
1484 2000-03-21 Ulrich Drepper <drepper@redhat.com>
1486 * attr.c: Use new macros from shlib-compat.h to define versions.
1487 * oldsemaphore.c: Likewise.
1488 * semaphore.c: Likewise.
1489 * weaks.c: Likewise.
1491 * pthread.c: Update for new SHLIB_COMPAT definition.
1493 * manager.c (__pthread_manager): Unmask debug signal.
1495 * pthread.c (pthread_initialize): Test for address of __dso_handle
1496 being NULL, not value. Use __on_exit, not on_exit.
1497 Patch by Andreas Jaeger <aj@suse.de>.
1499 * pthread.c: Use new macros from shlib-compat.h to define versions.
1501 2000-03-19 Ulrich Drepper <drepper@redhat.com>
1503 * pthread.c (pthread_initialize): Instead of on_exit use
1504 __cxa_atexit if __dso_label is available to allow unloading the
1505 libpthread shared library.
1507 2000-03-16 Ulrich Drepper <drepper@redhat.com>
1509 * condvar.c: Make tests for ownership of mutex less strict.
1511 2000-03-14 Ulrich Drepper <drepper@redhat.com>
1513 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1514 current thread and return error if not.
1515 (pthread_cond_timedwait_relative_old): Likewise.
1516 (pthread_cond_timedwait_relative_new): Likewise.
1518 * mutex.c (__pthread_once): Handle cancelled init function correctly.
1519 (pthread_once_cancelhandler): New function.
1520 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1522 2000-03-14 Andreas Jaeger <aj@suse.de>
1524 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1526 (pthread_handle_sigrestart_rt): Likewise.
1527 * signals.c (pthread_sighandler_rt): Likewise.
1529 2000-03-02 Andreas Jaeger <aj@suse.de>
1531 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1532 Reported by Sean Chen <sean.chen@turbolinux.com>.
1534 2000-02-28 Andreas Jaeger <aj@suse.de>
1536 * rwlock.c: Fix typo.
1538 2000-02-27 Ulrich Drepper <drepper@redhat.com>
1540 * rwlock.c: Define __* variants of the functions and make old names
1542 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1543 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1545 2000-02-25 Andreas Jaeger <aj@suse.de>
1547 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1548 pwrite64, lseek64, open64, and __open64 with version 2.2.
1550 2000-02-22 Ulrich Drepper <drepper@redhat.com>
1552 * semaphore.h (SEM_FAILED): Use 0 not NULL.
1554 2000-02-14 Ulrich Drepper <drepper@redhat.com>
1556 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1557 nanosleep does not work either. Get absolute time inside the
1559 (pthread_cond_timedwait_relative_new): Likewise.
1560 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1562 2000-02-13 Andreas Jaeger <aj@suse.de>
1564 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1565 (pthread_cond_timedwait_relative_old): Likewise.
1567 2000-02-13 Ulrich Drepper <drepper@redhat.com>
1569 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1570 but keep the code around. A bug in the kernel prevent us from
1572 (pthread_cond_timedwait_relative_new): Likewise.
1573 (PR libc/1597 and libc/1598).
1575 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
1577 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1578 loop around nanosleep calls instead of around most of the function
1579 (pthread_cond_timedwait_relative_new): Likewise.
1580 body. Got rid of backwards goto and one local.
1582 2000-01-31 Ulrich Drepper <drepper@redhat.com>
1584 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1585 before every nanosleep call to account for time spent in the rest
1587 (pthread_cond_timedwait_relative_new): Likewise.
1588 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1590 2000-01-29 Ulrich Drepper <drepper@redhat.com>
1592 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1593 from nanosleep call so that in case we restart we only wait for the
1595 (pthread_cond_timedwait_relative_new): Likewise.
1596 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1598 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
1600 * manager.c (pthread_allocate_stack): Compute guard page address
1601 correctly. Patch by HJ Lu.
1603 * sysdeps/pthread/pthread.h: Define
1604 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1606 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
1608 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1609 preference handling.
1610 (pthread_rwlockattr_setkind_np): Allow
1611 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1612 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1614 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
1616 * internals.h (pthread_readlock_info): New structure.
1617 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1618 p_untracked_readlock_count.
1619 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1620 Add initializers for new fields.
1621 * manager.c (pthread_free): Free read/write lock lists.
1622 * queue.h (queue_is_empty): New function.
1623 * rwlock.c: Implement requirements about when readers should get
1625 * sysdeps/pthread/pthread.h
1626 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1627 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1628 Define this name as well.
1629 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1631 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
1633 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1634 Adjust initializers for struct _pthread_descr_struct change.
1635 * internals.h (struct _pthread_descr_struct): Move new elements to
1638 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
1640 Redesigned how cancellation unblocks a thread from internal
1641 cancellation points (sem_wait, pthread_join,
1642 pthread_cond_{wait,timedwait}).
1643 Cancellation won't eat a signal in any of these functions
1644 (*required* by POSIX and Single Unix Spec!).
1645 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1646 simultaneous condition variable signal (not required by POSIX
1647 or Single Unix Spec, but nice).
1648 * spinlock.c: __pthread_lock queues back any received restarts
1649 that don't belong to it instead of assuming ownership of lock
1650 upon any restart; fastlock can no longer be acquired by two threads
1652 * restart.h: Restarts queue even on kernels that don't have
1653 queued real time signals (2.0, early 2.1), thanks to atomic counter,
1654 avoiding a rare race condition in pthread_cond_timedwait.
1656 1999-12-31 Andreas Jaeger <aj@suse.de>
1658 * internals.h: Remove duplicate prototype declarations.
1660 * weaks.c: Remove __THROW from prototypes since the file is not
1661 compiled by a C++ compiler.
1662 * internals.h: Likewise.
1664 1999-12-30 Andreas Jaeger <aj@suse.de>
1666 * sysdeps/pthread/pthread.h: Move internal functions to...
1667 * sysdeps/pthread/bits/libc-lock.h: ...here.
1669 1999-12-29 Andreas Jaeger <aj@suse.de>
1671 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1673 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
1675 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1678 * manager.c (__pthread_start): Add one more cast to prevent
1679 warning on 64bit machines.
1681 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
1683 * manager.c (pthread_handle_create): Set p_pid of new thread
1684 before calling the callback function to report a new thread.
1686 1999-12-20 Andreas Jaeger <aj@suse.de>
1688 * pthread.c (pthread_initialize): Move getrlimit call after
1691 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
1693 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1694 pwrite64, lseek64, open64, and __open64.
1695 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1696 pwrite64, lseek64, open64, and __open64.
1698 * manager.c (pthread_allocate_stack): Correct computation of
1699 new_thread_bottom. Correct handling of stack size and when the
1700 rlimit method to guard for stack growth is used.
1701 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1702 minus one pagesize (not two).
1704 1999-12-03 Andreas Jaeger <aj@suse.de>
1706 * Versions: Add __res_state with version GLIBC_2.2.
1708 * errno.c (__res_state): New function to return thread specific
1711 * pthread.c (pthread_initialize): Initialize p_resp.
1712 (__pthread_reset_main_thread): Also set p_resp.
1714 * manager.c (pthread_handle_create): Initialize p_resp.
1716 * internals.h: Add thread specific resolver state.
1717 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1719 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
1721 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1723 * sysdeps/i386/i686/pt-machine.h: Likewise.
1724 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1726 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
1728 * manager.c (pthread_start_thread_event): Initialize p_pid already
1731 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
1733 * internals.h: Add prototype for __pthread_manager_event.
1734 * manager.c (__pthread_manager_event): New function.
1735 (pthread_start_thread_event): Correct computation of self.
1736 Use INIT_THREAD_SELF.
1737 * pthread.c (__pthread_manager_thread): Initialize p_lock.
1738 (__pthread_initialize_manager): Respect event flags also for creation
1739 of the manager thread.
1741 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
1743 * pthread.c (__pthread_initialize_manager): Initialize
1744 __pthread_manager_thread.p_tid.
1746 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
1748 * internals.h: Declare __pthread_last_event.
1749 * manager.c: Define __pthread_last_event.
1750 (pthread_handle_create): Set __pthread_last_event.
1751 (pthread_exited): Likewise.
1752 * join.c (pthread_exit): Likewise.
1754 * Makefile (libpthread-routines): Add events.
1755 * events.c: New file.
1756 * internals.h: Protect against multiple inclusion.
1757 Include thread_dbP.h header.
1758 (struct _pthread_descr_struct): Add new fields p_report_events and
1760 Declare event reporting functions.
1761 * join.c (pthread_exit): Signal event if this is wanted.
1762 * manager.c (__pthread_threads_events): New variable.
1763 (pthread_handle_create): Take new parameters with event information.
1764 Signal TD_CREATE event if wanted.
1765 (__pthread_manager): Adjust pthread_handle_create call.
1766 (pthread_start_thread_event): New function. Block until manager is
1767 finished and then call pthread_start_thread.
1768 (pthread_exited): Signal TD_REAP event if wanted.
1770 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
1772 * restart.h (suspend_with_cancellation): Rewrite as a macro.
1774 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1776 1999-10-25 Andreas Jaeger <aj@suse.de>
1778 * internals.h: Remove K&R compatibility.
1779 * no-tsd.c: Likewise.
1780 * semaphore.h: Likewise.
1781 * signals.c: Likewise.
1782 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1783 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1784 * weaks.c: Likewise.
1786 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
1788 * pthread.c: For i386, wrap pthread_handle_sigrestart and
1789 pthread_handle_sigcancel with functions that restore %gs from the
1790 signal context. For each signal handling function, two wrappers
1791 are required, one for a non-RT signal and one for a RT signal.
1792 * signal.c: For i386, add code to restore %gs from the signal
1793 context in pthread_sighandler and pthread_sighandler_rt.
1795 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
1797 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1799 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
1801 * pthread.c (__pthread_initial_thread): Pass argument to
1802 PTHREAD_START_ARGS_INITIALIZER.
1803 (__pthread_manager_thread): Likewise.
1805 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1806 initialize function.
1808 * manager.c (pthread_handle_create): Remove p_startfct initialization.
1810 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1812 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
1814 * internals.h: Correct return types for __libc_read and __libc_write.
1816 1999-10-09 Andreas Jaeger <aj@suse.de>
1818 * internals.h: Add __new_sem_post to get prototype in
1819 manager.c; include semaphore.h for needed types.
1821 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
1823 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1824 directly instead of calling sem_post which should not be necessary
1825 but is faster and might help in some case to work around problems.
1826 Patch by khendricks@ivey.uwo.ca [libc/1382].
1828 1999-10-08 Andreas Schwab <schwab@suse.de>
1830 * sysdeps/pthread/Subdirs: New file.
1833 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
1835 * Implies: New file.
1836 * internals.h (struct _pthread_descr_struct): Add p_startfct.
1837 * manager.c (pthread_handle_create): Initialize p_startfct.
1838 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
1840 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
1842 * manager.c (__linuxthreads_pthread_threads_max): New variable.
1843 * specific.c (__linuxthreads_pthread_keys_max): New variable.
1844 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
1846 * condvar.c (pthread_cond_timedwait_relative): Never return with
1847 EINTR. Patch by Andreas Schwab.
1849 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
1851 * signals.c (sigaction): Correct last patch. Don't select
1852 pthread_sighandler_rt based on the signal number but instead of
1853 the SA_SIGINFO flag.
1855 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
1857 * specific.c: Move definitions of struct pthread_key_struct and
1858 destr_function to ...
1859 * internals.h: ...here.
1861 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
1863 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
1864 this instead of pthread_handle_sigrestart if the signal is an RT
1867 * signals.c: Handle passing through of sighandler arguments also
1868 for real-time signals.
1870 1999-09-03 Andreas Schwab <schwab@suse.de>
1872 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
1874 (__vfork): New function, alias vfork.
1875 * Versions: Export __fork, vfork, and __vfork in libpthread.
1877 1999-08-23 Andreas Schwab <schwab@suse.de>
1879 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
1880 call to signal handler.
1882 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
1884 * pthread.c (__pthread_reset_main_thread): Undo last change.
1885 (__pthread_kill_other_threads_np): Reset signal handlers for the
1886 signals we used in the thread implementation here.
1888 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
1890 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
1891 for the signals we used in the thread implementation [PR libc/1234].
1893 * Versions: Export __pthread_kill_other_threads_np from libpthread
1896 * signals.c: Pass sigcontext through wrapper to the user function.
1898 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
1900 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
1901 __libc_internal_tsd_set.
1903 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1905 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
1908 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1910 * internals.h: Align _pthread_descr_struct to 32 bytes.
1911 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
1914 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
1916 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
1919 1999-07-09 Cristian Gafton <gafton@redhat.com>
1921 * Makefile (libpthread-routines): Add oldsemaphore routine.
1922 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
1923 sem_trywait, and sem_wait to GLIBC_2.1.
1924 * oldsemaphore.c: New file.
1925 * semaphore.c: Add default_symbol_versions for the changed functions.
1926 (__new_sem_init): Rename from sem_init.
1927 (__new_sem_post): Rename from sem_post.
1928 (__new_sem_wait): Rename from sem_wait.
1929 (__new_sem_trywait): Rename from sem_trywait.
1930 (__new_sem_getvalue): Rename from sem_getvalue.
1931 (__new_sem_destroy): Rename from sem_destroy.
1933 1999-06-23 Robey Pointer <robey@netscape.com>
1935 * internals.h: Added p_nextlock entry to separate queueing for a
1936 lock from queueing for a CV (sometimes a thread queues on a lock
1937 to serialize removing itself from a CV queue).
1938 * pthread.c: Added p_nextlock to initializers.
1939 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
1941 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
1943 * manager.c (pthread_handle_create): Free mmap region after stack
1944 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
1946 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1948 * man/pthread_cond_init.man: Correct example.
1949 Reported by Tomas Berndtsson <tomas@nocrew.org>.
1951 * linuxthreads.texi (Condition Variables): Likewise.
1953 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
1955 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
1956 casx not cas, also successful casx returns the old value in rd
1957 and not the new value.
1959 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
1961 * manager.c: If pthread_create() is given a NULL attribute
1962 and the thread manager runs with a realtime policy, set the
1963 scheduling policy of the newly created thread back to SCHED_OTHER.
1964 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
1965 initialize the schedpolicy field of new_thread->p_start_args
1966 to that of the calling thread.
1968 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
1970 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
1971 instruction does not allow memory element to use offset.
1973 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
1975 * manager.c (pthread_allocate_stack): Optimize initialization of new
1978 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
1979 Don't use initializer since it is all zeroes.
1980 (__libc_once_define): Likewise.
1982 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1984 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
1985 doesn't exist anymore.
1986 * sysdeps/i386/Implies: Likewise.
1987 * sysdeps/m68k/Implies: Likewise.
1988 * sysdeps/mips/Implies: Likewise.
1989 * sysdeps/powerpc/Implies: Likewise.
1990 * sysdeps/sparc/sparc32/Implies: Likewise.
1991 * sysdeps/sparc/sparc64/Implies: Likewise.
1993 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
1995 * sysdeps/alpha/bits/semaphore.h: Removed.
1996 * sysdeps/powerpc/bits/semaphore.h: Removed.
1997 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1998 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1999 * Makefile (headers): Remove bits/semaphore.h.
2001 * semaphore.h: Define _pthread_descr if necessary.
2002 Don't include limits.h. Define SEM_VALUE_MAX directly.
2004 (sem_t): Protect element names with leading __.
2005 Add declarations for sem_close, sem_open, and sem_unlink.
2006 * semaphore.c: Adjust all functions for new element names.
2007 Define sem_close, sem_open, and sem_unlink.
2008 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
2010 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
2013 1999-03-16 H.J. Lu <hjl@gnu.org>
2015 * specific.c (pthread_key_delete): Check th->p_terminated to see
2016 if the thread is running.
2018 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
2019 Added to GLIBC_2.0 for libc.so.
2021 1999-02-12 H.J. Lu <hjl@gnu.org>
2023 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
2024 __libc_allocate_rtsig): Added to GLIBC_2.1.
2026 * internals.h (DEFAULT_SIG_RESTART): Removed.
2027 (DEFAULT_SIG_CANCEL): Removed.
2029 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
2030 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
2031 (__pthread_sig_restart, __pthread_sig_cancel,
2032 __pthread_sig_debug): Initialized.
2033 (pthread_initialize): Call init_rtsigs () to initialize
2036 1999-02-03 H.J. Lu <hjl@gnu.org>
2038 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
2039 Don't restart the thread which sent REQ_DEBUG.
2040 (pthread_start_thread): Check if __pthread_sig_debug > 0
2043 * pthread.c (__pthread_initialize_manager): Suspend ourself
2044 after sending __pthread_sig_debug to gdb instead of
2045 __pthread_sig_cancel.
2047 1999-01-24 H.J. Lu <hjl@gnu.org>
2049 * manager.c (__pthread_manager): Delete __pthread_sig_debug
2050 from mask if __pthread_sig_debug > 0.
2051 (pthread_handle_create): Increment __pthread_handles_num.
2053 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
2054 * pthread.c (__pthread_initialize_manager): Likewise.
2056 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
2057 instead of __libc_allocate_rtsig (2).
2058 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
2059 instead of __pthread_sig_cancel.
2060 (pthread_handle_sigdebug): Fix comments.
2062 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
2064 * manager.c (pthread_allocate_stack): Set
2065 __pthread_nonstandard_stacks if user-specified stack is used.
2067 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
2069 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
2070 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
2072 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
2074 * pthread.c: Use a third signal __pthread_sig_debug distinct
2075 from __pthread_sig_cancel to notify gdb when a thread is
2077 * manager.c: Likewise.
2078 * internals.h: Likewise.
2079 * signals.c: The implementation of sigwait(s) assumed that
2080 all signals in s have signal handlers already attached.
2081 This is not required by the standard, so make it work
2082 also if some of the signals have no handlers.
2084 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2086 * linuxthreads.texi: Remove pointers from first @node. Move old
2087 @node spec inside comment.
2089 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
2091 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
2094 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
2096 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
2097 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
2099 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
2101 * manager.c: Threads now send __pthread_sig_cancel on termination.
2102 Change clone call and signal masks.
2103 * thread.c (pthread_handle_sigrestart): Remove special code for
2105 (pthread_handle_sigcancel): In manager thread call
2106 __pthread_manager_sighandler.
2107 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
2108 * sysdeps/i386/i686/pt-machine.h: Likewise.
2109 Patches by Xavier Leroy.
2111 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
2113 * spinlock.c (__pthread_unlock): Don't crash if called for an
2114 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
2116 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
2119 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
2121 * Examples/ex3.c: Wait until all threads are started before
2122 searching for the number to avoid race condition on very fast
2125 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2127 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
2128 declaration since it's not needed.
2130 * sysdeps/pthread/pthread.h: Move internal functions to ...
2131 * internals.h: ...here.
2133 1998-12-02 H.J. Lu <hjl@gnu.org>
2135 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
2136 SIGRTMIN is defined.
2137 (__pthread_sig_cancel): Likewise.
2139 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2141 * wrapsyscall.c: Include <sys/mman.h> for msync,
2142 <stdlib.h> for system and <termios.h> for tcdrain prototype.
2143 Correct msync declaration.
2145 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
2147 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
2148 __libc_tsd_set): New macros for new interface.
2149 * no-tsd.c: New file, provide uninitialized defns of
2150 __libc_internal_tsd_get and __libc_internal_tsd_set.
2151 * Makefile (routines): Add no-tsd.
2153 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
2155 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
2156 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2157 __libc_internal_tsd_set): Move decls to ...
2158 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
2161 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
2162 __libc_internal_tsd_set): Make these pointers to functions, not
2163 functions; remove #pragma weak decls for them.
2164 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
2165 Define static functions and initialized pointers to them.
2167 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
2169 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
2170 (CFLAGS-specific.c): Likewise.
2171 (CFLAGS-pthread.c): Likewise.
2172 (CFLAGS-ptfork.c): Likewise.
2173 (CFLAGS-cancel.c): Likewise.
2174 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
2175 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
2177 * mutex.c (pthread_mutex_init): Define as strong symbol.
2178 (pthread_mutex_destroy): Likewise.
2179 (pthread_mutex_trylock): Likewise.
2180 (pthread_mutex_lock): Likewise.
2181 (pthread_mutex_unlock): Likewise.
2182 (pthread_mutexattr_init): Likewise.
2183 (pthread_mutexattr_destroy): Likewise.
2184 (pthread_once): Likewise.
2185 * ptfork.c (pthread_atfork): Likewise.
2186 * specific.c (pthread_key_create): Likewise.
2187 (pthread_setspecific): Likewise.
2188 (pthread_getspecific): Likewise.
2190 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2192 * linuxthreads.texi: Fix punctuation after xref.
2194 1998-11-10 H.J. Lu <hjl@gnu.org>
2196 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
2197 if it is defined in <linux/limits.h>.
2199 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
2201 * spinlock.h (__pthread_trylock): Define inline.
2202 (__pthread_lock): Add extra parameter to declaration. Declare
2203 using internal_function.
2204 (__pthread_unlock): Declare using internal_function.
2205 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
2206 of local variable self. Avoid recomputing self. Define using
2208 (__pthread_trylock): Remove.
2209 (__pthread_unlock): Define using internal_function.
2210 * cancel.c: Adjust for __pthread_lock interface change. Use already
2211 computed self value is possible.
2212 * condvar.c: Likewise.
2214 * manager.c: Likewise.
2215 * mutex.c: Likewise.
2216 * pthread.c: Likewise.
2217 * rwlock.c: Likewise.
2218 * semaphore.c: Likewise.
2219 * signals.c: Likewise.
2221 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
2223 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
2224 __ to field names of the struct.
2225 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
2227 (pthread_attr_t): Likewise.
2228 (pthread_cond_t): Likewise.
2229 (pthread_condattr_t): Likewise.
2230 (pthread_mutex_t): Likewise.
2231 (pthread_mutexattr_t): Likewise.
2232 (pthread_rwlock_t): Likewise.
2233 (pthread_rwlockattr_t): Likewise.
2234 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
2235 * cancel.c: Likewise.
2236 * condvar.c: Likewise.
2237 * manager.c: Likewise.
2238 * mutex.c: Likewise.
2239 * pthread.c: Likewise.
2240 * ptlongjmp.c: Likewise.
2241 * rwlock.c: Likewise.
2242 * spinlock.c: Likewise.
2244 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
2246 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
2249 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
2252 * Makefile (libpthread-routines): Add pt-machine.
2253 * pt-machine.c: New file.
2254 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
2255 yet defined. Use PT_EI in extern inline definitions.
2256 * sysdeps/arm/pt-machine.h: Likewise.
2257 * sysdeps/i386/pt-machine.h: Likewise.
2258 * sysdeps/i386/i686/pt-machine.h: Likewise.
2259 * sysdeps/m68k/pt-machine.h: Likewise.
2260 * sysdeps/mips/pt-machine.h: Likewise.
2261 * sysdeps/powerpc/pt-machine.h: Likewise.
2262 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2263 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2265 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2267 * semaphore.h: Include <sys/types.h> so that _pthread_descr
2270 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
2272 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
2274 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
2276 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2278 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
2281 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2283 * signals.c (sigaction): Check that sig is less than NSIG to avoid
2284 array index overflow.
2286 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
2288 * sysdeps/pthread/semaphore.h: New file.
2290 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
2292 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
2293 _LIBC_TSD_KEY_DL_ERROR.
2295 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
2297 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
2298 * sysdeps/i386/pt-machine.h: Likewise.
2299 Suggested by Roland McGrath.
2301 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
2303 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
2304 access thread data with non-constant offsets.
2305 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
2308 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
2309 THREAD_SETMEM_NC definitions.
2311 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
2313 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2315 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
2317 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
2318 not already defined.
2319 (struct _pthread_descr_struct): Add p_self and p_nr field.
2320 * manager.c (__pthread_handles): Define second element to point
2322 (__pthread_handles_num): Initialize to 2.
2323 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
2324 (pthread_start_thread): Likewise.
2325 (pthread_handle_create): Start search for free slot at entry 2.
2326 Initialize new fields p_self and p_nr.
2327 Call __clone with CLONE_PTRACE if available.
2328 (pthread_free): Call FREE_THREAD_SELF if available.
2329 * pthread.c (__pthread_initial_thread): Initialize new fields.
2330 (__pthread_manager_thread): Likewise.
2331 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
2333 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
2334 elements of the thread descriptor.
2335 * condvar.c: Likewise.
2336 * errno.c: Likewise.
2338 * manager.c: Likewise.
2339 * pthread.c: Likewise.
2340 * ptlongjmp.c: Likewise.
2341 * semaphore.c: Likewise.
2342 * signals.c: Likewise.
2343 * specific.c: Likewise.
2344 * spinlock.c: Likewise.
2346 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
2348 * sysdeps/i386/useldt.h: New file.
2349 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
2351 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
2352 THREAD_SETMEM using __thread_self.
2353 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2355 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
2357 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
2358 turned out that we didn't need to queue after all.
2360 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
2362 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
2363 and wastes space; correct types.
2365 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
2367 * signals.c (sigaction): Handle NULL argument.
2369 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
2371 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
2374 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2376 * Makefile (linuxthreads-version): Extract correct number from
2379 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
2381 * Banner: Bump version number to 0.8
2382 * FAQ.html: Many updates, in particular w.r.t. debugging.
2383 * manager.c: Support for non-default stacksize for
2384 LinuxThreads-allocated stacks;
2385 don't use guard pages for stacks with default size, rely on
2386 rlimit(RLIMIT_STACK) instead (it's cheaper).
2388 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
2389 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
2390 * condvar.c: Likewise.
2391 * internals.h: Likewise.
2392 * restart.h: Likewise.
2393 * signals.c: Likewise.
2394 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
2396 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2398 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
2399 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
2400 * Versions: Put __pthread_mutexattr_settype under version
2401 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
2402 __pthread_mutexattr_gettype.
2404 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2406 * sysdeps/pthread/bits/libc-lock.h: Make
2407 __pthread_mutexattr_settype weak. Don't make
2408 __pthread_mutexattr_setkind_np weak.
2410 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
2412 * manager.c (pthread_handle_create): Check whether sched_setscheduler
2413 call can succeed here.
2415 * mutex.c: Define __pthread_mutexattr_settype and make
2416 __pthread_mutexattr_setkind_np an alias.
2417 Likewise for __pthread_mutexattr_gettype.
2419 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2421 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2424 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
2426 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2428 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2430 * Examples/ex6.c: Include <unistd.h> for usleep.
2432 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2434 * Examples/ex4.c (main): Use exit, not pthread_exit.
2436 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
2438 * Versions: Add __pthread_mutexattr_gettype and
2439 __pthread_mutexattr_settype.
2440 * lockfile.c: Use __pthread_mutexattr_settype instead of
2441 __pthread_mutexattr_setkind_np.
2442 * mutex.c: Define __pthread_mutexattr_gettype and
2443 __pthread_mutexattr_settype.
2445 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2446 __pthread_mutexattr_settype.
2447 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2448 Use __pthread_mutexattr_settype.
2450 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
2452 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2453 * mutex.c: Define weak alias pthread_mutexattr_gettype and
2454 pthread_mutexattr_settype.
2455 * sysdeps/pthread/pthread.h: Declare these functions.
2456 Move pthread_sigmask and pthread_kill declaration in separate header.
2457 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2459 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
2461 * Makefile: Add rules to compile and run tests.
2462 * Examples/ex1.c: Little changes to fix warnings.
2463 * Examples/ex2.c: Likewise.
2464 * Examples/ex3.c: Likewise.
2465 * Examples/ex4.c: Likewise.
2466 * Examples/ex5.c: Likewise.
2467 * Examples/ex6.c: New file.
2469 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
2471 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2473 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2475 * attr.c: Include <string.h>.
2477 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
2479 * attr.c: Include errno.h. Use memcpy to copy sched_param.
2480 * internals.h: Include limits.h.
2481 * manager.c: Use memcpy to copy sched_param.
2482 * ptfork.c: Include errno.h.
2483 * pthread.c: Likewise.
2484 * semaphore.c: Likewise.
2485 * specific.c: Likewise.
2486 * spinlock.h: Likewise.
2487 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
2488 type definition to ...
2489 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
2491 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
2493 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2495 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2496 as macros as demanded in POSIX.1, Annex C.
2498 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
2500 * internals.h (struct pthread_request): For free use pthread_t
2501 instead of pthread_descr.
2502 * join.c (pthread_join): Pass thread_id, not th to manager.
2503 (pthread_detach): Likewise.
2504 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2505 (pthread_exited): Remove detached queue code.
2506 (pthread_handle_free): Expect thread ID parameter and use it to
2507 validate the thread decsriptor. Don't use detached queue.
2508 Patches by Xavier Leroy.
2510 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2512 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2513 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2514 __pthread_atfork, __pthread_key_create, __pthread_once.
2515 * internals.h: Doc fix.
2516 * pthread.c (__pthread_initialize): Define again.
2518 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
2520 * manager.c (pthread_exited): If thread is not detached put it on
2522 (pthread_handle_free): If thread is not on list with living threads
2523 search on list with detached threads.
2525 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2526 for new definition of pthread_rwlock_t.
2528 * spinlock.c: Correct test whether to compile
2529 __pthread_compare_and_swap or not.
2531 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
2533 * attr.c: Finish user stack support. Change locking code to be safe
2534 in situations with different priorities.
2535 * cancel.c: Likewise.
2536 * condvar.c: Likewise.
2537 * internals.h: Likewise.
2539 * manager.c: Likewise.
2540 * mutex.c: Likewise.
2541 * pthread.c: Likewise.
2542 * ptlongjmp.c: Likewise.
2543 * queue.h: Likewise.
2544 * rwlock.c: Likewise.
2545 * semaphore.c: Likewise.
2546 * semaphore.h: Likewise.
2547 * signals.c: Likewise.
2548 * spinlock.c: Likewise.
2549 * spinlock.h: Likewise.
2550 * sysdeps/pthread/pthread.h: Likewise.
2551 Patches by Xavier Leroy.
2553 * sysdeps/i386/i686/pt-machine.h: New file.
2555 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
2557 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2558 [sg]et_stackaddr prototypes always available.
2560 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2561 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2563 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
2565 * manager.c (pthread_free): Undo patch from 980430.
2566 Reported by David Wragg <dpw@doc.ic.ac.uk>.
2568 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
2570 * manager.c: Define __pthread_manager_adjust_prio and use it to
2571 increase priority when needed.
2572 * internals.h: Add prototype for __pthread_manager_adjust_prio.
2573 * mutex.c: Optimize mutexes to wake up only one thread.
2574 * pthread.c: Move PID of manager for global variable in structure
2576 Patches by Xavier Leroy.
2578 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
2580 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2582 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2584 * attr.c: Correct typo.
2586 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
2588 * manager.c (pthread_free): Unmap guard before the stack.
2589 Patch by Matthias Urlichs.
2591 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
2593 * manager.c (pthread_free): Detect already free child.
2594 Patch by Xavier Leroy, reported by Matthias Urlichs.
2596 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2598 * Makefile (linuxthreads-version): Renamed back from
2601 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
2603 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2606 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
2608 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2609 * internals.h: Add definitions for new spinlock implementation.
2610 * ptlongjmp.c: New file.
2611 * spinlock.c: New file.
2612 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2613 new function __pthread_acquire to prevent deadlocks with thread
2614 with different priorities.
2615 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2617 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2619 * manager.c (__pthread_manager): Reduce first argument to select
2620 to include just the needed file descriptor.
2622 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
2624 * manager.c: Fix last patch which caused core dumps.
2626 * pthread.c: Correctly handle missing SIGRTMIN.
2628 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2630 * libpthread.map: Add __libc_internal_tsd_get and
2631 __libc_internal_tsd_set. Add missing cancelable functions. Export
2632 libc internal versions of the cancelable functions.
2634 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
2636 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2638 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
2640 * attr.c: Implement pthread_attr_[gs]etguardsize,
2641 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2642 Change pthread_attr_init to have two interfaces.
2643 * internals.h (struct _pthread_descr_struct): Add new fields for
2645 * libpthread.map: Add names in GLIBC_2.1 section.
2646 * manager.c (pthread_handle_create): Implement guardsize and
2648 (pthread_free): Likewise.
2649 * pthread.c (pthread_create): Add new interface for changed
2651 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2652 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2655 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
2657 * manager.c: Enable resetting of the thread scheduling policy
2658 to SCHED_OTHER when the parent thread has a different one.
2660 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
2662 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2663 _POSIX_ASYNCHRONOUS_IO.
2665 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2667 * mutex.c: Implement new mutex types.
2669 * internals.h: Include <signal.h>.
2671 * libpthread.map: Add __erno_location and __h_errno_location.
2673 * errno.c: Return pointer to variable actually in use. This might
2674 not be the one in the thread structure.
2675 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2677 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2678 of manager thread structure.
2679 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2681 * pthread.c: Adapt initializer for thread structures.
2682 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2683 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2684 current thread to global variables.
2686 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
2688 * rwlock.c: New file.
2689 * Makefile (libpthread-routines): Add rwlock.
2690 * sysdeps/pthread/pthread.h: Define data structures and declare
2692 * libpthread.map: Add new functions.
2694 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
2696 * sysdeps/arm/pt-machine.h: New file; add ARM support.
2697 * sysdeps/arm/Implies: likewise.
2698 * README: Document it.
2700 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2702 * signals.c: Remove unneeded initializer for sigwaited, saving a
2705 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2707 * semaphore.c (sem_init): Set sem_spinlock only if available.
2709 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
2711 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2712 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2714 * Makefile: Update from LinuxThreads 0.7.
2715 * internals.h. Likewise.
2716 * manager.c: Likewise.
2717 * mutex.c: Likewise.
2718 * pthread.c: Likewise.
2719 * signals.c: Likewise.
2720 * specific.c: Likewise.
2721 * Examples/ex3.c: Likewise.
2723 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
2725 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2728 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
2730 * wrapsyscall.c: Add socket functions which are also cancelation
2733 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
2735 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2736 New functions for fast thread specific data within libc.
2738 * internals.h: Add new array p_libc_specific to struct
2739 _pthread_descr_struct.
2741 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2743 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
2745 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2746 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2748 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
2750 * internals.h (struct _pthread_descr_struct): Add definitions for
2751 two-level specific key handling.
2752 * manager.c (pthread_handle_create): Initialize specific memory array.
2753 * specific.c: Implement two-level key handling.
2754 * weaks.c: Don't provide dummy key handling.
2755 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2756 Add definition of __libc_key_t.
2757 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2759 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2760 PTHREAD_DESTRUCTOR_ITERATIONS.
2762 * manager.c (pthread_handle_create): Compare mmap result with
2765 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2766 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2768 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
2770 sysdeps/sparc -> sysdeps/sparc/sparc32
2771 sysdeps/sparc64 -> sysdeps/sparc/sparc64
2773 * internals.h: Change definition of THREAD_SELF to be an expression,
2774 not a statement that did a return.
2775 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2776 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2777 Follow Solaris and use a "system reserved" register (%g6) to hold
2778 the thread descriptor.
2779 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2781 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
2783 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
2784 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2785 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2787 * semaphore.c: Include spinlock.h only when needed.
2789 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2790 keys for entries not in use.
2792 * weaks.c: Implement key handling functions for real.
2794 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
2796 Initial sparc64-linux support:
2797 * sysdeps/sparc64/Implies: New file.
2798 * sysdeps/sparc64/pt-machine.h: Likewise.
2800 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
2802 * semaphore.c: Include spinlock.h at correct place.
2805 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
2807 The Great Bit File Move:
2808 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2809 * sysdeps/powerpc/semaphorebits.h: Likewise.
2810 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2811 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2812 * sysdeps/pthread/libc-lock.h: -> bits/
2813 * sysdeps/pthread/stdio-lock.h: Likewise.
2814 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2815 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2816 * semaphore.h: Likewise.
2817 * sysdeps/pthread/pthread.h: Likewise.
2819 * lockfile.c: <foo.h> -> <bits/foo.h>.
2820 * semaphore.h: Likewise.
2822 * Makefile: (headers): foo.h -> bits/foo.h.
2823 * sysdeps/pthread/Makefile: Likewise.
2825 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2827 * semaphore.c (sem_init): Set sem_spinlock only if available.
2829 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
2832 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
2834 Update from LinuxThreads 0.6.
2836 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
2837 and __sched_get_priority_min instead of names without `__'.
2839 * manager.c: Rewrite large parts to implement opaque pthread_t.
2841 * cancel.c: Adapt for opaque pthread_t type.
2842 * condvar.c: Likewise.
2843 * errno.c: Likewise.
2845 * mutex.c: Likewise.
2846 * pthread.c: Likewise.
2847 * signals.c: Likewise.
2848 * specific.c: Likewise.
2849 * restart.h: Likewise.
2850 * queue.h: Likewise.
2851 * Examples/ex3.c: Likewise.
2852 * Examples/ex4.c: Likewise.
2853 * sysdeps/pthread/pthread.h: Likewise.
2855 * pthread.c: Accumulate time for all threads in thread manager.
2857 * semaphore.c: Implement fallback implementation for architectures
2858 sometimes missing compare-exchange operations.
2860 * cancel.c (pthread_cancel): Validate handle argument.
2861 * join.c (pthread_join): Likewise.
2862 (pthread_detach): Likewise.
2863 * signals.c (pthread_kill): Likewise.
2865 * spinlock.h (acquire): Use __sched_yield not sched_yield.
2867 * queue.h (enqueue): Enqueue thread according to priority.
2869 * internals.c (struct pthread_start_args): New struct for passing
2870 args to cloning function.
2871 (struct _pthread): Rename to _pthread_descr_struct and adapt for
2874 * Examples/Makefile (clean): Pass -f option to rm.
2876 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
2877 and define TEST_FOR_COMPARE_AND_SWAP.
2878 * sysdeps/i386/i486/pt-machine.h: Removed.
2880 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
2883 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
2885 * restart.h (suspend): Clear p_signal before suspending.
2886 (suspend_with_cancellation): Likewise.
2887 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
2889 * weaks.c: Make __pthread_key_create return 1.
2890 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
2891 __libc_getspecific, __libc_setspecific, and __libc_key_t.
2892 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
2895 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
2897 * sysdeps/sparc/pt-machine (RELEASE): Fix.
2899 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
2901 * sysdeps/powerpc/Implies: Added.
2902 * sysdeps/powerpc/pt-machine.h: Added.
2903 * sysdeps/powerpc/semaphorebits.h: Added.
2905 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
2907 * pthread.c (__pthread_initial_thread): Correct
2909 (__pthread_manager_thread): Likewise.
2910 Reported by Andreas Jaeger.
2912 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
2914 Since sigset_t no longer fits in a register, we can't pass in the
2915 thread's initial mask so easily. Take this opportunity to simplify
2916 the clone implementation by only accepting a single void* argument.
2918 * manager.c (__pthread_manager): Put thread vitals in the thread
2919 struct instead of as arguments through clone.
2920 (pthread_start_thread): Look for them there.
2921 * internals.h (struct _pthread): Add p_initial_fn,
2922 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
2923 * pthread.c (pthread_initialize_manager): Revise clone invocation.