1 2000-09-05 Ulrich Drepper <drepper@redhat.com>
3 * Examples/ex14.c: New file.
4 * Makefile (tests): Add ex14.
6 * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
7 mutex. Patch by dtc@cmucl.cons.org.
10 * Makefile (tests): Add ecmutex.
12 2000-09-04 H.J. Lu <hjl@gnu.org>
14 * attr.c (__pthread_attr_setguardsize): Use page_roundup
15 instead of roundup to round up to the page size.
17 2000-09-03 Mark Kettenis <kettenis@gnu.org>
19 * manager.c (pthread_exited): Correctly report event as TD_REAP
20 instead of TD_DEATH. Fix comments.
22 2000-09-03 Ulrich Drepper <drepper@redhat.com>
24 * spinlock.h (testandset): Add cast to avoid warning.
25 Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
27 2000-09-02 Andreas Jaeger <aj@suse.de>
29 * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
32 2000-09-01 Ulrich Drepper <drepper@redhat.com>
34 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
35 Fix typo in last patch (_mode -> _flags).
37 * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
38 Provide definition which respects _IO_USER_LOCK flag.
40 2000-08-30 Ulrich Drepper <drepper@redhat.com>
42 * manager.c (pthread_allocate_stack): Clear descriptor only if not
45 2000-08-25 Ulrich Drepper <drepper@redhat.com>
47 * Makefile: Add rules to build and run unload.
50 * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
52 * sysdeps/pthread/pthread.h
53 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
54 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
56 2000-08-24 Andreas Jaeger <aj@suse.de>
58 * Examples/ex13.c: Include <string.h> for strerror prototype and
59 <stdlib.h> for abort prototype.
60 (pthr_cond_signal_mutex): Rewrite to silence GCC.
61 (thread_start): Remove unused variable err.
62 (main): Silence GCC warnings.
64 2000-08-22 Andreas Jaeger <aj@suse.de>
66 * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
68 * Makefile (tests): Add ex13.
70 2000-08-20 Ulrich Drepper <drepper@redhat.com>
72 * semaphore.h: Add restrict where required by AGd4.
73 * sysdeps/pthread/pthread.h: Likewise.
74 * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
76 2000-08-15 Ulrich Drepper <drepper@redhat.com>
78 * Makefile (tests): Add ex12. Add rule to build it.
79 * Examples/ex12.c: New file.
81 2000-08-13 Ulrich Drepper <drepper@redhat.com>
83 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
84 even though the implementation is not quite complete (but it reports
85 it). Define _POSIX_MESSAGE_PASSING to -1.
86 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
88 2000-08-12 Andreas Jaeger <aj@suse.de>
90 * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
92 (__compare_and_swap): Likewise.
93 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
95 2000-08-10 Ulrich Drepper <drepper@redhat.com>
97 * pthread.c (__pthread_initial_thread): Initialize p_errnop and
98 p_h_errnop correctly and not to NULL.
100 2000-08-05 Ulrich Drepper <drepper@redhat.com>
102 * Banner: Bump version number to 0.9.
104 2000-08-04 Ulrich Drepper <drepper@redhat.com>
106 * Makefile (tests): Add tststack. Add rule to build the program.
107 * tststack.c: New file.
109 * internals.h: Declare __pthread_max_stacksize.
110 * pthread.c (__pthread_max_stacksize): New variable.
111 (__pthread_initialize_manager): Determine __pthread_initialize_manager
113 * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
114 (pthread_allocate_stack): Allow kernel to choose stack address if
115 FLOATING_STACKS. This also handles variable-sized stacks.
116 Always allocate stack and guardpage together. Use mprotect to
117 change guardpage access.
118 * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
121 * attr.c (__pthread_attr_setstacksize): Also test value against
124 * manager.c (__pthread_nonstandard_stacks): Define only if
125 THREAD_SELF is not defined.
126 (pthread_allocate_stack): Always initialize gardaddr to a correct
128 (pthread_handle_create): Unmap thread with one call.
129 (pthread_free): Remove test for initial thread before removing stack.
130 Unmap stack with one call.
132 * pthread.c (__pthread_initial_thread): Initialize p_userstack to
133 1 to avoid removing the stack.
135 2000-07-27 Jes Sorensen <jes@linuxcare.com>
137 * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
138 load of spin lock to prime the cache before the atomic compare and
139 exchange operation (cmpxchg4). This avoids the spinning on the
140 cmpxchg4 instruction and reduces movement of the cache line back
141 and forth between the processors (explanation by Asis K. Mallick
142 from Intel). This basically makes the implementation operate the
143 same as the Linux kernel implementation.
145 * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
146 * sysdeps/ia64/pspinlock.c: New file.
148 2000-08-03 Ulrich Drepper <drepper@redhat.com>
150 * pthread.c: Move definition of __pthread_set_own_extricate_if...
151 * spinlock.h: ...here. Remove locking.
152 * internals.h: Remove __pthread_set_own_extricate_if prototype.
154 * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
155 (rwlock_rd_extricate_func): Don't determine self, let
156 __pthread_lock do it.
157 (rwlock_wr_extricate_func): Likewise.
158 (rwlock_have_already): Optimize *pself handling a bit.
160 * mutex.c: Use __builtin_expect.
161 * pthread.c: Likewise.
163 2000-08-02 Andreas Jaeger <aj@suse.de>
165 * sysdeps/s390/pspinlock.c: New file.
166 * sysdeps/s390/pt-machine.h: New file.
167 Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
169 2000-07-12 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
171 * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
173 * sysdeps/mips/pt-machine.h (testandset): Likewise.
175 2000-07-26 Andreas Jaeger <aj@suse.de>
177 * pthread.c: Initialize p_sem_avail.
179 2000-07-25 Ulrich Drepper <drepper@redhat.com>
181 * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
182 * semaphore.c: Handle spurious wakeups.
184 * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
185 for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
187 * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
188 (__pthread_wait_for_restart): Likewise.
190 * condvar.c (pthread_cond_wait): Also check whether thread is
191 cancelable before aborting loop.
192 (pthread_cond_timedwait): Likewise.
194 * signals.c (pthread_sighandler): Remove special code to restrore
196 (pthread_sighandler_t): Likewise.
198 2000-07-25 Mark Kettenis <kettenis@gnu.org>
200 * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
201 * pthread.c: Include <resolv.h>.
202 (_res): Undefine. Add extern declaration.
204 2000-07-24 Ulrich Drepper <drepper@redhat.com>
206 * pthread.c (__pthread_initial_thread): Update initializer.
207 (__pthread_manager_thread): Likewise.
208 (pthread_initialize): Move setrlimit call to...
209 (__pthread_initialize_manager): ...here.
210 (__pthread_reset_main_thread): Reset also soft limit on stack size.
212 * condvar.c: Handle spurious wakeups. [PR libc/1749].
213 * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
215 2000-07-21 Ulrich Drepper <drepper@redhat.com>
217 * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
218 __compare_and_swap to define testandset.
219 * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
220 Define IMPLEMENT_TAS_WITH_CAS.
222 2000-07-20 Ulrich Drepper <drepper@redhat.com>
224 * Makefile: Pass -z nodelete to linker for libpthread.so
225 generation if it understand this option.
227 2000-07-18 Mark Kettenis <kettenis@gnu.org>
229 * manager.c (pthread_handle_create): Remove initialization of
230 new_thread->p_res._sock.
232 2000-07-19 Kaz Kylheku <kaz@ashi.footprints.net>
234 Bugfixes to the variant of the code for machines with no compare
237 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
238 node was not being properly enqueued, due to failing to update
239 the lock->__status field.
241 * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
242 being set inappropriately, causing the suspend function to be called
243 with a null self pointer and crash.
245 2000-07-18 Ulrich Drepper <drepper@redhat.com>
247 * spinlock.h (__pthread_alt_trylock): Fix code used if no
248 compare&swap is available.
250 * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
253 * pthread.c (pthread_initialize): Don't use sysconf to determine
254 whether the machine has more than one processor.
256 * spinlock.c (__pthread_alt_timedlock): Add back one of the
257 removed thread_self calls.
259 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
261 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
262 __compare_and_swap to compare_and_swap in code which assumes
263 compare swap is available.
265 2000-07-18 Kaz Kylheku <kaz@ashi.footprints.net>
267 * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
268 bug whereby thr field of waitnode structure would not be correctly
269 set unless a null self pointer is passed to the functions.
270 Eliminated redundant calls to thread_self().
272 2000-07-18 Jakub Jelinek <jakub@redhat.com>
274 * pthread.c (__pthread_initialize_manager): Lock
275 __pthread_manager_thread.p_lock before calling clone.
277 2000-05-05 H.J. Lu <hjl@gnu.org>
279 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
280 have acquire semantics.
281 (__compare_and_swap_with_release_semantics): New inline
283 (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
285 2000-01-28 Hans Boehm <hboehm@exch.hpl.hp.com>
287 * manager.c: Fix the problem with signals at startup.
288 Change the way that thread stacks are allocated on IA64.
289 Clean up some of the guard page allocation stuff.
291 1999-12-19 H.J. Lu <hjl@gnu.org>
293 * internals.h (page_roundup): New.
294 * attr.c (__pthread_attr_setguardsize); Use page_roundup
296 * manager.c (pthread_allocate_stack): Make sure guardaddr is
297 page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
300 1999-12-17 Hans Boehm <hboehm@exch.hpl.hp.com>
302 * manager.c (pthread_allocate_stack): Unmap the stack top
303 if failed to map the stack bottom.
305 (pthread_free): Fix the guard page.
307 * pthread.c (pthread_initialize): Set rlimit correctly for
308 NEED_SEPARATE_REGISTER_STACK.
310 1999-12-16 H.J. Lu <hjl@gnu.org>
312 * pthread.c (__pthread_initialize_manager): Pass
313 __pthread_manager_thread_bos instead of
314 __pthread_manager_thread_tos to __clone2.
316 1999-12-16 H.J. Lu <hjl@gnu.org>
318 * manager.c (pthread_allocate_stack): Correct the calculation
319 of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
322 1999-12-13 H.J. Lu <hjl@gnu.org>
324 * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
325 bit after setting ar.ccv.
327 1999-12-12 H.J. Lu <hjl@gnu.org>
329 * manager.c (pthread_allocate_stack): Make the starting
330 address of the stack bottom page aligned. FIXME: it may
331 need changes in other places.
332 (pthread_handle_create): Likewise.
334 1999-12-11 Hans Boehm <hboehm@exch.hpl.hp.com>
336 * manager.c (pthread_allocate_stack): Handle
337 NEED_SEPARATE_REGISTER_STACK.
338 (pthread_handle_create): Likewise.
339 * pthread.c (__pthread_initialize_manager): Likewise.
341 * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
343 1999-12-02 H.J. Lu <hjl@gnu.org>
345 * sysdeps/ia64/pt-machine.h: New.
347 2000-07-13 Ulrich Drepper <drepper@redhat.com>
349 * wrapsyscall.c: Mark non-__ protected names as weak.
352 2000-07-12 Bruno Haible <haible@clisp.cons.org>
354 * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
356 2000-07-12 Ulrich Drepper <drepper@redhat.com>
358 * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
359 Add tests also to new alternative spinlock implementation.
360 * spinlock.h: Likewise.
361 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
363 2000-07-06 Ulrich Drepper <drepper@redhat.com>
365 * Version: Export __sigaction.
366 * signals.c: Define __sigaction alias. Use __libc_sigaction instead
368 * pthread.c: Use __libc_sigaction instead of __sigaction.
370 * condvar.c: Implement pthread_condattr_getpshared and
371 pthread_condattr_setpshared.
372 * mutex.c: Implement pthread_mutexattr_getpshared and
373 pthread_mutexattr_setpshared.
374 * Versions: Export new functions.
375 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
377 * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
378 (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
381 2000-07-04 Greg McGary <greg@mcgary.org>
383 * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
384 pragmas. Include bp-sym.h only if _LIBC.
386 2000-07-04 Ulrich Drepper <drepper@redhat.com>
388 * spinlock.c (__pthread_unlock): Properly place write barrier.
389 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
391 2000-07-03 Ulrich Drepper <drepper@redhat.com>
393 * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
394 faster on SMP systems. No more emulation of compare&swap for adaptive
396 * spinlock.h: Likewise.
397 * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
398 Replace fast with adaptive mutex.
399 * mutex.c: Rewrite for replacement of fast by adaptive mutex.
400 * condvar.c: Likewise.
401 * pthread.c: Define and initialize __pthread_smp_kernel variable.
402 * internals.h: Declare __pthread_smp_kernel.
403 * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
404 _pthread_fastlock structure.
405 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
407 * pthread.c: Remove initialization to zero from global variables.
409 2000-06-29 Jakub Jelinek <jakub@redhat.com>
411 * shlib-versions: Make sparc64 GLIBC_2.2+ only.
413 2000-06-28 Greg McGary <greg@mcgary.org>
415 * weaks.c: Wrap BP_SYM () around weak extern declarations of
416 pthread functions that have pointers in their return+arg signatures.
418 2000-06-27 Greg McGary <greg@mcgary.org>
420 * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
421 extern declarations of pthread functions that have pointers in
422 their return+arg signatures.
424 2000-06-26 Ulrich Drepper <drepper@redhat.com>
426 * Makefile (tests): Add ex11. Add rules to build it.
427 * Examples/ex11.c: New file.
428 * rwlock.c: Fix complete braindamaged previous try to implement
431 * spinlock.c: Pretty print.
433 2000-06-25 Ulrich Drepper <drepper@redhat.com>
435 * Makefile (tests): Add ex10. Add rules to build it.
436 * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
437 pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
438 * condvar.c (pthread_cond_wait): Allow mutex of kind
439 PTHREAD_MUTEX_TIMED_NP.
440 (pthread_cond_timedwait_relative): Likewise.
441 * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
442 (__pthread_mutex_trylock): Use __pthread_alt_trylock for
443 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
444 (__pthread_mutex_lock): Use __pthread_alt_lock for
445 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
446 (__pthread_mutex_timedlock): New function.
447 (__pthread_mutex_unlock): Use __pthread_alt_unlock for
448 PTHREAD_MUTEX_ERRORCHECK_NP. Handle PTHREAD_MUTEX_TIMED_NP.
449 (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
450 (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
451 * spinlock.c: Implement alternate fastlocks.
452 * spinlock.h: Add prototypes.
453 * Examples/ex10.c: New file.
454 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
455 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
457 * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
458 (__pthread_rwlock_timedrdlock): New function.
459 (__pthread_rwlock_timedwrlock): New function.
460 Use laternate fastlock function everywhere.
462 2000-06-21 Andreas Jaeger <aj@suse.de>
464 * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
467 * join.c: Include <stdlib.h> for exit prototype.
469 2000-06-20 Ulrich Drepper <drepper@redhat.com>
471 * sysdeps/i386/useldt.h: Include <stdlib.h>.
473 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
474 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
476 * Makefile (libpthread-routines): Add barrier.
477 (tests): Add ex9. Add rule to build ex9.
478 * Versions: Export barrier functions.
479 * barrier.c: New file.
480 * Examples/ex9.c: New file.
481 * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
482 * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
483 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
485 2000-06-19 H.J. Lu <hjl@gnu.org>
487 * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
488 HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
489 (compare_and_swap_with_release_semantics): New. Default to
490 compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
493 * spinlock.c (__pthread_unlock): Call
494 compare_and_swap_with_release_semantics () instead of
497 2000-06-19 Ulrich Drepper <drepper@redhat.com>
499 * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
501 * sysdeps/pthread/timer_delete.c: Likewise.
502 * sysdeps/pthread/timer_getoverr.c: Likewise.
503 * sysdeps/pthread/timer_gettime.c: Likewise.
504 * sysdeps/pthread/timer_settime.c: Likewise.
506 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
508 Timer nodes are now reference counted, and can be marked
509 as deleted. This allows for the safe release of the global mutex
510 in the middle without losing the timer being operated on.
512 * sysdeps/pthread/posix-timer.h (struct timer_node): The inuse
513 member is now an enum with three values, so that an intermediate
514 state can be represented (deleted but not free for reuse yet).
515 New refcount member added.
516 * sysdeps/pthread/timer_routines.c: Likewise.
518 * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
519 timer_valid): New inline functions added.
521 * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
522 restructured, recursive deadlock bug fixed.
524 * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
525 timer_addref to ensure that timer won't be deleted while mutex is not
526 held. Also uses timer_invalid to perform validation of timer handle.
527 * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
528 * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
530 2000-06-14 Ulrich Drepper <drepper@redhat.com>
532 * shlib-versions: Add entry for SH.
533 Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
535 2000-06-13 Kaz Kylheku <kaz@ashi.footprints.net>
537 A few optimizations. Got rid of unnecessary wakeups of timer threads,
538 tightened up some critical regions and micro-optimized some list
541 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
542 Returns int value now to indicate whether timer was queued at head.
543 * sysdeps/pthread/posix-timer.h: Likewise.
544 * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
545 new return value from __timer_thread_queue_timer to avoid waking
546 up timer thread unnecessarily.
548 * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
549 inuse flag, because this requires mutex to be held. Callers updated
550 to do the check when they have the mutex.
551 * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
553 * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
554 regions: avoids making system calls while holding timer mutex, and
555 a few computations were moved outside of the mutex as well.
556 * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
558 * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
559 to list_unlink_ip, meaning idempotent. Pointer manipulation
560 changed to get better better code out of gcc.
561 * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
562 version of list_unlink added here.
563 * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
564 function in all places: idempotent one for timers, non-idempotent
565 one for thread nodes.
566 * sysdeps/pthread/timer_settime: Likewise.
567 * sysdeps/pthread/timer_routines.c: Likewise.
569 2000-06-13 Ulrich Drepper <drepper@redhat.com>
571 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
572 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
574 * sysdeps/pthread/Makefile: Remove tests definition.
576 2000-06-12 Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
577 Yutaka Niibe <gniibe@chroot.org>
579 * sysdeps/sh/pspinlock.c: New file.
580 * sysdeps/sh/pt-machine.h: New file.
582 2000-06-12 Ulrich Drepper <drepper@redhat.com>
584 * Makefile (tests): Add joinrace.
586 * Examples/ex6.c: Test return value of pthread_join.
588 2000-06-11 Geoff Keating <geoffk@cygnus.com>
590 * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
591 (__pthread_spin_trylock): Implement.
592 (__pthread_spin_unlock): Implement.
593 (__pthread_spin_init): Implement.
594 (__pthread_spin_destroy): Implement.
596 2000-06-10 Ulrich Drepper <drepper@redhat.com>
598 * sysdeps/pthread/timer_routines.c (list_append): Little fix to
599 really append the entry.
601 2000-06-10 Andreas Jaeger <aj@suse.de>
603 * lockfile.c (__fresetlockfiles): Remove unused variable fp.
605 2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net>
607 * sysdeps/pthread/timer_create.c: Thread matching now done on
608 clock type as well as thread attributes.
609 There are individual global signal-delivering threads for
610 different clock types.
611 * sysdeps/pthread/posix-timer.h: Likewise.
612 * sysdeps/pthread/timer_routines.c: Likewise.
614 * sysdeps/pthread/timer_routines.c: Thread allocation and
615 deallocation function now remembers to put thread on active
616 list and remove from active list.
617 Thus now the feature of binding multiple timers
618 to a single thread actually works.
620 2000-06-10 Ulrich Drepper <drepper@redhat.com>
622 * pthread.c (__pthread_create_2_1): Optimize a bit.
624 * internals.h (invalid_handle): Also test for p_terminated != 0.
625 (nonexisting_handle): New function. Same as old invalid_handle.
626 * join.c (pthread_join): Use nonexisting_handle instead of
627 invalid_handle to test for acceptable thread handle.
628 * manager.c (pthread_handle_free): Likewise.
629 * joinrace.c: New file.
630 Reported by Permaine Cheung <pcheung@cygnus.com>.
632 2000-06-08 Ulrich Drepper <drepper@redhat.com>
634 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
635 Correct handling of matching variable.
637 * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
640 * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
641 Be prepared for empty timer list.
643 * sysdeps/pthread/timer_create.c (timer_create): Correct names of
644 CPUTIME clock ID. Add support for thread clocks.
646 * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
647 subtraction were switched.
649 * sysdeps/pthread/timer_routines.c (init_module): Use
650 THREAD_MAXNODES threads.
652 * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
653 * sysdeps/pthread/timer_create.c: Fill in creator_pid.
654 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
655 with sigqueueinfo is this system call is available.
657 * sysdeps/pthread/timer_create.c (timer_create): Allow
658 CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
660 * sysdeps/pthread/Makefile: New file. Add rules to build timer
662 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
664 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
666 * sysdeps/pthread/posix-timer.h: New file.
667 * sysdeps/pthread/timer_create.c: New file.
668 * sysdeps/pthread/timer_delete.c: New file.
669 * sysdeps/pthread/timer_getoverr.c: New file.
670 * sysdeps/pthread/timer_gettime.c: New file.
671 * sysdeps/pthread/timer_routines.c: New file.
672 * sysdeps/pthread/timer_settime.c: New file.
673 * sysdeps/pthread/tst-timer.c: New file.
675 2000-06-08 Ulrich Drepper <drepper@redhat.com>
677 * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
678 LINK_MAX definitions if necessary.
680 2000-06-04 Kaz Kylheku <kaz@ashi.footprints.net>
682 Added missing fork time handling of global libio lock.
684 * lockfile.c (__fresetlockfiles): Now also resets the list lock,
685 not just the individual stream locks. Rewritten to use new
686 iterator interface provided by libio rather than accessing
689 * lockfile.c (__flockfilelist, _funlockfilelist): New functions
690 which lock and unlock the stream list using the new interface
692 * internals.h: Likewise.
694 * ptfork.c (__fork): Now calls __flockfilelist before fork,
695 and __funlockfilelist in the parent after the fork.
696 Child still calls __fresetlockfiles as before.
698 * linuxthreads.texi: Now explains what happens to streams at
699 fork time. Also whole new section on forking and thread added.
700 Definition of pthread_atfork moved out of Miscellaneous Functions
703 2000-06-04 Jakub Jelinek <jakub@redhat.com>
705 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
706 Add missing register.
707 * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
709 2000-06-02 Jakub Jelinek <jakub@redhat.com>
711 * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
712 * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
713 * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
715 2000-05-31 Andreas Jaeger <aj@suse.de>
717 * sysdeps/mips/pspinlock.c: Implement spinlocks.
719 2000-05-28 Ulrich Drepper <drepper@redhat.com>
721 * spinlock.c (__pthread_lock): Remove ASSERT.
723 * Makefile (tests): Add ex8.
724 * Examples/ex8.c: New file.
726 2000-05-12 Kaz Kylheku <kaz@ashi.footprints.net>
728 Bugfix: The pthread_atfork mechanism now takes care of its
729 own internal mutex at fork time.
731 * ptfork.c (__fork): Revised so that the mutex is held across
732 the fork operation and while the handlers are called, and so that
733 the child resets the mutex.
735 * linuxthreads.texi: Updated pthread_atfork documentation to make
736 it clear that fork and pthread_atfork can't be reentered from
737 atfork handlers, that pthread_atfork and fork are mutually atomic,
738 and that the handlers are inherited by the child process.
740 2000-05-24 Ulrich Drepper <drepper@redhat.com>
742 * Makefile (libpthread-routines): Add pspinlock.
743 * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
744 Use struct _pthread_fastlock instead of pthread_spinlock_t.
745 * condvar.c: Likewise.
746 * internals.h: Likewise.
748 * manager.c: Likewise.
750 * pthread.c: Likewise.
751 * rwlock.c: Likewise.
752 * semaphore.c: Likewise.
753 * signals.c: Likewise.
754 * spinlock.h: Likewise.
755 * spinlock.c: Likewise. Remove pthread_spin_lock functions.
756 * sysdeps/alpha/pspinlock.c: New file.
757 * sysdeps/arm/pspinlock.c: New file.
758 * sysdeps/i386/pspinlock.c: New file.
759 * sysdeps/m68k/pspinlock.c: New file.
760 * sysdeps/mips/pspinlock.c: New file.
761 * sysdeps/powerpc/pspinlock.c: New file.
762 * sysdeps/sparc/sparc32/pspinlock.c: New file.
763 * sysdeps/sparc/sparc64/pspinlock.c: New file.
764 * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
765 back to _pthread_fastlock. Define new pthread_spinlock_t.
767 2000-05-24 Andreas Jaeger <aj@suse.de>
769 * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
771 2000-05-21 Jakub Jelinek <jakub@redhat.com>
773 * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
775 2000-05-13 Jakub Jelinek <jakub@redhat.com>
777 * internals.h (__RES_PTHREAD_INTERNAL): Define.
779 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
781 * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
782 object state is represented with additional bits which distinguish
783 whether that state was set up in the current process, or
784 in an ancestor process. If that state was set in an ancestor,
785 it means that a fork happened while thread was executing the init
786 function. In that case, the state is reset to NEVER.
787 * mutex.c (__pthread_once_fork_prepare): New function.
788 (__pthread_once_fork_child): Likewise
789 (__pthread_once_fork_parent): Likewise
790 (__pthread_reset_pthread_once): Removed.
791 * ptfork.c (__fork): Call new handlers in mutex.c.
792 * internals.h: Declarations of new mutex.c functions added.
793 Declaration of removed function deleted.
794 * linuxthreads.texi: Updated documentation about pthread_once
795 to clarify what happens under cancellation and forking.
797 2000-05-06 Kaz Kylheku <kaz@ashi.footprints.net>
799 * internals.h: New thread manager request type, REQ_KICK.
800 * join.c (pthread_exit): main thread now calls exit() instead
801 of _exit() in order to proper process cleanup.
802 * manager.c (__pthread_manager): Do not terminate manager
803 after unblocking main thread; wait for main thread's
804 REQ_PROCESS_EXIT request instead.
805 Also, added REQ_KICK case to handle new request; this just does
807 * manager.c (pthread_exited): Do not terminate manager after
808 unblocking main thread.
809 * manager.c (__pthread_manager_sighandler): If the main thread
810 is waiting for all other threads to die, send a REQ_KICK into
811 the thread manager request pipe to get it to clean out the threads
812 and unblock the main thread as soon as possible. This fixes
813 the 2000 millisecond hang on shutdown bug.
814 * Examples/ex7.c: New file, tests shutdown behavior when all threads
815 including the main one call pthread_exit(), or implicitly do so.
816 * Makefile (tests): Add ex7.
818 2000-05-05 Andreas Jaeger <aj@suse.de>
820 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
821 (pthread_getcpuclockid): Correct test for ourselves.
823 2000-05-05 Ulrich Drepper <drepper@redhat.com>
825 * internals.h (struct _pthread_descr_struct): Reorganization.
826 Allocate room for 16 pointers at head of the structure for future
827 thread-local data handling. Move p_self member in this area.
828 * manager.c (pthread_handle_create): Adjust use of p_self.
829 * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
830 * pthread.c (__pthread_initial_thread): Adjust initialization.
831 (__pthread_manager_thread): Likewise.
833 2000-04-29 Bruno Haible <haible@clisp.cons.org>
835 * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
836 for eventmask larger than 1 word.
838 2000-04-27 Ulrich Drepper <drepper@redhat.com>
840 * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
841 * pthread.c (__pthread_initialize_minimal): New function. Perform
842 minimal initialization.
843 (pthread_initialize): Remove this code here.
844 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again. We
845 are working around the problem in glibc.
847 2000-04-25 Ulrich Drepper <drepper@redhat.com>
849 * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
850 now. First gcc must be fixed (more concrete: libgcc).
852 2000-04-24 Ulrich Drepper <drepper@redhat.com>
854 * pthread.c: Remove special treatement for interrupt handlers on x86.
855 * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
856 * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
858 * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
860 2000-04-24 Mark Kettenis <kettenis@gnu.org>
862 * join.c (pthread_exit): Set p_terminated after reporting the
863 termination event instead of before.
865 2000-04-20 Jakub Jelinek <jakub@redhat.com>
867 * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
870 2000-04-18 Andreas Jaeger <aj@suse.de>
872 * Versions: Use ld instead of ld.so.
874 2000-04-18 Jakub Jelinek <jakub@redhat.com>
876 * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
877 Remove the typedef keyword.
879 2000-04-18 Jakub Jelinek <jakub@redhat.com>
881 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
883 (READ_MEMORY_BARRIER): Define.
884 * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
886 * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
889 2000-04-17 Ulrich Drepper <drepper@redhat.com>
891 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
892 (pthread_getcpuclockid): Don't compare thread_id with thread_self,
895 2000-04-16 Ulrich Drepper <drepper@redhat.com>
897 * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
898 if fast mutex is used. Don't initialize `already_canceled' twice.
899 Correctly test for return value of timedsuspend.
901 * pthread.c: Correct long-time braino. We never set SA_SIGINFO and
902 therefore don't need the _rt versions of the signal handlers.
904 2000-04-15 Ulrich Drepper <drepper@redhat.com>
906 * pthread.c (pthread_yield): New function.
907 * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
908 * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
909 * internals.h: Declare __pthread_yield.
911 * pthread.c (pthread_initialize): Avoid a bit more code if
912 realtime signals are known to exist.
914 * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
915 to dynamically detect RT signals and avoid generating compatibility
916 functions with old kernel.
917 * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
918 __pthread_restart_new directly.
919 (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
920 __pthread_wait_for_restart_signal directly.
921 (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
922 __pthread_timedsuspend_new directly.
924 2000-04-15 Ulrich Drepper <drepper@redhat.com>
926 * condvar.c: Remove all the special code to handle cond_timedwait.
927 Use timedsuspend instead.
928 * internals.h: Declare __pthread_timedsuspend_old,
929 __pthread_timedsuspend_new, and __pthread_timedsuspend.
930 Remove declaration of __pthread_init_condvar.
931 * pthread.c: Define __pthread_timedsuspend variable.
932 (__pthread_timedsuspend_old): New function. Timed suspension
933 implementation for old Linux kernels.
934 (__pthread_timedsuspend_new): New function. Timed suspension
935 implementation for new Linux kernels.
936 * restart.h (timedsuspend): New function. Call appropriate
937 suspension function through __pthread_timedsuspend.
938 * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
940 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
942 * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
944 * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
946 * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
947 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
949 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
950 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
952 2000-04-14 Andreas Jaeger <aj@suse.de>
956 * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
957 2.2 for linuxthreads.
959 2000-04-13 Ulrich Drepper <drepper@redhat.com>
961 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
962 (pthread_getcpuclockid): Fix typo.
964 2000-04-12 Ulrich Drepper <drepper@redhat.com>
966 * Makefile (libpthread-routines): Add getcpuclockid.
967 * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
968 * sysdeps/pthread/getcpuclockid.c: New file.
969 * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
970 * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
972 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
974 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
976 * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
977 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
978 and pthread_spin_unlock.
979 * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
980 into pthread_spinlock_t. Change all uses.
981 * spinlock.c: Implement pthread_spin_lock.
982 Rename __pthread_unlock to __pthread_spin_unlock and define weak
984 Define pthread_spin_trylock, pthread_spin_init, and
985 pthread_spin_destroy.
986 Change all uses of _pthread_fastlock to pthread_spinlock_t.
987 * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
988 Change all uses of _pthread_fastlock to pthread_spinlock_t.
989 * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
990 pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
991 and pthread_spin_unlock.
992 * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
993 Change all uses of _pthread_fastlock to pthread_spinlock_t.
994 * condvar.c: Likewise.
995 * internals.h: Likewise.
997 * manager.c: Likewise.
999 * pthread.c: Likewise.
1000 * rwlock.c: Likewise.
1001 * semaphore.c: Likewise.
1002 * signals.c: Likewise.
1004 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
1006 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
1008 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1010 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
1011 _POSIX_SHARED_MEMORY_OBJECTS.
1013 2000-04-11 Andreas Jaeger <aj@suse.de>
1015 * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
1016 (__compare_and_swap): Mark as modifying memory.
1018 2000-04-11 Geoff Keating <geoffk@cygnus.com>
1020 * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
1022 (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
1023 Don't have the 'asm' __volatile__.
1025 2000-04-11 Ulrich Drepper <drepper@redhat.com>
1027 * internals.h: Define MEMORY_BARRIER as empty if not defined already.
1028 * spinlock.c (__pthread_lock): Add memory barriers.
1029 (__pthread_unlock): Likewise.
1030 * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
1032 (RELEASE): Not needed anymore.
1033 (__compare_and_swap): Mark asm as modifying memory.
1034 * sysdeps/powerpc/pt-machine.h (sync): Remove. Replace with definition
1036 (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
1037 * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
1038 (MEMORY_BARRIER): Define using stbar.
1039 * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
1041 (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
1042 Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
1043 Mike Burrows <m3b@pa.dec.com>.
1045 2000-04-09 Ulrich Drepper <drepper@redhat.com>
1047 * signals.c (sigaction): Fix return value for the case SIG is one
1048 of the signals the implementation uses.
1049 Patch by Xavier.Leroy@inria.fr.
1051 2000-04-01 Andreas Jaeger <aj@suse.de>
1053 * attr.c: Use shlib-compat macros.
1054 * oldsemaphore.c: Likewise.
1055 * pthread.c: Likewise.
1056 * weaks.c: Likewise.
1058 2000-03-26 Ulrich Drepper <drepper@redhat.com>
1060 * semaphore.c (sem_timedwait): New function.
1061 Patch by Carl Mailloux <carlm@oricom.ca>.
1062 * semaphore.h: Declare sem_timedwait.
1063 * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
1065 2000-03-26 Roland McGrath <roland@baalperazim.frob.com>
1067 * sysdeps/pthread/Makefile: File removed.
1069 2000-03-23 Ulrich Drepper <drepper@redhat.com>
1071 * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
1072 * internals.h (__pthread_reset_pthread_once): Add prototype.
1073 * ptfork.c (__fork): Call __pthread_reset_pthread_once.
1075 * manager.c (pthread_handle_create): Store ID of new thread before
1078 2000-03-21 Ulrich Drepper <drepper@redhat.com>
1080 * attr.c: Use new macros from shlib-compat.h to define versions.
1081 * oldsemaphore.c: Likewise.
1082 * semaphore.c: Likewise.
1083 * weaks.c: Likewise.
1085 * pthread.c: Update for new SHLIB_COMPAT definition.
1087 * manager.c (__pthread_manager): Unmask debug signal.
1089 * pthread.c (pthread_initialize): Test for address of __dso_handle
1090 being NULL, not value. Use __on_exit, not on_exit.
1091 Patch by Andreas Jaeger <aj@suse.de>.
1093 * pthread.c: Use new macros from shlib-compat.h to define versions.
1095 2000-03-19 Ulrich Drepper <drepper@redhat.com>
1097 * pthread.c (pthread_initialize): Instead of on_exit use
1098 __cxa_atexit if __dso_label is available to allow unloading the
1099 libpthread shared library.
1101 2000-03-16 Ulrich Drepper <drepper@redhat.com>
1103 * condvar.c: Make tests for ownership of mutex less strict.
1105 2000-03-14 Ulrich Drepper <drepper@redhat.com>
1107 * condvar.c (pthread_cond_wait): Check whether mutex is owned by
1108 current thread and return error if not.
1109 (pthread_cond_timedwait_relative_old): Likewise.
1110 (pthread_cond_timedwait_relative_new): Likewise.
1112 * mutex.c (__pthread_once): Handle cancelled init function correctly.
1113 (pthread_once_cancelhandler): New function.
1114 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1116 2000-03-14 Andreas Jaeger <aj@suse.de>
1118 * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
1120 (pthread_handle_sigrestart_rt): Likewise.
1121 * signals.c (pthread_sighandler_rt): Likewise.
1123 2000-03-02 Andreas Jaeger <aj@suse.de>
1125 * sysdeps/pthread/bits/libc-lock.h: Fix typo.
1126 Reported by Sean Chen <sean.chen@turbolinux.com>.
1128 2000-02-28 Andreas Jaeger <aj@suse.de>
1130 * rwlock.c: Fix typo.
1132 2000-02-27 Ulrich Drepper <drepper@redhat.com>
1134 * rwlock.c: Define __* variants of the functions and make old names
1136 * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
1137 * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
1139 2000-02-25 Andreas Jaeger <aj@suse.de>
1141 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1142 pwrite64, lseek64, open64, and __open64 with version 2.2.
1144 2000-02-22 Ulrich Drepper <drepper@redhat.com>
1146 * semaphore.h (SEM_FAILED): Use 0 not NULL.
1148 2000-02-14 Ulrich Drepper <drepper@redhat.com>
1150 * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
1151 nanosleep does not work either. Get absolute time inside the
1153 (pthread_cond_timedwait_relative_new): Likewise.
1154 Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
1156 2000-02-13 Andreas Jaeger <aj@suse.de>
1158 * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
1159 (pthread_cond_timedwait_relative_old): Likewise.
1161 2000-02-13 Ulrich Drepper <drepper@redhat.com>
1163 * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
1164 but keep the code around. A bug in the kernel prevent us from
1166 (pthread_cond_timedwait_relative_new): Likewise.
1167 (PR libc/1597 and libc/1598).
1169 2000-02-01 Kaz Kylheku <kaz@ashi.footprints.net>
1171 * condvar.c (pthread_cond_timedwait_relative_old): Do tight
1172 loop around nanosleep calls instead of around most of the function
1173 (pthread_cond_timedwait_relative_new): Likewise.
1174 body. Got rid of backwards goto and one local.
1176 2000-01-31 Ulrich Drepper <drepper@redhat.com>
1178 * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
1179 before every nanosleep call to account for time spent in the rest
1181 (pthread_cond_timedwait_relative_new): Likewise.
1182 Patch by khendricks@ivey.uwo.ca (PR libc/1564).
1184 2000-01-29 Ulrich Drepper <drepper@redhat.com>
1186 * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
1187 from nanosleep call so that in case we restart we only wait for the
1189 (pthread_cond_timedwait_relative_new): Likewise.
1190 Patch by khendricks@ivey.uwo.ca (PR libc/1561).
1192 2000-01-18 Ulrich Drepper <drepper@cygnus.com>
1194 * manager.c (pthread_allocate_stack): Compute guard page address
1195 correctly. Patch by HJ Lu.
1197 * sysdeps/pthread/pthread.h: Define
1198 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
1200 2000-01-16 Ulrich Drepper <drepper@cygnus.com>
1202 * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
1203 preference handling.
1204 (pthread_rwlockattr_setkind_np): Allow
1205 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
1206 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1208 2000-01-12 Ulrich Drepper <drepper@cygnus.com>
1210 * internals.h (pthread_readlock_info): New structure.
1211 (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
1212 p_untracked_readlock_count.
1213 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1214 Add initializers for new fields.
1215 * manager.c (pthread_free): Free read/write lock lists.
1216 * queue.h (queue_is_empty): New function.
1217 * rwlock.c: Implement requirements about when readers should get
1219 * sysdeps/pthread/pthread.h
1220 (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
1221 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
1222 Define this name as well.
1223 Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
1225 2000-01-05 Ulrich Drepper <drepper@cygnus.com>
1227 * pthread.c (__pthread_initial_thread, pthread_manager_thread):
1228 Adjust initializers for struct _pthread_descr_struct change.
1229 * internals.h (struct _pthread_descr_struct): Move new elements to
1232 2000-01-03 Kaz Kylheku <kaz@ashi.footprints.net>
1234 Redesigned how cancellation unblocks a thread from internal
1235 cancellation points (sem_wait, pthread_join,
1236 pthread_cond_{wait,timedwait}).
1237 Cancellation won't eat a signal in any of these functions
1238 (*required* by POSIX and Single Unix Spec!).
1239 * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
1240 simultaneous condition variable signal (not required by POSIX
1241 or Single Unix Spec, but nice).
1242 * spinlock.c: __pthread_lock queues back any received restarts
1243 that don't belong to it instead of assuming ownership of lock
1244 upon any restart; fastlock can no longer be acquired by two threads
1246 * restart.h: Restarts queue even on kernels that don't have
1247 queued real time signals (2.0, early 2.1), thanks to atomic counter,
1248 avoiding a rare race condition in pthread_cond_timedwait.
1250 1999-12-31 Andreas Jaeger <aj@suse.de>
1252 * internals.h: Remove duplicate prototype declarations.
1254 * weaks.c: Remove __THROW from prototypes since the file is not
1255 compiled by a C++ compiler.
1256 * internals.h: Likewise.
1258 1999-12-30 Andreas Jaeger <aj@suse.de>
1260 * sysdeps/pthread/pthread.h: Move internal functions to...
1261 * sysdeps/pthread/bits/libc-lock.h: ...here.
1263 1999-12-29 Andreas Jaeger <aj@suse.de>
1265 * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
1267 1999-12-28 Ulrich Drepper <drepper@cygnus.com>
1269 * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
1272 * manager.c (__pthread_start): Add one more cast to prevent
1273 warning on 64bit machines.
1275 1999-12-21 Ulrich Drepper <drepper@cygnus.com>
1277 * manager.c (pthread_handle_create): Set p_pid of new thread
1278 before calling the callback function to report a new thread.
1280 1999-12-20 Andreas Jaeger <aj@suse.de>
1282 * pthread.c (pthread_initialize): Move getrlimit call after
1285 1999-12-18 Ulrich Drepper <drepper@cygnus.com>
1287 * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
1288 pwrite64, lseek64, open64, and __open64.
1289 * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
1290 pwrite64, lseek64, open64, and __open64.
1292 * manager.c (pthread_allocate_stack): Correct computation of
1293 new_thread_bottom. Correct handling of stack size and when the
1294 rlimit method to guard for stack growth is used.
1295 * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
1296 minus one pagesize (not two).
1298 1999-12-03 Andreas Jaeger <aj@suse.de>
1300 * Versions: Add __res_state with version GLIBC_2.2.
1302 * errno.c (__res_state): New function to return thread specific
1305 * pthread.c (pthread_initialize): Initialize p_resp.
1306 (__pthread_reset_main_thread): Also set p_resp.
1308 * manager.c (pthread_handle_create): Initialize p_resp.
1310 * internals.h: Add thread specific resolver state.
1311 Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
1313 1999-12-01 Ulrich Drepper <drepper@cygnus.com>
1315 * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
1317 * sysdeps/i386/i686/pt-machine.h: Likewise.
1318 Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
1320 1999-11-23 Ulrich Drepper <drepper@cygnus.com>
1322 * manager.c (pthread_start_thread_event): Initialize p_pid already
1325 1999-11-22 Ulrich Drepper <drepper@cygnus.com>
1327 * internals.h: Add prototype for __pthread_manager_event.
1328 * manager.c (__pthread_manager_event): New function.
1329 (pthread_start_thread_event): Correct computation of self.
1330 Use INIT_THREAD_SELF.
1331 * pthread.c (__pthread_manager_thread): Initialize p_lock.
1332 (__pthread_initialize_manager): Respect event flags also for creation
1333 of the manager thread.
1335 1999-11-08 Ulrich Drepper <drepper@cygnus.com>
1337 * pthread.c (__pthread_initialize_manager): Initialize
1338 __pthread_manager_thread.p_tid.
1340 1999-11-02 Ulrich Drepper <drepper@cygnus.com>
1342 * internals.h: Declare __pthread_last_event.
1343 * manager.c: Define __pthread_last_event.
1344 (pthread_handle_create): Set __pthread_last_event.
1345 (pthread_exited): Likewise.
1346 * join.c (pthread_exit): Likewise.
1348 * Makefile (libpthread-routines): Add events.
1349 * events.c: New file.
1350 * internals.h: Protect against multiple inclusion.
1351 Include thread_dbP.h header.
1352 (struct _pthread_descr_struct): Add new fields p_report_events and
1354 Declare event reporting functions.
1355 * join.c (pthread_exit): Signal event if this is wanted.
1356 * manager.c (__pthread_threads_events): New variable.
1357 (pthread_handle_create): Take new parameters with event information.
1358 Signal TD_CREATE event if wanted.
1359 (__pthread_manager): Adjust pthread_handle_create call.
1360 (pthread_start_thread_event): New function. Block until manager is
1361 finished and then call pthread_start_thread.
1362 (pthread_exited): Signal TD_REAP event if wanted.
1364 1999-10-26 Ulrich Drepper <drepper@cygnus.com>
1366 * restart.h (suspend_with_cancellation): Rewrite as a macro.
1368 * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
1370 1999-10-25 Andreas Jaeger <aj@suse.de>
1372 * internals.h: Remove K&R compatibility.
1373 * no-tsd.c: Likewise.
1374 * semaphore.h: Likewise.
1375 * signals.c: Likewise.
1376 * sysdeps/pthread/bits/libc-tsd.h: Likewise.
1377 * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
1378 * weaks.c: Likewise.
1380 1999-10-21 Xavier Leroy <Xavier.Leroy@inria.fr>
1382 * pthread.c: For i386, wrap pthread_handle_sigrestart and
1383 pthread_handle_sigcancel with functions that restore %gs from the
1384 signal context. For each signal handling function, two wrappers
1385 are required, one for a non-RT signal and one for a RT signal.
1386 * signal.c: For i386, add code to restore %gs from the signal
1387 context in pthread_sighandler and pthread_sighandler_rt.
1389 1999-10-17 Ulrich Drepper <drepper@cygnus.com>
1391 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
1393 1999-10-14 Ulrich Drepper <drepper@cygnus.com>
1395 * pthread.c (__pthread_initial_thread): Pass argument to
1396 PTHREAD_START_ARGS_INITIALIZER.
1397 (__pthread_manager_thread): Likewise.
1399 * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
1400 initialize function.
1402 * manager.c (pthread_handle_create): Remove p_startfct initialization.
1404 * internals.h (_pthread_descr_struct): We don't need p_startfct field.
1406 1999-10-12 Ulrich Drepper <drepper@cygnus.com>
1408 * internals.h: Correct return types for __libc_read and __libc_write.
1410 1999-10-09 Andreas Jaeger <aj@suse.de>
1412 * internals.h: Add __new_sem_post to get prototype in
1413 manager.c; include semaphore.h for needed types.
1415 1999-10-08 Ulrich Drepper <drepper@cygnus.com>
1417 * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
1418 directly instead of calling sem_post which should not be necessary
1419 but is faster and might help in some case to work around problems.
1420 Patch by khendricks@ivey.uwo.ca [libc/1382].
1422 1999-10-08 Andreas Schwab <schwab@suse.de>
1424 * sysdeps/pthread/Subdirs: New file.
1427 1999-10-07 Ulrich Drepper <drepper@cygnus.com>
1429 * Implies: New file.
1430 * internals.h (struct _pthread_descr_struct): Add p_startfct.
1431 * manager.c (pthread_handle_create): Initialize p_startfct.
1432 * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
1434 1999-09-25 Ulrich Drepper <drepper@cygnus.com>
1436 * manager.c (__linuxthreads_pthread_threads_max): New variable.
1437 * specific.c (__linuxthreads_pthread_keys_max): New variable.
1438 (__linuxthreads_pthread_key_2ndlevel_size): New variable.
1440 * condvar.c (pthread_cond_timedwait_relative): Never return with
1441 EINTR. Patch by Andreas Schwab.
1443 1999-09-19 Ulrich Drepper <drepper@cygnus.com>
1445 * signals.c (sigaction): Correct last patch. Don't select
1446 pthread_sighandler_rt based on the signal number but instead of
1447 the SA_SIGINFO flag.
1449 1999-09-23 Ulrich Drepper <drepper@cygnus.com>
1451 * specific.c: Move definitions of struct pthread_key_struct and
1452 destr_function to ...
1453 * internals.h: ...here.
1455 1999-09-18 Ulrich Drepper <drepper@cygnus.com>
1457 * pthread.c (pthread_handle_sigrestart_rt): New function. Use
1458 this instead of pthread_handle_sigrestart if the signal is an RT
1461 * signals.c: Handle passing through of sighandler arguments also
1462 for real-time signals.
1464 1999-09-03 Andreas Schwab <schwab@suse.de>
1466 * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add
1468 (__vfork): New function, alias vfork.
1469 * Versions: Export __fork, vfork, and __vfork in libpthread.
1471 1999-08-23 Andreas Schwab <schwab@suse.de>
1473 * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
1474 call to signal handler.
1476 1999-08-20 Ulrich Drepper <drepper@cygnus.com>
1478 * pthread.c (__pthread_reset_main_thread): Undo last change.
1479 (__pthread_kill_other_threads_np): Reset signal handlers for the
1480 signals we used in the thread implementation here.
1482 1999-08-19 Ulrich Drepper <drepper@cygnus.com>
1484 * pthread.c (__pthread_reset_main_thread): Reset signal handlers
1485 for the signals we used in the thread implementation [PR libc/1234].
1487 * Versions: Export __pthread_kill_other_threads_np from libpthread
1490 * signals.c: Pass sigcontext through wrapper to the user function.
1492 1999-08-01 Ulrich Drepper <drepper@cygnus.com>
1494 * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
1495 __libc_internal_tsd_set.
1497 1999-07-29 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1499 * manager.c: Remove inclusion of <linux/tasks.h> since it's not
1502 1999-07-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1504 * internals.h: Align _pthread_descr_struct to 32 bytes.
1505 Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
1508 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
1510 * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
1513 1999-07-09 Cristian Gafton <gafton@redhat.com>
1515 * Makefile (libpthread-routines): Add oldsemaphore routine.
1516 * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
1517 sem_trywait, and sem_wait to GLIBC_2.1.
1518 * oldsemaphore.c: New file.
1519 * semaphore.c: Add default_symbol_versions for the changed functions.
1520 (__new_sem_init): Rename from sem_init.
1521 (__new_sem_post): Rename from sem_post.
1522 (__new_sem_wait): Rename from sem_wait.
1523 (__new_sem_trywait): Rename from sem_trywait.
1524 (__new_sem_getvalue): Rename from sem_getvalue.
1525 (__new_sem_destroy): Rename from sem_destroy.
1527 1999-06-23 Robey Pointer <robey@netscape.com>
1529 * internals.h: Added p_nextlock entry to separate queueing for a
1530 lock from queueing for a CV (sometimes a thread queues on a lock
1531 to serialize removing itself from a CV queue).
1532 * pthread.c: Added p_nextlock to initializers.
1533 * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
1535 1999-07-09 Ulrich Drepper <drepper@cygnus.com>
1537 * manager.c (pthread_handle_create): Free mmap region after stack
1538 if clone failed. Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
1540 1999-05-23 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1542 * man/pthread_cond_init.man: Correct example.
1543 Reported by Tomas Berndtsson <tomas@nocrew.org>.
1545 * linuxthreads.texi (Condition Variables): Likewise.
1547 1999-05-18 Jakub Jelinek <jj@ultra.linux.cz>
1549 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
1550 casx not cas, also successful casx returns the old value in rd
1551 and not the new value.
1553 1999-05-16 Xavier Leroy <Xavier.Leroy@inria.fr>
1555 * manager.c: If pthread_create() is given a NULL attribute
1556 and the thread manager runs with a realtime policy, set the
1557 scheduling policy of the newly created thread back to SCHED_OTHER.
1558 * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
1559 initialize the schedpolicy field of new_thread->p_start_args
1560 to that of the calling thread.
1562 1999-04-29 Ulrich Drepper <drepper@cygnus.com>
1564 * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
1565 instruction does not allow memory element to use offset.
1567 1999-04-28 Ulrich Drepper <drepper@cygnus.com>
1569 * manager.c (pthread_allocate_stack): Optimize initialization of new
1572 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
1573 Don't use initializer since it is all zeroes.
1574 (__libc_once_define): Likewise.
1576 1999-04-16 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1578 * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
1579 doesn't exist anymore.
1580 * sysdeps/i386/Implies: Likewise.
1581 * sysdeps/m68k/Implies: Likewise.
1582 * sysdeps/mips/Implies: Likewise.
1583 * sysdeps/powerpc/Implies: Likewise.
1584 * sysdeps/sparc/sparc32/Implies: Likewise.
1585 * sysdeps/sparc/sparc64/Implies: Likewise.
1587 1999-04-15 Ulrich Drepper <drepper@cygnus.com>
1589 * sysdeps/alpha/bits/semaphore.h: Removed.
1590 * sysdeps/powerpc/bits/semaphore.h: Removed.
1591 * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
1592 * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
1593 * Makefile (headers): Remove bits/semaphore.h.
1595 * semaphore.h: Define _pthread_descr if necessary.
1596 Don't include limits.h. Define SEM_VALUE_MAX directly.
1598 (sem_t): Protect element names with leading __.
1599 Add declarations for sem_close, sem_open, and sem_unlink.
1600 * semaphore.c: Adjust all functions for new element names.
1601 Define sem_close, sem_open, and sem_unlink.
1602 * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
1604 * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
1607 1999-03-16 H.J. Lu <hjl@gnu.org>
1609 * specific.c (pthread_key_delete): Check th->p_terminated to see
1610 if the thread is running.
1612 * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
1613 Added to GLIBC_2.0 for libc.so.
1615 1999-02-12 H.J. Lu <hjl@gnu.org>
1617 * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
1618 __libc_allocate_rtsig): Added to GLIBC_2.1.
1620 * internals.h (DEFAULT_SIG_RESTART): Removed.
1621 (DEFAULT_SIG_CANCEL): Removed.
1623 * pthread.c (init_rtsigs, __libc_current_sigrtmin,
1624 __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
1625 (__pthread_sig_restart, __pthread_sig_cancel,
1626 __pthread_sig_debug): Initialized.
1627 (pthread_initialize): Call init_rtsigs () to initialize
1630 1999-02-03 H.J. Lu <hjl@gnu.org>
1632 * manager.c (__pthread_manager): Do block __pthread_sig_debug.
1633 Don't restart the thread which sent REQ_DEBUG.
1634 (pthread_start_thread): Check if __pthread_sig_debug > 0
1637 * pthread.c (__pthread_initialize_manager): Suspend ourself
1638 after sending __pthread_sig_debug to gdb instead of
1639 __pthread_sig_cancel.
1641 1999-01-24 H.J. Lu <hjl@gnu.org>
1643 * manager.c (__pthread_manager): Delete __pthread_sig_debug
1644 from mask if __pthread_sig_debug > 0.
1645 (pthread_handle_create): Increment __pthread_handles_num.
1647 * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
1648 * pthread.c (__pthread_initialize_manager): Likewise.
1650 * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
1651 instead of __libc_allocate_rtsig (2).
1652 (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
1653 instead of __pthread_sig_cancel.
1654 (pthread_handle_sigdebug): Fix comments.
1656 1999-01-21 Ulrich Drepper <drepper@cygnus.com>
1658 * manager.c (pthread_allocate_stack): Set
1659 __pthread_nonstandard_stacks if user-specified stack is used.
1661 1999-01-16 Ulrich Drepper <drepper@cygnus.com>
1663 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
1664 _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
1666 1999-01-07 Xavier Leroy <Xavier.Leroy@inria.fr>
1668 * pthread.c: Use a third signal __pthread_sig_debug distinct
1669 from __pthread_sig_cancel to notify gdb when a thread is
1671 * manager.c: Likewise.
1672 * internals.h: Likewise.
1673 * signals.c: The implementation of sigwait(s) assumed that
1674 all signals in s have signal handlers already attached.
1675 This is not required by the standard, so make it work
1676 also if some of the signals have no handlers.
1678 1999-01-05 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1680 * linuxthreads.texi: Remove pointers from first @node. Move old
1681 @node spec inside comment.
1683 1998-12-31 Ulrich Drepper <drepper@cygnus.com>
1685 * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
1688 1998-12-29 Ulrich Drepper <drepper@cygnus.com>
1690 * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
1691 lock. Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
1693 1998-12-21 Ulrich Drepper <drepper@cygnus.com>
1695 * manager.c: Threads now send __pthread_sig_cancel on termination.
1696 Change clone call and signal masks.
1697 * thread.c (pthread_handle_sigrestart): Remove special code for
1699 (pthread_handle_sigcancel): In manager thread call
1700 __pthread_manager_sighandler.
1701 * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
1702 * sysdeps/i386/i686/pt-machine.h: Likewise.
1703 Patches by Xavier Leroy.
1705 1998-12-14 Ulrich Drepper <drepper@cygnus.com>
1707 * spinlock.c (__pthread_unlock): Don't crash if called for an
1708 untaken mutex. Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
1710 * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
1713 1998-12-13 Ulrich Drepper <drepper@cygnus.com>
1715 * Examples/ex3.c: Wait until all threads are started before
1716 searching for the number to avoid race condition on very fast
1719 1998-12-08 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1721 * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
1722 declaration since it's not needed.
1724 * sysdeps/pthread/pthread.h: Move internal functions to ...
1725 * internals.h: ...here.
1727 1998-12-02 H.J. Lu <hjl@gnu.org>
1729 * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
1730 SIGRTMIN is defined.
1731 (__pthread_sig_cancel): Likewise.
1733 1998-12-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1735 * wrapsyscall.c: Include <sys/mman.h> for msync,
1736 <stdlib.h> for system and <termios.h> for tcdrain prototype.
1737 Correct msync declaration.
1739 1998-11-29 Roland McGrath <roland@baalperazim.frob.com>
1741 * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
1742 __libc_tsd_set): New macros for new interface.
1743 * no-tsd.c: New file, provide uninitialized defns of
1744 __libc_internal_tsd_get and __libc_internal_tsd_set.
1745 * Makefile (routines): Add no-tsd.
1747 1998-10-12 Roland McGrath <roland@baalperazim.frob.com>
1749 * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
1750 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1751 __libc_internal_tsd_set): Move decls to ...
1752 * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
1755 * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
1756 __libc_internal_tsd_set): Make these pointers to functions, not
1757 functions; remove #pragma weak decls for them.
1758 * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
1759 Define static functions and initialized pointers to them.
1761 1998-11-18 Ulrich Drepper <drepper@cygnus.com>
1763 * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
1764 (CFLAGS-specific.c): Likewise.
1765 (CFLAGS-pthread.c): Likewise.
1766 (CFLAGS-ptfork.c): Likewise.
1767 (CFLAGS-cancel.c): Likewise.
1768 * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
1769 as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
1771 * mutex.c (pthread_mutex_init): Define as strong symbol.
1772 (pthread_mutex_destroy): Likewise.
1773 (pthread_mutex_trylock): Likewise.
1774 (pthread_mutex_lock): Likewise.
1775 (pthread_mutex_unlock): Likewise.
1776 (pthread_mutexattr_init): Likewise.
1777 (pthread_mutexattr_destroy): Likewise.
1778 (pthread_once): Likewise.
1779 * ptfork.c (pthread_atfork): Likewise.
1780 * specific.c (pthread_key_create): Likewise.
1781 (pthread_setspecific): Likewise.
1782 (pthread_getspecific): Likewise.
1784 1998-11-15 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1786 * linuxthreads.texi: Fix punctuation after xref.
1788 1998-11-10 H.J. Lu <hjl@gnu.org>
1790 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
1791 if it is defined in <linux/limits.h>.
1793 1998-10-29 14:28 Ulrich Drepper <drepper@cygnus.com>
1795 * spinlock.h (__pthread_trylock): Define inline.
1796 (__pthread_lock): Add extra parameter to declaration. Declare
1797 using internal_function.
1798 (__pthread_unlock): Declare using internal_function.
1799 * spinlock.c (__pthread_lock): Add new parameter. Use it instead
1800 of local variable self. Avoid recomputing self. Define using
1802 (__pthread_trylock): Remove.
1803 (__pthread_unlock): Define using internal_function.
1804 * cancel.c: Adjust for __pthread_lock interface change. Use already
1805 computed self value is possible.
1806 * condvar.c: Likewise.
1808 * manager.c: Likewise.
1809 * mutex.c: Likewise.
1810 * pthread.c: Likewise.
1811 * rwlock.c: Likewise.
1812 * semaphore.c: Likewise.
1813 * signals.c: Likewise.
1815 1998-10-27 13:46 Ulrich Drepper <drepper@cygnus.com>
1817 * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
1818 __ to field names of the struct.
1819 * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
1821 (pthread_attr_t): Likewise.
1822 (pthread_cond_t): Likewise.
1823 (pthread_condattr_t): Likewise.
1824 (pthread_mutex_t): Likewise.
1825 (pthread_mutexattr_t): Likewise.
1826 (pthread_rwlock_t): Likewise.
1827 (pthread_rwlockattr_t): Likewise.
1828 * attr.c: Adjust for pthread.h and pthreadtypes.h change.
1829 * cancel.c: Likewise.
1830 * condvar.c: Likewise.
1831 * manager.c: Likewise.
1832 * mutex.c: Likewise.
1833 * pthread.c: Likewise.
1834 * ptlongjmp.c: Likewise.
1835 * rwlock.c: Likewise.
1836 * spinlock.c: Likewise.
1838 1998-10-09 Ulrich Drepper <drepper@cygnus.com>
1840 * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
1843 * sysdeps/i386/i686/pt-machine.h: Remove unused inline
1846 * Makefile (libpthread-routines): Add pt-machine.
1847 * pt-machine.c: New file.
1848 * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
1849 yet defined. Use PT_EI in extern inline definitions.
1850 * sysdeps/arm/pt-machine.h: Likewise.
1851 * sysdeps/i386/pt-machine.h: Likewise.
1852 * sysdeps/i386/i686/pt-machine.h: Likewise.
1853 * sysdeps/m68k/pt-machine.h: Likewise.
1854 * sysdeps/mips/pt-machine.h: Likewise.
1855 * sysdeps/powerpc/pt-machine.h: Likewise.
1856 * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1857 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1859 1998-10-02 Andreas Jaeger <aj@arthur.rhein-neckar.de>
1861 * semaphore.h: Include <sys/types.h> so that _pthread_descr
1864 1998-09-15 David S. Miller <davem@pierdol.cobaltmicro.com>
1866 * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
1868 * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
1870 1998-09-12 14:24 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
1872 * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
1875 1998-09-02 11:08 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1877 * signals.c (sigaction): Check that sig is less than NSIG to avoid
1878 array index overflow.
1880 1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
1882 * sysdeps/pthread/semaphore.h: New file.
1884 1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
1886 * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
1887 _LIBC_TSD_KEY_DL_ERROR.
1889 1998-08-31 Ulrich Drepper <drepper@cygnus.com>
1891 * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
1892 * sysdeps/i386/pt-machine.h: Likewise.
1893 Suggested by Roland McGrath.
1895 1998-08-28 13:58 Ulrich Drepper <drepper@cygnus.com>
1897 * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
1898 access thread data with non-constant offsets.
1899 * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
1902 * sysdeps/i386/useldt.h: Fix typo. Add THREAD_GETMEM_NC and
1903 THREAD_SETMEM_NC definitions.
1905 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
1907 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1909 1998-08-26 15:46 Ulrich Drepper <drepper@cygnus.com>
1911 * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
1912 not already defined.
1913 (struct _pthread_descr_struct): Add p_self and p_nr field.
1914 * manager.c (__pthread_handles): Define second element to point
1916 (__pthread_handles_num): Initialize to 2.
1917 (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
1918 (pthread_start_thread): Likewise.
1919 (pthread_handle_create): Start search for free slot at entry 2.
1920 Initialize new fields p_self and p_nr.
1921 Call __clone with CLONE_PTRACE if available.
1922 (pthread_free): Call FREE_THREAD_SELF if available.
1923 * pthread.c (__pthread_initial_thread): Initialize new fields.
1924 (__pthread_manager_thread): Likewise.
1925 (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
1927 * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
1928 elements of the thread descriptor.
1929 * condvar.c: Likewise.
1930 * errno.c: Likewise.
1932 * manager.c: Likewise.
1933 * pthread.c: Likewise.
1934 * ptlongjmp.c: Likewise.
1935 * semaphore.c: Likewise.
1936 * signals.c: Likewise.
1937 * specific.c: Likewise.
1938 * spinlock.c: Likewise.
1940 * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
1942 * sysdeps/i386/useldt.h: New file.
1943 * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
1945 * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
1946 THREAD_SETMEM using __thread_self.
1947 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1949 1998-08-24 Geoff Keating <geoffk@ozemail.com.au>
1951 * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
1952 turned out that we didn't need to queue after all.
1954 1998-08-22 Geoff Keating <geoffk@ozemail.com.au>
1956 * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
1957 and wastes space; correct types.
1959 1998-08-08 11:18 H.J. Lu <hjl@gnu.org>
1961 * signals.c (sigaction): Handle NULL argument.
1963 1998-08-04 Ulrich Drepper <drepper@cygnus.com>
1965 * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
1968 1998-08-02 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1970 * Makefile (linuxthreads-version): Extract correct number from
1973 1998-07-29 Xavier Leroy <Xavier.Leroy@inria.fr>
1975 * Banner: Bump version number to 0.8
1976 * FAQ.html: Many updates, in particular w.r.t. debugging.
1977 * manager.c: Support for non-default stacksize for
1978 LinuxThreads-allocated stacks;
1979 don't use guard pages for stacks with default size, rely on
1980 rlimit(RLIMIT_STACK) instead (it's cheaper).
1982 * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
1983 everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
1984 * condvar.c: Likewise.
1985 * internals.h: Likewise.
1986 * restart.h: Likewise.
1987 * signals.c: Likewise.
1988 * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
1990 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1992 * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
1993 __pthread_mutexattr_[sg]ettype. Add more weak aliases.
1994 * Versions: Put __pthread_mutexattr_settype under version
1995 GLIBC_2.0. Don't export __pthread_mutexattr_setkind_np and
1996 __pthread_mutexattr_gettype.
1998 1998-07-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2000 * sysdeps/pthread/bits/libc-lock.h: Make
2001 __pthread_mutexattr_settype weak. Don't make
2002 __pthread_mutexattr_setkind_np weak.
2004 1998-07-16 10:52 Ulrich Drepper <drepper@cygnus.com>
2006 * manager.c (pthread_handle_create): Check whether sched_setscheduler
2007 call can succeed here.
2009 * mutex.c: Define __pthread_mutexattr_settype and make
2010 __pthread_mutexattr_setkind_np an alias.
2011 Likewise for __pthread_mutexattr_gettype.
2013 1998-07-15 11:00 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2015 * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
2018 1998-07-14 19:38 Ulrich Drepper <drepper@cygnus.com>
2020 * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
2022 1998-07-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2024 * Examples/ex6.c: Include <unistd.h> for usleep.
2026 1998-06-13 11:04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2028 * Examples/ex4.c (main): Use exit, not pthread_exit.
2030 1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
2032 * Versions: Add __pthread_mutexattr_gettype and
2033 __pthread_mutexattr_settype.
2034 * lockfile.c: Use __pthread_mutexattr_settype instead of
2035 __pthread_mutexattr_setkind_np.
2036 * mutex.c: Define __pthread_mutexattr_gettype and
2037 __pthread_mutexattr_settype.
2039 * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
2040 __pthread_mutexattr_settype.
2041 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
2042 Use __pthread_mutexattr_settype.
2044 1998-07-08 22:26 Ulrich Drepper <drepper@cygnus.com>
2046 * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
2047 * mutex.c: Define weak alias pthread_mutexattr_gettype and
2048 pthread_mutexattr_settype.
2049 * sysdeps/pthread/pthread.h: Declare these functions.
2050 Move pthread_sigmask and pthread_kill declaration in separate header.
2051 * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
2053 1998-07-07 15:20 Ulrich Drepper <drepper@cygnus.com>
2055 * Makefile: Add rules to compile and run tests.
2056 * Examples/ex1.c: Little changes to fix warnings.
2057 * Examples/ex2.c: Likewise.
2058 * Examples/ex3.c: Likewise.
2059 * Examples/ex4.c: Likewise.
2060 * Examples/ex5.c: Likewise.
2061 * Examples/ex6.c: New file.
2063 1998-07-05 11:54 Ulrich Drepper <drepper@cygnus.com>
2065 * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
2067 1998-07-01 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2069 * attr.c: Include <string.h>.
2071 1998-06-30 11:47 Ulrich Drepper <drepper@cygnus.com>
2073 * attr.c: Include errno.h. Use memcpy to copy sched_param.
2074 * internals.h: Include limits.h.
2075 * manager.c: Use memcpy to copy sched_param.
2076 * ptfork.c: Include errno.h.
2077 * pthread.c: Likewise.
2078 * semaphore.c: Likewise.
2079 * specific.c: Likewise.
2080 * spinlock.h: Likewise.
2081 * sysdeps/pthread/pthread.h: Include only allowed headers. Move
2082 type definition to ...
2083 * sysdeps/pthread/bits/pthreadtypes.h: ...here. New file.
2085 1998-06-29 12:34 Ulrich Drepper <drepper@cygnus.com>
2087 * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
2089 * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
2090 as macros as demanded in POSIX.1, Annex C.
2092 1998-06-29 12:29 Ulrich Drepper <drepper@cygnus.com>
2094 * internals.h (struct pthread_request): For free use pthread_t
2095 instead of pthread_descr.
2096 * join.c (pthread_join): Pass thread_id, not th to manager.
2097 (pthread_detach): Likewise.
2098 * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
2099 (pthread_exited): Remove detached queue code.
2100 (pthread_handle_free): Expect thread ID parameter and use it to
2101 validate the thread decsriptor. Don't use detached queue.
2102 Patches by Xavier Leroy.
2104 1998-06-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2106 * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
2107 _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
2108 __pthread_atfork, __pthread_key_create, __pthread_once.
2109 * internals.h: Doc fix.
2110 * pthread.c (__pthread_initialize): Define again.
2112 1998-06-26 Ulrich Drepper <drepper@cygnus.com>
2114 * manager.c (pthread_exited): If thread is not detached put it on
2116 (pthread_handle_free): If thread is not on list with living threads
2117 search on list with detached threads.
2119 * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
2120 for new definition of pthread_rwlock_t.
2122 * spinlock.c: Correct test whether to compile
2123 __pthread_compare_and_swap or not.
2125 1998-06-25 19:27 Ulrich Drepper <drepper@cygnus.com>
2127 * attr.c: Finish user stack support. Change locking code to be safe
2128 in situations with different priorities.
2129 * cancel.c: Likewise.
2130 * condvar.c: Likewise.
2131 * internals.h: Likewise.
2133 * manager.c: Likewise.
2134 * mutex.c: Likewise.
2135 * pthread.c: Likewise.
2136 * ptlongjmp.c: Likewise.
2137 * queue.h: Likewise.
2138 * rwlock.c: Likewise.
2139 * semaphore.c: Likewise.
2140 * semaphore.h: Likewise.
2141 * signals.c: Likewise.
2142 * spinlock.c: Likewise.
2143 * spinlock.h: Likewise.
2144 * sysdeps/pthread/pthread.h: Likewise.
2145 Patches by Xavier Leroy.
2147 * sysdeps/i386/i686/pt-machine.h: New file.
2149 1998-06-25 Ulrich Drepper <drepper@cygnus.com>
2151 * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
2152 [sg]et_stackaddr prototypes always available.
2154 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2155 _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
2157 1998-06-24 Ulrich Drepper <drepper@cygnus.com>
2159 * manager.c (pthread_free): Undo patch from 980430.
2160 Reported by David Wragg <dpw@doc.ic.ac.uk>.
2162 1998-06-09 15:07 Ulrich Drepper <drepper@cygnus.com>
2164 * manager.c: Define __pthread_manager_adjust_prio and use it to
2165 increase priority when needed.
2166 * internals.h: Add prototype for __pthread_manager_adjust_prio.
2167 * mutex.c: Optimize mutexes to wake up only one thread.
2168 * pthread.c: Move PID of manager for global variable in structure
2170 Patches by Xavier Leroy.
2172 1998-06-07 13:47 Ulrich Drepper <drepper@cygnus.com>
2174 * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
2176 1998-06-03 Andreas Jaeger <aj@arthur.rhein-neckar.de>
2178 * attr.c: Correct typo.
2180 1998-05-01 Ulrich Drepper <drepper@cygnus.com>
2182 * manager.c (pthread_free): Unmap guard before the stack.
2183 Patch by Matthias Urlichs.
2185 1998-04-30 Ulrich Drepper <drepper@cygnus.com>
2187 * manager.c (pthread_free): Detect already free child.
2188 Patch by Xavier Leroy, reported by Matthias Urlichs.
2190 1998-04-23 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2192 * Makefile (linuxthreads-version): Renamed back from
2195 1998-04-21 Ulrich Drepper <drepper@cygnus.com>
2197 * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
2200 1998-04-20 14:55 Ulrich Drepper <drepper@cygnus.com>
2202 * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
2203 * internals.h: Add definitions for new spinlock implementation.
2204 * ptlongjmp.c: New file.
2205 * spinlock.c: New file.
2206 * spinlock.h (acquire): Don't reschedule using __sched_yield, use
2207 new function __pthread_acquire to prevent deadlocks with thread
2208 with different priorities.
2209 Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
2211 1998-03-16 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2213 * manager.c (__pthread_manager): Reduce first argument to select
2214 to include just the needed file descriptor.
2216 1998-03-17 00:06 Ulrich Drepper <drepper@cygnus.com>
2218 * manager.c: Fix last patch which caused core dumps.
2220 * pthread.c: Correctly handle missing SIGRTMIN.
2222 1998-03-15 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2224 * libpthread.map: Add __libc_internal_tsd_get and
2225 __libc_internal_tsd_set. Add missing cancelable functions. Export
2226 libc internal versions of the cancelable functions.
2228 1998-03-13 16:51 Ulrich Drepper <drepper@cygnus.com>
2230 * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
2232 1998-03-13 00:46 Ulrich Drepper <drepper@cygnus.com>
2234 * attr.c: Implement pthread_attr_[gs]etguardsize,
2235 pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
2236 Change pthread_attr_init to have two interfaces.
2237 * internals.h (struct _pthread_descr_struct): Add new fields for
2239 * libpthread.map: Add names in GLIBC_2.1 section.
2240 * manager.c (pthread_handle_create): Implement guardsize and
2242 (pthread_free): Likewise.
2243 * pthread.c (pthread_create): Add new interface for changed
2245 * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2246 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
2249 1998-03-11 00:42 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
2251 * manager.c: Enable resetting of the thread scheduling policy
2252 to SCHED_OTHER when the parent thread has a different one.
2254 1998-02-01 13:51 Ulrich Drepper <drepper@cygnus.com>
2256 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2257 _POSIX_ASYNCHRONOUS_IO.
2259 * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
2261 * mutex.c: Implement new mutex types.
2263 * internals.h: Include <signal.h>.
2265 * libpthread.map: Add __erno_location and __h_errno_location.
2267 * errno.c: Return pointer to variable actually in use. This might
2268 not be the one in the thread structure.
2269 * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
2271 * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
2272 of manager thread structure.
2273 (pthread_handle_create): Set p_errnop and p_h_errnop members for new
2275 * pthread.c: Adapt initializer for thread structures.
2276 (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
2277 (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
2278 current thread to global variables.
2280 1998-01-31 17:27 Ulrich Drepper <drepper@cygnus.com>
2282 * rwlock.c: New file.
2283 * Makefile (libpthread-routines): Add rwlock.
2284 * sysdeps/pthread/pthread.h: Define data structures and declare
2286 * libpthread.map: Add new functions.
2288 1997-12-18 13:50 Philip Blundell <pb@nexus.co.uk>
2290 * sysdeps/arm/pt-machine.h: New file; add ARM support.
2291 * sysdeps/arm/Implies: likewise.
2292 * README: Document it.
2294 1997-12-13 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2296 * signals.c: Remove unneeded initializer for sigwaited, saving a
2299 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2301 * semaphore.c (sem_init): Set sem_spinlock only if available.
2303 1997-12-04 01:48 Ulrich Drepper <drepper@cygnus.com>
2305 * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
2306 * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
2308 * Makefile: Update from LinuxThreads 0.7.
2309 * internals.h. Likewise.
2310 * manager.c: Likewise.
2311 * mutex.c: Likewise.
2312 * pthread.c: Likewise.
2313 * signals.c: Likewise.
2314 * specific.c: Likewise.
2315 * Examples/ex3.c: Likewise.
2317 1997-11-20 18:13 Ulrich Drepper <drepper@cygnus.com>
2319 * pthread.c (__pthread_reset_main_thread): Close pipe only if still
2322 1997-10-29 05:38 Ulrich Drepper <drepper@cygnus.com>
2324 * wrapsyscall.c: Add socket functions which are also cancelation
2327 1997-10-19 21:40 Wolfram Gloger <wg@wolfram.dent.med.uni-muenchen.de>
2329 * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
2330 New functions for fast thread specific data within libc.
2332 * internals.h: Add new array p_libc_specific to struct
2333 _pthread_descr_struct.
2335 * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
2337 1997-10-13 05:39 Ulrich Drepper <drepper@cygnus.com>
2339 * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
2340 Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
2342 1997-08-29 03:05 Ulrich Drepper <drepper@cygnus.com>
2344 * internals.h (struct _pthread_descr_struct): Add definitions for
2345 two-level specific key handling.
2346 * manager.c (pthread_handle_create): Initialize specific memory array.
2347 * specific.c: Implement two-level key handling.
2348 * weaks.c: Don't provide dummy key handling.
2349 * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
2350 Add definition of __libc_key_t.
2351 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
2353 Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
2354 PTHREAD_DESTRUCTOR_ITERATIONS.
2356 * manager.c (pthread_handle_create): Compare mmap result with
2359 * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
2360 * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
2362 1997-08-22 19:04 Richard Henderson <rth@cygnus.com>
2364 sysdeps/sparc -> sysdeps/sparc/sparc32
2365 sysdeps/sparc64 -> sysdeps/sparc/sparc64
2367 * internals.h: Change definition of THREAD_SELF to be an expression,
2368 not a statement that did a return.
2369 * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
2370 * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
2371 Follow Solaris and use a "system reserved" register (%g6) to hold
2372 the thread descriptor.
2373 * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2375 1997-08-03 00:09 Ulrich Drepper <drepper@cygnus.com>
2377 * mutex.c: Correct pthread_once. Patch by Xavier Leroy.
2378 * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
2379 * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
2381 * semaphore.c: Include spinlock.h only when needed.
2383 * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
2384 keys for entries not in use.
2386 * weaks.c: Implement key handling functions for real.
2388 1997-06-29 01:04 Richard Henderson <richard@gnu.ai.mit.edu>
2390 Initial sparc64-linux support:
2391 * sysdeps/sparc64/Implies: New file.
2392 * sysdeps/sparc64/pt-machine.h: Likewise.
2394 1997-06-29 00:48 Ulrich Drepper <drepper@cygnus.com>
2396 * semaphore.c: Include spinlock.h at correct place.
2399 1997-06-13 10:06 Richard Henderson <rth@tamu.edu>
2401 The Great Bit File Move:
2402 * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
2403 * sysdeps/powerpc/semaphorebits.h: Likewise.
2404 * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
2405 * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
2406 * sysdeps/pthread/libc-lock.h: -> bits/
2407 * sysdeps/pthread/stdio-lock.h: Likewise.
2408 * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
2409 * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
2410 * semaphore.h: Likewise.
2411 * sysdeps/pthread/pthread.h: Likewise.
2413 * lockfile.c: <foo.h> -> <bits/foo.h>.
2414 * semaphore.h: Likewise.
2416 * Makefile: (headers): foo.h -> bits/foo.h.
2417 * sysdeps/pthread/Makefile: Likewise.
2419 1997-04-11 01:18 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2421 * semaphore.c (sem_init): Set sem_spinlock only if available.
2423 * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
2426 1997-04-09 03:00 Ulrich Drepper <drepper@cygnus.com>
2428 Update from LinuxThreads 0.6.
2430 * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
2431 and __sched_get_priority_min instead of names without `__'.
2433 * manager.c: Rewrite large parts to implement opaque pthread_t.
2435 * cancel.c: Adapt for opaque pthread_t type.
2436 * condvar.c: Likewise.
2437 * errno.c: Likewise.
2439 * mutex.c: Likewise.
2440 * pthread.c: Likewise.
2441 * signals.c: Likewise.
2442 * specific.c: Likewise.
2443 * restart.h: Likewise.
2444 * queue.h: Likewise.
2445 * Examples/ex3.c: Likewise.
2446 * Examples/ex4.c: Likewise.
2447 * sysdeps/pthread/pthread.h: Likewise.
2449 * pthread.c: Accumulate time for all threads in thread manager.
2451 * semaphore.c: Implement fallback implementation for architectures
2452 sometimes missing compare-exchange operations.
2454 * cancel.c (pthread_cancel): Validate handle argument.
2455 * join.c (pthread_join): Likewise.
2456 (pthread_detach): Likewise.
2457 * signals.c (pthread_kill): Likewise.
2459 * spinlock.h (acquire): Use __sched_yield not sched_yield.
2461 * queue.h (enqueue): Enqueue thread according to priority.
2463 * internals.c (struct pthread_start_args): New struct for passing
2464 args to cloning function.
2465 (struct _pthread): Rename to _pthread_descr_struct and adapt for
2468 * Examples/Makefile (clean): Pass -f option to rm.
2470 * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
2471 and define TEST_FOR_COMPARE_AND_SWAP.
2472 * sysdeps/i386/i486/pt-machine.h: Removed.
2474 * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
2477 1997-04-04 16:38 Ulrich Drepper <drepper@cygnus.com>
2479 * restart.h (suspend): Clear p_signal before suspending.
2480 (suspend_with_cancellation): Likewise.
2481 Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
2483 * weaks.c: Make __pthread_key_create return 1.
2484 * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
2485 __libc_getspecific, __libc_setspecific, and __libc_key_t.
2486 * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
2489 1997-03-19 15:13 Miguel de Icaza <miguel@nuclecu.unam.mx>
2491 * sysdeps/sparc/pt-machine (RELEASE): Fix.
2493 1997-03-01 07:55 Geoff Keating <geoffk@ozemail.com.au>
2495 * sysdeps/powerpc/Implies: Added.
2496 * sysdeps/powerpc/pt-machine.h: Added.
2497 * sysdeps/powerpc/semaphorebits.h: Added.
2499 1997-01-22 01:22 Ulrich Drepper <drepper@cygnus.com>
2501 * pthread.c (__pthread_initial_thread): Correct
2503 (__pthread_manager_thread): Likewise.
2504 Reported by Andreas Jaeger.
2506 1997-01-18 22:15 Richard Henderson <rth@tamu.edu>
2508 Since sigset_t no longer fits in a register, we can't pass in the
2509 thread's initial mask so easily. Take this opportunity to simplify
2510 the clone implementation by only accepting a single void* argument.
2512 * manager.c (__pthread_manager): Put thread vitals in the thread
2513 struct instead of as arguments through clone.
2514 (pthread_start_thread): Look for them there.
2515 * internals.h (struct _pthread): Add p_initial_fn,
2516 p_initial_fn_arg, p_initial_mask. Fix __pthread_manager proto.
2517 * pthread.c (pthread_initialize_manager): Revise clone invocation.